Skip to content

Search should support named ad hoc batch queries with compact snippets #3481

Description

@Widthdom

Problem

Dogfooding the repository audit required many separate cdidx search --exact ... --format compact invocations for related patterns. Compact output currently returns path/line only, so every match needs a follow-up file read to understand context.

Evidence

  • Repeated searches were needed for related audit terms such as nuget push, dotnet pack, Thread.Sleep, SpinWait, ReadToEnd, and workflow patterns.
  • --format compact is useful for machine consumption but omits the matched text/snippet even when --snippet-lines would make triage much faster.

Requested behavior

Add a named ad hoc batch mode for search queries, and allow compact JSON to include bounded snippet/match context per result.

Labels

enhancement, codex

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions