Part of #1367 (Phase 4 — Platform Reach).
Goal
Two delivery surfaces both competitors monetize:
A. Local CLI review (CodeRabbit CLI parity — docs)
buddy-bot review running locally against uncommitted/branch changes — review before pushing:
buddy-bot review [--base main] [--staged] [--light]— diffs the working tree (or staged, or branch vs base), runs the #1375 engine + #1378 analyzers locally, prints findings inpretty|json|githubformats (reusesrc/analysisreporter pattern)--light: analyzers + cheap model / summary-only (fast pre-commit hook usage)--fix: apply committable suggestions to the working tree (prompt per hunk unless--yes)- Agent-integration output:
--format agentemits findings as an agent-ready prompt block (CodeRabbit pipes into Claude Code/Cursor this way) so users can dobuddy-bot review --format agent | claude - Keys from env/config as in #1373; no GitHub token needed for local mode (skip provider-dependent context gracefully)
buddy-bot doctor: environment diagnosis (keys present, git state, tool availability from #1378, token scopes) — CodeRabbit ships this and it kills setup-support burden
B. Headless action with structured output (Pullfrog parity — headless action)
Run Buddy Bot's agent as a pipeline step with schema-validated output consumable by later steps:
- uses: stacksjs/buddy-bot-action@v1 # or: bunx buddy-bot run --prompt ... in any step
id: notes
with:
prompt: "Summarize dependency changes merged this week as release notes"
output_schema: '{"type":"object","properties":{"markdown":{"type":"string"}},"required":["markdown"]}'
- run: echo '$'- CLI form:
buddy-bot run --prompt <p> | --prompt-file <f> [--output-schema <json>] [--model <m>] [--mode read-only|write] - Schema enforcement via #1373 json mode with validate+retry; nonconforming output fails the step (exit ≠ 0) — Pullfrog's contract
- Writes
resultto$GITHUB_OUTPUTwhen present; prints JSON to stdout otherwise (composable outside Actions too) - Tool tier defaults to read-only;
--mode writerequires explicit opt-in - Ship the thin wrapper action (
action.yml, node20/composite invokingbunx buddy-bot run) in-repo underaction/
Tasks
- Local diff collection (working tree/staged/branch) + local review path with graceful no-token degradation
--light,--fix(hunk applier with per-hunk prompt),--format agentbuddy-bot doctorwith actionable remediation linesbuddy-bot runheadless command +$GITHUB_OUTPUThandling + schema validate/retry/failaction/action.ymlcomposite wrapper + README usage- Tests: local diff modes, schema pass/fail/retry, output escaping (multiline into GITHUB_OUTPUT heredoc format), doctor checks
docs/cli/review.md,docs/ai/headless.md
Acceptance criteria
buddy-bot review --base mainon a dirty tree prints correct findings with no GitHub tokenbuddy-bot review --format agent | <any agent CLI>round-trips usefully- Headless step with a violated schema fails the job; valid output is
fromJSON-consumable buddy-bot doctorcorrectly diagnoses missing keys/tools in fixture environments