Skip to content

Non-interactive modes for /ba:review (C1) #10

@azevedo

Description

@azevedo

Status

Deferred until concrete pipeline / CI / programmatic need exists.

Context

ce-code-review has four modes:

Mode Interactive? Purpose
Interactive (default) Yes User-driven flow
Autofix No Applies safe_auto fixes silently, surfaces non-safe findings for review
Report-only No Read-only structured report
Headless No Programmatic — emits structured JSON to stdout for downstream consumers

The three non-interactive modes ("externalization modes" in ce) share: structured JSON output, run-artifact persistence (/tmp/compound-engineering/ce-code-review/{run_id}/), and a validator pass (Stage 5b) that doesn't run in interactive.

Decision

Deferred.

Rationale

  • No PR-based CI. User is solo contributor, no PRs.
  • No current pipeline composing /ba:* commands programmatically.
  • The strongest sub-argument for C1 collapsed during design:
    • A2 (run-artifact persistence) was reshaped as an interactive opt-in feature — no longer needs C1 as a carrier.
    • B8 (autofix-class) is itself deferred — no carrier needed.
  • Building C1 now risks designing for a workflow that doesn't yet exist — exactly the YAGNI failure correctly applied to B7 in the same conversation.

Design captured (if revisited)

Modes to support

At minimum:

  • Interactive (existing)
  • Report-only (read-only, structured-markdown or JSON output)
  • Headless (programmatic, JSON to stdout)

Autofix mode only if B8 is accepted in the same change (since autofix_class is the routing field).

Invocation surface options

Option Pros Cons
Argument flag: /ba:review HEAD..HEAD --mode=headless Parseable from $ARGUMENTS; one command CLI-shaped, not slash-command-shaped
Separate commands per mode (/ba:audit, /ba:autofix) Cleaner surface per mode Multiplies command file count
SDK / Task-tool only Cleanest separation No human-typed access to non-interactive features

No commitment made; revisit when the concrete consumer is known.

Output format

  • Headless mode: Structured JSON to stdout. Hard dependency on C2's schema.
  • Report-only mode: Markdown with structured frontmatter (machine-readable header, prose body).

Behavioral changes in non-interactive modes

  • Skip reviewer-selection prompt (default to all built-in + discovered reviewers)
  • Persist run artifact (likely reuse A2's directory format / location)
  • Suppress conversational output
  • Apply the C2 validator pass (which is the same machinery as interactive, just gated as a stricter contract for stdout consumers)

Trigger conditions for revisit

Any of:

  • Concrete pipeline composing /ba:* commands programmatically (e.g., a workflow that runs /ba:execute then /ba:review then some downstream step that consumes review output)
  • CI integration plan that wants exit-code semantics or structured reports
  • External MCP/SDK consumer wanting structured /ba:review output
  • Autofix mode becoming a priority (would bring B8 along)

Candidates that would revive on C1 acceptance

  • B8 (autofix-class field): if autofix mode is in scope for C1, B8 ships with it
  • A3 (contract tests): gains a stable output substrate to assert against (though C2 alone provides this)

References

  • ce-code-review four-mode system (Interactive, Autofix, Report-only, Headless)
  • A2 issue — already reshaped to interactive scope; no longer dependent on C1
  • B8 issue — deferred separately; tied to autofix mode if ever revived
  • B4+B5+B6+C2 bundle issue — C2 schema is the prerequisite for headless JSON output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions