gitnexus-impact-analysis
Use when the user wants to know what will break if they change something, or needs safety analysis before editing code. Examples: "Is it safe to change X?", "What depends on this?", "What will break?"
- License 许可
- MIT
- 最近更新
- 2026-07-08
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- gitnexus-impact-analysis
- description
- Use when the user wants to know what will break if they change something, or needs safety analysis before editing code. Examples: "Is it safe to change X?", "What depends on this?", "What will break?"
03 SKILL.md 正文
Impact Analysis with GitNexus
When to Use
- "Is it safe to change this function?"
- "What will break if I modify X?"
- "Show me the blast radius"
- "Who uses this code?"
- Before making non-trivial code changes
- Before committing — to understand what your changes affect
Workflow
1. gitnexus_impact({target: "X", direction: "upstream"}) → What depends on this
2. READ gitnexus://repo/{name}/processes → Check affected execution flows
3. gitnexus_detect_changes() → Map current git changes to affected flows
4. Assess risk and report to user
If "Index is stale" → run
npx gitnexus analyzein terminal.
Checklist
- [ ] gitnexus_impact({target, direction: "upstream"}) to find dependents
- [ ] Review d=1 items first (these WILL BREAK)
- [ ] Check high-confidence (>0.8) dependencies
- [ ] READ processes to check affected execution flows
- [ ] gitnexus_detect_changes() for pre-commit check
- [ ] Assess risk level and report to user
Understanding Output
| Depth | Risk Level | Meaning |
|---|---|---|
| d=1 | WILL BREAK | Direct callers/importers |
| d=2 | LIKELY AFFECTED | Indirect dependencies |
| d=3 | MAY NEED TESTING | Transitive effects |
Risk Assessment
| Affected | Risk |
|---|---|
| <5 symbols, few processes | LOW |
| 5-15 symbols, 2-5 processes | MEDIUM |
| >15 symbols or many processes | HIGH |
| Critical path (auth, payments) | CRITICAL |
Tools
gitnexus_impact — the primary tool for symbol blast radius:
gitnexus_impact({
target: "validateUser",
direction: "upstream",
minConfidence: 0.8,
maxDepth: 3
})
→ d=1 (WILL BREAK):
- loginHandler (src/auth/login.ts:42) [CALLS, 100%]
- apiMiddleware (src/api/middleware.ts:15) [CALLS, 100%]
→ d=2 (LIKELY AFFECTED):
- authRouter (src/routes/auth.ts:22) [CALLS, 95%]
gitnexus_detect_changes — git-diff based impact analysis:
gitnexus_detect_changes({scope: "staged"})
→ Changed: 5 symbols in 3 files
→ Affected: LoginFlow, TokenRefresh, APIMiddlewarePipeline
→ Risk: MEDIUM
Example: "What breaks if I change validateUser?"
1. gitnexus_impact({target: "validateUser", direction: "upstream"})
→ d=1: loginHandler, apiMiddleware (WILL BREAK)
→ d=2: authRouter, sessionManager (LIKELY AFFECTED)
2. READ gitnexus://repo/my-app/processes
→ LoginFlow and TokenRefresh touch validateUser
3. Risk: 2 direct callers, 2 processes = MEDIUM
04 同仓库更多 Skills
ai-spector
暂无简介
ai-spector
Core AI Spector skill: setup, upgrade, adopt, check, docops CLI, work sessions (resume/route/pause), course link, and onboarding help. Use when the user says help, I'm stuck, where am I, or what's next about project setup; project init/setup, upgrade, adopting existing docs, workspace check, Writer contract bootstrap (docops init/migrate), resuming or managing active work sessions, or learning via the course. Do not use when the user clearly wants generation, graph ops, or contract review/comments — use the matching skill instead.
ai-spector-graph
Traceability graph operations: analyze data-source, index refresh, graph validate, impact, visualize, semantic search (CocoIndex), natural language graph lookup, doc summaries, and layer sync audit (design drift since baseline). Use when the user asks to analyze sources, refresh or validate the graph, see impact, visualize traceability, find docs by concept, or check doc drift since baseline. Do not use for writing SRS, basic design, HTML prototype, or formal document sign-off.
ai-spector-generate
All document generation: SRS, basic design, detail design, HTML prototype; incremental feature/section changes (resolve-task); and template pack import. Use for "generate SRS/basic design/detail design", "write chapter N", "add feature", "update section", "I want to add…", "HTML prototype", Capability-gated for Writer cloud UI only — local adapter (`.ai-spector/engine.json`) uses MCP/CLI work sessions even when `capabilities.generate` is false.
ai-spector-contract
Writer contract operations: document sign-off (review_approve), comment resolution (doc threads C-NNN and prototype batches B-NNN), translation sync, and language status. Use for review queue, approve doc by logical path (srs/01-overview), pending client review, resolve C-NNN threads, B-NNN prototype batches, resolve translations, or check language status. NOT for graph, generate, or setup — use the matching skill instead.
ai-spector
Core AI Spector skill: setup, upgrade, adopt, check, docops CLI, work sessions (resume/route/pause), course link, and onboarding help. Use when the user says help, I'm stuck, where am I, or what's next about project setup; project init/setup, upgrade, adopting existing docs, workspace check, Writer contract bootstrap (docops init/migrate), resuming or managing active work sessions, or learning via the course. Do not use when the user clearly wants generation, graph ops, or contract review/comments — use the matching skill instead.