codebase-recon
npx skills add https://github.com/outfitter-dev/agents --skill codebase-recon
Agent 安装分布
Skill 文档
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:patternsskill - If root cause investigation â load the
outfitter:find-root-causesskill - If ready to report â load the
outfitter:report-findingsskill
- If pattern analysis needed â load the
- 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:
- {AREA} â {REASON}
Lower confidence areas:
- {AREA} â {REASON}
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 patternsoutfitter:find-root-causesâ systematic problem diagnosisoutfitter:report-findingsâ multi-source research synthesis
Local references:
- architecture-analysis.md â system structure mapping
Related skills:
outfitter:pathfindingâ clarifying requirements before analysisoutfitter:debuggingâ structured bug investigation