1. Kody in numbers Kody
Kody (Kent C. Dodds) is a Cloudflare Workers product: one MCP server with only two tools, search and execute, and everything else behind them. The interesting part for us is how it gets built. People steer, and agents write and ship almost all of the code.
AGENTS.md, enforced by CI that a PR cannot editharness-engineering.md): people steer outcomes and agents do the implementation. Human attention is the scarce resource. When a mistake repeats, encode it in the cheapest guardrail that works: lint or type, then test, then script, and prose only as a last resort. "If reviewers repeat the same comment twice, encode it." This is the same rule as our CLAUDE.md "fix repeated mistakes at the highest level". They enforce it harder.2. Kody's factory loop Kody
The factory is itself a Kody package (@kody/kody-factory) with a board app at factory.kody.build. Every piece of work is a card on one state machine, and each state change comes from a named sender: human, bot, observer, dispatcher or timer.
Signals become cards
GitHub issues, Sentry, user feedback, agent friction, failed jobs, audit reports. Repeat errors with the same fingerprint attach to the existing card.
A bot wakes per card
It sends one event: plan, accept, send to agent review, drop, or ask Kent. A decision ladder routes owner calls to Kent.
Sweep dispatches
A scheduled sweep asks a runner (@kody/devin, Cursor cloud agents) for a session. One card, one session, one PR.
PR preview + gates
Every PR gets a full preview stack (kody-pr-N), npm run validate, ui:verify (axe, keyboard, visual), and Devin, Bugbot and Seer reviews.
ship-pr tick
Re-run until done. Sorts review-bot comments, replies, fixes, then squash-merges low and medium risk. High risk waits for Kent.
CI-only deploy
Production changes only through deploy.yml after main is green, followed by multi-region health probes. Agents never deploy by hand.
Outcome on the card
Closes factory:wi_… in the PR ships the card on merge. Flow metrics (throughput, cycle time, stalls) are computed live.
↺ After merge, the factory watches main CI and sends red back to the agent that caused it. A watchdog checks main every 15 minutes. Leftover friction from each ship-pr run is filed as new cards, and a nightly run triages them.
Safety defaults, all on when you first fork it
| Control | What it does |
|---|---|
| Shadow mode | The sweep records what it would have started but starts nothing. You switch it off once its choices look right. |
| Kill switch | Stops new runs and merges at once. |
| Pilot scope | Empty allowlist by default. The factory acts on no project until you name one. |
| Merge policy | The factory never merges on its own. ship-pr does, and only low or medium risk with CI green and valid review feedback handled. |
| Agent reply cap | Agents talk to each other by @-naming one another in card comments. After 6 agent replies in a row the thread pauses until a person comments. |
3. Ideas worth taking Kody → Olly
Ranked by how much each would change our throughput and Chakshu's attention. Each card ends with where it lands in our stack.
One place for everything only the owner can decide
Triage asks four yes/no questions of every card: is this a product, pricing or design call? a one-way change? an architecture call? does it need a credential only the owner holds? Any yes at 0.5 confidence or higher goes to Needs you. Everything else goes to Agent review, which never pushes a notification.
Agents ask structured questions, and the answers can become ADRs
A question carries options, a recommendation, the long-term right answer, a confidence score, and what it blocks. Agents may only decide for themselves at 0.9 confidence or higher. Answering with adr: true drafts the decision record.
Every signal source lands on the same board
Sentry, GitHub, feedback, friction and audits arrive as events. A repeat fingerprint attaches to the existing card instead of creating a new one. A shipped card never reopens. If the problem comes back, it files a new card.
platform.alerts, Fern failures, the health sweep, friction.py (307 open) and Linear specs all feed one board.Audits post a report, not a Slack message
A report with nothing to fix is recorded quietly and sends no push. One that finds work files cards that link back to it. The same source and key never files a duplicate.
A job that makes CI faster without dropping any check
Every Monday it reads 7 days of Actions runs. Safe wins (caching, cancelling superseded runs, flaky fixes) become work cards. Anything that drops coverage becomes a Needs-you card with the numbers attached.
Bot reviews are blockers until resolved
Findings from Devin, Bugbot and Seer are each marked invalid, valid or unsure. Invalid ones get a short reply. Valid and unsure stay blockers until a fixing commit or a stated wontfix is cited. "Unsure" is never dismissed on wording alone.
Delete rules that software can enforce
One Devin PR converted 23 written rules: 17 became lint rules, tests or types, and 6 were deleted as stale. A drift-guards test replaced eight "keep in sync" comments, and it found one that had already drifted.
Every PR states which primitives it touches
A classifier compares the diff to primitives.yaml. If it only wires existing pieces, risk is low. If it extends one, risk is medium and needs local proof. If it adds a primitive, risk is high: update the map and list the ADRs. The result goes in a mermaid block in the PR body.
A 20-line AGENTS.md that a PR cannot raise
The cap runs from main via pull_request_target, so a PR cannot loosen it. Principles are one page each, loaded only when needed.
Model-check the risky state machines
A skill finds implicit lifecycles (leases, claims, retries), models them in TLA+, checks every possible step ordering, and files a card for each confirmed bug. It must see each check fail before trusting it.
"Copy prompt for your agent" on every error page
Any error a person sees but their agent cannot gets a button that copies a redacted prompt they can paste into their agent. A check fails CI when a new error page is not classified.
Agents with identities, watching cards
Cole, Pam and Patch each have a role. Claiming a card subscribes the agent to it. Every comment shows its author with an Agent or Automation badge, and a person's comment wakes exactly one agent.
claude -p loops get stable names and roles.4. Olly today vs Kody Olly
The execution half is strong: our merge, deploy and verify pipeline goes further than Kody's on verification. What we lack is the intake and work-tracking half, meaning a single board that turns every signal into a card and sends it to an agent.
| Stage | Kody | Olly on olly-dev today | Status |
|---|---|---|---|
| Intake | Every source is an event that becomes a card on one board | Sources exist but are scattered: Slack bridge, Ollyverse alerts, Fern, health sweep, friction issues in eddy, Linear specs | Partial |
| Triage | A bot per card; decision ladder; Needs-you column | Done by hand (daily-planning / Eddy skill) | Missing |
| Dispatch | Sweep job asks a runner package for one session per card; shadow mode, kill switch | Only olly-friction-fix (one item a day). No general dispatcher | Partial |
| Runner | Devin and Cursor cloud agents | claude -p on olly-dev, replicas (replica up), opencode / Olly-PA | Have |
| PR verification | Preview stack per PR, validate, ui:verify, bot reviews | prequeue.sh, a Verify e2e run on a leased pool replica with merged main deployed, Fern evidence. Stronger than Kody on backend proof | Have |
| Ship / merge | ship-pr tick, review-bot sort, risk-based auto-merge | olly-merge-queue every 2 min plus throughput-manager every 5 min, which fixes blocked PRs on its own | Have |
| Deploy | CI-only deploy, multi-region probes | Merge queue runs Deploy: lines; throughput manager fixes deploy drift | Have |
| Record | Outcome, PR and flow metrics on the card | Evidence comment on the GitHub issue; Fern run link. No cycle-time or stall metrics | Partial |
| Friction loop | Friction becomes cards; nightly triage | friction.py plus a daily fix of one item. 307 open vs 51 closed, so intake far outpaces fixing | Partial |
| Skill telemetry | Uber-style per-skill usage | olly-skill-usage nightly, which files friction for weak skills | Have |
| Agent context | 20-line AGENTS.md, enforced in CI | ~500-line CLAUDE.md, 234-line MEMORY.md, no cap | Missing |
| Decisions | Structured questions; answers become ADR drafts | decision-records skills, D-NN register in GitHub (by hand) | Partial |
| Attribution | Bots author PRs under their own names | Agent PRs are opened as ChakshuGautam (198 of 200), so you cannot see how much agents ship | Missing |
5. Our factory Olly
The same loop built from parts we already run. Dashed boxes are new. Everything else exists on olly-dev and gets wired in.
Signals → cards
Slack DMs and feedback, platform.alerts, Fern failures, health sweep, friction, Linear specs, Sentry, GitHub issues
Triage bot
Small-model claude -p: decision ladder, priority, service and journey tags. Owner calls go to Needs you
Sweep
Extends throughput-manager: shadow mode, kill switch, per-service allowlist, WIP limit
Agent on a replica
claude -p per card in an isolated replica. Test written first, red then green
prequeue + Verify
Existing gate plus a review-bot sort and a primitives risk recap
Merge queue
Deploy, then Verify on the pool. Low or medium risk merges itself; high risk goes to Needs you
Card + Fern evidence
Closes card:…, Fern run, flow metrics, push to the owner on ship
↺ Red main or a failed Verify goes back to the agent that caused it. Leftover friction and weekly reports file new cards. Nothing reaches a person unless it carries an ask.
loops/run.sh: find work with a script first, call a model only when there is work) plus the throughput manager.6. The board Mock
What Chakshu or Anoop opens in the morning. Illustrative cards built from real current work. The left column is the only place that asks for a person.
Needs you3
New5
Planned4
In progress6
Agent review2
Shippedtoday 9
7. Build plan
Each phase is useful on its own and reuses existing parts. Shadow mode stays on until the sweep's choices match what we would have picked.
Phase 0 this week
- Cards table + event log in Postgres; Ollyverse board read-only
- Import friction issues, Fern failures and platform.alerts as cards (backfill script)
- Agents open PRs as an olly-bot account so agent throughput is visible
Closes card:…handled by the merge queue's existingFixes #Npath
Phase 1 next week
- Triage bot with the decision ladder; Needs-you page with questions and answers
- Sweep inside throughput-manager in shadow mode: logs what it would start
- Reports replace Slack posts for health sweep, skill usage, secwatch
- Push and DM only for Needs you and shipped
Phase 2 then
- Shadow off for one pilot service; WIP limit 3; one card, one replica, one PR
- Review-bot sort + primitives risk recap as merge-queue checks
- Flow metrics: throughput, cycle time, stalls per service
- Weekly CI review job
Phase 3 hardening
- CLAUDE.md to a capped index plus principle pages; prose-to-lint pass
- TLA+ models for replica pool leases and the merge queue
- "Copy prompt for your agent" on member app and Ollyverse errors
- Named agents with roles and card watching