otto · owner review · second gate

otto Engine Review Pack

Read this page instead of the product requirements document (PRD). It plans the rewrite of otto's engine from a bash script into one Go program, in five milestones with a review after each. Nothing you use today changes until the last story, which is yours.

27 September 2026PRD: otto-engine/prd-engine.md, revision 7, commit 9f22732, branch factory/engineWritten in Simplified Technical English (ASD-STE100)
DELIVERED the PRD does it as the brief or end state says CHANGED done in another form, or with a stated limit NOT IN THIS PRD a later PRD does it HUMAN-OWNED a person does it, never otto HOLD the run stops here for a review

Status in one line. The PRD is at revision 7. It went through five rounds of the codex checker, otto check, and one panel of four Opus reviewers. No round found a blocker. The panel found six, and revision 4 fixed all six. The checker's majors fell from 47 to 25, 24, 20 and 14. Every round's verdict was FIX-FIRST, as for P1. Revision 7 applies the last 14 majors and was not checked again, because the loop reached its cap of five rounds. The sizer and this gate backstop the rest.

What "go" means. We copy the branch to a standalone build folder, install Go for your user only, convert the PRD into otto's task file, and split it into about 115 parts. The installed otto builds them in order. The run stops seven times for a review, with exit 5 and a notification, and continues only when the operator clears the hold. Your part is the Mac run of the finished binary and the last story: accept the swap, or refuse it. If you say no, no story runs.

Short path, about eight minutes. For the decision alone, read the status box above, then sections 6, 7 and 9.

50
stories: 48 for otto, 2 for you; about 115 parts after the sizer
5 + 4
codex check rounds, plus a four-lens Opus panel
7
review holds; the run stops at each with exit 5
≈ 4 d
of runs; about two weeks with the reviews

1. What this is and what it is not

otto today is one bash script of about 5,900 lines plus a 1,600-line planner. P1 made it honest and safe to run unattended. This PRD replaces the script with one Go program that does the same things byte for byte, then adds what P1 could not: a daemon, resume after a crash, an account pool, a resolve and approve command, cards with defaults, profiles per repository, host claims, and executor adapters with a model and an effort per story. The executors stay the subscription command-line tools you pay for. No vendor software development kit (SDK) is used anywhere.

In this PRD

  • M0 Foundations. The Go module, the engine's design document, ten new contract checks, a test suite that can run against either engine, a parity script, and a Go test harness.
  • M1 Parity. Every command, file, exit code and message as the bash engine does it. The gate: 252 contract checks pass, 14 bash-only checks are skipped, and the six navigation replays match.
  • M2 P2 natively. Profile, credential preflight and ledger, provider limit detection, account pool and switch, resolve, cards, approve, claims, evidence levels, the daemon, resume, and the remote runner.
  • M3 Adapters. Executor command lines as configuration, with the typed streams of claude and codex as opt-in specs, a model and an effort per story, and credentials for nested tool calls.
  • M4 Swap readiness. The installer builds the binary, the swap and rollback procedure, the README and skills, the final verification, and your approval.

Not in this PRD NOT IN THIS PRD

  • A web command centre, a Slack bot with buttons, an MCP server. The card format is fixed now so a bot can render it later without a change to the contract.
  • The otto feature front door, design boards, release adapters, per-host baselines, the design-document export.
  • A desktop app, more than one tenant, a third executor vendor. The PRD shows a third vendor would be one new spec file.
  • Running executors as a separate user or in a virtual machine. That is the real cure for the security risks in section 7, and a later PRD.

2. What changes for the person who runs otto

After the swap. Until then, nothing.

Unchanged

  • The PRD format, the task file, the three result tags, the commit message form, the progress file, the status file, the exit codes and their last lines.
  • otto plan, otto check, otto implement, otto watch, otto preflight, otto backup, otto budget reset, with the same flags.
  • Your task files from P1 run as they are. The two engines can be swapped back and forth on the same repository.

New

  • The run survives a crash or a limit. An event log per PRD is the source of truth; files are derived from it. A daemon restart resumes its runs.
  • Accounts switch on their own. The pool reads your account meters and swaps the account when one is exhausted, the way the failover script does by hand today.
  • otto resolve to waive, amend, add a story or re-queue after an environment fix, each recorded as an operator decision.
  • Cards with a default and a deadline. A park sends a card that names the options; safe classes apply the default after 30 minutes, once per story. Waivers, budget, production and takeovers never default.
  • otto approve records the two gates with the hash of what you approved.
  • A profile per repository holds loops, hosts, cap, routing, exit bar, approvers and escalation.
  • Host claims stop two runs sharing a staging host; a second claim is refused with a card.
  • Model and effort per story: claude:opus:high, codex::xhigh.

3. The fifty stories

Every otto story runs on Claude Opus unless the row says Sonnet or Fable. "Parts" is what the sizer splits the story into at convert time, at points the PRD fixes. A HOLD marks a story where the run stops before it starts, until the operator clears the hold after a review.

StoryPurposePartsNotes
M0 · Foundations
OTTOD-001Go skeletonOne Go module, pinned toolchain, pure Go, static builds for Linux and the Mac.1Sonnet
OTTOD-002Engine design documentWrites the engine's HLDD with one section per package group, so the HLDD guard applies to every engine story.1
OTTOD-003Ten new contract checksTurns the behaviours P1 checked by hand into suite checks, so parity covers them.1Suite 256 → 266
OTTOD-004Suite for both enginesOne variable selects the binary under test; bash-only checks print a SKIP line.2
OTTOD-005Parity scriptRuns the suite and the six navigation replays through both engines and compares digests, not just totals.1
OTTOD-006Go test harnessBlack-box tests against a built binary with the same pins and guard as the bash suite.1
M1 · Parity
OTTOD-007CLI surfaceEvery subcommand, flag and knob parsed as the bash engine parses it.1HOLD M0 review
OTTOD-008PRD modelOrder-preserving JSON that jq cannot tell from the bash engine's, story sets, human detection.2
OTTOD-009Event logSQLite log per PRD as the source of truth; files derived from it; adoption of files the bash engine wrote.4
OTTOD-010State, backups, lockThe .otto/ layout, rotating backups, the run lock with stale takeover, the git exclude block.3
OTTOD-011Process groupsEvery group recorded before it runs; the kill sequence; no orphans on any exit.1
OTTOD-012Status and finishThe status file with heartbeat and derived counts; one exit path.1
OTTOD-013Prompt and loopsTemplates rendered literally; feedback loops detected before every story.3
OTTOD-014Launch and watchdogToday's executor command lines; the stall watchdog on output and CPU time.4
OTTOD-015Attempt outcomesTags bound to the selected story; one authorisation path to passes: true; parks after repeated blocks.3Includes a real-executor run
OTTOD-016Protected planSnapshot, decisions log, reconciliation of executor edits, tamper checks.5
OTTOD-017Signals and recoveryInterrupt, terminate and hang-up end cleanly; a crash is recovered at the next launch.3
OTTOD-018PreflightThe nine checks in order and the real login probe per engine.2
OTTOD-019NotificationsThe same events and card-grade payload as P1.3
OTTOD-020BudgetLaunch and token caps that survive relaunches; exit 7.2
OTTOD-021RoutingThe tier ladder and raises refused without the logged flag.1
OTTOD-022HLDD guardAttribution by attempt, the section map, the commit-body rule.1HOLD after routing
OTTOD-023Convert and checkotto plan convert and otto check with the unchanged prompts.2
OTTOD-024Other plan commandsinit, plan create, quick, iterate, full, append.5
OTTOD-025otto watchThe status follower, through parks and stalls.1
OTTOD-026Parity gateWhole suite, parity script, replays A to F identical: 252 passed, 0 failed, 14 skipped.1
M2 · P2 natively
OTTOD-027Repository profileotto.profile.json: schema, validation, precedence over flags and environment.3HOLD M1 review
OTTOD-028Credential preflight and ledgerChecks from the profile's credential matrix, including probes that must fail; a blocker ledger that outlives runs.4
OTTOD-029Limit detectionProvider login and rate-limit lines recognised inside the engine, including "You've hit your limit".1
OTTOD-030Account poolRoster, token source and meter command from configuration; the pick rule on the three meters, stale rows handled.1
OTTOD-031Account switchStop, checkpoint, re-pin, relaunch inside the run; token redaction from the first pooled launch.5
OTTOD-032otto resolveWaive, amend, add a story, re-queue; every action an operator decision.3HOLD after the pool
OTTOD-033Cards and timed defaultsThe card format with options as argument lists; one timed default per story and class.3
OTTOD-034otto approveApprovals with the artefact's hash; tier raises only through approvals; a routing block cannot be deleted away.3
OTTOD-035Host claimsName and expiry, 8 hours, renewable; a second claim refused with a card.2
OTTOD-036Evidence levelsBuilt, tested, installed, probed, journey, checked against the current commit.1
OTTOD-037The daemonRuns hosted on a local socket, lanes, confirmation codes minted in memory, a user service that survives restarts.8
OTTOD-038ResumeIdempotent steps; a daemon restart adopts and resumes its runs.5
OTTOD-039Remote runner, Linux sideA run dispatched to another machine over SSH, its status mirrored, claims held by the controller.9HOLD after resume
OTTOD-040Mac runYou run the remote runner and the final Mac binary on your Mac against the recorded hashes.1HUMAN-OWNED
M3 · Adapters
OTTOD-041Adapter specsThe spec format, loader and validator; today's command lines re-expressed as the two default specs.3HOLD M2 review
OTTOD-042claude stream specThe typed stream-json spec with model and effort, opt-in.1
OTTOD-043codex json specThe typed --json spec with model and effort, opt-in.1
OTTOD-044Model and effort per storyThe grammar vendor[:model[:effort]]; every P1 value still valid.1
OTTOD-045Nested credentialsExecutors' own claude calls get the pinned account, replacing the hand-made shim.1
OTTOD-046Typed adapters in the suiteThe core scenarios also run through the typed specs; a third vendor shown as one spec file.1Sonnet
M4 · Swap readiness
OTTOD-047Install, swap, rollbackThe installer builds or links the Go binary on request; the swap needs a release approval and refuses a mismatch.3HOLD M3 review · Sonnet, rollback check on Opus
OTTOD-048README and skillsThe engine's commands, cards, adapters and profile documented; the otto skills updated.1Fable
OTTOD-049Final verificationBoth suites, parity, replays, lint, vet, binary size, cold start, the Mac build, hashes recorded.1
OTTOD-050You approve the swapRead the verification, run the Mac story, then accept the swap or refuse it.1HUMAN-OWNED

