-
Notifications
You must be signed in to change notification settings - Fork 0
hyp impact.md
maoxiaoyue edited this page Apr 14, 2026
·
1 revision
分析修改某個 Go 檔案會影響哪些套件、路由和測試。修改共用套件前必跑。
hyp impact <file.go>
hyp impact pkg/errors/catalog.go
輸出:
Impact Analysis: pkg/errors/catalog.go
Package: pkg/errors
Direct dependents (import this package):
→ pkg/contract
→ pkg/diagnostic
→ pkg/scaffold
Affected tests:
→ pkg/errors/*_test.go (19 tests)
→ pkg/contract/*_test.go (24 tests)
Total: 43 tests
Risk: MEDIUM (3 packages depend on this)
| 等級 | 條件 |
|---|---|
| LOW | < 2 依賴套件,< 20 測試 |
| MEDIUM | 2-4 依賴套件 或 20-49 測試 |
| HIGH | ≥ 5 依賴套件 或 ≥ 50 測試 |
| 風險 | 行動 |
|---|---|
| LOW | 直接修改,跑受影響測試 |
| MEDIUM | 修改後跑所有依賴套件測試 |
| HIGH | 跟團隊討論後再改 |
- 純讀取分析,不修改檔案
- 只掃描 import 路徑,不讀函式內容
- 路徑驗證在專案目錄內
- hyp chkcomment — 修改後檢查註解
設計文件
套件
- config — 設定
- context — 請求上下文
- router — 路由器
- server — 伺服器
- middleware — 中介層
- websocket — WebSocket
- hidb — 資料庫 ORM
- hidb/cassandra — Cassandra
- logger — 日誌
- json — JSON 處理
- grpc — gRPC
AI 協作工具鏈
- schema — Schema-first 路由
- manifest — 專案 Manifest
- contract — Contract Testing
- errors — Typed Error Catalog
- migrate — Migration Diff
- scaffold — 智慧 Scaffold
- airules — AI Rules
CLI 命令
- hyp 總覽
- hyp new
- hyp api
- hyp run
- hyp restart
- hyp generate
- hyp migrate
- hyp context
- hyp ai-rules
- hyp chkcomment
- hyp impact
- hyp docker
- hyp health
- hyp version
- hyp difflog
Design Docs
Packages
- config — Configuration
- context — Request Context
- router — Router
- server — Server
- middleware — Middleware
- websocket — WebSocket
- hidb — Database ORM
- hidb/cassandra - Cassandra 5.0
- logger — Logger
- json — JSON
- grpc — gRPC
AI Collaboration Toolchain
- schema — Schema-first Routing
- manifest — Project Manifest
- contract — Contract Testing
- errors — Typed Error Catalog
- migrate — Migration Diff
- scaffold — Smart Scaffold
- airules — AI Rules
CLI Commands