loki-mode 11.2.2 → 11.3.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 (216) hide show
  1. package/README.md +68 -650
  2. package/SKILL.md +4 -4
  3. package/VERSION +1 -1
  4. package/autonomy/completion-council.sh +2 -2
  5. package/autonomy/context-tracker.py +4 -4
  6. package/autonomy/council-v2.sh +1 -1
  7. package/autonomy/grill.sh +1 -1
  8. package/autonomy/lib/done-recognition.sh +1 -1
  9. package/autonomy/lib/prd-enrich.sh +1 -1
  10. package/autonomy/lib/skill-link-heal.sh +78 -1
  11. package/autonomy/lib/voter-agents.sh +1 -1
  12. package/autonomy/loki +99 -75
  13. package/autonomy/run.sh +30 -18
  14. package/autonomy/sandbox.sh +1 -1
  15. package/autonomy/tui.sh +6 -5
  16. package/autonomy/verify.sh +1 -1
  17. package/bin/loki +166 -59
  18. package/completions/_loki +2 -0
  19. package/completions/loki.bash +2 -2
  20. package/dashboard/__init__.py +1 -1
  21. package/dashboard/server.py +25 -31
  22. package/docs/ARCHITECTURE.md +337 -0
  23. package/docs/BRANDING.md +124 -0
  24. package/docs/CLI-REFERENCE.md +7 -1
  25. package/docs/COMPONENTS.md +447 -0
  26. package/docs/DEPLOYMENT.md +9 -9
  27. package/docs/DOCKER.md +469 -0
  28. package/docs/INSTALLATION.md +67 -1045
  29. package/docs/KNOWN-ISSUES.md +11 -35
  30. package/docs/TESTING.md +161 -0
  31. package/docs/air-gapped.md +1 -2
  32. package/docs/alternative-installations.md +14 -24
  33. package/docs/architecture/DECISIONS.md +333 -0
  34. package/docs/audit-logging.md +7 -7
  35. package/docs/authentication.md +3 -3
  36. package/docs/authorization.md +1 -1
  37. package/docs/certification/04-production-deployment/lab.md +6 -6
  38. package/docs/certification/04-production-deployment/lesson.md +4 -4
  39. package/docs/certification/README.md +1 -1
  40. package/docs/control-plane-container.md +2 -2
  41. package/docs/dev/real-run.md +34 -0
  42. package/docs/dev/release-checklist.md +2 -2
  43. package/docs/exit-codes.md +3 -3
  44. package/docs/git-workflow.md +3 -3
  45. package/docs/metrics.md +37 -55
  46. package/docs/network-security.md +1 -1
  47. package/docs/siem-integration.md +5 -5
  48. package/docs/v10/CLI-MODERN.md +4 -3
  49. package/docs/v10/DECISIONS.md +44 -0
  50. package/docs/v10/DEPS.md +22 -22
  51. package/docs/v10/ENGINE.md +1 -1
  52. package/docs/v10/FAILURE-CLASSES.md +129 -1
  53. package/docs/v10/FOUNDER-QUEUE.md +1 -0
  54. package/docs/v10/GUARDS.md +13 -0
  55. package/docs/v10/LEGACY-REMOVAL.md +4 -6
  56. package/docs/v10/METRICS.md +2 -2
  57. package/docs/v10/MODERNIZE.md +1 -1
  58. package/docs/v10/OPERATING-MODEL.md +2 -1
  59. package/docs/v10/PROGRESS.md +29 -0
  60. package/docs/v11/COST-HALF.md +352 -0
  61. package/docs/v11/MARKET-SLICES.md +315 -0
  62. package/docs/v11/REGISTRIES.md +730 -0
  63. package/loki-ts/data/model-pricing.json +52 -24
  64. package/loki-ts/dist/loki.js +1036 -957
  65. package/mcp/__init__.py +1 -1
  66. package/package.json +1 -1
  67. package/packages/control-plane/dist/server.js +2467 -736
  68. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  69. package/src/protocols/mcp-client.js +6 -2
  70. package/src/protocols/mcp-server.js +13 -3
  71. package/tools/audit-docs.py +1 -1
  72. package/web-app/dist/assets/{AdminPage-C-iMLNxe.js → AdminPage-CMkHNJbF.js} +1 -1
  73. package/web-app/dist/assets/{Avatar-C7VUvwsO.js → Avatar-BJyjV7Zi.js} +1 -1
  74. package/web-app/dist/assets/{Badge-tGvQEhnw.js → Badge-D572l0uq.js} +1 -1
  75. package/web-app/dist/assets/{Button-_iHlH_yL.js → Button-T4BnOZgl.js} +1 -1
  76. package/web-app/dist/assets/{CockpitPage-J_nNjbcR.js → CockpitPage-Cj_GFsNn.js} +1 -1
  77. package/web-app/dist/assets/{ComparePage-B05ui6Xt.js → ComparePage-A8m4ZXak.js} +1 -1
  78. package/web-app/dist/assets/{ErrorBoundary-Bxex6DLn.js → ErrorBoundary-hugCg5yg.js} +1 -1
  79. package/web-app/dist/assets/{EvidenceReceiptPanel-BsgWfdD1.js → EvidenceReceiptPanel-CuJKDC2G.js} +1 -1
  80. package/web-app/dist/assets/{GitHubIssuesPanel-DZBhZ8_X.js → GitHubIssuesPanel-BYGKjarC.js} +1 -1
  81. package/web-app/dist/assets/{GitHubPRsPanel-BaxlAl6R.js → GitHubPRsPanel-c7sFIJlf.js} +1 -1
  82. package/web-app/dist/assets/{HomePage-mVJvzqbF.js → HomePage-A1MIkG2P.js} +2 -2
  83. package/web-app/dist/assets/{LoginPage-B0zd4A_G.js → LoginPage-8KQMRhtR.js} +1 -1
  84. package/web-app/dist/assets/{MagicPage-DXLQ-y_R.js → MagicPage-C05QW2Lx.js} +1 -1
  85. package/web-app/dist/assets/{MetricsPage-CLS34Xvr.js → MetricsPage-Oukv5hme.js} +1 -1
  86. package/web-app/dist/assets/{NotFoundPage-BXG8PbNV.js → NotFoundPage-DKIwsawz.js} +1 -1
  87. package/web-app/dist/assets/{ProjectPage-D3kFFC0F.js → ProjectPage-DwFRPLCG.js} +3 -3
  88. package/web-app/dist/assets/{ProjectsPage-2bFn-gnC.js → ProjectsPage-CgY4YYDX.js} +1 -1
  89. package/web-app/dist/assets/{SettingsPage-CBM0ziWE.js → SettingsPage-BpfcSjUA.js} +1 -1
  90. package/web-app/dist/assets/{ShowcasePage-BTaXhjI3.js → ShowcasePage-BqBakC4K.js} +1 -1
  91. package/web-app/dist/assets/{SystemSettingsPage-BrC2hyAr.js → SystemSettingsPage-CZLu5VB0.js} +1 -1
  92. package/web-app/dist/assets/{TeamsPage-oqxdbVbY.js → TeamsPage-D55S1jKz.js} +1 -1
  93. package/web-app/dist/assets/{TemplatesPage-CEbUIY21.js → TemplatesPage-D3SydvxN.js} +1 -1
  94. package/web-app/dist/assets/{TerminalOutput-aIoWLbJA.js → TerminalOutput-hNg8G1-e.js} +1 -1
  95. package/web-app/dist/assets/{activity-CPyi45gt.js → activity-D2C0VagO.js} +1 -1
  96. package/web-app/dist/assets/{bell-BhaNBaJp.js → bell-CMvYi36w.js} +1 -1
  97. package/web-app/dist/assets/{bot-Da8REaEP.js → bot-BvtQ6lmo.js} +1 -1
  98. package/web-app/dist/assets/{check-DPj99ArM.js → check-B13xkXed.js} +1 -1
  99. package/web-app/dist/assets/{chevron-left-CkxonN0X.js → chevron-left-emu6r49E.js} +1 -1
  100. package/web-app/dist/assets/{circle-alert-C0JkB1y5.js → circle-alert-CExlwjuy.js} +1 -1
  101. package/web-app/dist/assets/{clock-COzFIiWi.js → clock-D7Uas3oL.js} +1 -1
  102. package/web-app/dist/assets/{cloud-bjkac4kn.js → cloud-CkB4S86C.js} +1 -1
  103. package/web-app/dist/assets/{code-xml-hlKlvXUJ.js → code-xml-SL9IIWIn.js} +1 -1
  104. package/web-app/dist/assets/{database-D555S5Km.js → database-BQFkd7t1.js} +1 -1
  105. package/web-app/dist/assets/{dollar-sign-CVcApzcD.js → dollar-sign-qHmnNYsU.js} +1 -1
  106. package/web-app/dist/assets/{file-code-corner-UORaMIcO.js → file-code-corner-C2YUDP0K.js} +1 -1
  107. package/web-app/dist/assets/{file-plus-ALJtDoI2.js → file-plus-C_ooIkDe.js} +1 -1
  108. package/web-app/dist/assets/{globe-CPlrM_IC.js → globe-CQ-GL485.js} +1 -1
  109. package/web-app/dist/assets/{hammer-qaGZHpja.js → hammer-U05L_D7V.js} +1 -1
  110. package/web-app/dist/assets/{index-BcXljIAO.js → index-CooHd7I-.js} +3 -3
  111. package/web-app/dist/assets/{layers-BV8R9VUK.js → layers-Buo17rjW.js} +1 -1
  112. package/web-app/dist/assets/{loader-circle-6TlDS9Tu.js → loader-circle-15vK3oV1.js} +1 -1
  113. package/web-app/dist/assets/{lock-B9t6oWI0.js → lock-BeXLebuJ.js} +1 -1
  114. package/web-app/dist/assets/{package-2gEUAtZJ.js → package-MVh_6-6R.js} +1 -1
  115. package/web-app/dist/assets/{plus-DXocxPjU.js → plus-Dh_nd9vS.js} +1 -1
  116. package/web-app/dist/assets/{refresh-cw-D3dWHBd6.js → refresh-cw-C9cBJEAT.js} +1 -1
  117. package/web-app/dist/assets/{rotate-ccw-CvuWqaSB.js → rotate-ccw-D3PAtzST.js} +1 -1
  118. package/web-app/dist/assets/{scroll-text-ktmD_xJY.js → scroll-text-DZCoXQjo.js} +1 -1
  119. package/web-app/dist/assets/{server-E7pZtj5A.js → server-OCOLI5J_.js} +1 -1
  120. package/web-app/dist/assets/{shield-alert-968j9z0V.js → shield-alert-oVhmf1_h.js} +1 -1
  121. package/web-app/dist/assets/{thumbs-up-Tz_8rpU_.js → thumbs-up-B-kbX4vN.js} +1 -1
  122. package/web-app/dist/assets/{trash-2-Drh9IIj8.js → trash-2-EL6moveW.js} +1 -1
  123. package/web-app/dist/assets/{trending-down-DCQXtVSL.js → trending-down-Cl3kjpsx.js} +1 -1
  124. package/web-app/dist/assets/{trending-up-BIiwQbWV.js → trending-up-DST7I6M2.js} +1 -1
  125. package/web-app/dist/assets/{upload-sCbPkfmy.js → upload-CUOT780G.js} +1 -1
  126. package/web-app/dist/assets/{usePolling-BMIg6ZVT.js → usePolling-Djmt90eb.js} +1 -1
  127. package/web-app/dist/assets/{user-kGzXC3V2.js → user-BRBohA6J.js} +1 -1
  128. package/web-app/dist/index.html +1 -1
  129. package/docs/ARCHITECTURE-OVERVIEW.md +0 -209
  130. package/docs/AUTONOMI-ECOSYSTEM.md +0 -107
  131. package/docs/COCKPIT-SPEC.md +0 -72
  132. package/docs/COCKPIT-UX-MANDATE.md +0 -53
  133. package/docs/COMPETITIVE-ANALYSIS.md +0 -303
  134. package/docs/COMPETITIVE-NEXT-10.md +0 -316
  135. package/docs/COMPETITIVE-RALPH-ZEROSHOT-2026-07-08.md +0 -81
  136. package/docs/DASHBOARD-9.12-EVIDENCE.md +0 -97
  137. package/docs/DASHBOARD-ARCHITECTURE.md +0 -425
  138. package/docs/DASHBOARD_V2_CHECKLIST.md +0 -243
  139. package/docs/DEMOS.md +0 -63
  140. package/docs/ENTERPRISE-IDENTITY-ROADMAP.md +0 -206
  141. package/docs/EVIDENCE-RECEIPT-BUILD-APPLICABILITY.md +0 -79
  142. package/docs/FEAT-PRDREUSE-DOCKER-PLAN.md +0 -144
  143. package/docs/GATE-FAILURE-TRIAGE.md +0 -254
  144. package/docs/HANDOFF-2026-08-03.md +0 -439
  145. package/docs/LOOP-CANDIDATE-PROPOSAL-v1.md +0 -167
  146. package/docs/LOOP-HARNESS-AUDIT.md +0 -684
  147. package/docs/MERGE-DEDUP-MAP.md +0 -420
  148. package/docs/MERGE-ROUTE-MAP.md +0 -139
  149. package/docs/MODEL-REGISTRY-PLAN.md +0 -155
  150. package/docs/OUTCOME-FRONTIER.md +0 -536
  151. package/docs/P2-SPEC-ROBUSTNESS-PLAN.md +0 -192
  152. package/docs/PLANS-INDEX.md +0 -32
  153. package/docs/PRD-REUSE-DONE-RECOGNITION-PLAN.md +0 -536
  154. package/docs/PROMPT-ABLATION-RESULT.md +0 -97
  155. package/docs/R4-TRUST-TRAJECTORY-DESIGN.md +0 -127
  156. package/docs/R5-AUTO-WIKI-DESIGN.md +0 -137
  157. package/docs/R6-ROLLBACK-CHECKPOINT-PLAN.md +0 -107
  158. package/docs/R7-ZERO-CONFIG-FIRST-RUN-PLAN.md +0 -137
  159. package/docs/R8-SHAREABLE-TEAM-ASSETS-PLAN.md +0 -129
  160. package/docs/R9-OPEN-CORE-HOOKS-PLAN.md +0 -113
  161. package/docs/RARV-C-100X-PLAN.md +0 -286
  162. package/docs/RARV-C-LOOP-EFFICIENCY-PLAN.md +0 -470
  163. package/docs/SHAREABLE-PROOF-PLAN.md +0 -194
  164. package/docs/SONNET5-DEFAULT-PLAN.md +0 -157
  165. package/docs/SPEED-AND-FIRST-PASS-PLAN.md +0 -281
  166. package/docs/STALE-STATE-AUDIT.md +0 -174
  167. package/docs/SYNERGY-TASKS.md +0 -143
  168. package/docs/TASKLIST-ACCURACY-PLAN.md +0 -355
  169. package/docs/TOP-100-BACKLOG.md +0 -159
  170. package/docs/V8-ACCEPTANCE-TRIAGE-2026-07-24.md +0 -114
  171. package/docs/V8-COMPLEXITY-AUDIT-2026-07-24.md +0 -45
  172. package/docs/V8-MAJOR-RELEASE-PLAN.md +0 -137
  173. package/docs/V8-OVERNIGHT-PLAN-2026-07-25.md +0 -82
  174. package/docs/V8-SDK-RESEARCH-RAW.md +0 -129
  175. package/docs/WELCOME-OPENER-PLAN.md +0 -106
  176. package/docs/adoption-baseline-2026-07-31.md +0 -84
  177. package/docs/architecture/bmad-integration-epic.md +0 -271
  178. package/docs/architecture/bmad-integration-review.md +0 -86
  179. package/docs/architecture/bmad-integration-validation.md +0 -249
  180. package/docs/architecture/bmad-loki-voice-agent-council-analysis.md +0 -61
  181. package/docs/auto-claude-comparison.md +0 -250
  182. package/docs/bug-fixes/agent-01-cli-fixes.md +0 -101
  183. package/docs/bug-fixes/agent-02-purplelab-fixes.md +0 -88
  184. package/docs/bug-fixes/agent-03-dashboard-fixes.md +0 -119
  185. package/docs/bug-fixes/agent-04-memory-fixes.md +0 -105
  186. package/docs/bug-fixes/agent-05-provider-fixes.md +0 -86
  187. package/docs/bug-fixes/agent-06-integration-fixes.md +0 -101
  188. package/docs/bug-fixes/agent-07-dash-run-fixes.md +0 -101
  189. package/docs/bug-fixes/agent-08-docker-fixes.md +0 -164
  190. package/docs/bug-fixes/agent-09-e2e-build-fixes.md +0 -69
  191. package/docs/bug-fixes/agent-10-e2e-fullstack-fixes.md +0 -102
  192. package/docs/bug-fixes/agent-11-e2e-session-fixes.md +0 -70
  193. package/docs/bug-fixes/agent-12-scenario-fixes.md +0 -120
  194. package/docs/bug-fixes/agent-13-enterprise-fixes.md +0 -143
  195. package/docs/bug-fixes/agent-14-uat-newuser-fixes.md +0 -88
  196. package/docs/bug-fixes/agent-15-uat-poweruser-fixes.md +0 -132
  197. package/docs/bug-fixes/agent-19-code-review.md +0 -316
  198. package/docs/bug-fixes/agent-20-architecture-review.md +0 -331
  199. package/docs/competitive/bolt-new-analysis.md +0 -579
  200. package/docs/competitive/emergence-others-analysis.md +0 -605
  201. package/docs/competitive/replit-lovable-analysis.md +0 -622
  202. package/docs/dashboard-guide.md +0 -487
  203. package/docs/enterprise/migration.md +0 -265
  204. package/docs/history/one-run-audit.md +0 -304
  205. package/docs/plans/FORGE-AUTONOMOUS-QUEUE.md +0 -312
  206. package/docs/plans/ULTRAPLAN-FORGE-BAAS.md +0 -612
  207. package/docs/plans/UT2-6-LSP-DIAGNOSTIC-BROADCAST.md +0 -394
  208. package/docs/prd-purple-lab-ide.md +0 -152
  209. package/docs/prd-purple-lab-platform-v2.md +0 -223
  210. package/docs/prd-purple-lab-platform.md +0 -319
  211. package/docs/retrospectives/v7.5.15-fleet-postmortem.md +0 -325
  212. package/docs/retrospectives/v7.5.15-honesty-audit.md +0 -136
  213. package/docs/retrospectives/v7.5.15-llm-failure-modes.md +0 -49
  214. package/docs/show-hn-post.md +0 -46
  215. package/docs/test-scenarios/enterprise-scenarios.md +0 -732
  216. package/docs/thick2thin.md +0 -173
