loki-mode 11.3.0 → 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 (215) 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/voter-agents.sh +1 -1
  11. package/autonomy/loki +99 -75
  12. package/autonomy/run.sh +30 -18
  13. package/autonomy/sandbox.sh +1 -1
  14. package/autonomy/tui.sh +6 -5
  15. package/autonomy/verify.sh +1 -1
  16. package/bin/loki +166 -59
  17. package/completions/_loki +2 -0
  18. package/completions/loki.bash +2 -2
  19. package/dashboard/__init__.py +1 -1
  20. package/dashboard/server.py +25 -31
  21. package/docs/ARCHITECTURE.md +337 -0
  22. package/docs/BRANDING.md +124 -0
  23. package/docs/CLI-REFERENCE.md +7 -1
  24. package/docs/COMPONENTS.md +447 -0
  25. package/docs/DEPLOYMENT.md +9 -9
  26. package/docs/DOCKER.md +469 -0
  27. package/docs/INSTALLATION.md +67 -1045
  28. package/docs/KNOWN-ISSUES.md +11 -35
  29. package/docs/TESTING.md +161 -0
  30. package/docs/air-gapped.md +1 -2
  31. package/docs/alternative-installations.md +14 -24
  32. package/docs/architecture/DECISIONS.md +333 -0
  33. package/docs/audit-logging.md +7 -7
  34. package/docs/authentication.md +3 -3
  35. package/docs/authorization.md +1 -1
  36. package/docs/certification/04-production-deployment/lab.md +6 -6
  37. package/docs/certification/04-production-deployment/lesson.md +4 -4
  38. package/docs/certification/README.md +1 -1
  39. package/docs/control-plane-container.md +2 -2
  40. package/docs/dev/real-run.md +34 -0
  41. package/docs/dev/release-checklist.md +2 -2
  42. package/docs/exit-codes.md +3 -3
  43. package/docs/git-workflow.md +3 -3
  44. package/docs/metrics.md +37 -55
  45. package/docs/network-security.md +1 -1
  46. package/docs/siem-integration.md +5 -5
  47. package/docs/v10/CLI-MODERN.md +4 -3
  48. package/docs/v10/DECISIONS.md +44 -0
  49. package/docs/v10/DEPS.md +22 -22
  50. package/docs/v10/ENGINE.md +1 -1
  51. package/docs/v10/FAILURE-CLASSES.md +118 -1
  52. package/docs/v10/FOUNDER-QUEUE.md +1 -0
  53. package/docs/v10/GUARDS.md +13 -0
  54. package/docs/v10/LEGACY-REMOVAL.md +4 -6
  55. package/docs/v10/METRICS.md +2 -2
  56. package/docs/v10/MODERNIZE.md +1 -1
  57. package/docs/v10/OPERATING-MODEL.md +2 -1
  58. package/docs/v10/PROGRESS.md +29 -0
  59. package/docs/v11/COST-HALF.md +352 -0
  60. package/docs/v11/MARKET-SLICES.md +315 -0
  61. package/docs/v11/REGISTRIES.md +730 -0
  62. package/loki-ts/data/model-pricing.json +52 -24
  63. package/loki-ts/dist/loki.js +1036 -957
  64. package/mcp/__init__.py +1 -1
  65. package/package.json +1 -1
  66. package/packages/control-plane/dist/server.js +2467 -736
  67. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  68. package/src/protocols/mcp-client.js +6 -2
  69. package/src/protocols/mcp-server.js +13 -3
  70. package/tools/audit-docs.py +1 -1
  71. package/web-app/dist/assets/{AdminPage-D_e45uTw.js → AdminPage-CMkHNJbF.js} +1 -1
  72. package/web-app/dist/assets/{Avatar-T3nIpoaf.js → Avatar-BJyjV7Zi.js} +1 -1
  73. package/web-app/dist/assets/{Badge-BKqb59pP.js → Badge-D572l0uq.js} +1 -1
  74. package/web-app/dist/assets/{Button-DjVlkh8_.js → Button-T4BnOZgl.js} +1 -1
  75. package/web-app/dist/assets/{CockpitPage-DXJgLGmh.js → CockpitPage-Cj_GFsNn.js} +1 -1
  76. package/web-app/dist/assets/{ComparePage-BRP_eVc_.js → ComparePage-A8m4ZXak.js} +1 -1
  77. package/web-app/dist/assets/{ErrorBoundary-CLjpGLjC.js → ErrorBoundary-hugCg5yg.js} +1 -1
  78. package/web-app/dist/assets/{EvidenceReceiptPanel-DX-vb4Xy.js → EvidenceReceiptPanel-CuJKDC2G.js} +1 -1
  79. package/web-app/dist/assets/{GitHubIssuesPanel-214HVHtX.js → GitHubIssuesPanel-BYGKjarC.js} +1 -1
  80. package/web-app/dist/assets/{GitHubPRsPanel-BEiZKc4t.js → GitHubPRsPanel-c7sFIJlf.js} +1 -1
  81. package/web-app/dist/assets/{HomePage-VvMHS5ga.js → HomePage-A1MIkG2P.js} +2 -2
  82. package/web-app/dist/assets/{LoginPage-5WD-v7n3.js → LoginPage-8KQMRhtR.js} +1 -1
  83. package/web-app/dist/assets/{MagicPage-DUQT_Jye.js → MagicPage-C05QW2Lx.js} +1 -1
  84. package/web-app/dist/assets/{MetricsPage-lga-z79v.js → MetricsPage-Oukv5hme.js} +1 -1
  85. package/web-app/dist/assets/{NotFoundPage-CGhBX3G1.js → NotFoundPage-DKIwsawz.js} +1 -1
  86. package/web-app/dist/assets/{ProjectPage-CdzF2GzZ.js → ProjectPage-DwFRPLCG.js} +3 -3
  87. package/web-app/dist/assets/{ProjectsPage-DRG64N8s.js → ProjectsPage-CgY4YYDX.js} +1 -1
  88. package/web-app/dist/assets/{SettingsPage-5fzW9Frb.js → SettingsPage-BpfcSjUA.js} +1 -1
  89. package/web-app/dist/assets/{ShowcasePage-DrTdxO4y.js → ShowcasePage-BqBakC4K.js} +1 -1
  90. package/web-app/dist/assets/{SystemSettingsPage-C9Mqs6Rd.js → SystemSettingsPage-CZLu5VB0.js} +1 -1
  91. package/web-app/dist/assets/{TeamsPage-CUGPdSWo.js → TeamsPage-D55S1jKz.js} +1 -1
  92. package/web-app/dist/assets/{TemplatesPage-CNraDY0F.js → TemplatesPage-D3SydvxN.js} +1 -1
  93. package/web-app/dist/assets/{TerminalOutput-BIu_6Pea.js → TerminalOutput-hNg8G1-e.js} +1 -1
  94. package/web-app/dist/assets/{activity-Bk-kgqaf.js → activity-D2C0VagO.js} +1 -1
  95. package/web-app/dist/assets/{bell-BXmUdmo8.js → bell-CMvYi36w.js} +1 -1
  96. package/web-app/dist/assets/{bot-CiuzXxUR.js → bot-BvtQ6lmo.js} +1 -1
  97. package/web-app/dist/assets/{check-BEzjXppd.js → check-B13xkXed.js} +1 -1
  98. package/web-app/dist/assets/{chevron-left-AYWCXHf8.js → chevron-left-emu6r49E.js} +1 -1
  99. package/web-app/dist/assets/{circle-alert-BNg2uSRq.js → circle-alert-CExlwjuy.js} +1 -1
  100. package/web-app/dist/assets/{clock-DTj0kkGT.js → clock-D7Uas3oL.js} +1 -1
  101. package/web-app/dist/assets/{cloud-x4nTDBLT.js → cloud-CkB4S86C.js} +1 -1
  102. package/web-app/dist/assets/{code-xml-BVh_MLrk.js → code-xml-SL9IIWIn.js} +1 -1
  103. package/web-app/dist/assets/{database-DdfBaowG.js → database-BQFkd7t1.js} +1 -1
  104. package/web-app/dist/assets/{dollar-sign-XuYFmAOY.js → dollar-sign-qHmnNYsU.js} +1 -1
  105. package/web-app/dist/assets/{file-code-corner-D4cRnmeL.js → file-code-corner-C2YUDP0K.js} +1 -1
  106. package/web-app/dist/assets/{file-plus-CyoVlHc_.js → file-plus-C_ooIkDe.js} +1 -1
  107. package/web-app/dist/assets/{globe-Y6IK2RPW.js → globe-CQ-GL485.js} +1 -1
  108. package/web-app/dist/assets/{hammer-BKzr9VZI.js → hammer-U05L_D7V.js} +1 -1
  109. package/web-app/dist/assets/{index-B20cSx5G.js → index-CooHd7I-.js} +3 -3
  110. package/web-app/dist/assets/{layers-DebNOhGS.js → layers-Buo17rjW.js} +1 -1
  111. package/web-app/dist/assets/{loader-circle-DyGbrEgd.js → loader-circle-15vK3oV1.js} +1 -1
  112. package/web-app/dist/assets/{lock-BKPpyt20.js → lock-BeXLebuJ.js} +1 -1
  113. package/web-app/dist/assets/{package-egF5Wi4y.js → package-MVh_6-6R.js} +1 -1
  114. package/web-app/dist/assets/{plus-OiEgKIc-.js → plus-Dh_nd9vS.js} +1 -1
  115. package/web-app/dist/assets/{refresh-cw-CzKvrONq.js → refresh-cw-C9cBJEAT.js} +1 -1
  116. package/web-app/dist/assets/{rotate-ccw-Bu2mII0p.js → rotate-ccw-D3PAtzST.js} +1 -1
  117. package/web-app/dist/assets/{scroll-text-CSkiyax8.js → scroll-text-DZCoXQjo.js} +1 -1
  118. package/web-app/dist/assets/{server-DlPthJFw.js → server-OCOLI5J_.js} +1 -1
  119. package/web-app/dist/assets/{shield-alert-CbpHWQQX.js → shield-alert-oVhmf1_h.js} +1 -1
  120. package/web-app/dist/assets/{thumbs-up-DgGpZe-Q.js → thumbs-up-B-kbX4vN.js} +1 -1
  121. package/web-app/dist/assets/{trash-2-BV3GlCB-.js → trash-2-EL6moveW.js} +1 -1
  122. package/web-app/dist/assets/{trending-down-Y4TJtXhD.js → trending-down-Cl3kjpsx.js} +1 -1
  123. package/web-app/dist/assets/{trending-up-DsDNoHZY.js → trending-up-DST7I6M2.js} +1 -1
  124. package/web-app/dist/assets/{upload-gkThrc_I.js → upload-CUOT780G.js} +1 -1
  125. package/web-app/dist/assets/{usePolling-jpNSeNAe.js → usePolling-Djmt90eb.js} +1 -1
  126. package/web-app/dist/assets/{user-3Zez1WOK.js → user-BRBohA6J.js} +1 -1
  127. package/web-app/dist/index.html +1 -1
  128. package/docs/ARCHITECTURE-OVERVIEW.md +0 -209
  129. package/docs/AUTONOMI-ECOSYSTEM.md +0 -107
  130. package/docs/COCKPIT-SPEC.md +0 -72
  131. package/docs/COCKPIT-UX-MANDATE.md +0 -53
  132. package/docs/COMPETITIVE-ANALYSIS.md +0 -303
  133. package/docs/COMPETITIVE-NEXT-10.md +0 -316
  134. package/docs/COMPETITIVE-RALPH-ZEROSHOT-2026-07-08.md +0 -81
  135. package/docs/DASHBOARD-9.12-EVIDENCE.md +0 -97
  136. package/docs/DASHBOARD-ARCHITECTURE.md +0 -425
  137. package/docs/DASHBOARD_V2_CHECKLIST.md +0 -243
  138. package/docs/DEMOS.md +0 -63
  139. package/docs/ENTERPRISE-IDENTITY-ROADMAP.md +0 -206
  140. package/docs/EVIDENCE-RECEIPT-BUILD-APPLICABILITY.md +0 -79
  141. package/docs/FEAT-PRDREUSE-DOCKER-PLAN.md +0 -144
  142. package/docs/GATE-FAILURE-TRIAGE.md +0 -254
  143. package/docs/HANDOFF-2026-08-03.md +0 -439
  144. package/docs/LOOP-CANDIDATE-PROPOSAL-v1.md +0 -167
  145. package/docs/LOOP-HARNESS-AUDIT.md +0 -684
  146. package/docs/MERGE-DEDUP-MAP.md +0 -420
  147. package/docs/MERGE-ROUTE-MAP.md +0 -139
  148. package/docs/MODEL-REGISTRY-PLAN.md +0 -155
  149. package/docs/OUTCOME-FRONTIER.md +0 -536
  150. package/docs/P2-SPEC-ROBUSTNESS-PLAN.md +0 -192
  151. package/docs/PLANS-INDEX.md +0 -32
  152. package/docs/PRD-REUSE-DONE-RECOGNITION-PLAN.md +0 -536
  153. package/docs/PROMPT-ABLATION-RESULT.md +0 -97
  154. package/docs/R4-TRUST-TRAJECTORY-DESIGN.md +0 -127
  155. package/docs/R5-AUTO-WIKI-DESIGN.md +0 -137
  156. package/docs/R6-ROLLBACK-CHECKPOINT-PLAN.md +0 -107
  157. package/docs/R7-ZERO-CONFIG-FIRST-RUN-PLAN.md +0 -137
  158. package/docs/R8-SHAREABLE-TEAM-ASSETS-PLAN.md +0 -129
  159. package/docs/R9-OPEN-CORE-HOOKS-PLAN.md +0 -113
  160. package/docs/RARV-C-100X-PLAN.md +0 -286
  161. package/docs/RARV-C-LOOP-EFFICIENCY-PLAN.md +0 -470
  162. package/docs/SHAREABLE-PROOF-PLAN.md +0 -194
  163. package/docs/SONNET5-DEFAULT-PLAN.md +0 -157
  164. package/docs/SPEED-AND-FIRST-PASS-PLAN.md +0 -281
  165. package/docs/STALE-STATE-AUDIT.md +0 -174
  166. package/docs/SYNERGY-TASKS.md +0 -143
  167. package/docs/TASKLIST-ACCURACY-PLAN.md +0 -355
  168. package/docs/TOP-100-BACKLOG.md +0 -159
  169. package/docs/V8-ACCEPTANCE-TRIAGE-2026-07-24.md +0 -114
  170. package/docs/V8-COMPLEXITY-AUDIT-2026-07-24.md +0 -45
  171. package/docs/V8-MAJOR-RELEASE-PLAN.md +0 -137
  172. package/docs/V8-OVERNIGHT-PLAN-2026-07-25.md +0 -82
  173. package/docs/V8-SDK-RESEARCH-RAW.md +0 -129
  174. package/docs/WELCOME-OPENER-PLAN.md +0 -106
  175. package/docs/adoption-baseline-2026-07-31.md +0 -84
  176. package/docs/architecture/bmad-integration-epic.md +0 -271
  177. package/docs/architecture/bmad-integration-review.md +0 -86
  178. package/docs/architecture/bmad-integration-validation.md +0 -249
  179. package/docs/architecture/bmad-loki-voice-agent-council-analysis.md +0 -61
  180. package/docs/auto-claude-comparison.md +0 -250
  181. package/docs/bug-fixes/agent-01-cli-fixes.md +0 -101
  182. package/docs/bug-fixes/agent-02-purplelab-fixes.md +0 -88
  183. package/docs/bug-fixes/agent-03-dashboard-fixes.md +0 -119
  184. package/docs/bug-fixes/agent-04-memory-fixes.md +0 -105
  185. package/docs/bug-fixes/agent-05-provider-fixes.md +0 -86
  186. package/docs/bug-fixes/agent-06-integration-fixes.md +0 -101
  187. package/docs/bug-fixes/agent-07-dash-run-fixes.md +0 -101
  188. package/docs/bug-fixes/agent-08-docker-fixes.md +0 -164
  189. package/docs/bug-fixes/agent-09-e2e-build-fixes.md +0 -69
  190. package/docs/bug-fixes/agent-10-e2e-fullstack-fixes.md +0 -102
  191. package/docs/bug-fixes/agent-11-e2e-session-fixes.md +0 -70
  192. package/docs/bug-fixes/agent-12-scenario-fixes.md +0 -120
  193. package/docs/bug-fixes/agent-13-enterprise-fixes.md +0 -143
  194. package/docs/bug-fixes/agent-14-uat-newuser-fixes.md +0 -88
  195. package/docs/bug-fixes/agent-15-uat-poweruser-fixes.md +0 -132
  196. package/docs/bug-fixes/agent-19-code-review.md +0 -316
  197. package/docs/bug-fixes/agent-20-architecture-review.md +0 -331
  198. package/docs/competitive/bolt-new-analysis.md +0 -579
  199. package/docs/competitive/emergence-others-analysis.md +0 -605
  200. package/docs/competitive/replit-lovable-analysis.md +0 -622
  201. package/docs/dashboard-guide.md +0 -487
  202. package/docs/enterprise/migration.md +0 -265
  203. package/docs/history/one-run-audit.md +0 -304
  204. package/docs/plans/FORGE-AUTONOMOUS-QUEUE.md +0 -312
  205. package/docs/plans/ULTRAPLAN-FORGE-BAAS.md +0 -612
  206. package/docs/plans/UT2-6-LSP-DIAGNOSTIC-BROADCAST.md +0 -394
  207. package/docs/prd-purple-lab-ide.md +0 -152
  208. package/docs/prd-purple-lab-platform-v2.md +0 -223
  209. package/docs/prd-purple-lab-platform.md +0 -319
  210. package/docs/retrospectives/v7.5.15-fleet-postmortem.md +0 -325
  211. package/docs/retrospectives/v7.5.15-honesty-audit.md +0 -136
  212. package/docs/retrospectives/v7.5.15-llm-failure-modes.md +0 -49
  213. package/docs/show-hn-post.md +0 -46
  214. package/docs/test-scenarios/enterprise-scenarios.md +0 -732
  215. package/docs/thick2thin.md +0 -173
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
- Your agent says done. Loki proves it.
1
+ # Loki Mode
2
2
 
