--format agent Pipe findings straight into your coding agent

ai coding agents

Somebody has to read what the agent wrote

Generation got cheap and review did not. Buddy is the other half of the loop: it reads what your agent produced, states what actually breaks, and hands the findings back in a form the agent can act on — before any of it reaches a human.

$ claude "add rate limiting to the api"
  ... 9 files changed

$ buddy review --format agent | claude

  # buddy emits an instruction, not a report:
  # change only what each finding asks for,
  # and you may disagree and leave the code
  # alone if a finding is wrong.

  ... 2 files changed

$ buddy review --fail-on major
  no findings at or above major.

$ git commit
👀

A second model, not the same one

An agent reviewing its own output agrees with itself. Buddy runs as a separate pass with its own prompt, its own context and — if you want — a different provider entirely, which is the only way the review is worth anything.

🤔

Permission to disagree

--format agent tells the agent to change only what each finding asks for and explicitly allows it to push back. An agent that mechanically applies a wrong finding is worse than one that argues.

⏱️

Runs before the PR

The whole loop happens in your working tree. Nothing hits CI, nothing notifies a teammate, and nothing costs a review cycle until the code is worth one.

🦴

Deterministic checks first

--light gives secret scanning, workflow auditing and the linters with no model at all. Agents leak keys into example files and invent workflow syntax; these catch it for free.

🔁

Safe to run in a loop

buddy review --fail-on major is a clean exit code, so an agent harness can iterate until the review passes without a human parsing prose.

🧩

Headless, schema-validated

buddy run --prompt ... --output-schema takes a JSON Schema and retries until the output validates, so a pipeline step gets structured data or a clear failure.

The loop

# 1. the agent writes
claude "add rate limiting to the api"

# 2. buddy reads it — a different pass, with its own context
buddy review --format agent | claude

# 3. gate it, so the loop terminates on a fact rather than a vibe
buddy review --fail-on major

--format agent emits an instruction block rather than a report. Every format except pretty owns stdout completely — diagnostics are suppressed — so nothing lands in the middle of the payload you are piping.

Applying findings without a second agent

buddy review --fix          # confirm each suggestion
buddy review --fix --yes    # apply them all

Fixes are applied bottom-up within each file, so replacing one line cannot shift the line numbers of the ones still to apply. A suggestion whose line no longer matches — because the file moved since the review — is skipped rather than written, since applying it would corrupt an unrelated line.

When the agent is Buddy

Buddy's own writing modes run inside a sandbox whose limits are structural: an empty environment plus an allowlist, so a command it runs cannot authenticate to anything; a workspace no resolved path can escape, checked twice against symlinks; and independent caps on tool calls, wall clock and tokens.

Finishing touches deliver agent work as a stacked pull request against your branch rather than a commit on it — so accepting agent output is a merge you reviewed, and refusing it is a close.

Local review · Local review CLI reference · Headless runs · The agent runtime · Finishing touches