@@ -1,113 +0,0 @@
1
- # R9: Hosted/paid open-core hooks - design note
2
-
3
- Status: SEAMS implemented (this worktree). NOT a live hosted backend.
4
-
5
- R9 in the competitive-stickiness arc is the open-core monetization layer: keep
6
- Loki fully source-available (BUSL-1.1) and free to self-host, while adding the
7
- SEAMS where hosted, enterprise, and paid plans would attach later. R9 ships the seams only. There is no Loki
8
- hosted service, no license-verification backend, and no paid gate on any
9
- existing feature. Every honest stub is labeled as such.
10
-
11
- ## What already existed (verified in source, pre-R9)
12
-
13
- - proof-of-run `public_url` seam: `autonomy/lib/proof-generator.py:392` writes
14
- `"deployment": {"deployed_url": deployed_url, "public_url": None}`. The
15
- `public_url` field is reserved and always null today (no hosted publish wrote
16
- it). R9 does NOT populate it (see "Deliberate gaps").
17
- - `loki proof share --hosted` stub: BOTH routes errored "Hosted publishing is
18
- not available yet (coming in R9)" -- bash `autonomy/loki` (share case in
19
- `cmd_proof`) and Bun `loki-ts/src/commands/proof.ts` (`shareProof`). This was
20
- the explicit seam to implement.
21
- - `loki proof share` (gist): default opt-in publish via `gh gist create`
22
- through `_loki_gist_upload` (bash) / `shareProof` (Bun). Redaction-preview +
23
- confirm. This is the free path and stays byte-unchanged.
24
- - `cmd_enterprise` (`autonomy/loki`): already env-driven feature flags
25
- (`LOKI_ENTERPRISE_AUTH`, `LOKI_OIDC_ISSUER`/`LOKI_OIDC_CLIENT_ID`,
26
- `LOKI_AUDIT_DISABLED`/`LOKI_ENTERPRISE_AUTH`). Good precedent: enterprise
27
- features are env-gated seams, not paywalls. R9 follows the same pattern.
28
- - No `LOKI_TIER`, `LOKI_LICENSE_KEY`, or `LOKI_HOSTED_ENDPOINT` existed anywhere
29
- before R9. All three are new with this change.
30
- - Redaction: the generator redacts the proof ONCE before writing index.html and
31
- records `redaction.applied` in proof.json (`proof-generator.py`, module
32
- `proof_redact`). The share path publishes the already-redacted artifact; it
33
- does not run a second redaction pass.
34
-
35
- ## What R9 adds (seams, no backend)
36
-
37
- 1. Hosted proof-publish seam. `loki proof share --hosted <id>`:
38
- - If `LOKI_HOSTED_ENDPOINT` is set: POST the ALREADY-REDACTED `index.html`
39
- (the same bytes the gist path would publish) to that endpoint. On 2xx,
40
- print the URL the endpoint returned (`url` or `public_url` JSON field), or,
41
- if none, the endpoint itself + HTTP status. NEVER a fabricated URL.
42
- - If `LOKI_HOSTED_ENDPOINT` is NOT set: print an honest "Hosted publishing
43
- backend not available" message (there is no official Loki hosted service
44
- yet), tell the user to set the env var or use the gist path, and exit
45
- non-zero. We do NOT silent-fall-back to gist when the user explicitly asked
46
- for `--hosted` (see "Fallback decision").
47
- - If proof.json reports `redaction.applied == false`: refuse to publish.
48
- - bash: `_loki_hosted_publish_proof` (curl). Bun:
49
- `hostedPublishProof` (fetch). Parity-matched messages + exit codes.
50
-
51
- 2. Tier/license hook. `LOKI_TIER` (default `oss`) + optional `LOKI_LICENSE_KEY`:
52
- - bash `loki_tier_gate <capability>`; Bun `tierGate(capability)` in
53
- `loki-ts/src/util/tier.ts`.
54
- - OSS (the default): always ALLOW, zero notes, no network, no license. This
55
- is a pure no-op for every OSS user.
56
- - Non-OSS without a license key: NOT allowed (honest -- we cannot verify an
57
- entitlement; there is no backend). Never a fabricated grant.
58
- - Non-OSS with a license key: allow, but flag that the verification backend
59
- does not exist yet. We do NOT pretend the key was verified.
60
- - WIRING: the gate is called ONLY from the opt-in `--hosted` seam. It is not
61
- wired into any existing command path, so it cannot gate a free feature.
62
-
63
- 3. Open-core boundary doc: `docs/OPEN-CORE-BOUNDARY.md` -- what is free forever
64
- vs. what hosted/paid would add.
65
-
66
- ## Fallback decision (reconciled)
67
-
68
- The task phrased the fallback two ways. We follow the precise deliverable:
69
- `share --hosted` with no endpoint prints "set LOKI_HOSTED_ENDPOINT or use gist"
70
- and EXITS non-zero. We do NOT silently publish to gist when the user explicitly
71
- asked for `--hosted`. Rationale: silent fallback would surprise a user who
72
- intended a private/hosted destination by publishing to a public gist instead.
73
- The plain `loki proof share <id>` (no flag) remains the gist path, unchanged.
74
-
75
- ## OSS-unchanged guarantee
76
-
77
- - The default `loki proof share` (no `--hosted`) gist path is byte-identical:
78
- `--hosted` is captured as a mode flag during arg-parse and branches only AFTER
79
- id + html validation; the gist code below it is untouched.
80
- - `LOKI_TIER` unset vs set produces identical output/exit for existing commands
81
- (asserted in tests).
82
- - No existing env var, command, or default changed behavior.
83
-
84
- ## Deliberate gaps (honest, not omissions)
85
-
86
- - No live Loki hosted backend, no SaaS, no license server. `--hosted` only works
87
- against an endpoint the operator supplies. This is by design for R9.
88
- - `public_url` in proof.json is NOT written back after a hosted publish.
89
- Mutating the frozen R1 proof artifact post-hoc is risk we deliberately skip;
90
- the published URL is printed to the user instead. A future release can wire
91
- write-back once the artifact-mutation story is designed.
92
- - The tier gate does not verify license keys (no backend). It is a seam only.
93
- - No retries/backoff on the hosted POST (clean client stub, not a transport
94
- library).
95
-
96
- ## Tests
97
-
98
- `loki-ts/tests/commands/proof_hosted_r9.test.ts` (mock endpoint via Bun.serve,
99
- no network): tier gate OSS allow-all + honest non-OSS; hosted POST hits the
100
- mocked endpoint with the redacted payload (both bash + Bun routes); honest
101
- no-endpoint message + non-zero exit; non-2xx honest error; unredacted-proof
102
- refusal; license-key auth header; OSS-not-gated guarantee (identical output with
103
- LOKI_TIER unset vs enterprise). Existing `proof.test.ts` parity unchanged.
104
-
105
- ## Files changed
106
-
107
- - `autonomy/loki` (bash): `loki_tier_gate`, `_loki_hosted_publish_proof`,
108
- `--hosted` branch in `cmd_proof` share, help text.
109
- - `loki-ts/src/util/tier.ts` (new): `tierGate`, `currentTier`.
110
- - `loki-ts/src/commands/proof.ts` (Bun): `hostedPublishProof`, `--hosted`
111
- branch, help text.
112
- - `docs/OPEN-CORE-BOUNDARY.md` (new).
113
- - `loki-ts/tests/commands/proof_hosted_r9.test.ts` (new).
@@ -1,286 +0,0 @@
1
- # RARV-C 100x Native-Primitives Upgrade - Plan (v8.0.0 arc)
2
-
3
- ## Context
4
-
5
- Founder mandate (memory `project-rarvc-cookbook-upgrade`): we can't out-build
6
- Replit/Emergent/Cognition on capability. Loki's moat is loop RIGOR (never-fake-green
7
- RARV-C, 3-reviewer council, evidence gate), which is ON-THESIS with Anthropic's own
8
- long-running-agent guidance. The gap isn't rigor; it's efficiency: the loop does its
9
- mechanics via home-grown bash (parsing model output as TEXT, polling for budget,
10
- inferring cost from token math) where the installed `claude` CLI now ships NATIVE
11
- primitives that do the same job cheaper, faster, and without fragile parsing.
12
-
13
- This plan adopts those primitives where they MEASURABLY beat the bash equivalents, one
14
- per commit, bench-proven, quality never regresses. MAJOR arc (v8.0.0) on branch
15
- `feature/rarv-c-100x-primitives` (not yet created).
16
-
17
- **The honest headline: much of this is already shipped.** Two prior plan docs exist
18
- (`docs/RARV-C-LOOP-EFFICIENCY-PLAN.md`, `docs/RARV-C-CHANGE-MAP.md`, grounded to v7.121.5),
19
- AND the engine has since adopted several native flags. So this plan does NOT regenerate
20
- them. It: (1) reconciles drift to v7.128.2, (2) records what's ALREADY adopted so we don't
21
- rebuild it, (3) scopes the genuinely net-new work (extend structured-outputs to 4 remaining
22
- text-parse sites), (4) adds the missing PARITY and RELEASE sections, and consolidates into
23
- `docs/RARV-C-100X-PLAN.md`.
24
-
25
- ---
26
-
27
- ## Primary-source verification (done live this session, CLI v2.1.207)
28
-
29
- Per `reference-claude-session-flags` ("live-probe, don't trust stale training or --help
30
- alone"), every flag was verified by RUNNING it:
31
-
32
- | Primitive | Flag | Verified behavior (2026-07-13) |
33
- |---|---|---|
34
- | Structured output | `--json-schema <schema>` | Forces valid JSON. Envelope carries top-level `structured_output` key + `result` valid-JSON + `stop_reason:"tool_use"`. Model CANNOT emit malformed output. |
35
- | Cost breaker | `--max-budget-usd <amt>` | On exceed: `subtype:"error_max_budget_usd"`, `is_error:true`, exit 0 (graceful, parseable). |
36
- | Effort dial | `--effort low\|medium\|high\|xhigh\|max` | 5 levels; maps onto `get_rarv_tier()`. |
37
- | Rate-limit resilience | `--fallback-model <model>` | Present. |
38
- | Caching visibility | JSON envelope | `usage.cache_creation.ephemeral_1h_input_tokens` vs `ephemeral_5m` per call -> caching measurable. |
39
- | Cost/iter readout | JSON envelope | `total_cost_usd`, per-model `costUSD`, `cache_read_input_tokens`, `iterations[]`. |
40
- | Continuity | `--resume`/`--session-id`/`--fork-session` | iter0 `--session-id U0`, iterN `--resume U0`; `--session-id` reuse ERRORS. |
41
-
42
- ---
43
-
44
- ## What is ALREADY adopted (do NOT rebuild - ponytail rung 2)
45
-
46
- Verified in current source. The prior CHANGE-MAP predates these:
47
-
48
- - **`--effort` + `--max-budget-usd` are ALREADY plumbed** in `_loki_build_claude_auto_flags`
49
- (`providers/claude.sh:143-158`), gated on `loki_claude_flag_supported` (degrades on old CLI),
50
- mirrored in `loki-ts/src/providers/claude_flags.ts` (`effortForTier()`:23, `buildAutoFlags()`:150).
51
- So "adopt native budget/effort breakers" is LARGELY DONE. `check_budget_limit()` (`run.sh:13035`)
52
- and `is_rate_limited()` (`run.sh:12835`) still exist as the belt to the native suspenders.
53
- - **`--json-schema` is ALREADY adopted for the council-vote path**: `voter-agents.sh:277`
54
- (`claude --agents <json> --json-schema <schema>`), wired as PREFERRED council dispatch at
55
- `completion-council.sh:3137-3144` with graceful text-parse fallback (3146-3154). Schema:
56
- `loki-ts/data/finding-schema.json`. TS mirror: `loki-ts/src/council/voter_agents.ts:299-327`.
57
- This pair is the TEMPLATE to extend, not a greenfield build.
58
- - **Completion detection is already structured** via `.loki/signals/*` + `loki_complete_task`
59
- MCP tool (`run.sh:13351-13369`); text-match is legacy behind `LOKI_LEGACY_COMPLETION_MATCH=true`.
60
-
61
- **Net-new structured-output work = extend the voter-agents+schema template to the 4 remaining
62
- text-parse sites. Everything else is tuning + bench + pointing side-calls at flags that exist.**
63
-
64
- ---
65
-
66
- ## Reconciled anchors (v7.128.2; lines drift, re-grep before editing)
67
-
68
- **completion-council.sh:** `_council_effective_min_iter()`:118 | `COUNCIL_CHECK_INTERVAL`:84 |
69
- `COUNCIL_STAGNATION_LIMIT`:132 | `council_evidence_gate()`:1704 | explicit-claim fast path:3640
70
- (block 3625-3648) | modulo gate now in helper `_council_should_check_now()`:3521-3560 (gate:3548),
71
- called from `council_should_stop`:3644 | `council_should_stop()`:3562
72
-
73
- **run.sh:** `detect_complexity()`:2491 | `get_rarv_tier()`:2616 | `run_code_review()`:11095 |
74
- `is_rate_limited()`:12835 | `check_budget_limit()`:13035 | `store_episode_trace()`:13729 |
75
- `save_state()`:14395 | `build_prompt()`:14633 | `run_autonomous()`:16299 | `LOKI_SESSION_MODEL`
76
- default:742, session-pin read:16959, case block:16963-16967 | `[CACHE_BREAKPOINT]` INERT (doc anchor
77
- only, no cache wiring):15143/15231/15278 | APP_CRASHED injection:14969 (python3 -c inline)
78
-
79
- **Main-loop invocation:** `run.sh:17316-17320` -> `claude "${_loki_claude_argv[@]}" -p "$prompt"
80
- --output-format stream-json --verbose` (argv ~17226+). Uses stream-json, not --json-schema.
81
- Model catalog: opus->claude-opus-4-8, sonnet->claude-sonnet-5, haiku->claude-haiku-4-5; defaults
82
- planning/development/fast ALL=sonnet (v7.104.0).
83
-
84
- ### The 4 remaining text-parse sites (the genuine structured-output targets)
85
- 1. **Code-review verdict** `run.sh:11044-11063` `_classify_verdict` (regex `grep -iE "VERDICT:"`
86
- -> case FAIL/PASS/AMBIGUOUS, no retry) + severity greps :11075/:11090; reviewer call :10998
87
- uses `--output-format text`. Parity-locked to `loki-ts/src/runner/quality_gates.ts`.
88
- 2. **Council VOTE fallback** `completion-council.sh:645-659` (`grep -oE VOTE:`) + `:1005` (Python
89
- `re.search`) - the fallback under the already-structured path; mangled VOTE silently->REJECT.
90
- 3. **Council-v2 JSON** `council-v2.sh:337-346` (`sed -n '/^{/,/^}/p'` carves JSON from prose, else
91
- hardcodes REJECT); invocation :299 (no schema).
92
- 4. **Done-recognition** `done-recognition.sh:282-303` (`json.loads` + brace-substring fallback,
93
- else `inconclusive`); call :57/:171 (no schema).
94
-
95
- ---
96
-
97
- ## Deliverable 1: Bench harness (BUILD/LOCK THIS FIRST - nothing ships before it)
98
-
99
- Reuse `benchmarks/bench/` (~95% built per existing plan S2a). The work is lock + reconcile +
100
- baseline, not a build:
101
- - **Lock a discriminator-derived corpus** (existing plan 2e-HARDENING #3): simple + HARD (tier-guard)
102
- + MULTI-FAILURE (parallel-fix) + TOKEN-HEAVY (distillation), each with machine-checkable held-out
103
- acceptance. Frozen once baselined.
104
- - **Reconcile iterations source** to `events.jsonl` `iteration_complete` count (canonical) with
105
- session.json fallback, so `adapters/loki.py` and `speed-benchmark.sh` agree. PREREQUISITE, blocking.
106
- - **NEW (from live probe):** read cost/cache/iterations straight from the `--json-schema`/`--output-format
107
- json` envelope (`total_cost_usd`, `cache_read_input_tokens`, `iterations[]`) instead of token-math x
108
- price-table where available - more accurate, self-consistent with the CLI.
109
- - **Noise floor** (blocking): baseline reports SPREAD (std/min-max across trials); a change ships only
110
- if its metric moves BEYOND the noise band. Effect < trial variance -> "no measurable effect", don't ship.
111
- - **2-spec smoke check** (the one runnable guard): one MUST-pass, one underspecified MUST-fail; assert
112
- `verified_pass == [True, False]`. If the grader can't tell them apart it measures nothing.
113
- - **Commit the v7.128.2 baseline** (`benchmarks/results/<baseline>.json`, N real OFF-WORKTREE builds,
114
- isolated source copy, cwd + LOKI_TARGET_DIR pinned to scratch) BEFORE any change.
115
- - **Grader stays deterministic** `success = exit==0` on held-out acceptance. NEVER council/completion-claim.
116
- `validate_adapter_output()` already rejects self-judged keys - keep that invariant.
117
-
118
- **Gate rule (binding, every change):** ships iff it improves >=1 of {iterations, $/build, wall-clock}
119
- beyond the noise band AND does not regress verified-pass-rate on the frozen corpus vs baseline.
120
-
121
- ---
122
-
123
- ## Deliverable 2: Primitive-by-primitive adoption table (ranked, one per commit)
124
-
125
- Bucket key: **(a)** orchestration/flags, changeable now | **(b)** founder-gated (build_prompt
126
- byte-lock) | **(c)** needs off-worktree real-build validation.
127
-
128
- | # | Primitive / change | Current impl (file:line) | Native replacement | Expected win | Bucket | Parity | Rollback |
129
- |---|---|---|---|---|---|---|---|
130
- | 1 | **Structured code-review verdict** | `run.sh:11044` regex `_classify_verdict` + severity greps :11075/:11090; reviewer :10998 `--output-format text` | reviewer emits `--json-schema` (extend `voter-agents.sh`+`finding-schema.json` template); read `structured_output.verdict/severity` | Kills fragile parse + AMBIGUOUS-token bugs; zero retry. Quality-safety, not speed | (a) | safe (invocation flag, NOT build_prompt); MUST mirror in `quality_gates.ts` | keep text fallback path (like council does 3146-3154) |
131
- | 2 | **Structured council VOTE** (retire text fallback) | `completion-council.sh:645/1005` regex/re.search fallback | make the already-wired `--json-schema` path (3137) the only path; delete text fallback once proven | Removes silent VOTE->REJECT corruption (:2337) | (a) | safe; TS mirror `voter_agents.ts` | revert to fallback |
132
- | 3 | **Structured council-v2** | `council-v2.sh:337-346` sed-carved JSON | add `--json-schema` + `--output-format json` to :299 | Removes "prose around JSON"->hardcoded REJECT | (a) | safe | hardcoded-REJECT fallback stays |
133
- | 4 | **Structured done-recognition** | `done-recognition.sh:282-303` json.loads+brace-slice | add `--json-schema` to :57/:171 | Removes unparsable->inconclusive | (a) | safe | inconclusive fallback stays |
134
- | 5 | **Council interval sweep** (existing CHANGE-MAP #1) | `completion-council.sh:84` interval=5 | tune 2-3 for simple tier | fewer idle iters -> $/wall-clock | (a) | n/a | env default |
135
- | 6 | **Complexity->tier routing** (existing #3) | `run.sh:742` flat sonnet; case :16963 | `auto` arm: simple->haiku-enable, complex->opus-pin | $/build on simple majority | (c) | 3 readers + hard-guard | revert to `sonnet` |
136
- | 7 | **Native budget/effort tighten** | ALREADY plumbed `claude.sh:143-158`; side-calls (:10998, council-v2:299, done-rec:57) still bare | point side-calls at `--max-budget-usd`/`--effort` too | consistent native breaker everywhere | (a) | mirror bash<->TS flags | drop flag |
137
- | 8 | **Prompt caching** (existing #7, CONTINGENT) | `[CACHE_BREAKPOINT]` INERT `run.sh:15143` | wire real `cache_control` on static prefix IF CLI folds it across per-iter processes | $/build on multi-iter (cache reads visible in envelope) | (b)-adjacent | verify CLI first; may be no-op | remove marker wiring |
138
- | 9 | **Self-heal from logs** (existing #4) | APP_CRASHED count only `run.sh:14969`; LAST_ERROR write-only | route `tail+grep` error signature into prompt | pass-rate on crashing specs | (c) | build_prompt-adjacent -> check byte-lock | honest-degrade to today |
139
-
140
- Ranked order to execute: **1 -> 2 -> 3 -> 4** (structured-outputs cluster, all bucket-(a),
141
- parity-safe, mostly quality/robustness - do first, low risk) **-> 5** (interval, zero code)
142
- **-> 7** (side-call flag tighten) **-> 6** (tier routing, (c)) **-> 9** (self-heal, (c)) **-> 8**
143
- (caching, contingent, verify CLI first). Each: change, re-run corpus, apply gate rule. No bench
144
- move the right way = don't ship (ponytail: no no-ops).
145
-
146
- **Do NOT** touch `build_prompt()` output text (items that would: 8, 9 partially) without founder
147
- auth + 60-fixture regen. Structured-outputs items 1-4 do NOT touch build_prompt - confirmed
148
- parity-safe below.
149
-
150
- ---
151
-
152
- ## Deliverable 3: Parity plan
153
-
154
- **The load-bearing fact:** the 60-fixture SHA-256 lock (`loki-ts/tests/parity/build_prompt.test.ts`,
155
- KNOWN_FAILING empty = hard 60/60) hashes ONLY `buildPrompt()` return TEXT. CLI flags come from a
156
- separate surface (`claude_flags.ts` / `voter_agents.ts` / `providers.ts:244`). **So adding
157
- `--json-schema`/`--effort`/`--max-budget-usd` to a claude call is parity-SAFE w.r.t. the lock**, and
158
- also doesn't touch the 10-command CLI matrix (which never invokes a model).
159
-
160
- **The parity TRAP this arc must own** (agent-verified): a native flag added to ONE route only
161
- (bash `autonomy/lib/claude-flags.sh` vs TS `loki-ts/src/providers/claude_flags.ts`) would **pass all
162
- four parity gates** (bun-parity.yml, parity-drift.yml, local-ci matrix, build_prompt lock) while
163
- diverging at RUNTIME - because the matrix doesn't spawn the model. Therefore:
164
- - **Every native-flag change lands in BOTH `claude-flags.sh` AND `claude_flags.ts`, byte-mirrored**,
165
- gated on `claudeFlagSupported()`/`loki_claude_flag_supported` for old-CLI degrade.
166
- - **Proven by the flag-parity unit tests** (`loki-ts/tests/runner/providers.test.ts`,
167
- `tests/test-bash-bun-parity.sh` run at `local-ci.sh:390`), NOT the CLI matrix. Add a case per new flag.
168
- - Structured-output items 1-4: mirror the bash change (voter-agents/council-v2/done-rec/quality-gates)
169
- in the corresponding TS (`council/voter_agents.ts`, `runner/quality_gates.ts`).
170
- - **build_prompt-touching items (8, 9)**: founder-gated. Regenerate all 60 fixtures via `run-bash.sh`
171
- (`for i in $(seq 1 60); do bash run-bash.sh fixture-$i; done`), regenerate `index.json`, keep bash<->TS
172
- 60/60 in the SAME PR. Watch the fixtures 27/45 alphabetical-readdir determinism guard.
173
- - **Doctor normalizers are TRIPLICATED** (`bun-parity.yml:127-184`, `parity-drift.yml:83-135`,
174
- `local-ci.sh:812-860`) with subtle diffs (JSON floor-vs-delete, counts kept-vs-blanked). If any
175
- primitive changes doctor output, edit ALL THREE in sync.
176
-
177
- Every commit proven on BOTH routes (`bin/loki` + `LOKI_LEGACY_BASH=1 bin/loki`).
178
-
179
- ---
180
-
181
- ## Deliverable 4: Gate plan
182
-
183
- - **Trust-core = 3-reviewer council** (2 Opus + 1 Sonnet, unanimous APPROVE, reviewers RUN tests).
184
- Any CONCERN/REJECT -> read source, fix, RE-RUN whole council. Loop to 3/3. Never "2-of-3".
185
- - **`bash scripts/local-ci.sh` green before EVERY push** (Step 0). It mirrors every workflow:
186
- bash -n + shellcheck, pytest, `bun typecheck` + `bun test` (the 60-fixture lock runs here),
187
- CLI dual-route (`test-cli-commands.sh` Bun + LEGACY_BASH), `test-bash-bun-parity.sh`, the local
188
- bun-parity matrix, npm-pack contents (>=6 load-bearing files), SBOM, no-emoji, no-`git add -A`.
189
- - **Extraction-test harness for bash fn changes** (`feedback-function-extraction-test-harness`):
190
- extract the changed fn AND every helper it calls (grep `sed -n '/^<fn>() {/'` tests); `set +u`
191
- inside the eval subshell; prove runtime-vs-test before "fixing" a red test (fix the TEST if runtime
192
- is right, never patch correct code).
193
- - **RARV-C changes proven with hermetic Bun integration tests** (stub judge, `LOKI_OVERRIDE_REAL_JUDGE=0`,
194
- mkdtemp scratch, no token cost) - pattern in `loki-ts/tests/integration/override_on_block.test.ts`.
195
- - **Never run an engine build from the worktree** (`feedback-never-run-engine-build`): all real builds
196
- from isolated source copy, cwd + LOKI_TARGET_DIR pinned to scratch.
197
-
198
- ---
199
-
200
- ## Deliverable 5: Release plan (v8.0.0, MAJOR)
201
-
202
- - **14 version locations** (all verified at 7.128.2, zero drift): VERSION:1, package.json:4,
203
- SKILL.md:6+411, Dockerfile:9/14, Dockerfile.sandbox:102/103, plugins/.../plugin.json:5, CLAUDE.md:306,
204
- dashboard/__init__.py:10, mcp/__init__.py:60, CHANGELOG.md:8, docs/INSTALLATION.md:5(+399 docker tag),
205
- wiki/Home.md:106, wiki/_Sidebar.md:46, wiki/API-Reference.md:69.
206
- - **MAJOR bump also touches docker-tag group** (README.md ~81/~380, docs/INSTALLATION.md 7+ tags,
207
- docker-compose.yml:1).
208
- - **Do NOT touch** (independently versioned, would break if "fixed"): `sdk/python/pyproject.toml`
209
- (auto-synced by release.yml:352 at publish), `sdk/typescript/package.json` (5.55.0),
210
- `loki-ts/package.json` (0.1.0-alpha.1), `vscode-extension/package.json` (deprecated).
211
- - **FIX in v8 - release-notes bug** (`release.yml:179/231`): awk expects bracketed `## [VERSION]` but
212
- CHANGELOG uses unbracketed `## vVERSION`, so release notes have silently been generic. Fix the awk or
213
- the header format (one PR, verify the extracted body is non-empty).
214
- - **Dashboard frontend rebuilt** (`cd legacy-ui && npm ci && npm run build:all`) - writes both
215
- `legacy-ui/dist/` and `legacy-ui-static/`.
216
- - **Pre-publish validation** (CLAUDE.md 3a): `npm pack --dry-run` contains web-app/dist + legacy-ui-static;
217
- fresh global install serves web app + API.
218
- - **Per-job release verification**: `gh run view <id> --json jobs` per channel (npm/Docker/Homebrew/Release),
219
- not just "workflow green".
220
- - **Post-release smoke from SHIPPED artifacts on BOTH routes**: `npm pack loki-mode@8.0.0` + `bun run bin/loki
221
- version` and `LOKI_LEGACY_BASH=1 ... version`; `docker run --rm asklokesh/loki-mode:8.0.0 doctor --json`;
222
- WebFetch brew formula version+sha.
223
- - **Cleanup after every local-ci/validation**: create one exact run-owned directory with `mktemp -d`
224
- under the canonical `${TMPDIR:-/tmp}` root and keep all validation artifacts and recorded child
225
- PIDs inside it. Use the executable operator-side sequence in
226
- [`enterprise/performance.md`](enterprise/performance.md#cleanup); it does not depend on a shipped
227
- cleanup helper. Stop only the exact verified child PIDs. Before removing the exact saved path,
228
- require its `.loki-run-owned` marker to contain that path, require the target and marker to belong
229
- to the current UID, require the target to be a canonical direct child of the temp root, refuse
230
- symlinks, and refuse any target with `.git` worktree metadata. A failed guard leaves the path in
231
- place for inspection.
232
-
233
- ---
234
-
235
- ## Do-NOT list (binding)
236
-
237
- 1. Do NOT replace the 3-reviewer council with a single-LLM outcome-grader. Structured-outputs changes
238
- the OUTPUT FORMAT (text->JSON), NOT the 3-judge architecture. That's the moat.
239
- 2. Do NOT add an LLM judge to the bench grader (deterministic exit==0 only; `validate_adapter_output`
240
- rejects self-judged keys).
241
- 3. Do NOT trust council APPROVE / completion-claim as the bench pass signal (fake-green failure mode).
242
- 4. Do NOT touch `build_prompt()` output text without founder auth + 60-fixture regen + 60/60 bash<->TS.
243
- 5. Do NOT change corpus/grader/price-table across a before/after pair.
244
- 6. Do NOT run a real engine build from the worktree.
245
- 7. Do NOT add a native flag to one route only (silent runtime divergence past all parity gates).
246
- 8. Do NOT ship a change that doesn't move the bench the right way.
247
- 9. Do NOT rebuild what's already adopted (--effort/--max-budget-usd plumbing, council --json-schema path).
248
-
249
- ---
250
-
251
- ## FOUNDER SCOPE DECISIONS (2026-07-13, locked)
252
-
253
- - **SCOPE = FULL ARC** including founder-gated items 8 (caching) and 9 (self-heal-from-logs).
254
- This constitutes explicit authorization to unlock `build_prompt()`'s 60-fixture byte-lock WHEN
255
- those items come up - executed per Deliverable 3 (regenerate all 60 fixtures via `run-bash.sh`,
256
- keep bash<->TS 60/60 in the same PR, full council + local-ci). Founder-gated items still run LAST,
257
- after all bucket-(a) structured-output wins are banked and bench-measured. Caching (8) still
258
- requires the CLI-mechanics verification (does the CLI fold cache_control across per-iteration
259
- processes?) BEFORE committing - if it's a no-op, report that and drop it, don't ship a no-op.
260
- - **BASELINE = 3-SPEC SMOKE FIRST.** Prove the full pipeline (baseline -> one change -> measure ->
261
- gate rule) on a tiny 3-spec corpus to validate the harness machinery cheaply, THEN build the real
262
- discriminator-derived corpus (simple+hard+multi-failure+token-heavy) and run the full v7.128.2
263
- baseline. Catches harness bugs before the big real-dollar run.
264
- - **Honesty pre-commit stands:** most iteration wins are already shipped; expect single-digit-% to
265
- maybe-2x from tuning, NOT 100x (the real 100x is the already-scoped k8s INFRA work, not this arc).
266
- Report the true number even if unimpressive.
267
-
268
- ## Consolidation + sequencing
269
-
270
- 1. Create branch `feature/rarv-c-100x-primitives`. Build harness, run 3-SPEC SMOKE to validate the
271
- pipeline, then commit the full v7.128.2 baseline (Deliverable 1) before any change.
272
- 2. Write `docs/RARV-C-100X-PLAN.md` = this plan (supersedes/links the two prior v7.121.5 docs; keep
273
- them as history, note they're superseded).
274
- 3. Execute the adoption table in ranked order, one primitive per commit, bench + full gate after each.
275
- 4. Founder-gated items (8 caching, 9 self-heal build_prompt half) LAST, only after (a)-items banked and
276
- explicit unlock.
277
- 5. Release v8.0.0 per Deliverable 5 once the bench shows the aggregate win (or honestly report the real
278
- delta if single-digit - the plan pre-commits to reporting the true number, not dressing it up).
279
-
280
- ## Verification (how to test end-to-end)
281
- - Bench: `bash benchmarks/bench/run.sh run <spec> --trials 3` from isolated scratch; read
282
- iterations/cost/duration from result JSON; grader `exit==0`. 2-spec smoke asserts [pass, fail].
283
- - Structured-outputs: hermetic Bun integration test with stub judge asserts JSON verdict parsed,
284
- no text-regex path hit; + extraction test for the bash side.
285
- - Parity: `bash scripts/local-ci.sh` green (runs 60-fixture lock + dual-route CLI + flag-parity tests).
286
- - Per commit: full 3-reviewer council + local-ci, both routes.