3
- An autonomous software factory that knows what it is supposed to deliver, and proves it did.
3
+ Your agent says done. Loki proves it: an autonomous coding agent that turns a task or issue into a verified pull request with a signed receipt you can check yourself.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/loki-mode?style=for-the-badge&logo=npm&logoColor=white&color=553DE9)](https://www.npmjs.com/package/loki-mode)
6
6
  [![npm downloads](https://img.shields.io/npm/dt/loki-mode?style=for-the-badge&logo=npm&logoColor=white&color=1FC5A8&label=downloads)](https://www.npmjs.com/package/loki-mode)
7
7
  [![Docker Pulls](https://img.shields.io/docker/pulls/asklokesh/loki-mode?style=for-the-badge&logo=docker&logoColor=white&color=2F71E3)](https://hub.docker.com/r/asklokesh/loki-mode)
8
8
  [![License](https://img.shields.io/badge/License-BUSL--1.1-36342E?style=for-the-badge)](LICENSE)
9
9
 
10
- [Website](https://www.autonomi.dev/) | [Documentation](wiki/Home.md) | [Installation](docs/INSTALLATION.md) | [Changelog](CHANGELOG.md)
10
+ [Website](https://www.autonomi.dev/) | [Install guide](docs/INSTALLATION.md) | [User guide](docs/v10/GUIDE.md) | [CLI reference](docs/CLI-REFERENCE.md) | [Changelog](CHANGELOG.md)
11
11
 
12
12
  <!-- generated:facts -->
13
13
  The npm badge above tracks the current release; see [CHANGELOG.md](CHANGELOG.md) for release notes.
@@ -15,258 +15,50 @@ The npm badge above tracks the current release; see [CHANGELOG.md](CHANGELOG.md)
15
15
  CLI reference: [docs/CLI-REFERENCE.md](docs/CLI-REFERENCE.md) (generated from the command registry).
16
16
  <!-- /generated -->
17
17
 
18
- Loki Mode is a free, source-available autonomous coding agent by [Autonomi](https://www.autonomi.dev/). Hand it a PRD, GitHub issue, OpenAPI doc or one-line brief. It derives a delivery contract (the acceptance criteria), builds against it, and ends with a signed Evidence Receipt that states what was proven and what was not. If the contract cannot be derived, it stops and asks one question instead of guessing.
19
-
20
- Before a build counts as done, a review council selects reviewers from a specialist pool (`agents/types.json`, scored by `run.sh:FOCUS_KEYWORDS`). The bundled MCP server exposes 47 tools over stdio (`mcp/server.py`), including `loki_v10_run`, `loki_v10_status` and `loki_v10_verify` to start a Loki 10 run in the background, read its phase, verdict and cost, and verify its receipt (`BLOCKED` runs report their question). Add it with `claude mcp add loki-mode -- python3 -m mcp.server` from the install directory.
21
-
22
- ## Contents
23
-
24
- - [Install](#install)
25
- - [Loki 10 engine](#loki-10-engine)
26
- - [Outcomes and exit codes](#outcomes-and-exit-codes)
27
- - [Signed receipts and loki verify](#signed-receipts-and-loki-verify)
28
- - [loki workspace](#loki-workspace)
29
- - [Quiet output](#quiet-output)
30
- - [Release channels: next and latest](#release-channels-next-and-latest)
31
- - [loki doctor](#loki-doctor)
32
- - [Modernization: status of loki modernize](#modernization-status-of-loki-modernize)
33
- - [Providers](#providers)
34
-
35
18
  ## Install
36
19
 
37
20
  ```bash
38
- bun install -g loki-mode # recommended (npm, Homebrew, Docker below)
39
- loki doctor # checks your setup, names any blocker
21
+ npm install -g loki-mode
40
22
  ```
41
23
 
42
- | Method | Command | Notes |
43
- |--------|---------|-------|
44
- | **Bun (recommended)** | `bun install -g loki-mode` | Fastest startup for CLI commands. |
45
- | **npm** | `npm install -g loki-mode` | Works without Bun (bash fallback). Migrate any time with `loki self-update --to bun`. |
46
- | **Homebrew** | `brew tap asklokesh/tap && brew install loki-mode` | Auto-installs Bun as a dependency. |
47
- | **Docker** | `docker pull asklokesh/loki-mode:latest` | Bun and the Claude CLI pre-installed. See [DOCKER_README.md](DOCKER_README.md). |
48
- | **No install** | `npx loki-mode tour` | Prints a real Evidence Receipt from a past build. No key, no spend, no network. |
24
+ The npm package installs the Bun runtime the engine needs as an optional dependency. Other ways in: `bun install -g loki-mode`, `brew tap asklokesh/tap && brew install loki-mode`, or `docker pull asklokesh/loki-mode:latest` ([Docker guide](docs/DOCKER.md)). Upgrade with `loki self-update`.
49
25
 
50
- Upgrade with `loki self-update`. Long form: [Installation Guide](docs/INSTALLATION.md). `npm install -g loki-mode` installs the `latest` dist-tag; see [Release channels](#release-channels-next-and-latest) for `next`.
51
-
52
- **Loki needs a model to drive.** An `ANTHROPIC_API_KEY` alone is enough (the Claude Agent SDK ships inside Loki; on the legacy engine this path needs Bun and `LOKI_SDK_MODE=full`, see Setup details below), or point it at Claude Code, Cline, Codex, Aider or opencode. `loki doctor` tells you exactly what is missing.
26
+ Want to see a result before you install or spend anything?
53
27
 
54
28
  ```bash
55
- export ANTHROPIC_API_KEY=sk-...
56
- loki doctor
57
- loki quick "fix the login bug" # one small task on the Loki 10 engine, no PR
58
- loki "fix the login redirect loop" --no-pr # any task, Loki 10 engine
59
- loki owner/repo#123 # one GitHub, GitLab or Jira issue to a pull request, Loki 10 engine
29
+ npx loki-mode tour # prints a real receipt from a past build: no key, no spend, no network
60
30
  ```
61
31
 
62
- <details>
63
- <summary>Claude Code plugin (adds /loki-grill, /loki-spec-status, /loki-verify)</summary>
32
+ ## First run
64
33
 
65
- ```bash
66
- claude plugin marketplace add asklokesh/loki-mode
67
- claude plugin install loki-mode@loki-mode
68
- ```
69
-
70
- Adds three slash commands and the Loki MCP server (memory, task queue, code search, build management) to Claude Code. It calls the CLI rather than bundling it, so install `loki-mode` above first. Verify with `claude plugin list`: a healthy install reports `Status: enabled`.
71
-
72
- </details>
73
-
74
- loki-seal is a Claude Code Stop hook that runs your repo's real test suite when the agent tries to finish and refuses "done" if tests newly fail or tests or CI config were deleted, skipped or weakened (details: [packages/loki-seal/README.md](packages/loki-seal/README.md)). Install it from the repository's plugin marketplace:
75
-
76
- ```
77
- /plugin marketplace add asklokesh/loki-mode
78
- /plugin install loki-seal@loki-mode
79
- ```
80
-
81
- ## Loki 10 engine
82
-
83
- Loki 10 is the default engine for `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"`. <!-- loki10-default -->
84
-
85
- Guide, provider table and summary format: [docs/v10/GUIDE.md](docs/v10/GUIDE.md).
86
-
87
- ```
88
- loki "fix the login redirect loop" --no-pr
89
- ```
90
-
91
- ```
92
- loki owner/repo#123
93
- ```
94
-
95
- The v10 engine accepts a quoted multi-word task, a GitHub, GitLab or Jira issue reference, `status`, `verify`, `dashboard`, and other subcommands. Flags (`loki-ts/src/engine10/cli.ts` USAGE): `--no-pr` builds and verifies without opening a pull request, `--deep` requests the deep verify pass and a longer implement budget, `--provider <name>` picks the coding provider, `--max-cost <usd>` sets the per-run cost cap (default $100.00 when an API key is set, no dollar cap on a subscription run where the start line adds `subscription: no dollar cap; usage counts against your plan limits`; or `budgets.per_run` in `loki.yaml`; the flag wins; the start line prints it as `cap $100.00 (default)`; reaching it ends the run BUDGET_STOP, exit 3) (`--json` and `--verbose` are also parsed by the supervisor, see [Quiet output](#quiet-output)). The engine needs Bun; without it the command exits 1 with a message and installation instructions.
96
-
97
- **Legacy engine (being removed).** Migration note: the previous engine is being removed and has no engine switch; use `loki "<task>"` and `loki owner/repo#N`. `loki start owner/repo#N`, `loki start <issue URL>` and `loki start "<multi-word task>"` run on Loki 10, the same as `loki owner/repo#N` and `loki "<task>"`; `loki start ./prd.md`, a flag-first call and a one-word start stay on the legacy engine. For many issues use `loki backlog owner/repo --all|--label X|--issues N,N` (many issues, N in parallel, each on a `loki/backlog-N` worktree branch) instead. Legacy removal is planned and resumes on 2026-10-07; see [docs/v10/LEGACY-REMOVAL.md](docs/v10/LEGACY-REMOVAL.md). Sections below marked "legacy" describe features that run only on that engine.
98
-
99
- ### The state machine
100
-
101
- Every run starts from an explicit delivery contract and is judged only against it. The stage table lives in `loki-ts/src/engine10/machine.ts` (`FLOW`), the stages in `loki-ts/src/engine10/stages/`.
102
-
103
- ```mermaid
104
- flowchart TD
105
- A[Intake: task or issue, repo map, test map] --> P[Plan]
106
- A --> W[Wall: checks written from the task alone, sealed]
107
- P --> G{Wall already passes on the base tree?}
108
- W --> G
109
- G -- yes --> C[Commit]
110
- G -- no --> I[Implement]
111
- I --> V[Verify]
112
- V -- checks fail --> F[Fix, at most 2 rounds]
113
- F --> V
114
- V -- pass, stall, cap or spec conflict --> C
115
- C --> S[Seal: signed receipt]
116
- S --> R[PR: opened by the supervisor]
117
- R --> D[Deep verify, detached: full suite, app boot, council, secret scan]
118
- ```
119
-
120
- | Stage | What it does |
121
- |-------|--------------|
122
- | intake | Reads the task or issue, builds the repo map and the test map. |
123
- | plan and wall | Run in parallel. Plan decides the approach. The Wall author sees only the task and the repo map, never the code, and writes `loki_wall_*` tests that are sealed (sha256) before implement. If they already pass on the untouched base tree, the run ends early as ALREADY_SATISFIED. |
124
- | implement | A provider session makes the change, under a time budget (480s default, 1800s with `--deep`). |
125
- | verify and fix | Runs the checks. Failures feed up to 2 fix rounds (`MAX_FIX_ROUNDS`). The same failures three verifies running end the run as STALLED. |
126
- | commit and seal | Commits the diff, then writes `.loki/runs/<run-id>/receipt.json` and `receipt.md`, signed by default. |
127
- | pr | Opened by the supervisor, not the worker (the worker never holds a GitHub token). A non-VERIFIED run opens a draft PR. The body is written for a 60-second review: what the issue asked, what changed, how it was tested, NOT PROVEN, then the receipt digest and `loki verify`. Data the run did not record prints "not recorded". |
128
- | deep verify | Detached, started after the PR opens (so not with `--no-pr`): full suite, app-boot probe, council, secret scan. A check that is refused or unavailable is reported as NOT PROVEN, never as red. `--deep` is a separate flag that raises the implement and run budgets. |
129
-
130
- Warm start (experimental, `LOKI_SPEED=1`, off by default): `loki engine10 dashboard` also serves a unix socket at `~/.loki/run/engine.sock` (override with `LOKI_WARM_SOCK`) that keeps the repo map and test map in memory, keyed by the tree SHA plus a hash of dirty files, so an edit invalidates them. A run tries the socket for 50ms and prints `warm in Xs` when it answers; with no daemon it runs the cold path with identical events.
131
-
132
- PR body sample (`loki-ts/src/e10ext/reviewer_body.ts`):
133
-
134
- ```
135
- ## What the issue asked
136
- - handles empty input
137
- - rejects bad tokens
138
-
139
- ## What changed and why
140
- - Why: Fix the parser
141
- - src/parser.ts
142
- - tests/parser.test.ts
143
-
144
- ## How it was tested
145
- - Verdict: VERIFIED
146
- - Checks: 2 passed, 0 failed, 0 not run, 0 flaky (4 individual tests counted)
147
- - Command: `bun test tests/parser.test.ts` -> pass
148
- - Target tests (written before the fix): parser.test.ts
149
- - Before the fix: 2 failing, 0 passing on base; after: pass
150
-
151
- ## NOT PROVEN
152
- - none
153
-
154
- ## Receipt
155
- - Digest: sha256:ab12... (signed)
156
- - Verify: `loki verify run-1`
157
- ```
158
-
159
- The run cap is 900s (2700s with `--deep`, `DEFAULT_CAP_S` and `DEEP_CAP_S` in `types.ts`); commit, seal and pr still run after the cap fires. A run whose cap fired and which did not verify exits BUDGET_STOP.
160
-
161
- A finished run prints a short summary (see [Quiet output](#quiet-output), which also shows an example) whose `NOT PROVEN` line is never empty by omission: deep checks deferred to the deep-verify pass are always listed there.
162
-
163
- `loki status [run-id]` and `loki verify [run-id]` are built on the v10 path (bare `loki verify` follows the newest run, v10 or legacy). Two-way Slack (`loki slack serve`) is on by default and documented in [docs/slack.md](docs/slack.md); outbound notifications use `LOKI_SLACK_WEBHOOK_URL`.
164
-
165
- ## Run from Jira or Linear
166
-
167
- Loki 10 can start from a Jira or Linear issue the same way it starts from a GitHub issue: same run, same receipt. The issue is fetched deterministically before any model runs and normalized into the same `issue.json`, with a `source` field of `jira` or `linear`.
34
+ Loki needs a model. An `ANTHROPIC_API_KEY` is enough, or an installed and logged-in [Claude Code](https://docs.claude.com/en/docs/claude-code) CLI.
168
35
 
169
36
  ```bash
170
- loki jira:PROJ-123 # or https://<site>.atlassian.net/browse/PROJ-123
171
- loki linear:ENG-42 # or a linear.app issue URL
172
- ```
173
-
174
- - Jira needs `JIRA_EMAIL` and `JIRA_API_TOKEN`, plus `JIRA_BASE_URL` (for example `https://acme.atlassian.net`) unless you pass the full browse URL. The ADF description is converted to plain text.
175
- - Linear needs `LINEAR_API_KEY`.
176
- - A missing variable stops the run before any work with an error naming it (exit code 2, like other intake errors). GitHub refs are unchanged.
177
- - Self-hosted Jira: `<JIRA_BASE_URL>/browse/KEY` is accepted when its origin matches `JIRA_BASE_URL`. `LOKI_TRACKER_INTAKE=0` turns tracker intake off. Intake only, no sync. Details: [docs/trackers.md](docs/trackers.md).
178
-
179
- ## Two-way Slack
180
-
181
- Two-way Slack is on by default. With `SLACK_BOT_TOKEN` and `SLACK_SIGNING_SECRET` in the environment, `loki slack serve --port N` (127.0.0.1 by default) lets you mention `@loki <issue ref or task>` in a Slack thread to start a run, and a BLOCKED question is answered in the same thread. With either variable missing it prints one line naming both and exits 2 without binding a port. Set `LOKI_SLACK_INBOUND=0` to disable it. See [docs/slack.md](docs/slack.md) for the scopes.
182
-
183
- ## Spec to contract
184
-
185
- On by default; set `LOKI_CONTRACT=0` to turn it off. It does nothing unless `.loki/contract.json` exists. `loki contract <spec.md>` parses a spec or PRD into numbered acceptance criteria (AC-1, AC-2, up to 50) from checklist items (`- [ ]`) and from bullets and numbered lists under headings such as "Acceptance criteria", "Requirements" or "Must", prints them, and writes `.loki/contract.json` at the repo root. When a run seals with a contract present, each criterion is matched to changed files and checks by keyword overlap and recorded in an optional `contract` field on the receipt (`keyword_match` or `no_match`). Unmatched criteria are listed under NOT PROVEN in the receipt and the PR body (advisory only, the verdict is unchanged). Keyword overlap is a heuristic: `keyword_match` means a changed file plausibly relates to the criterion, not that the criterion is proven. The legacy PRD path is unchanged.
186
-
187
- ## Triggers without a cloud
188
-
189
- Both run on your own GitHub Actions minutes; there is no hosted service.
190
-
191
- - Issue to PR: copy `docs/examples/loki-issue-to-pr.yml.example` to `.github/workflows/loki-issue-to-pr.yml` in your repository. Label an issue `loki`, or comment `/loki` as an owner, member or collaborator, and it runs `loki owner/repo#N` (the Loki 10 engine) and opens a pull request with an evidence receipt. The agent job holds a read-only token; a separate publish job opens the PR. Set `ANTHROPIC_API_KEY` in repository secrets.
192
- - Nightly backlog: copy `examples/loki-nightly-backlog.yml` into `.github/workflows/`. Its `schedule:` trigger runs `loki backlog owner/repo --label loki`, one Loki 10 run per labeled open issue:
193
-
194
- ```yaml
195
- on:
196
- schedule:
197
- - cron: '17 3 * * *' # nightly, 03:17 UTC
198
- # ...
199
- - run: loki backlog "${GITHUB_REPOSITORY}" --label loki --concurrency 2
200
- ```
201
-
202
- `loki backlog` also takes `--all`, `--issues 1,2,3` and `--dry-run`. The nightly job runs the agent and a write token together, so label only issues you trust.
203
-
204
- ## Outcomes and exit codes
205
-
206
- A v10 run ends in exactly one outcome. The mapping is `EXIT` in `loki-ts/src/engine10/output.ts`.
207
-
208
- | Exit | Outcome | Meaning |
209
- |------|---------|---------|
210
- | 0 | VERIFIED | The contract's checks ran and passed. |
211
- | 0 | ALREADY_SATISFIED | The work was already done; evidence is recorded. |
212
- | 1 | FAILED | A check failed, the stage failed, or the event log was modified outside the engine. |
213
- | 2 | (usage) | No task given, not inside a git repository, or a preflight refusal. Nothing ran. |
214
- | 3 | BUDGET_STOP | The cost cap (`--max-cost`, `budgets.per_run`; default $100.00 with an API key, none on a subscription) or the time cap fired before the work finished. |
215
- | 4 | BLOCKED | Spec conflict: the contract cannot be satisfied as written. The summary names the conflict (`spec conflict: <reason>`); the run never guesses and calls it done. |
216
- | 5 | STALLED | The same failures three verifies in a row. |
217
-
218
- Severity rises with the code, so `[ $rc -ge 2 ]` always means worse than FAILED. The full table for other commands (`loki verify`, `loki proof verify`, `loki ci`, `loki doctor`, `loki start`) is in [docs/exit-codes.md](docs/exit-codes.md); that page does not yet list the v10 run ladder above, which is read from the code.
219
-
220
- Known gap: the legacy `loki verify` exit table in `docs/exit-codes.md` lists four inputs that do not yet return the documented target. They are tracked as pending moat cases.
221
-
222
- ## Signed receipts and loki verify
223
-
224
- Every sealed v10 run writes a receipt to `.loki/runs/<run-id>/receipt.json`. `receipt_sha256` hashes the canonical JSON without the `verification` block, so verifying never trusts the receipt's own signature field to compute the hash it checks.
225
-
226
- Receipts are signed by default. On the first run Loki generates an Ed25519 key at `~/.loki/keys/receipt-ed25519.pem` (mode 0600, directory 0700), or you supply your own with `LOKI_RECEIPT_SIGNING_KEY` or `LOKI_RECEIPT_SIGNING_KEY_FILE`. See [docs/SIGNED-RECEIPTS.md](docs/SIGNED-RECEIPTS.md).
227
-
228
- ```
229
- loki verify
37
+ export ANTHROPIC_API_KEY=sk-...
38
+ cd your-repo
39
+ loki doctor # names anything missing, exit 0 when ready
40
+ loki quick "fix the login redirect loop" # one small task, no PR
41
+ loki "add rate limiting to /api/login" # build, verify, seal a receipt, open a PR
42
+ loki owner/repo#123 # same, from a GitHub, GitLab or Jira issue
230
43
  ```
231
44
 
232
- `loki verify [run-id]` (latest run by default) re-hashes the receipt, checks the signature against your local key (and retired keys listed in `LOKI_RECEIPT_RETIRED_PUBKEYS`), and checks the receipt against the event log. Verdicts and exit codes (`loki-ts/src/engine10/verify_cmd.ts`):
233
-
234
- | Verdict | Exit | Meaning |
235
- |---------|------|---------|
236
- | VERIFIED | 0 | Hash and signature check out. |
237
- | UNSIGNED | 3 | The receipt carries no signature, so its integrity is not attested and `loki verify` refuses it. Pass `--allow-unsigned` (or set `LOKI_VERIFY_ALLOW_UNSIGNED=1`) to accept it and exit 0; the output still says UNSIGNED. A receipt whose body was edited and whose signature was stripped reads UNSIGNED. |
238
- | TAMPERED | 1 | The hash, the signature, or the event log does not match. |
239
- | UNCHECKED | 2 | The signature cannot be checked here, for example the signing key is on another machine. |
240
- | (no runs) | 66 | No receipt to verify. |
241
-
242
- A verified receipt is bound to the run's event log, so a receipt lifted out of its run, or a log edited after sealing, does not verify. Signing proves the receipt came from the key holder; it does not prove the generated code is bug-free. A receipt only claims what its checks ran, and states what they did not.
45
+ `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"` run on the Loki 10 engine by default. <!-- loki10-default --> Add `--no-pr` to build and verify without opening a pull request, `--max-cost <usd>` to cap spend (default $100 with an API key, no dollar cap on a subscription), and `--provider <name>` to pick another coding CLI.
243
46
 
244
- ### Export as a DSSE envelope
47
+ ## What you get
245
48
 
246
- `loki verify <run> --export-dsse > receipt.dsse.json` wraps a verified v10 receipt as a DSSE envelope whose payload is an in-toto Statement v1, signed with the Ed25519 receipt key. The export refuses unless the receipt verifies (exit 1 if tampered, 2 if unsigned or unchecked, 66 if no signing key is found) and its run outcome is `VERIFIED` or `ALREADY_SATISFIED` (exit 4 otherwise, empty stdout). It takes a receipt, not an envelope (exit 1), and an envelope found under a run id must carry that run id (exit 1). Example: `loki verify 20261003-abc --export-dsse > r.dsse.json; echo $?` prints 4 for a failed run. `loki verify receipt.dsse.json` accepts the envelope too; add `--pubkey FILE` on another machine. Details: [docs/SIGNED-RECEIPTS.md](docs/SIGNED-RECEIPTS.md).
49
+ Every run starts from a delivery contract derived from your task, writes checks from the task alone before touching code, implements, verifies, and ends in exactly one outcome: VERIFIED, ALREADY_SATISFIED, FAILED, BUDGET_STOP, BLOCKED or STALLED ([exit codes](docs/exit-codes.md)). If the contract cannot be satisfied as written, the run stops and asks one question instead of guessing.
247
50
 
248
- ### Visual evidence (on by default)
249
-
250
- By default (set `LOKI_VISUAL_EVIDENCE=0` to turn it off), a v10 run that changed web page files (html, jsx, tsx, vue, svelte under app/, pages/, src/ or public/) starts the repo's dev, preview or start script and screenshots each changed route with the repo's own Playwright (nothing is downloaded) into a fresh per-run directory `.loki/runs/<run_id>/evidence/<random>/` (at most 5 routes, total capture budget 25s, aborted with the seal stage). With an explicit `LOKI_VISUAL_EVIDENCE=1`, API-only repos with an openapi file also get an HTTP transcript at `.loki/runs/<run_id>/evidence/<random>/http.json` (not hashed into the receipt). Each screenshot's sha256 is recorded in the receipt as `evidence_screens`, the PR body gets an Evidence section, and `loki verify` reports TAMPERED if a recorded screenshot is altered, missing or a symlink. Capture never fails the run; a skip is listed in NOT PROVEN. On by default; it needs Playwright in the repo and changed pages, otherwise it only adds one NOT PROVEN line.
251
-
252
- ## loki workspace
253
-
254
- `loki workspace` runs one issue across several repos. Define groups under the `workspaces` key in `loki.yaml` (each with `repos`, optional per-repo `path`, `setup` and `after`, and an optional `integration` command), then:
51
+ - **A pull request** written for a quick review: what the issue asked, what changed, how it was tested, and what was NOT PROVEN. A run that did not verify opens a draft.
52
+ - **A signed receipt** at `.loki/runs/<run-id>/receipt.json`, signed with a local Ed25519 key created on first run.
53
+ - **A specialist review** when the review council runs: it selects reviewers from a specialist pool (`agents/types.json`, scored by `run.sh:FOCUS_KEYWORDS`) by matching the changed files and diff against each reviewer's keywords.
255
54
 
256
55
  ```bash
257
- loki workspace list # configured workspaces
258
- loki workspace show <name> # one workspace's repos and order
259
- loki workspace run <name> owner/repo#N # or a task text instead of an issue ref
260
- loki workspace status [<run-id>] # recorded runs, one row per repo
56
+ loki verify # newest run; or: loki verify <run-id>
261
57
  ```
262
58
 
263
- Each repo gets its own worktree and engine run. The command exits 0 only when every repo and the integration step succeed, 3 when the only failures are budget stops, and 1 otherwise. After the integration step, a PR comment is posted on each repo's PR (when one exists) showing the integration status and every head SHA; `LOKI_WORKSPACE_COMMENT=0` turns it off. `LOKI_WORKSPACES=0` disables the whole command. Full reference: [docs/WORKSPACES.md](docs/WORKSPACES.md).
59
+ `loki verify` re-hashes the receipt, checks its signature and checks it against the run's event log. It prints VERIFIED (exit 0), TAMPERED (1), UNCHECKED (2) or UNSIGNED (3). On another machine, export the public key with `loki keys export` and pass it with `loki verify --pubkey <file>`. A receipt claims only what its checks ran, and lists what they did not; signing proves who produced it, not that the code is bug-free. Details: [docs/SIGNED-RECEIPTS.md](docs/SIGNED-RECEIPTS.md).
264
60
 
265
- ## Quiet output
266
-
267
- The v10 run is quiet by default: no stage chatter, only the final summary. `--verbose` tails the event stream live (one line per finished stage and a heartbeat with elapsed time and the running diff size). `--json` prints one JSON object (`ok`, `outcome`, `stop`, `run_id`, `receipt_sha256`) instead of text.
268
-
269
- The summary is one outcome line, an optional reason on a non-VERIFIED run, then the PR, the receipt, what was NOT PROVEN, the cost and the time (`formatSummary` in `output.ts`):
61
+ A finished run prints a short summary:
270
62
 
271
63
  ```
272
64
  Outcome: VERIFIED
@@ -277,451 +69,77 @@ Cost: $0.42 (claude, 212k tokens)
277
69
  Time: 4m12s (intake 11s, plan 20s, implement 3m10s, verify 31s)
278
70
  ```
279
71
 
280
- Cost is the provider-reported figure. When a provider does not report cost the line reads `not measured`, never `$0.00`. The legacy `loki quick` is also quiet by default; `--verbose` or `LOKI_VERBOSE=1` shows setup and progress.
281
-
282
- ## Release channels: next and latest
283
-
284
- Releases are built in slices and shipped in trains: green slices merge, one train is pushed, and the release workflow publishes the exact tested tree to the npm `next` dist-tag. `latest` moves only through the promote workflow (`.github/workflows/promote.yml`), which installs that exact version from npm, runs the first-run gate on it (`scripts/first-run-gate.sh --installed`), and only then moves `latest`, Docker `:latest` and the Homebrew formula. A version whose commit is not an ancestor of main can never become `latest`.
285
-
286
- The first-run gate runs the README's default entry point for a new user on a throwaway repo with a throwaway HOME and a stub provider, and asserts the run is honest: the exit code matches the result, tests are green, only the fix file changed, the printed digest equals what `loki verify` checks, the receipt is signed, output stays short, and a run that skips the target test does not end VERIFIED.
287
-
288
- Policy (D49): every green release is promoted to `latest` after the automated first-run gate. The promote workflow runs automatically after Post-Release Smoke succeeds; a failed smoke or gate leaves the version on `next`. `workflow_dispatch` remains for manual runs of an exact version.
289
-
290
- ## loki doctor
291
-
292
- ```bash
293
- loki doctor # human-readable check of prerequisites and providers
294
- loki doctor --json # machine-readable; JSON is emitted in full even on failure
295
- loki doctor --airgap # audit network egress and how to disable each
296
- ```
297
-
298
- Exit 0 when every required check passes; optional warnings (an absent provider CLI) do not fail it. It checks the required tools, the provider CLIs and your login, and says what to install for each gap. The same contract holds for `--json`, so it is usable as an init-container or CI preflight gate.
299
-
300
- ## Modernization: status of loki modernize
301
-
302
- Migration: `loki modernize heal <repo> --assess` was a legacy command for read-only analysis. The v10 path `loki modernize <repo> --to <target>` is not yet finished: only `--dry-run` works (inventory, dependency graph, unit clustering, cost, time and risk estimate). A real run stops after the estimate and prints `modernize: oracle capture and execution are not built yet; use --dry-run`. Targets `python3` and `java21` exist; the Java dependency graph is not wired in yet. Design: [docs/v10/MODERNIZE.md](docs/v10/MODERNIZE.md), user summary: [docs/v10/GUIDE-MODERNIZE.md](docs/v10/GUIDE-MODERNIZE.md).
303
-
304
- ## Control Plane v0
305
-
306
- A local control plane and UI for many runs, on by default. Turn it off with `LOKI_CONTROL=0`:
307
-
308
- ```bash
309
- loki control serve # 127.0.0.1, default port 47821 (--port N, --db PATH)
310
- loki control backfill . # ship ./.loki/runs to the control plane
311
- loki control status # reachable? how many runs held?
312
- loki control prune --repo acme/widget # remove those runs from the local control DB (--before DATE, --dry-run)
313
- ```
314
-
315
- The URL comes from `LOKI_CONTROL_URL`, else `http://127.0.0.1:${LOKI_CONTROL_PORT:-47821}`. While `loki control serve` is running, runs on this machine ship to it automatically (it publishes `~/.loki/control/instance.json`, mode 0600, removed on exit); a run never starts the server. Set `LOKI_CONTROL_URL` to ship elsewhere. See [docs/v10/CONTROL-PLANE.md](docs/v10/CONTROL-PLANE.md).
316
-
317
- Answering a BLOCKED run: when a run stops on a spec conflict, its run page shows the question and an answer box. Submitting posts to `POST /v1/runs/<source>/<run>/answer` (JSON `{"answer": "..."}`, up to 4000 characters, loopback only) and writes `~/.loki/control/answers/<source>/<run>.answer.txt` (override the directory with `LOKI_CONTROL_ANSWER_DIR`). The page prints the resume command, `loki answer <run>`, which starts a fresh run carrying the task, the question and that file's text (or pass `--text "..."` yourself; with no run id it picks the newest BLOCKED run). A run that is not BLOCKED exits 2.
318
-
319
- The Control Plane is the only UI. `loki dashboard`, `loki dashboard start` and `loki dashboard open` open it (starting `loki control serve` if none is running). The classic dashboard UI and its port 57374 are removed in 10.8; see [docs/control-plane-migration.md](docs/control-plane-migration.md) for the route mapping and what is not yet available.
320
-
321
- Container, Helm and ECS deployment: [docs/control-plane-container.md](docs/control-plane-container.md).
322
-
323
- ## Providers
324
-
325
- Loki's autonomy and quality loop are the product; the coding CLI is swappable. With `LOKI_PROVIDER` unset, Loki auto-detects the first installed provider in this order (`providers/loader.sh`): claude, cline, codex, aider, opencode. An explicit choice always wins and is never silently substituted. Gemini CLI is deprecated: `LOKI_PROVIDER=gemini` exits with a migration message.
326
-
327
- | Provider | Tier | Autonomous flag | Parallel | v10 engine cost and kill-blocking | Install |
328
- |----------|------|-----------------|:--------:|:---------------------------------:|---------|
329
- | **Claude Code** | 1, full support | `--dangerously-skip-permissions` | Yes | measured, enforced | `npm i -g @anthropic-ai/claude-code` |
330
- | **Cline CLI** | 2, reduced | `-y` | Sequential | not measured, not enforced | `npm install -g cline` |
331
- | **Codex CLI** | 3, degraded | `exec --sandbox workspace-write --skip-git-repo-check` | Limited (2) | not measured, not enforced | `npm i -g @openai/codex` |
332
- | **Aider** | 3, degraded | `--yes-always` | Sequential | not measured, not enforced | `pip install aider-chat` |
333
- | **opencode** | model-agnostic | `--auto` | Sequential | not supported by the v10 engine | `npm install -g opencode-ai` |
334
-
335
- Claude Code is the provider Loki is built for and the one that is run end to end by us. The others are wired in but are experimental. On a non-Claude provider the v10 summary says so: the Cost line reads `not measured` and NOT PROVEN adds `kill blocking not enforced`. See [Provider Guide](skills/providers.md).
336
-
337
- ---
338
-
339
- ## Try it first, without installing
340
-
341
- ```bash
342
- npx loki-mode tour # no install, no API key, no spend, no network
343
- ```
344
-
345
- Prints a real Evidence Receipt from a past build, headline and all:
346
-
347
- ```
348
- Headline: VERIFIED WITH GAPS
349
-
350
- | Fact | Value |
351
- | Files changed | 8 |
352
- | Diff sha256 | c2be6fff3e774c387f276277b25fc424f07b667… |
353
- | Tests | verified (node-test) |
354
- | Build | not_run |
355
- | Security | findings |
356
- | Cost | $10.3218 |
357
- ```
358
-
359
- **"WITH GAPS" is the point.** Build was not run, security has findings, and the receipt says so on its own front page. Recompute the diff hash yourself and check it matches.
360
-
361
- ## Loki does not lie about "done"
362
-
363
- Most coding agents declare a task done by telling you so in a transcript. The
364
- transcript is the agent's own narration; there is nothing to check. Loki Mode
365
- takes a different stance: it does not call work done until the work is verified,
366
- and every build produces an **Evidence Receipt** you can re-verify yourself.
367
-
368
- The receipt separates two things most tools blur together:
369
-
370
- - **Facts** -- deterministic, non-LLM, and re-derivable by anyone: the git diff
371
- (base/head SHAs, file/insertion/deletion counts, a `diff_sha256`), the test
372
- command that ran with its exit code, the build command with its exit code, and
373
- each quality-gate verdict. A skeptic can recompute every one of these from the
374
- same repo state.
375
- - **Assessments** -- AI judgments such as the review council's verdict. These are
376
- labeled explicitly as judgment, not proof, and never make the headline green on
377
- their own.
72
+ ## Core commands
378
73
 
379
- The receipt's headline is computed only from the facts:
74
+ | Command | What it does |
75
+ |---------|--------------|
76
+ | `loki "<task>"` | Build a task, verify it, seal a receipt, open a PR (`--no-pr`, `--deep`, `--provider`, `--max-cost`) |
77
+ | `loki owner/repo#N` | The same, from a GitHub, GitLab or Jira issue (issue URLs work too) |
78
+ | `loki quick "<task>"` | One small task, no PR |
79
+ | `loki status [run-id]` | Status of the latest run, or of a given run |
80
+ | `loki verify [run-id]` | Check a receipt's hash, signature and event log |
81
+ | `loki answer [run-id]` | Resume a BLOCKED run with your answer (`--text "..."`) |
82
+ | `loki doctor [--json]` | Check prerequisites, providers and login |
83
+ | `loki control serve` | Start the Control Plane (see below) |
84
+ | `loki dashboard` | Open the Control Plane UI, starting it if needed |
85
+ | `loki tour` | Show a sample receipt offline |
86
+ | `loki --help` | Everything else; `loki help <command>` for one command |
380
87
 
381
- - **VERIFIED** -- tests recorded a real command, ran, and exited 0; the diff is
382
- non-empty; nothing was skipped.
383
- - **VERIFIED WITH GAPS** -- some facts checked out, but something was not run or
384
- was inconclusive. Every gap is listed by name, so silence never reads as a pass.
385
- - **NOT VERIFIED** -- a test, build, or gate ran and failed (or there was nothing
386
- to verify).
387
-
388
- This is honesty-of-done, not a claim of perfection. The receipt proves the
389
- completion claim is backed by deterministic evidence and is independently
390
- re-checkable; it does not claim the generated code is bug-free.
391
-
392
- <details>
393
- <summary><b>Setup details: providers, other models, what loki doctor checks (PRD-file examples use the legacy `loki start`)</b></summary>
394
-
395
- The `loki start <file>` examples below run on the legacy engine (being removed). A `loki start` call with an issue ref, an issue URL or a quoted multi-word task runs on Loki 10; the provider and model variables apply to both engines. Other spec sources on the legacy engine:
396
-
397
- ```bash
398
- loki init my-app --template simple-todo-app # scaffold a starter PRD
399
- loki start owner/repo#123 # a GitHub issue (Loki 10; same as: loki owner/repo#123)
400
- loki start ./openapi.yaml # an OpenAPI/YAML spec
401
- loki demo --offline # replay a sample receipt, no key, no spend
402
- ```
88
+ Full reference: [docs/CLI-REFERENCE.md](docs/CLI-REFERENCE.md). Engine guide, provider table and model routing: [docs/v10/GUIDE.md](docs/v10/GUIDE.md).
403
89
 
404
- Loki needs a model to drive. There are two ways to give it one.
90
+ ## Control Plane
405
91
 
406
- **Without a separate CLI (v8).** The Claude Agent SDK ships inside Loki, so an API key alone is enough:
92
+ A local UI and API for all your runs: outcomes, receipts, costs, and an answer box for BLOCKED runs. It is on by default (`LOKI_CONTROL=0` turns it off) and listens on 127.0.0.1 only.
407
93
 
408
94
  ```bash
409
- export ANTHROPIC_API_KEY=sk-... # or ANTHROPIC_AUTH_TOKEN / ANTHROPIC_BASE_URL
410
- LOKI_SDK_MODE=full loki start prd.md # runs the loop and the judges through the bundled SDK
95
+ loki control serve # http://127.0.0.1:47821 (--port N, --db PATH)
96
+ loki control backfill . # load existing ./.loki/runs
97
+ loki control status # reachable? how many runs?
411
98
  ```
412
99
 
413
- This needs Bun on your PATH (the SDK loop runs on the Bun runtime). `loki doctor` reports `Bundled Claude Agent SDK is usable -- no separate CLI needed` when that path is genuinely ready, and stays on the normal blocker otherwise: it checks that the SDK's platform binary is actually extracted, that credentials are present, and that the SDK loop is really the route your next run will take. It will not tell you that you are ready and then fail the build.
100
+ While it is running, runs on this machine ship to it automatically. Guides: [docs/v10/CONTROL-PLANE.md](docs/v10/CONTROL-PLANE.md), [container, Helm and ECS](docs/control-plane-container.md), [migrating from the old dashboard](docs/control-plane-migration.md).
414
101
 
415
- **With a coding-agent CLI.** The classic path, and still the default: Loki drives a separate CLI (Claude Code is the recommended one) plus a couple of common tools on your PATH.
416
-
417
- **With a different model or provider.** Loki is not tied to Anthropic, but
418
- *how* you reach another model depends on which API the endpoint speaks. There
419
- are two routes, and picking the wrong one fails confusingly.
420
-
421
- *Route 1 -- OpenAI-shaped endpoints (OpenRouter, and most hosted open models).*
422
- Use a provider that speaks that API natively. `aider` and `cline` both do, and
423
- Loki now defaults them to open-weight models rather than Claude:
424
-
425
- ```bash
426
- loki provider set aider
427
- export OPENROUTER_API_KEY=sk-or-...
428
- loki start prd.md # defaults to deepseek-v3.2
429
-
430
- export LOKI_AIDER_MODEL=openrouter/z-ai/glm-4.6 # or pick your own
431
- ```
432
-
433
- OpenRouter serves **only** the OpenAI-shaped `/v1/chat/completions`; it has no
434
- Anthropic `/v1/messages` endpoint. Pointing `ANTHROPIC_BASE_URL` at it does not
435
- work, which earlier versions of this README incorrectly suggested.
436
-
437
- [OrcaRouter](https://www.orcarouter.ai) is an OpenAI-compatible gateway that
438
- also serves the Anthropic Messages API, so unlike OpenRouter the same key works
439
- through Route 2 below as well as Route 1 here.
440
-
441
- *Route 2 -- Anthropic-protocol gateways.* `ANTHROPIC_BASE_URL` routes Claude
442
- Code itself, so the endpoint must speak the Anthropic Messages API. LiteLLM,
443
- Bedrock proxies, and self-hosted gateways can:
444
-
445
- ```bash
446
- # Ollama, fully local (no API key, no per-token cost)
447
- export ANTHROPIC_BASE_URL=http://localhost:11434/v1
448
- export LOKI_MODEL_OVERRIDE=<model you have pulled, e.g. the output of `ollama list`>
449
- loki start prd.md
450
-
451
- # LiteLLM / vLLM / any self-hosted gateway
452
- export ANTHROPIC_BASE_URL=https://your-gateway.internal/v1
453
- export ANTHROPIC_API_KEY=...
454
- export LOKI_MODEL_OVERRIDE=<whatever your gateway calls the model>
455
- loki start prd.md
456
-
457
- # OrcaRouter (one key for both routes; model ids are namespaced by provider).
458
- # The bare host is deliberate here: the Anthropic SDK appends /v1/messages
459
- # itself, so adding /v1 would double it.
460
- export ANTHROPIC_BASE_URL=https://api.orcarouter.ai
461
- export ANTHROPIC_API_KEY=sk-orca-...
462
- export LOKI_MODEL_OVERRIDE=<namespaced id, e.g. anthropic/claude-sonnet-5>
463
- loki start prd.md
464
- ```
102
+ ## Requirements
465
103
 
466
- **Set both variables.** `LOKI_MODEL_OVERRIDE` is what makes the alt-provider
467
- path work: without it Loki keeps asking for `opus` / `sonnet` / `haiku`, which
468
- only Anthropic resolves, and most providers reject those names outright. A
469
- proxy that maps the aliases for you (LiteLLM can) is the one exception.
470
-
471
- Model IDs are not listed here on purpose -- OpenRouter's catalogue changes every
472
- week, and a stale ID in a README is a failure you would hit at runtime. Take the
473
- exact string from your provider's own model list.
474
-
475
- Both routes honor these variables identically -- the bundled-SDK path and the
476
- Claude Code CLI path -- and `loki doctor` reports the endpoint it detected plus a
477
- warning if the model override is missing.
478
-
479
- The quality gates, the completion council, and the Evidence Receipt do not care
480
- which model produced the code. They check what was actually built.
481
-
482
- Either way, run `loki doctor` any time and it tells you exactly what is present and what is missing, with a copy-pasteable install command for each gap.
483
-
484
- **What Loki needs (and what `loki doctor` checks)**
104
+ `loki doctor` enforces this list.
485
105
 
486
106
  Required:
487
107
 
488
- - An agent provider CLI: [Claude Code](https://docs.claude.com/en/docs/claude-code) (`claude`, Tier 1, recommended and E2E-verified - the provider Loki Mode is built for). Cline, Codex, Aider, and opencode are supported as experimental providers (wiring in place; not yet E2E-verified by us). Loki cannot run a build without one of these installed and authenticated.
489
- - Python 3.8+ (`python3`) for the dashboard, memory system, and orchestration helpers.
490
- - Node.js 20+ (`node`) for the npm install path and the bundled runtime.
491
- - `jq` for the JSON that the shell flows and the quality gates parse.
492
- - Git 2.x (`git`) for checkpoints and worktrees.
493
- - `curl` for installation and network calls.
108
+ - A model: `ANTHROPIC_API_KEY`, or a provider CLI such as Claude Code (`claude`). Cline, Codex, Aider and opencode are supported as experimental providers.
109
+ - Python 3.8+ (`python3`)
110
+ - Node.js 20+ (`node`)
111
+ - `jq`
112
+ - Git 2.x (`git`)
113
+ - `curl`
494
114
 
495
115
  Recommended:
496
116
 
497
- - Bun 1.3.0+ (`bun`) for the fast runtime (the recommended install path above installs it).
498
- - Docker if you want Loki's App Runner to run containerized projects, or to run Loki itself from the published image.
499
-
500
- You also need credentials for whichever provider you use (for Claude Code, an authenticated `claude` login or `ANTHROPIC_API_KEY`). `loki doctor` flags a missing or unauthenticated provider as the first thing to fix.
501
-
502
- If you do not have Bun yet:
503
-
504
- ```bash
505
- curl -fsSL https://bun.sh/install | bash # macOS / Linux (or: brew install oven-sh/bun/bun)
506
- ```
507
-
508
- Docker without installing loki locally: `loki docker start owner/repo#N` (or
509
- `loki docker start prd.md`) runs it in the published image with zero config,
510
- bind-mounting the current folder so `.loki` state and resume work exactly like
511
- local. On macOS, pass your GitHub login for PRs:
512
- `GH_TOKEN=$(gh auth token) loki docker start owner/repo#17`.
513
- See [DOCKER_README.md](DOCKER_README.md).
514
-
515
- Upgrading: `loki self-update` auto-detects which package manager installed loki
516
- and runs the right upgrade. `loki self-update --to bun` migrates an npm install
517
- to Bun in one command. `loki self-update --check` shows the install path.
518
-
519
- See the [Installation Guide](docs/INSTALLATION.md) for the long form.
520
-
521
- </details>
522
-
523
- ---
524
-
525
- <details>
526
- <summary><strong>Runtime architecture: dual Bash/Bun runtime</strong></summary>
527
-
528
- The Loki 10 engine runs on the Bun runtime. The legacy engine is Bash (`autonomy/loki`) and is being removed.
529
-
530
- - Commands that require Bun: `version`, `--version`, `-v`, `status`, `stats`, `doctor`, `provider`, `memory`, `rollback`, `kpis`, `trust`, `wiki`, `crash`, `internal`, and `report kpis`.
531
- - If `bun` is not on `PATH`, commands exit 1 with installation instructions.
532
- - For troubleshooting, force commands onto alternate paths with environment variables; see `loki doctor` for available options.
533
-
534
- See [UPGRADING.md](UPGRADING.md) and [ADR-001: Runtime Migration](docs/architecture/ADR-001-runtime-migration.md).
535
-
536
- </details>
537
-
538
- <details>
539
- <summary><strong>Supported spec formats (legacy engine, being removed)</strong></summary>
540
-
541
- Loki 10 takes a quoted task or an issue reference (GitHub, GitLab or Jira), also through `loki start`. The table below describes the legacy `loki start`, which accepts files too; rows for an issue ref or an issue URL run on Loki 10. A "spec" is whatever you hand `loki start`. Loki auto-detects the format and normalises it before the RARV loop. A Markdown PRD is one form of spec; the table below lists every input the CLI accepts.
542
-
543
- | Format | Example | Notes |
544
- |--------|---------|-------|
545
- | Markdown PRD | `loki start ./prd.md` | Canonical form. Headings become section anchors. |
546
- | JSON spec | `loki start ./spec.json` | Free-form JSON; keys surfaced to agents. |
547
- | YAML spec | `loki start ./openapi.yaml` | OpenAPI / AsyncAPI / plain YAML all accepted. An OpenAPI/GraphQL/Postman contract expands into a per-operation build checklist (one item per operationId/field/request) so no operation is lost to prompt truncation (v8.0.0). |
548
- | Plain text brief | `loki start ./brief.txt` | One-paragraph briefs work; complexity auto-detects to "simple". |
549
- | GitHub issue URL | `loki start https://github.com/owner/repo/issues/42` | Title + body + labels become the spec. |
550
- | GitHub shorthand | `loki start owner/repo#42` | Same as above, shorter. |
551
- | Jira ticket key | `loki start PROJ-456` | Requires `JIRA_BASE_URL` + `JIRA_TOKEN` env vars. |
552
- | GitLab / Azure DevOps URL | `loki start https://gitlab.com/group/proj/-/issues/7` | GitLab and Azure DevOps issue URLs both supported. |
553
- | Bare issue number | `loki start #123` or `loki start 123` | Resolved against the current repo's `origin` remote. |
554
- | OpenSpec change directory | `loki start --openspec ./openspec/change-001` | Reads OpenSpec change manifest + delta files. |
555
- | Auto-detect (no input) | `loki start` | Picks up `./prd.md`, `./spec.{json,yaml,yml}`, or `./SPEC.md` from cwd. |
556
-
557
- All formats land in the same RARV pipeline and pass the same 8 quality gates (`skills/quality-gates.md`).
117
+ - Bun 1.3+ (`bun`) on your PATH (the npm package also bundles it).
118
+ - Docker, to run Loki from the published image.
558
119
 
559
- </details>
120
+ macOS and Linux are supported.
560
121
 
561
- ---
122
+ ## More
562
123
 
563
- For how Loki compares with other tools, see [docs/COMPARISON.md](docs/COMPARISON.md) and [docs/EVALUATING.md](docs/EVALUATING.md).
564
-
565
- ---
566
-
567
- ## CLI Reference
568
-
569
- <details>
570
- <summary><strong>All commands</strong></summary>
571
-
572
- Loki 10 engine:
573
-
574
- | Command | Description |
575
- |---------|-------------|
576
- | `loki "<task>" [--no-pr] [--deep] [--provider NAME] [--max-cost USD]` | Build a task, verify it, seal a signed receipt, open a PR |
577
- | `loki owner/repo#N` | Same, from a GitHub, GitLab or Jira issue |
578
- | `loki quick "<task>"` | Small task, lean path, no PR |
579
- | `loki backlog owner/repo --all\|--label X\|--issues N,N` | Run every matching open issue, N in parallel (`--concurrency N`, `--dry-run`) |
580
- | `loki workspace list \| run <name> <ref>` | Experimental (`LOKI_WORKSPACES=1`): run one issue across the repos of a `loki.yaml` workspace; see [docs/WORKSPACES.md](docs/WORKSPACES.md) |
581
- | `loki status [--json]` | Current status |
582
- | `loki verify [run-id]` | Re-check a sealed receipt (exit codes above) |
583
- | `loki doctor [--json] [--airgap]` | Check environment and providers |
584
- | `loki control serve\|backfill\|status` | Control Plane server, ship existing runs, reachability check (on by default; `LOKI_CONTROL=0` turns it off) |
585
- | `loki modernize <repo> --to <target> --dry-run` | Estimate only |
586
- | `loki plan [PRD]` | Dry-run analysis: complexity, cost, execution plan |
587
- | `loki version` | Show version |
588
-
589
- Legacy engine, being removed (these run on the previous engine; `loki --help` still lists them):
590
-
591
- | Command | Description |
592
- |---------|-------------|
593
- | `loki start [PRD\|ISSUE-REF\|"TASK"]` | An issue ref, an issue URL or a quoted multi-word task runs on Loki 10 (same as `loki owner/repo#N`); a PRD file, a flag-first call or a one-word start runs the legacy build |
594
- | `loki stop`, `pause`, `resume` | Control a legacy run |
595
- | `loki steer "<note>"` | Nudge a legacy run (needs `LOKI_PROMPT_INJECTION=1`) |
596
- | `loki why`, `loki next` | Explain or continue a legacy run |
597
- | `loki dashboard` | Open the Control Plane UI (see [docs/control-plane-migration.md](docs/control-plane-migration.md)) |
598
- | `loki review`, `loki test`, `loki analyze`, `loki memory`, `loki failover`, `loki enterprise`, `loki import`, `loki ci` | Review, test generation, codebase analysis, memory, failover, enterprise, issue import, CI gate |
599
- | `loki modernize heal <path>` | Legacy system healing |
600
-
601
- </details>
602
-
603
- Run `loki --help` for all options. Full reference: [CLI Reference](wiki/CLI-Reference.md) | Config: [config.example.yaml](autonomy/config.example.yaml)
604
-
605
-
606
- Pass a config file to `loki start` with `--config <path>` (aliases `--env-file`, `--vars`), or set `LOKI_CONFIG_FILE`. The format is detected from the extension or content: `.yaml`/`.yml`, `.json`, or `.env` (flat `LOKI_*=value` lines). A CLI flag beats an ambient env var, which beats the `--config` file, which beats built-in defaults. Never inline a secret; reference an env var with `${VAR}`. Manage settings with `loki config show|init|edit|path|set|get`; a sample is in [autonomy/config.example.yaml](autonomy/config.example.yaml).
607
-
608
- ---
609
-
610
- <details>
611
- <summary><strong>Configuration env vars (legacy engine knobs, opt-out)</strong></summary>
612
-
613
- Loki Mode's accuracy and autonomy behaviors are default-on. Each is an opt-out escape hatch, not a setting you have to discover. The most relevant knobs from the v7.41.x accuracy/autonomy hardening:
614
-
615
- | Env var | Default | Effect |
616
- |---------|---------|--------|
617
- | `LOKI_REVIEW_INCONCLUSIVE_BLOCK` | `1` | Blocks completion when a code-review round returns zero usable verdicts (an all-empty review proves nothing). Set `0` to record the inconclusive result without blocking. |
618
- | `LOKI_COMPLETION_TEST_CAPTURE` | `1` | Captures fresh test results before the verified-completion evidence gate evaluates. Set `0` to skip the pre-gate capture. |
619
- | `LOKI_AUTO_DOCS` | `true` | Generates the `.loki/docs/` suite before the documentation gate scores it (bounded: once per run when docs are missing, and again only when >10 commits stale). Set `false` to opt out. |
620
- | `LOKI_CAVEMAN` | `1` (on) | Output-token compressor for free-form generation only (never trust-gate subcalls). Set `0` to opt out. |
621
- | `LOKI_CAVEMAN_LEVEL` | inferred | Compression level for the compressor. Auto-inferred per invocation from the run's RARV tier; set explicitly (`lite` / `full` / `ultra`) to override the inference. |
622
- | `LOKI_CONFIDENCE_SPIKE` | `1` (on) | Forces one EXTRA verification pass when the agent's self-reported confidence spikes, instead of trusting the claim. Strictly additive -- it can never skip a gate. Set `0` to opt out; tune with `LOKI_CONFIDENCE_SPIKE_DELTA` (default `40`) and `LOKI_CONFIDENCE_SPIKE_MIN` (default `90`). |
623
- | `LOKI_GOAL_SCORING` | `1` (on) | Flags a goal with no measurable success condition and asks for a threshold, metric, or concrete artifact. Advisory only -- never blocks a build or rewrites the goal. Set `0` to opt out. |
624
- | `LOKI_SMART_RETRY` | `1` (on) | Stops early on a positively-identified permanent failure (bad credentials, unknown model, exhausted quota) rather than burning retries. Unrecognized errors and rate limits still retry as before. Set `0` to retry every failure. |
625
- | `LOKI_SIMPLE` | `0` (off) | EXPERIMENTAL. Strips the coaching half of the system prompt -- the RARV cycle, SDLC phases and memory habits that a frontier model already does natively. Per-iteration state (which gate failed, self-heal output, checklist status) is never touched, because that is information the model cannot derive. Measured at -78% prompt size, ~1562 tokens per iteration, on both the bash and Bun routes. INERT on degraded providers (Codex, Aider): those take an earlier return path whose prompt is already minimal by design, so the flag has nothing to strip there -- a measured zero, not an untested case. Whether it changes build speed or quality is NOT yet measured, so treat it as an experiment, not a tuning knob: run `benchmarks/run-prompt-ablation.sh` on your own workload before adopting it. |
626
-
627
- This is a subset. See the [wiki](wiki/Home.md) for the full env-var reference and the RARV-C closure knobs (`LOKI_INJECT_FINDINGS`, `LOKI_OVERRIDE_COUNCIL`, `LOKI_AUTO_LEARNINGS`, `LOKI_HANDOFF_MD`).
628
-
629
- </details>
630
-
631
- <details>
632
- <summary><strong>BMAD Method Integration (legacy engine, being removed)</strong></summary>
633
-
634
- Loki Mode integrates with the [BMAD Method](https://github.com/bmad-code-org/BMAD-METHOD), a structured AI-driven agile methodology. If your project uses BMAD for requirements elicitation, Loki Mode can consume those artifacts directly:
635
-
636
- ```bash
637
- loki start --bmad-project ./my-project
638
- ```
639
-
640
- The adapter handles BMAD's frontmatter conventions, FR-format functional requirements, Given/When/Then acceptance criteria, and artifact chain validation. Non-BMAD projects are unaffected -- the integration is opt-in via `--bmad-project`.
641
-
642
- See [BMAD Integration Validation](docs/architecture/bmad-integration-validation.md).
643
-
644
- </details>
645
-
646
- <details>
647
- <summary><strong>Enterprise Features</strong></summary>
648
-
649
- Enterprise features are free, included, and need no license key. They are activated with env vars. (Legacy engine surface, being removed with it.)
650
-
651
- ```bash
652
- export LOKI_ENTERPRISE_AUTH=true # token auth (dashboard/auth.py)
653
- export LOKI_OIDC_ISSUER=https://accounts.google.com
654
- export LOKI_OIDC_CLIENT_ID=your-client-id # OIDC needs issuer + client id
655
- export LOKI_ENTERPRISE_AUDIT=true # force audit logging on
656
- export LOKI_TLS_CERT=/path/cert.pem # HTTPS: set BOTH cert and key
657
- export LOKI_TLS_KEY=/path/key.pem
658
- loki enterprise status
659
- ```
660
-
661
- [Enterprise Architecture](docs/enterprise/architecture.md) | [Security](docs/enterprise/security.md) | [Authentication](docs/authentication.md) | [Authorization](docs/authorization.md) | [Metrics](docs/metrics.md) | [Audit Logging](docs/audit-logging.md)
662
-
663
- </details>
664
-
665
-
666
- ---
667
-
668
- ## Limitations
669
-
670
- | Area | What Works | What Doesn't (Yet) |
671
- |------|-----------|---------------------|
672
- | **Code Gen** | Full-stack apps from PRDs | Complex domain logic may need human review |
673
- | **Deploy** | Generates configs, Dockerfiles, CI/CD; `loki deploy` prints the exact deploy command | Does not deploy: a human runs the printed command (Loki never runs a cloud CLI or git push) |
674
- | **Testing** | 8 automated quality gates | Test quality depends on AI assertions |
675
- | **Providers** | Claude, Cline, Codex, Aider and opencode | Non-Claude providers are experimental and mostly sequential |
676
- | **Dashboard** | Real-time single-machine monitoring | No multi-node clustering |
677
- | **Loki 10** | The v10 run (`loki "<task>"`, `loki owner/repo#N`, `loki quick`), `status`, `verify`, `backlog` | `loki start <issue ref|issue URL|"task">` runs Loki 10, `loki start <file>` stays legacy; `loki modernize <repo> --to` runs `--dry-run` only; two-way Slack is on by default (`loki slack serve`, `LOKI_SLACK_INBOUND=0` disables); Control Plane v0 is a preview |
678
-
679
- > **What "autonomous" means:** the system runs RARV cycles without prompting. It does NOT access your cloud accounts, payment systems or external services unless you provide credentials. Human oversight is expected for deployment, API keys and critical decisions.
680
-
681
- ---
682
-
683
- ## Research Foundation
684
-
685
- <details>
686
- <summary><strong>Papers and sources</strong></summary>
687
-
688
- | Source | What We Use |
689
- |--------|-------------|
690
- | [Anthropic: Building Effective Agents](https://www.anthropic.com/research/building-effective-agents) | Evaluator-optimizer, parallelization |
691
- | [Anthropic: Constitutional AI](https://www.anthropic.com/research/constitutional-ai-harmlessness-from-ai-feedback) | Self-critique against quality principles |
692
- | [DeepMind: Scalable Oversight via Debate](https://deepmind.google/research/publications/34920/) | Debate-based verification in council review |
693
- | [DeepMind: SIMA 2](https://deepmind.google/blog/sima-2-an-agent-that-plays-reasons-and-learns-with-you-in-virtual-3d-worlds/) | Self-improvement loop design |
694
- | [OpenAI: Agents SDK](https://openai.github.io/openai-agents-python/) | Guardrails, tripwires, tracing |
695
- | [NVIDIA ToolOrchestra](https://github.com/NVlabs/ToolOrchestra) | Efficiency metrics, reward signals |
696
- | [CONSENSAGENT (ACL 2025)](https://aclanthology.org/2025.findings-acl.1141/) | Anti-sycophancy in blind review |
697
- | [GoalAct](https://arxiv.org/abs/2504.16563) | Hierarchical planning for complex PRDs |
698
-
699
- **Practitioner insights:** Boris Cherny, Simon Willison, [HN Community](https://news.ycombinator.com/item?id=44623207)
700
-
701
- **[Full Acknowledgements](docs/ACKNOWLEDGEMENTS.md)** -- 50+ papers and resources
702
-
703
- </details>
704
-
705
- ---
124
+ - [Installation](docs/INSTALLATION.md), [environment variables](docs/environment-variables.md), [exit codes](docs/exit-codes.md), [known issues](docs/KNOWN-ISSUES.md), [privacy and telemetry](docs/PRIVACY.md)
125
+ - Agent Change Receipt format: [docs/AGENT-CHANGE-RECEIPT.md](docs/AGENT-CHANGE-RECEIPT.md)
126
+ - Issue to PR from GitHub Actions, no hosted service: [docs/examples/loki-issue-to-pr.yml.example](docs/examples/loki-issue-to-pr.yml.example)
127
+ - Jira and Linear intake: [docs/trackers.md](docs/trackers.md). Two-way Slack: [docs/slack.md](docs/slack.md). Multi-repo runs: [docs/WORKSPACES.md](docs/WORKSPACES.md)
128
+ - MCP: the bundled server exposes 47 tools over stdio (`loki mcp`), including starting a run, reading its status and verifying its receipt.
129
+ - Claude Code plugin: `claude plugin marketplace add asklokesh/loki-mode`, then `claude plugin install loki-mode@loki-mode`. The same marketplace ships [loki-seal](packages/loki-seal/README.md), a Stop hook that refuses "done" when tests newly fail or were weakened.
130
+ - Architecture: [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md). Upgrading: [UPGRADING.md](UPGRADING.md)
706
131
 
707
132
  ## Contributing
708
133
 
709
134
  ```bash
710
135
  git clone https://github.com/asklokesh/loki-mode.git && cd loki-mode
711
- npm install && npm test # CLI + Node test suites
712
- python3 -m pytest # Python test suite
136
+ npm install && npm test
713
137
  ```
714
138
 
715
- See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
139
+ See [CONTRIBUTING.md](.github/CONTRIBUTING.md), [TESTING.md](docs/TESTING.md) and the [Code of Conduct](.github/CODE_OF_CONDUCT.md).
716
140
 
717
141
  ## License
718
142
 
719
- [Business Source License 1.1](LICENSE) -- Free for personal, internal, academic, and non-commercial use. Converts to Apache 2.0 on March 19, 2030. Contact founder@autonomi.dev for other licensing arrangements.
720
-
721
- ---
722
-
723
- <div align="center">
724
-
725
- **[Autonomi](https://www.autonomi.dev/)** | **[Documentation](wiki/Home.md)** | **[Changelog](CHANGELOG.md)** | **[Comparisons](references/competitive-analysis.md)**
143
+ [Business Source License 1.1](LICENSE). Free for personal, internal, academic and non-commercial use; it converts to Apache 2.0 on March 19, 2030. Contact founder@autonomi.dev for other arrangements.
726
144
 
727
- </div>
145
+ Loki Mode is built by [Autonomi](https://www.autonomi.dev/).