The Olly software factory

What Kody built to let agents ship most of its code, what we already run on olly-dev, and what our factory looks like once the two are joined.

Prepared 5 Dec 2026 · Sources: github.com/kody-hq/kody at 867e97a, the public @kody/kody-factory package README, olly-dev systemd units, OllyInsurance GitHub

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.

~40/dayPRs merged (28 to 45 a day, 30 Nov to 4 Dec)
93%of the last 200 merged PRs were opened by bots (Devin 126, kody-bot 60, humans 14)
~5,900PRs since the repo started
20 lineshard cap on root AGENTS.md, enforced by CI that a PR cannot edit
109decision records (ADRs) agents read before touching a primitive
238Olly PRs merged in the last 30 days, for comparison (~8/day)
The core idea (their harness-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.

Intake

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.

Triage

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.

Build

Sweep dispatches

A scheduled sweep asks a runner (@kody/devin, Cursor cloud agents) for a session. One card, one session, one PR.

Verify

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

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.

Deploy

CI-only deploy

Production changes only through deploy.yml after main is green, followed by multi-region health probes. Agents never deploy by hand.

Record

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

ControlWhat it does
Shadow modeThe sweep records what it would have started but starts nothing. You switch it off once its choices look right.
Kill switchStops new runs and merges at once.
Pilot scopeEmpty allowlist by default. The factory acts on no project until you name one.
Merge policyThe 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 capAgents 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.

Needs-you queue + decision ladder

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.

For us: replaces the "ping Chakshu in Slack" pattern. Owners: Chakshu for tech, Anoop and Sunny for product. Lives in Ollyverse.
Open questions with a 0.9 bar

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.

For us: plugs straight into our decision-records and decision-review-prep skills, and the D-NN register.
Signals → cards, one board

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.

For us: Slack DM feedback, Ollyverse platform.alerts, Fern failures, the health sweep, friction.py (307 open) and Linear specs all feed one board.
Reports can be quiet

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.

For us: skill-usage, the health sweep, secwatch, CI budget and the disk watch all become reports. Matches our "loops post only on findings" rule.
Weekly CI review

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.

For us: builds on olly-ci-budget and the merge-queue summary we already run.
Review-bot sort

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.

For us: add as a merge-queue block class beside Deploy/Verify.
Turn prose into lint (PR #5927)

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.

For us: run this over CLAUDE.md and the 234-line MEMORY.md. That file is already past its own 200-line limit.
Visual recap + primitives map

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.

For us: the primitives are our services, tables and events. The risk level decides whether ship can auto-merge.
Small agent context, enforced

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.

For us: our root CLAUDE.md is about 500 lines of pre-migration dev-1 notes. Split it into an index plus pages.
TLA+ hunting

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.

For us: the replica pool leases, merge queue, outbox, claims adjudication and the vault.
Error prompt for agents

"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.

For us: member app and Ollyverse error states, sent to Olly-PA.
Named agents on the card

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.

For us: our Slack-bridge workers and 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.

StageKodyOlly on olly-dev todayStatus
IntakeEvery source is an event that becomes a card on one boardSources exist but are scattered: Slack bridge, Ollyverse alerts, Fern, health sweep, friction issues in eddy, Linear specsPartial
TriageA bot per card; decision ladder; Needs-you columnDone by hand (daily-planning / Eddy skill)Missing
DispatchSweep job asks a runner package for one session per card; shadow mode, kill switchOnly olly-friction-fix (one item a day). No general dispatcherPartial
RunnerDevin and Cursor cloud agentsclaude -p on olly-dev, replicas (replica up), opencode / Olly-PAHave
PR verificationPreview stack per PR, validate, ui:verify, bot reviewsprequeue.sh, a Verify e2e run on a leased pool replica with merged main deployed, Fern evidence. Stronger than Kody on backend proofHave
Ship / mergeship-pr tick, review-bot sort, risk-based auto-mergeolly-merge-queue every 2 min plus throughput-manager every 5 min, which fixes blocked PRs on its ownHave
DeployCI-only deploy, multi-region probesMerge queue runs Deploy: lines; throughput manager fixes deploy driftHave
RecordOutcome, PR and flow metrics on the cardEvidence comment on the GitHub issue; Fern run link. No cycle-time or stall metricsPartial
Friction loopFriction becomes cards; nightly triagefriction.py plus a daily fix of one item. 307 open vs 51 closed, so intake far outpaces fixingPartial
Skill telemetryUber-style per-skill usageolly-skill-usage nightly, which files friction for weak skillsHave
Agent context20-line AGENTS.md, enforced in CI~500-line CLAUDE.md, 234-line MEMORY.md, no capMissing
DecisionsStructured questions; answers become ADR draftsdecision-records skills, D-NN register in GitHub (by hand)Partial
AttributionBots author PRs under their own namesAgent PRs are opened as ChakshuGautam (198 of 200), so you cannot see how much agents shipMissing

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.

Intake

Signals → cards

Slack DMs and feedback, platform.alerts, Fern failures, health sweep, friction, Linear specs, Sentry, GitHub issues

Triage

Triage bot

Small-model claude -p: decision ladder, priority, service and journey tags. Owner calls go to Needs you

Dispatch

Sweep

Extends throughput-manager: shadow mode, kill switch, per-service allowlist, WIP limit

Build

Agent on a replica

claude -p per card in an isolated replica. Test written first, red then green

Verify

prequeue + Verify

Existing gate plus a review-bot sort and a primitives risk recap

Ship

Merge queue

Deploy, then Verify on the pool. Low or medium risk merges itself; high risk goes to Needs you

Record

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.

Where it lives: the board is a new Ollyverse page (Keycloak, RBAC tiers already exist), backed by one Postgres table plus an event log. Cards hold the GitHub issue link. They do not replace issues. The engine is eddy's loop kernel (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.

Ollyverse · Factory
Shadow mode: onKill switch: offPilot: claims, care, balanceWIP 6 / 8Cycle time p50 5.2h
Needs you3
Diagnostics (Thriva): own service or inside care?
architectureChakshu
Q: 2 options · Rec: own service (0.72)
Prevention onboarding: skip the wearable step for non-Sahha users?
product callAnoop
Q: 3 options · blocks 2 cards
CI review: drop Windows lane from app CI (saves 41 min/day)
coverage tradereport
Move to New to approve
New5
identity crash-loops in pii_vault lane after stand-up
friction #407×2identity
Fern: claims prior-auth handover test flaky at same commit
fernclaims
Slack: "timeline shows wrong GP date" (Sunny)
feedbackmember app
Planned4
Replica first prime fails on compose; retry passes
friction #390replica
Spec ENG-707 AC-3: prevention plan persists across logins
linearbalance
In progress6
Pool lease --wait dies at 2h tool cap
Patchreplica r-1241m
Red on base: test written, failing ✓
Balance movement: dedupe Sahha webhook replays
ColePR #26112h
Agent review2
Merge queue: Verify matched no test (dep on #2604)
blocked on PRno push
Skill usage: triage-test-writer 0 runs in 30d, retire?
report
Shippedtoday 9
Eligibility poison pill: skip and DLQ bad offsets
PR #2598deployed
Verify ✓ · Fern run 8812 · 3.1h
Stale coverage registry import
throughput-mgr
Fern import fresh ✓

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 existing Fixes #N path

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
What we gain: Kody gets about 40 merged PRs a day out of one person's attention because every signal becomes a card an agent can take, and only real decisions reach a person. We already have the harder half, autonomous verify, merge and deploy. The board and dispatcher are the missing half.