documentation

Telemetry & Capability-Gap Report: Reference & Symbol Search

Date: 2026-06-26
Status: Design Proposal (No Code)
Context: Post-Directory-Aware Find Cycle


Executive Summary

With the successful deployment of the Directory-Aware Find ranking engine, all 37 regression and verification scenarios are passing. Telemetry confirms that first-order retrieval failures–such as the agent failing to find files by name due to malformed regex patterns–have been resolved.

However, a major structural capability gap remains: The ExecutionEngine is currently blind to symbol declarations and cross-file references as active tools.

Although the codebase contains a robust backend implementation for parsing symbols and tracing references in Services::SymbolService (used by direct developer slash commands like /symbols and /references), these capabilities are not exposed to the agent’s autonomous planning loop. This report evaluates exposing Reference Search and Symbol Search to the agent to determine the smallest, highest-value retrieval extension justified by telemetry.


1. Reference Search (Highest Value)

Reference Search allows the agent to deterministically query where a symbol (class, struct, variable, or function) is called, used, or instantiated across the codebase (e.g., "who calls ReplayService", "where is CommandRouter referenced").

Telemetry Signals & Justification

Expected Failure Classes Reduced

Implementation Complexity: Low-to-Medium

Validation Strategy

Production Success Metrics


2. Symbol Search (Symbol Indexing)

Symbol Search allows the agent to directly find the file and line number declaring a class, struct, function, or enum (e.g., "find class ReplayService", "find function classify_goal").

Telemetry Signals & Justification

Expected Failure Classes Reduced

Implementation Complexity: Low

Validation Strategy

Production Success Metrics


3. Comparison & Decision Matrix

Metric / Dimension Reference Search Symbol Search
Implementation Complexity Low-to-Medium (Expose existing service) Low (Leverage/expose existing service)
Telemetry Evidence Support High (Addresses noisy grep and caller queries) Medium (Scoring cascades already do symbol checks)
Token / Context Efficiency High (Filters call-sites, avoids grep flood) Medium (Improves precision on header files)
Duplicate Work Prevention No overlapping capability exists in agent tools Overlaps with find tool’s symbol scoring
Priority 1 (Highest) 2 (Lower)

Conclusion & Recommendations

[!IMPORTANT] Reference Search is the recommended next capability to expose to the agent.

  1. Why Reference Search First? While Symbol Search is useful, the current directory_aware_find tool already implements symbol declaration scanning to boost scoring. In contrast, the agent has no way to trace callers/uses other than falling back to noisy, broad greps. Reference Search provides a completely new, deterministic dimension of codebase navigation.
  2. Deterministic Focus: Both options remain strictly deterministic, telemetry-measurable, and avoid complex indexing systems (like Tree-Sitter or LLM semantic embeddings) or multi-agent orchestration architectures.
  3. Execution Plan: In the next cycle, we should expose the existing SymbolService::find_references as a first-class agent tool named references within execution_engine.cpp and update select_next_tool to route to it when caller/user queries are detected.
toggle portrait / landscape