loki-mode 11.2.2 → 11.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/README.md +68 -650
  2. package/SKILL.md +4 -4
  3. package/VERSION +1 -1
  4. package/autonomy/completion-council.sh +2 -2
  5. package/autonomy/context-tracker.py +4 -4
  6. package/autonomy/council-v2.sh +1 -1
  7. package/autonomy/grill.sh +1 -1
  8. package/autonomy/lib/done-recognition.sh +1 -1
  9. package/autonomy/lib/prd-enrich.sh +1 -1
  10. package/autonomy/lib/skill-link-heal.sh +78 -1
  11. package/autonomy/lib/voter-agents.sh +1 -1
  12. package/autonomy/loki +99 -75
  13. package/autonomy/run.sh +30 -18
  14. package/autonomy/sandbox.sh +1 -1
  15. package/autonomy/tui.sh +6 -5
  16. package/autonomy/verify.sh +1 -1
  17. package/bin/loki +166 -59
  18. package/completions/_loki +2 -0
  19. package/completions/loki.bash +2 -2
  20. package/dashboard/__init__.py +1 -1
  21. package/dashboard/server.py +25 -31
  22. package/docs/ARCHITECTURE.md +337 -0
  23. package/docs/BRANDING.md +124 -0
  24. package/docs/CLI-REFERENCE.md +7 -1
  25. package/docs/COMPONENTS.md +447 -0
  26. package/docs/DEPLOYMENT.md +9 -9
  27. package/docs/DOCKER.md +469 -0
  28. package/docs/INSTALLATION.md +67 -1045
  29. package/docs/KNOWN-ISSUES.md +11 -35
  30. package/docs/TESTING.md +161 -0
  31. package/docs/air-gapped.md +1 -2
  32. package/docs/alternative-installations.md +14 -24
  33. package/docs/architecture/DECISIONS.md +333 -0
  34. package/docs/audit-logging.md +7 -7
  35. package/docs/authentication.md +3 -3
  36. package/docs/authorization.md +1 -1
  37. package/docs/certification/04-production-deployment/lab.md +6 -6
  38. package/docs/certification/04-production-deployment/lesson.md +4 -4
  39. package/docs/certification/README.md +1 -1
  40. package/docs/control-plane-container.md +2 -2
  41. package/docs/dev/real-run.md +34 -0
  42. package/docs/dev/release-checklist.md +2 -2
  43. package/docs/exit-codes.md +3 -3
  44. package/docs/git-workflow.md +3 -3
  45. package/docs/metrics.md +37 -55
  46. package/docs/network-security.md +1 -1
  47. package/docs/siem-integration.md +5 -5
  48. package/docs/v10/CLI-MODERN.md +4 -3
  49. package/docs/v10/DECISIONS.md +44 -0
  50. package/docs/v10/DEPS.md +22 -22
  51. package/docs/v10/ENGINE.md +1 -1
  52. package/docs/v10/FAILURE-CLASSES.md +129 -1
  53. package/docs/v10/FOUNDER-QUEUE.md +1 -0
  54. package/docs/v10/GUARDS.md +13 -0
  55. package/docs/v10/LEGACY-REMOVAL.md +4 -6
  56. package/docs/v10/METRICS.md +2 -2
  57. package/docs/v10/MODERNIZE.md +1 -1
  58. package/docs/v10/OPERATING-MODEL.md +2 -1
  59. package/docs/v10/PROGRESS.md +29 -0
  60. package/docs/v11/COST-HALF.md +352 -0
  61. package/docs/v11/MARKET-SLICES.md +315 -0
  62. package/docs/v11/REGISTRIES.md +730 -0
  63. package/loki-ts/data/model-pricing.json +52 -24
  64. package/loki-ts/dist/loki.js +1036 -957
  65. package/mcp/__init__.py +1 -1
  66. package/package.json +1 -1
  67. package/packages/control-plane/dist/server.js +2467 -736
  68. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  69. package/src/protocols/mcp-client.js +6 -2
  70. package/src/protocols/mcp-server.js +13 -3
  71. package/tools/audit-docs.py +1 -1
  72. package/web-app/dist/assets/{AdminPage-C-iMLNxe.js → AdminPage-CMkHNJbF.js} +1 -1
  73. package/web-app/dist/assets/{Avatar-C7VUvwsO.js → Avatar-BJyjV7Zi.js} +1 -1
  74. package/web-app/dist/assets/{Badge-tGvQEhnw.js → Badge-D572l0uq.js} +1 -1
  75. package/web-app/dist/assets/{Button-_iHlH_yL.js → Button-T4BnOZgl.js} +1 -1
  76. package/web-app/dist/assets/{CockpitPage-J_nNjbcR.js → CockpitPage-Cj_GFsNn.js} +1 -1
  77. package/web-app/dist/assets/{ComparePage-B05ui6Xt.js → ComparePage-A8m4ZXak.js} +1 -1
  78. package/web-app/dist/assets/{ErrorBoundary-Bxex6DLn.js → ErrorBoundary-hugCg5yg.js} +1 -1
  79. package/web-app/dist/assets/{EvidenceReceiptPanel-BsgWfdD1.js → EvidenceReceiptPanel-CuJKDC2G.js} +1 -1
  80. package/web-app/dist/assets/{GitHubIssuesPanel-DZBhZ8_X.js → GitHubIssuesPanel-BYGKjarC.js} +1 -1
  81. package/web-app/dist/assets/{GitHubPRsPanel-BaxlAl6R.js → GitHubPRsPanel-c7sFIJlf.js} +1 -1
  82. package/web-app/dist/assets/{HomePage-mVJvzqbF.js → HomePage-A1MIkG2P.js} +2 -2
  83. package/web-app/dist/assets/{LoginPage-B0zd4A_G.js → LoginPage-8KQMRhtR.js} +1 -1
  84. package/web-app/dist/assets/{MagicPage-DXLQ-y_R.js → MagicPage-C05QW2Lx.js} +1 -1
  85. package/web-app/dist/assets/{MetricsPage-CLS34Xvr.js → MetricsPage-Oukv5hme.js} +1 -1
  86. package/web-app/dist/assets/{NotFoundPage-BXG8PbNV.js → NotFoundPage-DKIwsawz.js} +1 -1
  87. package/web-app/dist/assets/{ProjectPage-D3kFFC0F.js → ProjectPage-DwFRPLCG.js} +3 -3
  88. package/web-app/dist/assets/{ProjectsPage-2bFn-gnC.js → ProjectsPage-CgY4YYDX.js} +1 -1
  89. package/web-app/dist/assets/{SettingsPage-CBM0ziWE.js → SettingsPage-BpfcSjUA.js} +1 -1
  90. package/web-app/dist/assets/{ShowcasePage-BTaXhjI3.js → ShowcasePage-BqBakC4K.js} +1 -1
  91. package/web-app/dist/assets/{SystemSettingsPage-BrC2hyAr.js → SystemSettingsPage-CZLu5VB0.js} +1 -1
  92. package/web-app/dist/assets/{TeamsPage-oqxdbVbY.js → TeamsPage-D55S1jKz.js} +1 -1
  93. package/web-app/dist/assets/{TemplatesPage-CEbUIY21.js → TemplatesPage-D3SydvxN.js} +1 -1
  94. package/web-app/dist/assets/{TerminalOutput-aIoWLbJA.js → TerminalOutput-hNg8G1-e.js} +1 -1
  95. package/web-app/dist/assets/{activity-CPyi45gt.js → activity-D2C0VagO.js} +1 -1
  96. package/web-app/dist/assets/{bell-BhaNBaJp.js → bell-CMvYi36w.js} +1 -1
  97. package/web-app/dist/assets/{bot-Da8REaEP.js → bot-BvtQ6lmo.js} +1 -1
  98. package/web-app/dist/assets/{check-DPj99ArM.js → check-B13xkXed.js} +1 -1
  99. package/web-app/dist/assets/{chevron-left-CkxonN0X.js → chevron-left-emu6r49E.js} +1 -1
  100. package/web-app/dist/assets/{circle-alert-C0JkB1y5.js → circle-alert-CExlwjuy.js} +1 -1
  101. package/web-app/dist/assets/{clock-COzFIiWi.js → clock-D7Uas3oL.js} +1 -1
  102. package/web-app/dist/assets/{cloud-bjkac4kn.js → cloud-CkB4S86C.js} +1 -1
  103. package/web-app/dist/assets/{code-xml-hlKlvXUJ.js → code-xml-SL9IIWIn.js} +1 -1
  104. package/web-app/dist/assets/{database-D555S5Km.js → database-BQFkd7t1.js} +1 -1
  105. package/web-app/dist/assets/{dollar-sign-CVcApzcD.js → dollar-sign-qHmnNYsU.js} +1 -1
  106. package/web-app/dist/assets/{file-code-corner-UORaMIcO.js → file-code-corner-C2YUDP0K.js} +1 -1
  107. package/web-app/dist/assets/{file-plus-ALJtDoI2.js → file-plus-C_ooIkDe.js} +1 -1
  108. package/web-app/dist/assets/{globe-CPlrM_IC.js → globe-CQ-GL485.js} +1 -1
  109. package/web-app/dist/assets/{hammer-qaGZHpja.js → hammer-U05L_D7V.js} +1 -1
  110. package/web-app/dist/assets/{index-BcXljIAO.js → index-CooHd7I-.js} +3 -3
  111. package/web-app/dist/assets/{layers-BV8R9VUK.js → layers-Buo17rjW.js} +1 -1
  112. package/web-app/dist/assets/{loader-circle-6TlDS9Tu.js → loader-circle-15vK3oV1.js} +1 -1
  113. package/web-app/dist/assets/{lock-B9t6oWI0.js → lock-BeXLebuJ.js} +1 -1
  114. package/web-app/dist/assets/{package-2gEUAtZJ.js → package-MVh_6-6R.js} +1 -1
  115. package/web-app/dist/assets/{plus-DXocxPjU.js → plus-Dh_nd9vS.js} +1 -1
  116. package/web-app/dist/assets/{refresh-cw-D3dWHBd6.js → refresh-cw-C9cBJEAT.js} +1 -1
  117. package/web-app/dist/assets/{rotate-ccw-CvuWqaSB.js → rotate-ccw-D3PAtzST.js} +1 -1
  118. package/web-app/dist/assets/{scroll-text-ktmD_xJY.js → scroll-text-DZCoXQjo.js} +1 -1
  119. package/web-app/dist/assets/{server-E7pZtj5A.js → server-OCOLI5J_.js} +1 -1
  120. package/web-app/dist/assets/{shield-alert-968j9z0V.js → shield-alert-oVhmf1_h.js} +1 -1
  121. package/web-app/dist/assets/{thumbs-up-Tz_8rpU_.js → thumbs-up-B-kbX4vN.js} +1 -1
  122. package/web-app/dist/assets/{trash-2-Drh9IIj8.js → trash-2-EL6moveW.js} +1 -1
  123. package/web-app/dist/assets/{trending-down-DCQXtVSL.js → trending-down-Cl3kjpsx.js} +1 -1
  124. package/web-app/dist/assets/{trending-up-BIiwQbWV.js → trending-up-DST7I6M2.js} +1 -1
  125. package/web-app/dist/assets/{upload-sCbPkfmy.js → upload-CUOT780G.js} +1 -1
  126. package/web-app/dist/assets/{usePolling-BMIg6ZVT.js → usePolling-Djmt90eb.js} +1 -1
  127. package/web-app/dist/assets/{user-kGzXC3V2.js → user-BRBohA6J.js} +1 -1
  128. package/web-app/dist/index.html +1 -1
  129. package/docs/ARCHITECTURE-OVERVIEW.md +0 -209
  130. package/docs/AUTONOMI-ECOSYSTEM.md +0 -107
  131. package/docs/COCKPIT-SPEC.md +0 -72
  132. package/docs/COCKPIT-UX-MANDATE.md +0 -53
  133. package/docs/COMPETITIVE-ANALYSIS.md +0 -303
  134. package/docs/COMPETITIVE-NEXT-10.md +0 -316
  135. package/docs/COMPETITIVE-RALPH-ZEROSHOT-2026-07-08.md +0 -81
  136. package/docs/DASHBOARD-9.12-EVIDENCE.md +0 -97
  137. package/docs/DASHBOARD-ARCHITECTURE.md +0 -425
  138. package/docs/DASHBOARD_V2_CHECKLIST.md +0 -243
  139. package/docs/DEMOS.md +0 -63
  140. package/docs/ENTERPRISE-IDENTITY-ROADMAP.md +0 -206
  141. package/docs/EVIDENCE-RECEIPT-BUILD-APPLICABILITY.md +0 -79
  142. package/docs/FEAT-PRDREUSE-DOCKER-PLAN.md +0 -144
  143. package/docs/GATE-FAILURE-TRIAGE.md +0 -254
  144. package/docs/HANDOFF-2026-08-03.md +0 -439
  145. package/docs/LOOP-CANDIDATE-PROPOSAL-v1.md +0 -167
  146. package/docs/LOOP-HARNESS-AUDIT.md +0 -684
  147. package/docs/MERGE-DEDUP-MAP.md +0 -420
  148. package/docs/MERGE-ROUTE-MAP.md +0 -139
  149. package/docs/MODEL-REGISTRY-PLAN.md +0 -155
  150. package/docs/OUTCOME-FRONTIER.md +0 -536
  151. package/docs/P2-SPEC-ROBUSTNESS-PLAN.md +0 -192
  152. package/docs/PLANS-INDEX.md +0 -32
  153. package/docs/PRD-REUSE-DONE-RECOGNITION-PLAN.md +0 -536
  154. package/docs/PROMPT-ABLATION-RESULT.md +0 -97
  155. package/docs/R4-TRUST-TRAJECTORY-DESIGN.md +0 -127
  156. package/docs/R5-AUTO-WIKI-DESIGN.md +0 -137
  157. package/docs/R6-ROLLBACK-CHECKPOINT-PLAN.md +0 -107
  158. package/docs/R7-ZERO-CONFIG-FIRST-RUN-PLAN.md +0 -137
  159. package/docs/R8-SHAREABLE-TEAM-ASSETS-PLAN.md +0 -129
  160. package/docs/R9-OPEN-CORE-HOOKS-PLAN.md +0 -113
  161. package/docs/RARV-C-100X-PLAN.md +0 -286
  162. package/docs/RARV-C-LOOP-EFFICIENCY-PLAN.md +0 -470
  163. package/docs/SHAREABLE-PROOF-PLAN.md +0 -194
  164. package/docs/SONNET5-DEFAULT-PLAN.md +0 -157
  165. package/docs/SPEED-AND-FIRST-PASS-PLAN.md +0 -281
  166. package/docs/STALE-STATE-AUDIT.md +0 -174
  167. package/docs/SYNERGY-TASKS.md +0 -143
  168. package/docs/TASKLIST-ACCURACY-PLAN.md +0 -355
  169. package/docs/TOP-100-BACKLOG.md +0 -159
  170. package/docs/V8-ACCEPTANCE-TRIAGE-2026-07-24.md +0 -114
  171. package/docs/V8-COMPLEXITY-AUDIT-2026-07-24.md +0 -45
  172. package/docs/V8-MAJOR-RELEASE-PLAN.md +0 -137
  173. package/docs/V8-OVERNIGHT-PLAN-2026-07-25.md +0 -82
  174. package/docs/V8-SDK-RESEARCH-RAW.md +0 -129
  175. package/docs/WELCOME-OPENER-PLAN.md +0 -106
  176. package/docs/adoption-baseline-2026-07-31.md +0 -84
  177. package/docs/architecture/bmad-integration-epic.md +0 -271
  178. package/docs/architecture/bmad-integration-review.md +0 -86
  179. package/docs/architecture/bmad-integration-validation.md +0 -249
  180. package/docs/architecture/bmad-loki-voice-agent-council-analysis.md +0 -61
  181. package/docs/auto-claude-comparison.md +0 -250
  182. package/docs/bug-fixes/agent-01-cli-fixes.md +0 -101
  183. package/docs/bug-fixes/agent-02-purplelab-fixes.md +0 -88
  184. package/docs/bug-fixes/agent-03-dashboard-fixes.md +0 -119
  185. package/docs/bug-fixes/agent-04-memory-fixes.md +0 -105
  186. package/docs/bug-fixes/agent-05-provider-fixes.md +0 -86
  187. package/docs/bug-fixes/agent-06-integration-fixes.md +0 -101
  188. package/docs/bug-fixes/agent-07-dash-run-fixes.md +0 -101
  189. package/docs/bug-fixes/agent-08-docker-fixes.md +0 -164
  190. package/docs/bug-fixes/agent-09-e2e-build-fixes.md +0 -69
  191. package/docs/bug-fixes/agent-10-e2e-fullstack-fixes.md +0 -102
  192. package/docs/bug-fixes/agent-11-e2e-session-fixes.md +0 -70
  193. package/docs/bug-fixes/agent-12-scenario-fixes.md +0 -120
  194. package/docs/bug-fixes/agent-13-enterprise-fixes.md +0 -143
  195. package/docs/bug-fixes/agent-14-uat-newuser-fixes.md +0 -88
  196. package/docs/bug-fixes/agent-15-uat-poweruser-fixes.md +0 -132
  197. package/docs/bug-fixes/agent-19-code-review.md +0 -316
  198. package/docs/bug-fixes/agent-20-architecture-review.md +0 -331
  199. package/docs/competitive/bolt-new-analysis.md +0 -579
  200. package/docs/competitive/emergence-others-analysis.md +0 -605
  201. package/docs/competitive/replit-lovable-analysis.md +0 -622
  202. package/docs/dashboard-guide.md +0 -487
  203. package/docs/enterprise/migration.md +0 -265
  204. package/docs/history/one-run-audit.md +0 -304
  205. package/docs/plans/FORGE-AUTONOMOUS-QUEUE.md +0 -312
  206. package/docs/plans/ULTRAPLAN-FORGE-BAAS.md +0 -612
  207. package/docs/plans/UT2-6-LSP-DIAGNOSTIC-BROADCAST.md +0 -394
  208. package/docs/prd-purple-lab-ide.md +0 -152
  209. package/docs/prd-purple-lab-platform-v2.md +0 -223
  210. package/docs/prd-purple-lab-platform.md +0 -319
  211. package/docs/retrospectives/v7.5.15-fleet-postmortem.md +0 -325
  212. package/docs/retrospectives/v7.5.15-honesty-audit.md +0 -136
  213. package/docs/retrospectives/v7.5.15-llm-failure-modes.md +0 -49
  214. package/docs/show-hn-post.md +0 -46
  215. package/docs/test-scenarios/enterprise-scenarios.md +0 -732
  216. package/docs/thick2thin.md +0 -173
package/docs/DOCKER.md ADDED
@@ -0,0 +1,469 @@
1
+ # Loki Mode
2
+
3
+ **Multi-agent autonomous development system. Takes a spec to a deployed product with minimal human intervention.**
4
+
5
+ Transform your spec into a fully built, production-ready product. Built on 2025 research from OpenAI, Google DeepMind, and Anthropic. Source-available under BUSL-1.1.
6
+
7
+ The image ships the Claude Code CLI pre-installed, so it can run real builds out of the box. Just supply credentials (see Authentication below).
8
+
9
+ Docker is where sandboxes and runs happen. `loki docker` gives you the full local experience in one command (including `.loki/` state, resume, and continuity), so start there. The raw `docker run` and `docker compose` methods below remain available as alternatives.
10
+
11
+ ## Quick Start (loki docker, easiest)
12
+
13
+ If you already have loki installed on the host (npm/brew/bun) plus Docker, `loki docker` is the simplest way to run loki in a container. It is a thin host wrapper around the published image: it runs any loki command inside `asklokesh/loki-mode` with zero config.
14
+
15
+ ```bash
16
+ # Run a build against a spec in the current directory
17
+ loki docker start prd.md
18
+
19
+ # Any loki command works
20
+ loki docker status
21
+
22
+ # Print the docker command it would run, without running it
23
+ loki docker --dry-run start prd.md
24
+ ```
25
+
26
+ What it does for you automatically:
27
+
28
+ - Bind-mounts the current folder to `/workspace`, so `.loki/` state (memory, session, queue, checkpoints) persists on the host. Resume and continuity behave exactly like the local `loki` CLI. Stop a build and run `loki docker start prd.md` again later and it resumes with full memory and session continuity.
29
+ - Auto-detects auth, in this order:
30
+ 1. `ANTHROPIC_API_KEY` if set in your environment (explicit), else
31
+ 2. your host's existing Claude Code login (macOS Keychain, or `~/.claude/.credentials.json` on Linux), extracted to a private temp file and mounted read-write so the in-container claude can refresh the short-lived token. A Claude Code Max/Pro subscriber needs no API key; it just reuses the login. Else
32
+ 3. an honest error with setup guidance.
33
+ - Forwards `~/.gitconfig` and `~/.config/gh` (read-only) plus `GITHUB_TOKEN`/`GH_TOKEN` if set, so commits and PRs work like local.
34
+ - Registers the project with the host dashboard, so one host `loki dashboard` shows all your `loki docker` and local `loki start` projects in a single unified view (see "Run loki in multiple repos" below). Builds run with the dashboard off by default; add `--api` to publish port 57374 for a single run.
35
+
36
+ Flags:
37
+
38
+ | Flag | Description |
39
+ |------|-------------|
40
+ | `--image IMG` | Override the image (default `asklokesh/loki-mode:latest`) |
41
+ | `--dry-run` | Print the docker command that would run, then exit |
42
+
43
+ The credentials temp file used for Auth method 2 is created with `0600` permissions and wiped on exit. It is never written into the project, never committed, never logged.
44
+
45
+ Requirements: loki installed on the host (npm/brew/bun) plus Docker. `loki docker` is a host wrapper; it does not bundle the image, it pulls/runs the published one.
46
+
47
+ ### Run loki in multiple repos (unified dashboard)
48
+
49
+ `loki docker` is a first-class multi-repo surface, just like the host CLI. You can run `loki docker start` in several different folders at once:
50
+
51
+ ```bash
52
+ cd ~/work/api && loki docker start prd.md
53
+ cd ~/work/frontend && loki docker start prd.md
54
+ cd ~/work/cli && loki docker start prd.md
55
+ ```
56
+
57
+ Each repo gets its own container (deterministic name `loki-<hash-of-path>`), its own bind-mounted `/workspace`, and its own `.loki/` state on the host, so two repos run as two concurrent containers without colliding on a shared port.
58
+
59
+ Every `loki docker` project registers on the host (with its real folder path) into the same machine-global registry the host dashboard reads. So one host dashboard shows them all:
60
+
61
+ ```bash
62
+ loki dashboard # on the host -- lists ALL projects
63
+ ```
64
+
65
+ The host `loki dashboard` lists every project whether it runs via local `loki start` or via `loki docker start`, and derives each project's running state from its bind-mounted `.loki/session.json`. One dashboard, all repos, same as the local CLI experience.
66
+
67
+ Note: `loki docker` builds run with the dashboard off by default (so concurrent runs never fight over port 57374). The unified view is the host `loki dashboard`. To bring up the dashboard for a single containerized run instead, use `loki docker start --api prd.md`, which publishes port 57374 for that one container.
68
+
69
+ Stopping a containerized build: the dashboard Stop button (and `loki stop`) signals a `loki docker` project by writing `.loki/STOP` into the bind-mounted workspace, which the in-container runner honors at the next iteration boundary. So Stop is reliable but not instant for Docker projects: a build can take up to one provider iteration to wind down, versus the immediate signal a host process receives. To stop a container immediately, use `docker stop loki-<hash-of-path>`.
70
+
71
+ ## Quick Start (docker compose)
72
+
73
+ If you prefer not to install loki on the host, `docker compose` runs Loki from the image directly. You set credentials once in a `.env` file and never retype long flags.
74
+
75
+ ```bash
76
+ # 1. Get the repo (provides docker/docker-compose.yml and docker/.env.example)
77
+ git clone https://github.com/asklokesh/loki-mode.git
78
+ cd loki-mode
79
+
80
+ # 2. Copy the env template and set your key
81
+ cp docker/.env.example .env
82
+ # edit .env, set ANTHROPIC_API_KEY=sk-ant-...
83
+
84
+ # 3. Run a build against a spec in the current directory
85
+ docker compose -f docker/docker-compose.yml run loki start prd.md
86
+ ```
87
+
88
+ To change anything (budget, provider, max iterations), edit `.env` and run the command again. No flags to retype.
89
+
90
+ For a mounted config file instead of a long `.env`, pass `loki start --config /path/to/config.yaml` (also accepts `.json`/`.env`; secrets via `${VAR}`). See "Configuration file" in [docs/INSTALLATION.md](INSTALLATION.md).
91
+
92
+ With the dashboard UI:
93
+
94
+ ```bash
95
+ docker compose -f docker/docker-compose.yml run --service-ports loki start --api prd.md
96
+ # Dashboard at http://localhost:57374
97
+ ```
98
+
99
+ ## Quick Start (docker run)
100
+
101
+ If you prefer `docker run`, pass the key as an environment variable:
102
+
103
+ ```bash
104
+ # Pull the latest image
105
+ docker pull asklokesh/loki-mode:latest
106
+
107
+ # Show help
108
+ docker run --rm asklokesh/loki-mode
109
+
110
+ # Start autonomous mode with a spec
111
+ docker run -it \
112
+ -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
113
+ -v "$(pwd)":/workspace \
114
+ asklokesh/loki-mode start prd.md
115
+
116
+ # With dashboard UI
117
+ docker run -it \
118
+ -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
119
+ -p 57374:57374 \
120
+ -v "$(pwd)":/workspace \
121
+ asklokesh/loki-mode start --api prd.md
122
+ # Dashboard at http://localhost:57374
123
+ ```
124
+
125
+ ## Authentication
126
+
127
+ Loki uses Claude (the only provider pre-installed in the image). There are two ways to authenticate.
128
+
129
+ ### Method 1: API key (default, recommended)
130
+
131
+ Set `ANTHROPIC_API_KEY`. Get a key from https://console.anthropic.com/settings/keys.
132
+
133
+ With compose, put it in `.env`:
134
+
135
+ ```bash
136
+ # .env
137
+ ANTHROPIC_API_KEY=sk-ant-...
138
+ ```
139
+
140
+ With `docker run`, pass it directly:
141
+
142
+ ```bash
143
+ docker run -it \
144
+ -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
145
+ -v "$(pwd)":/workspace \
146
+ asklokesh/loki-mode start prd.md
147
+ ```
148
+
149
+ ### Method 2: Mount host OAuth credentials (Claude Max/Pro subscribers, no API key)
150
+
151
+ If you have a Claude Code Max or Pro subscription and no API key, mount your host login credentials into the container.
152
+
153
+ macOS (credentials live in the Keychain, export them to a file first):
154
+
155
+ ```bash
156
+ security find-generic-password -s "Claude Code-credentials" -w \
157
+ | jq '{claudeAiOauth}' > .loki-oauth-credentials.json
158
+
159
+ docker run -it \
160
+ -v "$(pwd)/.loki-oauth-credentials.json:/home/loki/.claude/.credentials.json:rw" \
161
+ -v "$(pwd)":/workspace \
162
+ asklokesh/loki-mode start prd.md
163
+ ```
164
+
165
+ Linux (credentials are already a file at `~/.claude/.credentials.json`, mount it directly):
166
+
167
+ ```bash
168
+ docker run -it \
169
+ -v ~/.claude/.credentials.json:/home/loki/.claude/.credentials.json:rw \
170
+ -v "$(pwd)":/workspace \
171
+ asklokesh/loki-mode start prd.md
172
+ ```
173
+
174
+ For compose, uncomment the OAuth-mount volume line in `docker/docker-compose.yml`.
175
+
176
+ Notes for Method 2:
177
+ - The mount must be `rw` so refreshed tokens persist back to the host file.
178
+ - Never commit `.loki-oauth-credentials.json`. It contains a live token.
179
+ - Tokens are short-lived (hours). If a container sits idle past expiry, re-export the file before the next run.
180
+
181
+ ## State and Memory Persistence
182
+
183
+ Loki writes its state to `.loki/` inside `/workspace` (memory, session, queue, checkpoints). Because the project directory is bind-mounted to `/workspace`, that state lives on your host and persists across runs. Stop a build and start it again later and it resumes with full memory and session continuity.
184
+
185
+ ## Image Details
186
+
187
+ | Property | Value |
188
+ |----------|-------|
189
+ | Base | Ubuntu 24.04 |
190
+ | User | `loki` (UID 1000, non-root) |
191
+ | Workdir | `/workspace` |
192
+ | CMD | `loki help` |
193
+ | Exposed Port | `57374` (Dashboard/API) |
194
+ | Node.js | 20 LTS |
195
+ | Python | 3.x (for dashboard server) |
196
+ | GitHub CLI | v2.65.0 |
197
+ | Claude Code CLI | pre-installed |
198
+
199
+ ## Usage Examples
200
+
201
+ ```bash
202
+ # Interactive shell
203
+ docker run -it -v "$(pwd)":/workspace asklokesh/loki-mode bash
204
+
205
+ # Background autonomous mode
206
+ docker run -d \
207
+ -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
208
+ -v "$(pwd)":/workspace \
209
+ asklokesh/loki-mode start --bg prd.md
210
+
211
+ # Quick single-task mode (max 3 iterations)
212
+ docker run -it \
213
+ -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
214
+ -v "$(pwd)":/workspace \
215
+ asklokesh/loki-mode quick "add login page"
216
+
217
+ # Check status
218
+ docker run -it -v "$(pwd)":/workspace asklokesh/loki-mode status
219
+
220
+ # Build a PRD interactively from templates
221
+ docker run -it -v "$(pwd)":/workspace asklokesh/loki-mode init
222
+
223
+ # Generate PRD from a GitHub issue
224
+ docker run -it \
225
+ -e GITHUB_TOKEN="$GITHUB_TOKEN" \
226
+ -v "$(pwd)":/workspace \
227
+ asklokesh/loki-mode issue https://github.com/org/repo/issues/42
228
+ ```
229
+
230
+ ## Providers
231
+
232
+ Claude is the default provider and the only CLI pre-installed in this image.
233
+
234
+ | Provider | Tier | In this image | Notes |
235
+ |----------|------|---------------|-------|
236
+ | Claude Code | Tier 1 (default) | Yes | Full feature support (subagents, parallel, Task tool, MCP) |
237
+ | OpenAI Codex CLI | Tier 3 | No | Degraded mode (sequential only). Install the CLI in a derived image. |
238
+ | Cline | Tier 2 | No | Reduced parallelism. Install the CLI in a derived image. |
239
+ | Aider | Tier 3 | No | Degraded mode. Install the CLI in a derived image. |
240
+
241
+ To use a Tier 2/3 provider, build a derived image that installs that provider's CLI, then set `LOKI_PROVIDER` and the relevant API key. Example skeleton:
242
+
243
+ ```dockerfile
244
+ FROM asklokesh/loki-mode:latest
245
+ USER root
246
+ # install your provider CLI here (for example, the Codex CLI)
247
+ USER loki
248
+ ```
249
+
250
+ ```bash
251
+ docker run -it \
252
+ -e LOKI_PROVIDER=codex \
253
+ -e OPENAI_API_KEY="$OPENAI_API_KEY" \
254
+ -v "$(pwd)":/workspace \
255
+ your-derived-image start prd.md
256
+ ```
257
+
258
+ ## Volume Mounts
259
+
260
+ | Host Path | Container Path | Mode | Purpose |
261
+ |-----------|---------------|------|---------|
262
+ | Project dir | `/workspace` | `rw` | Source code, PRD files, and persisted `.loki/` state |
263
+ | OAuth credentials | `/home/loki/.claude/.credentials.json` | `rw` | Claude Max/Pro login (Auth Method 2) |
264
+ | `~/.gitconfig` | `/home/loki/.gitconfig` | `ro` | Git configuration |
265
+ | `~/.ssh` | `/home/loki/.ssh` | `ro` | Git SSH authentication |
266
+ | `~/.config/gh` | `/home/loki/.config/gh` | `ro` | GitHub CLI authentication |
267
+
268
+ ```bash
269
+ # Full setup with Git and GitHub access
270
+ docker run -it \
271
+ -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
272
+ -e GITHUB_TOKEN="$GITHUB_TOKEN" \
273
+ -v "$(pwd)":/workspace \
274
+ -v ~/.gitconfig:/home/loki/.gitconfig:ro \
275
+ -v ~/.ssh:/home/loki/.ssh:ro \
276
+ -v ~/.config/gh:/home/loki/.config/gh:ro \
277
+ -p 57374:57374 \
278
+ asklokesh/loki-mode start --api prd.md
279
+ ```
280
+
281
+ > **SSH Note**: Prefer SSH agent forwarding over mounting private keys. Mount only `known_hosts` and public keys when possible.
282
+
283
+ ## Environment Variables
284
+
285
+ ### Credentials
286
+
287
+ | Variable | Description |
288
+ |----------|-------------|
289
+ | `ANTHROPIC_API_KEY` | Anthropic API key (Auth Method 1, default for Claude provider) |
290
+ | `OPENAI_API_KEY` | OpenAI API key (required only for the Codex provider in a derived image) |
291
+ | `GITHUB_TOKEN` | GitHub personal access token |
292
+
293
+ ### Core Configuration
294
+
295
+ | Variable | Description | Default |
296
+ |----------|-------------|---------|
297
+ | `LOKI_PROVIDER` | AI provider: `claude`, `codex`, `cline`, `aider` | `claude` |
298
+ | `LOKI_MAX_ITERATIONS` | Max autonomous iteration cycles | `1000` |
299
+ | `LOKI_MAX_RETRIES` | Max retry attempts per iteration | `50` |
300
+ | `LOKI_DASHBOARD` | Enable dashboard server | `true` |
301
+ | `LOKI_DASHBOARD_PORT` | Dashboard/API port | `57374` |
302
+ | `LOKI_BUDGET_LIMIT` | Max USD spend before auto-pause (e.g. `50.00`) | unset |
303
+ | `LOKI_NOTIFICATIONS` | Desktop notifications | `false` |
304
+
305
+ ### Execution Control
306
+
307
+ | Variable | Description | Default |
308
+ |----------|-------------|---------|
309
+ | `LOKI_AUTONOMY_MODE` | `perpetual`, `checkpoint`, or `supervised` | `perpetual` |
310
+ | `LOKI_COMPLETION_PROMISE` | Stop condition text (AI outputs this to halt) | unset |
311
+ | `LOKI_PARALLEL_MODE` | Enable git worktree parallelism | `false` |
312
+ | `LOKI_MAX_PARALLEL_AGENTS` | Limit concurrent sub-agents | `10` |
313
+ | `LOKI_SKIP_MEMORY` | Skip loading memory context | `false` |
314
+ | `LOKI_SKIP_PREREQS` | Skip prerequisite checks | `false` |
315
+
316
+ ### Security (Enterprise)
317
+
318
+ | Variable | Description | Default |
319
+ |----------|-------------|---------|
320
+ | `LOKI_STAGED_AUTONOMY` | Require approval before each action | `false` |
321
+ | `LOKI_AUDIT_LOG` | Enable audit logging | `true` |
322
+ | `LOKI_ALLOWED_PATHS` | SANDBOX-SCOPED: host paths the sandbox may mount writable (does NOT restrict agent writes) | all |
323
+ | `LOKI_BLOCKED_COMMANDS` | SANDBOX-SCOPED: blocked `loki sandbox run` argv (does NOT filter agent commands) | `rm -rf /,dd if=,mkfs,...` |
324
+ | `LOKI_SANDBOX_MODE` | Run in Docker-in-Docker sandbox | `false` |
325
+
326
+ ### SDLC Phases (all enabled by default, set to `false` to skip)
327
+
328
+ `LOKI_PHASE_UNIT_TESTS`, `LOKI_PHASE_API_TESTS`, `LOKI_PHASE_E2E_TESTS`, `LOKI_PHASE_SECURITY`, `LOKI_PHASE_INTEGRATION`, `LOKI_PHASE_CODE_REVIEW`, `LOKI_PHASE_WEB_RESEARCH`, `LOKI_PHASE_PERFORMANCE`, `LOKI_PHASE_ACCESSIBILITY`, `LOKI_PHASE_REGRESSION`, `LOKI_PHASE_UAT`
329
+
330
+ ### Completion Council
331
+
332
+ | Variable | Description | Default |
333
+ |----------|-------------|---------|
334
+ | `LOKI_COUNCIL_ENABLED` | Multi-agent verification council | `true` |
335
+ | `LOKI_COUNCIL_SIZE` | Number of council members | `3` |
336
+ | `LOKI_COUNCIL_THRESHOLD` | Votes required to pass | `2` |
337
+
338
+ ### TLS/HTTPS (Dashboard)
339
+
340
+ | Variable | Description |
341
+ |----------|-------------|
342
+ | `LOKI_TLS_CERT` | Path to PEM certificate |
343
+ | `LOKI_TLS_KEY` | Path to PEM private key |
344
+
345
+ ## CLI Commands
346
+
347
+ | Command | Description |
348
+ |---------|-------------|
349
+ | `start [PRD]` | Start autonomous execution |
350
+ | `quick "task"` | Quick single-task mode (max 3 iterations) |
351
+ | `stop` | Stop execution |
352
+ | `pause` / `resume` | Pause/resume execution |
353
+ | `status [--json]` | Show current status |
354
+ | `logs` | Show recent log output |
355
+ | `init` | Build PRD interactively from templates |
356
+ | `issue <url\|num>` | Generate PRD from GitHub issue |
357
+ | `dashboard <cmd>` | Dashboard server: start, stop, status, url, open |
358
+ | `provider <cmd>` | Manage provider: show, set, list, info |
359
+ | `memory <cmd>` | Cross-project learnings |
360
+ | `council <cmd>` | Completion council status |
361
+ | `config <cmd>` | Configuration: show, init, edit, path |
362
+ | `docker <cmd>` | Run any loki command inside the published image (host wrapper, zero config) |
363
+ | `sandbox <cmd>` | Docker sandbox: start, stop, status, logs, shell |
364
+ | `remote [PRD]` | Start remote session (connect from phone/browser, Claude Pro/Max) |
365
+ | `cleanup` | Kill orphaned processes |
366
+ | `version` | Show version |
367
+ | `help` | Show help |
368
+
369
+ ### Start Options
370
+
371
+ ```
372
+ --provider NAME AI provider: claude (default), codex, cline, aider
373
+ --parallel Enable parallel mode with git worktrees
374
+ --bg, --background Run in background
375
+ --simple Force simple complexity tier
376
+ --complex Force complex complexity tier
377
+ --github Enable GitHub issue import
378
+ --no-dashboard Disable web dashboard
379
+ --sandbox Run in Docker sandbox
380
+ --skip-memory Skip loading memory context
381
+ --budget USD Set cost budget limit
382
+ --yes, -y Skip confirmation prompts
383
+ ```
384
+
385
+ ## Docker Compose Reference
386
+
387
+ The repo ships a ready-to-use `docker/docker-compose.yml` with an `env_file: .env` and an `ANTHROPIC_API_KEY` passthrough, plus a commented OAuth-mount volume for Auth Method 2. Copy `.env.example` to `.env`, set your key, and run. For reference, the service looks like this:
388
+
389
+ ```yaml
390
+ services:
391
+ loki:
392
+ image: asklokesh/loki-mode:latest
393
+ env_file: .env
394
+ volumes:
395
+ - .:/workspace:rw
396
+ - ~/.gitconfig:/home/loki/.gitconfig:ro
397
+ - ~/.ssh:/home/loki/.ssh:ro
398
+ - ~/.config/gh:/home/loki/.config/gh:ro
399
+ # Auth Method 2 (Claude Max/Pro): uncomment to mount host OAuth credentials
400
+ # - ./.loki-oauth-credentials.json:/home/loki/.claude/.credentials.json:rw
401
+ environment:
402
+ - ANTHROPIC_API_KEY
403
+ ports:
404
+ - "57374:57374"
405
+ working_dir: /workspace
406
+ stdin_open: true
407
+ tty: true
408
+ ```
409
+
410
+ ```bash
411
+ cp docker/.env.example .env # then edit .env and set ANTHROPIC_API_KEY
412
+ docker compose -f docker/docker-compose.yml run loki start prd.md
413
+ ```
414
+
415
+ ## Security-Hardened Sandbox
416
+
417
+ For untrusted PRDs, enterprise, or CI/CD environments:
418
+
419
+ ```bash
420
+ # Build sandbox image
421
+ docker build -t loki-mode:sandbox -f docker/Dockerfile.sandbox .
422
+
423
+ # Run with resource limits and security controls
424
+ docker run -it \
425
+ --cpus=2 --memory=4g --pids-limit=256 \
426
+ --security-opt=no-new-privileges:true \
427
+ --cap-drop=ALL --cap-add=CHOWN \
428
+ -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
429
+ -v "$(pwd)":/workspace \
430
+ loki-mode:sandbox start prd.md
431
+
432
+ # Or use the built-in sandbox launcher
433
+ ./autonomy/sandbox.sh start prd.md
434
+ ```
435
+
436
+ Sandbox features: seccomp profile, capability dropping, resource limits, network isolation, optional read-only workspace.
437
+
438
+ ## Healthcheck
439
+
440
+ The image includes a built-in healthcheck that verifies `loki version` responds correctly. Check container health with:
441
+
442
+ ```bash
443
+ docker inspect --format='{{.State.Health.Status}}' <container-id>
444
+ ```
445
+
446
+ ## Tags
447
+
448
+ | Tag | Description |
449
+ |-----|-------------|
450
+ | `latest` | Latest stable release |
451
+ | `8.0.0` | Specific version (current release) |
452
+ | `7.x.x` | Prior versions |
453
+ | `sandbox` | Security-hardened image (Debian slim) |
454
+
455
+ ## Links
456
+
457
+ - [GitHub Repository](https://github.com/asklokesh/loki-mode)
458
+ - [Installation Guide](https://github.com/asklokesh/loki-mode/blob/main/docs/INSTALLATION.md)
459
+ - [Documentation](https://asklokesh.github.io/loki-mode)
460
+ - [PRD Templates](https://github.com/asklokesh/loki-mode/tree/main/templates)
461
+
462
+ ## License
463
+
464
+ Business Source License 1.1 (BUSL-1.1). Source-available, not open source. See [LICENSE](https://github.com/asklokesh/loki-mode/blob/main/LICENSE) and [docs/LICENSE-CHANGE-NOTICE.md](https://github.com/asklokesh/loki-mode/blob/main/docs/LICENSE-CHANGE-NOTICE.md). Converts to Apache 2.0 on March 19, 2030.
465
+
466
+ ## Support
467
+
468
+ - [GitHub Issues](https://github.com/asklokesh/loki-mode/issues)
469
+ - [Documentation Wiki](https://github.com/asklokesh/loki-mode/wiki)