loki-mode 11.74.2 → 11.75.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/README.md +1 -1
  2. package/SKILL.md +2 -3
  3. package/VERSION +1 -1
  4. package/autonomy/completion-council.sh +10 -10
  5. package/autonomy/council-v2.sh +4 -4
  6. package/autonomy/grill.sh +1 -1
  7. package/autonomy/lib/ablation.py +22 -2
  8. package/autonomy/lib/browser-open.sh +1 -1
  9. package/autonomy/lib/chat.sh +1 -1
  10. package/autonomy/lib/cockpit-render.sh +1 -1
  11. package/autonomy/lib/done-recognition.sh +4 -4
  12. package/autonomy/lib/efficiency_cost.py +1 -1
  13. package/autonomy/lib/engine10-push.sh +2 -2
  14. package/autonomy/lib/prd-enrich.sh +1 -1
  15. package/autonomy/lib/proof-check.sh +1 -1
  16. package/autonomy/lib/proof-generator.py +3 -3
  17. package/autonomy/lib/proof-pr.sh +1 -1
  18. package/autonomy/lib/skill-link-heal.sh +1 -1
  19. package/autonomy/lib/voter-agents.sh +1 -1
  20. package/autonomy/loki +26 -37
  21. package/autonomy/prd-checklist.sh +1 -1
  22. package/autonomy/receipt_jwt.py +1 -1
  23. package/autonomy/run.sh +28 -28
  24. package/autonomy/trigger-schedule.py +6 -414
  25. package/autonomy/tui.sh +1 -1
  26. package/autonomy/verify.sh +4 -4
  27. package/completions/loki.bash +0 -5
  28. package/dashboard/__init__.py +1 -1
  29. package/docs/ARCHITECTURE.md +1 -2
  30. package/docs/CLI-REFERENCE.md +1 -1
  31. package/docs/COMPONENTS.md +1 -1
  32. package/docs/INSTALLATION.md +1 -1
  33. package/docs/ROUTING-EVIDENCE.md +1 -2
  34. package/docs/V10-RESEARCH.md +1 -1
  35. package/docs/dev/architecture-reference.md +3 -7
  36. package/docs/dev/project-structure.md +1 -4
  37. package/docs/dev/release-checklist.md +13 -31
  38. package/docs/research-2026-07/OBSERVABILITY-TOOL-SPEC.md +1 -1
  39. package/docs/v11/MARKET-SLICES.md +1 -1
  40. package/docs/v11/REGISTRIES.md +1 -1
  41. package/docs/v11/ROUTER-1.md +2 -2
  42. package/loki-ts/dist/loki.js +2 -2
  43. package/mcp/__init__.py +1 -1
  44. package/package.json +2 -2
  45. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  46. package/skills/extending.md +2 -3
  47. package/skills/factory-operations.md +11 -18
  48. package/skills/release-cadence.md +2 -2
  49. package/web-app/dist/assets/{AdminPage-jkjilfbl.js → AdminPage-CTwi8SUX.js} +1 -1
  50. package/web-app/dist/assets/{Avatar-bd5JWkSJ.js → Avatar-DVtGtLkJ.js} +1 -1
  51. package/web-app/dist/assets/{Badge-DVRit2Xw.js → Badge-rwKzz0Pe.js} +1 -1
  52. package/web-app/dist/assets/{Button-BNAB-pVZ.js → Button-nIsPDfsQ.js} +1 -1
  53. package/web-app/dist/assets/{CockpitPage-DpG29h_w.js → CockpitPage-BCeDpoWa.js} +1 -1
  54. package/web-app/dist/assets/{ComparePage-Dasg5V41.js → ComparePage-CYIYanVq.js} +1 -1
  55. package/web-app/dist/assets/{ErrorBoundary-DJojse6b.js → ErrorBoundary-Bkz6HqWp.js} +1 -1
  56. package/web-app/dist/assets/{EvidenceReceiptPanel-Blxw7_u1.js → EvidenceReceiptPanel-DZT2Np4F.js} +1 -1
  57. package/web-app/dist/assets/{GitHubIssuesPanel-BBvSFj80.js → GitHubIssuesPanel-Bzla91Lu.js} +1 -1
  58. package/web-app/dist/assets/{GitHubPRsPanel-BCIKeSBg.js → GitHubPRsPanel-FjT-Xn5t.js} +1 -1
  59. package/web-app/dist/assets/{HomePage-C7d__oNG.js → HomePage-pXgmRGLt.js} +2 -2
  60. package/web-app/dist/assets/{LoginPage-BXljL3yY.js → LoginPage-CnmpE28B.js} +1 -1
  61. package/web-app/dist/assets/{MagicPage-Xjkts_yE.js → MagicPage-CuSeGsLq.js} +1 -1
  62. package/web-app/dist/assets/{MetricsPage-kQvVp-j2.js → MetricsPage-Bg3PkBOU.js} +1 -1
  63. package/web-app/dist/assets/{NotFoundPage-D-4ZlEaO.js → NotFoundPage-uzBtZNV-.js} +1 -1
  64. package/web-app/dist/assets/{ProjectPage-DfzR5RXP.js → ProjectPage-Dacki8Xr.js} +3 -3
  65. package/web-app/dist/assets/{ProjectsPage-DFDsWzkV.js → ProjectsPage-BRGjksXG.js} +1 -1
  66. package/web-app/dist/assets/{SettingsPage-CLPIoYT3.js → SettingsPage-BbNf3fEJ.js} +1 -1
  67. package/web-app/dist/assets/{ShowcasePage-PZKkyGeY.js → ShowcasePage-XX4830sX.js} +1 -1
  68. package/web-app/dist/assets/{SystemSettingsPage-BsBlcnzo.js → SystemSettingsPage-DOhQeXa6.js} +1 -1
  69. package/web-app/dist/assets/{TeamsPage-BSjgNhoU.js → TeamsPage-2reIRUp_.js} +1 -1
  70. package/web-app/dist/assets/{TemplatesPage-W2KeAzbg.js → TemplatesPage-BUsLEWHW.js} +1 -1
  71. package/web-app/dist/assets/{TerminalOutput-BjroTiCC.js → TerminalOutput-BrBDcgzC.js} +1 -1
  72. package/web-app/dist/assets/{activity-BXZ5YYes.js → activity-B6AZpgmb.js} +1 -1
  73. package/web-app/dist/assets/{bell-D1urp5pa.js → bell-CB792A7S.js} +1 -1
  74. package/web-app/dist/assets/{bot-Chedf2bF.js → bot-uQZwOFAn.js} +1 -1
  75. package/web-app/dist/assets/{check-DhaCuOCV.js → check-DrtG0lIZ.js} +1 -1
  76. package/web-app/dist/assets/{chevron-left-D7BpQyA6.js → chevron-left-CrsJSAqQ.js} +1 -1
  77. package/web-app/dist/assets/{circle-alert-DnGvQ_AQ.js → circle-alert-BUCly4p3.js} +1 -1
  78. package/web-app/dist/assets/{clock-CqfxWhHM.js → clock-B2IT9SnE.js} +1 -1
  79. package/web-app/dist/assets/{cloud-BKxp5AWB.js → cloud-CN6Ux7Q7.js} +1 -1
  80. package/web-app/dist/assets/{code-xml-BDQ6GBtt.js → code-xml-BEm8PWnK.js} +1 -1
  81. package/web-app/dist/assets/{database-BmpEx1y_.js → database-cHe5Fgu8.js} +1 -1
  82. package/web-app/dist/assets/{dollar-sign-DYNY9R_C.js → dollar-sign-BVmP4YrE.js} +1 -1
  83. package/web-app/dist/assets/{file-code-corner-BJi0IBFd.js → file-code-corner-D-m-NrwO.js} +1 -1
  84. package/web-app/dist/assets/{file-plus-Dqyb2bcQ.js → file-plus-6mCjIzAB.js} +1 -1
  85. package/web-app/dist/assets/{globe-DPh4RWfM.js → globe-vcWOujwU.js} +1 -1
  86. package/web-app/dist/assets/{hammer-B3xnuoA1.js → hammer-D4nZFpO2.js} +1 -1
  87. package/web-app/dist/assets/{index-BpX8DcTr.js → index-u8toJ43r.js} +3 -3
  88. package/web-app/dist/assets/{layers-BRCmyCW8.js → layers-CNhYLop8.js} +1 -1
  89. package/web-app/dist/assets/{loader-circle-n07Pky0M.js → loader-circle-Vl7XIMV6.js} +1 -1
  90. package/web-app/dist/assets/{lock-BWqOuQmS.js → lock-SW_KwAvf.js} +1 -1
  91. package/web-app/dist/assets/{package-BJlB_Z-Z.js → package-QPK-7Ej1.js} +1 -1
  92. package/web-app/dist/assets/{plus-oH17BZu2.js → plus-DUgAlgCB.js} +1 -1
  93. package/web-app/dist/assets/{refresh-cw-CPQ476LL.js → refresh-cw-LfUksPHq.js} +1 -1
  94. package/web-app/dist/assets/{rotate-ccw-7hLvOcnS.js → rotate-ccw-CMbuouVq.js} +1 -1
  95. package/web-app/dist/assets/{scroll-text-BCmLauQn.js → scroll-text-C_FxBmNQ.js} +1 -1
  96. package/web-app/dist/assets/{server-DfTfvW84.js → server-7UJe9Jqt.js} +1 -1
  97. package/web-app/dist/assets/{shield-alert-CaeGRq19.js → shield-alert-BMuu6fYB.js} +1 -1
  98. package/web-app/dist/assets/{thumbs-up-Dz-l2GPC.js → thumbs-up-Bhs0d2Gp.js} +1 -1
  99. package/web-app/dist/assets/{trash-2-B-OsDmSo.js → trash-2-BZKxv49w.js} +1 -1
  100. package/web-app/dist/assets/{trending-down-CXTFOxzq.js → trending-down-DKeCMZek.js} +1 -1
  101. package/web-app/dist/assets/{trending-up-FQEdqr3v.js → trending-up-43_9fShg.js} +1 -1
  102. package/web-app/dist/assets/{upload-CacWSNTg.js → upload-pV3irPEW.js} +1 -1
  103. package/web-app/dist/assets/{usePolling-cIjZ9qd2.js → usePolling-CoZQM-WL.js} +1 -1
  104. package/web-app/dist/assets/{user-DAouWFHi.js → user-CMl7dXvC.js} +1 -1
  105. package/web-app/dist/index.html +1 -1
  106. package/autonomy/company-seats.json +0 -82
  107. package/docs/COMPETITIVE-INTEL-2026-09.md +0 -444
  108. package/docs/FOUNDER-DECISIONS-TRUST-SEMANTICS-2026-08-01.md +0 -145
  109. package/docs/FOUNDER-STATUS-AND-DECISIONS-2026-07-01.md +0 -132
  110. package/docs/LOKI-10-BUILD-PROMPT.md +0 -350
  111. package/docs/STRATEGY-2026-2028.md +0 -124
  112. package/docs/V10-VISION.md +0 -161
  113. package/docs/v10/ADOPTION-PLAN.md +0 -375
  114. package/docs/v10/ARCHITECT-CUTS.md +0 -744
  115. package/docs/v10/BACKLOG.md +0 -231
  116. package/docs/v10/BOARD.md +0 -1403
  117. package/docs/v10/CONTROL-PLANE.md +0 -120
  118. package/docs/v10/CONTROL.md +0 -36
  119. package/docs/v10/CP-ASK-PLAN.md +0 -85
  120. package/docs/v10/CP-ENTERPRISE-UI.md +0 -537
  121. package/docs/v10/D51-PHASE-B.md +0 -120
  122. package/docs/v10/D61-SPEED.md +0 -105
  123. package/docs/v10/D63-CARDS.md +0 -354
  124. package/docs/v10/DECISIONS.md +0 -915
  125. package/docs/v10/E2E-D65.md +0 -123
  126. package/docs/v10/ENGINE-LAWS.md +0 -163
  127. package/docs/v10/ENGINE-MEASURE.md +0 -69
  128. package/docs/v10/ENGINE.md +0 -743
  129. package/docs/v10/FAILURE-CLASSES.md +0 -2026
  130. package/docs/v10/FC21B-FC22-PLAN.md +0 -107
  131. package/docs/v10/FIRST-RUN-GATE.md +0 -39
  132. package/docs/v10/FOUNDER-QUEUE.md +0 -29
  133. package/docs/v10/GAP-RESEARCH-1003.md +0 -32
  134. package/docs/v10/GUARDS.md +0 -883
  135. package/docs/v10/L0-WAVE1.md +0 -81
  136. package/docs/v10/LEGACY-REMOVAL.md +0 -408
  137. package/docs/v10/MEDIUM-ANALYSIS.md +0 -346
  138. package/docs/v10/METRICS.md +0 -645
  139. package/docs/v10/MODERNIZE.md +0 -437
  140. package/docs/v10/OPENCODE-PARITY-PLAN.md +0 -84
  141. package/docs/v10/OPERATING-MODEL.md +0 -60
  142. package/docs/v10/PLAN-V12.md +0 -896
  143. package/docs/v10/PROGRESS.md +0 -2735
  144. package/docs/v10/RELEASE-11.md +0 -77
  145. package/docs/v10/RETRO-2026.md +0 -650
  146. package/docs/v10/ROADMAP-D63.md +0 -35
  147. package/docs/v10/SCALE.md +0 -140
  148. package/docs/v10/SCORECARD-PLAN.md +0 -250
  149. package/docs/v10/SWARM-PROMPT.md +0 -98
  150. package/docs/v10/SWARM.md +0 -293
  151. package/docs/v10/cp-redesign/PARITY.md +0 -188
  152. package/docs/v10/cp-redesign/legacy/INDEX.md +0 -1167
  153. package/docs/v10/roadmap-10/01-measurement.md +0 -113
  154. package/docs/v10/roadmap-10/02-cost.md +0 -75
  155. package/docs/v10/roadmap-10/03-speed.md +0 -65
  156. package/docs/v10/roadmap-10/04-first-run.md +0 -61
  157. package/docs/v10/roadmap-10/05-deploy.md +0 -61
  158. package/docs/v10/roadmap-10/06-stability.md +0 -64
  159. package/docs/v10/roadmap-10/07-quality.md +0 -57
  160. package/docs/v10/roadmap-10/08-proof.md +0 -48
  161. package/docs/v10/roadmap-10/09-safety.md +0 -74
  162. package/docs/v10/roadmap-10/README.md +0 -1464
  163. package/skills/sdlc-fleet.md +0 -170
  164. package/tools/cockpit/SPEC.md +0 -275
  165. package/tools/cockpit/index.html +0 -146
  166. package/tools/cockpit/roi-basis.json +0 -33
  167. package/tools/cockpit/server.py +0 -946
