loki-mode 11.74.2 → 11.75.1

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 (166) 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/browser-open.sh +1 -1
  8. package/autonomy/lib/chat.sh +1 -1
  9. package/autonomy/lib/cockpit-render.sh +1 -1
  10. package/autonomy/lib/done-recognition.sh +4 -4
  11. package/autonomy/lib/efficiency_cost.py +1 -1
  12. package/autonomy/lib/engine10-push.sh +2 -2
  13. package/autonomy/lib/prd-enrich.sh +1 -1
  14. package/autonomy/lib/proof-check.sh +1 -1
  15. package/autonomy/lib/proof-generator.py +3 -3
  16. package/autonomy/lib/proof-pr.sh +1 -1
  17. package/autonomy/lib/skill-link-heal.sh +1 -1
  18. package/autonomy/lib/voter-agents.sh +1 -1
  19. package/autonomy/loki +26 -37
  20. package/autonomy/prd-checklist.sh +1 -1
  21. package/autonomy/receipt_jwt.py +1 -1
  22. package/autonomy/run.sh +28 -28
  23. package/autonomy/trigger-schedule.py +6 -414
  24. package/autonomy/tui.sh +1 -1
  25. package/autonomy/verify.sh +4 -4
  26. package/completions/loki.bash +0 -5
  27. package/dashboard/__init__.py +1 -1
  28. package/docs/ARCHITECTURE.md +1 -2
  29. package/docs/CLI-REFERENCE.md +1 -1
  30. package/docs/COMPONENTS.md +1 -1
  31. package/docs/INSTALLATION.md +1 -1
  32. package/docs/ROUTING-EVIDENCE.md +1 -2
  33. package/docs/V10-RESEARCH.md +1 -1
  34. package/docs/dev/architecture-reference.md +3 -7
  35. package/docs/dev/project-structure.md +1 -4
  36. package/docs/dev/release-checklist.md +13 -31
  37. package/docs/research-2026-07/OBSERVABILITY-TOOL-SPEC.md +1 -1
  38. package/docs/v11/MARKET-SLICES.md +1 -1
  39. package/docs/v11/REGISTRIES.md +1 -1
  40. package/docs/v11/ROUTER-1.md +2 -2
  41. package/loki-ts/dist/loki.js +2 -2
  42. package/mcp/__init__.py +1 -1
  43. package/package.json +2 -2
  44. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  45. package/skills/extending.md +2 -3
  46. package/skills/factory-operations.md +11 -18
  47. package/skills/release-cadence.md +2 -2
  48. package/web-app/dist/assets/{AdminPage-jkjilfbl.js → AdminPage-xKgtIhk2.js} +1 -1
  49. package/web-app/dist/assets/{Avatar-bd5JWkSJ.js → Avatar-Q14AHox9.js} +1 -1
  50. package/web-app/dist/assets/{Badge-DVRit2Xw.js → Badge-yk5M-lip.js} +1 -1
  51. package/web-app/dist/assets/{Button-BNAB-pVZ.js → Button-ynznk0At.js} +1 -1
  52. package/web-app/dist/assets/{CockpitPage-DpG29h_w.js → CockpitPage-C8B765za.js} +1 -1
  53. package/web-app/dist/assets/{ComparePage-Dasg5V41.js → ComparePage-DqzmWKnf.js} +1 -1
  54. package/web-app/dist/assets/{ErrorBoundary-DJojse6b.js → ErrorBoundary-DdBPd_Lq.js} +1 -1
  55. package/web-app/dist/assets/{EvidenceReceiptPanel-Blxw7_u1.js → EvidenceReceiptPanel-jb4Tp38b.js} +1 -1
  56. package/web-app/dist/assets/{GitHubIssuesPanel-BBvSFj80.js → GitHubIssuesPanel-xJQiLcxs.js} +1 -1
  57. package/web-app/dist/assets/{GitHubPRsPanel-BCIKeSBg.js → GitHubPRsPanel-84W3Dhk_.js} +1 -1
  58. package/web-app/dist/assets/{HomePage-C7d__oNG.js → HomePage-St1Xl2tu.js} +2 -2
  59. package/web-app/dist/assets/{LoginPage-BXljL3yY.js → LoginPage-jRt0NUHb.js} +1 -1
  60. package/web-app/dist/assets/{MagicPage-Xjkts_yE.js → MagicPage-CQLFe7LR.js} +1 -1
  61. package/web-app/dist/assets/{MetricsPage-kQvVp-j2.js → MetricsPage-zzX9eTC5.js} +1 -1
  62. package/web-app/dist/assets/{NotFoundPage-D-4ZlEaO.js → NotFoundPage-DDu023SY.js} +1 -1
  63. package/web-app/dist/assets/{ProjectPage-DfzR5RXP.js → ProjectPage-D60UURaH.js} +3 -3
  64. package/web-app/dist/assets/{ProjectsPage-DFDsWzkV.js → ProjectsPage-DqVsKxlt.js} +1 -1
  65. package/web-app/dist/assets/{SettingsPage-CLPIoYT3.js → SettingsPage-G7pPKvo0.js} +1 -1
  66. package/web-app/dist/assets/{ShowcasePage-PZKkyGeY.js → ShowcasePage-CrU_aKgS.js} +1 -1
  67. package/web-app/dist/assets/{SystemSettingsPage-BsBlcnzo.js → SystemSettingsPage-ClKGQFsB.js} +1 -1
  68. package/web-app/dist/assets/{TeamsPage-BSjgNhoU.js → TeamsPage-B530vSNe.js} +1 -1
  69. package/web-app/dist/assets/{TemplatesPage-W2KeAzbg.js → TemplatesPage-COmv_Cqd.js} +1 -1
  70. package/web-app/dist/assets/{TerminalOutput-BjroTiCC.js → TerminalOutput-CufG9YzF.js} +1 -1
  71. package/web-app/dist/assets/{activity-BXZ5YYes.js → activity-Ct1Updr6.js} +1 -1
  72. package/web-app/dist/assets/{bell-D1urp5pa.js → bell-rcvhQuGr.js} +1 -1
  73. package/web-app/dist/assets/{bot-Chedf2bF.js → bot-DzeqEI-b.js} +1 -1
  74. package/web-app/dist/assets/{check-DhaCuOCV.js → check-zacnZHyC.js} +1 -1
  75. package/web-app/dist/assets/{chevron-left-D7BpQyA6.js → chevron-left-Lxnkl8Qg.js} +1 -1
  76. package/web-app/dist/assets/{circle-alert-DnGvQ_AQ.js → circle-alert-DoqSdQdB.js} +1 -1
  77. package/web-app/dist/assets/{clock-CqfxWhHM.js → clock-B7bJcVIC.js} +1 -1
  78. package/web-app/dist/assets/{cloud-BKxp5AWB.js → cloud-DdA9Bu6q.js} +1 -1
  79. package/web-app/dist/assets/{code-xml-BDQ6GBtt.js → code-xml-CAZEZ9T8.js} +1 -1
  80. package/web-app/dist/assets/{database-BmpEx1y_.js → database-Da2GkEIN.js} +1 -1
  81. package/web-app/dist/assets/{dollar-sign-DYNY9R_C.js → dollar-sign-DjDiG-37.js} +1 -1
  82. package/web-app/dist/assets/{file-code-corner-BJi0IBFd.js → file-code-corner-CSL-Jij-.js} +1 -1
  83. package/web-app/dist/assets/{file-plus-Dqyb2bcQ.js → file-plus-02DRA8pV.js} +1 -1
  84. package/web-app/dist/assets/{globe-DPh4RWfM.js → globe-CGyB90kK.js} +1 -1
  85. package/web-app/dist/assets/{hammer-B3xnuoA1.js → hammer-BaQB96TG.js} +1 -1
  86. package/web-app/dist/assets/{index-BpX8DcTr.js → index-lcoI1_Kk.js} +3 -3
  87. package/web-app/dist/assets/{layers-BRCmyCW8.js → layers-BWJBvoeg.js} +1 -1
  88. package/web-app/dist/assets/{loader-circle-n07Pky0M.js → loader-circle-CdcI0FeS.js} +1 -1
  89. package/web-app/dist/assets/{lock-BWqOuQmS.js → lock-BBkw5NJx.js} +1 -1
  90. package/web-app/dist/assets/{package-BJlB_Z-Z.js → package-BpPRO3LM.js} +1 -1
  91. package/web-app/dist/assets/{plus-oH17BZu2.js → plus-D7XbyK29.js} +1 -1
  92. package/web-app/dist/assets/{refresh-cw-CPQ476LL.js → refresh-cw-DLG3hyAi.js} +1 -1
  93. package/web-app/dist/assets/{rotate-ccw-7hLvOcnS.js → rotate-ccw-Bqau4R_S.js} +1 -1
  94. package/web-app/dist/assets/{scroll-text-BCmLauQn.js → scroll-text-BtIL3cNk.js} +1 -1
  95. package/web-app/dist/assets/{server-DfTfvW84.js → server-tZCmZ4yH.js} +1 -1
  96. package/web-app/dist/assets/{shield-alert-CaeGRq19.js → shield-alert-K5JXzFKg.js} +1 -1
  97. package/web-app/dist/assets/{thumbs-up-Dz-l2GPC.js → thumbs-up-CHCVyJdw.js} +1 -1
  98. package/web-app/dist/assets/{trash-2-B-OsDmSo.js → trash-2-DncNxVq0.js} +1 -1
  99. package/web-app/dist/assets/{trending-down-CXTFOxzq.js → trending-down-D8Bp0azX.js} +1 -1
  100. package/web-app/dist/assets/{trending-up-FQEdqr3v.js → trending-up-AixETdKR.js} +1 -1
  101. package/web-app/dist/assets/{upload-CacWSNTg.js → upload-VCbjFn2H.js} +1 -1
  102. package/web-app/dist/assets/{usePolling-cIjZ9qd2.js → usePolling-CQvKD2Jj.js} +1 -1
  103. package/web-app/dist/assets/{user-DAouWFHi.js → user-SK-YguQ6.js} +1 -1
  104. package/web-app/dist/index.html +1 -1
  105. package/autonomy/company-seats.json +0 -82
  106. package/docs/COMPETITIVE-INTEL-2026-09.md +0 -444
  107. package/docs/FOUNDER-DECISIONS-TRUST-SEMANTICS-2026-08-01.md +0 -145
  108. package/docs/FOUNDER-STATUS-AND-DECISIONS-2026-07-01.md +0 -132
  109. package/docs/LOKI-10-BUILD-PROMPT.md +0 -350
  110. package/docs/STRATEGY-2026-2028.md +0 -124
  111. package/docs/V10-VISION.md +0 -161
  112. package/docs/v10/ADOPTION-PLAN.md +0 -375
  113. package/docs/v10/ARCHITECT-CUTS.md +0 -744
  114. package/docs/v10/BACKLOG.md +0 -231
  115. package/docs/v10/BOARD.md +0 -1403
  116. package/docs/v10/CONTROL-PLANE.md +0 -120
  117. package/docs/v10/CONTROL.md +0 -36
  118. package/docs/v10/CP-ASK-PLAN.md +0 -85
  119. package/docs/v10/CP-ENTERPRISE-UI.md +0 -537
  120. package/docs/v10/D51-PHASE-B.md +0 -120
  121. package/docs/v10/D61-SPEED.md +0 -105
  122. package/docs/v10/D63-CARDS.md +0 -354
  123. package/docs/v10/DECISIONS.md +0 -915
  124. package/docs/v10/E2E-D65.md +0 -123
  125. package/docs/v10/ENGINE-LAWS.md +0 -163
  126. package/docs/v10/ENGINE-MEASURE.md +0 -69
  127. package/docs/v10/ENGINE.md +0 -743
  128. package/docs/v10/FAILURE-CLASSES.md +0 -2026
  129. package/docs/v10/FC21B-FC22-PLAN.md +0 -107
  130. package/docs/v10/FIRST-RUN-GATE.md +0 -39
  131. package/docs/v10/FOUNDER-QUEUE.md +0 -29
  132. package/docs/v10/GAP-RESEARCH-1003.md +0 -32
  133. package/docs/v10/GUARDS.md +0 -883
  134. package/docs/v10/L0-WAVE1.md +0 -81
  135. package/docs/v10/LEGACY-REMOVAL.md +0 -408
  136. package/docs/v10/MEDIUM-ANALYSIS.md +0 -346
  137. package/docs/v10/METRICS.md +0 -645
  138. package/docs/v10/MODERNIZE.md +0 -437
  139. package/docs/v10/OPENCODE-PARITY-PLAN.md +0 -84
  140. package/docs/v10/OPERATING-MODEL.md +0 -60
  141. package/docs/v10/PLAN-V12.md +0 -896
  142. package/docs/v10/PROGRESS.md +0 -2735
  143. package/docs/v10/RELEASE-11.md +0 -77
  144. package/docs/v10/RETRO-2026.md +0 -650
  145. package/docs/v10/ROADMAP-D63.md +0 -35
  146. package/docs/v10/SCALE.md +0 -140
  147. package/docs/v10/SCORECARD-PLAN.md +0 -250
  148. package/docs/v10/SWARM-PROMPT.md +0 -98
  149. package/docs/v10/SWARM.md +0 -293
  150. package/docs/v10/cp-redesign/PARITY.md +0 -188
  151. package/docs/v10/cp-redesign/legacy/INDEX.md +0 -1167
  152. package/docs/v10/roadmap-10/01-measurement.md +0 -113
  153. package/docs/v10/roadmap-10/02-cost.md +0 -75
  154. package/docs/v10/roadmap-10/03-speed.md +0 -65
  155. package/docs/v10/roadmap-10/04-first-run.md +0 -61
  156. package/docs/v10/roadmap-10/05-deploy.md +0 -61
  157. package/docs/v10/roadmap-10/06-stability.md +0 -64
  158. package/docs/v10/roadmap-10/07-quality.md +0 -57
  159. package/docs/v10/roadmap-10/08-proof.md +0 -48
  160. package/docs/v10/roadmap-10/09-safety.md +0 -74
  161. package/docs/v10/roadmap-10/README.md +0 -1464
  162. package/skills/sdlc-fleet.md +0 -170
  163. package/tools/cockpit/SPEC.md +0 -275
  164. package/tools/cockpit/index.html +0 -146
  165. package/tools/cockpit/roi-basis.json +0 -33
  166. package/tools/cockpit/server.py +0 -946
