Summary
During code audit, a search hit often needs the surrounding method, class, or symbol range before the next decision is possible. search --json currently returns path, line span, content, and score, but not the enclosing symbol metadata that would let agents jump directly to the relevant owner.
Evidence
src/CodeIndex/Models/QueryResults.cs:10 defines SearchResult with path, language, start/end lines, content, and score only.
SymbolResult already carries richer fields such as Name, Kind, ContainerName, StartLine, EndLine, BodyStartLine, and BodyEndLine.
Requested behavior
Add optional enclosing-symbol fields to search JSON results, for example enclosing_symbol_name, enclosing_symbol_kind, enclosing_symbol_start_line, enclosing_symbol_end_line, and enclosing_container_name. This should be available for CLI JSON and MCP search responses without changing text output by default.
Summary
During code audit, a search hit often needs the surrounding method, class, or symbol range before the next decision is possible.
search --jsoncurrently returns path, line span, content, and score, but not the enclosing symbol metadata that would let agents jump directly to the relevant owner.Evidence
src/CodeIndex/Models/QueryResults.cs:10definesSearchResultwith path, language, start/end lines, content, and score only.SymbolResultalready carries richer fields such asName,Kind,ContainerName,StartLine,EndLine,BodyStartLine, andBodyEndLine.Requested behavior
Add optional enclosing-symbol fields to search JSON results, for example
enclosing_symbol_name,enclosing_symbol_kind,enclosing_symbol_start_line,enclosing_symbol_end_line, andenclosing_container_name. This should be available for CLI JSON and MCP search responses without changing text output by default.