Context:
Symphonyโs frontend intelligence benefits from layout-based component indexing. However, to empower backend-aware agents (e.g., Fixer, Analyzer, Planner), we need a backend indexing system that provides structured access to the core logic (classes, methods, functions). Backend codebases often include thousands of elements, and naively indexing everything will create massive, inefficient, and unhelpful index files.
If we attempt to index every class and function without prioritization:
๐ Model Overload:
Models will receive irrelevant or low-priority code, causing context dilution and decreased output quality.
๐ Performance Bottlenecks:
Index files could reach tens of thousands of entries (e.g., 1,000 classes ร 20 methods = 20,000 items), leading to slow parsing, increased memory usage, and longer inference times.
๐ค Agent Confusion:
Without guidance on which parts of the codebase are risky or relevant, backend agents may waste time analyzing stable or low-priority functions.
๐งช Uninformed Reasoning:
Agents won't understand which functions lack tests, have failed recently, or exhibit high complexity โ all of which are critical for debugging or refactoring tasks.
Introduce a backend-index.json
file that selectively includes backend elements based on heuristics and dynamic analysis, giving priority to code segments with high potential for bugs, regressions, or architectural improvement.
Each item is scored or flagged using quality, complexity, and stability metrics.