@@ -1,81 +0,0 @@
1
- # L0 Wave 1: the model decides, the harness proves
2
-
3
- Founder directive, relayed by Loki steering at about 18:00Z on 2026-10-03, permanent: "never hardcode in the harness, work from 100k ft, use the intelligence of the model". L0 sits above L1 to L7 (ENGINE-LAWS.md section 2). This file slices it into Wave 1. Every slice touches trust, so each one gets an opus D12 review (unanimous).
4
-
5
- ## The split
6
-
7
- The model owns repo and task knowledge:
8
- - layout and package roots;
9
- - runner, command and cwd;
10
- - whether there is a UI, and how to boot it;
11
- - which files are in scope and which tests are impacted;
12
- - task size;
13
- - who owns a failure;
14
- - what the issue asks.
15
-
16
- The harness owns mechanism:
17
- - running the commands the model proposed, and recording cwd, exit code, output and test counts;
18
- - sandboxing, budgets and process control;
19
- - signing, receipts and integrity;
20
- - terminal I/O;
21
- - deterministic tamper checks, such as test or runner config edited or weakened.
22
-
23
- When execution contradicts the model, the output goes back to the model once. The verdict comes from execution evidence plus a separate reviewer call, never from the author.
24
-
25
- ## Inventory (grep on main 11685c822, loki-ts/src)
26
-
27
- Manifest probes:
28
- - engine10/testmap.ts
29
- - features/visual_evidence.ts
30
- - runner/repo_profile.ts
31
- - runner/quality_gates.ts
32
- - engine10/modernize/inventory.ts
33
- - util/update_check.ts (this reads Loki's own package.json, so it is not repo knowledge)
34
-
35
- Hardcoded runner commands:
36
- - engine10/testmap.ts (COMMANDS)
37
- - engine10/stages/verify.ts
38
- - engine10/stages/wall.ts
39
- - engine10/stages/deep.ts
40
- - engine10/types.ts
41
- - features/wall_manifest.ts
42
- - runner/quality_gates.ts
43
- - runner/repo_profile.ts
44
- - engine10/modernize/inventory.ts
45
- - engine10/modernize/presealed_wall.ts
46
-
47
- Task-wording heuristics:
48
- - e10ext/scope.ts (keyword regex)
49
- - engine10/sizing.ts (character counts and the named-file regex)
50
-
51
- The peer counted 10 manifest-probe files and 17 runner-command files. The grep above finds fewer, so EL-W1-00 re-measures the inventory before cutting.
52
-
53
- ## Slices (sonnet builders, opus D12 review)
54
-
55
- | ID | Goal | File set | Wall checks |
56
- |----|------|----------|-------------|
57
- | EL-W1-00 | Static guard (L0): a CI test that fails when a new file under loki-ts/src probes a manifest name or embeds a runner command outside an allowlist. The allowlist starts as today's inventory and may only shrink. | new tests/engine10/l0_guard.test.ts | the guard goes red on a planted probe; the allowlist equals the inventory |
58
- | EL-W1-01 | Project Model discovery: one intake session reads loki.yaml, AGENTS.md, CLAUDE.md, CONTRIBUTING, README, CI workflows, manifests and configs. It returns a schema-checked Project Model (packages, roots, runner, cwd and test, lint, build and start commands, UI and boot, workspace kind), each answer citing its source files. Cached in .loki/project.json, keyed by manifest and lockfile hash. | new engine10/project_model.ts, plus its schema and intake wiring | schema rejects an answer with no citation; cache hit when hashes are unchanged; FireLater fixture yields backend/ and frontend/ roots |
59
- | EL-W1-02 | Calibration: the harness runs each proposed test command once (the Wall base run) and records cwd, exit code and counts. On contradiction (a load error or 0 collected), it sends the output back to the model once, then reruns. | project_model.ts calibrate(), wall.ts | a wrong command is corrected in one round; the second contradiction is recorded as harness ERROR |
60
- | EL-W1-03 | Consumers: testmap, verify, wall, deep and visual_evidence read commands and roots only through the Project Model API. COMMANDS and the manifest probes lose their authority and stay only as discovery hints. | testmap.ts, verify.ts, wall.ts, deep.ts, visual_evidence.ts | the L0 guard allowlist shrinks; the Repo Shape Matrix stays green |
61
- | EL-W1-04 | Scope: in-scope judgment is a model call citing the issue and the plan, and the keyword regex is a hint only. Advisory remains (L2). | e10ext/scope.ts, plan stage | FireLater#17 routes edits ruled in scope with a citation |
62
- | EL-W1-05 | Sizing: a model call returns a size plus its reasons, or the size folds into discovery. The character counts become a fallback only when the model call errors. | engine10/sizing.ts | the reasons are recorded in the receipt |
63
- | EL-W1-06 | Failure ownership (supersedes the FC-02 regex classifier, 7ad4a18b6 blocked in round 2): the harness gathers evidence (a hermetic base rerun with PYTHONPATH, VIRTUAL_ENV and the user site scrubbed, and traceback paths checked against the base dir). A separate reviewer call assigns the owner. Checks the task targets are never env-owned. | util/runner_load_error.ts, verify.ts, seal | round-2 repros B1 and B2 both end as code-owned |
64
- | EL-W1-07 | Visual evidence: whether there is a UI, and how to boot it, comes from the Project Model. | features/visual_evidence.ts | FireLater frontend/ is found; a no-UI repo gets an honest "no UI in Project Model" |
65
-
66
- Order: 00 and 01 first, then 02 and 03. 04, 05 and 07 can run in parallel with 02 once 01 lands. 06 starts after 01 (it consumes the commands). The hardcoded tables are deleted only after the model path is green on the Repo Shape Matrix.
67
-
68
- ## In-flight reconciliation
69
-
70
- - **FC-01 monorepo, aac46dc26 (a446b394845a709ac):** a minimal stopgap hint only, superseded by EL-W1-01. The builder was told at 17:42Z.
71
- - **FC-02 runner-load, 7ad4a18b6:** blocked in round 2, and folded into EL-W1-06 rather than patched as a regex classifier.
72
- - **FC-09 runner-config registry, f4eccfeac:** a deterministic tamper check (mechanism, which L0 allows). Its re-review continues.
73
- - **FC-10 terminalWidth:** terminal I/O, which L0 allows, so its TL review continues.
74
- - **EL-W0-06 model default, 841065e46:** consistent with L1 and L0, so its re-review continues.
75
-
76
- ## Review rule (binding for every D12 reviewer)
77
-
78
- Reject any change that adds an `if` or a regex about the user's repo shape, language, framework or task wording. The fix is a prompt or schema change plus an execution check. Exceptions are only:
79
- - tamper checks;
80
- - terminal I/O;
81
- - Loki's own files.
@@ -1,408 +0,0 @@
1
- # Legacy removal inventory (D57, expanded 2026-10-03)
2
-
3
- Architect inventory, 2026-10-01 base `main` 80cdb7193, updated 2026-10-03. Product calls are D57 item 6 (a to f) plus founder scope (J, K, STALE-ZERO generator). "No v10 equivalent" rows are deleted per 6(f) unless named in D54 v1 scope. Evidence is a grep or a file:line; anything not proven unused is KEEP-CHECK, never delete. Wave plan reflects parallel work in O(n) slices of non-overlapping file sets.
4
-
5
- ## 1. Routing surface (Wave 1, builders already on it)
6
-
7
- Entry point: package.json `bin.loki = bin/loki`. `BASH_CLI=autonomy/loki` (bin/loki:33). Every `exec "$BASH_CLI"` below is a legacy route.
8
-
9
- | Where | Legacy behavior | v10 replacement |
10
- |---|---|---|
11
- | bin/loki:81, 92, 115 | bad LOKI_TS_ENTRY, BUN_FROM_SOURCE miss, no dist and no src: exec bash | plain error, exit non-zero |
12
- | bin/loki:242-243 | LOKI_LEGACY_BASH=1 forces bash for every command | delete the knob |
13
- | bin/loki:300-309 | `modernize` without `--to` goes to bash (heal, migrate) | v10 modernize only, hidden (6c); `heal`, `migrate` deleted (6e) |
14
- | bin/loki:313-319 | `loki legacy <args>` re-execs with LOKI_ENGINE=legacy | delete; migration note |
15
- | bin/loki:325-326 | `LOKI_ENGINE` switch, default v10, any other value skips v10 | delete the variable, v10 unconditional |
16
- | bin/loki:331-342 | status, verify, dashboard, keys reach v10 only with explicit LOKI_ENGINE=v10; bare `verify` picks newest of e10 run vs legacy proof | always engine10 status/verify/keys; dashboard goes to `loki control` once D56 flips |
17
- | bin/loki:344 | bare `loki` and any flag-first call go to bash | engine10 usage (engine10/cli.ts USAGE) |
18
- | bin/loki:347-352 | `loki quick --no-pr`, `quick --help` (flag-first) go to legacy quick | `quick <flags> <task>` maps to engine10 `--no-pr`; flags passed through |
19
- | bin/loki:360 | any one-word argument goes to bash (start, init, stop, config, backlog...) | per-command table below |
20
- | bin/loki:364-371 | unsupported LOKI_PROVIDER (opencode etc.) falls to legacy | plain error naming claude, codex, cline, aider |
21
- | bin/loki:372-384 | no working bun: "Running the legacy engine instead" | D57 item 2: print the one-line fix, exit non-zero |
22
- | bin/loki:388 | error text says "set LOKI_ENGINE=legacy" | drop that hint |
23
- | bin/loki:397-399 | no bun on PATH: exec bash for everything | same no-bun error as 372-384 |
24
- | bin/loki:474-477 | `start` with LOKI_SDK_LOOP: v8 Bun loop, diverts to bash for --parallel, --github, --issue, --openspec, --bmad-project, --mirofish*, --sandbox, opencode | `loki <file>` / `loki "<task>"` (6a); issue refs already v10 |
25
- | bin/loki:492-507 | `trust detail`, `doctor --airgap` exec bash | trust: delete (verification frozen, D54); doctor --airgap: KEEP-CHECK (D54 "your infrastructure"), port to Bun doctor |
26
- | bin/loki:532-554, 596 | Bun allowlist (version, status, stats, doctor, provider, memory, rollback, internal, kpis, trust, proof, receipt, wiki, crash) runs v8 Bun commands, not engine10 | keep version, doctor; status goes engine10; rest deleted |
27
- | bin/loki:599 | catch-all `*` exec bash | engine10 run (task) or "unknown command" |
28
- | loki-ts/src/cli.ts:7, 38-39, 18 | help says "falls through to bash", LOKI_LEGACY_BASH | rewrite help to engine10 USAGE |
29
- | loki-ts/src/cli.ts:149 | `report` delegates to bash (util/bash_delegate.ts) | delete with report |
30
- | loki-ts/src/cli.ts:209-231, 295, 313 | `internal` hooks driven by run.sh; `start` (v8 loop); bench to benchmarks/bench/run.sh | delete internal and start; bench KEEP-CHECK (dev tool, not shipped CLI) |
31
- | loki-ts/src/engine10/cli.ts:3, 28 | comments and USAGE say "LOKI_ENGINE=v10" | drop the phrase |
32
-
33
- One-word bash commands (autonomy/loki main(), line 21621) and their fate:
34
- - PORT (v10 scope, hosted in bash today): `backlog` (cmd_backlog autonomy/loki:12875, runs autonomy/lib/backlog.py; D57 migration note depends on it), `config` / `config validate` / `config schema` (D51 loki.yaml), `doctor --airgap`. These must move to Bun before autonomy/loki is deleted. Wave 1 keeps routing them to bash explicitly by name, not via the catch-all.
35
- - REPLACED: `start <prd>` / `run` / `--openspec` (6a, `loki <file>`), `issue`, `github`, `import` (issue refs), `status`, `verify`, `keys` (engine10), `dashboard`, `web` (`loki control`, D56).
36
- - DELETED, decided: `quickstart`, `template` (6b); `council`, `grill`, `voice`, `heal`, `migrate`, `agent`, swarm/RARV surfaces (6e). `tour`/`demo` kept only if legacy-free; today they run bash (DELETED unless reimplemented).
37
- - DELETED, no v10 equivalent (6f): init, stop, cleanup, pause, steer, resume, why, next, stats, monitor, welcome, docker, preview, deploy, ship, open, logs, serve, api, sandbox, notify, watch, cockpit, export, assets, reset, memory, compound, checkpoint, rollback, dogfood, projects, enterprise, secrets, sentrux, setup-skill, self-update, watchdog, audit, compliance, review, ultracode, optimize, spec, intent, mcp, cluster, worktree, state, metrics, cost, estimate, trust, syslog, telemetry, remote, trigger, plan, failover, analyze, onboard, explain, docs, wiki, magic, ci, test, report, crash, share, proof, outcomes, secure, own, context, code, kpis.
38
- - KEEP-CHECK against D54 v1 "cost and control, scale, audit log, team budgets": `cost`, `audit`, `plan` (cmd_plan carries D5x refs), `self-update`, `provider`. Confirm with PM before deleting; default delete per 6(f) if no v1 owner claims them in one train.
39
-
40
- ## 2. Docs and help surface (existing Wave 1, no new work)
41
-
42
- `grep -rlE "run.sh|LOKI_ENGINE|loki legacy|legacy engine"` counts (files / mentions):
43
- - Root: README.md 19, SKILL.md 10, AGENTS.md 2, CONTRIBUTING.md 2, CLAUDE.md 1, Dockerfile 1. ARCHITECTURE.md (9), COMPONENTS.md (4) and TESTING.md (2) live under docs/; there is no root SETUP.md.
44
- - docs/: 109 files, 1200 mentions. Shipped (package.json `docs/**/*.md`). Heaviest: v10/BOARD.md 72, BUG-AUDIT-v6.61.0.md 61, ONE-RUN-AUDIT.md 44, BRANCH-LIFECYCLE-PLAN.md 44, CONFIG-FILE-PLAN.md 41, architecture/STATE-MACHINES.md 33, test-scenarios/edge-cases.md 32, v10/ENGINE.md 30, V8-AGENT-SDK-PLAN.md 28, dev/project-structure.md 14. Most are legacy plans: delete, not edit. Keep docs/v10/ (internal records; exclude from `files`).
45
- - wiki/: 6 files, 13 mentions (Quality-Gates, Enterprise-Features, Enterprise, Contributing, Checkpoints, API-Reference). Quality-Gates and Checkpoints are legacy features: delete pages.
46
- - skills/ 9 files 33, references/ 7 files 16, vscode-extension/ 3 files 4, integrations/ 2 files 3, templates/ 1 file 2, examples/agent-skills/ 1, packages/loki-seal 4 files 4 (wording only; loki-seal stays).
47
- - CLI help: autonomy/loki help (goes with the file), loki-ts/src/cli.ts HELP, engine10/cli.ts USAGE, bin/loki error strings (lines 81, 92, 382, 388).
48
- - completions/_loki, completions/loki.bash: 0 pattern hits but list every bash command; regenerate from the v10 command list.
49
-
50
- ## 3. Directory classification
51
-
52
- Evidence: `grep -rn autonomy/|providers/` over loki-ts/src/engine10, packages/control-plane, packages/loki-seal; engine10 relative imports.
53
-
54
- | Area | Verdict | Evidence |
55
- |---|---|---|
56
- | autonomy/run.sh, autonomy/loki, most of autonomy/lib (69 files) | DELETE | no engine10 import; 133k lines in autonomy/ |
57
- | autonomy/issue-providers.sh | KEEP | engine10/fetch_issue.ts:24 |
58
- | autonomy/lib/engine10-push.sh, lib/secret-scan.sh | KEEP | stages/pr.ts:24, stages/deep.ts:52-53 |
59
- | autonomy/lib/modernize/ | KEEP (hidden, 6c) | engine10/modernize via util/python.ts |
60
- | autonomy/lib/backlog.py | PORT | cmd_backlog; migration note |
61
- | autonomy/lib/cost-summary.py, app-runner.sh | KEEP-CHECK | named in engine10 comments only (cost.ts:9, deep.ts:102) |
62
- | autonomy/telemetry.sh, lib/sdk-mode.sh | PORT then delete | sourced by bin/loki:42, 230-238 |
63
- | providers/*.sh, models.sh | DELETE | ported to loki-ts runner/providers.ts |
64
- | providers/model_catalog.json | KEEP | engine10/sizing.ts:60 |
65
- | loki-ts/src/runner, commands, providers (v8 loop) | PORT subset | engine10 imports runner/github_token, types, retry_class, providers, budget; providers/claude_flags, mcp_config; delete the rest |
66
- | council/, quality gates scripts, swarm/, agents/ | DELETE (6e) | no engine10 refs |
67
- | dashboard/ (Python) | KEEP until D56 flip, then DELETE | D57 item 3 |
68
- | legacy-ui/ | KEEP until D56 flip, then DELETE | same |
69
- | engine10/dashboard | KEEP until D56 flip | engine10/cli.ts TABLE |
70
- | web-app/ (Purple Lab) | DELETE | no engine10 or CP ref; 55k lines |
71
- | mcp/ | DELETE (6d) | mcp/server.py has 0 engine10 calls; loki-ts refs are v8 runner only |
72
- | skills/, SKILL.md, plugins/, claude/hooks, .claude-plugin | DELETE (6d legacy plugin) | SKILL.md: replace with a v10 stub only if release scripts require it (KEEP-CHECK scripts/ grep) |
73
- | templates/ | DELETE (6b) | |
74
- | Dockerfile, helm/, deploy/ | KEEP, PORT entrypoint | D54 v1 scope (container, Helm); Dockerfile has 1 legacy mention |
75
- | memory/, events/, learning/, magic/, lokistore/, api/, state/, src/ | DELETE, KEEP-CHECK first | in `files`; no engine10 import found |
76
- | tests/ | 786 files reference autonomy/run.sh or autonomy/loki: DELETE with their owner. 16 reference engine10: KEEP |
77
- | tests/moat/p2, p3, p4 | PORT first | reference autonomy/run.sh; moat must run on v10 |
78
- | CI: promote.yml:122-146 leg 2 `--engine legacy` | PORT (Wave 1) | assert the no-bun error and exit code |
79
- | CI: test.yml legacy shards, check-phase6-ready.yml, parity-drift.yml, bun-parity.yml | DELETE with their suites; bun-parity is a Wall check, redefine as v10 Bun suite first |
80
-
81
- ## 4. A. Engine and runner
82
-
83
- | Surface | Evidence | Consumers | Decision |
84
- |---|---|---|---|
85
- | autonomy/run.sh RARV loop (lines 1, 150, 3500-4200, 7000-9000) | grep -n "Reason\|Action\|Reflect\|Verify" autonomy/run.sh | loki-ts/src/runner (8 imports), engine10 (comments reference). v8 loop is the heartbeat | DELETE; replace with engine10/runner loop (loki-ts/src/runner/rarv.ts:1-50, main circuit breaker) |
86
- | autonomy/run.sh phases 1-6 (autonomy/run.sh:100-200, 300-500, 1000+) | grep -n "phase\|Phase" autonomy/run.sh | CLI dispatch, moat test matrix | DELETE; v10 uses a single-pass model with hooks (docs/v10/ENGINE.md D55) |
87
- | completion council (autonomy/run.sh:9000-9500, council/ dir) | grep -l "council" loki-ts/src/ | deprecated per D57 item 6(e) | DELETE; no v10 surface |
88
- | quality gates (autonomy/run.sh:11000+, council/gates/) | loki-ts/src/runner/quality_gates.ts:46 mentions autonomy/run.sh | 8 gates imported to loki-ts | PORT quality_gates.ts if not already ported; DELETE shell versions |
89
- | legacy runner in loki-ts/src/runner (v8 loop, commands subdir) | loki-ts/src/runner/*:1-100 | engine10 imports subset (state, proof, budget, providers, github_token, types, retry_class) | PORT the subset (23 files); DELETE loki-ts/src/runner/commands/ (100+ files, not referenced by engine10) |
90
- | trial-and-error recovery in autonomy/run.sh:8000-8500 | grep -n "recovery\|retry\|backoff" autonomy/run.sh | loki-ts/src/runner/recovery_policy.ts:1-50 (5 refs) | REPLACE; engine10 has recovery_policy.ts; delete autonomy version |
91
- | escalation, intervention hooks | loki-ts/src/runner/escalation_handoff.ts:21-100, intervention.ts:422 | voter_agents, escalation handoff | PORT; keep escalation_handoff.ts and intervention.ts (engine10 call them) |
92
- | engine10 gate: security scan (secret scan) | loki-ts/src/engine10/stages/deep.ts:153-180 sources autonomy/lib/secret-scan.sh via `bash -c` (deep.ts:52-53, 165-167) and calls `_commit_scan_secret_file`, `_commit_path_looks_secret`; no TS implementation exists | engine10 deep stage (stages/deep.ts:245) | PORT to TS (W1-03 evidence: bash-only). Until ported, autonomy/lib/secret-scan.sh stays; do not DELETE |
93
- | engine10 gate: app boot | loki-ts/src/engine10/stages/deep.ts:104-121 only runs discoverProjectGraph and records "not_run"; real boot lives in autonomy/app-runner.sh (deep.ts:102) | engine10 deep stage (stages/deep.ts:243) | PORT (TS app boot is absent, gate is NOT PROVEN today); autonomy/app-runner.sh stays until ported |
94
- | engine10 gate: council | deep.ts:32-47,122-152 takes an injectable CouncilRunner; no production code constructs one (grep council loki-ts/src/engine10 loki-ts/src/e10ext finds only deep.ts and seal.ts:19); TS port exists in loki-ts/src/runner/council.ts but is not wired | engine10 deep stage (stages/deep.ts:244) | PORT: wire runner/council.ts as the production CouncilRunner; blocks DELETE of council/ shell and runner/council.ts |
95
- | engine10 gates already TS (verify, wall, seal) | stages/verify.ts:208-227 (lint:ruff, lint:bash-n, lint:shellcheck, lint:tsc, lint:eslint via runCheck), verify.ts:274 (select-tests via scripts/select-tests.sh), wall.ts:134 runWall, seal.ts:92 signReceipt; deep.ts:70 full suite. engine10 never imports runner/quality_gates.ts (grep returns 0 hits) | engine10 verify, wall, seal, deep stages | KEEP (no work); note runner/quality_gates.ts is NOT an engine10 dependency, so its PORT row above is moot for v10 and it is DELETE-eligible with the v8 loop |
96
-
97
- Decision: PORT `quality_gates.ts`, `escalation_handoff.ts`, `intervention.ts`, `recovery_policy.ts` (verify they are imported by engine10/stages or engine10/cli). DELETE autonomy/run.sh main (phase loop, RARV, council); keep issue-providers.sh, secret-scan.sh, engine10-push.sh. DELETE loki-ts/src/runner/commands/ (100+ files). DELETE council/, council/gates/ if not referenced.
98
-
99
- Row count: 12 rows, decisions: 4 PORT, 4 KEEP, 4 DELETE (4 rows added by W1-03).
100
-
101
- ## 5. B. Commands
102
-
103
- | Surface | Evidence | Consumers | Decision |
104
- |---|---|---|---|
105
- | `loki start ./prd.md` | bin/loki:474-477, autonomy/loki:main() (no grep match; search `cmd_start`) | D57 item 6(a): legacy route | REPLACE with engine10 `loki <file>` (already done; bin/loki line 344 routes to engine10 run) |
106
- | `loki quickstart` | autonomy/loki:126-132 (quickstart.sh sourced), autonomy/loki:1676 (help), bin/loki:347-352 | legacy only; no v10 path | DELETE; migration note advises `loki <task>` |
107
- | `loki template` | autonomy/loki:1758-1759 (help), autonomy/lib has no template runner | legacy feature; D57 6(b) | DELETE; migration note |
108
- | `loki heal` | bin/loki:300-309 (modernize), autonomy/loki main dispatch | D57 6(e) says heal is legacy | DELETE |
109
- | `loki migrate` | bin/loki:300-309 (modernize), autonomy/loki | D57 6(e) | DELETE |
110
- | `loki analyze` | autonomy/loki main dispatch (no source found) | legacy, not in v10 scope | DELETE per 6(f) |
111
- | `loki cockpit` | autonomy/loki main dispatch (no source found) | legacy UI only | DELETE per 6(f) |
112
- | `loki magic` | magic/ dir exists (25k lines, no engine10 import) | legacy feature; not ported | DELETE per 6(f) |
113
- | BMAD/OpenSpec adapters | bin/loki:474-477 (--openspec, --bmad-project), autonomy/loki dispatch | D57 item 6(a) routes issue refs to engine10 | DELETE bash routes; OpenSpec is handled as contract now (engine10/contract.ts) |
114
- | STATUS.txt writers/readers | autonomy/lib (grep for STATUS) | legacy orchestration file | DELETE when autonomy/loki is deleted |
115
-
116
- Row count: 10 rows, all DELETE except `start` which is already REPLACED.
117
-
118
- ## 6. C. Env switches
119
-
120
- | Surface | Evidence | Consumers | Decision |
121
- |---|---|---|---|
122
- | LOKI_ENGINE | bin/loki:325-326, loki-ts/src/cli.ts:45, loki-ts/src/engine10/preflight.ts:15 | router in bin/loki, fallback in loki-ts/src/cli.ts | DELETE; v10 unconditional in loki-ts but keep bin/loki check and error-only message |
123
- | LOKI_LEGACY_BASH | loki-ts/src/cli.ts:60-68, loki-ts/src/util/bash_delegate.ts:27, loki-ts/src/runner/providers.ts:142-154 | rollback escape hatch for three commands (trust, control, doctor) | KEEP until those three are ported; then DELETE |
124
- | LOKI_LEGACY_DASHBOARD | (search; may not exist in current tree) | legacy UI route | DELETE when dashboard is deleted |
125
- | LOKI_SDK_LOOP | loki-ts/src/cli.ts:45, loki-ts/src/runner/autonomous.ts:1319, loki-ts/src/runner/providers.ts:148-154 | toggles v8 Bun loop vs SDK mode | REPLACE with LOKI_ENGINE_MODE=sdk or default to SDK; currently v10 is the only route |
126
- | bun-missing bash fallback | bin/loki:372-384, bin/loki:397-399 | graceful degradation when bun is not found | REPLACE with single no-bun error and exit code (D57 item 2) |
127
-
128
- Row count: 5 rows, decisions: 1 KEEP (LOKI_LEGACY_BASH), 2 DELETE, 2 REPLACE.
129
-
130
- ## 7. D. Providers
131
-
132
- | Surface | Evidence | Consumers | Decision |
133
- |---|---|---|---|
134
- | providers/claude.sh | grep -c "export\|function" providers/claude.sh:8, loki-ts/src/runner/providers.ts:1 (ported) | v8 runner only; engine10 uses providers.ts | DELETE; functionality ported to loki-ts/src/runner/providers.ts |
135
- | providers/codex.sh | providers/codex.sh:11 | v8 only | DELETE |
136
- | providers/cline.sh | providers/cline.sh | v8 only | DELETE |
137
- | providers/aider.sh | providers/aider.sh | v8 only | DELETE |
138
- | providers/opencode.sh | providers/opencode.sh | v8 only | DELETE |
139
- | providers/loader.sh | providers/loader.sh | v8 only | DELETE |
140
- | providers/models.sh | providers/models.sh | v8 model catalog, ported to loki-ts/src/runner/providers.ts | DELETE |
141
- | providers/model_catalog.json | loki-ts/src/engine10/sizing.ts:60 | engine10 sizing lookup | KEEP (engine10 depends on it) |
142
-
143
- Row count: 8 rows, decisions: 7 DELETE, 1 KEEP.
144
-
145
- ## 8. E. Dashboard and server.py
146
-
147
- | Surface | Evidence | Consumers | Decision |
148
- |---|---|---|---|
149
- | dashboard/server.py (Python, port 3000) | loki-ts/src/engine10/dashboard/server.ts:155-187 (comments reference legacy) | D57 item 3 says KEEP until D56 flip | KEEP for now; when D56 flips (legacy dashboard off by default), DELETE |
150
- | legacy-ui/ | (no engine10 import) | D57 item 3 | KEEP until D56 flip, then DELETE |
151
- | engine10/dashboard (Node.js route) | loki-ts/src/engine10/cli.ts TABLE (dashboard command) | v10 dashboard | KEEP |
152
- | dashboard/ (dir, Python dir routes and templates) | loki-ts/src/engine10/dashboard/server.ts:2 (autonomy/run.sh ref in comment) | legacy only | DELETE when D56 flips |
153
-
154
- Row count: 4 rows, decisions: 2 KEEP (until D56 flip), 2 KEEP (engine10 version).
155
-
156
- ## 9. F. Integrations
157
-
158
- | Surface | Evidence | Consumers | Decision |
159
- |---|---|---|---|
160
- | action.yml (GitHub Action) | action.yml:1-50 (entry point `loki <args>`) | users, CI workflows | KEEP but PORT entrypoint to call engine10 CLI directly (not bin/loki) for clarity |
161
- | .github/actions/review, issue-to-pr | .github/actions/review/main.sh | legacy action runners | KEEP; they call `loki` which routes correctly |
162
- | Dockerfile (main) | Dockerfile:1-50, mentions autonomy/run.sh:1 line | containers | KEEP; PORT entrypoint (change FROM/RUN to use engine10 only) |
163
- | Dockerfile.control-plane, .sandbox, .test-runner | Dockerfile.*:1-20 | build targets | KEEP if engine10-compatible; otherwise PORT |
164
- | helm/ charts (Helm values, appVersion) | helm/loki/Chart.yaml | Kubernetes deployments | KEEP but PORT appVersion to read from package.json |
165
- | vscode-extension/ | grep -l "LOKI_ENGINE\|autonomy" vscode-extension/ | IDE integration | KEEP; grep for legacy refs and PORT if found |
166
- | SDKs: packages/cli-sdk, packages/*sdk*, packages/control-plane | grep "autonomy\|LOKI_ENGINE" packages/*/package.json | dependent packages | KEEP SDKs; PORT any legacy route references |
167
- | mcp/server.py | mcp/server.py has 0 engine10 imports; 39 tools defined | MCP clients calling loki | DELETE (no engine10 integration; D57 item 6(d)) |
168
- | magic/ (magic router, 25k lines) | no engine10 import | legacy feature | DELETE per 6(f); if shipped, KEEP-CHECK first |
169
- | web-app/ (Purple Lab, 55k lines) | no engine10 import, no CP ref | legacy UI | DELETE per 6(d) |
170
- | examples/ (example projects) | check for autonomy/run.sh or autonomy/loki references | users | KEEP if engine10-compatible; PORT or DELETE legacy examples |
171
- | skills/ (Claude Code skill definitions) | skills/*.md: grep for autonomy/loki references | shipped CLI help | DELETE or PORT to v10 skill (KEEP-CHECK: check if package.json `files` includes skills/) |
172
- | plugin marketplace manifest | .claude-plugin, claude/hooks, plugins/ | Claude marketplace | DELETE (D57 item 6(d), legacy plugin system) |
173
- | package.json `files[]` | package.json: check shipped paths | npm distribution | review and remove legacy paths after W2-12 (docs cleanup) |
174
-
175
- Row count: 13 rows, decisions: 8 KEEP/PORT, 5 DELETE.
176
-
177
- ## 10. G. Dummy content and feature flags
178
-
179
- | Surface | Evidence | Consumers | Decision |
180
- |---|---|---|---|
181
- | "coming soon" stubs | docs/DEPLOY-PLAN.md:51 (placeholder mentions); search `<...>` in shipped docs | user-facing | audit and DELETE or replace with real content before ship |
182
- | placeholder panels in legacy-ui | (legacy-ui is being deleted) | legacy only | DELETE |
183
- | fake example outputs | (grep tests/ for `mock` or `fixture`) | test suites | KEEP tests; audit fixtures (re-verify they still pass when autonomy/ is deleted) |
184
- | unused feature flags | grep -r "if.*FLAG\|ifdef" autonomy/run.sh | runtime | DELETE dead code paths when autonomy/run.sh is deleted |
185
- | dead scripts | scripts/ (check for entry points or CI crons) | automation | KEEP if used by CI (scripts/local-ci.sh, scripts/release.sh); DELETE orphans |
186
- | orphaned docs | grep -l "TODO\|deprecated\|remove this" docs/ | shipped docs | audit: MOVE to docs/history/ if aged >6 months and not in CHANGELOG.md |
187
-
188
- Row count: 6 rows, decisions: 4 DELETE, 1 KEEP, 1 MOVE.
189
-
190
- ## 11. H. Docs and copy (legacy version/engine references)
191
-
192
- | Surface | Evidence | Consumers | Decision |
193
- |---|---|---|---|
194
- | README.md version/legacy refs | README.md:3 (3 mentions of v8, v9, legacy), lines mentioning LOKI_ENGINE and `loki legacy` | public docs, npm landing page | DELETE LOKI_ENGINE=legacy hint; rewrite "legacy engine" sections to v10 info or migration note (MOVE history to docs/history/v9-engine.md) |
195
- | SKILL.md version refs | SKILL.md:28 (old command list, legacy engine description) | Claude Code CLI skill | REPLACE with v10 command list generated from registry (see J below); DELETE legacy engine section |
196
- | docs/ARCHITECTURE.md | docs/ARCHITECTURE.md:9 mentions | internal docs | audit and DELETE legacy references; KEEP v10 architecture |
197
- | CLAUDE.md | CLAUDE.md:1 (v10 references) | developer instructions | KEEP; no cleanup needed |
198
- | docs/alternative-installations.md | mentions LOKI_ENGINE, legacy engine | shipped docs | DELETE or MOVE to history; rewrite for v10 only |
199
- | docs/exit-codes.md | mentions legacy command behavior | public API docs | REPLACE with v10 exit codes |
200
- | docs/ plan files (BUG-AUDIT, ONE-RUN-AUDIT, BRANCH-LIFECYCLE-PLAN, etc., 44 mentions) | grep -l "legacy\|LOKI_ENGINE\|run.sh" docs/ | team reference | MOVE to docs/history/ with dated header (use `git log -1 --format=%cs <file>`) |
201
- | wiki/ (6 files, 13 mentions) | wiki/Quality-Gates.md, wiki/Checkpoints.md | team docs | DELETE Quality-Gates, Checkpoints (legacy features); audit others |
202
- | version strings in CLI help | autonomy/loki help output (v8, v9, v10 mentions) | users | DELETE or hand-write to match package.json VERSION |
203
-
204
- Row count: 10 rows, decisions: 2 KEEP, 5 DELETE, 3 MOVE to history, 1 REPLACE (SKILL.md).
205
-
206
- ## 12. I. Tests of legacy surfaces
207
-
208
- | Surface | Evidence | Consumers | Decision |
209
- |---|---|---|---|
210
- | tests/ files referencing autonomy/run.sh or autonomy/loki | 786 test files match grep autonomy/loki; 16 match engine10 | test suite | DELETE 786 legacy-only tests with their owner modules (W2-08); PORT 16 engine10 tests |
211
- | tests/moat/p2, tests/moat/p3, tests/moat/p4 (quality gates suites) | grep autonomy/run.sh tests/moat/p* | verification | PORT to engine10 v10 runner before deleting autonomy/ |
212
- | tests/integration/ (if it calls bin/loki with legacy args) | (search `bin/loki start ./` or `bin/loki legacy`) | integration suite | PORT or DELETE legacy routes |
213
- | bench/ tests (benchmarks) | benchmarks/bench/run.sh (v8 only) | performance | KEEP-CHECK; if no engine10 bench yet, delete legacy bench |
214
- | CI shards for legacy (test.yml, check-phase6-ready.yml, parity-drift.yml) | .github/workflows/test.yml (grep `--engine legacy\|LOKI_ENGINE`) | CI | DELETE shards when autonomy/ is gone; redefine bun-parity as v10 suite (W2-01) |
215
-
216
- Row count: 5 rows, decisions: 3 PORT/KEEP, 2 DELETE.
217
-
218
- ## 13. J. Hand-written facts to generate
219
-
220
- | Fact | Current location | Source of truth (generator input) | Stale check command |
221
- |---|---|---|---|
222
- | README.md version and provider badges | README.md:1-20 | package.json VERSION, CLI version output | grep VERSION README.md; must match package.json |
223
- | SKILL.md command list and flags | SKILL.md:30-150 | loki-ts/src/cli/registry.ts (being built) | grep `loki ` SKILL.md; must cover every engine10/cli.ts dispatch |
224
- | SKILL.md feature table (capabilities by tier) | SKILL.md:150-250 | docs/v10/GUIDE.md sections | grep "Small/Medium/High" SKILL.md |
225
- | Helm chart appVersion | helm/loki/Chart.yaml:5 | package.json version field | grep -E 'appVersion.*v[0-9]' helm/loki/Chart.yaml |
226
- | API docs (route table) | docs/API-REFERENCE.md (if exists) | loki-ts/src/engine10/cli.ts USAGE output + endpoint specs | check if exists; if so, must match engine10 dispatch |
227
- | Model names and IDs in docs | docs/v10/GUIDE.md, docs/setup.md mention claude-opus, claude-sonnet, claude-haiku | Anthropic SDK (@anthropic-ai/sdk) model enums, verified against live model catalog | grep -E 'claude-[a-z]+-[0-9]' docs/v10/*.md; run loki doctor to verify live models |
228
- | Cost and price quotes | docs/pricing.md (if exists) or README.md cost section | provider.cost_per_mtok (engine10/sizing.ts:60, model_catalog.json) | audit annually or when model catalog changes |
229
- | v10 launch date, feature timeline | docs/CHANGELOG.md 2026-10 entries | Git log / release history | CHANGELOG.md must be current to the last VERSION bump |
230
-
231
- Row count: 8 rows. Each must be generated or verified on every release (scripts/release.sh calls a generator).
232
-
233
- ## 14. K. Stale docs in docs/
234
-
235
- | File | Age (git log -1 --format=%cs) | Content | Verdict | Action |
236
- |---|---|---|---|---|
237
- | docs/BUG-AUDIT-v6.61.0.md | (check) | audit of a deleted version; reference only | MOVE | Move to docs/history/v6.61.0-audit.md with header "Historical: v6.61.0 retrospective" |
238
- | docs/ONE-RUN-AUDIT.md | (check) | one run analysis; dated context | MOVE | Move to docs/history/one-run-audit-<date>.md |
239
- | docs/BRANCH-LIFECYCLE-PLAN.md | (check) | legacy branch workflow; superseded by D55 | DELETE | v10 branch model in docs/v10/BRANCH-LIFECYCLE.md (if exists) |
240
- | docs/CONFIG-FILE-PLAN.md | (check) | v8 plan; loki.yaml built; reference only | MOVE | docs/history/v8-config-plan-<date>.md |
241
- | docs/DEPLOY-PLAN.md | (check) | general deployment; check if v10-compatible | KEEP | audit for v10 refs and LOKI_ENGINE mentions; edit if needed |
242
- | docs/EXECUTION-COCKPIT-PLAN.md | (check) | legacy UI design; cockpit command deleted | DELETE | (cockpit command not in v10) |
243
- | docs/V8-AGENT-SDK-PLAN.md | (check) | v8 architecture; superseded by v10 | MOVE | docs/history/v8-agent-sdk-plan-<date>.md |
244
- | docs/v10/BOARD.md | (check) | current work; reference | KEEP | (internal roadmap, not shipped) |
245
- | docs/v10/DECISIONS.md | (check) | decision log; KEEP-CHECK for D57 refs | KEEP | (decision record, not shipped) |
246
- | docs/v10/ENGINE.md | (check) | v10 engine spec; current | KEEP | (internal; exclude from `files`) |
247
- | wiki/Quality-Gates.md | (check) | legacy gate designs; deleted in W2-11 | DELETE | (legacy feature, not ported) |
248
- | wiki/Checkpoints.md | (check) | legacy checkpoints; not in v10 | DELETE | (legacy feature) |
249
- | docs/TESTING.md | (check) | testing strategy; audit for legacy refs | KEEP-CHECK | if mentions `autonomy/run.sh`, edit to v10 test runners |
250
- | docs/CONTRIBUTING.md | (check) | contributor guide; audit | KEEP-CHECK | if mentions legacy engine, rewrite |
251
-
252
- Row count: 14 rows, decisions: 6 MOVE to history, 3 DELETE, 5 KEEP/KEEP-CHECK.
253
-
254
- ## 15. Section summary (rows per decision)
255
-
256
- | Decision | A | B | C | D | E | F | G | H | I | J | K | Total |
257
- |---|---|---|---|---|---|---|---|---|---|---|---|---|
258
- | PORT | 4 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 7 |
259
- | REPLACE | 2 | 0 | 2 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 6 |
260
- | DELETE | 2 | 10 | 2 | 7 | 1 | 5 | 4 | 5 | 2 | 0 | 9 | 47 |
261
- | KEEP | 0 | 0 | 1 | 1 | 2 | 8 | 0 | 0 | 1 | 0 | 5 | 18 |
262
- | MOVE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 0 | 6 | 9 |
263
- | KEEP-CHECK | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 0 | 0 | 0 | 3 | 6 |
264
- | Total | 8 | 10 | 5 | 8 | 4 | 18 | 6 | 9 | 5 | 8 | 23 | 104 |
265
-
266
- ## 16. Wave plan (non-overlapping file sets, Wave 1 + STALE-ZERO + Waves 2+)
267
-
268
- ### STALE-ZERO (prep work, in parallel with W1)
269
-
270
- **SZ-01: Generate facts and CLI registry** (MEDIUM, 1-2 hours initial build, 10 min per release after)
271
- - Create `loki-ts/src/cli/registry.ts`: TypeScript object or JSON defining every engine10 CLI command (name, help, flags, aliases). Export for use by SKILL.md generator and API docs.
272
- - Create `scripts/generate-stale-zero.sh`: bash script run by `scripts/release.sh` on every VERSION bump. Generates:
273
- - SKILL.md command list from registry.ts
274
- - Helm chart appVersion from package.json
275
- - README.md badges (version, provider support, model list)
276
- - docs/API-REFERENCE.md endpoint table (if it exists) from engine10 routes
277
- - Update `package.json scripts.release` or create pre-publish hook to run generator.
278
- - Files: loki-ts/src/cli/registry.ts (NEW), scripts/generate-stale-zero.sh (NEW), Makefile or scripts/release.sh (EDIT).
279
-
280
- **SZ-02: Doc moves and cleanup** (LOW, 1 hour)
281
- - Create `docs/history/` directory.
282
- - Move files (use `git mv` to preserve history): BUG-AUDIT-v6.61.0.md, ONE-RUN-AUDIT.md, CONFIG-FILE-PLAN.md, V8-AGENT-SDK-PLAN.md, and others marked MOVE in section K (6 files).
283
- - Add dated YAML header to each: `---\ndate: <git log date>\nstatus: historical\n---`.
284
- - Delete wiki/Quality-Gates.md, wiki/Checkpoints.md, docs/EXECUTION-COCKPIT-PLAN.md.
285
- - Edit docs/alternative-installations.md to remove LOKI_ENGINE=legacy and rewrite for v10.
286
- - Edit README.md to remove legacy engine summary; keep migration note.
287
- - Files: docs/history/ (NEW dir), docs/*.md (EDIT 5 files), wiki/Quality-Gates.md, wiki/Checkpoints.md (DELETE).
288
-
289
- **SZ-03: Stale-zero guard** (MEDIUM, 1-2 hours)
290
- - Create `tests/test-no-stale-facts.sh`: bash guard that runs on every CI build.
291
- - Fails if a doc mentions a CLI command not in registry.ts (grep `loki <cmd>` vs registry lookup).
292
- - Fails if a doc references an env var (LOKI_ENGINE, LOKI_LEGACY_BASH) not in code (grep env vars in loki-ts/src/cli.ts and bin/loki; exclude CHANGELOG.md, docs/history/).
293
- - Fails if a doc version string is older than current minor version (e.g., "v9.x" when current is v10.y), outside CHANGELOG.md and docs/history/.
294
- - Passes a positive control: plant a fake mention and verify it catches it.
295
- - Files: tests/test-no-stale-facts.sh (NEW).
296
-
297
- Wave assignment: SZ-01, SZ-02, SZ-03 run in parallel with W1 (they do not touch autonomy/ or loki-ts/src/runner/).
298
-
299
- ### Wave 1: Routing and environment (async with STALE-ZERO)
300
-
301
- **W1-01: bin/loki routing cleanup** (LOW, 30 min)
302
- - Edit bin/loki: remove LOKI_ENGINE, LOKI_LEGACY_BASH, no-bun fallback to bash. Add plain no-bun error (one line, exit code 2). Remove legacy TS comments.
303
- - One-word commands: add explicit routes (by name, not catch-all) for backlog, config, doctor to bash until they are ported.
304
- - Remove catch-all `*` route; fail on unknown command.
305
- - Files: bin/loki (EDIT only).
306
-
307
- **W1-02: loki-ts/src/cli.ts LEGACY_BASH references** (LOW, 30 min)
308
- - Remove LOKI_LEGACY_BASH help text (cli.ts:50, 53, 60-68).
309
- - Remove bash_delegate.ts import and calls (only keep KEEP-CHECK paths: trust, control, doctor).
310
- - Update help (line 7, 38-39) to drop "falls through to bash" and "LOKI_LEGACY_BASH" wording.
311
- - Files: loki-ts/src/cli.ts, loki-ts/src/util/bash_delegate.ts (EDIT or DELETE).
312
-
313
- **W1-03: PORT quality gates to loki-ts (if not already done)** (MEDIUM, 1 hour)
314
- - Verify loki-ts/src/runner/quality_gates.ts exists and is imported by engine10/stages (check engine10/stages/deep.ts, engine10/stages/pr.ts, etc.).
315
- - If ported, no work. If not, extract from autonomy/run.sh (grep GATE, find each gate function) and port to loki-ts.
316
- - Files: loki-ts/src/runner/quality_gates.ts (NEW if missing, or KEEP if present).
317
-
318
- **W1-04: CI: port test.yml legacy shard** (MEDIUM, 1-2 hours)
319
- - Edit .github/workflows/promote.yml:122-146 (leg 2, --engine legacy): change to assert no-bun error and exit code 2.
320
- - Create a new v10-only version of the shard that was legacy (e.g., `tier-a: loki <task>` on v10).
321
- - Files: .github/workflows/promote.yml, .github/workflows/test.yml (EDIT).
322
-
323
- Files touched in W1: 5 edits, no deletes (only routing cleanup).
324
-
325
- ### Wave 2 (sequential, in priority order)
326
-
327
- **W2-01: tests/moat PORT to v10 + Bun Parity redefined** (MEDIUM, 2 hours)
328
- - Rewrite tests/moat/p2, p3, p4 to call engine10 runner instead of autonomy/run.sh.
329
- - Rewrite bun-parity suite (.github/workflows/bun-parity.yml or tests/moat/bun-parity.sh) to verify v10 Bun binary matches TypeScript output.
330
- - Files: tests/moat/p2, p3, p4, bun-parity (EDIT), .github/workflows/bun-parity.yml (EDIT or NEW).
331
-
332
- **W2-02: PORT backlog, config, doctor --airgap to Bun** (MEDIUM, 2 hours)
333
- - Implement `loki backlog`, `loki config`, `loki doctor --airgap` as TypeScript commands in loki-ts/src/engine10/commands/ (or engine10/cli.ts dispatch).
334
- - Route bin/loki and loki-ts/src/cli.ts to them.
335
- - Files: loki-ts/src/engine10/ (NEW commands), bin/loki, loki-ts/src/cli.ts (EDIT routing).
336
-
337
- **W2-03: web-app/ DELETE** (LOW, 30 min)
338
- - Remove web-app/ directory (55k lines, Purple Lab, no engine10 integration).
339
- - Files: web-app/ (DELETE).
340
-
341
- **W2-04: templates/, quickstart, tour/demo** (LOW, 1 hour)
342
- - Delete templates/, autonomy/quickstart.sh.
343
- - Delete or rewrite tour/demo as shell stubs (if they exist in bin/loki).
344
- - Files: templates/ (DELETE), autonomy/quickstart.sh (DELETE), bin/loki (EDIT).
345
-
346
- **W2-05: council, gates scripts, swarm, agents, grill, voice** (LOW, 1 hour)
347
- - Delete council/, council/gates/ shell scripts (quality gates ported to loki-ts in W1-03).
348
- - Delete swarm/, agents/, grill/, voice/ if they exist.
349
- - Files: council/, swarm/, agents/, grill/, voice/ (all DELETE if present).
350
-
351
- **W2-06: mcp/ + skills/ + plugins/ + claude/hooks + SKILL.md** (MEDIUM, 1-2 hours)
352
- - Delete mcp/ (mcp/server.py has no engine10 integration).
353
- - Delete skills/, plugins/, claude/hooks, .claude-plugin (legacy plugin system, D57 item 6(d)).
354
- - Replace SKILL.md with v10 stub (command list generated by SZ-01, feature table hand-written once).
355
- - Files: mcp/, skills/, plugins/, claude/hooks, .claude-plugin (DELETE), SKILL.md (REWRITE as stub).
356
-
357
- **W2-07: memory/, learning/, magic/, lokistore/, events/, api/, state/, src/ DELETE-CHECK** (MEDIUM, 2 hours)
358
- - Audit each directory: grep for engine10 imports, check if referenced by engine10 routes.
359
- - If no imports and not in `package.json files`, DELETE.
360
- - If yes, KEEP and document.
361
- - Files: (DELETE most, KEEP if found in use).
362
-
363
- **W2-08: legacy tests/ delete** (MEDIUM, 2 hours)
364
- - Delete 786 test files referencing autonomy/run.sh or autonomy/loki (all `tests/*.sh` and `tests/**/*.sh` except engine10-related).
365
- - Verify 16 engine10 tests remain and pass.
366
- - Files: tests/*.sh, tests/**/*.sh (DELETE legacy).
367
-
368
- **W2-09: loki-ts v8 runner/commands (not imported by engine10)** (MEDIUM, 1-2 hours)
369
- - Delete loki-ts/src/runner/commands/ (100+ files, v8 CLI infrastructure, not used by engine10).
370
- - Verify loki-ts/src/runner/types.ts, runner/state.ts, runner/providers.ts, runner/budget.ts, runner/proof.ts, runner/github_token.ts are imported by engine10 (they are; see section A evidence).
371
- - Delete only unused parts of runner/.
372
- - Files: loki-ts/src/runner/commands/ (DELETE).
373
-
374
- **W2-10: providers/*.sh DELETE** (LOW, 30 min)
375
- - Delete providers/claude.sh, providers/codex.sh, providers/cline.sh, providers/aider.sh, providers/opencode.sh, providers/loader.sh, providers/models.sh.
376
- - Keep providers/model_catalog.json (engine10/sizing.ts:60 depends on it).
377
- - Files: providers/*.sh (DELETE 7 files).
378
-
379
- **W2-11: autonomy/run.sh, autonomy/loki, autonomy/lib core** (MEDIUM, 3+ hours, final slice)
380
- - Delete autonomy/run.sh, autonomy/loki, most of autonomy/lib/ except KEEP rows (issue-providers.sh, engine10-push.sh, secret-scan.sh).
381
- - Depends on W2-01, W2-02, W2-08, W2-09 (moat ported, backlog/config/doctor ported, legacy tests deleted, runner/commands cleaned).
382
- - Last code slice; after this, legacy code is gone.
383
- - Files: autonomy/run.sh, autonomy/loki, autonomy/lib/* (DELETE most).
384
-
385
- **W2-12: legacy docs/ and wiki/ cleanup** (LOW, 1 hour)
386
- - Delete docs/BUG-AUDIT-v6.61.0.md, docs/BRANCH-LIFECYCLE-PLAN.md, docs/DEPLOY-PLAN.md (re-evaluate; delete if superseded).
387
- - Move (via git mv) docs/ONE-RUN-AUDIT.md, docs/CONFIG-FILE-PLAN.md, docs/V8-AGENT-SDK-PLAN.md to docs/history/ with dated headers.
388
- - Delete wiki/Quality-Gates.md, wiki/Checkpoints.md.
389
- - Files: docs/, wiki/ (EDIT and DELETE).
390
-
391
- **W2-13: dashboard/ + legacy-ui/ DELETE (after D56 flip)** (MEDIUM, 2 hours)
392
- - Only when D56 flips (legacy dashboard off by default).
393
- - Delete dashboard/ (Python), legacy-ui/, related CI routes.
394
- - Verify engine10/dashboard remains.
395
- - Files: dashboard/, legacy-ui/ (DELETE after D56 signal).
396
-
397
- ### Guard spec (D57 item 4, tested by SZ-03)
398
-
399
- New test `tests/test-no-legacy-refs.sh` (advisory after W1, blocking after W2-11): for every path in `npm pack --dry-run --json` output (the shipped set) plus README.md and wiki/, fail on `autonomy/run\.sh`, a bare `\brun\.sh\b` not preceded by `moat/` or `bench/`, `LOKI_ENGINE`, `LOKI_LEGACY_BASH`, or `loki legacy`. Exclusions: CHANGELOG.md and docs/history/ only. Positive control: the test plants one hit in a temp copy and must go red. Phase in: advisory after W1, blocking after W2-11.
400
-
401
- ## 17. Execution timeline and priorities
402
-
403
- - STALE-ZERO (SZ-01, SZ-02, SZ-03): parallel with W1, 1 person, 3-4 hours setup + 10 min per release after.
404
- - Wave 1 (W1-01 through W1-04): 4 slices, can run in parallel (non-overlapping files), ~2-3 hours total. Unblocks W2.
405
- - Wave 2-01 to 2-13: sequential (each depends on prior), ~15-20 hours total work. W2-13 blocked until D56 flip.
406
- - Guard SZ-03 becomes blocking after W2-11 (autonomy/ is gone).
407
-
408
- Release authority: all slices must pass `loki verify` and the new guard (SZ-03) before pushing.