4. How the brief and the end state map to stories

ItemStoriesStatus
The brief's P2 list
Account pool with usage read and switchOTTOD-030, 031DELIVERED
Text-mode rate-limit detectionOTTOD-029DELIVERED
otto resolve waive, amend, add-story, envOTTOD-032DELIVERED
Operator decisions and the block triage cardOTTOD-032, 033DELIVERED
otto approve with the artefact hashOTTOD-034DELIVERED
Per-repository profileOTTOD-027DELIVERED
Shared-host claim with expiryOTTOD-035DELIVERED
Decision 10's additions
Credential and access preflight, blocker ledgerOTTOD-028DELIVERED
Timed defaults on parksOTTOD-033CHANGED one per story and class; never for waivers, budget, production, takeovers
Per-provider capacity with mid-run fallbackOTTOD-030, 031DELIVERED
Evidence levels in the schemaOTTOD-036DELIVERED
Lane capsOTTOD-037CHANGED default 1, and 1 until executors run as a separate user
Remote runnerOTTOD-039, 040CHANGED Linux side and the Mac binary; the Mac run is yours
The end state
Go, one static binary, daemon plus thin CLIOTTOD-001, 037CHANGED one command; ottod is the same file under another name
SQLite event logOTTOD-009, 038DELIVERED from M1
Executors as subscription CLIs behind config adapters, model and effort per story, no vendor SDKOTTOD-041 to 045CHANGED the typed specs ship opt-in; today's command lines stay the default at the swap (decision 13)
Passes the smoke suite; the navigation PRD replays through both enginesOTTOD-004, 005, 026CHANGED the suite is 266 now, not 44; 252 apply to a binary
Swap the symlink, then adaptersOTTOD-047, 050CHANGED adapters before the swap (decision 10)
Web command centre, Slack bot, MCP server—NOT IN THIS PRD

5. What the reviews found, and what we declined

The checker. Five rounds of otto check (codex at extra-high effort). No blocker in any round. Each round's majors were consequences of the previous revision's additions, not reversals, so the author applied every one. The last round's 14 are applied in revision 7 without a further check.

The panel. Four Opus reviewers, one lens each, on revision 3. They found six blockers, 23 majors and 5 minors. Revision 4 applied them with the operator's steers where two lenses disagreed. The six blockers:

Declined, with reasons in the PRD's review log. Two PRDs may still share a worktree in a foreground run, because P1 documents it and parity needs it; the daemon reserves worktrees instead. The ps command is a runtime dependency, listed, not a breach of "one static binary". Split findings became mandatory split points, not new story IDs, so the PRD stays one file of 50 stories.

6. Decisions already taken, and their defaults

