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
@@ -1,209 +0,0 @@
1
- # Loki Mode - Architecture Overview
2
-
3
- Spec in, verified product out. This document gives a SIMPLE view for a first read
4
- and a FULL view for the whole machine, plus one RARV-C iteration as a sequence.
5
-
6
- Every claim is verified against source (`autonomy/loki`, `autonomy/run.sh`,
7
- `autonomy/completion-council.sh`, `skills/quality-gates.md`, `SKILL.md`). Line
8
- numbers drift; function names are stable. See `CLAUDE.md` for the file map.
9
-
10
- ---
11
-
12
- ## SIMPLE flowchart (the whole product in five boxes)
13
-
14
- ```mermaid
15
- flowchart LR
16
- SPEC[Spec: PRD / issue / OpenAPI / one-liner] --> LOOP[RARV-C loop]
17
- LOOP --> VERIFY[Verify: gates + council + evidence gate]
18
- VERIFY -- not done --> LOOP
19
- VERIFY -- verified --> SHIP[Deployed product + proof-of-run]
20
- ```
21
-
22
- Diagram type: flowchart. 4 nodes.
23
-
24
- Reason, Act, Reflect, Verify, then Closure. The loop does not exit until the
25
- verify stage clears; "done" is a verdict the machine has to earn, not a claim it
26
- gets to make.
27
-
28
- ---
29
-
30
- ## USER view: how you run it and what you get
31
-
32
- ```bash
33
- # One-time: launch Claude Code with autonomous permissions
34
- claude --dangerously-skip-permissions
35
-
36
- # Then either say "Loki Mode", or run the CLI directly:
37
- loki start ./prd.md # PRD-mode (a Markdown spec file)
38
- loki start owner/repo#123 # issue-mode (a GitHub issue)
39
- loki start # one-line brief, answer the prompt
40
- ```
41
-
42
- What happens: `loki start` (`cmd_start` in `autonomy/loki`) execs the runner
43
- (`autonomy/run.sh`). The `run_autonomous()` loop builds a prompt each iteration
44
- (`build_prompt()`), invokes the provider, then runs checklist verification, an app
45
- runner, smoke tests, and code review. It stops when the completion council votes
46
- stop (`council_should_stop` in `autonomy/completion-council.sh`), a completion
47
- promise is met, max iterations is hit, or (v8.0.0) a failure is positively
48
- identified as non-retryable -- bad credentials, unknown model, exhausted quota --
49
- where further retries would be guaranteed-identical failures
50
- (`loki-ts/src/runner/retry_class.ts`, `LOKI_SMART_RETRY=0` to disable). An
51
- unrecognized failure stays transient and retries as before, so the early exit
52
- can never abandon a build that would have succeeded.
53
-
54
- The council's own force-stop valves (stagnation, repeated done-claims) are
55
- additionally delayed by one iteration when the agent's self-reported confidence
56
- spikes, so a sudden claim of near-certainty is VERIFIED rather than trusted
57
- (`loki-ts/src/runner/council.ts`, v8.0.0). That delay is strictly additive: it
58
- can only add a verification pass, never skip one, and it never delays the
59
- stagnation valve.
60
-
61
- What you get:
62
- - A runnable artifact (the built product in your working directory).
63
- - A proof-of-run: `.loki/proofs/<id>/proof.json` plus an HTML report
64
- (`autonomy/lib/proof-generator.py`, `autonomy/lib/proof-template.html`).
65
- - An honest verdict. The evidence gate blocks completion on an empty diff, red
66
- tests, an unhealthy serveable app (runtime-boot axis), or a leaked credential in
67
- the changed files (secret-leak axis) - v8.0.0, `SKILL.md`.
68
-
69
- Provider-agnostic (stable since v5.0.0): Claude (Tier 1, full), Cline (Tier 2),
70
- Codex and Aider (Tier 3, degraded, sequential), opencode (sequential). With
71
- `LOKI_PROVIDER` unset, auto-detection picks the first installed provider in that
72
- order (`providers/loader.sh:191`); an explicit choice always wins. Gemini was
73
- removed as a provider in v7.5.18. See `skills/providers.md`.
74
-
75
- ---
76
-
77
- ## FOUNDER view: the moat
78
-
79
- The moat is not "an agent that writes code". It is the trust layer wrapped around
80
- the loop.
81
-
82
- - RARV-C rigor. Every iteration is Reason, Act, Reflect, Verify, then Closure
83
- (findings injection, override council, learnings, handoff). The closure knobs
84
- are default-on in the Bun runner: `LOKI_INJECT_FINDINGS`, `LOKI_OVERRIDE_COUNCIL`,
85
- `LOKI_AUTO_LEARNINGS`, `LOKI_HANDOFF_MD` (`CLAUDE.md`, `skills/quality-gates.md`).
86
- - Verify, not vibes. 8 quality gates (`skills/quality-gates.md`), a blind
87
- 3-reviewer council with severity blocking, an anti-sycophancy Devil's Advocate on
88
- unanimous PASS, and a verified-completion evidence gate that blocks on positive
89
- fabrication evidence. The system does not call work done until it is verified
90
- (`SKILL.md`).
91
- - Tier routing. Opus for planning/architecture, Sonnet for development, Haiku for
92
- unit tests and simple parallel work (`CLAUDE.md` Model Selection;
93
- `get_rarv_tier()` in `autonomy/run.sh`, session-pinned via `LOKI_SESSION_MODEL`,
94
- default sonnet). Cost tracks the tier, not a flat premium.
95
- - Model-equivalence thesis (founder framing). The rigor lives in the HARNESS (the
96
- loop, the gates, the council, the evidence gate), not in any one model. Because
97
- the harness is provider-agnostic with abstract model tiers and a degraded mode
98
- for non-Claude providers, the trust guarantee is not tied to a single vendor
99
- (`SKILL.md` provider-agnostic section; `providers/*.sh`). An optional Anthropic
100
- Agent SDK route exists behind `LOKI_SDK_MODE` (off by default, v8.0.0); unset is
101
- byte-identical to the claude-CLI route (`references/sdk-mode.md`).
102
-
103
- ---
104
-
105
- ## FULL flowchart (CLI dispatch to shipped proof)
106
-
107
- ```mermaid
108
- flowchart TD
109
- subgraph CLI[autonomy/loki - CLI]
110
- START[loki start spec] --> DISPATCH[main dispatch]
111
- DISPATCH --> EXEC[exec run.sh]
112
- end
113
-
114
- subgraph RUNNER[autonomy/run.sh - orchestration]
115
- EXEC --> RA[run_autonomous loop]
116
- RA --> CPX[detect_complexity]
117
- CPX --> TIER[get_rarv_tier / LOKI_SESSION_MODEL]
118
- TIER --> BP[build_prompt: RARV + SDLC + memory + queue + checklist]
119
- BP --> INV[invoke provider]
120
- INV --> ACT[Act: agent edits code]
121
- ACT --> CHK[checklist verification]
122
- CHK --> APP[app runner + playwright smoke]
123
- APP --> CR[run_code_review: 3 blind reviewers]
124
- end
125
-
126
- subgraph GATES[Quality gates - skills/quality-gates.md]
127
- CR --> G1[1 static analysis]
128
- G1 --> G2[2 test suite red blocks]
129
- G2 --> G3[3 blind council Crit/High block]
130
- G3 --> G4[4 devils advocate on unanimous PASS]
131
- G4 --> G5[5 mock integrity HIGH blocks]
132
- G5 --> G6[6 test mutation HIGH blocks]
133
- G6 --> G7[7 doc coverage]
134
- G7 --> G8[8 magic modules debate BLOCK]
135
- end
136
-
137
- subgraph CLOSURE[RARV-C closure + memory]
138
- G8 --> FIND[inject findings]
139
- FIND --> OC[override council on BLOCK]
140
- OC --> LEARN[auto learnings]
141
- LEARN --> HAND[handoff md]
142
- HAND --> MEM[store_episode_trace: episodic/semantic]
143
- end
144
-
145
- subgraph VERDICT[Completion decision]
146
- MEM --> EG[evidence gate: empty-diff / red-tests / boot / secret-leak]
147
- EG --> CC[council_should_stop vote]
148
- end
149
-
150
- CC -- keep going --> RA
151
- CC -- stop / verified --> PROOF[proof-generator.py -> .loki/proofs/ID/proof.json + HTML]
152
- PROOF --> SHIP[deployed product + proof-of-run]
153
- ```
154
-
155
- Diagram type: flowchart. 28 nodes across 6 subgraphs.
156
-
157
- Verified anchors: `main` dispatch and `cmd_start` in `autonomy/loki`;
158
- `run_autonomous()`, `build_prompt()`, `run_code_review()`, `detect_complexity()`,
159
- `get_rarv_tier()` in `autonomy/run.sh`; the 8-gate table in
160
- `skills/quality-gates.md`; closure env vars in `CLAUDE.md`; `council_should_stop()`
161
- in `autonomy/completion-council.sh`; proof generation in
162
- `autonomy/lib/proof-generator.py`. The evidence-gate axes are quoted from
163
- `SKILL.md` (v8.0.0).
164
-
165
- ---
166
-
167
- ## One RARV-C iteration (sequenceDiagram)
168
-
169
- ```mermaid
170
- sequenceDiagram
171
- participant Runner as run_autonomous (run.sh)
172
- participant Prompt as build_prompt
173
- participant Provider as Provider (Claude/Cline/Codex/Aider/opencode)
174
- participant Verify as Gates + council
175
- participant Evidence as Evidence gate
176
- participant Council as completion council
177
- participant Memory as Episodic/semantic store
178
-
179
- Runner->>Prompt: Reason - assemble prompt (RARV, SDLC, memory, queue, checklist)
180
- Prompt-->>Runner: iteration prompt
181
- Runner->>Provider: Act - invoke provider
182
- Provider-->>Runner: code edits + output
183
- Runner->>Runner: Reflect - checklist, app runner, smoke tests
184
- Runner->>Verify: Verify - 8 gates + 3 blind reviewers
185
- Verify-->>Runner: gate verdicts (Crit/High block)
186
- Runner->>Runner: Closure - inject findings, override council, learnings, handoff
187
- Runner->>Memory: store episode trace
188
- Runner->>Evidence: verified-completion evidence gate
189
- Evidence-->>Runner: pass / block (empty-diff, red-tests, boot, secret-leak)
190
- Runner->>Council: council_should_stop vote
191
- Council-->>Runner: continue OR stop (verified)
192
- Note over Runner,Council: on continue, next iteration re-enters Reason with injected findings
193
- ```
194
-
195
- Diagram type: sequenceDiagram. 7 participants, 14 messages.
196
-
197
- Verified: the RARV cycle (Reason/Act/Reflect/Verify) is `SKILL.md` PRIORITY 2; the
198
- Closure stage maps to the four default-on closure env vars in `CLAUDE.md`; the
199
- evidence-gate axes and "does not call work done until verified" are `SKILL.md`
200
- v8.0.0; the council vote is `council_should_stop` in `autonomy/completion-council.sh`.
201
-
202
- ---
203
-
204
- ## Where this connects
205
-
206
- Loki Mode is the ENGINE. Its `proof.json` is the evidence that the neutral
207
- Autonomi Verify signer stamps, and the Autonomi SaaS product is the hosted layer
208
- that drives the engine for non-technical users. See `docs/AUTONOMI-ECOSYSTEM.md`
209
- for the three-repo boundary map.
@@ -1,107 +0,0 @@
1
- # The Autonomi Ecosystem
2
-
3
- Three repos, three jobs, three clean boundaries. This is the map that ties them
4
- together.
5
-
6
- - loki-mode (this repo) - the ENGINE. Spec to verified product via the RARV-C
7
- loop, 8 quality gates, the completion council, and the evidence gate.
8
- - autonomi-verify - the TRUST layer. A neutral signer that stamps observed evidence
9
- with a host-held key so a receipt is non-forgeable and independently checkable.
10
- - autonomi-saas - the hosted PRODUCT. Plain-English builds for non-technical users,
11
- driving the engine and stamping every result with Verify.
12
-
13
- Deep dives: `docs/ARCHITECTURE-OVERVIEW.md` (engine),
14
- `../autonomi-verify/docs/INTEGRATION-DIAGRAMS.md` (trust layer),
15
- `../autonomi-saas/docs/PRODUCT-ARCHITECTURE.md` (product).
16
-
17
- ---
18
-
19
- ## The ecosystem in one graph
20
-
21
- ```mermaid
22
- graph TD
23
- subgraph PRODUCT[autonomi-saas - hosted product, proprietary]
24
- WEB[web SPA: prompt-left / output-right]
25
- BFF[BFF: only tier with engine token]
26
- WORKER[worker: build loop, D-gen, preview, attestor]
27
- WEB --> BFF --> WORKER
28
- end
29
-
30
- subgraph ENGINE[loki-mode - engine, source-available]
31
- CLI[loki CLI + FastAPI]
32
- LOOP[RARV-C loop + 8 gates + council + evidence gate]
33
- PROOF[proof.json + proof-of-run HTML]
34
- CLI --> LOOP --> PROOF
35
- end
36
-
37
- subgraph TRUST[autonomi-verify - neutral signer]
38
- VAPI[POST /verify: decide then sign]
39
- KEY[host Ed25519 key, host only]
40
- VAL[POST /validate: check signature, no code run]
41
- VAPI --> KEY
42
- KEY --> VAL
43
- end
44
-
45
- WORKER -->|api-client HTTP| CLI
46
- PROOF -->|observed evidence| WORKER
47
- WORKER -->|POST evidence| VAPI
48
- KEY -->|signed Evidence Receipt| WORKER
49
-
50
- CLIUSER[CLI / CI user] -->|loki start| CLI
51
- CLIUSER2[third-party pipeline] -->|loki verify stamp| VAPI
52
- ANYONE[anyone with a receipt] -->|validate| VAL
53
- ```
54
-
55
- Diagram type: graph. 14 nodes across 3 subgraphs plus 3 external actors.
56
-
57
- Verified anchors: the BFF is the only tier holding the engine token
58
- (`autonomi-saas/apps/bff/src/engine.ts`); the worker attestor POSTs evidence to the
59
- signer and gets a signed receipt (`autonomi-saas/worker/src/adapters/attestor.ts`);
60
- the signer decides then signs with a host-only Ed25519 key
61
- (`autonomi-verify/src/api/index.ts`, `autonomi-verify/src/persistence/index.ts`);
62
- `/validate` checks a signature without running code
63
- (`autonomi-verify/src/api/validatePage.ts`); the engine produces `proof.json`
64
- (`loki-mode/autonomy/lib/proof-generator.py`, `loki-ts/src/runner/proof.ts`).
65
-
66
- ---
67
-
68
- ## Where each boundary is
69
-
70
- | Concern | loki-mode (engine) | autonomi-verify (trust) | autonomi-saas (product) |
71
- |---|---|---|---|
72
- | Runs the build | Yes | No | No (delegates to engine) |
73
- | Decides the verdict | Yes (gates, council, evidence gate) | Yes (neutral re-decide on presented evidence) | No |
74
- | Holds the signing key | No | Yes (host only) | No |
75
- | Runs untrusted code | Yes (sandboxed) | No (never runs code) | Via engine + worker sandbox |
76
- | Multi-tenant auth / billing | No | Per-tenant API key on /verify | Yes (product concern) |
77
- | Hosted preview + UI | No | No | Yes |
78
- | Design generation (D-gen) | Prompt-level, engine-agnostic | No | Yes (default-on directive) |
79
- | Source posture | Source-available | Source-available | Proprietary hosted |
80
-
81
- The three-way trust property: the engine can decide, but the PRODUCT that built the
82
- app does not hold the key that signs the receipt. Only the neutral TRUST layer does.
83
- That separation is what lets a skeptic believe a receipt without trusting the
84
- builder. A competitor who self-signs their own success badge cannot offer that.
85
-
86
- ---
87
-
88
- ## The flow, end to end
89
-
90
- 1. A user describes an app in the SaaS, or a developer runs `loki start`, or a
91
- third-party pipeline runs `loki verify stamp`.
92
- 2. The engine runs the RARV-C loop until the gates, council, and evidence gate
93
- clear, producing `proof.json`.
94
- 3. The observed evidence (diff + test signal) is POSTed to the neutral signer,
95
- which applies one honest verdict rule and signs with the host-only key.
96
- 4. The signed Evidence Receipt comes back. Anyone can validate its signature at
97
- `/validate` without running code or trusting the builder.
98
-
99
- Honesty invariants that hold across all three:
100
- - `verified` means "no fabrication evidence", not "tests are green"
101
- (`autonomi-verify/src/verifier/verify.ts`).
102
- - Block only on positive fabrication evidence; inconclusive is pass-through
103
- (`autonomi-verify/src/verifier/evidenceGate.ts`).
104
- - The design/beauty layer never alters the VERIFIED verdict
105
- (`autonomi-saas/docs/AUTONOMI-BUILD-PLAN.md`).
106
- - Signing happens after the verdict is decided, so signing cannot change it
107
- (`autonomi-verify/src/api/index.ts`).
@@ -1,72 +0,0 @@
1
- # Loki Cockpit (rec #6) - build spec
2
-
3
- > **Historical:** this describes the classic dashboard, removed in Loki Mode 10.8. The Control Plane is the only UI; see [control-plane-migration.md](control-plane-migration.md).
4
-
5
- Status: IN BUILD (v7.126.0 target). Design approved via mockup
6
- (scratchpad/loki-cockpit.html). Grounded in real engine state + Autonomi identity.
7
-
8
- ## Product model (locked with founder)
9
-
10
- Three surfaces, each for a different moment; the cockpit ADDS a choice, removes nothing:
11
- - `loki start` - launch. Now DETACHES to background by default on an interactive
12
- TTY, after a rich handoff (spec/path/tier/budget/logs/dashboard URL + actions:
13
- view/watch/dashboard/detach/stop). Auto-picks "Both" after an 8s timeout.
14
- CI / --bg / --yes / non-interactive skip the handoff -> exactly today's behavior.
15
- - `loki cockpit` - NEW opt-in observability surface. Renders the approved cockpit
16
- UI live from `.loki/` state, multi-repo. Two render paths:
17
- 1. In-terminal 4K image (Kitty / iTerm2 / WezTerm / Ghostty graphics protocol)
18
- - pixel-exact, the approved HTML/SVG rasterized in-pane.
19
- 2. Browser-dashboard fallback (default everywhere else) - opens the existing
20
- web dashboard (redesigned to the same identity).
21
- (`loki watch` is UNCHANGED - it remains the PRD-file auto-rerun watcher.)
22
- - `loki dashboard` - the web view (redesigned to the cockpit identity).
23
- - `loki stop` - already exists; surfaced as an action in the handoff + cockpit.
24
-
25
- ## Identity (from ~/git/autonomi-website, verified)
26
-
27
- - Logo: purple squircle #553DE9 + white "A" (two strokes + Q-bezier apex) + teal
28
- dot #1FC5A8. Always visible top-left.
29
- - Accent #553de9 (light) / #8b7bf5 (dark). Teal #1FC5A8 secondary.
30
- - Fonts: Fraunces (display), Inter (body), JetBrains Mono (mono). Ink #201515.
31
- - Light-grey ground DEFAULT (#f1f2f6); dark mode optional.
32
- - Semantic: verified #1f8a52, warning #9a6a12, failed #b23a3a.
33
-
34
- ## Data sources (real, no new state invented)
35
-
36
- - Multi-repo run list: `dashboard/registry.py` -> `get_fleet_runs()` /
37
- `list_projects()` reading `~/.loki/dashboard/projects.json`.
38
- - Per-run live state: `<target>/.loki/autonomy-state.json` (iteration, phase,
39
- status), `.loki/council/*.json` (votes, gate/evidence blocks),
40
- `.loki/verify/evidence.json` (verdict + gates + freshness), `.loki/events.json`.
41
- - Budget: `.loki/metrics/` + state cost fields.
42
-
43
- ## Render pipeline (dependency-free - the "no one has done this" bar)
44
-
45
- No chafa / no headless Chrome hard dependency. Pipeline:
46
- 1. Build an SVG of the cockpit from live state (exact fonts embedded, exact colors).
47
- 2. Rasterize SVG -> PNG via a bundled pure path (resvg-js if present, else a
48
- node canvas fallback; capability-detected).
49
- 3. Encode PNG -> terminal via a SELF-CONTAINED encoder (Kitty graphics protocol
50
- or iTerm2 inline-image escape, pure base64 - no external binary).
51
- 4. Capability detection: $TERM / $TERM_PROGRAM / KITTY_WINDOW_ID / terminal
52
- query; on unsupported terminals fall back to opening the browser dashboard.
53
- Honest: never claim an image render happened when it fell back.
54
-
55
- ## Stories
56
-
57
- - S1 (start handoff + detach-default): cmd_start. Rich handoff card, 8s auto-Both,
58
- actions, remember-per-project. Non-interactive/CI/--bg/--yes bypass. Tests.
59
- - S2 (loki cockpit command + multi-repo model): cmd_cockpit, reads registry +
60
- per-run state, run switcher, --once/--follow, browser fallback. Tests.
61
- - S3 (render pipeline): SVG-from-state builder + SVG->PNG + terminal-image
62
- encoder + capability detection + fallback. Tests (encoder byte-shape, detection).
63
- - S4 (dashboard identity redesign): apply logo/purple/fonts/multi-repo switcher to
64
- legacy-ui; rebuild dist. Lightweight gate.
65
- - S5 (docs + wiki + release): help text, README, wiki, CHANGELOG, 14 version files.
66
-
67
- ## Constraints
68
-
69
- - CLI-invariant: no existing command changes behavior (watch stays PRD-watcher;
70
- start's non-interactive path byte-identical).
71
- - Never fake-green: image path honest about fallback; every claim tested.
72
- - Both routes where relevant; bash-route for start/cockpit/stop.
@@ -1,53 +0,0 @@
1
- # loki start opening experience - UX / engagement / stickiness mandate
2
-
3
- Founder mandate (2026-07-09): the moment `loki start` opens must deliver the best
4
- UX, engagement, and stickiness in the CLI space - "nothing anyone ever attempted
5
- with cli and terminal." This shapes S1 (start handoff) and a dedicated polish pass.
6
-
7
- ## Principles
8
-
9
- 1. Time-to-first-wow < 1 second. The instant the user hits enter, they see a
10
- crafted, branded, alive moment - not a wall of logs. The Autonomi mark renders
11
- immediately; the build identity (spec, tier, what it is about to do) reads at a
12
- glance.
13
- 2. Alive, not static. A subtle, tasteful motion on open (the RARV loop igniting,
14
- a one-line "here is the plan" reveal). No gratuitous animation; one orchestrated
15
- moment that lands.
16
- 3. Confidence + control in the same breath. The user immediately understands: it
17
- is running, it is safe, and here is exactly how to watch / steer / stop. The
18
- handoff card IS the hook - it makes staying to watch feel rewarding.
19
- 4. Stickiness = the cockpit pull. "Both" (dashboard + cockpit) is the default and
20
- the card sells it: "watch it build, live." First run teaches `loki cockpit`;
21
- the remembered choice makes the second run instant.
22
- 5. Progress you feel. Show the first real signal fast (tier detected, first
23
- iteration reasoning) so the user gets a dopamine hit of momentum, not a spinner.
24
- 6. Honest always. Never fake progress or a wow that is not backed by real state.
25
-
26
- ## Concrete asks (for the polish pass after slices merge)
27
-
28
- - A crafted open banner: Autonomi logo + "Loki" wordmark (Fraunces feel in ASCII/
29
- unicode), a one-line value framing of THIS run, then the handoff card.
30
- - The countdown to auto-Both should feel inviting ("opening your cockpit in 8s -
31
- press a key to choose"), not like a timeout to dread.
32
- - The reattach hints after detach should be delightful + copy-pasteable
33
- (`loki cockpit` front and center).
34
- - Optional: a tiny "what Loki will do" 3-line plan preview (from detected tier +
35
- spec) so the user sees intent before backgrounding.
36
- - Measure: time-to-first-frame, and whether users pick Both (engagement proxy).
37
-
38
- This is a follow-up polish story (S6) layered on S1 once the core lands. Do not
39
- fake it; every wow is backed by a real field.
40
-
41
- ## HARD CONSTRAINTS (founder, 2026-07-09)
42
-
43
- - STARE-WORTHY: the open must be a VISUAL moment people stop and admire - the
44
- quality of a crafted product launch screen, in the terminal. Type, spacing,
45
- the Autonomi mark, colors (truecolor), and one alive beat. Not a log dump.
46
- - ZERO NEW TOOLING / ZERO FRICTION: the user installs NOTHING extra and learns NO
47
- new tool. No chafa, no headless Chrome as a requirement, no new binary, no
48
- config step. It must work out of the box on `loki start`. The dependency-free
49
- pure-bash render path (truecolor ANSI + optional in-terminal image where the
50
- terminal already supports it, silent graceful fallback otherwise) is mandatory;
51
- anything that would make a user run an install command is disqualified.
52
- - IT JUST HAPPENS: the amazing open is the DEFAULT of `loki start`, not an opt-in
53
- flag the user must discover. No extra ceremony.