Agents in the pipeline: cheatsheet
Verified automation flags
Section titled “Verified automation flags”| Flag | What it does |
|---|---|
-p, --print | Run one prompt non-interactively; read stdin, print, exit |
--output-format | text (default), json (result, session ID, metadata, cost), stream-json (event stream) |
--json-schema | Structured output conforming to a JSON Schema (with JSON output, print mode) |
--allowedTools | Pre-approve tools; there is no prompt to answer in a pipeline |
--permission-mode | Session baseline; dontAsk suits locked-down CI runs |
--max-turns | Cap agentic turns; exits with an error at the cap (print mode) |
--max-budget-usd | Dollar ceiling for a run (print mode) |
--append-system-prompt-file | Pass explicit instructions from a file |
--bare | Skip auto-discovery of memory, hooks, plugins; same result on every machine |
--continue, --resume | Share context across runs; never between generator and reviewer |
Spine of the lesson: an unattended agent is the purest test of your architecture.
Two jobs, two budgets
Section titled “Two jobs, two budgets”| Nightly batch job | Blocking pre-merge check | |
|---|---|---|
| Who waits | Nobody | A developer |
| Scope | Wide (a whole module) | Narrow (the diff only) |
| Speed | Slow is fine | Fast and predictable |
| On failure | Log, retry tomorrow | Fail fast and visibly |
| Watch | Dollars per run | Minutes per run |
Generator vs reviewer
Section titled “Generator vs reviewer”| Generator | Reviewer |
|---|---|
| Carries its own reasoning and assumptions | Fresh context, fresh process |
| Reads what it meant to write | Sees only the artifact and the standards |
| Goes easy on itself | Catches more |
| Its pull requests still get reviewed | Never continued from the generator’s session |
The dedupe recipe
Section titled “The dedupe recipe”- Fetch the bot’s prior comments on the pull request.
- Include them in the prompt as prior findings.
- Instruct: report only new or still-unaddressed issues; never repeat resolved ones.
- Post only the delta. State lives in the pull request, not the agent.
Writing review criteria
Section titled “Writing review criteria”| Do | Do not |
|---|---|
| List explicit finding types | Say “be conservative” or “only what matters” |
| Give each type a concrete example | Make the model guess the threshold |
| Name what must never be flagged | Leave style and naming to opinion |
| Grant permission to find nothing | Reward findings invented for thoroughness |
Pitfalls
Section titled “Pitfalls”| Pitfall | Correction |
|---|---|
| Generator reviews its own output | Separate invocation, no shared context |
| Criteria as moods | Examples pin the threshold |
| Reposting findings each push | Carry prior findings into context |
| One budget for every job | Batch and blocking need opposite treatment |
| Standards pasted into workflow files | Standards live in checked-in project memory |
One-liners
Section titled “One-liners”| Line | Meaning |
|---|---|
| Nobody is there to catch it, so the design must | Every decision made in advance, in files |
| A false-positive flood spends the bot’s only currency | The team’s willingness to read it |
| The CI agent is the newest teammate | The repository does the onboarding |
| A slow blocking check gets deleted, not tolerated | Latency is architecture too |