These are the PRD's open questions. Each has a default that applies if you say nothing. Reply with the number and your change to alter one.

  1. 1. One command, not two.

    Default: only cmd/otto; ottod is the same binary started under another name. The end state says one binary; the two-command layout is recorded as the alternative.

  2. 2. The event log is the source of truth from the first milestone.

    Default: one log per PRD under .otto/state/, each log's head kept machine-wide; lock, group records and status are never derived; outside changes adopted only after the lock and only when they weaken nothing.

  3. 3. Effort grammar.

    Default: vendor[:model[:effort]], so claude:opus:high and codex::xhigh. Effort is not a tier and never needs the tier-raise approval.

  4. 4. SQLite driver.

    Default: the pure-Go modernc.org/sqlite, pinned with its companion module; a fallback named.

  5. 5. Go version.

    Default: Go 1.27.1, installed for your user under ~/.local/go, no sudo, with toolchain downloads disabled.

  6. 6. Size, budget and duration.

    Default: 50 stories in one file, 26 with fixed split points, about 115 parts; 280 iterations of budget; about four days of runs and about two weeks with the seven reviews. Recomputed at convert time if the sizer lands outside 105 to 125 parts.

  7. 7. Lanes.

    Default: one run at a time, until executors run as a separate user (decision 11).

  8. 8. Which parks apply a default after 30 minutes.

    Default: environment and capacity parks re-queue; guard, unknown, tool and pre-existing parks re-queue once with the reason; credential parks wait for the ledger; upstream parks wait for a person; budget, production, takeover and waivers never default.

  9. 9. Where configuration lives.

    Default: otto.profile.json at the repository root for repository policy; your account tokens and meters in ~/.config/otto/pool.json; lanes in ~/.config/otto/daemon.json; codes only in memory.

  10. 10. Adapters before the swap.

    Default: M3 before M4, so the swap carries the adapters. The end state had the swap first; either order works.

  11. 11. Executors as a separate user or in a virtual machine.

    Default: a later PRD. It is the real cure for the same-user risks, and the precondition for more than one lane.

  12. 12. Move the production deploy key.

    Default: you do this as an ops task outside otto: a separate user, or an agent that asks for a confirmation. Until then every run records the residual in the ledger, and the CurrencyTransfer profile gains a must-fail probe once the key has moved.

  13. 13. Typed adapters as the default?

    Default: no. Today's command lines stay the default through the swap. The typed specs are opt-in until you approve the budget-accounting change they bring: claude usage becomes reported.

  14. 14. Slack webhook for the build's cards.

    Default: the operator watches the log and the terminal bell until you give a webhook; open since the P1 report.

7. Risks

8. What happens after go

  1. Build folder. The operator clones the repository to a standalone folder on this machine and checks out the branch. The installed otto and its worktrees stay untouched.
  2. Go. Go 1.27.1 goes under ~/.local/go for your user only, checksum verified. Module downloads happen once, at the first build.
  3. Convert and size. The installed P1 converts the PRD; the sizer applies the fixed split points; the operator confirms the seven holds, the executors and the run policy in the task file.
  4. Preflight, then launch. Through the failover script and its usage guard, with the account pinned. Notifications go to Slack if you give a webhook, otherwise to the log.
  5. Seven holds. The run stops with exit 5 after M0, after routing, at the parity gate, after the pool, after resume, before adapters and before the swap stories. The operator reviews the diff and the evidence at each hold and clears it. You are told at each hold; you decide only where the pack says.
  6. Your two stories. After the final verification, you run the Mac story against the recorded hashes. Then you read the verification record and approve the swap, or refuse it. A refusal leaves the bash engine installed.
  7. Rollback at any point: the tags factory-p1-2026-09-27 and pre-factory-2026-09-26, and the installer's refuse-on-mismatch rule.

Cost and time. The build runs on your subscription accounts through the pool's manual predecessor, the failover script. Paid calls go only to the checker, under the ChatGPT login. About four days of runs, about two weeks with the reviews, on the P1 pace of 29 parts in 15.5 hours plus about 12 minutes of suites per part.

9. The go line

Reply go, or no with the numbers of the decisions to change.

Decisions 1 to 14 are in section 6. An example: "go, 12 = I will move the key this week, 14 = here is the webhook".

Your tasks. This reply. Later, the Mac story (OTTOD-040) and the swap decision (OTTOD-050). Between them, nothing unless a hold raises something the pack did not cover.

Review history

  1. Round 147 majors
  2. Round 225 majors
  3. Panel, 4 lenses6 blockers, 23 majors, all applied
  4. Round 324 majors
  5. Round 420 majors
  6. Round 5, cap14 majors
  7. Revision 7round 5 applied, not re-checked

otto check found no blocker in any round. The panel's six blockers were fixed in revision 4 and did not return.

Prepared 27 September 2026 from otto-engine/prd-engine.md, revision 7, commit 9f22732, its review log, the check files prd-engine-check-r1.txt to r5.txt, and the four panel reports. Companion pages: the P1 build report, the P1 review pack and the retrospective. The check history is also in CHECKS.md beside this page.