Summary
Use one projection/pagination framework for definition, find, status, hotspots, references, callers/callees, and impact so callers can request small, bounded responses.
Current v1.38.0 evidence / reproduction
- Human
definition QueryCommandRunner --limit 3 emits roughly 3,140 lines even without --body.
find, status, and high-cardinality graph commands do not accept a common JSON byte cap.
- Hotspots and impact lack compact/field projections.
- Existing compact definition/graph output reports returned count and truncation but not authoritative total, omitted count, or a stable continuation cursor.
Impact
Terminals, IPC, and AI contexts can be flooded, while clients cannot page through a large result set without gaps.
Suggested direction / acceptance criteria
- Make definition metadata-only by default; require
--body for body excerpts.
- Share
--fields/compact, byte-budget, returned/total/omitted, and stable-cursor semantics across high-volume commands.
- Ensure expensive bodies/details are not materialized before projection and limit application.
- Add backward-compatible contract tests for each command family.
Additional consolidated evidence
map --json --limit 80 --path 'src/CodeIndex/**' can still exceed 12k tokens because the limit applies independently to several sections rather than bounding the whole response.
Additional acceptance criterion
- Include map in the shared response-byte and section-projection framework so a caller can enforce a total response budget.
Dogfooding candidate IDs: Q011, Q032, Q034, Q045, Q048, Q049, Q050, E029. Verified against cdidx v1.38.0 at commit 2919bfc9b1b83cfa7ae1d964845d0f9ffca002d1.
Summary
Use one projection/pagination framework for definition, find, status, hotspots, references, callers/callees, and impact so callers can request small, bounded responses.
Current v1.38.0 evidence / reproduction
definition QueryCommandRunner --limit 3emits roughly 3,140 lines even without--body.find,status, and high-cardinality graph commands do not accept a common JSON byte cap.Impact
Terminals, IPC, and AI contexts can be flooded, while clients cannot page through a large result set without gaps.
Suggested direction / acceptance criteria
--bodyfor body excerpts.--fields/compact, byte-budget, returned/total/omitted, and stable-cursor semantics across high-volume commands.Additional consolidated evidence
map --json --limit 80 --path 'src/CodeIndex/**'can still exceed 12k tokens because the limit applies independently to several sections rather than bounding the whole response.Additional acceptance criterion
Dogfooding candidate IDs: Q011, Q032, Q034, Q045, Q048, Q049, Q050, E029. Verified against cdidx v1.38.0 at commit
2919bfc9b1b83cfa7ae1d964845d0f9ffca002d1.