Published: September 25, 2026 29 min read
One Command to Ship: An Agent Pipeline That Reviews Itself
How my @ship command plans, implements, reviews itself, and opens a gated draft PR, plus the mechanical gates that let it run unattended.

Why I built it: side projects without losing the 9-to-5
I have a full-time job, and I didn’t want my side projects sitting idle for eight hours a day because of it. Every feature used to mean the same loop done by hand: write context, prompt, review, repeat - all work that had to wait for whatever free time I had left. I wanted that loop running on its own during the day, so progress kept happening whether or not I was at the keyboard.
I can run about six sessions at once, and that changes the whole day. I start a batch in the morning before work, and by the evening some of them are just waiting to be merged. So the evening isn’t about starting things anymore - it’s about clearing what’s already done and queuing up the next batch.
The input is different every time. Sometimes it is a full issue, written out with all the details. Sometimes it is just a short note I wrote on my phone. The pipeline has to handle both cases, because I do not always have time to prepare a clean spec first.
The system at a glance
One orchestrator agent, ship, owns everything from goal to pull request. It delegates: planning to plan-orchestrator, implementation to software-engineer (which fans work out to worker leaves), review to code-review - with blocked findings looping back into the plan up to three times before a code-enforced gate decides if a draft PR opens at all. The rest of this post is really about what sits around that spine: a bounded-autonomy rule that lets it act without checking in with me, a few small design choices that keep it honest (minimal context, permissions instead of prompts, hygiene fixed before I ever see a diff), a resource-scout agent picking the right skills and MCP servers before each fan-out, a blind three-voter consensus for the findings that actually matter, four layers of gates that run on their own, one container per worktree with caps I measured rather than guessed, and an honest look at how much supervision it still needs from me. That’s the order I’ll cover them in. A simplified, runnable version of the whole thing - the six agents, the loop-cap gate, the gated PR tool - is up as a companion repo if you want to see it work end to end.
One command: goal in, gated draft PR out
Everything starts with one command, @ship <goal>. If I just give it a bare goal, it’ll go research it on its own - clarify and research are the first two phases of planning anyway. But it does better work when I give it something to start from, and in practice that’s almost always a GitHub issue: Work on issue #N. It grabs the issue number out of what I wrote and links it into the PR body.
Here’s what actually happens under that one command: an agent researches the task and writes a plan, then that plan fans out into a batch of small agents, each doing one piece and handing its result back up. Concretely, that’s plan-orchestrator to software-engineer to worker - and ship is the agent wiring all of it together and owning the lifecycle from start to finish.
@ship <goal> (often: "Work on issue #N") | v[1] Plan ............. clarify -> research -> resource-scout | (plan-orchestrator, plan-only) v[2] Implement ........ validate plan -> worker fan-out -> phase Verify | (Verify failure = STOP, no loop) v[2b] Test sweep ...... diff-scoped, suites in parallel | (deploy/docs-only diff skips) v[3] Review .......... code-review on the cumulative diff | | Must/Should findings --> [4] Loop <= 3 (code-enforced): | amend plan -> FRESH implement -> | checkpoint re-sweep -> re-review | clean or cap reached v[4b] Auto-resolve .... non-blocking findings, fixed in-branch | v[4c] PR gate ......... 5 deterministic checks | (OpenAPI - agents sync - docs - components - security) v[4d] Screenshots ..... conditional, never blocks the PR | v[5] Ship ............. push flush -> gated DRAFT PR (+ ELI5) | ask-gated follow-up issues -> session log v[6] Resume ........... /execute-plan <slug>, any session, re-enters at the first unchecked phaseThe stages, in order:
- Plan.
plan-orchestratorclarifies the goal, runs its own research (delegating to subagents), consultsresource-scoutonce for the resource bundle, writes the plan, and stops.shiptells it: “Do NOT execute; do NOT ask to execute” -plan-orchestrator’s own procedure is untouched, it’s simply routed down the “user declined execute” branch it already has. - Implement. A fresh
software-engineervalidates the plan, fans work out to workers, and runs its own Verify phase. A Verify failure hard-fails the stage; it never loops. - Test sweep (2b). Diff-scoped test suites run in parallel, so a docs-only diff doesn’t pay for the whole battery (more on that later).
- Review (3).
code-reviewwalks the cumulative branch diff. - Loop (4). Must and Should findings trigger a replan: the plan gets amended, a fresh
software-engineerre-implements, tests re-run scoped from the last checkpoint, and the larger diff gets re-reviewed. Capped at three iterations, enforced in code rather than in prose. - Auto-resolve (4b). Non-blocking findings get fixed in-branch, without asking the user.
- PR gate (4c). Five deterministic checks: OpenAPI freshness, agent-definition sync, docs drift, component tests, and diff-scoped security probes.
- Screenshots (4d). Conditional, and it never blocks the PR.
- Ship (5). Flush pending pushes, open the gated draft PR (mandatory
## ELI5section; follow-up issues ask-gated per item, Won’t-class only), write the session decision log, and append the PR URL to the loop log. - Resume (6).
/execute-planre-enters at the first unchecked phase, in any session.
One of those five 4c checks, agent-definition sync, is the OpenCode-to-Claude Code sync mechanism I cover in more detail in a companion post. Here it’s just another line in the gate.
The skeleton landed in one PR; everything after was incremental
The whole thing started as a crude implementation, rough edges and all, that somehow just worked from day one - all five stages, plus the safety mechanism, landed in one pull request in a single day. What followed was a much longer story: the ship definition went through dozens of commits over the following weeks.
What’s interesting is that first rough version already got the important calls right, and they never needed revisiting later. One implementation agent, owning that whole stage and fanning out to workers instead of splitting the job across several top-level agents. A new ship primary agent, so plan-orchestrator could stay focused only on planning. And it wasn’t just theory: an early smoke run actually opened a draft PR end to end, and even the loop cap got proven out - a fourth replan call was refused, in code, exactly as designed.
Going with one implementation owner instead of two agents retired the old coder. coder used to be a narrow fix-applier: it only fired on Must and Should review findings, needed the user’s go-ahead, and applied the fix. software-engineer absorbed that job and became the implementation owner end to end: it validates and adjusts the plan, runs worker subagents through TDD, runs its own Verify phase, and still keeps a fix-apply mode for review round-trips.
The rule for everything added later was the same one behind keeping context small everywhere else in this pipeline: give new work its own small subagent instead of polluting ship’s context with it. That’s how screenshot handling and image verification ended up as their own subagents.
Best guess, then a PR
I deliver more now, and I pay less attention doing it. That doesn’t mean every PR lands clean - sometimes one has to be rebuilt from scratch or pivoted outright - but most of the time the pipeline gets close enough that fixing it up is a few minor tweaks, not a rewrite. In practice that means checking in before and after my 9-5 job, and again before bed - past that, the agent is built to make assumptions instead of blocking on me.
That doesn’t mean guessing blindly, though. Before an agent assumes anything, it checks it against the real code - and if it still can’t resolve something, it flags that up to the orchestrator rather than quietly deciding on its own. Only in extraordinary cases, when something is genuinely blocked, does it ask me for clarification. The one exception where it always waits for me regardless: creating a follow-up issue never happens automatically.
Context discipline: small in, small out, state on disk
First rule: every subagent only gets what it actually needs for its one small piece of work, and only hands back what the caller needs in return - no reasoning or logs flowing back by default. The worker agent’s return spec says it plainly: “a lightweight cited result.” ship and software-engineer are built the same way - they don’t surface their reasoning to whoever called them.
The second rule: state lives on disk, not in the conversation. A session can just break - crash, get killed, whatever - and I didn’t want that to mean starting over. It also keeps the context window from filling up with state nobody needs to hold onto turn after turn. Concretely that’s a plan file and a loop-state file, .plans/<slug>.md and .plans/<slug>.loop.json. A session picks up exactly where it left off, and /execute-plan resumes from those files, re-entering at the first unchecked phase - even from a different session entirely.
The edit rule an LLM talked its way around
One exception is all it took. I’d let an earlier software-engineer treat a “trivial single-line inline edit” as a carve-out from the rules, and the model rationalized straight past it - ‘just a few edits’ - pulling an entire long task into its own context and defeating the coordinator/leaf split.
I wrote the principle down in the session log that day, plainly: “a mechanical permission can’t be rationalized past; a prompt rule can.” No matter how carefully you phrase a prompt rule, it’s still negotiable once the model is under context pressure. A permission table just isn’t up for negotiation.
Making the rule stricter wouldn’t have fixed it - a model can talk its way around a strict rule just as easily as a loose one. So I removed the carve-out completely. What replaced it is a hard gate in the agent’s frontmatter:
edit: "*": deny ".opencode/**": allow "AGENTS.md": allow "docs/*.md": allowThe agent file itself says it best: “This is a MECHANICAL gate, not a prompt request: the model cannot edit source directly even if it tries.” Plan files get the same treatment - denied too, so plan amendments have to route back through plan-orchestrator instead. Yes, that means a trivial edit now costs spinning up a whole worker. I accept that cost on purpose - I’d rather delegate even small work to workers than leave a door open.
Auto-fixed before I ever see it
A script is always faster and more predictable than asking an agent to remember to fix something, so whenever a fix can be automatic, it is. A PostToolUse hook fires after every edit - it swaps em dashes for plain hyphens (a well-known LLM writing tic, per the guard script’s own comment) and runs dotnet format or prettier --write on the touched file. Hygiene never costs review time, and it never costs me remembering to ask for it.
The rules document nobody read became an agent
I noticed it early on: agents kept struggling to use the right knowledge, picking the wrong skill or missing an MCP server that had exactly what they needed. And it wasn’t the same miss every time - same task, different workers, different choices, depending on what each one had internalized. Digging into why, the knowledge lived in the wrong place: a passive rules document for picking resources that agents were supposed to read and just didn’t, every time.
So the fix was to turn the document into an agent. resource-scout is small and stays out of sight - the three orchestrators (plan-orchestrator, software-engineer, code-review) each call it once before fanning work out, and whatever it decides gets baked into every worker’s task. It only picks: read-only, no fetching of its own. The actual fetching and citing still happens down in the workers.
Now when I catch a rule that keeps getting ignored, my first move is to ask whether it should even be a rule someone has to remember - or whether it can just be code that runs.
Parallel workers, and the git races they survive
Implementation work fans out to worker agents, and each one owns its own slice - commits and pushes included. Multiple agents running git in parallel is genuinely prone to race conditions, so I couldn’t leave the rules vague.
A worker only stages what its own task touched - explicit pathspec, never git add -A, because that “would sweep a sibling worker’s in-flight work.” Lock errors on .git/index.lock aren’t a problem, just a sign a sibling is committing right now, so the fix is a short retry with backoff. Same with a non-fast-forward push rejection - it’s benign by design, since workers can’t force-push or rebase anyway and their commit has already landed either way. Publishing happens once, for real, when the coordinator does a single reconciling git push of HEAD after the fan-out converges.
git rebase is allowed for software-engineer and denied for every other agent - that’s the only way it can resolve merge-gating conflicts locally. Every force-push variant is denied though, and a normal push only fast-forwards. I wanted the coordinator’s git powers narrow on purpose, or as the agent file itself puts it: this agent “can rebase + resolve conflicts LOCALLY but can NEVER publish rewritten history - that stays a human/ship action.”
A worker’s default verification is just a compile check, and that’s on purpose: spinning up a fresh test fixture is expensive, so I don’t want that cost paid on every trivial change. When a task genuinely needs a real test, every class runs in one invocation instead of one at a time. As the worker instructions put it: “looping multiplies container startup for zero benefit.”
How a review verdict gets past three blind voters
code-review deserved more than one line earlier - it’s where the pipeline gets genuinely skeptical. One worker per diff category, three to six of them, security always on its own. Findings only come back, no reasoning. Then a second pass catches what no single category sees alone: responsibility transfers, contracts across seams, comment freshness.
The interesting part is what happens to a finding that could actually block a PR. I don’t run consensus on everything - only on the high-stakes stuff: anything tagged Must, or a High-confidence claim that’s complex or contestable. The protocol says why plainly: “Do NOT run consensus on every finding - only on findings where being wrong is costly.”
Three voters run in parallel on each of those findings, and I keep them honest by keeping them blind - to each other. Each one only sees the finding itself, its diff slice, and the relevant conventions, never the other voters’ reasoning. And none of them takes the finding’s quote at face value: each re-pulls the cited source and pulls its own. The protocol says it outright: “Do not trust the finding’s excerpt at face value.”
Votes are UPHOLD, OVERTURN, or MODIFY. Majority wins. Every messy case has a predefined path, nothing improvised: conflicting MODIFY votes go to the top agent to reconcile, favoring “prefer the more conservative (higher-severity) reconciliation when in doubt.” One voter missing? The finding survives, just a notch less confident. A three-way split? Top agent decides and logs it - I’m not in that loop. And dissent isn’t thrown away - it lands in its own “Dissenting view” block.
Three votes cost three times as much as one review, and the protocol says so plainly - that’s exactly why it’s rationed to findings where being wrong is expensive. The failure it’s guarding against is concrete: a wrong “Must” blocking a PR that didn’t deserve it.
Four layers of gates, because the gate has to run itself
“Quality” used to mean a human ran the tests before merging. Once work started shipping unattended overnight, that stopped being enough - quality now has to mean checks that fire on their own, every change, with nobody watching. That’s the actual shift, and it’s not the same claim as “AI needs more tests.”
Four layers, and each catches what the one before it missed. First, a formatter and an LSP flag stuff inline while the agent is still editing. Second, a plugin runs fast checks the moment a session goes idle. Third, a local fast-checks.sh script mirrors CI’s fast gates - agent sync, doc drift, all of it. Fourth, CI runs on the PR itself. None of it depends on me remembering to run anything.
Some of these checks look oddly specific, and that’s because they came from real pain. The mock server gets checked against the committed OpenAPI spec at lint time, so spec drift gets caught immediately instead of quietly piling up. Custom compiler analyzers catch things like an API endpoint silently missing its authorization policy, and fail the build the moment they see it.
Same story for the docs describing this pipeline - they get checked against reality automatically too, including the ones describing the checker itself. “Probably still accurate” was another soft assumption I stopped relying on.
I’ve since deleted one version of the doc check: tripwires comparing hand-maintained counts in docs against the code. An audit found several had already drifted from reality. Proof enough: the counts themselves were the failure mode. So the tripwires went, replaced by a rule in AGENTS.md: “No hand-maintained cardinality counts in docs/comments - describe sets qualitatively or point at the code/mechanical source of truth (test, guard, or registry) that pins them.” The doc gate still checks freshness and drift. It just doesn’t trust a human-typed number anymore.
Second bug: a supply-chain guard meant to block a package until it’s been out for N days, so a freshly-published, possibly compromised package can’t slip in immediately. I set minimumReleaseAge to 7 meaning days - the unit is actually minutes. So it was really only enforcing a 7-minute wait, not 7 days, until I caught it.
save-exact=trueminimumReleaseAge=7# pnpm 11 home for settings (v11 stopped reading non-auth keys from .npmrc).saveExact: true# minimumReleaseAge counts minutes, not days: 10080 = 7 daysminimumReleaseAge: 10080The third one was the big one: a genuinely massive gate that checks CHECK enum values line up across the spec, frontend, mock server, and database, all in one pass. If any two of those layers drift apart, it fails before a human ever sees it.
OpenCode gives you two different extension points, and this pipeline leans on both. A plugin like the one above fires automatically - the framework decides, on an event like session.idle. A custom tool is the opposite: the agent itself decides to call one. The gate that matters most in this whole pipeline runs through that second kind.
Permissions instead of prompts
The most important rule isn’t a prompt asking the agent to be careful. While ship is running, there’s no path to open a pull request except through one gated function that re-checks safety first. The unsafe path simply doesn’t exist.
Concretely: while ship is active, direct gh pr create and gh issue create are denied at the permission level. Only the gated custom tools reach GitHub: ship_create_pr, plus the ask-gated ship_create_followup_issue. The lesson here isn’t “ask the model nicely to be careful” but “don’t give it a way to not be.”
This shape was forced by a constraint. Research found no documented API for a tool to mutate the permission system at runtime, so the gate had to be permission-routing: deny first, then allow exactly one safe path. Permissions also live in per-agent files rather than one global config, because I pushed back on the global proposal at the time; I wanted per-agent scope, with each agent owning its policy in its own markdown file.
The three-iteration loop cap is enforced three layers deep: in loop.ts code, behind a steps: 120 backstop, and in the hardened PR gate. OpenCode has no native loop-counter primitive, and a pure prompt-plus-counter approach was rejected as weaker, because LLMs miscount.
The gate itself is deliberately boring:
// Single source of truth for the ship gate. Both `gate_check` (this file) and// `create_pr` (ship.ts) call this so the condition cannot drift between copies.export function evaluateGate( worktree: string, slug: string,): { may_ship: boolean; replan_count: number; last_verify: VerifyResult;} { const state = readState(worktree, slug); const may_ship = state.replan_count <= MAX_ITERATIONS && state.last_verify?.result === "pass"; return { may_ship, replan_count: state.replan_count, last_verify: state.last_verify, };}One function decides whether shipping is allowed, and both the loop’s gate_check and ship’s create_pr call it, so the condition cannot drift between copies.
The PR tool can’t skip it:
export const create_pr = tool({ // ... async execute(args, context) { const g = evaluateGate(context.worktree, args.slug); if (!g.may_ship) { const lv = g.last_verify ? g.last_verify.result : "none"; return { title: "ship_create_pr - BLOCKED", output: `BLOCKED: gate failed (replan_count=${g.replan_count}, last_verify=${lv})`, metadata: { shipped: false, replan_count: g.replan_count, last_verify: g.last_verify, }, }; } try { // Bun.$ treats interpolated values as literal argv (auto-escaped), not shell-substituted. const out = await Bun.$`gh pr create --draft --title ${args.title} --body ${args.body} --head ${args.head} --base ${args.base}` .cwd(context.worktree) .nothrow() .text(); // ...If the gate fails, the tool returns a BLOCKED reason and never invokes gh. When it passes, it runs gh pr create --draft, the standard flag for marking a PR as a draft. And since Bun.$ treats interpolated values as literal argv rather than shell-substituted text, the title and body can’t smuggle in shell syntax.
ship’s own frontmatter is where the routing lives:
mode: primarytemperature: 0.1steps: 120# ... # Task delegation - ship spawns ONLY the three pipeline agents. It never # spawns `general` directly (implementation fan-out is software-engineer's # job). last-match-wins (plan-orchestrator Authority) → broad deny FIRST, # specific allows LAST, so every other type resolves to deny. task: "*": deny plan-orchestrator: allow software-engineer: allow code-review: allow# ... (bash: broad git allow FIRST, force-push/branch-mutation/# direct-gh-pr-or-issue denies AFTER - they win) ... # Edit-gate bypass closure (defense-in-depth): `edit` is hard-scoped to # `.plans/*.md`, but `bash: "*": allow` would let in-place shell editors # (sed -i, awk -i inplace, perl -i, tee, dd of=) write ANY file - the # exact `sed -i` source-edit bypass seen in the wild. # ... "sed *-i*": deny # catches -i, --in-place, -i.bak, -iE "awk *-i inplace*": deny # gawk in-place "perl *-i*": deny # perl in-place (-i / -i.bak) "tee *": deny # tee / tee -a write stdin to a file "dd *of=*": deny # dd output-fileOpenCode’s permission docs describe resolution as the “last matching rule winning,” so ordering is the mechanism: a broad task deny first, the three pipeline agents allowed last, and every other agent type falls through to deny. The bash ladder works the same way, with broad git allows first and the force-push, branch-mutation, and direct-gh-pr-or-issue denies placed after so they win.
The comment about in-place editors is defense-in-depth, not paranoia. The edit permission is hard-scoped to .plans/*.md and docs/sessions/*.md, but a broad bash allow would let sed -i, awk -i inplace, perl -i, tee, or dd of= write any file, which is the exact sed -i source-edit bypass seen in the wild. So those get denied too.
Every pull request opens as a draft. It started as a cost decision, saving CI minutes (the same wallet logic behind moving CI workflows to manual dispatch), and it turns out being cheap and being careful look identical. A PR flips to ready once checks pass and I’ve had a look. I won’t oversell the draft flag as the primary trust mechanism; it’s a wallet decision that happens to also gate readiness.
The speed tax, and where I clawed it back
Long sessions are my biggest complaint about the pipeline, and the cause kept reappearing. A docs-only change once cost fifteen minutes of pointless test runs. I fixed that, and then a hook meant to fire once was firing on every nested subagent instead. Same bug, new disguise.
The docs-only story: a deploy/docs-only diff was running all three suites, about 15 minutes of inherited green. The fix was diff-scoped suite selection (mirroring the CI paths: split) and then parallelizing the suites, which I had avoided on a mandate that they “share infrastructure.” That mandate turned out to be stale; only two real conflicts existed, auth-state files (split via an env var) and per-tier Playwright directories. Three-way parallel now lands at 3.4, 4.3, and 9.0 minutes wall time, bounded by the slowest suite, versus roughly 13-16 minutes sequential.
The second bug was better hidden. The fast-checks plugin listens for session.idle, and in OpenCode that event fires per session, subagents included. A plan with roughly 20-40 worker Task calls was re-running build and quality checks dozens of times per run. This was an unintended scoping gap in the hook, not a deliberate design choice.
The fix is one guard: skip sessions that have a parentID.
if (event.type !== "session.idle") return;if (edited.size === 0) return;const sessionID = event.properties?.sessionID as string | undefined;if (sessionID) { // Fail-open on lookup failure: worst case is one extra harmless // run, not a missed drift check (matches this file's non-fatal // philosophy throughout). const info = await client.session .get({ path: { id: sessionID } }) .catch(() => null); if (info?.data?.parentID) return; // subagent session - not our pause point}edited.clear();void drain();The fail-open matters: the worst case is one extra harmless run, not a missed drift check.
One thing I deliberately left slow: the review-to-replan loop re-runs the full sweep on every iteration (up to four total), because it’s the pipeline’s strongest correctness gate. Alongside it, a last_sweep_commit_sha checkpoint records what was already verified, so a loop iteration whose fix touched one tree doesn’t re-pay the other tree’s already-green suite.
The trade-off I keep landing on: slow-but-unattended beats fast-but-requires-you-there, because it converts idle 9-5 hours into shipped work. And the reason I can run this much in parallel at all is economics: a generous z.ai plan (good through January 2027, and I’m burning through more than twenty-five billion tokens a month) made concurrent sessions cheap, which caused port and memory contention, which led to devcontainers.
One container per worktree, caps from measurement
My provider’s plan is generous, so I pushed parallelism hard: more sessions running at once. One runaway dev stack ended up eating all the RAM and taking every other window down with it.
The incident: on a 32 GB host, one worktree’s runaway dev stack OOM’d and killed every other VS Code window sharing the host’s memory pool. The fix was isolation with teeth: one container per worktree, with a hard 8 GB memory cap via runArgs.
The cap came from measurement rather than guesswork, because my guess was wrong. First guess: 24 GB. Measured: about 3.8 GB baseline, about 7 GB peak under heavy sweeps. Corrected cap: 8 GB. My first guess for memory was twenty-four gigabytes, and measured usage said eight.
CPU got no hard ceiling at all, just backing off when something else needs it. I wrote the requirement down as a genuine tension at the time: “Now we limit memory but not CPU - I would like the CPU to be also limited so one cannot kill entire system, but on the other hand, I wouldn’t like to limit the container if there is CPU power available.”
The resolution is --cpu-shares=512: a soft, work-conserving, proportional weight. A hard quota (--cpus=N) was explicitly rejected because it throttles even on an idle host, exactly the outcome I didn’t want. Docker’s resource constraints documentation describes cpu-shares as a “soft limit” that only binds under contention. That split is the general point: memory gets a hard ceiling because an OOM must not spread to its neighbors; CPU gets a fair-share weight because it should burst to all cores when idle and yield under contention.
The config, with the comments that matter:
// hostRequirements = START-GATE / warning only (devcontainer spec). NOT a runtime cap. "hostRequirements": { "cpus": 4, "memory": "8gb", }, // runArgs --memory = the ACTUAL cgroup enforcement (OOM-kills inside the container). // runArgs --cpu-shares = soft work-conserving weight: bounds the container AND its // DinD subtree only under contention; bursts to all cores when idle. "runArgs": [ "--memory=8gb", "--cpu-shares=512", // ...hostRequirements is a start-gate warning in the devcontainer spec, not a runtime cap; the runArgs are the actual cgroup enforcement.
Actually using that plan meant a hardware upgrade of my own, and RAM prices that summer were no joke. I just needed more cores and threads to run six to eight parallel sessions at all. I also gave up VS Code’s built-in terminal for Ghostty; even the editor was spending memory that should have gone to agents.
Four defects the whole pipeline missed
None of this was designed perfectly upfront. One pull request shipped with four defects that the entire review pipeline missed. That was the moment the whole approach changed.
The four: a responsibility-transfer regression (a replacement component dropped a per-branch invariant), a cross-system contract mismatch (the producer derives per-branch, the consumer hardcodes), a diagnostic hint masking a hardcoded fallback, and outcome-only, single-branch verification. The pattern across all four: each ship-flow stage was correct within its own scope, but none of them was prompted to do cross-system contract checks.
The fix wasn’t “review that one thing more carefully next time.” It was cross-cutting invariant checks across every core agent at once, another soft rule turned mechanical, so the same miss couldn’t repeat. The checks landed in all four core agents (ship, software-engineer, plan-orchestrator, code-review) in a single commit, phrased generically, plus a durable review-audit summary in the session log, because review reports are otherwise ephemeral scratch.
My own summary of the incident: caught it, then fixed the class of problem, not just the instance. A real incident, not a hypothetical.
Unattended, not unsupervised
I do check every pull request, but briefly, at a high level. What I actually read is the description, not the full diff: every PR is mechanically required to end in a plain-language ## ELI5 section, written for a reviewer who’s never seen this codebase, and that’s usually enough to judge whether the change makes sense. I don’t know every line of code here anymore. That’s not a confession. It’s why those gates have to be mechanical, not backing up my review, replacing it.
The mechanical gates are substituting for a depth of review that no longer scales, not layered on top of one that still happens. One personal practice the repo can’t verify for me: I read the agents’ thought process and output at session start to catch drift early. Unattended, not unsupervised. “Automated” means it doesn’t need you continuously, and it doesn’t mean you never look; with about six concurrent sessions, looking is a morning-and-evening ritual, not a full-time job. None of this makes the human optional: I still approve every PR, still help refine issues before they’re specced, and still ask for changes - sometimes fundamental ones.
The reuse I didn’t plan for
The nice surprise of building everything from small, permission-scoped pieces is that the pipeline stopped being only a shipping tool. plan-orchestrator and code-review are usable standalone, and software-engineer spawns them itself, so the same agents that fan out a feature also work for refining and specifying a rough GitHub issue, or for just planning a feature with an agent before any code exists. I didn’t design for that reuse; it fell out of keeping every piece small and composable instead of building one monolithic ship agent that only knew how to ship.
The real story: I stopped trusting anyone, including me
Every piece of this system exists because a rule I couldn’t enforce broke, once: “run the tests,” “pick the right skill,” “review it carefully.” None scaled. So each became something that enforces itself. That’s the real story. I stopped trusting anyone, including me, to just remember.
The system isn’t really about AI agents. It’s about turning soft expectations into hard, automatic guarantees, one incident at a time. A guessed 24 GB became a measured 8. Four missed defects became invariant checks in four agents. A hook quietly multiplying runs got scoped down. Thing broke, thing got fixed mechanically.
If you want the companion repo again, or the adjacent pieces: how I keep the same agent definitions working in both OpenCode and Claude Code (same agents, two tools), and how the formatter-plus-LSP feedback layers at the bottom of the gate stack came to be (validation feedback loops).
FAQ
What exactly does @ship do? It takes a goal, writes a plan, implements it through worker agents, reviews the diff, loops up to three replans, runs five deterministic readiness checks, and opens a draft pull request with a mandatory ELI5 section. Follow-up issues are ask-gated, so nothing reaches the issue tracker without a human yes.
Can it publish anything without me?
It can open draft PRs once its own gate passes. It cannot create issues without asking, it cannot bypass the three-iteration loop cap, and direct gh pr create and gh issue create are denied at the permission level while ship is active. Merging is mine.
Why does every pull request start as a draft?
CI minutes. Draft-by-default started as a wallet decision, saving Actions spend, and it happens to double as a readiness gate: the PR flips to ready once checks pass and I’ve had a look. gh pr create --draft does the mechanical work.
What happens when verification keeps failing?
The loop replans up to three times, enforced in code. If it still fails, ship_create_pr returns BLOCKED with the replan count and last verify result, and gh never runs.