Skip to content

jrag: implement --count/--exists/--brief/--fields output flags (deferred from JRAG-CLI) #376

Description

@HumanBean17

Context

The JRAG-CLI plan (PR-JRAG-1a) registered four common output-shaping flags on the jrag shared parent parser: --count, --exists, --brief, --fields. They appear in every commands --help` and were advertised in the shipped agent skill/subagent docs.

Why they were removed

The final whole-branch review found that no handler reads them — every command silently ignored them, violating the plans "inapplicable flags never silently ignored" principle and contradicting the agent docs. Rather than ship advertised-but-broken behavior, the flags were **removed** from the common` parser and the docs (and the install_data copies re-synced) before the JRAG-CLI branch merged.

What is needed to implement

These are genuinely useful for an agent-facing CLI, just unfinished:

  • --count — return only the result count (no node rows).
  • --exists — return only an exists boolean (exit 0/2).
  • --brief — compact output (fewer fields per node).
  • --fields — comma-separated field allowlist for node projections.

Implement them in java_codebase_rag/jrag.py (the common parser + the render/envelope path), wire through jrag_render.py / Envelope.to_dict() as appropriate, re-advertise in skills/explore-codebase-cli/SKILL.md + agents/explorer-rag-cli.md, and re-sync via scripts/sync_agent_artifacts.py. Add focused tests asserting each flag actually shapes output.

Related

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