Skip to content

feat: --json for explore and node — the two source-pasting commands are the only ones without structured output #1280

Description

@edheltzel

Context

In v1.4.1, status, query, files, callers, callees, impact, and affected all support -j/--json (verified; shapes parse clean, no ANSI). The two commands that paste verbatim source — explore and node — are markdown-only.

For agent pipelines that want to post-process (e.g. keep the call-path narrative and blast radius but drop or truncate source bodies, or route source blocks to a sub-agent), a structured shape like:

{
  "summary": "...",
  "flow": [{"from": "...", "to": "...", "via": "..."}],
  "blastRadius": [{"symbol": "...", "callers": 5, "coveringTests": ["..."]}],
  "files": [{"path": "...", "symbols": [{"name": "...", "startLine": 1, "endLine": 40, "source": "..."}]}]
}

would let tooling make the keep/drop decision per block instead of consuming the whole payload. Measured on a 212-file repo: one broad explore is ~25KB — being able to drop source fields programmatically would cut that ~80% for orientation-only use.

Ask

-j/--json on explore and node, mirroring the human output's information exactly (no new data needed — just structure).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions