deep-code-research
v0.1.0
Published
LLM-native code research agent that explores ecosystems via hierarchical multi-agent architecture
Readme
Deep Code Research Agent
"Don't just tell me to add error handling. Show me exactly where my code differs from relevant projects."
Code "literature review" is tedious. Before building something, you should survey similar projects to learn patterns, avoid known pitfalls, and not reinvent wheels. But reading through 10+ related repositories takes hours. This tool does it for you.

The only code review that shows your code side-by-side with 10+ similar repos. Generic advice like "add error handling" is useless. This tool produces grounded findings—showing exactly what related repos do differently and where in your codebase to change.
Built on the Claude Agent SDK. See a complete real example output in example_deep_code_research.md.
Setup
# 1. Clone and install
git clone https://github.com/WindChimeRan/deep_code_research.git
cd deep_code_research
npm install
export ANTHROPIC_API_KEY=sk-ant-...
# 2. Run a research
npm run dev https://github.com/user/repo
# Or with options
npm run dev https://github.com/user/repo -- --lens security --budget 50000Usage
npm run dev https://github.com/user/repo
# With options
npm run dev https://github.com/user/repo -- --lens security --budget 50000| Option | Description | Default |
|--------|-------------|---------|
| --lens <focus> | Free-text analysis focus (e.g., "security", "performance", "error handling") | general |
| --budget <tokens> | Token budget | 100,000 |
| --max-repos <n> | Max related repos to analyze | 20 |
| --output <file> | Save JSON report | - |
How It Works
Phase 1: Understand target repo
Phase 1.5: Map target file structure (so sub-agents know what to compare)
Phase 2: Discover related repositories
Phase 3: Sub-agents analyze BOTH repos in parallel, producing comparative evidence
Phase 4: Synthesize TOP 3 grounded findingsEach sub-agent:
- Reads the related repo's code
- Checks target's file map for equivalent files
- Fetches and compares both implementations
- Reports the gap: "Target does X, related does Y"
Model Configuration
The tool uses different Claude models for different tasks:
| Role | Model | Why | |------|-------|-----| | Main agent | Opus 4.5 | Complex orchestration, synthesis | | Sub-agents | Haiku 4.5 | Fast, cost-effective for parallel analysis |
To update models (e.g., when newer versions are released), edit src/claude-client.ts:
export const MODEL_ALIASES: Record<ModelAlias, string> = {
opus: "claude-opus-4-5-20251101", // ← Update these
sonnet: "claude-sonnet-4-20250514",
haiku: "claude-haiku-4-5-20251001",
} as const;The rest of the codebase uses semantic aliases ("opus", "haiku") so you only need to update this one place.
Cost
A typical research costs $1-3 depending on how many related repos are analyzed. See Anthropic Pricing.
License
MIT
