-
Notifications
You must be signed in to change notification settings - Fork 0
Repo Scale Context
Requirement: Maintain a whole-codebase symbol map (e.g. tree-sitter-derived) so the model has structural awareness without loading every file into context.
Status in atomic-forge: Met — verified against code 2026-08-29.
codegraph.py's CodeGraph persists a SQLite call graph
(.forge/codegraph.db) with precomputed, indexed edges table; build()
is incrementally hash-diffed (unchanged files cost one query, not a
re-parse); GraphToolBackend wraps it behind the same ToolBackend
protocol as LocalToolBackend.
-
Retrieval-Augmented Code Generation: A Survey with Focus on
Repository-Level Approaches
(arXiv:2510.04905) — the unifying
survey for this requirement. Frames repository-level code generation as a
coupled process: context construction → retrieval optimization →
generation → environment interaction. Useful as a structural checklist
against
codegraph.py/tools.py: forge covers context construction and generation solidly, but "retrieval optimization" (ranking/pruning what the graph surfaces) and "environment interaction" (using execution feedback to refine the retrieved context, not just the patch) are less developed. - Knowledge Graph Based Repository-Level Code Generation (arXiv:2505.14394) — graph-structured repo representations outperform flat retrieval for cross-file coherence, directly supporting forge's choice of a call graph over embeddings.
This requirement is already substantively met; the research gap is less "should forge have a graph" (yes, it does) and more granularity and use — see Enterprise-Scale-Indexing for the statement-level granularity upgrade path (ARISE) that's the natural next step past forge's current function-level call graph.
Phase 1 — ranked retrieval (~2 days)
- Add a scoring function over
codegraph.py'scallers/callees/affected_byresults: proximity to the failing test's traceback frames, symbol-name overlap with the issue text, recency of last edit. - Return top-N ranked edges instead of the full set by default, with an escape hatch to fetch the rest.
Phase 2 — feedback-driven re-query (~2–3 days)
- After a rejected K-sample attempt, extract the new failing test's traceback frames and issue a fresh
affected_byquery againstcodegraph.dbscoped to those frames. - Merge the new results into the next attempt's context instead of reusing the original issue-derived neighborhood unchanged.
Phase 3 — A/B validation (~1 day)
- Run
benchmarks/multi-file cases withGraphToolBackendvs.ripgrep_tool_backend.py, before and after Phases 1–2, to confirm the graph's advantage is real and growing, not assumed. - Record results in this file; if Phase 1/2 don't move the needle on forge's own cases, say so plainly rather than keeping unused ranking code.
- Enterprise-Scale-Indexing — same survey, scaling angle
- Agent-Computer-Interface — the navigation/edit half of the same problem
atomic-forge — an agentic generate → test → repair loop with a machine-checked task contract, crash-safe checkpointing, and execution-selected repairs. BSL 1.1 licensed.
Start here
Workflows
Reference
Background
Requirements (R1–R16)
- Requirements-and-Roadmap
- Agent-Computer-Interface
- Critic-Verification-Gate
- Planner-Executor-Split
- Repo-Scale-Context
- Auto-Commit-Messages
- Persistent-Sandbox
- Multi-Channel-Intake
- Review-Comment-Driven-Fix
- Zero-Friction-Integration
- Self-Review-Issue-Resolution
- Enterprise-Scale-Indexing
- CLI-CI-Native
- Parallel-Execution
- Execution-Guided-Repair
- Data-Privacy-No-Training
- Environment-Bootstrap