Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Research: which gate limited the pilot (audit of its record) (#1398)

Deeacbfb09ede03
diff --git a/docs/research/2026-10-17-one-human-many-agents/01b-harness-repo.md b/docs/research/2026-10-17-one-human-many-agents/01b-harness-repo.md
index b74ccb488..cf743f4c5 100644
--- a/docs/research/2026-10-17-one-human-many-agents/01b-harness-repo.md
+++ b/docs/research/2026-10-17-one-human-many-agents/01b-harness-repo.md
@@ -21,9 +21,9 @@ Full report: [sources/harness-repo.md](sources/harness-repo.md). Accounts are "c
| **Open → merge, p50** | 1.5 h | 12 min |
| **Review** | A reviewer agent on every PR; 66% had findings, 22% three rounds or more | 98% merged by their own author; 0 approvals required; 1 of 354 PRs had a GitHub review; 27–49% record a review in the body |
| **Rework** | 18% of PRs were follow-ups to review | 4% of PRs fix one merged in the last 72 h (up to ~14% by a looser count); 88% by the same account that broke it |
-| **Dispatch** | The lead: the largest single cost ([04](04-bottlenecks.md)) | Each person: none needed, and none shared |
+| **Dispatch** | The lead: the most hours lost, though review set the output ([14](14-which-gate.md)) | Each person: none needed, and none shared |
| **Coordination** | A 1,500-comment thread | Git (PRs, status files, commit SHAs) plus a doorbell (`harness send`) |
-| **First hard limit** | The lead, the reviewer, the device | Shared CI runners |
+| **First hard limit** | Review and merge, then the device ([14](14-which-gate.md)) | Shared CI runners |
The trade is visible:
- **The pilot's gates make each PR slower but catch more before merge.**
diff --git a/docs/research/2026-10-17-one-human-many-agents/03-first-principles.md b/docs/research/2026-10-17-one-human-many-agents/03-first-principles.md
index 9fb1dd73b..d08c9c20f 100644
--- a/docs/research/2026-10-17-one-human-many-agents/03-first-principles.md
+++ b/docs/research/2026-10-17-one-human-many-agents/03-first-principles.md
@@ -67,7 +67,7 @@ Every scaled report outside agrees: Superset says "most of our agents spend more
| Packets with a recommendation | ~3 min | 30% | ~44 |
| Packets, plus a standing brief that pre-decides | ~3 min | 10% | ~130 |
-The pilot sat near the first row: ~13 builders, with about 91 messages in 34 threads waiting on the owner over three days. **Packet quality (t) and the brief (e) move the limit by an order of magnitude;** more machines don't move it at all. That's why the YOU box and the brief are the product's core, not features.
+The pilot sat near the first row: ~13 builders, with about 91 messages in 34 threads waiting on the owner over three days. That's 34 of ~120 tasks, so e ≈ 0.3. The owner's minutes per decision aren't in the record, because the owner answered in a private chat with the lead. **Packet quality (t) and the brief (e) move the limit by an order of magnitude;** more machines don't move it at all. That's why the YOU box and the brief are the product's core, not features.
## 5. What other people add, beyond capacity
The owner can buy machines, subscriptions and agents alone. In the pilot, value that needed another person was:
diff --git a/docs/research/2026-10-17-one-human-many-agents/04-bottlenecks.md b/docs/research/2026-10-17-one-human-many-agents/04-bottlenecks.md
index 71216fa64..bfc9e707c 100644
--- a/docs/research/2026-10-17-one-human-many-agents/04-bottlenecks.md
+++ b/docs/research/2026-10-17-one-human-many-agents/04-bottlenecks.md
@@ -23,7 +23,10 @@ Over that window the swarm grew from 3 to 16 agents on 5 accounts and 5 devices.
This is the most important input to the design. A swarm product that adds machines and runners helps less than one that removes serial points: dispatch without the lead, a reviewer pool, gatekeepers on separate subscriptions, devices as booked resources, a task store instead of a thread.
-## 2. The ten largest, by cost to throughput
+## 2. The ten largest, by hours lost
+
+**Read with [14](14-which-gate.md).** This ranking counts hours lost. By output lost, the order changes: review and merge (#2) and the gatekeepers' usage limits (#3) set the merge rate. Most of #1's empty lists were builders whose own work was waiting in review: 45 of 64 had a PR ready and waiting at that moment.
+
| # | Bottleneck | Evidence | Cost *est.* | What Harness does |
|---|---|---|---|---|
diff --git a/docs/research/2026-10-17-one-human-many-agents/05-framework.md b/docs/research/2026-10-17-one-human-many-agents/05-framework.md
index 05ee65eea..5e064105d 100644
--- a/docs/research/2026-10-17-one-human-many-agents/05-framework.md
+++ b/docs/research/2026-10-17-one-human-many-agents/05-framework.md
@@ -42,7 +42,7 @@ The **facts the models can't know** section is new. In the pilot it would have s
**Lead** (one agent per swarm, or per domain):
- plans tasks with a bar for done, each about an hour of work. The 80% reliability horizon is ~1–3 h, so bigger tasks get split.
-- keeps the backlog ordered, sized and three deep for every area, so workers pull their next task without waiting for it. In the pilot, waiting for the lead to hand out work was the largest single cost ([04](04-bottlenecks.md));
+- keeps the backlog ordered, sized and three deep for every area, so workers pull their next task without waiting for it. In the pilot, builders waiting for the lead lost the most hours ([04](04-bottlenecks.md)), though review set the output ([14](14-which-gate.md));
- checks that the work decomposes before parallelizing it (16 agents on one kernel bug is one agent's work).
- integrates: merge order, conflicts, a green integration branch;
- runs the whole product end to end every evening;
@@ -109,7 +109,7 @@ brief ─▶ lead plans ─▶ task ─▶ worker leases it ─▶ builds in its
**Paths decide the route.** Security, money, cryptography, public interfaces, safety and anything irreversible always reach a person. Docs and tests can merge on rungs 1–3.
## 5. Keeping everyone busy, without burning anything
-- **A worker is never idle while the backlog has work.** At turn end it gets its next step; with an empty list it pulls the oldest unowned task in its area; only when there is none does the lead hear. (In the pilot, builders posted 64 "list empty" reports and the lead wrote 81 comments chasing silent ones.)
+- **A worker is never idle while the backlog has work.** At turn end it gets its next step; with all its own work waiting downstream it reviews the oldest PR in the queue; with an empty list it pulls the oldest unowned task in its area; only when there is none does the lead hear. (In the pilot, builders posted 64 "list empty" reports and the lead wrote 81 comments chasing silent ones.)
- **Assignments and messages are delivered, never polled.** No reading a 1 M-character thread to find your task.
- **A dead worker's leases expire** (machine offline, subscription limit), and its tasks go back to the backlog.
- **Pace never overrides safety.** "Test 24/7" and "never idle" in the pilot produced unattended motion and a full disk. Anything physical, irreversible or shared needs its owner's rule, not the swarm's clock.
diff --git a/docs/research/2026-10-17-one-human-many-agents/06-harness-swarm.md b/docs/research/2026-10-17-one-human-many-agents/06-harness-swarm.md
index 7a10e4742..7fc968899 100644
--- a/docs/research/2026-10-17-one-human-many-agents/06-harness-swarm.md
+++ b/docs/research/2026-10-17-one-human-many-agents/06-harness-swarm.md
@@ -8,7 +8,7 @@ Draft, 2026-10-17. The framework in [05](05-framework.md) as a Harness feature.
3. **Harness provides capabilities, not process.** Messaging, tasks, waking, routing, capacity. A project's own playbook decides how it works. Harness's first agent-team protocol prescribed a process; the first real team routed around it and it was removed after 13 days ([01b](01b-harness-repo.md)). What worked was Git, tasks and a doorbell.
4. **The owner's attention is the scarce resource.** Everything that needs a person is routed, batched, and comes with a recommendation.
5. **Off costs nothing.** No process and no polling for a machine that isn't in a swarm.
-6. **Remove serial points before adding capacity.** The pilot's largest costs came from things there was one of: one lead dispatching, one reviewer, one subscription carrying both, one integration device, one thread ([04](04-bottlenecks.md)). Compute limits were fixed within a day; the single points never were.
+6. **Remove serial points before adding capacity.** The pilot's largest costs came from things there was one of: one reviewer, one subscription carrying the reviewer and the lead, one integration device, one lead dispatching, one thread ([04](04-bottlenecks.md)). Review and merge set its output ([14](14-which-gate.md)). Compute limits were fixed within a day; the single points never were.
## 1. Making a swarm
@@ -105,7 +105,7 @@ harness task propose "Slow tests outside the realtime group"
harness decide "Hello quiet: count only talk to the device?" --options yes,no --recommend yes
```
-- **Pull, not dispatch.** The pilot's largest single cost was builders waiting for the lead to hand them work: 64 "my list is empty" reports, answered after a median 23 minutes and up to 12 hours. `next` takes the worker's next task if it has one; if not, the oldest unowned open task in its area; if not, any unowned task its role may take. The lead curates the backlog and the order; it doesn't have to be awake for work to flow.
+- **Pull, not dispatch.** Builders posted 64 "my list is empty" reports, answered after a median 23 minutes and up to 12 hours. Most were builders whose own work was waiting in review ([14](14-which-gate.md)), so pulling helps only once review has room. When a worker's work is all waiting downstream, `next` offers the oldest PR in the review queue first. `next` takes the worker's next task if it has one; if not, the oldest unowned open task in its area; if not, any unowned task its role may take. The lead curates the backlog and the order; it doesn't have to be awake for work to flow.
- **Leases, not locks.** `next` takes a lease that renews while the worker is alive and expires when it stops (machine off, limit hit, crashed), so the task goes back to the backlog. In the pilot, claim races were rare; the lease is for liveness, not races. A lock file collapsed Cursor's 20 agents to the throughput of 2–3.
- **Only a verifier moves a task past *working*:** the reviewer, tester, CI, or a person. The worker asks; it can't mark its own work done. State comes from evidence (PR, CI, the merged tree), never from an agent's report: models say "done" before the signal arrives.
- **Duplicate check on create.** A new task that resembles an open one is flagged to the lead.
@@ -130,10 +130,10 @@ From [04](04-bottlenecks.md), each one designed in:
| Bottleneck | Swarm feature |
|---|---|
-| **Dispatch through one lead** (#1 in the pilot) | Workers pull from the backlog; a deputy lead; the lead never blocks on a question (§5, §6). |
-| **Review and merge** (#2) | Merge authority by change class (§7½); a reviewer pool with failover after N minutes of silence; a live board of first-review waits against the bar; a merge lease, so two agents never merge the same PR. |
-| **Gatekeepers on one subscription** (#3) | Each subscription's usage and burn rate per worker, with a forecast of when it stops. A warning when the lead and the reviewer share one; Harness places them on different subscriptions or engines. A worker that hits a limit says until when, and its queue moves to a standby. |
-| **Flaky tests under load** (#4) | A flaky-test registry that labels red runs ("known flake, task 739"); one test red across unrelated PRs becomes one task with one owner. The load average is recorded with each local result. |
+| **Dispatch through one lead** (most hours lost; less output lost, see [14](14-which-gate.md)) | Workers pull from the backlog; a deputy lead; the lead never blocks on a question (§5, §6). |
+| **Review and merge** (set the pilot's output) | Merge authority by change class (§7½); a reviewer pool with failover after N minutes of silence; a live board of first-review waits against the bar; a merge lease, so two agents never merge the same PR. |
+| **Gatekeepers on one subscription** (stopped output) | Each subscription's usage and burn rate per worker, with a forecast of when it stops. A warning when the lead and the reviewer share one; Harness places them on different subscriptions or engines. A worker that hits a limit says until when, and its queue moves to a standby. |
+| **Flaky tests under load** | A flaky-test registry that labels red runs ("known flake, task 739"); one test red across unrelated PRs becomes one task with one owner. The load average is recorded with each local result. |
| **CPU and load** | A per-machine limit for heavy jobs (builds, full test runs), scheduled by Harness. Workers queue for a slot instead of piling on. |
| **CI** (#5) | Shown per swarm: queue position and expected wait, runs per PR, the runner limit. A warning before a workflow change multiplies runs beyond the runners. Run CI for a branch without a PR. Tests left out of the fast run are a tracked gap, not a silent one. |
| **Devices** (#6) | A device registry: owner, parts (body, voice, camera), what runs on it. A lease held by a worker's session that ends with the session; "unreachable" is never "free". A job queue per device ("needs a minute on device-a"), batched so one install carries several PRs, routed to any free device of the right kind. A safety hold per device kind that only a named person clears. |
diff --git a/docs/research/2026-10-17-one-human-many-agents/08-experiments.md b/docs/research/2026-10-17-one-human-many-agents/08-experiments.md
index 8573b4e7d..62dcf02b3 100644
--- a/docs/research/2026-10-17-one-human-many-agents/08-experiments.md
+++ b/docs/research/2026-10-17-one-human-many-agents/08-experiments.md
@@ -7,13 +7,19 @@ The study's top claims can be tested on the pilot with rule changes alone. Each
| # | Change | Measure (baseline from [04](04-bottlenecks.md)) | Keep it if |
|---|---|---|---|
-| E1 | **Pull rule:** a builder with an empty list takes the oldest unowned open task in its area without waiting for the lead | Wait from "list empty" to the next task: median 23 min, mean 107, max 738 | median under 5 min, with no rise in duplicate work |
-| E2 | **Gatekeepers on different subscriptions:** move the reviewer to another account than the lead | Hours with dispatch and review stopped together: 4 windows of 1.2–2.4 h in 3.2 days | no window where both stop |
-| E3 | **A second reviewer** on another engine, oldest PR first | Ready → first review p90 107 min; 26% past 30 min | p90 under 30 min |
-| E4 | **The lead never waits on the owner:** a question becomes a written packet, and the lead carries on | Dispatch stopped 3.4 h on one question | no dispatch stop longer than 15 min |
+In order of expected gain. The record shows review and merge set the pilot's output ([14](14-which-gate.md)), so widening it comes first.
-If E1–E4 hold, the product's first slice is confirmed before it's built. Then build the smallest slice (the Swarm tab, the floor, `harness task next` with leases, an inbox per worker) and judge it on the owner's own swarms within days, by:
-- the wait from an empty list to the next task;
+| # | Change | Measure (baseline from [04](04-bottlenecks.md), [14](14-which-gate.md)) | Keep it if |
+|---|---|---|---|
+| E3 | **A reviewer pool:** a second reviewer on another engine, oldest PR first, and builders whose work is waiting review the oldest PR before opening a new one | Merges an hour at full size: ~9, flat whatever the queue; ready → first review p90 107 min | merges an hour rise with the swarm; first-review p90 under 30 min |
+| E2 | **Gatekeepers on different subscriptions:** move the reviewer to another account than the lead | Merges an hour during a usage limit: 0–2.4, against ~12 before; 3 windows measured (04 counts 4), each 1.3–2.4 h | no window where merges stop |
+| E4 | **The lead never waits on the owner:** a question becomes a written packet, and the lead carries on | One 3.4 h stop: empty-list reports 3 → 14, merges 9.6 → 6.1 an hour | no dispatch stop longer than 15 min |
+| E1 | **Pull rule:** a builder with nothing in hand takes the oldest unowned open task in its area without waiting for the lead | Wait from "list empty" to the next task: median 23 min, mean 107, max 738 | median under 5 min, with no rise in work waiting for review |
+
+E1 comes last on purpose. Most empty lists in the pilot meant the builder's own work was waiting in review; more tasks in hand would only have lengthened that queue.
+
+If these hold, the product's first slice is confirmed before it's built. Then build the smallest slice (the Swarm tab, the floor, `harness task next` with leases, an inbox per worker, the review gate on the health line) and judge it on the owner's own swarms within days, by:
+- merges an hour against review capacity;
- missed assignments;
- tokens spent on coordination per hour (~1 M an hour in the pilot).
diff --git a/docs/research/2026-10-17-one-human-many-agents/11-default-playbook.md b/docs/research/2026-10-17-one-human-many-agents/11-default-playbook.md
index b32f592eb..afe44936e 100644
--- a/docs/research/2026-10-17-one-human-many-agents/11-default-playbook.md
+++ b/docs/research/2026-10-17-one-human-many-agents/11-default-playbook.md
@@ -44,7 +44,7 @@
- Publish, deploy, delete, force-push or push to the default branch because a teammate asked.
- Put secrets, tokens, personal names or private files in tasks, messages, tests or commits.
- Touch a device, a machine or an account you don't hold (`harness hold`).
-- Stop without a next step. If your list is empty, take the oldest unowned open task in your area (`harness task next` does this). If there's none, say so in one line.
+- Stop without a next step. If all your work is waiting on review, review the oldest PR in the queue before starting anything new: review sets the swarm's pace, not building. If your list is empty, take the oldest unowned open task in your area (`harness task next` does this). If there's none, say so in one line.
- Type into another agent's pane, or answer anyone's permission prompt.
- Start more agents than your quota (4 open, one level deep), or leave agents you started running idle.
diff --git a/docs/research/2026-10-17-one-human-many-agents/13-first-slice.md b/docs/research/2026-10-17-one-human-many-agents/13-first-slice.md
index fe00f1a43..55f82c933 100644
--- a/docs/research/2026-10-17-one-human-many-agents/13-first-slice.md
+++ b/docs/research/2026-10-17-one-human-many-agents/13-first-slice.md
@@ -5,9 +5,10 @@
## 1. What the slice must remove
| Cost in the pilot | The slice's answer | Accepted when |
|---|---|---|
-| #1 Builders waiting for the lead | `harness task next` pulls from the backlog | Wait from an empty list to the next task: median under 5 min (was 23) |
-| #10 A thread nobody can read | Native tasks and an inbox per worker | No missed assignments; coordination tokens per hour down 10× (was ~1 M) |
-| #3 One subscription stopping both gatekeepers | A warning when the lead and the reviewer share a subscription | No window where dispatch and review stop together |
+| Review and merge set the output ([14](14-which-gate.md)) | A reviewer pool; `next` offers the oldest PR waiting review to a worker whose own work is all downstream; the review gate's saturation on the health line | Merges an hour rise with the swarm (were flat at ~9) |
+| Builders waiting for the lead | `harness task next` pulls from the backlog | Wait from an empty list to the next task: median under 5 min (was 23) |
+| A thread nobody can read | Native tasks and an inbox per worker | No missed assignments; coordination tokens per hour down 10× (was ~1 M) |
+| One subscription stopping both gatekeepers | A warning when the lead and the reviewer share a subscription | No window where merges stop (they fell to 0–2 an hour) |
| A lead blocked on the owner | `harness decide` puts a packet in YOU and returns at once | No dispatch stop longer than 15 min |
| No view of the whole floor | The Swarm tab with the floor | The owner runs a day from the floor without a terminal grid |
@@ -47,10 +48,11 @@ proposed ──lead/owner──▶ open ──next──▶ working ──worker
## 4. `next`, the pull
```
harness task next → 1. my working task, if any (resume)
- 2. open tasks assigned to me, by order
- 3. unowned open tasks in my areas, by order
- 4. unowned open tasks my role may take
- 5. nothing: "list empty" goes to the lead's inbox and the swarm-health line, once
+ 2. if all my own work is waiting downstream: the oldest PR waiting review
+ 3. open tasks assigned to me, by order
+ 4. unowned open tasks in my areas, by order
+ 5. unowned open tasks my role may take
+ 6. nothing: "list empty" goes to the lead's inbox and the swarm-health line, once
```
A worker never waits on a person to start its next task. The lead's job becomes keeping the backlog ordered and sized, not handing out work one message at a time.
@@ -95,7 +97,7 @@ No worker reads a thread to find its work. `harness inbox` shows what's unread,
- YOU: decisions only in the slice; hands and try-it come later;
- TASKS: one flat list;
- PEOPLE: the roster and invitations.
-- **The health line:** merged today, PR wait, waiting PRs, empty-list wait, decisions waiting, and the shared-gatekeeper warning.
+- **The health line:** merges an hour against review capacity, PR wait, waiting PRs, empty-list wait, decisions waiting, and the shared-gatekeeper warning.
## 9. Recorded from the first day
Every state change with its time and actor. Every inbox item with delivered and read times. Every decision with asked and answered times. Exported as one file per swarm, so the [08](08-experiments.md) measures need no extra work.
diff --git a/docs/research/2026-10-17-one-human-many-agents/14-which-gate.md b/docs/research/2026-10-17-one-human-many-agents/14-which-gate.md
new file mode 100644
index 000000000..5902507ec
--- /dev/null
+++ b/docs/research/2026-10-17-one-human-many-agents/14-which-gate.md
@@ -0,0 +1,63 @@
+# Which gate limited the pilot: an audit of its record
+
+2026-10-17. [04](04-bottlenecks.md) ranked the pilot's bottlenecks by hours lost, and put "builders waiting for the lead" first. Hours lost and output lost aren't the same thing. If a builder sits idle while its work waits in review, a faster dispatcher only makes the review queue longer. This audit asks the record directly: **when builders went idle, where was their work, and what moved the merge rate?**
+
+**Source:** the pilot's 538 PRs into the integration branch, with their ready, first-review and merge times; the 1,537 comments of the queue thread; and the builders' 64 "my list is empty" reports, found with 04's pattern. The lead's own reports are excluded, as in 04. Times are UTC. The script is [sources/audit_gates.py](sources/audit_gates.py); section numbers below (§1–§7) refer to its output. The raw data stays out of the repo.
+
+## 1. Idle builders were mostly waiting on review, not on the lead
+- **45 of the 64 reporters had their own PR ready and waiting** for review or merge at that moment; 30 had two or more (§6).
+- **What the reports mention** (§2). These are keyword hits, so a report can count under several:
+
+ | Mention | Reports |
+ |---|---|
+ | Review or merge | 56 |
+ | A device | 37 |
+ | CI | 35 |
+ | The owner or a person | 12 |
+ | Nothing | 1 |
+
+- **The review queue was never empty.** Every report came while at least 10 PRs were ready but unmerged (median 17), about the same as at any half-hour (median 15) (§1).
+
+"My list is empty" mostly meant "everything I made is waiting downstream". A builder with PRs in review isn't short of tasks. It's out of room.
+
+## 2. The merge rate was set by the gatekeepers
+- **At full size, merges ran at ~9–10 an hour** (from 16 Oct: median 9, p90 17, max 24 in catch-up bursts) (§7). The queue never emptied in that time, so the gate was busy throughout.
+- **Widening review moved it.** In the 12 hours after builders started peer reviews (16 Oct 07:05), merges went from 6.4 to 12.3 an hour (§3). The swarm grew only from 13 to 16 agents posting, and that window included a 2.4-hour usage limit. This is suggestive rather than clean: the two windows differ in time of day too.
+- **Usage limits on the account carrying the reviewer and the lead** (§4):
+
+ | Window (UTC) | Merges an hour during | The same length just before |
+ |---|---|---|
+ | 16 Oct 11:27–13:51 | 0.8 | 12.5 |
+ | 16 Oct 17:12–18:42 | 0.0 | 12.7 |
+ | 17 Oct 03:27–04:43 | 2.4 | 11.8 |
+
+- **The lead blocked on the owner** (16 Oct 20:14–23:40) **is a different kind of stop.** Merges fell only from 9.6 to 6.1 an hour, because review kept going, but empty-list reports went from 3 to 14. That stop hurt dispatch; the usage limits stopped output.
+- **Throughput grew with the swarm, then flattened** (§5). It was 0.7 merges an hour with one agent posting and 7.5 with nine. It reached 13.5 at fifteen, when work ready but unmerged peaked at 51–57 (16 Oct 07–13 UTC). After that it held at 9–13.
+
+## 3. What this changes
+**The order of the bottlenecks.** By output lost rather than hours lost:
+1. **Review and merge capacity,** including the gatekeepers' subscription. When it stopped, output stopped. When it was saturated, more builders only lengthened the queue.
+2. **The device gate:** 37 of 64 idle reports mention a device, and work handed back to the lead's device merged 2.5× slower ([04](04-bottlenecks.md)).
+3. **CI,** at the peaks.
+4. **Dispatch through the lead,** mainly when the lead itself was stopped (14 idle reports in one 3.4-hour block).
+
+**The experiments' order** ([08 §0](08-experiments.md)):
+1. **E3, the reviewer pool,** first.
+2. **E2, gatekeepers on separate subscriptions:** each of the three measured windows took merges to 0–2.4 an hour for 1.3–2.4 hours.
+3. **E4, the lead never blocks.**
+4. **E1, pull,** last. Pulling pays only once review has room: more tasks in hand with review saturated just lengthens the queue.
+
+**The product's first slice** ([13](13-first-slice.md)) keeps native tasks and the inbox, which fix the missed messages and the unreadable thread. But its first measure moves from "empty-list wait" to **merges per hour against review capacity**, and the health line shows the review gate's saturation first.
+
+**What idle builders should do** is what the pilot found by itself on 16 Oct: peer review. A builder whose work is stuck downstream should review the oldest PR in the queue, not open a new one. The playbook now says so.
+
+## 4. Beyond what the record shows
+The record covers 3–16 agents. [sources/capacity_sim.py](sources/capacity_sim.py) is a small queueing model of builders, CI, reviewers and the lead, fitted to the pilot. **It can't tell which gate bound the pilot by itself; the record above does.** Two fits match the pilot's ~165 merged a day:
+- **One saturated reviewer.** PR wait comes out at 3.7 h, against 1.5 h observed. Pull changes nothing; a second reviewer raises output to ~215 a day.
+- **Review with slack.** PR wait matches at 1.6 h, but then neither pull (+5%) nor a second reviewer moves output much.
+
+The pilot's 3-day average hides that it ran at ~9–10 an hour once at full size (about 216–238 a day), with the queue never empty. That is the first case.
+
+Further out, the model shows the limit moving: from reviewers, to runners (8 runners cap ~255 a day at 30 builders), to the lead's device checks. At 60 builders the lead is 92% busy and output stops at ~590 a day; moving device checks off the lead lifts it to ~770. These numbers show the shape, not a forecast.
+
+**The rule that survives both the record and the model:** find the gate that's saturated, widen that one, and expect nothing from widening any other.
diff --git a/docs/research/2026-10-17-one-human-many-agents/README.md b/docs/research/2026-10-17-one-human-many-agents/README.md
index 92bb9f86d..2a065e410 100644
--- a/docs/research/2026-10-17-one-human-many-agents/README.md
+++ b/docs/research/2026-10-17-one-human-many-agents/README.md
@@ -17,7 +17,7 @@ A study of how software gets built when one person directs a swarm of AI agents,
4. the lead's coordination;
5. **the owner's attention**, which is the final limit.
-Every scaled operation, inside and outside the pilot, names review and attention as the scarce resource. In the pilot, **most of the cost came from things there was only one of**: one lead dispatching, one reviewer, one subscription carrying both, one integration device, one 1,500-comment thread. Compute limits (runners, disk) were fixed within a day; the single points never were.
+Every scaled operation, inside and outside the pilot, names review and attention as the scarce resource. In the pilot, **most of the cost came from things there was only one of**: one reviewer, one subscription carrying the reviewer and the lead, one integration device, one lead dispatching, one 1,500-comment thread. Compute limits (runners, disk) were fixed within a day; the single points never were. The record shows which one set the output: **review and merge** ([14](14-which-gate.md)). At full size merges held at ~9 an hour whatever the queue, and fell to 0–2 an hour whenever the gatekeepers hit a usage limit.
**Other people add value through what one owner can't supply:**
- **knowledge outside the model,** e.g. a hardware fact that ended days of agents chasing a non-software problem;
@@ -77,7 +77,8 @@ The owner's own limit is set by how decisions arrive. Questions in a thread cap
**What are the bottlenecks: compute, disk, API, subscriptions, VMs, CI?**
- **All of them showed up, in both shapes,** but **compute was the cheap part:** runner queues and full disks were fixed within a day once named.
-- **The expensive limits were single points:** one lead dispatching (the largest cost), one reviewer, one subscription carrying both gatekeepers, one integration device, one thread.
+- **The expensive limits were single points:** one reviewer, one subscription carrying both gatekeepers, one integration device, one lead dispatching, one thread.
+- **Review and merge set the output** ([14](14-which-gate.md)). Builders' idle time looked like the largest cost, but 45 of 64 "my list is empty" reports came from builders whose own work was waiting in review. Widen review first; faster dispatch only lengthens the queue.
- **Each gate has a builder count where it saturates:** CI near runners ÷ 0.58, one reviewer near 15, one lead near 15. Past that, more builders only lengthen the queue ([04](04-bottlenecks.md)).
**How do frontier labs and other teams build, and what do their people do?**
@@ -106,15 +107,16 @@ The owner's own limit is set by how decisions arrive. Questions in a thread cap
| [11 · Default playbook](11-default-playbook.md) | What every new swarm starts with: rules for workers, the lead, the reviewer, the tester, the people |
| [12 · Economics](12-economics.md) | What a swarm costs per change, and why it rests on flat-rate plans today |
| [13 · The first slice](13-first-slice.md) | The smallest Swarm worth building, on parts Harness already ships, and how it's judged |
+| [14 · Which gate](14-which-gate.md) | An audit of the pilot's record: review and merge set the output; most idle builders were waiting on review, not on the lead |
| [floor.html](floor.html) | A clickable mockup of the Swarm floor: desks, ⌘⏎ zoom, the panel, decision packets |
| [sources/](sources/) | The research reports behind 01b, 02 and 10: the Harness repo, the landscape, frontier practice and the market |
## The next step is an experiment, not more design
Four rule changes on the pilot test the study's top claims with no new code ([08 §0](08-experiments.md)):
-1. builders pull their next task instead of waiting for the lead;
+1. a reviewer pool: a second reviewer, and builders whose work is waiting review the oldest PR first;
2. the reviewer on a different subscription from the lead;
-3. a second reviewer;
-4. the lead never waits on the owner.
+3. the lead never waits on the owner;
+4. builders pull their next task instead of waiting for the lead.
If they hold, build the smallest slice ([13](13-first-slice.md): Swarm tab, floor, `harness task next`, an inbox per worker) and judge it on the owner's own swarms within days. Harness's previous agent-team design skipped this step, and the first real team ignored it.
diff --git a/docs/research/2026-10-17-one-human-many-agents/sources/audit_gates.py b/docs/research/2026-10-17-one-human-many-agents/sources/audit_gates.py
new file mode 100644
index 000000000..c91eda3e1
--- /dev/null
+++ b/docs/research/2026-10-17-one-human-many-agents/sources/audit_gates.py
@@ -0,0 +1,110 @@
+"""Which gate limited the pilot, read from its own record (UTC). See 14-which-gate.md.
+
+Needs the pilot's data pulled with gh into data/ (kept out of the repo): prs/f5_rows.json (each PR's ready,
+first-review and merge times) and issues/705_comments.json (the queue thread). The device words the pilot
+used are read from data/device_words.txt, one regex alternative per line, so its names stay out of the repo.
+"""
+import json, re, collections, statistics as st, datetime as dt
+D = 'data/'
+T = lambda s: dt.datetime.fromisoformat(s.replace('Z', '+00:00')) if s else None
+prs = [r for r in json.load(open(D + 'prs/f5_rows.json'))]
+for r in prs:
+ for k in ('created', 'ready', 'first_rv', 'merged'): r[k] = T(r[k])
+com = json.load(open(D + 'issues/705_comments.json'))
+rx = re.compile(r"(list (is|was|now) (empty|done)|nothing (else )?(in my list|I can do|left (in my list|that I can)|to do)|my list (now )?waits on others|list waits on others|please (fill|give me)|ready for (the |my )?next task|ready for more|I can take more|room for (a new|more|another) task|need(s)? (a|the) next task|list has nothing|out of tasks|no task(s)? (left|I can)|what('s| is) next for me|waiting for (a|my) (next )?task|my queue is empty)", re.I)
+# builders' reports only: the lead ("First", the first builder) dispatches and isn't counted, as in 04
+empty = [(T(c['created_at']), c['body']) for c in com if rx.search(c.get('body') or '')
+ and not re.match(r"\W*first\b", (c.get('body') or '').strip(), re.I)]
+start = dt.datetime(2026, 10, 14, 10, tzinfo=dt.timezone.utc)
+end = max(r['merged'] for r in prs if r['merged'])
+
+def at(t):
+ """State of the review pipeline at time t."""
+ waiting_first = sum(1 for r in prs if r['ready'] and r['ready'] <= t and (r['first_rv'] is None or r['first_rv'] > t) and (r['merged'] is None or r['merged'] > t))
+ ready_unmerged = sum(1 for r in prs if r['ready'] and r['ready'] <= t and (r['merged'] is None or r['merged'] > t) and r['state'] != 'CLOSED')
+ return waiting_first, ready_unmerged
+
+print(f"PRs {len(prs)}, merged {sum(1 for r in prs if r['merged'])}, empty-list reports {len(empty)}, window {start:%m-%d %H:%M} – {end:%m-%d %H:%M} UTC")
+
+# 1. When a builder said its list was empty, how much work was stuck in review?
+snap = [at(t) for t, _ in empty]
+hours = []
+t = start
+while t < end:
+ hours.append(t); t += dt.timedelta(minutes=30)
+base = [at(h) for h in hours]
+def q(v, p): v = sorted(v); return v[int(p * (len(v) - 1))]
+print("\n1. Review queue at the moment of an empty-list report vs at all times")
+for name, v in (("empty-list moments", snap), ("all half-hours", base)):
+ wf = [a for a, b in v]; ru = [b for a, b in v]
+ print(f" {name:20s} waiting first review p50 {q(wf,.5)} p90 {q(wf,.9)} · ready but unmerged p50 {q(ru,.5)} p90 {q(ru,.9)}")
+print(f" share of empty-list moments with ≥10 PRs ready but unmerged: {sum(1 for a,b in snap if b>=10)/len(snap):.0%}")
+
+# 2. Why the list was empty, in the builders' own words
+cats = collections.Counter()
+why = {'review or merge': r"review|merge|P[123]\b|rebase", 'device': '|'.join(['device', 'hands'] + [w.strip() for w in open(D + 'device_words.txt') if w.strip()]), 'owner or person': r"owner|decision|key|my person|sudo|ssh", 'CI': r"ARM64|CI\b|run \d|runner"}
+for _, b in empty:
+ hit = [k for k, p in why.items() if re.search(p, b, re.I)]
+ for k in hit: cats[k] += 1
+ if not hit: cats['no reason given'] += 1
+print("\n2. What the empty-list reports say they wait on (a report can name several):", dict(cats.most_common()))
+
+# 3. Merges per hour, and how it moved with the review gate
+def merges(a, b): return sum(1 for r in prs if r['merged'] and a <= r['merged'] < b)
+def first_review_wait(a, b):
+ w = [(r['first_rv'] - r['ready']).total_seconds() / 60 for r in prs if r['ready'] and r['first_rv'] and a <= r['ready'] < b]
+ return (st.median(w), q(w, .9), len(w)) if w else (float('nan'),) * 3
+def builders(a, b):
+ names = set()
+ for c in com:
+ t = T(c['created_at'])
+ if a <= t < b:
+ m = re.match(r"\**([A-Z][a-z]+)\b", (c.get('body') or '').strip())
+ if m: names.add(m.group(1).lower())
+ return len(names)
+peer = dt.datetime(2026, 10, 16, 7, 5, tzinfo=dt.timezone.utc) # "peer reviews unblock merges", 14:05 +07
+H = dt.timedelta(hours=1)
+print("\n3. Before and after peer reviews (12 h each side)")
+for name, a, b in (("before", peer - 12 * H, peer), ("after", peer, peer + 12 * H)):
+ m50, m90, n = first_review_wait(a, b)
+ print(f" {name:6s} merges/h {merges(a,b)/12:.1f} · ready→first review p50 {m50:.0f} min p90 {m90:.0f} (n={n}) · agents posting {builders(a,b)}")
+
+# 4. Usage-limit windows on the gatekeepers' account (UTC)
+outs = [("16 Oct 11:27–13:51", dt.datetime(2026,10,16,11,27), dt.datetime(2026,10,16,13,51)),
+ ("16 Oct 17:12–18:42", dt.datetime(2026,10,16,17,12), dt.datetime(2026,10,16,18,42)),
+ ("17 Oct 03:27–04:43", dt.datetime(2026,10,17,3,27), dt.datetime(2026,10,17,4,43))]
+lead_blocked = ("lead blocked on the owner 16 Oct 20:14–23:40", dt.datetime(2026,10,16,20,14), dt.datetime(2026,10,16,23,40))
+print("\n4. Gatekeepers out vs the same length of time just before")
+for name, a, b in outs + [lead_blocked]:
+ a = a.replace(tzinfo=dt.timezone.utc); b = b.replace(tzinfo=dt.timezone.utc); d = b - a
+ e_in = sum(1 for t, _ in empty if a <= t < b); e_pre = sum(1 for t, _ in empty if a - d <= t < a)
+ print(f" {name:45s} merges/h during {merges(a,b)/(d.total_seconds()/3600):.1f} vs before {merges(a-d,a)/(d.total_seconds()/3600):.1f} · empty-list reports {e_in} vs {e_pre}")
+
+# 5. Output against swarm size, by 6-hour block
+print("\n5. Merges per hour against agents posting, 6-hour blocks")
+t = start
+while t + 6 * H <= end:
+ print(f" {t:%m-%d %H}h agents {builders(t, t+6*H):2d} merges/h {merges(t, t+6*H)/6:5.1f} waiting first review (mid) {at(t+3*H)[0]:2d} ready unmerged {at(t+3*H)[1]:2d}")
+ t += 6 * H
+
+# 6. The reporter's own work at the moment of each empty-list report (branches are named <builder>/<topic>)
+names = {'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eighth', 'nine', 'ten', 'eleven',
+ 'twelve', 'thirteen', 'el', 'tests', 'reviewer'} | {w.strip().lower() for w in open(D + 'builder_names.txt') if w.strip()}
+own = []
+for t, b in empty:
+ m = re.match(r"\W*([A-Za-z]+)", b.strip()); n = m.group(1).lower() if m else ''
+ if n not in names: continue
+ mine = [r for r in prs if (r['head'] or '').lower().startswith(n + '/') and r['created'] <= t
+ and (r['merged'] is None or r['merged'] > t) and r['state'] != 'CLOSED']
+ own.append(sum(1 for r in mine if r['ready'] and r['ready'] <= t))
+print(f"\n6. Reports by a known builder: {len(own)}; with ≥1 own PR ready and waiting review or merge: "
+ f"{sum(1 for x in own if x >= 1)}; with ≥2: {sum(1 for x in own if x >= 2)}")
+
+# 7. Hourly merges at full size, against the size of the queue
+rows, t = [], dt.datetime(2026, 10, 16, 0, tzinfo=dt.timezone.utc)
+while t + H <= end:
+ rows.append((merges(t, t + H), at(t + H / 2)[1])); t += H
+m = [x for x, _ in rows]
+print(f"\n7. From 16 Oct 00:00 UTC, merges an hour: p50 {st.median(m)}, p90 {q(m, .9)}, max {max(m)} ({len(m)} hours); "
+ f"hours with ≥20 ready-unmerged: p50 {st.median([x for x, r in rows if r >= 20])}, "
+ f"with fewer: p50 {st.median([x for x, r in rows if r < 20])}")
diff --git a/docs/research/2026-10-17-one-human-many-agents/sources/capacity_sim.py b/docs/research/2026-10-17-one-human-many-agents/sources/capacity_sim.py
new file mode 100644
index 000000000..55bf71f54
--- /dev/null
+++ b/docs/research/2026-10-17-one-human-many-agents/sources/capacity_sim.py
@@ -0,0 +1,230 @@
+"""A swarm as a queueing network, calibrated to the pilot (Oct 15-17, 2026).
+
+Builders build, CI checks, a reviewer pool reviews, the lead dispatches and checks hand-backs on the
+integration device. Gatekeepers stop during usage-limit windows. Shows shape, not precise numbers.
+Usage: python3 capacity_sim.py (prints the tables behind 14-which-gate.md §4)
+"""
+import heapq, math, random, statistics as st
+
+DAY = 24 * 60
+
+def lognormal(rng, median, sigma):
+ return median * math.exp(sigma * rng.gauss(0, 1))
+
+class Sim:
+ def __init__(self, seed, builders=13, runners=20, reviewers=1, pull=False, separate_subs=False,
+ lead_never_blocks=False, days=6, review_min=4.0, handback=0.19, build_min=45):
+ self.rng = random.Random(seed)
+ self.n, self.runners, self.reviewers = builders, runners, reviewers
+ self.pull, self.separate, self.never_blocks = pull, separate_subs, lead_never_blocks
+ self.days, self.review_min, self.handback, self.build_min = days, review_min, handback, build_min
+ self.t, self.q, self.seq = 0.0, [], 0
+ self.free_runners, self.ci_queue = runners, []
+ self.free_reviewers, self.review_queue = reviewers, []
+ self.lead_busy, self.lead_queue = False, []
+ self.out = {'lead': [], 'review': []} # outage windows (start, end)
+ self.merged, self.waits, self.dispatch_wait = [], [], 0.0
+ self.busy = {'runner': 0.0, 'reviewer': 0.0, 'lead': 0.0}
+ self.builders = [{'fixes': [], 'inflight': 0, 'free': True, 'asking': False, 'ready': False} for _ in range(builders)]
+ self.make_outages()
+
+ # --- outages: usage-limit windows on the account carrying the gatekeepers, and the lead blocked on the owner
+ def make_outages(self):
+ rng, horizon = self.rng, self.days * DAY
+ def windows(rate_per_day, lo, hi):
+ w, t = [], 0.0
+ while True:
+ t += rng.expovariate(rate_per_day / DAY)
+ if t > horizon: return w
+ w.append((t, t + rng.uniform(lo, hi)))
+ shared = windows(1.25, 72, 144)
+ self.out['lead'] = list(shared)
+ self.out['review'] = windows(1.25, 72, 144) if self.separate else list(shared)
+ if not self.never_blocks: # the lead waits on one question to the owner, some nights
+ for d in range(self.days):
+ if rng.random() < 0.35:
+ s = d * DAY + rng.uniform(60, 300)
+ self.out['lead'].append((s, s + rng.uniform(120, 240)))
+ for k in self.out: self.out[k].sort()
+
+ def available(self, who, t):
+ """Earliest time >= t at which `who` is not inside an outage window."""
+ for s, e in self.out[who]:
+ if s <= t < e: t = e
+ return t
+
+ def at(self, t, fn, *a):
+ self.seq += 1
+ heapq.heappush(self.q, (t, self.seq, fn, a))
+
+ def run(self):
+ for b in range(self.n): self.at(self.rng.uniform(0, 30), self.builder_next, b)
+ horizon = self.days * DAY
+ while self.q:
+ t, _, fn, a = heapq.heappop(self.q)
+ if t > horizon: break
+ self.t = t
+ fn(*a)
+ return self
+
+ # --- builders: fixes first, then a task in hand, else ask for one (at most three PRs in flight)
+ def builder_next(self, b):
+ B = self.builders[b]
+ if B['fixes']:
+ pr = B['fixes'].pop(0)
+ B['free'] = False
+ self.at(self.t + lognormal(self.rng, 18, 0.5), self.pushed, b, pr)
+ elif B['ready']:
+ B['ready'], B['free'] = False, False
+ self.at(self.t + lognormal(self.rng, self.build_min, 0.6), self.opened, b)
+ elif B['inflight'] < 3 and not B['asking']:
+ B['asking'], B['free'] = True, True
+ if self.pull or self.rng.random() > 0.13: # the next task is already in my list, or I pull it
+ self.at(self.t + 1, self.task_arrived, b, self.t)
+ else: # list empty: ask the lead
+ self.lead_queue.append(('dispatch', b, self.t))
+ self.lead_kick()
+ else:
+ B['free'] = True
+
+ def task_arrived(self, b, asked):
+ B = self.builders[b]
+ self.dispatch_wait += self.t - asked
+ B['asking'], B['ready'] = False, True
+ self.wake(b)
+
+ def opened(self, b):
+ pr = {'b': b, 'opened': self.t, 'round': 0}
+ self.builders[b]['inflight'] += 1
+ self.pushed(b, pr)
+
+ def pushed(self, b, pr):
+ self.ci_submit(pr)
+ self.builders[b]['free'] = True
+ self.builder_next(b)
+
+ def wake(self, b):
+ if self.builders[b]['free']: self.builder_next(b)
+
+ # --- CI
+ def ci_submit(self, pr, kind='pr'):
+ self.ci_queue.append((pr, kind))
+ if self.rng.random() < 0.35: # a newer push cancels an older run
+ self.ci_queue.append((None, 'waste'))
+ self.ci_kick()
+
+ def ci_kick(self):
+ while self.free_runners and self.ci_queue:
+ pr, kind = self.ci_queue.pop(0)
+ self.free_runners -= 1
+ d = {'pr': lognormal(self.rng, 15, 0.2), 'waste': self.rng.uniform(2, 8),
+ 'post': 15 if self.rng.random() < 0.4 else 2}[kind]
+ self.busy['runner'] += d
+ self.at(self.t + d, self.ci_done, pr, kind)
+
+ def ci_done(self, pr, kind):
+ self.free_runners += 1
+ self.ci_kick()
+ if kind != 'pr': return
+ if self.rng.random() < 0.15: # red: back to the builder
+ self.builders[pr['b']]['fixes'].append(pr); self.wake(pr['b'])
+ else:
+ self.review_queue.append(pr); self.review_kick()
+
+ # --- review
+ def review_kick(self):
+ while self.free_reviewers and self.review_queue:
+ start = self.available('review', self.t)
+ if start > self.t:
+ self.at(start, self.review_kick); return
+ pr = self.review_queue.pop(0)
+ self.free_reviewers -= 1
+ d = lognormal(self.rng, self.review_min, 0.5)
+ self.busy['reviewer'] += d
+ self.at(self.t + d, self.reviewed, pr)
+
+ def reviewed(self, pr):
+ self.free_reviewers += 1
+ self.review_kick()
+ p_find = [0.55, 0.35, 0.2, 0.1, 0.05][min(pr['round'], 4)]
+ pr['round'] += 1
+ if self.rng.random() < p_find:
+ self.builders[pr['b']]['fixes'].append(pr); self.wake(pr['b'])
+ elif self.rng.random() < self.handback: # needs the lead's minute on the integration device
+ self.lead_queue.append(('handback', pr, self.t)); self.lead_kick()
+ else:
+ self.merge(pr)
+
+ def merge(self, pr):
+ self.merged.append(self.t)
+ self.waits.append(self.t - pr['opened'])
+ self.builders[pr['b']]['inflight'] -= 1
+ self.ci_submit(None, 'post')
+ self.wake(pr['b'])
+
+ # --- the lead
+ def lead_kick(self):
+ if self.lead_busy or not self.lead_queue: return
+ start = self.available('lead', self.t)
+ if start > self.t:
+ self.at(start, self.lead_kick); return
+ kind, x, asked = self.lead_queue.pop(0)
+ self.lead_busy = True
+ if kind == 'dispatch': # attention latency to an empty list (pilot: median 23 min), then 3 min of work
+ d = 3.0
+ self.at(self.t + d, self.lead_done)
+ self.at(self.t + lognormal(self.rng, 20, 1.2), self.task_arrived, x, asked)
+ else:
+ d = lognormal(self.rng, 12, 0.4)
+ self.at(self.t + d, self.lead_done)
+ self.at(self.t + d, self.merge, x)
+ self.busy['lead'] += d
+
+ def lead_done(self):
+ self.lead_busy = False
+ self.lead_kick()
+
+ def report(self):
+ warm = DAY
+ m = [t for t in self.merged if t >= warm]
+ w = sorted(x for t, x in zip(self.merged, self.waits) if t >= warm)
+ span = self.days * DAY - warm
+ return {'merged_day': len(m) / (span / DAY),
+ 'wait_p50_h': w[len(w) // 2] / 60 if w else float('nan'),
+ 'wait_p90_h': w[int(len(w) * 0.9)] / 60 if w else float('nan'),
+ 'runner_util': self.busy['runner'] / (self.runners * self.days * DAY),
+ 'review_util': self.busy['reviewer'] / (self.reviewers * self.days * DAY),
+ 'lead_util': self.busy['lead'] / (self.days * DAY),
+ 'dispatch_wait_h_per_builder_day': self.dispatch_wait / 60 / self.n / self.days}
+
+def avg(seeds=8, **kw):
+ rs = [Sim(s, **kw).run().report() for s in range(seeds)]
+ return {k: st.mean(r[k] for r in rs) for k in rs[0]}
+
+def row(label, r):
+ return (f"| {label} | {r['merged_day']:.0f} | {r['wait_p50_h']:.1f} h | {r['wait_p90_h']:.1f} h | "
+ f"{r['review_util']*100:.0f}% | {r['runner_util']*100:.0f}% | {r['lead_util']*100:.0f}% | "
+ f"{r['dispatch_wait_h_per_builder_day']*60:.0f} min |")
+
+HEAD = ("| Scenario | Merged/day | PR wait p50 | p90 | Reviewers busy | Runners busy | Lead busy | Waiting for a task, per builder-day |\n"
+ "|---|---|---|---|---|---|---|---|")
+
+if __name__ == '__main__':
+ print("## Calibration (13 builders, 20 runners): the pilot merged ~165 a day, PR wait p50 1.5 h\n" + HEAD)
+ for bm, rv in ((45, 1), (60, 1), (60, 2), (70, 2)):
+ print(row(f"build {bm} min, {rv} reviewer{'s' if rv > 1 else ''}", avg(builders=13, runners=20, reviewers=rv, build_min=bm)))
+ exps = (("Baseline", {}), ("E1 pull", dict(pull=True)), ("E1 + E4 the lead never blocks", dict(pull=True, lead_never_blocks=True)),
+ ("E1 + E4 + E2 separate subscriptions", dict(pull=True, lead_never_blocks=True, separate_subs=True)))
+ for name, base in (("A: review binds (build 45 min, one reviewer)", dict(builders=13, runners=20, reviewers=1, build_min=45)),
+ ("B: review has slack (build 70 min, reviewer plus peer reviews ≈ two)", dict(builders=13, runners=20, reviewers=2, build_min=70))):
+ print(f"\n## {name}\n" + HEAD)
+ for label, kw in exps: print(row(label, avg(**base, **kw)))
+ more = dict(base); more['reviewers'] += 1
+ print(row("One more reviewer only", avg(**more)))
+ print(row("E1–E4 and one more reviewer", avg(**more, pull=True, lead_never_blocks=True, separate_subs=True)))
+ print("\n## Scaling, with E1–E4 (calibration B)\n" + HEAD)
+ fixed = dict(pull=True, lead_never_blocks=True, separate_subs=True, build_min=70)
+ for n, rv, rn, hb in ((13, 2, 20, .19), (30, 2, 20, .19), (30, 3, 8, .19), (30, 4, 40, .19), (45, 3, 20, .19),
+ (45, 4, 40, .19), (60, 6, 60, .19), (60, 6, 60, .05), (90, 9, 90, .05)):
+ label = f"{n} builders · {rv} reviewers · {rn} runners" + (" · device checks off the lead" if hb < .19 else "")
+ print(row(label, avg(seeds=6, builders=n, runners=rn, reviewers=rv, handback=hb, **fixed)))