| name | codebase-recon |
| description | This skill should be used when analyzing codebases, understanding architecture, or when "analyze", "investigate", "explore code", or "understand architecture" are mentioned. |
| metadata | {"version":"1.0.0"} |
Codebase Analysis
Evidence-based investigation โ findings โ confidence-tracked conclusions.
Steps
- Gather evidence from multiple sources (code, docs, tests, history)
- Track confidence level as investigation progresses
- Based on findings:
- If pattern analysis needed โ load the
outfitter:patterns skill
- If root cause investigation โ load the
outfitter:find-root-causes skill
- If ready to report โ load the
outfitter:report-findings skill
- Deliver findings with confidence level and caveats
<when_to_use>
- Codebase exploration and understanding
- Architecture analysis and mapping
- Pattern extraction and recognition
- Technical research within code
- Performance or security analysis
NOT for: wild guessing, assumptions without evidence, conclusions before investigation
</when_to_use>
| Bar | Lvl | Name | Action |
|---|
โโโโโ | 0 | Gathering | Collect initial evidence |
โโโโโ | 1 | Surveying | Broad scan, surface patterns |
โโโโโ | 2 | Investigating | Deep dive, verify patterns |
โโโโโ | 3 | Analyzing | Cross-reference, fill gaps |
โโโโโ | 4 | Synthesizing | Connect findings, high confidence |
โโโโโ | 5 | Concluded | Deliver findings |
Calibration: 0=0โ19%, 1=20โ39%, 2=40โ59%, 3=60โ74%, 4=75โ89%, 5=90โ100%
Start honest. Clear codebase + focused question โ level 2โ3. Vague or complex โ level 0โ1.
At level 4: "High confidence in findings. One more angle would reach full certainty. Continue or deliver now?"
Below level 5: include โณ Caveats section.
Core Methodology
Evidence over assumption โ investigate when you can, guess only when you must.
Multi-source gathering โ code, docs, tests, history, web research, runtime behavior.
Multiple angles โ examine from different perspectives before concluding.
Document gaps โ flag uncertainty with โณ, track what's unknown.
Show your work โ findings include supporting evidence, not just conclusions.
Calibrate confidence โ distinguish fact from inference from assumption.
<evidence_gathering>
Source Priority
- Direct observation โ read code, run searches, examine files
- Documentation โ official docs, inline comments, ADRs
- Tests โ reveal intended behavior and edge cases
- History โ git log, commit messages, PR discussions
- External research โ library docs, Stack Overflow, RFCs
- Inference โ logical deduction from available evidence
- Assumption โ clearly flagged when other sources unavailable
Investigation Patterns
Start broad, then narrow:
- File tree โ identify relevant areas
- Search patterns โ locate specific code
- Code structure โ understand without full content
- Read targeted files โ examine implementation
- Cross-reference โ verify understanding
Layer evidence:
- What does the code do? (direct observation)
- Why was it written this way? (history, comments)
- How does it fit the system? (architecture, dependencies)
- What are the edge cases? (tests, error handling)
Follow the trail:
- Function calls โ trace execution paths
- Imports/exports โ map dependencies
- Test files โ understand usage patterns
- Error messages โ reveal assumptions
- Comments โ capture historical context
</evidence_gathering>
<output_format>
During Investigation
After each evidence-gathering step emit:
- Confidence: {BAR} {NAME}
- Found: { key discoveries }
- Patterns: { emerging themes }
- Gaps: { what's still unclear }
- Next: { investigation direction }
At Delivery (Level 5)
Findings
{ numbered list of discoveries with supporting evidence }
- {FINDING} โ evidence: {SOURCE}
- {FINDING} โ evidence: {SOURCE}
Patterns
{ recurring themes or structures identified }
Implications
{ what findings mean for the question at hand }
Confidence Assessment
Overall: {BAR} {PERCENTAGE}%
High confidence areas:
Lower confidence areas:
Supporting Evidence
- Code: { file paths and line ranges }
- Docs: { references }
- Tests: { relevant test files }
- History: { commit SHAs if relevant }
- External: { URLs if applicable }
Below Level 5
โณ Caveats
Assumptions:
- {ASSUMPTION} โ { why necessary, impact if wrong }
Gaps:
- {GAP} โ { what's missing, how to fill }
Unknowns:
- {UNKNOWN} โ { noted for future investigation }
</output_format>
<specialized_techniques>
Load skills for specialized analysis (see Steps section):
- Pattern analysis โ
outfitter:patterns
- Root cause investigation โ
outfitter:find-root-causes
- Research synthesis โ
outfitter:report-findings
- Architecture analysis โ see architecture-analysis.md
</specialized_techniques>
Loop: Gather โ Analyze โ Update Confidence โ Next step
- Calibrate starting confidence โ what do we already know?
- Identify evidence sources โ where can we look?
- Gather systematically โ collect from multiple angles
- Cross-reference findings โ verify patterns hold
- Flag uncertainties โ mark gaps with โณ
- Synthesize conclusions โ connect evidence to insights
- Deliver with confidence level โ clear about certainty
At each step:
- Document what you found (evidence)
- Note what it means (interpretation)
- Track what's still unclear (gaps)
- Update confidence bar
Before concluding (level 4+):
Check evidence quality:
- โ Multiple sources confirm pattern?
- โ Direct observation vs inference clearly marked?
- โ Assumptions explicitly flagged?
- โ Counter-examples considered?
Check completeness:
- โ Original question fully addressed?
- โ Edge cases explored?
- โ Alternative explanations ruled out?
- โ Known unknowns documented?
Check deliverable:
- โ Findings supported by evidence?
- โ Confidence calibrated honestly?
- โ Caveats section included if <100%?
- โ Next steps clear if incomplete?
ALWAYS:
- Investigate before concluding
- Cite evidence sources with file paths/URLs
- Use confidence bars to track certainty
- Flag assumptions and gaps with โณ
- Cross-reference from multiple angles
- Document investigation trail
- Distinguish fact from inference
- Include caveats below level 5
NEVER:
- Guess when you can investigate
- State assumptions as facts
- Conclude from single source
- Hide uncertainty or gaps
- Skip validation checks
- Deliver without confidence assessment
- Conflate evidence with interpretation
Core methodology:
- confidence.md โ confidence calibration (shared with pathfinding)
Micro-skills (load as needed):
outfitter:patterns โ extracting and validating patterns
outfitter:find-root-causes โ systematic problem diagnosis
outfitter:report-findings โ multi-source research synthesis
Local references:
Related skills:
outfitter:pathfinding โ clarifying requirements before analysis
outfitter:debugging โ structured bug investigation