loki-mode 11.74.2 → 11.75.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/README.md +1 -1
  2. package/SKILL.md +2 -3
  3. package/VERSION +1 -1
  4. package/autonomy/completion-council.sh +10 -10
  5. package/autonomy/council-v2.sh +4 -4
  6. package/autonomy/grill.sh +1 -1
  7. package/autonomy/lib/ablation.py +22 -2
  8. package/autonomy/lib/browser-open.sh +1 -1
  9. package/autonomy/lib/chat.sh +1 -1
  10. package/autonomy/lib/cockpit-render.sh +1 -1
  11. package/autonomy/lib/done-recognition.sh +4 -4
  12. package/autonomy/lib/efficiency_cost.py +1 -1
  13. package/autonomy/lib/engine10-push.sh +2 -2
  14. package/autonomy/lib/prd-enrich.sh +1 -1
  15. package/autonomy/lib/proof-check.sh +1 -1
  16. package/autonomy/lib/proof-generator.py +3 -3
  17. package/autonomy/lib/proof-pr.sh +1 -1
  18. package/autonomy/lib/skill-link-heal.sh +1 -1
  19. package/autonomy/lib/voter-agents.sh +1 -1
  20. package/autonomy/loki +26 -37
  21. package/autonomy/prd-checklist.sh +1 -1
  22. package/autonomy/receipt_jwt.py +1 -1
  23. package/autonomy/run.sh +28 -28
  24. package/autonomy/trigger-schedule.py +6 -414
  25. package/autonomy/tui.sh +1 -1
  26. package/autonomy/verify.sh +4 -4
  27. package/completions/loki.bash +0 -5
  28. package/dashboard/__init__.py +1 -1
  29. package/docs/ARCHITECTURE.md +1 -2
  30. package/docs/CLI-REFERENCE.md +1 -1
  31. package/docs/COMPONENTS.md +1 -1
  32. package/docs/INSTALLATION.md +1 -1
  33. package/docs/ROUTING-EVIDENCE.md +1 -2
  34. package/docs/V10-RESEARCH.md +1 -1
  35. package/docs/dev/architecture-reference.md +3 -7
  36. package/docs/dev/project-structure.md +1 -4
  37. package/docs/dev/release-checklist.md +13 -31
  38. package/docs/research-2026-07/OBSERVABILITY-TOOL-SPEC.md +1 -1
  39. package/docs/v11/MARKET-SLICES.md +1 -1
  40. package/docs/v11/REGISTRIES.md +1 -1
  41. package/docs/v11/ROUTER-1.md +2 -2
  42. package/loki-ts/dist/loki.js +2 -2
  43. package/mcp/__init__.py +1 -1
  44. package/package.json +2 -2
  45. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  46. package/skills/extending.md +2 -3
  47. package/skills/factory-operations.md +11 -18
  48. package/skills/release-cadence.md +2 -2
  49. package/web-app/dist/assets/{AdminPage-jkjilfbl.js → AdminPage-CTwi8SUX.js} +1 -1
  50. package/web-app/dist/assets/{Avatar-bd5JWkSJ.js → Avatar-DVtGtLkJ.js} +1 -1
  51. package/web-app/dist/assets/{Badge-DVRit2Xw.js → Badge-rwKzz0Pe.js} +1 -1
  52. package/web-app/dist/assets/{Button-BNAB-pVZ.js → Button-nIsPDfsQ.js} +1 -1
  53. package/web-app/dist/assets/{CockpitPage-DpG29h_w.js → CockpitPage-BCeDpoWa.js} +1 -1
  54. package/web-app/dist/assets/{ComparePage-Dasg5V41.js → ComparePage-CYIYanVq.js} +1 -1
  55. package/web-app/dist/assets/{ErrorBoundary-DJojse6b.js → ErrorBoundary-Bkz6HqWp.js} +1 -1
  56. package/web-app/dist/assets/{EvidenceReceiptPanel-Blxw7_u1.js → EvidenceReceiptPanel-DZT2Np4F.js} +1 -1
  57. package/web-app/dist/assets/{GitHubIssuesPanel-BBvSFj80.js → GitHubIssuesPanel-Bzla91Lu.js} +1 -1
  58. package/web-app/dist/assets/{GitHubPRsPanel-BCIKeSBg.js → GitHubPRsPanel-FjT-Xn5t.js} +1 -1
  59. package/web-app/dist/assets/{HomePage-C7d__oNG.js → HomePage-pXgmRGLt.js} +2 -2
  60. package/web-app/dist/assets/{LoginPage-BXljL3yY.js → LoginPage-CnmpE28B.js} +1 -1
  61. package/web-app/dist/assets/{MagicPage-Xjkts_yE.js → MagicPage-CuSeGsLq.js} +1 -1
  62. package/web-app/dist/assets/{MetricsPage-kQvVp-j2.js → MetricsPage-Bg3PkBOU.js} +1 -1
  63. package/web-app/dist/assets/{NotFoundPage-D-4ZlEaO.js → NotFoundPage-uzBtZNV-.js} +1 -1
  64. package/web-app/dist/assets/{ProjectPage-DfzR5RXP.js → ProjectPage-Dacki8Xr.js} +3 -3
  65. package/web-app/dist/assets/{ProjectsPage-DFDsWzkV.js → ProjectsPage-BRGjksXG.js} +1 -1
  66. package/web-app/dist/assets/{SettingsPage-CLPIoYT3.js → SettingsPage-BbNf3fEJ.js} +1 -1
  67. package/web-app/dist/assets/{ShowcasePage-PZKkyGeY.js → ShowcasePage-XX4830sX.js} +1 -1
  68. package/web-app/dist/assets/{SystemSettingsPage-BsBlcnzo.js → SystemSettingsPage-DOhQeXa6.js} +1 -1
  69. package/web-app/dist/assets/{TeamsPage-BSjgNhoU.js → TeamsPage-2reIRUp_.js} +1 -1
  70. package/web-app/dist/assets/{TemplatesPage-W2KeAzbg.js → TemplatesPage-BUsLEWHW.js} +1 -1
  71. package/web-app/dist/assets/{TerminalOutput-BjroTiCC.js → TerminalOutput-BrBDcgzC.js} +1 -1
  72. package/web-app/dist/assets/{activity-BXZ5YYes.js → activity-B6AZpgmb.js} +1 -1
  73. package/web-app/dist/assets/{bell-D1urp5pa.js → bell-CB792A7S.js} +1 -1
  74. package/web-app/dist/assets/{bot-Chedf2bF.js → bot-uQZwOFAn.js} +1 -1
  75. package/web-app/dist/assets/{check-DhaCuOCV.js → check-DrtG0lIZ.js} +1 -1
  76. package/web-app/dist/assets/{chevron-left-D7BpQyA6.js → chevron-left-CrsJSAqQ.js} +1 -1
  77. package/web-app/dist/assets/{circle-alert-DnGvQ_AQ.js → circle-alert-BUCly4p3.js} +1 -1
  78. package/web-app/dist/assets/{clock-CqfxWhHM.js → clock-B2IT9SnE.js} +1 -1
  79. package/web-app/dist/assets/{cloud-BKxp5AWB.js → cloud-CN6Ux7Q7.js} +1 -1
  80. package/web-app/dist/assets/{code-xml-BDQ6GBtt.js → code-xml-BEm8PWnK.js} +1 -1
  81. package/web-app/dist/assets/{database-BmpEx1y_.js → database-cHe5Fgu8.js} +1 -1
  82. package/web-app/dist/assets/{dollar-sign-DYNY9R_C.js → dollar-sign-BVmP4YrE.js} +1 -1
  83. package/web-app/dist/assets/{file-code-corner-BJi0IBFd.js → file-code-corner-D-m-NrwO.js} +1 -1
  84. package/web-app/dist/assets/{file-plus-Dqyb2bcQ.js → file-plus-6mCjIzAB.js} +1 -1
  85. package/web-app/dist/assets/{globe-DPh4RWfM.js → globe-vcWOujwU.js} +1 -1
  86. package/web-app/dist/assets/{hammer-B3xnuoA1.js → hammer-D4nZFpO2.js} +1 -1
  87. package/web-app/dist/assets/{index-BpX8DcTr.js → index-u8toJ43r.js} +3 -3
  88. package/web-app/dist/assets/{layers-BRCmyCW8.js → layers-CNhYLop8.js} +1 -1
  89. package/web-app/dist/assets/{loader-circle-n07Pky0M.js → loader-circle-Vl7XIMV6.js} +1 -1
  90. package/web-app/dist/assets/{lock-BWqOuQmS.js → lock-SW_KwAvf.js} +1 -1
  91. package/web-app/dist/assets/{package-BJlB_Z-Z.js → package-QPK-7Ej1.js} +1 -1
  92. package/web-app/dist/assets/{plus-oH17BZu2.js → plus-DUgAlgCB.js} +1 -1
  93. package/web-app/dist/assets/{refresh-cw-CPQ476LL.js → refresh-cw-LfUksPHq.js} +1 -1
  94. package/web-app/dist/assets/{rotate-ccw-7hLvOcnS.js → rotate-ccw-CMbuouVq.js} +1 -1
  95. package/web-app/dist/assets/{scroll-text-BCmLauQn.js → scroll-text-C_FxBmNQ.js} +1 -1
  96. package/web-app/dist/assets/{server-DfTfvW84.js → server-7UJe9Jqt.js} +1 -1
  97. package/web-app/dist/assets/{shield-alert-CaeGRq19.js → shield-alert-BMuu6fYB.js} +1 -1
  98. package/web-app/dist/assets/{thumbs-up-Dz-l2GPC.js → thumbs-up-Bhs0d2Gp.js} +1 -1
  99. package/web-app/dist/assets/{trash-2-B-OsDmSo.js → trash-2-BZKxv49w.js} +1 -1
  100. package/web-app/dist/assets/{trending-down-CXTFOxzq.js → trending-down-DKeCMZek.js} +1 -1
  101. package/web-app/dist/assets/{trending-up-FQEdqr3v.js → trending-up-43_9fShg.js} +1 -1
  102. package/web-app/dist/assets/{upload-CacWSNTg.js → upload-pV3irPEW.js} +1 -1
  103. package/web-app/dist/assets/{usePolling-cIjZ9qd2.js → usePolling-CoZQM-WL.js} +1 -1
  104. package/web-app/dist/assets/{user-DAouWFHi.js → user-CMl7dXvC.js} +1 -1
  105. package/web-app/dist/index.html +1 -1
  106. package/autonomy/company-seats.json +0 -82
  107. package/docs/COMPETITIVE-INTEL-2026-09.md +0 -444
  108. package/docs/FOUNDER-DECISIONS-TRUST-SEMANTICS-2026-08-01.md +0 -145
  109. package/docs/FOUNDER-STATUS-AND-DECISIONS-2026-07-01.md +0 -132
  110. package/docs/LOKI-10-BUILD-PROMPT.md +0 -350
  111. package/docs/STRATEGY-2026-2028.md +0 -124
  112. package/docs/V10-VISION.md +0 -161
  113. package/docs/v10/ADOPTION-PLAN.md +0 -375
  114. package/docs/v10/ARCHITECT-CUTS.md +0 -744
  115. package/docs/v10/BACKLOG.md +0 -231
  116. package/docs/v10/BOARD.md +0 -1403
  117. package/docs/v10/CONTROL-PLANE.md +0 -120
  118. package/docs/v10/CONTROL.md +0 -36
  119. package/docs/v10/CP-ASK-PLAN.md +0 -85
  120. package/docs/v10/CP-ENTERPRISE-UI.md +0 -537
  121. package/docs/v10/D51-PHASE-B.md +0 -120
  122. package/docs/v10/D61-SPEED.md +0 -105
  123. package/docs/v10/D63-CARDS.md +0 -354
  124. package/docs/v10/DECISIONS.md +0 -915
  125. package/docs/v10/E2E-D65.md +0 -123
  126. package/docs/v10/ENGINE-LAWS.md +0 -163
  127. package/docs/v10/ENGINE-MEASURE.md +0 -69
  128. package/docs/v10/ENGINE.md +0 -743
  129. package/docs/v10/FAILURE-CLASSES.md +0 -2026
  130. package/docs/v10/FC21B-FC22-PLAN.md +0 -107
  131. package/docs/v10/FIRST-RUN-GATE.md +0 -39
  132. package/docs/v10/FOUNDER-QUEUE.md +0 -29
  133. package/docs/v10/GAP-RESEARCH-1003.md +0 -32
  134. package/docs/v10/GUARDS.md +0 -883
  135. package/docs/v10/L0-WAVE1.md +0 -81
  136. package/docs/v10/LEGACY-REMOVAL.md +0 -408
  137. package/docs/v10/MEDIUM-ANALYSIS.md +0 -346
  138. package/docs/v10/METRICS.md +0 -645
  139. package/docs/v10/MODERNIZE.md +0 -437
  140. package/docs/v10/OPENCODE-PARITY-PLAN.md +0 -84
  141. package/docs/v10/OPERATING-MODEL.md +0 -60
  142. package/docs/v10/PLAN-V12.md +0 -896
  143. package/docs/v10/PROGRESS.md +0 -2735
  144. package/docs/v10/RELEASE-11.md +0 -77
  145. package/docs/v10/RETRO-2026.md +0 -650
  146. package/docs/v10/ROADMAP-D63.md +0 -35
  147. package/docs/v10/SCALE.md +0 -140
  148. package/docs/v10/SCORECARD-PLAN.md +0 -250
  149. package/docs/v10/SWARM-PROMPT.md +0 -98
  150. package/docs/v10/SWARM.md +0 -293
  151. package/docs/v10/cp-redesign/PARITY.md +0 -188
  152. package/docs/v10/cp-redesign/legacy/INDEX.md +0 -1167
  153. package/docs/v10/roadmap-10/01-measurement.md +0 -113
  154. package/docs/v10/roadmap-10/02-cost.md +0 -75
  155. package/docs/v10/roadmap-10/03-speed.md +0 -65
  156. package/docs/v10/roadmap-10/04-first-run.md +0 -61
  157. package/docs/v10/roadmap-10/05-deploy.md +0 -61
  158. package/docs/v10/roadmap-10/06-stability.md +0 -64
  159. package/docs/v10/roadmap-10/07-quality.md +0 -57
  160. package/docs/v10/roadmap-10/08-proof.md +0 -48
  161. package/docs/v10/roadmap-10/09-safety.md +0 -74
  162. package/docs/v10/roadmap-10/README.md +0 -1464
  163. package/skills/sdlc-fleet.md +0 -170
  164. package/tools/cockpit/SPEC.md +0 -275
  165. package/tools/cockpit/index.html +0 -146
  166. package/tools/cockpit/roi-basis.json +0 -33
  167. package/tools/cockpit/server.py +0 -946
