ix-investigate
Deep dive into a symbol, feature, or bug. Graph-first, minimal code reads, early stopping when sufficient evidence found.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Deep dive into a symbol, feature, or bug. Graph-first, minimal code reads, early stopping when sufficient evidence found.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Analyze system design — structure, coupling, code smells, and high-risk hotspots. Purely graph-based, no code reads.
Root cause analysis — trace execution path to a failure, narrow candidates, read minimal source only at suspected failure points.
Generate narrative-first, importance-weighted documentation for a repo, system, or subsystem with a selective reference layer. Use --full for deeper module/class/method coverage.
Change risk analysis — blast radius, affected systems, and what to test. Depth scales with risk level; low-risk targets stop early.
Generate a risk-ordered implementation plan for a set of targets. Assesses blast radius per target, finds data flows between them, and produces a safe change sequence.
Build a detailed architectural mental model of a system, subsystem, or the whole repo. Graph-first, source reads only when needed for data flow or key patterns.
| name | ix-investigate |
| description | Deep dive into a symbol, feature, or bug. Graph-first, minimal code reads, early stopping when sufficient evidence found. |
| argument-hint | <symbol, function name, or "how does X work?"> [--save [path]] |
Check command -v ix first. If unavailable, use Grep + Read as fallback.
Strip --save and any following path token from $ARGUMENTS before resolving the target.
--save <path> is present, set SAVE_PATH to that path.--save is present without a path, auto-generate ix-investigate-<target-slug>.md in cwd (target slug = the target with spaces and slashes replaced by -).--save is absent, SAVE_PATH is empty — do not write a file.Run once at the start:
ix briefing --format json 2>&1
If it returns JSON with a revision field, Pro is available. Extract recentDecisions and openBugs for use in Pro steps below. If it errors, skip all [Pro] labeled steps.
Answer: what is this, how does it connect, and what's the execution path? Stop as soon as those three questions can be answered accurately.
ix locate $ARGUMENTS --format llm
If multiple matches: use --kind, --path, or --pick N to resolve. Do not proceed until the entity is unambiguous.
If ix locate returns nothing: try ix text $ARGUMENTS --limit 10 --format llm.
ix explain <resolved-symbol> --format llm
Extract: role, importance, caller count, callee count, confidence score.
If the resolved entity is a class or module, also run:
ix overview <resolved-symbol> --format llm
This reveals internal structure (members, sub-components) without reading source.
Orphan check: If fan_in = 0 AND fan_out = 0 in the ix explain output:
ix map) or the file has no parseable import/call relationships."ix map <file> as first step.Evaluate: Is the explanation sufficient to answer the question?
Stop if: explain gave clear role, purpose, and connection summary → skip to Output.
Run only the directions you need — not both by default:
# If "who uses this" matters:
ix callers <symbol> --limit 15 --format llm
# If "what does this do internally" matters:
ix callees <symbol> --limit 15 --format llm
Stop if: you now know who uses it and what it depends on.
ix trace <symbol> --depth 2 --format llm
One trace only. Pick the most representative direction (--upstream or --downstream) based on the question.
Stop if: execution path is now clear.
Only if the above steps leave a specific implementation question unanswered:
ix read <symbol> --format llm
Read the symbol only — never the full file. If the symbol is a class, read the specific method suspected.
Hard limit: One ix read call maximum. If still unclear after reading, surface the ambiguity to the user rather than reading more.
If Pro is available and recentDecisions from the briefing is non-empty, check for decisions affecting this symbol:
ix decisions --topic <resolved-symbol> --format json
Include any relevant decisions in the output under Design context.
## [Symbol] — Investigation
**What it is:** [kind, file, subsystem — from graph]
**Role:** [orchestrator / boundary / helper / utility / etc.]
**Execution flow:**
[downstream: what it calls → what those call, 2 levels max]
[upstream: who calls it, top 5]
**Key connections:**
- Depends on: [top 3 callees]
- Used by: [top 3 callers with their subsystem]
**Design context:** [Pro only — relevant recorded decisions, or omit section if none]
**Evidence quality:** [strong / partial / uncertain] — [one-line reason]
**Next step:**
- [most useful follow-up based on findings]
If confidence < 0.7 in ix output, label those claims as [uncertain] and recommend ix map to refresh.
Save step (only if SAVE_PATH is non-empty):
SAVE_PATH using the Write tool.Saved to <SAVE_PATH>.--save was not passed.