@@ -1,161 +0,0 @@
1
- # Loki Mode 10: the software factory enterprises just use
2
-
3
- ## One sentence
4
-
5
- **Give Loki the work. Get back shipped software, every change sealed.**
6
-
7
- ## What it is
8
-
9
- Loki Mode 10 combines the three things enterprises are buying separately today into one simple product:
10
-
11
- | They buy | For | Loki gives them |
12
- |---|---|---|
13
- | Cognition Devin | A teammate you assign work to | Assign work where you already are: an issue label, a comment, a Slack mention, or one command. |
14
- | 8090 Software Factory | Business intent traced to code, legacy understood | Every change is traced from requirement to acceptance check to code to Seal. Legacy systems get mapped and modernized against their own behavior. |
15
- | Factory.ai Droids | A fleet of agents across the SDLC, on any model, in your environment | A continuous line that works through a backlog in parallel, on any model, inside your perimeter, air-gapped if needed. |
16
- | Claude Code, Codex (raw agents) | A powerful agent in one developer's terminal | The same engines, but running as a team-level factory: backlog in, sealed changes out, with model choice and cost control across vendors. |
17
-
18
- **Why it can be 10x, not 1x.** Loki's work arrives with proof: a Seal that anyone can re-check offline. None of them offers this.
19
- - Devin guarantees hours saved, not correctness.
20
- - 8090's "receipts" live inside its platform.
21
- - Factory's proof stops at tests and PR review.
22
- - Claude Code and Codex leave verification to the developer who runs them.
23
-
24
- Proof is what lets an enterprise grant more autonomy. More autonomy is what turns an assistant into a factory.
25
-
26
- **What 10x means, measurably.** The north-star metric is **verified changes shipped per hour of human attention**, compared with a raw agent whose output a person must review by hand. Three multipliers stack:
27
- - parallel throughput (the line);
28
- - less human review per change (the Seal, and autonomy earned from it);
29
- - lower cost per verified change (routing to the cheapest capable model).
30
-
31
- The performance bar below sets a target for each of them. The 10x is the product of the three, measured and never asserted.
32
-
33
- ## Our relationship with Claude, Claude Code and other model vendors
34
-
35
- Claude Code and Codex are engines, and Loki runs on top of them. We do not compete on the model or on one developer's interactive agent loop. Every model upgrade makes Loki better for free.
36
-
37
- We compete on what a raw agent does not give an enterprise:
38
- - a continuous line across a whole backlog and many repos;
39
- - proof on every change;
40
- - autonomy that is earned, not granted blindly;
41
- - one cost view across every vendor;
42
- - freedom to switch models without switching tools.
43
-
44
- The rule is to ride the platform. When Claude Code or another engine ships a capability natively, Loki uses theirs and deletes its own copy. That keeps Loki lean and always current.
45
-
46
- Being "better than Claude Code" has to be measured, not claimed. On the same tasks with the same model, Loki must deliver more verified-correct changes per hour and per dollar than raw Claude Code does. See the performance bar below.
47
-
48
- ## The Apple principle: simplicity is the product
49
-
50
- Adoption comes from how little a user has to learn, not from how much the product can do.
51
-
52
- - **One install, one command.** `loki` in any repo just works. It finds the repo, the tracker and the model key. No config file is required.
53
- - **Three things a user ever does:**
54
- - give work;
55
- - glance at progress;
56
- - approve.
57
- Everything else is automatic or hidden.
58
- - **One artifact to trust:** a pull request with a Seal on it.
59
- - **One screen for leaders:** work in, work shipped, cost per sealed change, and what is waiting on a human.
60
- - **Defaults over knobs.** Every setting must earn its existence. When in doubt, delete it.
61
- - **It works where people already work.** That means GitHub, GitLab, Jira, Slack and the terminal. We do not ask anyone to adopt a new place to work.
62
-
63
- **The adoption bar, measured before every major release:**
64
- - A new user on a real repo gets to a first sealed pull request in under 10 minutes.
65
- - The user makes at most one decision along the way: providing a model key if none is found.
66
- - Zero required reading.
67
-
68
- ## The moat (never trade it for a feature)
69
-
70
- 1. **Portable proof.** A signed, diff-bound Seal that a third party verifies offline with only a public key. It records what was not proven as clearly as what was.
71
- 2. **An honest verdict.** Pass comes only from checks that actually ran. Models write checks and review; a model's opinion never produces a pass. Unknown is never a pass.
72
- 3. **The Wall.** Acceptance checks are written from the requirement by a step that never sees the implementation.
73
- 4. **Model freedom.** It works from the strongest model (Claude Opus 5.5) down to the cheapest capable one. A cheaper model can make the line slower. It must never make the Seal wrong.
74
- 5. **Sovereignty.** The whole factory runs inside the customer's perimeter with their own keys and models. The only thing that leaves is model calls, and only to the endpoints they choose.
75
- 6. **Runs where the code lives.** It works on existing and legacy codebases in place, not only greenfield apps.
76
- 7. **Honesty.** It publishes its own error rates and makes no claim it cannot reproduce. Every competitor that overclaims makes this more valuable.
77
- 8. **Load-bearing proof.** Every Seal proves the delivered code is what makes the checks pass: the changed code is disabled, and the checks must then fail.
78
- 9. **Safe by construction.** Untrusted text from issues and PRs never shares a step with secrets or the power to push.
79
-
80
- ## How the line runs
81
-
82
- 1. **Take work.** Work arrives as an idea, a requirement, an issue, a backlog, or an existing system.
83
- 2. **Understand.** The factory maps the system and the intent. It asks at most the questions that change the outcome, and records its assumptions.
84
- 3. **Plan.** It writes a plan a person can read in a minute. Acceptance checks are frozen before building.
85
- 4. **Build.** Parallel workers do the building, routed to the cheapest model that keeps the Seal rate up.
86
- 5. **Seal.** Every change is verified and signed.
87
- 6. **Ship.** It opens a pull request. It deploys only sealed changes, and only through a canary.
88
- 7. **Operate.** It watches shipped changes. A regression becomes new work, fixed through the same line.
89
- 8. **Earn autonomy.** Each agent and repo earns more freedom from its Seal record, and loses it on a failure in a protected area.
90
-
91
- ## Built on evidence
92
-
93
- Every design rule traces to research: the Wall, the deterministic verdict, per-step routing, the single writer, risk-tiered autonomy, and injection-safe intake. The sources are 2025-2026 papers from ICSE, ACL, ICLR and NeurIPS, preprints, and industry data from Meta, Google, METR and DORA, collected in `docs/V10-RESEARCH.md`.
94
-
95
- The two findings that matter most:
96
- - Agents that can see the checks build to the checks.
97
- - Models are better at writing tests than at judging code.
98
-
99
- That is why the Seal's verdict comes only from checks that run, written by a step that never saw the code.
100
-
101
- ## What we do not build
102
-
103
- - No IDE and no hosted preview sites.
104
- - No feature that works only as our SaaS.
105
- - No benchmark chasing.
106
- - No certification claims.
107
- - No setting that exists because we could not choose a default.
108
-
109
- ## The performance bar
110
-
111
- Accuracy, speed, efficiency and verification latency are all measured on an in-repo eval. Correctness is graded by hidden tests that neither Loki nor the comparison agent ever sees. The comparison arms are:
112
- - raw Claude Code on Opus 5.5;
113
- - raw Codex;
114
- - Loki at top-only, cheapest-only and routed.
115
-
116
- Factory, 8090 and Devin are closed products we cannot run. We compare against them only where they publish numbers, such as Factory's Legacy-Bench results, and we label those numbers vendor-claimed.
117
-
118
- | Axis | Target for v10 |
119
- |---|---|
120
- | Delivered accuracy | Higher verified-correct rate than raw Claude Code with the same model, on hidden tests |
121
- | Seal accuracy | Wrong passes at or below 1% (95% upper bound at or below 3%). Wrong fails at or below 5%. Holds at the cheapest model too. |
122
- | Verification latency | Fast check under 1 second on the changed code. A full Seal adds at most 60 seconds (median) on top of the project's own test time, using only the checks the change affects, run in parallel and cached. |
123
- | Speed, one item | Time to a sealed PR within 1.2x of raw Claude Code's time to an unverified PR |
124
- | Speed, a backlog | At least 3x the sealed-PR throughput of one raw Claude Code session |
125
- | Efficiency | Routed cost per verified-correct change at most half that of raw Claude Code on Opus 5.5 |
126
- | Adoption | First sealed PR in under 10 minutes, at most one decision |
127
-
128
- These are targets, not claims. We publish whatever the eval measures, including misses. A miss is fixed in the product, never in the wording.
129
-
130
- ## Metrics that matter
131
-
132
- | Metric | Definition |
133
- |---|---|
134
- | Time to first sealed PR | Fresh machine to first sealed pull request |
135
- | Seal rate | Share of changes that come back sealed |
136
- | Cost per sealed change | At top-only, cheapest-only and routed model setups |
137
- | Human touches per shipped change | How often a person had to step in |
138
- | Post-merge change-failure rate | Share of merged changes that later fail |
139
- | Seal error rates | Wrong passes and wrong fails, published |
140
- | Organic adoption floor | Daily installs on days we ship nothing (baseline about 94 per day, per `docs/STRATEGY-2026-2028.md`) |
141
-
142
- ## Honest risks
143
-
144
- - **The competitors are rich.**
145
- - Factory: $5B valuation.
146
- - Cognition: $26B valuation, $492M run-rate.
147
- - 8090: EY distribution.
148
-
149
- They also have sales teams and certifications. We win on simplicity, proof, model economics and sovereignty, not on headcount.
150
- - **GitHub or Factory could ship a portable signed receipt.** Our answers:
151
- - Interoperate on open standards (in-toto, Sigstore).
152
- - Stay neutral across GitHub, GitLab and Bitbucket.
153
- - Make the Seal part of a whole factory, not a standalone feature.
154
- - **No SOC 2 report and no sales motion yet.** Engineering can deliver readiness documents, not the audit or the team. These are founder decisions.
155
- - **The cheapest model may lower throughput.** Routing and escalation handle that, and the numbers get published.
156
- - **Anthropic or OpenAI build a factory into their own agents.** Our answers:
157
- - Stay model-neutral, which no model vendor can.
158
- - Ride their improvements instead of duplicating them.
159
- - Own the proof and the cross-vendor cost view.
160
-
161
- Sources for competitor figures: research of 2026-09-25 and `docs/COMPETITIVE-INTEL-2026-09.md`. Treat vendor figures as vendor-claimed.
@@ -1,375 +0,0 @@
1
- # Adoption plan: Tier 0 split (A-03)
2
-
3
- Architect: opus. Source: the founder directive (2026-09-30, from building to proving), wf3-verdict.txt, firstrun-repro/ (run1.log legacy `loki quick`, run2.log `LOKI_ENGINE=v10`), BOARD rows A-01 to A-04 and E-125, DECISIONS D12, D13, D33, D42, D44. Base: main 6ce04b0c.
4
-
5
- ## 0. Rules for every card
6
-
7
- - Gate assertions (A-02 `scripts/first-run-gate.sh`, bugrepo from firstrun-repro/bugrepo-original). Cards cite these IDs:
8
- - G1 exit 0 only if `npm test` is fully green afterwards.
9
- - G2 no new committed files outside the fix, except under .loki/.
10
- - G3 the printed receipt digest equals the one `loki verify` checks. The format must be agreed with A-02: v10 prints only a 12-hex prefix today.
11
- - G4 `loki verify` returns OK and exits 0.
12
- - G5 the receipt is signed.
13
- - G6 at most 15 lines of output without `--verbose`.
14
- - G7 wall time is recorded (target under 30s).
15
- - Line budget (D33): `loki-ts/tests/engine10/budget.test.ts` is the only measure, not `wc`. It counts `split("\n").length`, so a new core file costs one extra line. Core is 4,955 on main and 4,998 on slice-E-125 (cap 4,999). A card that adds core lines must cut the same number in its own file set, or it is re-sliced. Deleting comments on Seal, Wall, verify or Rule of Two logic is not an offset.
16
- - Tiers per D12:
17
- - Seal, verify, signing, receipt, outcomes and auth are HIGH: opus reviewers, unanimous, and a reproduced finding blocks.
18
- - D13: every reviewer's model is pinned explicitly.
19
- - One writer per file. A file that appears in two cards is written by one card at a time, in the order under "Depends".
20
- - Engine scope. Until item 4, the README default is legacy `loki quick`/`loki quickstart`, so the gate needs both routes.
21
- - v10 gets the real fixes.
22
- - Legacy gets default changes only. Build no new machinery on run.sh, which item 4 demotes to `loki legacy`.
23
- - Every card starts by reproducing its defect on current main in a clean HOME. The firstrun receipts are gone (/private/tmp/claude-501/loki-firstrun is empty), so step 1 rebuilds them from run1.sh and run2.sh.
24
-
25
- ## 1. Root causes found in code (evidence for the cards)
26
-
27
- - R-a TAMPERED: there are two canonicalizers.
28
- - `stages/seal.ts` `canonicalJson` escapes non-ASCII to `\uXXXX` (Python ensure_ascii) and drops undefined keys.
29
- - `verify_cmd.ts` keeps a private copy, `canonicalJson` at lines 19-28, which does neither.
30
- - So any receipt carrying a non-ASCII character fails `loki verify` with "receipt_sha256 mismatch". The run2 receipt had a model-written `spec_conflict_reason`, which `sanitizeReason` passes through with non-ASCII intact.
31
- - The mismatch string is verify_cmd.ts's own message, so the founder hit the v10 route.
32
- - This is still a hypothesis until A-101 step 1 reproduces it.
33
- - R-b A red suite exits 0: `supervisor.ts` main ends with `return res.verdict === "FAILED" ? 1 : 0`, so PARTIAL and SPEC_CONFLICT exit 0.
34
- - R-c Broken Wall test committed:
35
- - `RunnerName` (types.ts:84) has no node:test. On the bugrepo testmap sees only the coarse `npm` runner.
36
- - `wall.ts` `guessRunner` returns null for a .js file unless vitest, jest or bun is present, so the Wall file is unselectable and never run.
37
- - The brief says only "the framework named in repomap.txt".
38
- - The file is still copied into the tree, and `commitStage` (seal.ts) runs `git add -A`.
39
- - Plan logged "small task", yet the Wall ran for 17s: `hasRelevantTests` found no impacted test under the `npm` runner. To be confirmed in A-102.
40
- - R-d Printed receipt differs from the verified one (legacy):
41
- - In run1.log the printed Evidence Receipt shows Base sha == Head sha (1b537540), so it was rendered before `commit_session_changes` (run.sh ~11065).
42
- - The HANDOFF.md write (run.sh 29334-29356, LOKI_HANDOFF default 1) and the USAGE regen (run.sh 20981) run after it.
43
- - USAGE.md is forced by `USAGE_DOC_REQUIRED` (run.sh 22427, mirrored in loki-ts/src/runner/build_prompt.ts plus 60 fixtures).
44
- - R-e UNSIGNED by default:
45
- - v10 signs only when `LOKI_RECEIPT_SIGNING_KEY` or `_FILE` is set (seal.ts `signReceipt`, preflight.ts:25-27).
46
- - Legacy has two layers: GPG through `LOKI_PROOF_GPG_KEY` (proof-generator.py:2158, 51 references) and Ed25519 through `LOKI_RECEIPT_SIGNING_KEY*` (proof-generator.py:2185).
47
- - Both Ed25519 paths go through `python3 -I` plus `cryptography`, which a clean macOS python3 does not ship.
48
- - R-f `loki verify --help` under v10: verify_cmd.ts `main` treats `--help` as a run id, prints "receipt not found" and exits 2. The bash route (autonomy/verify.sh) documents `--help`. A-101 asserts both routes.
49
-
50
- ## 2. Slice cards
51
-
52
- ### A-101 Receipt canonicalization and verify help (item 1)
53
- - Goal:
54
- - Seal-then-verify always matches.
55
- - `loki verify --help` prints usage and exits 0 on both routes.
56
- - Step 1: seal a receipt whose `spec_conflict_reason` contains U+2192, write it through the real `JSON.stringify(receipt, null, 2)` path, verify it through verify_cmd.ts and the bash route, and record the rc (expect TAMPERED on main).
57
- - Files: loki-ts/src/engine10/verify_cmd.ts, loki-ts/tests/engine10/verify_cmd.test.ts, loki-ts/tests/engine10/seal_verify_roundtrip.test.ts (new, the CI test run by the Bun test job), autonomy/verify.sh (only if its --help is red).
58
- - Fix:
59
- - Delete verify_cmd.ts's private `canonicalJson` and import `canonicalJson`/`receiptSha256` from seal.ts, so there is one canonicalizer.
60
- - Add a `--help`/`-h` branch in `main`.
61
- - Print the full `receipt_sha256` so G3 compares like with like.
62
- - Wall check:
63
- - The round-trip test is red on main (the non-ASCII fixture) and green after.
64
- - `loki verify --help` exits 0 with "Usage".
65
- - Gate: G3, G4.
66
- - Commands: `cd loki-ts && bun test tests/engine10/verify_cmd.test.ts tests/engine10/seal_verify_roundtrip.test.ts tests/engine10/seal.test.ts tests/engine10/budget.test.ts`
67
- - Tier: HIGH. Budget: core about -8 (the duplicate is removed).
68
- - Depends: none. Wave 1.
69
-
70
- ### A-102 Test-runner detection: node:test plus a fixture for all six runners (item 1)
71
- - Goal:
72
- - Detect node:test (`scripts.test` of `node --test`, or `require('node:test')`/`from 'node:test'` in test files) as its own runner with per-file selection `node --test <files>`.
73
- - Prove detection for jest, vitest, pytest, go test and cargo with one fixture each.
74
- - Step 1: confirm why sizing did not take the lean path on the bugrepo (R-c).
75
- - Files: loki-ts/src/engine10/testmap.ts, loki-ts/src/engine10/types.ts (`RunnerName` gains "node"), loki-ts/src/engine10/stages/verify.ts (`runnerCmd` case only), loki-ts/tests/engine10/testmap.test.ts.
76
- - Wall check:
77
- - On the bugrepo, testmap reports `runners == ["node"]` and sum.test.js is impacted by sum.js.
78
- - `smallTaskPath` returns "lean" for the gate task, so the gate skips the Wall and saves about 17s (G7).
79
- - The six runner fixtures each detect exactly their runner.
80
- - Commands: `cd loki-ts && bun test tests/engine10/testmap.test.ts tests/engine10/verify.test.ts tests/engine10/sizing.test.ts tests/engine10/budget.test.ts`
81
- - Tier: HIGH (runner choice decides the Seal's checks). Budget: net 0 or less. The offset comes from folding node into the existing npm `detectFromPackageJson` branch, not from a new branch.
82
- - Depends: none. Wave 1. This card alone removes the gate's Wall defect. A-103 is still needed for repos where the Wall runs.
83
-
84
- ### A-103 Wall never leaves a test that fails for unrelated reasons (item 1)
85
- - Goal:
86
- - Build on slice-E-125 (r5 018a6e06) after its opus review merges, never on main.
87
- - The brief names the detected runner concretely, for example "node:test: require('node:test') and node:assert; no jest globals".
88
- - `guessRunner` is replaced by the runner testmap detected for the target dir.
89
- - A Wall file whose base result is not red (pass, or not_run for a launch or reference error) is deleted from the working tree before Implement. Its sealed copy stays under runDir/wall, and it is listed in not_proven as "wall test discarded: <path> (<class>)". This needs per-file results from `BaseTestRunner`.
90
- - Files: loki-ts/src/engine10/stages/wall.ts, loki-ts/tests/engine10/wall.test.ts.
91
- - Wall check:
92
- - A fake Wall session that writes a jest-global test into a node:test fixture: the file is absent from the tree after the Wall, and the receipt lists it as discarded.
93
- - A real red node:test Wall test is kept.
94
- - Gate: G1, G2.
95
- - Commands: `cd loki-ts && bun test tests/engine10/wall.test.ts tests/engine10/seal.test.ts tests/engine10/budget.test.ts`
96
- - Tier: HIGH. Budget: flat. Replacing `guessRunner` (8 lines) pays for the per-file discard. Core has 1 line of headroom on E-125.
97
- - Depends: E-125 merged, then A-102 (RunnerName "node"). Wave 2.
98
-
99
- ### A-104 Commit only the fix (items 1 and 2, v10)
100
- - Goal: `commitStage` in seal.ts never commits:
101
- - `loki_wall_*` files (the sealed copies under runDir/wall are the evidence), or
102
- - a lockfile that did not exist at base when no manifest changed (package-lock.json, yarn.lock, pnpm-lock.yaml, poetry.lock, Cargo.lock, go.sum).
103
- - `.loki/` stays excluded through .git/info/exclude, as intake already does.
104
- - Rule for the CTO: Wall tests run in the tree but are never committed. This settles G2, which otherwise forbids even a passing Wall file.
105
- - Files: loki-ts/src/engine10/stages/seal.ts (`commitStage` only), loki-ts/tests/engine10/seal.test.ts (commit cases).
106
- - Wall check:
107
- - A fixture where implement edits sum.js, a Wall file exists, and `npm install` created package-lock.json: HEAD's diff against base is sum.js only.
108
- - Gate: G2.
109
- - Commands: `cd loki-ts && bun test tests/engine10/seal.test.ts tests/engine10/e2e.test.ts tests/engine10/budget.test.ts`
110
- - Tier: HIGH (it changes the tree that Seal hashes). Budget: net 0 or less. Offset: the `.loki` unstage round trip in `commitStage` is replaced by one pathspec list.
111
- - Depends: none. Wave 1. seal.ts order: A-104, then A-121, then A-112.
112
-
113
- ### A-113 Stop reasons: STALLED and the fatal classifier (item 5)
114
- - Goal:
115
- - The fix loop stops with `stop: "stalled"` when verify reports the same failures.ts signature 3 times. MAX_FIX_ROUNDS=2 gives exactly 3 verifies, so this can fire.
116
- - A session whose stderr tail classifies as `auth` or `quota_exhausted` through the existing loki-ts/src/runner/retry_class.ts `classifyFailure` stops the run immediately: no fix round, no further session, and `stop: "fatal:<class>"`.
117
- - A rate limit stays retryable, as retry_class already treats it.
118
- - Files: loki-ts/src/engine10/machine.ts, loki-ts/src/engine10/session.ts, loki-ts/src/engine10/supervisor.ts (the `--resume` flag and its refusal only, lines 284-300), loki-ts/tests/engine10/machine.test.ts, loki-ts/tests/engine10/session.test.ts. It deletes loki-ts/tests/engine10/resume_e2e.test.ts and resume_cli.test.ts. types.ts is read-only for this card: `stop` travels on outputs.
119
- - Wall check:
120
- - A fake provider that prints "credit balance is too low" runs exactly one session and stops fatal.
121
- - A fake verify that repeats one signature stops "stalled" after 3 verifies.
122
- - A 429 is retried.
123
- - Commands: `cd loki-ts && bun test tests/engine10/machine.test.ts tests/engine10/session.test.ts tests/engine10/cap.test.ts tests/engine10/budget.test.ts`
124
- - Tier: HIGH. Budget: net 0 or less. Offset: delete the engine resume path whole, in one slice so main never carries a dead flag: machine.ts `opts.prior` replay, the supervisor.ts flag, and both resume tests. It is wired and tested (E-39/E-42), but intake always records `resumed: false`, so resumed receipts misreport. harness.py never passes `--resume` (grep), and eval resume S41-18 is file-based and stays. See section 4.
125
- - Depends: A-102 (types.ts). Wave 2.
126
-
127
- ### A-110 One named outcome, a fixed exit ladder, `--json` (items 1 and 5)
128
- - Goal:
129
- - Map at the edge and keep the receipt schema: eval/loki10/harness.py:1059 reads receipt `verdict`, and pr.ts, session.ts and e10ext/context.ts read the verdict strings.
130
- - `outcomeOf(verdict, capHit, stop)` lives in output.ts:
131
-
132
- | Condition | Outcome | Exit |
133
- |---|---|---|
134
- | VERIFIED | VERIFIED | 0 |
135
- | ALREADY_SATISFIED | ALREADY_SATISFIED | 0 |
136
- | usage or preflight error | (existing) | 2 |
137
- | cap.hit | BUDGET_STOP | 3 |
138
- | SPEC_CONFLICT | BLOCKED | 4 |
139
- | stop "stalled" | STALLED | 5 |
140
- | PARTIAL or FAILED | FAILED | 1 |
141
-
142
- - BLOCKED posts its one question on the issue through the existing E-67 `comment` callback.
143
- - The "Verdict:" line becomes "Outcome:", so there is one name.
144
- - `--json` prints one object `{ok, outcome, stop, run_id, receipt_sha256}`, where `ok` means exit 0.
145
- - harness.py's rc handling is checked, and edited by this card only if a code change breaks it.
146
- - Files: loki-ts/src/engine10/supervisor.ts, loki-ts/src/engine10/output.ts, loki-ts/tests/engine10/output.test.ts, loki-ts/tests/engine10/supervisor_backstop.test.ts.
147
- - Wall check:
148
- - A fixture where the red suite ends PARTIAL exits 1 (red on main because of R-b).
149
- - A SPEC_CONFLICT exits 4.
150
- - A cap exits 3.
151
- - `--json` parses.
152
- - Gate: G1.
153
- - Commands: `cd loki-ts && bun test tests/engine10/output.test.ts tests/engine10/supervisor_backstop.test.ts tests/engine10/e2e.test.ts tests/engine10/budget.test.ts`
154
- - Tier: HIGH. Budget: net 0 or less. Offset: the exit ternary becomes a ladder lookup, and output.ts's Verdict label code is replaced by the Outcome line. If that is not flat, re-slice.
155
- - Depends: A-113 (`stop` and supervisor.ts). Wave 3.
156
-
157
- ### A-111 Empty, skipped or hung checks are NOT VERIFIED (item 5)
158
- - Goal: verify.ts parses the executed-test count per runner:
159
- - node TAP `# pass N`/`# fail N`
160
- - jest/vitest "Tests:"
161
- - pytest summary
162
- - go `ok`/`FAIL`
163
- - cargo "test result"
164
- - A check that ran 0 tests, ran only skipped tests, or hit the timeout is `not_run` with a reason, never `pass`. seal.ts `verdictOf` already downgrades `not_run`.
165
- - Files: loki-ts/src/engine10/stages/verify.ts, loki-ts/tests/engine10/verify.test.ts.
166
- - Wall check: four fixtures (a node test file with 0 tests, jest `--passWithNoTests`, pytest all-skip, and a sleep past the timeout) each seal non-VERIFIED.
167
- - Commands: `cd loki-ts && bun test tests/engine10/verify.test.ts tests/engine10/seal.test.ts tests/engine10/budget.test.ts`
168
- - Tier: HIGH. Budget: net 0 or less. The count parse replaces the per-runner exit-status branches it subsumes.
169
- - Depends: A-102 (verify.ts). Wave 2.
170
-
171
- ### A-112 Baseline subtract: judge only the delta (item 5)
172
- - Goal:
173
- - verify runs the same selected checks on a pristine base checkout (`git worktree add --detach <base_sha>` in a temp dir, never a reset of the implement tree, per D42 (2)) and records the failing test ids.
174
- - A failure that was already red on base is `pre_red`: it goes to NOT PROVEN and never blocks VERIFIED.
175
- - A test that goes red to green is the fix.
176
- - seal.ts adds `pre red: <id>` to not_proven without routing it through `verifyNotProven`, which downgrades.
177
- - Files: loki-ts/src/engine10/stages/verify.ts, loki-ts/src/engine10/failures.ts (per-test ids, including node TAP `not ok`), loki-ts/src/engine10/stages/seal.ts (the one not_proven line), loki-ts/tests/engine10/verify.test.ts, loki-ts/tests/engine10/failures.test.ts.
178
- - Wall check:
179
- - The bugrepo plus an unrelated red test that is red before and after: the outcome is VERIFIED with "pre red" listed.
180
- - The target test staying red is FAILED.
181
- - Commands: `cd loki-ts && bun test tests/engine10/verify.test.ts tests/engine10/failures.test.ts tests/engine10/seal.test.ts tests/engine10/budget.test.ts`
182
- - Tier: HIGH. Budget: this is the largest adder, about +20. Offset: failures.ts's parse duplication with verify.ts. If it cannot be flat, it waits for A-150 or is re-sliced (D33: never raise).
183
- - Depends: A-111 (verify.ts) and A-121 (seal.ts). Wave 3.
184
-
185
- ### A-120 One signing key, auto-generated (item 3)
186
- - Goal:
187
- - `receipt_jwt.load_signing_key()` uses `LOKI_RECEIPT_SIGNING_KEY_FILE`, defaulting to `~/.loki/keys/receipt-ed25519.pem`.
188
- - If the key is missing, it creates it: PKCS8 PEM, mode 0600, `O_EXCL`, so a concurrent first run cannot overwrite it.
189
- - The inline `LOKI_RECEIPT_SIGNING_KEY` stays for now. After A-122 there is one signing family for both engines, which is what the directive requires. Deleting the inline variable touches about 10 engine10 tests plus tests/moat/p1-portable-proof.sh and is not carded.
190
- - preflight.ts warns only when signing is really unavailable.
191
- - The seal.ts `signReceipt` early exit when no env is set belongs to A-121. The proof-generator.py `if att_key:` early exit (about line 2183) belongs to A-122.
192
- - Files: autonomy/receipt_jwt.py, loki-ts/src/engine10/preflight.ts, tests/test_receipt_attest.py, tests/test-local-receipt-attestation.sh, loki-ts/tests/engine10/preflight.test.ts, docs/SIGNED-RECEIPTS.md (the variable section only).
193
- - Wall check:
194
- - With a fresh HOME and no env, `load_signing_key()` creates the file at 0600.
195
- - A second call returns the same kid.
196
- - End-to-end G5 is checked in A-121 (v10) and A-122 (legacy).
197
- - Commands: `python3 -m pytest tests/test_receipt_attest.py -q && bash tests/test-local-receipt-attestation.sh && cd loki-ts && bun test tests/engine10/preflight.test.ts`
198
- - Tier: HIGH. Budget: core flat or smaller (one preflight line removed).
199
- - Depends: none. Wave 1.
200
-
201
- ### A-121 v10 signs and verifies natively (item 3)
202
- - Goal:
203
- - Replace the `python3 -I` plus `cryptography` path (seal.ts `SIGN_PY`/`signReceipt`, verify_cmd.ts `checkAttestation`) with node:crypto Ed25519. It must produce the same JWT shape and kid as receipt_jwt.py, read the same key file as A-120, and create it if missing.
204
- - A clean macOS without `cryptography` still signs, and G5 holds on the default route.
205
- - The Python cross-check in seal.test.ts stays as the compatibility wall.
206
- - deep.ts imports `signReceipt`/`canonicalJson` and moves with it.
207
- - Files: loki-ts/src/engine10/stages/seal.ts (signing only), loki-ts/src/engine10/verify_cmd.ts, loki-ts/src/engine10/stages/deep.ts (import and call site), loki-ts/tests/engine10/seal.test.ts, loki-ts/tests/engine10/verify_cmd.test.ts, loki-ts/tests/engine10/deep.test.ts.
208
- - Wall check:
209
- - With PATH stripped of python3, the receipt is SIGNED and `loki verify` reports VERIFIED.
210
- - receipt_jwt.py verifies the TS token against the public JWK.
211
- - Flipping one receipt byte gives TAMPERED.
212
- - A receipt signed by a key listed in `LOKI_RECEIPT_RETIRED_PUBKEYS` still verifies, so rotation is kept.
213
- - With a fresh HOME and no env, the first v10 seal is SIGNED (G5).
214
- - Commands: `cd loki-ts && bun test tests/engine10/seal.test.ts tests/engine10/verify_cmd.test.ts tests/engine10/deep.test.ts tests/engine10/budget.test.ts`
215
- - Tier: HIGH. Budget: core about -25 (the embedded Python and the spawn plumbing are removed).
216
- - Depends: A-101 (verify_cmd.ts), A-104 (seal.ts), A-120 (key path). Wave 2.
217
-
218
- ### A-122 Delete the GPG signing layer (item 3, deletion)
219
- - Goal:
220
- - Delete `LOKI_PROOF_GPG_KEY` and GPG signing: proof-generator.py `_gpg_detached_sign` and its block, the GPG status tool, and the doctor and verify messages that name it.
221
- - The legacy route signs only through A-120's key. Delete the proof-generator.py `if att_key:` early exit so the default key is reached. Where `cryptography` is missing, doctor says so on one line.
222
- - CTO decision: old proofs with `gpg_signature` still verify for integrity, and read as UNSIGNED for provenance.
223
- - Files: autonomy/lib/proof-generator.py, autonomy/lib/proof-template.html, autonomy/loki (signing lines 1283, 9683, 14101-14110, 14532, 36680-36683), tools/signing-status.py (delete), tests/test_signing_status.py (delete), tools/gate-status.py, tools/receipt-attest.py, tests/test-receipt-signing-discoverability.sh, tests/test-deploy-receipt-gate.sh, loki-ts/src/commands/doctor.ts (signing block 484-496 and 1113-1127), README.md (2 lines), docs/TOOLS.md, docs/VERIFICATION-COST.md, docs/SIGNED-RECEIPTS.md.
224
- - Wall check:
225
- - `LOKI_PROOF_GPG_KEY` appears only in migration messages, docs/v10, tests and dist (a guard test).
226
- - With a fresh HOME and no env, a legacy proof carries a JWT and `loki proof verify` exits 0 (G5, legacy route).
227
- - Commands: `bash tests/test-receipt-signing-discoverability.sh && bash tests/test-deploy-receipt-gate.sh && python3 -m pytest tests/test_receipt_attest.py -q`
228
- - Tier: HIGH. Budget: large negative outside core.
229
- - Depends: A-120. Wave 2. autonomy/loki order: A-122, then A-123, then A-134.
230
-
231
- ### A-123 Doctor: only the selected provider blocks, one Ready line (item 3)
232
- - Goal:
233
- - Only the selected provider's CLI and skill link are `required`.
234
- - Other providers' CLIs and broken skill symlinks (the founder's Cline and Aider FAILs were machine artifacts) are informational and never FAIL.
235
- - The last line is exactly one of:
236
- - `Ready: <provider> (<model>), receipts signed (kid <8>)`
237
- - the one blocking reason.
238
- - Files: loki-ts/src/commands/doctor.ts, autonomy/loki (cmd_doctor only, for bash parity), loki-ts/tests/commands/doctor.test.ts, tests/test-doctor-providers.sh, tests/test-doctor-optional-skill-not-blocking.sh, tests/test-doctor-single-impl.sh (replaces the deleted tests/test-doctor-blocker-parity.sh).
239
- - Wall check:
240
- - A HOME with a broken ~/.cline skill symlink and LOKI_PROVIDER=claude: doctor exits 0 and prints one Ready line.
241
- - With claude missing, it exits non-zero and names the blocker.
242
- - Commands: `cd loki-ts && bun test tests/commands/doctor.test.ts && cd .. && bash tests/test-doctor-providers.sh && bash tests/test-doctor-optional-skill-not-blocking.sh && bash tests/test-doctor-single-impl.sh`
243
- - Tier: MEDIUM. Budget: net 0 or less.
244
- - Depends: A-122 (doctor.ts, autonomy/loki). Wave 3.
245
-
246
- ### A-130 v10 quiet by default (item 2)
247
- - Goal:
248
- - Default output is one start line (engine, provider, model), no stage or heartbeat lines, and the final block: Outcome, PR, Receipt (the full digest from A-101), NOT PROVEN, Cost, Time. That is at most 8 lines.
249
- - `--verbose` restores the stage lines.
250
- - The preflight UNSIGNED warning is already gone after A-120 and A-121.
251
- - Files: loki-ts/src/engine10/supervisor.ts (the `live` printer and flag parse), loki-ts/src/engine10/output.ts, loki-ts/tests/engine10/output.test.ts.
252
- - Wall check: the e2e fixture's stdout is at most 15 lines without `--verbose`, and shows the stage lines with it (G6).
253
- - Commands: `cd loki-ts && bun test tests/engine10/output.test.ts tests/engine10/e2e.test.ts tests/engine10/budget.test.ts`
254
- - Tier: MEDIUM. Budget: negative (printing lines move behind one flag).
255
- - Depends: A-110 (the same two files). Wave 4.
256
-
257
- ### A-132 Legacy: no HANDOFF.md, USAGE.md or lockfile in a fix commit (item 2)
258
- - Goal, on existing-repo runs (`loki quick` and issue fixes):
259
- - HANDOFF.md is written to .loki/HANDOFF.md, not the repo root.
260
- - `USAGE_DOC_REQUIRED` and the USAGE regen (a haiku call) are skipped.
261
- - `commit_session_changes` excludes a lockfile that did not exist at base when no manifest changed.
262
- - New-project (PRD) builds keep today's behaviour.
263
- - The prompt gate keys on the PRD path `.loki/quick-prd-<pid>.md`, which only cmd_quick writes (autonomy/loki:16351). So autonomy/loki is not in this card, and the 60 build_prompt fixtures stay byte-identical. One new fixture covers the gated case. Also fix run.sh:23628, which still matches the old `quick-prd.md` name.
264
- - Files: autonomy/run.sh (HANDOFF target, USAGE instruction gate, regen skip, commit exclude), loki-ts/src/runner/build_prompt.ts (mirror of the gate), loki-ts/tests/fixtures/build_prompt/fixture-61/ (new), tests/test-quick-artifacts.sh (new).
265
- - Wall check:
266
- - A stub-provider `loki quick` on the bugrepo: `git show --stat HEAD` lists sum.js only.
267
- - The 60 existing fixtures are unchanged (G2).
268
- - Commands: `bash tests/test-quick-artifacts.sh && cd loki-ts && bun test tests/runner/build_prompt.test.ts`
269
- - Tier: MEDIUM. Budget: run.sh flat or smaller.
270
- - Depends: none. Wave 1. run.sh order: A-132, then A-134.
271
-
272
- ### A-133 Legacy: skip Council evidence probes on a trivial diff (item 2)
273
- - Goal:
274
- - `council_evidence_gate` (completion-council.sh:1868) skips the app-boot, persistence, auth and tenant probes when the diff touches at most 2 non-test files, has no new route or auth file, and has at most 20 changed lines.
275
- - It records "skipped: trivial diff" as not proven, never as a pass.
276
- - `cmd_quick --help` already claims "no quality council".
277
- - Files: autonomy/completion-council.sh, tests/test-council-trivial-diff.sh (new).
278
- - Wall check:
279
- - The bugrepo one-line fix prints no `[Council] Evidence gate` lines, and the proof lists the skip.
280
- - A diff that adds a route still runs the probes.
281
- - Commands: `bash tests/test-council-trivial-diff.sh && bash tests/test-completion-council-affirmative-evidence.sh`
282
- - Tier: HIGH (it touches the auth evidence gate). Budget: flat.
283
- - Depends: none. Wave 1.
284
-
285
- ### A-134 Legacy: the printed receipt comes after the final commit, and setup chatter goes behind --verbose (item 2)
286
- - Goal:
287
- - Render and print the Evidence Receipt only after `commit_session_changes` and the HANDOFF write, so the printed diff sha equals what `loki proof verify` checks (R-d).
288
- - Setup and log_info lines print only with `--verbose` on `loki quick`. The default shows the start line, the result and the receipt, at most 15 lines.
289
- - Files: autonomy/run.sh (proof and print ordering, log gating), autonomy/loki (cmd_quick `--verbose` flag), tests/test-quick-receipt-order.sh (new).
290
- - Wall check:
291
- - Stub-provider `loki quick`: the printed Head sha equals `git rev-parse HEAD`, and the printed diff sha256 equals the proof.json value.
292
- - stdout is at most 15 lines (G3, G6).
293
- - Commands: `bash tests/test-quick-receipt-order.sh && bash tests/test-quick-artifacts.sh`
294
- - Tier: HIGH (receipt). Budget: flat.
295
- - Depends: A-132 (run.sh), A-123 (autonomy/loki). Wave 3.
296
-
297
- Time (G7): the directive targets under 30s. v10 run2 took 59s (Wall 17s, implement 42s), and raw `claude -p` took 10s. A-102's lean path removes the Wall on the gate repo. If G7 still misses, profile with S41-19 stage timing and open a cut slice named by the result. No speculative speed slice is carded here.
298
-
299
- ## 3. Item 4 cards: BLOCKED until the gate passes on items 1 to 3 (A-02 green in real-provider mode)
300
-
301
- ### A-140 v10 lean is the default for every entry point (BLOCKED)
302
- - Goal:
303
- - The bare task, issue ref, `loki quick`, quickstart and the plugin commands route to v10.
304
- - Print one start line: engine, provider, model.
305
- - Files: bin/loki, autonomy/loki (dispatch and cmd_quick), autonomy/quickstart.sh, the plugin commands directory, README.md (engine flags).
306
- - Wall check: the gate passes with no env set, and a stub `loki quick` shows `engine10` in the start line.
307
- - Tier: HIGH. Budget: negative.
308
-
309
- ### A-141 Delete LOKI_ENGINE, LOKI_SDK_LOOP and the silent fallbacks (BLOCKED)
310
- - Goal:
311
- - Delete the env switches (bin/loki:275, :374) and the fallbacks: a one-word task to legacy, and missing bun to bash. Missing bun becomes an error with the install line.
312
- - `loki legacy ...` is the only escape hatch.
313
- - Files: bin/loki, loki-ts/src/cli.ts, docs/INSTALLATION.md, tests that set LOKI_ENGINE or LOKI_SDK_LOOP.
314
- - Wall check: `git grep -c "LOKI_ENGINE\|LOKI_SDK_LOOP"` outside CHANGELOG is 0, and `loki legacy quick --help` works.
315
- - Tier: HIGH. Depends: A-140.
316
-
317
- ### A-142 Delete the unreachable SDK loop (BLOCKED)
318
- - Goal:
319
- - Once LOKI_SDK_LOOP is gone, delete loki-ts/src/runner/ modules reachable only from autonomous.ts: recovery_policy.ts (241 lines), escalation_handoff.ts (184), intervention.ts (462), and the circuit-breaker code in providers.ts and budget.ts.
320
- - Move retry_class.ts to loki-ts/src/util/, because A-113 imports it.
321
- - Keep build_prompt.ts while run.sh parity needs it.
322
- - Step 1 is an import-graph audit.
323
- - Tier: HIGH. Depends: A-141.
324
-
325
- ## 4. Explicitly cut items: status in code (deletion preferred, D33)
326
-
327
- Partially built. Recommend deleting:
328
- - Engine resume machinery (built, but it misreports):
329
- - supervisor.ts:284-300 accepts `--resume`, and machine.ts replays prior events (lines 26, 76, 164). Both are tested by resume_cli.test.ts and resume_e2e.test.ts.
330
- - stages/intake.ts:95 still hardcodes `resumed: false` with a stale comment claiming resume is refused, so a resumed receipt says it was not resumed.
331
- - seal.ts:205 adds a "resume state not recorded" not_proven entry.
332
- - Delete it whole in A-113. The receipt field `resumed` stays constant false, so there is no schema change.
333
- - eval resume (S41-18, D43 item 4) is a different thing and stays.
334
- - New dashboards: loki-ts/src/engine10/dashboard/page.ts (95 lines) and server.ts (313), plus the cli.ts TABLE row and the registry.ts entry.
335
- - This is about 410 core lines, the only large core offset.
336
- - It backs the user-facing `loki dashboard` under v10, so it is card A-150 and needs CTO and founder sign-off before anyone starts.
337
- - Fallback if refused: every card above stays self-offsetting.
338
- - Circuit breakers and escalation in the SDK loop: loki-ts/src/runner/recovery_policy.ts, escalation_handoff.ts, intervention.ts, and the breaker code in providers.ts, budget.ts and autonomous.ts. Deleted by A-142 (blocked).
339
- - Legacy circuit breakers: autonomy/app-runner.sh, autonomy/completion-council.sh, autonomy/lib/config-map.sh, autonomy/config.example.yaml. Freeze them, do not extend them, and delete them with legacy after item 4.
340
-
341
- Not built (zero code hits on 2026-09-30, nothing to delete):
342
- - three-tier escalation and the advisor. The "advisor" hits are "advisory".
343
- - the transport/capability taxonomy
344
- - CI watch after the PR
345
- - VERIFIED_WITH_DEBT
346
- - per-transition refs and effect classes
347
-
348
- Not cuts (listed so nobody deletes them by mistake):
349
- - The engine10 sizing.ts/fix.ts sonnet-then-top-model cascade (D31, decided).
350
- - The SIGTERM-to-SIGKILL "escalateMs" in supervisor.ts, which is process control.
351
- - stages/deep.ts, which is deep verify, not CI watch.
352
-
353
- ## 5. Waves and one-writer map
354
-
355
- - Wave 1 (parallel): A-101, A-102, A-104, A-120, A-132, A-133.
356
- - Wave 2: A-103 (after E-125 and A-102), A-111, A-113, A-121, A-122.
357
- - Wave 3: A-110, A-112, A-123, A-134.
358
- - Wave 4: A-130.
359
- - Then A-02 runs in real-provider mode. On green, A-140, A-141 and A-142 unblock. A-150 waits on sign-off.
360
- - Shared files, in writer order:
361
-
362
- | File | Writer order |
363
- |---|---|
364
- | types.ts | A-102 |
365
- | verify.ts | A-102, A-111, A-112 |
366
- | seal.ts | A-104, A-121, A-112 |
367
- | verify_cmd.ts | A-101, A-121 |
368
- | supervisor.ts | A-113, A-110, A-130 |
369
- | output.ts | A-110, A-130 |
370
- | docs/SIGNED-RECEIPTS.md | A-120, A-122 |
371
- | README.md | A-122, A-140 |
372
- | run.sh | A-132, A-134 |
373
- | autonomy/loki | A-122, A-123, A-134 |
374
- | doctor.ts | A-122, A-123 |
375
- | wall.ts | E-125, A-103 |