@@ -1,35 +0,0 @@
1
- # Roadmap D63: the industry-standard autonomous software factory
2
-
3
- Founder directive D63 (2026-10-03 00:15Z, relayed by the autonomi-dev session). This page sets the roadmap that D50, D51, D56 and D61 slot into. The measurable bars below are the only claim we make. User-facing text makes no "superintelligence" or benchmark claims, and no row is done without a test or an eval row in METRICS.
4
-
5
- ## Pillars: the bar to match, and how we beat it
6
-
7
- | # | Pillar | Bar to match | How we beat it | Done when (test or eval row) |
8
- |---|---|---|---|---|
9
- | 1 | Autonomy | Devin, Factory Droids: an issue, backlog or spec goes in; merge-ready PRs come out; no babysitting | Proof plus lift | D50 lift on the eval, never below raw on the same model; D61 speed targets; a BLOCKED run asks exactly one question |
10
- | 2 | Speed at scale | Factory: parallel units with an integrator; warm start | Same or fewer tokens than one sequential session | D61 large-arm eval holds (section 5 of D61-SPEED.md) before the default flips |
11
- | 3 | Evidence | Devin, Vorflux: PR bodies with tests, screenshots of changed pages, HTTP transcripts for APIs | A signed receipt covers all of it | Screenshots are generated locally (Playwright) and hashed into the receipt; `loki verify` fails if one is altered |
12
- | 4 | Control Plane UI | Devin web app, Factory dashboard | Every number links to its receipt | D56 is the default: live runs, history, PRs and issues, cost, compare, and a BLOCKED question answerable in the UI; one container with Helm and ECS examples; the old dashboard retired once at parity |
13
- | 5 | Connections | Devin, Factory integrations | Intake is the same v10 run with the same receipt | GitHub (PAT now, GitHub App next) and GitLab; Jira and Linear intake; two-way Slack (`@loki` in a thread starts a run, BLOCKED answers come back); issue-to-PR Action; an MCP server exposing run, status and verify; VS Code and JetBrains via ACP later |
14
- | 6 | Spec to software | 8090 | Every acceptance criterion traced to code and a check in the receipt | A spec or PRD file becomes a delivery contract, decomposed (D61) into units and then PRs; replaces the legacy PRD path (D57) |
15
- | 7 | Legacy and modernization | 8090, Factory | Proof of function on legacy code | `loki modernize` stays hidden until it passes a real-repo eval; not this week |
16
- | 8 | Claude Code parity | Claude Code | Runs inside it with a receipt | loki-seal plus a /loki command that runs the v10 engine on the current task; CLAUDE.md and .claude/skills honoured in the context pack |
17
- | 9 | Enterprise | Devin and Factory enterprise tiers | Audit from the receipt chain | An audit log of model calls; budgets per team; SSO for the Control Plane later; never certification claims |
18
-
19
- ## Order this week (under the usage governor)
20
- 1. D61 eval arm (slice 17), then warm start (slices 5 and 6), with slices 1, 2, 7 and 8 in parallel.
21
- 2. Visual evidence in PRs (pillar 3).
22
- 3. Control Plane as the default, with the BLOCKED answer UI (pillar 4).
23
- 4. Two-way Slack (pillar 5).
24
- 5. Jira and Linear intake (pillar 5).
25
- 6. Spec to contract (pillar 6).
26
- 7. Multi-repo workspaces (D51 Phase B, behind LOKI_WORKSPACES).
27
- 8. MCP run, status and verify server (pillar 5).
28
- 9. Containers (pillar 4).
29
-
30
- Also from D62: root action.yml routes to Loki 10; one real end-to-end BUDGET_STOP exit 3 test; project memory (D50 item 3). Later: merge queue, PR review with a risk score, REST API.
31
-
32
- ## Rules
33
- - Each item ships on its own train, behind a flag where it changes defaults, with README and docs updated in the same slice.
34
- - Each release reports its version and what users can now do to the autonomi-dev session.
35
- - Pacing follows the governor (about 0.5% of the weekly window per hour); seats scale only with live /usage.
package/docs/v10/SCALE.md DELETED
@@ -1,140 +0,0 @@
1
- # SCALE: what the plan sustains and what 50 engineers would need (G-03, D39)
2
-
3
- Written 2026-09-28 by the CTO (opus). Every number is either MEASURED (command and window
4
- given), PUBLISHED (source URL given) or ESTIMATE (basis given). Billing is the founder's call.
5
-
6
- ## 1. Measured burn (MEASURED, local jsonl only)
7
-
8
- Source: `~/.claude/projects/**/*.jsonl`, assistant rows with a `usage` field, window ending
9
- 2026-09-28 17:47Z. Local transcripts miss cloud and remote agents, so every figure is a lower bound.
10
-
11
- Counting method matters. Claude Code writes one jsonl row per content block and repeats the
12
- same `usage` on each row. Two methods, same hour:
13
-
14
- | Last 1h (17:47Z) | Raw sum of rows (D39 method) | Deduplicated (max per message id + requestId) |
15
- |----------------------------|------------------------------|-----------------------------------------------|
16
- | Output tokens | 2.07M | 1.87M (sonnet 1.62M, opus 0.24M, haiku 0.005M) |
17
- | Cache-read tokens | 1.17B | 0.634B (sonnet 552M, opus 81M) |
18
- | Cache-write tokens | not summed | 6.51M (sonnet 5.03M, opus 1.40M); 92% 5-minute TTL |
19
- | Uncached input tokens | not summed | 6.3K |
20
- | API requests | 5,824 rows | 3,119 (peak 114 per minute) |
21
-
22
- - The deduplicated count is the basis below. The D39 cache-read figure (1.15B) double counts
23
- about 1.8x; D39 and METRICS.md should carry the deduplicated numbers.
24
- - Last 5h, deduplicated: output 6.01M (sonnet 5.21M, opus 0.80M), cache read 1.85B.
25
- - Models seen in the last hour: claude-sonnet-5 (2,808 requests), claude-opus-5-5 (305),
26
- claude-haiku-4-5 (6). Opus share of output: 13%.
27
- - Concurrency, measured: distinct transcript files with at least one request per 5-minute slot
28
- over the hour: 11, 11, 8, 12, 9, 12, 11, 21, 18, 20, 17, 17 (average 13.9). The stated
29
- 16 to 19 agents matches the last 25 minutes.
30
- - Peak minute (deduplicated): 66K output tokens, 561K ITPM-counted input (uncached input plus
31
- cache writes; cache reads do not count toward ITPM), 114 requests.
32
-
33
- ## 2. API-equivalent cost of the measured hour (PUBLISHED prices)
34
-
35
- Prices from https://platform.claude.com/docs/en/about-claude/pricing (fetched 2026-09-28):
36
-
37
- | Model | Input | 5m cache write | 1h cache write | Cache read | Output |
38
- |------------------|-------|----------------|----------------|------------|--------|
39
- | claude-sonnet-5 | $2 | $2.50 | $4 | $0.20 | $10 |
40
- | claude-opus-5-5 | $4 | $5 | $8 | $0.20 | $20 |
41
- | claude-haiku-4-5 | $1 | $1.25 | $2 | $0.10 | $5 |
42
-
43
- (USD per million tokens. Sonnet 5 $2/$10 is now the standard price, per the pricing page footnote.)
44
-
45
- Measured hour at list price (cache writes priced at the 5-minute rate; the 1h share adds under $1):
46
- - Sonnet: cache read $110.49 + output $16.25 + cache write $12.59 = $139.34
47
- - Opus: cache read $16.26 + cache write $6.99 + output $4.75 = $28.00
48
- - Haiku: $0.14. Total: $167.5 per hour, of which cache reads are 76% and output 12%.
49
- - Upper bound with the raw D39 counting: about $275 per hour.
50
-
51
- Per engineer-hour (ESTIMATE): $167.5 / 13.9 measured agents = $12.0; $167.5 / 17.5 stated agents
52
- = $9.6. Range $9.6 to $12.0 per engineer-hour, $230 to $289 per engineer-day.
53
-
54
- ## 3. What the Max 20x plan sustains around the clock (ESTIMATE, uncalibrated)
55
-
56
- The conversion from tokens to plan percent is NOT calibrated. G-01 fits it from founder
57
- readings of the 5-hour and weekly meters. Until then, this is a range with its basis, not a number.
58
-
59
- - Window ceiling: on 2026-09-27 about 16 agents took the 5-hour window from low to 91%. At the
60
- D39 target of 85% at window end, that is 15 to 17 agents for one window, if the 9-27 mix
61
- (tokens per agent, opus share) matches today.
62
- - Weekly bound: 24/7 is 33.6 five-hour windows per week. If the weekly cap equals W full
63
- windows, sustainable 24/7 headcount = window ceiling x min(1, W / 33.6). W is unknown; it is
64
- exactly what G-01 must measure.
65
- - ESTIMATE: 5 to 16 engineers around the clock. 16 holds only if the weekly cap is not binding;
66
- the low end assumes the weekly cap is about 10 full windows. Neither end is a measurement.
67
- - Calibration input for G-01: use API-equivalent dollars per agent-hour (section 2), not raw
68
- tokens, as the regressor. It weights opus against sonnet the way the plan meter likely does,
69
- and it collapses four token kinds into one number.
70
- - The API value of what the plan is delivering today is about $4,000 per day at list price.
71
-
72
- ## 4. What 50 parallel engineers would need (ESTIMATE on PUBLISHED prices)
73
-
74
- Assumptions: measured mix of section 1 (sonnet 87% of output, opus 13%); caching as today
75
- (99% of input from cache); 24 hours a day; list prices, no volume discount; no US-only
76
- inference (`inference_geo: "us"` adds 1.1x); local-only burn, so real cost is at least this.
77
-
78
- | Engineers | Per day | Per 30 days | Fits under (API spend cap) |
79
- |-----------|-------------------|----------------------|---------------------------------------|
80
- | 16 | $3,675 to $4,627 | $110K to $139K | Scale ($200K per month) |
81
- | 25 | $5,742 to $7,230 | $172K to $217K | Scale at the low end; over it at high |
82
- | 50 | $11,484 to $14,460| $345K to $434K | Custom tier only (no cap; via sales) |
83
-
84
- Rate limits are not the binding constraint; the spend cap is. Source:
85
- https://platform.claude.com/docs/en/api/rate-limits (fetched 2026-09-28).
86
- - Monthly spend caps: Start $500, Build $1,000, Scale $200,000, Custom none. At 16 engineers the
87
- Start cap lasts about 3 hours and the Build cap about 6 hours. Tier placement is automatic
88
- from account history; new orgs may start in a lower Evaluation tier.
89
- - Peak minute scaled from 13.9 to 50 agents: 238K output per minute, 2.0M ITPM-counted input,
90
- 410 requests per minute. Sonnet 5 limits: Start 2M ITPM / 400K OTPM / 1,000 RPM; Build 5M /
91
- 1M / 5,000; Scale 10M / 2M / 10,000. Opus 5.5 has its own bucket at the same numbers. So
92
- Build clears 50 agents on rate limits; Start is at its ITPM edge.
93
- - Cache reads do not count toward ITPM on these models, which is why 99% cached input keeps
94
- the fleet far under the limits.
95
- - The rate-limit page warns of acceleration limits on sharp ramps: step headcount up, never jump.
96
-
97
- Plans (https://claude.com/pricing, fetched 2026-09-28; limits UNVERIFIED beyond the page text):
98
- - Team: standard seat $20 to $25, premium seat $100 to $125 per month, "5x more usage than
99
- standard seats". Seat usage limits apply per seat; published numbers for agent-hours per
100
- seat were not found. UNVERIFIED for a 50-agent fleet.
101
- - Enterprise: "seat price + usage at API rates", $20 per seat per month billed annually. Economics
102
- equal the API table above plus seat fees; custom limits and volume discounts are negotiated.
103
- - Stacking several subscriptions to multiply limits for one automated fleet is not proposed;
104
- any such question goes to Anthropic.
105
-
106
- ## 5. Ramp gates (D39)
107
-
108
- Headcount rises one step per hour, and only when all three hold for the last full hour:
109
- 1. Governor allows: projected 5-hour window at or under 85% at window end and weekly at or
110
- under 90% by the Wednesday 13:00 ET reset (on API billing: projected month under the tier cap
111
- and any workspace spend limit).
112
- 2. Merged slices per hour rose versus the previous step.
113
- 3. Merged work per token did not fall: merged slices per million output tokens is no more than
114
- 10% below the previous step.
115
- Step size: +4 engineers (never more than +25%). Any gate failing: hold. Two failing hours in a
116
- row: step back one. The cut order in D39 applies (cloud, then MEDIUM and LOW local, then opus
117
- reviewers down to the HIGH minimum; never the Release Manager or a P0).
118
-
119
- What to measure first, this week: merged slices per million tokens.
120
- - Numerator: distinct slice IDs (BOARD row IDs such as E-88 or DEP-05) whose commits became
121
- ancestors of origin/main in the window. Not commit count: 933 commits reached main in 7 days,
122
- which says nothing about slices.
123
- - Denominator: deduplicated output tokens in millions, reported alongside API-equivalent
124
- dollars. Not total tokens: those are 99% cache reads and would make the ratio noisy and tiny.
125
- - Record hourly in METRICS.md with the headcount of that hour. This is the baseline every
126
- ramp step is judged against; without it gate 3 cannot be evaluated and the ramp stays shut.
127
-
128
- ## 6. The founder's decision
129
-
130
- | Option | What it is | Headcount | Cost (ESTIMATE) |
131
- |--------|-----------|-----------|-----------------|
132
- | A. Max 20x only | Governor-limited, as today | 5 to 16 around the clock (uncalibrated) | Current plan fee only |
133
- | B. Max core + API overflow | Max for the core; API key with a workspace spend limit for engineers above the Max ceiling | Core + N | $230 to $289 per extra engineer-day; +10 = $2.3K to $2.9K per day |
134
- | C. API only, Scale tier | All engineers on API billing | Up to about 25 inside the $200K cap | 16: $110K to $139K per month; 25: $172K to $217K |
135
- | D. Enterprise or Custom tier | Sales-negotiated limits and discount | 50 | $345K to $434K per month at list, less any discount |
136
-
137
- CTO recommendation: A now; G-01 calibrates within the week. Move to B only after the section 5
138
- baseline exists and gate 3 holds at the Max ceiling, because extra engineers are worth buying
139
- only if merged work per token does not fall as headcount rises. Open the sales conversation for
140
- D before any plan to exceed 25, since Custom limits are not self-serve.
@@ -1,250 +0,0 @@
1
- # D41 scorecard plan: slices for items 1 and 2
2
-
3
- Architect plan (opus) for D41. Base: local main 9869f217, after E-98f. Cards S41-01 to S41-16. Items 3 to 5 are sketched at the end.
4
-
5
- ## 0. Starting facts (each one cites a file or a command)
6
-
7
- - **E-98f (MEDIUM-ANALYSIS.md "After"), 7 medium tasks, n=3, 21 runs per arm.**
8
- - default 15/21, p50 209s; `LOKI_E10_WALL=0` 16/21, p50 214s; `LOKI_E10_CASCADE=0` 15/21, p50 138s. Raw: 10/14 (EV-15) and 12/14 (EV-14), p50 56s to 70s.
9
- - Null-cost rows are 10, 2 and 11 of 21, so no arm has a cost figure. Every miss is werkzeug-3105 or werkzeug-3271. Speed is the largest gap: v10 p50 is 2.5 to 4x raw.
10
- - **Three harness defects block the scorecard.**
11
- - (a) `provider_cost()` (harness.py ~698) accepts only `cost_source == "provider"`. E-98e writes `"partial-stream"` for killed sessions (runner/budget.ts:502), so any stage kill nulls the whole row.
12
- - (b) `V10_ENGINE_ENV_ALLOWLIST` (harness.py:95-98) lacks `LOKI_E10_CASCADE`, and `arm_env` drops every other `LOKI_*`. E-98f needed a bin shim.
13
- - (c) `arm_auth(cap + 120)` refuses a row once the keychain token has under 1020s left. Claude Code refreshes only near expiry, so every r2 row was lost once.
14
- - **D33 core:** 4,964 lines at 9869f217, counted as `budget.test.ts` counts (`split("\n").length` over engine10 minus modernize/). Headroom is 35 lines.
15
- - **Prefix today:** E-65 measured 7,136 tokens on sonnet for the engine10 session shape (6 tools, `claude_code` preset, no append; runner/providers.ts:488-492). There is no per-stage first-turn figure yet (S41-04).
16
- - **Where the cost goes (MEDIUM-ANALYSIS section 4):** implement cache reads are 9.23M against raw's 4.79M. Plan, Wall and intake are 31% of spend. Plan runs on opus in the eval: `tier: "fast"` has no pin, and the override sets FAST to opus (session.ts:44-49).
17
- - **Agent SDK 0.3.283** has a PostToolUse `updatedToolOutput` that "replaces the tool output before it is sent to the model" and "works for all tools" (sdk.d.ts:2674-2681). Trimming has a real mechanism.
18
-
19
- ## 1. Prerequisite ruling (CTO, before S41-05 merges)
20
-
21
- Core cannot absorb items 1 and 2: the new logic is about 600 lines against 35 lines of headroom. Proposal:
22
- - New modules go in `loki-ts/src/e10ext/`, outside engine10/, with a 1,500-line cap added to `budget.test.ts` next to modernize/.
23
- - Core may import e10ext/. e10ext/ may not import stages/.
24
- - Nothing that decides a verdict leaves core: Seal, the authoritative verify and the Wall seal stay in engine10/. e10ext/ only picks which diff reaches them and which model runs.
25
- - Because verify and Seal re-check whatever is chosen, a wrong pick costs accuracy but can never produce a false seal.
26
- - A D-entry records the ruling. If the CTO refuses, S41-05, 08, 10, 12 and 13 put their modules under engine10/ and offset every added line.
27
-
28
- ## 2. Fixed metric definitions (identical before and after)
29
-
30
- - **Rows:** harness `dedupe` applied per rep file (it keys on model, harness_sha, task and arm, so run over concatenated reps it would merge r1 to r3), then E-98f's rule: one row per (arm label, rep file, task), the latest `status: ok` row, else the latest row. Arm label = `<arm>@<model>`. A task that is `task_invalid` anywhere is dropped from every arm.
31
- - **Completion** = completed / evaluated, using the harness's own `completed` and `is_evaluated`.
32
- - **Cost per completed** = sum of `cost_usd` over evaluated rows / completed rows.
33
- - Provider and partial-stream dollars both count; the table shows the partial-stream share of spend.
34
- - Any evaluated row still null makes the figure n/a, and n/a is always red.
35
- - **p50** = nearest-rank p50 of `time_to_pr_s` over completed rows (harness `nearest_rank`).
36
- - **Tokens per completed, by type:** input, cache read, cache write and output, each summed over evaluated rows / completed. Reported, not graded.
37
- - **Comparability.** The tool refuses to mark a pair unless all of these hold:
38
- - the same task set with the same n per task;
39
- - the same `--parallel` and cap;
40
- - arms ran back to back, never concurrently;
41
- - reused raw rows have an equal `git hash-object eval/loki10/harness.py`. Both hashes are printed.
42
- - **Marks.** Completion green if Loki >= raw; cost green if Loki <= raw; p50 green if Loki <= raw. The tier verdict is green only if all three are green. The headline pair, loki-sonnet against raw-opus, is green on cost only at Loki <= 0.5x raw.
43
- - **METRICS.md columns:** tier, pair, n, the three Loki/raw pairs with marks, verdict, tokens by type, partial share, date, harness hash, command.
44
-
45
- ## 3. How the harness picks the model per arm today (item B)
46
-
47
- - **Knob: `LOKI_EVAL_MODEL`** (harness.py:1264).
48
- - Unset, it takes the first `tier: "planning"` entry in providers/model_catalog.json. Today that is `claude-opus-5-5`, but `claude-opus-5` is also planning-tier, so the default depends on catalog order.
49
- - The value must have a `cli_aliases` entry (harness.py:1267).
50
- - **raw-claude arm:** `--model <id>` (harness.py:1137).
51
- - **v10 arm:** `LOKI_MODEL_OVERRIDE=<id>` plus `LOKI_SESSION_MODEL=<alias>` (harness.py:523-525).
52
- - session.ts:44-49 copies the override into PLANNING, DEVELOPMENT and FAST. The E-64 cascade then pins implement to `wallModel()`, sonnet by default (sizing.ts).
53
- - Fix escalation targets `ctx.model` (fix.ts), so on loki-sonnet nothing can escalate today. S41-08 adds `LOKI_E10_TOP_MODEL`.
54
- - **Arms, all with pinned ids:** raw-sonnet = `LOKI_EVAL_MODEL=claude-sonnet-5 --arm raw-claude`; raw-opus = `LOKI_EVAL_MODEL=claude-opus-5-5 --arm raw-claude`; loki-sonnet = `LOKI_EVAL_MODEL=claude-sonnet-5 --arm v10` (plus `LOKI_E10_TOP_MODEL=opus` after S41-08); loki-opus = `LOKI_EVAL_MODEL=claude-opus-5-5 --arm v10` (the pair for raw-opus).
55
-
56
- ## 4. Definitions for item 1
57
-
58
- **Deterministic failure.** A verify output has one when some check `c` meets all six conditions:
59
- 1. `c.result == "fail"`: in verify.ts `runCheck`, it failed and then failed its immediate rerun. `flaky` (fail then pass) and `not_run` (missing tool, timeout, abort) never count.
60
- 2. `c.name` is a test check, not `lint:*` and not `select-tests` (the same test as fix.ts `isTestFailure`).
61
- 3. `c.interpreter != "system"`.
62
- 4. The test file of `c` existed at baseSha or is a sealed Wall file. A test the attempt wrote itself never counts.
63
- 5. `c.exit_code` is not a pytest non-test exit (2, 3, 4, or 5 = no tests collected). S41-08 records `exit_code` (+2 core lines). Without it, collection errors would buy top-model rounds.
64
- 6. It reproduced: the same `c.name` failed in the previous verify after one cheap fix round, or it failed in both parallel attempts.
65
-
66
- Only then does a fix round run on the top model. With `MAX_FIX_ROUNDS = 2` (types.ts:25), a single attempt escalates in round 2 at the earliest. When both attempts failed the same check, escalation comes in round 1.
67
-
68
- **Attempt selection (two attempts).**
69
- - **Shared set S** = sealed Wall tests plus `impacted(testmap, changed_A plus changed_B)`, keeping only tests that exist at baseSha.
70
- - Each attempt is scored in the primary tree, in turn: apply its diff, run S, reset (S41-12).
71
- - An attempt is never scored in its own worktree: that worktree has no untracked task `.venv`, and a shared editable venv would test attempt A's `src/`.
72
- - **Disqualify an attempt when:** its session was killed or ended in error; its diff is empty (without already_done evidence); or its diff edits or deletes an existing test function or a Wall file (seal.ts weakened-test rule).
73
- - **Rank lexicographically:**
74
- 1. Wall passes, descending.
75
- 2. Deterministic-fail count in S (conditions 1 to 3 and 5), ascending.
76
- 3. Pass count in S on the project interpreter, descending.
77
- 4. Flaky count, ascending.
78
- 5. Lint fails, ascending.
79
- 6. Diff size (added plus deleted non-blank lines), ascending.
80
- 7. Attempt index, ascending.
81
- - **Early accept:** the first finished attempt with S non-empty and every S and Wall check `pass` is accepted, and the other session is killed. The killed session is still priced (partial-stream).
82
- - **Gate:** two attempts only for size `normal` when the predicted S (Wall enabled, or impacted tests from named or relevant files) is non-empty. With no selector there is no second attempt.
83
- - **Fallback:** if both attempts are disqualified, keep A. Verify and Seal decide as usual.
84
-
85
- ## 5. Slice cards
86
-
87
- Each card lists: goal; files; Wall check (red first, then the eval measurement); tier and budget; dependencies; net core lines.
88
-
89
- ### Wave 1 (start now: measurement, harness fixes, moat P0; 7 cards, disjoint files)
90
-
91
- **S41-01 Harness: cost, knobs, row fields.**
92
- - Goal:
93
- - (a) `provider_cost` accepts `cost_source` of `provider` or `partial-stream` and records `cost_partial_usd`.
94
- - (b) The allowlist gains `LOKI_E10_CASCADE`, `_TOP_MODEL`, `_ATTEMPTS`, `_TRIM`, `_PREFIX`, `_CONTEXT` and `_WALL_PARALLEL` now, so no later card touches harness.py.
95
- - Rows gain: `tier` (from `_task_tier`); `tokens{input, cache_read, cache_write, output}` (raw from `arm_stdout` usage, v10 from `cost` events with a `by_stage` split); `first_turn_prompt_tokens` from result-cost files when present; and `escalations` and `attempts` from events.
96
- - Files: eval/loki10/harness.py, eval/loki10/test-harness.sh.
97
- - Wall check:
98
- - Red first: a fixture efficiency dir with one partial-stream record gives `cost_usd` None before the change and a number after. `LOKI_E10_CASCADE=0` reaches `arm_env` output.
99
- - Positive controls: pricing the preserved E-98f null row (e98f-engine/default-r1/pub-werkzeug-3121, `iteration-2.json` usd 0.0628) gives non-null, and re-pricing all three preserved E-98f arms from e98f-engine gives the first full cost table (deliverable; no eval spend). It decides whether "cheapest capable model" survives: nocascade's unreliable lower bound ($0.32) sits below default's ($0.70). The token harvest over ev15-raw-claude-r1/r2 and ev15-engine reproduces 4.79M raw and 9.23M v10-implement cache reads (MEDIUM-ANALYSIS section 4) to within 1%.
100
- - HIGH (measuring instrument); 30 min. Dependencies: none. Core: 0.
101
-
102
- **S41-02 Scorecard tool.**
103
- - Goal: `eval/loki10/scorecard <label=results.jsonl>... [--append docs/v10/METRICS.md]` prints one table per tier, per section 2.
104
- - Files: eval/loki10/scorecard (python; imports harness `dedupe` and `nearest_rank`), eval/loki10/test-scorecard.sh.
105
- - Wall check:
106
- - Red first: synthetic rows cover every mark colour, n/a-is-red, and refusal on unequal task sets or harness hashes.
107
- - Positive control: replaying the preserved E-98f files reproduces 15/21 at 209s, 16/21 at 214s and 15/21 at 138s. Replaying EV-15 reproduces raw 10/14 and v10 9/14.
108
- - MEDIUM; 30 min. Dependencies: none (reads the S41-01 fields when present). Core: 0.
109
-
110
- **S41-03 Arm runner plus auth guard (fixes c).**
111
- - Goal: `eval/loki10/scorecard-run.sh --tier T --n N --arms raw-sonnet,raw-opus,loki-sonnet,loki-opus --out DIR`.
112
- - Runs arms back to back with pinned ids (section 3), the same `--parallel` for all, and one `--out` per rep.
113
- - Before each arm and rep it reads only the keychain `expiresAt`, never the token. If fewer than cap x ceil(tasks/parallel) + 600 s remain, it waits until expiry is under 300s, runs one operator `claude -p ok --model claude-haiku-4-5` to force a refresh, and re-reads.
114
- - Documents the arms in README.md.
115
- - Files: eval/loki10/scorecard-run.sh, eval/loki10/test-scorecard-run.sh, eval/loki10/README.md.
116
- - Prefers `ANTHROPIC_API_KEY` when set (`arm_auth` already takes it first). The under-300s refresh threshold is unverified (E-98f saw no refresh at about 415s), so the card starts with one live check of `expiresAt` before and after the operator call.
117
- - Wall check: red first, a stub `security` and `claude` with expiry 900s shows the wrapper waits, refreshes and never starts run.sh early. A dry run prints the 4 pinned commands.
118
- - HIGH (auth); 30 min. Dependencies: none. Core: 0.
119
-
120
- **S41-04 First-turn prefix measurement.**
121
- - Goal: the SDK stream parser records the first assistant message's `input + cache_creation + cache_read` as `first_turn_prompt_tokens` in the result-cost file.
122
- - Files: loki-ts/src/runner/sdk_stream_parser.ts and its test under loki-ts/tests/runner/.
123
- - Wall check: red first, a 3-message fixture stream gives the first message's sum, not the total. Then one loki-sonnet run of 1 small and 1 medium task records the per-stage prefix in METRICS.md.
124
- - LOW; 15 min. Dependencies: none. Core: 0.
125
-
126
- **S41-05 Attempt-selection rule (pure function).**
127
- - Goal: `selectAttempt(attempts, S, wall)` in e10ext/select.ts, implementing section 4 exactly. Adds the e10ext cap to budget.test.ts.
128
- - Files: loki-ts/src/e10ext/select.ts, loki-ts/tests/e10ext/select.test.ts, loki-ts/tests/engine10/budget.test.ts.
129
- - Wall check: red first, one test per rank key, per disqualifier, for early accept and for "attempt-authored test ignored". Mutating any key order turns a test red.
130
- - MEDIUM; 30 min. Dependencies: the section 1 ruling. Core: 0.
131
-
132
- **S41-12 Tree swap helper.**
133
- - Goal: `snapshotDiff`, `resetToBase` and `applyDiff` in e10ext/treeswap.ts, for the primary tree.
134
- - Covers tracked and untracked files; excludes `.loki/`, `.venv/`, `venv/` and the attempts dir.
135
- - Snapshots are in memory or under runDir, never `git stash` (the stash stack is shared across worktrees).
136
- - Attempt worktrees live under `<runDir>/attempts/` and are removed by exact path.
137
- - Files: loki-ts/src/e10ext/treeswap.ts and its test.
138
- - Wall check: red first, a round trip over a fixture with a modified, a new and a deleted file plus a venv restores the tree byte for byte, and `git status` is clean after reset. A mutation that skips untracked files goes red.
139
- - HIGH (it feeds what Seal sees); 45 min. Dependencies: none. Core: 0.
140
-
141
- **S41-16 P0: Wall red-on-base is vacuous without `python` (confirmed).**
142
- - Found: wall.ts `RealBaseTestRunner` runs `RUNNER_CMD.pytest = "python -m pytest -q <files>"` through `/bin/sh`; any throw counts as `fail`. On this host `command -v python` finds nothing and `/bin/sh -c 'python -m pytest ...'` exits 127, so every pytest Wall test "fails on base" by launch error: red-first is vacuous and the clean-base `already_satisfied` path can never fire. It also skips the task venv (E-98a's verify defect, still live in Wall).
143
- - Goal: the base runner uses verify `runnerCmd` (project interpreter first); a missing tool or exit 127 is `not_run`, which refuses the seal (NOT PROVEN), never counts as red. Delete the `RUNNER_CMD` table.
144
- - Files: loki-ts/src/engine10/stages/wall.ts and its test.
145
- - Wall check: red first, with no `python` on PATH and a `.venv` shim, a Wall test that passes on base is sealed today and refused after; with no interpreter at all the result is not_run. Eval: medium n=2, report Wall seal count against E-98f.
146
- - HIGH (moat); 30 min. Dependencies: none. Core: -3.
147
-
148
- ### Wave 2 (after S41-01 to S41-04 merge; 5 cards)
149
-
150
- **S41-06 Baseline scorecard (eval only).**
151
- - Goal: run small and medium, n=2, all 4 arms through S41-03, and append the "before" tables through S41-02. This is the reference for every later card.
152
- - Files: docs/v10/METRICS.md.
153
- - Wall check: every row has a non-null cost, or the table says n/a with the row ids. Raw rows are reused later only while the harness hash matches.
154
- - MEDIUM; 90 min of eval. Dependencies: S41-01 to S41-04. Core: 0.
155
-
156
- **S41-07 Plan on the cheap model.**
157
- - Goal: with the cascade on, plan pins `model: cascadeImplementModel()`, the same pin Wall and intake already use (wall.ts:139, already_done.ts:177).
158
- - Files: loki-ts/src/engine10/stages/plan.ts and its test.
159
- - Wall check: red first, a session-options test shows the plan model is sonnet under `LOKI_MODEL_OVERRIDE=claude-opus-5-5`. Eval: loki-opus on medium, n=2; plan cost per run down at least 60% against S41-06, completion not lower.
160
- - MEDIUM; 15 min. Dependencies: S41-06 for the eval. Core: +1.
161
-
162
- **S41-08 Top model and deterministic-failure escalation.**
163
- - Goal: `LOKI_E10_TOP_MODEL` (an alias, default `opus`, through `resolveModelAlias`) replaces `ctx.model` as the escalation target. `isDeterministicFailure(prevVerify, verify, baseTests, wallPaths)` in e10ext/escalate.ts implements section 4. verify.ts records `exit_code` per check.
164
- - Files: loki-ts/src/e10ext/escalate.ts, loki-ts/src/engine10/stages/fix.ts, loki-ts/src/engine10/stages/verify.ts, and their tests.
165
- - Wall check:
166
- - Red first: flaky, not_run, lint, system-interpreter, exit 5 and attempt-authored failures never escalate. A reproduced project-interpreter fail escalates in round 2, and loki-sonnet reaches opus where today it cannot.
167
- - Eval: loki-sonnet on medium, n=2; report the escalation rate and the cost share of escalated rounds.
168
- - HIGH (verify); 45 min. Dependencies: S41-06. Core: +4.
169
-
170
- **S41-09 Lean stable prefix (flag).**
171
- - Goal: `LOKI_E10_PREFIX=lean` gives engine10 sessions a short fixed string system prompt instead of the `claude_code` preset. The tool list is unchanged.
172
- - Files: loki-ts/src/runner/providers.ts and its test.
173
- - Wall check:
174
- - Red first: the options test shows `systemPrompt` is a string under the flag and the preset without it.
175
- - Eval: `first_turn_prompt_tokens` down at least 40% on every stage; completion on medium, n=2, not below S41-06.
176
- - Kill criterion: if S41-04 shows the prefix is under 10% of implement cache reads, close with the measurement and build nothing.
177
- - MEDIUM; 30 min. Dependencies: S41-04. Core: 0.
178
-
179
- **S41-14 Wall in parallel with implement (item 4, promoted for speed).**
180
- - Goal:
181
- - FLOW becomes `intake, plan, [wall, implement], verify`.
182
- - Wall still writes only in its temp dir. Its copy-in and its red-on-base check run after implement completes: snapshot, reset to base, run the Wall tests (they must fail), restore.
183
- - The `already_satisfied` short-circuit moves to that post-implement check.
184
- - Files: loki-ts/src/engine10/machine.ts, loki-ts/src/engine10/stages/wall.ts, and their tests.
185
- - Wall check: red first, implement's `stage.started` precedes Wall's `stage.completed`, sealed sha256 values are unchanged, and a Wall test passing on base is still refused after the move. Eval: medium p50 not worse than S41-06, completion not lower, and report Wall's share of wall-clock. E-98f argues against a big win: nowall p50 214s against default 209s, nocascade (opus implement) 138s, so the time is in implement, not Wall.
186
- - HIGH (moat: the red-first Wall); 45 min. Dependencies: S41-12, S41-16. Core: +6.
187
-
188
- ### Wave 3 (2 cards)
189
-
190
- **S41-10 Relevant context and a static-first brief.**
191
- - Goal: the implement and fix briefs:
192
- - put the fixed rules first, as a block that is byte-identical across stages and runs;
193
- - replace the first 200 repo paths (`repoMapText`) with up to 20 relevant files: plan `relevant_files`, else `selectRelevantFiles` over the tree-keyed cached map (cache.ts `repomap-<tree>.json`);
194
- - add their impacted tests, with one exact command per test from verify `runnerCmd` (project interpreter included).
195
- - Files: loki-ts/src/e10ext/context.ts, loki-ts/src/engine10/stages/implement.ts, loki-ts/src/engine10/stages/fix.ts, and their tests.
196
- - Wall check: red first, the brief for a 2,000-file fixture is under 3 KB and names `.venv/bin/python -m pytest -q <test>`. Eval: loki-sonnet on medium, n=2; implement cache reads per completed down at least 30% against S41-06, completion not lower.
197
- - MEDIUM; 30 min. Dependencies: S41-08 (fix.ts). Core: +1.
198
-
199
- **S41-11 Rule-based trajectory trimming (flag).**
200
- - Goal: `LOKI_E10_TRIM=1` adds a PostToolUse hook that returns `updatedToolOutput`. It only shortens new results; rewriting history would break the cache prefix and is out of scope.
201
- - Rules:
202
- - A Bash result over 200 lines keeps the first 40 and the last 120, plus a `[loki trimmed N lines]` marker.
203
- - A Read over 400 lines keeps the first 400.
204
- - A Grep over 100 matches keeps the first 100.
205
- - From tool call 25 on, the limits halve.
206
- - A Bash command that exits nonzero always keeps its last 120 lines.
207
- - Files: loki-ts/src/runner/trim.ts, loki-ts/src/runner/providers.ts, and their tests.
208
- - Wall check: red first, each rule, the nonzero-exit tail guarantee, and unchanged pass-through when the flag is off. Eval: implement cache reads per completed down at least 25% on medium, n=2, completion not lower.
209
- - MEDIUM; 30 min. Dependencies: S41-09 (providers.ts). Core: 0.
210
-
211
- ### Wave 4 (1 card)
212
-
213
- **S41-13 Two parallel attempts (flag).**
214
- - Goal: with `LOKI_E10_ATTEMPTS=2`, implement runs 2 cheap-model sessions concurrently when the section 4 gate allows.
215
- - A runs in repoDir; B runs in a detached worktree at baseSha under runDir.
216
- - Each is scored in the primary tree through S41-12. S41-05 picks the winner, which is applied to repoDir. Verify and Seal then run as today.
217
- - A check that failed in both attempts feeds S41-08 condition 6.
218
- - Files: loki-ts/src/e10ext/attempts.ts, loki-ts/src/engine10/stages/implement.ts (hook), and their tests.
219
- - Wall check:
220
- - Red first: fake sessions cover early accept, full ranking, the both-disqualified fallback, and gate-off with no selector. For a run with a killed attempt, the sum of `cost` events equals the harness `cost_usd`.
221
- - Eval: loki-sonnet on medium, n=3 (E-98f's n); completion at least 18/21 (raw's best rate, EV-14), and the tier verdict not red on cost.
222
- - HIGH; 45 min. Dependencies: S41-05, S41-08, S41-10, S41-12. Core: +6.
223
-
224
- ### Wave 5 (1 card)
225
-
226
- **S41-15 After scorecard and defaults.**
227
- - Goal: rerun S41-06 with every flag. Flip a flag's default in `sizing.ts` only when the tier verdict with it is at least as green as without it, on both small and medium.
228
- - Files: loki-ts/src/engine10/sizing.ts, docs/v10/METRICS.md.
229
- - Wall check: the before and after tables sit side by side in METRICS.md. The D41 flip happens only on green for small and medium. The headline row (loki-sonnet against raw-opus) is reported either way.
230
- - HIGH (default flow); 90 min of eval plus 15 min of code. Dependencies: all of the above. Core: +3.
231
-
232
- **Core total:** -3 +1 +4 +6 +1 +6 +3 = +18 of 35 headroom. A card over its estimate offsets the excess in the same slice (D33). **Wave counts:** W1 7, W2 5, W3 2, W4 1, W5 1 (16 cards). Only S41-06 and S41-15 are eval-only.
233
-
234
- ## 6. Risks
235
-
236
- - **Seal accuracy (top risk).** S41-12, S41-13 and S41-14 change which tree Seal sees and when the Wall is proven red, so a treeswap bug could seal an unverified tree. Guards: verify and Seal always re-run on the final primary tree; Seal's sha256 check on Wall files is unchanged; red-on-base stays mandatory, only later; each card carries a mutation test that must go red.
237
- - **Wall red-on-base is vacuous today (S41-16).** Until it merges, Wall seals on this host prove nothing about red-first; S41-14 must not move the check before S41-16 lands.
238
- - **Cost measurement.** Partial-stream dollars are estimates: the share is shown, and over 20% is flagged. Attempts and killed sessions write cost from two cwds; S41-13's event-sum check guards this. Without S41-01, every null row keeps cost red forever.
239
- - **Attempts can raise cost.** Implement is already 69% of v10 spend. Two attempts pay off only if S41-10 and S41-11 cut per-attempt reads first and early accept often kills B. S41-15 keeps the flag off unless the verdict says otherwise.
240
- - **p50 comparability.** E-98f ran up to 12 concurrent sessions against EV-15's 3. The scorecard refuses unequal `--parallel`, arms run back to back, and keychain waits fall outside the timed rows.
241
- - **Noise.** At n=21 one run flips a mark; the table prints n. **Escalation starvation:** condition 6 delays opus to round 2; the eval reports the share of round-2 wins that escalation bought.
242
- - **Accuracy regressions from trimming and a lean prefix.** Both are flags with completion floors in their Wall checks. Trimming never cuts a failing command's tail.
243
-
244
- ## 7. Later waves (items 3 to 5, sketches only)
245
-
246
- **Item 3, repo memory.** Extend cache.ts's per-repo dir (maps already keyed by tree) with the verified build and test command per runner (the one that ran on the project interpreter), the flaky list (`recordFlaky` exists), the top failure causes (`topFailures` exists, but only the brief reads it) and conventions mined from accepted diffs. Inject one fixed-size block into S41-10's static-first brief. Measure cold against warm: the same task twice, cache wiped then kept; warm must be cheaper and faster on the scorecard.
247
-
248
- **Item 4, speed.** Wall in parallel is S41-14. Still to do: cache dependency install by lockfile hash (venv or node_modules restored by `sha256(lockfile)`), keep fast verify to impacted tests only with a cap on the changed-test-files list, and pipeline plan into implement on the lean path. Target: p50 at or below raw on every tier.
249
-
250
- **Item 5, backlog throughput.** `loki <label|milestone>` fetches N issues (fetch_issue.ts) and runs one supervisor per issue, each in its own worktree with a single writer, opening one PR per issue. Total spend and concurrency are bounded by the D39 usage governor. Measure issues per hour and cost per merged PR against raw run serially.
@@ -1,98 +0,0 @@
1
- # Founder prompt: the swarm (2026-09-26)
2
-
3
- Verbatim, as given. `docs/v10/SWARM.md` records what was adopted, the
4
- reconciliations required by CLAUDE.md and the build prompt (D12, D13), and
5
- why. Read SWARM.md first; this file is the historical source text.
6
-
7
- ---
8
-
9
- ultracode
10
-
11
- Switch the v10 build from one loop to a coordinated swarm. Goal: 10-20x more releases per day than cycles 1-4 (about 3 releases in 18 hours), without weakening anything in docs/LOKI-10-BUILD-PROMPT.md sections 2, 5b and 5c. Every "never do" rule still applies. Save this prompt as docs/v10/SWARM.md and follow it until the v10 definition of done.
12
-
13
- Why it is slow (docs/v10/PROGRESS.md): each cycle batches 3-6 slices into one release. It reviews the whole batch in serial council rounds (cycle 1 took 9 rounds, cycle 3 took 6). Then it verifies every channel before the next cycle starts. So each release waits on the slowest slice and on every round.
14
-
15
- ROLES. All roles are agents you spawn through Workflow. You are the orchestrator, and the only one who writes FOUNDER-QUEUE.md.
16
-
17
- 1. Product Owner (1 agent; writes docs/v10/BACKLOG.md and docs/v10/BOARD.md, never code).
18
- - Ranks the backlog per build prompt section 3.
19
- - Cuts work into release-sized slices. Each slice has:
20
- - under about 300 changed lines;
21
- - one owner;
22
- - a declared file set that overlaps no other in-flight slice;
23
- - acceptance checks written before building (the Wall);
24
- - a risk tier.
25
- - Keeps twice the builder count of ready slices queued, so builders never wait.
26
-
27
- 2. Builders (6-10 in parallel; isolation: worktree; one slice each; single writer).
28
- - Implement with red-then-green tests.
29
- - Run diff-scoped tests plus tests/moat in the worktree.
30
- - Return the patch and its evidence.
31
- - Never touch main or VERSION, and never edit outside the declared file set. If that is needed, return BLOCKED and let the PO re-slice.
32
-
33
- 3. Reviewers (read-only, parallel, diff-scoped, tiered by risk). Each finding must come with a reproduction.
34
- - HIGH tier (verifier, Seal, gates, council, exit codes, auth, secrets, tests/moat): 3 reviewers with different lenses (correctness, security/bypass, fail-closed), plus 1 adversarial reviewer told to find a false pass. APPROVE needs 3 of 4.
35
- - MEDIUM tier (runtime, CLI behavior, dashboard logic): 2 reviewers.
36
- - LOW tier (docs, copy, tests only, UI without a data path, deleting unreachable code): 1 reviewer.
37
- - The builder fixes findings in the same worktree. After 3 rounds, the slice goes back to the PO to be cut smaller. It never blocks the line.
38
-
39
- 4. Release Captain (exactly 1; the only agent allowed to write main, bump VERSION, tag or publish). It runs a serial merge queue. For each approved slice:
40
- - Rebase onto origin/main.
41
- - Run bash scripts/local-ci.sh (fast tier) and tests/moat. The ratchet must not regress; if it does, refuse the merge.
42
- - Stage by name, commit with the asklokesh identity, push.
43
- - Cut a release through scripts/release.sh.
44
- - Wait for the previous release's required-ci (Tests, Bun Parity, Security Audit) to go green before bumping VERSION again, so releases never cancel each other's CI (the v9.7-v9.9 failure).
45
- - If several slices are waiting, ship them together as one version rather than wait.
46
- - On a code conflict, send the slice back to its builder with the new base. Never resolve code conflicts itself.
47
-
48
- 5. Channel Verifier (1, async, read-only).
49
- - After each release, check: npm latest and gitHead, the tag, the GitHub release, Docker amd64/arm64, the Homebrew sha256, and a smoke test from a fresh PATH.
50
- - Never block the next merge.
51
- - A failure becomes a HIGH-priority fix-forward slice. Never unpublish or delete a version.
52
-
53
- ORCHESTRATION
54
- - Run repeated Workflow waves. In each wave, the PO produces up to 10 slices, then run: pipeline(slices, build -> verify -> review/fix loop -> captain queue).
55
- - Use pipeline, not barriers. A LOW slice ships while a HIGH slice is still in review.
56
- - In the script, serialize the Captain with a promise chain, so exactly one merge or release runs at a time.
57
- - Agents coordinate through BOARD.md (slice id, owner, file set, tier, status, blockers) and through structured return values. Only the PO and the Captain write BOARD.md.
58
- - Start the next wave as soon as the PO has ready slices. Never wait on channel verification.
59
-
60
- SPEED LEVERS, in order
61
- 1. One slice, one release.
62
- 2. Risk-tiered review; most slices are LOW or MEDIUM.
63
- 3. Parallel reviewers per slice instead of serial whole-batch rounds.
64
- 4. Asynchronous channel verification.
65
- 5. Diff-scoped tests while building; the full fast tier plus moat runs only at merge.
66
- 6. Flaky tests: rerun once, record it, open a slice. Never pass a flake silently (see BACKLOG 93).
67
-
68
- GUARDRAILS (restated, because speed pressure erodes them)
69
- - When goals conflict: moat > Seal accuracy > delivered accuracy > cost > speed.
70
- - The moat ratchet never regresses on main.
71
- - If two releases in a row fail required-ci, stop releasing, fix main, then resume.
72
- - No force push. Never delete versions. Never disable tests.
73
- - The swarm spends faster. Log spend per wave in METRICS.md. If a wave would push past founder-queue item 3, drop to 3 builders, keep shipping LOW slices, and add one founder-queue line asking for a higher budget.
74
-
75
- METRICS (append to METRICS.md after every wave)
76
- - releases in the last 24h
77
- - median slice lead time (ready to npm)
78
- - review rounds per slice, by tier
79
- - moat proven count
80
- - required-ci failures
81
- - spend
82
-
83
- Target: at least 30 releases per 24h at steady state, with the moat proven count never decreasing.
84
-
85
- START NOW
86
- 1. Write docs/v10/SWARM.md and docs/v10/BOARD.md.
87
- 2. Have the PO slice the top of the backlog: BACKLOG 94-98, P9 Rule of Two, and M0 measurement (claude-opus-5-5 in the model catalog, the seeded-defect corpus, the adoption eval).
88
- 3. Launch wave 1.
89
- 4. After each wave, append a wave entry to PROGRESS.md.
90
-
91
- ---
92
-
93
- **Note on step 2 of START NOW:** BACKLOG 94-98, P9, and the model-catalog half
94
- of M0 were already done or in flight when this prompt arrived (P9 fully done
95
- awaiting a validation PR; P4's catalog and three-setups cases done awaiting
96
- review; BACKLOG 95 and 97 fixed on main; 96 and 98 partly fixed by the P7
97
- sweep). Wave 1's real seed is the actual repo state at adoption time, recorded
98
- in `docs/v10/BOARD.md`, not this stale list.