loki-mode 10.6.6 → 10.6.8

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 (114) hide show
  1. package/.github/actions/issue-to-pr/action.yml +25 -11
  2. package/.github/workflows/loki-issue-to-pr.yml +21 -10
  3. package/README.md +138 -54
  4. package/SKILL.md +11 -8
  5. package/VERSION +1 -1
  6. package/autonomy/lib/workspace.py +290 -0
  7. package/autonomy/lib/worktree_prep.py +143 -0
  8. package/autonomy/loki +68 -5
  9. package/autonomy/run.sh +26 -1
  10. package/bin/loki +9 -1
  11. package/completions/_loki +1 -0
  12. package/completions/loki.bash +1 -2
  13. package/dashboard/__init__.py +1 -1
  14. package/docs/AUDIT-CHAIN-THREAT-MODEL.md +1 -1
  15. package/docs/DEMOS.md +11 -26
  16. package/docs/EVALUATING.md +2 -3
  17. package/docs/INSTALLATION.md +2 -2
  18. package/docs/TOOLS.md +1 -1
  19. package/docs/WANG-PRINCIPLES-PLAN.md +1 -1
  20. package/docs/WORKSPACES.md +29 -0
  21. package/docs/air-gapped.md +1 -1
  22. package/docs/alternative-installations.md +3 -1
  23. package/docs/control-plane-container.md +45 -0
  24. package/docs/dashboard-guide.md +2 -0
  25. package/docs/dev/architecture-reference.md +4 -0
  26. package/docs/dev/project-structure.md +2 -2
  27. package/docs/dev/release-checklist.md +1 -2
  28. package/docs/enterprise/architecture.md +1 -1
  29. package/docs/siem-integration.md +2 -2
  30. package/docs/slack.md +26 -0
  31. package/docs/v10/BOARD.md +26 -1
  32. package/docs/v10/CONTROL-PLANE.md +4 -0
  33. package/docs/v10/D61-SPEED.md +83 -0
  34. package/docs/v10/DECISIONS.md +33 -0
  35. package/docs/v10/DEPS.md +6 -2
  36. package/docs/v10/E2E-D65.md +87 -0
  37. package/docs/v10/GUIDE.md +63 -1
  38. package/docs/v10/HANDOFF-NEXT-WEEK.md +40 -0
  39. package/docs/v10/PROGRESS.md +13 -0
  40. package/docs/v10/ROADMAP-D63.md +35 -0
  41. package/loki-ts/dist/loki.js +593 -569
  42. package/mcp/__init__.py +1 -1
  43. package/mcp/server.py +76 -0
  44. package/mcp/tests/test_v10_tools.py +137 -0
  45. package/mcp/v10_tools.py +172 -0
  46. package/package.json +1 -1
  47. package/packages/control-plane/dist/server.js +56 -4
  48. package/packages/control-plane/src/server/answer.ts +33 -0
  49. package/packages/control-plane/src/server/app.ts +17 -1
  50. package/packages/control-plane/src/server/runs.ts +2 -0
  51. package/packages/control-plane/src/server/serve.ts +2 -2
  52. package/packages/control-plane/ui/dist/assets/index-53E32yrO.js +114 -0
  53. package/packages/control-plane/ui/dist/assets/{index-BH3LtKcG.css → index-CFfrqCx2.css} +1 -1
  54. package/packages/control-plane/ui/dist/index.html +2 -2
  55. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  56. package/web-app/dist/assets/{AdminPage-CH-bmw4l.js → AdminPage-DN_pe8vo.js} +1 -1
  57. package/web-app/dist/assets/{Avatar-Bos-ky_x.js → Avatar-BnQsr8z-.js} +1 -1
  58. package/web-app/dist/assets/{Badge-DNJyHg9Y.js → Badge-DzERiZn2.js} +1 -1
  59. package/web-app/dist/assets/{Button-KqD3Tt-I.js → Button-CaaoxQAt.js} +1 -1
  60. package/web-app/dist/assets/{CockpitPage-l6oTsRaL.js → CockpitPage-SXhnysJA.js} +1 -1
  61. package/web-app/dist/assets/{ComparePage-DN6uxXko.js → ComparePage-krxTCFJY.js} +1 -1
  62. package/web-app/dist/assets/{ErrorBoundary-CKQhnvU9.js → ErrorBoundary-BL96ESMc.js} +1 -1
  63. package/web-app/dist/assets/{EvidenceReceiptPanel-CzSIqLmy.js → EvidenceReceiptPanel-PUiGSpkB.js} +1 -1
  64. package/web-app/dist/assets/{GitHubIssuesPanel-YJUcDezn.js → GitHubIssuesPanel-C0hPs-P2.js} +1 -1
  65. package/web-app/dist/assets/{GitHubPRsPanel-Bv7xFvJN.js → GitHubPRsPanel-CLvqNUlu.js} +1 -1
  66. package/web-app/dist/assets/{HomePage-CJsxBbii.js → HomePage-X-sq_Rc9.js} +2 -2
  67. package/web-app/dist/assets/{LoginPage-D1V2Ag0s.js → LoginPage-DhQuwdua.js} +1 -1
  68. package/web-app/dist/assets/{MagicPage-BBVNMEr5.js → MagicPage-CP2ODjfn.js} +1 -1
  69. package/web-app/dist/assets/{MetricsPage-CtHM-IlA.js → MetricsPage-C6SYiQES.js} +1 -1
  70. package/web-app/dist/assets/{NotFoundPage-BBEEJLj5.js → NotFoundPage-CCDxxYc-.js} +1 -1
  71. package/web-app/dist/assets/{ProjectPage-BVRJoEaQ.js → ProjectPage-yDF--8FQ.js} +3 -3
  72. package/web-app/dist/assets/{ProjectsPage-DqaA9rUa.js → ProjectsPage-BBLspdLn.js} +1 -1
  73. package/web-app/dist/assets/{SettingsPage-B_RQV_vF.js → SettingsPage-C_sWbQRw.js} +1 -1
  74. package/web-app/dist/assets/{ShowcasePage-DqN-mrZ8.js → ShowcasePage-xCMuL0N8.js} +1 -1
  75. package/web-app/dist/assets/{SystemSettingsPage-D-CvuL-K.js → SystemSettingsPage-DnJKGCx7.js} +1 -1
  76. package/web-app/dist/assets/{TeamsPage-CzkkDcPj.js → TeamsPage-BBXdhrSs.js} +1 -1
  77. package/web-app/dist/assets/{TemplatesPage-Bbchk7YQ.js → TemplatesPage-AZ1Lr1rn.js} +1 -1
  78. package/web-app/dist/assets/{TerminalOutput-B32BAX--.js → TerminalOutput-CtIm9tXc.js} +1 -1
  79. package/web-app/dist/assets/{activity-C9vnEmhG.js → activity-Dk1FK25Q.js} +1 -1
  80. package/web-app/dist/assets/{bell-XsIhkyjq.js → bell-dhqXyzP4.js} +1 -1
  81. package/web-app/dist/assets/{bot-CvQhqBws.js → bot-CExHd4Kf.js} +1 -1
  82. package/web-app/dist/assets/{check-HmG8WcD-.js → check-D51zaA1a.js} +1 -1
  83. package/web-app/dist/assets/{chevron-left-C1KNgnbD.js → chevron-left-DEwnQzH1.js} +1 -1
  84. package/web-app/dist/assets/{circle-alert-DSmCvZju.js → circle-alert-C6U90Msk.js} +1 -1
  85. package/web-app/dist/assets/{clock-CPhE3RXd.js → clock-6mFbMzzH.js} +1 -1
  86. package/web-app/dist/assets/{cloud-29lwqocB.js → cloud-BrZZtE7F.js} +1 -1
  87. package/web-app/dist/assets/{code-xml-4jZUzbPt.js → code-xml-DTFzeepP.js} +1 -1
  88. package/web-app/dist/assets/{database-H0Ct2r-8.js → database-B5rEiTre.js} +1 -1
  89. package/web-app/dist/assets/{dollar-sign-DsXkO0yT.js → dollar-sign-bQs4rlS_.js} +1 -1
  90. package/web-app/dist/assets/{file-code-corner-BM8w_nvX.js → file-code-corner-Mo6e6qbf.js} +1 -1
  91. package/web-app/dist/assets/{file-plus-BWkYTJ4D.js → file-plus-DzHZ0jpP.js} +1 -1
  92. package/web-app/dist/assets/{globe-FOFDl_8Z.js → globe-DYN9UhTa.js} +1 -1
  93. package/web-app/dist/assets/{hammer-orm5gvky.js → hammer-bB0hSRcJ.js} +1 -1
  94. package/web-app/dist/assets/{index-B6juCuPX.js → index-CIH5CqZB.js} +3 -3
  95. package/web-app/dist/assets/{layers-DUQPkPAl.js → layers-qhFkY8Nu.js} +1 -1
  96. package/web-app/dist/assets/{loader-circle-Deq6bDar.js → loader-circle-BGBkaYH7.js} +1 -1
  97. package/web-app/dist/assets/{lock-CSzWTPRC.js → lock-DIcsNFum.js} +1 -1
  98. package/web-app/dist/assets/{package-CmACgZuF.js → package-BdIIbZhS.js} +1 -1
  99. package/web-app/dist/assets/{plus-BjPW5v3A.js → plus-Co1Bv8zT.js} +1 -1
  100. package/web-app/dist/assets/{refresh-cw-DhI1sHaj.js → refresh-cw-CGF4ABWH.js} +1 -1
  101. package/web-app/dist/assets/{rotate-ccw-Byi2ouWB.js → rotate-ccw-BX10Q79h.js} +1 -1
  102. package/web-app/dist/assets/{scroll-text-gq7bJ81H.js → scroll-text-CbXDlpGp.js} +1 -1
  103. package/web-app/dist/assets/{server-YbY5s1-X.js → server-CIhi6yUO.js} +1 -1
  104. package/web-app/dist/assets/{shield-alert-DhKjtwZt.js → shield-alert-DJ5fB6Dg.js} +1 -1
  105. package/web-app/dist/assets/{thumbs-up-D2X5JR-5.js → thumbs-up-BEft2T94.js} +1 -1
  106. package/web-app/dist/assets/{trash-2-BHAmMxTq.js → trash-2-CWGUPn7Y.js} +1 -1
  107. package/web-app/dist/assets/{trending-down-C41kQa-Q.js → trending-down-CjqstvxQ.js} +1 -1
  108. package/web-app/dist/assets/{trending-up-M-OK_9DC.js → trending-up-CTyLjMzE.js} +1 -1
  109. package/web-app/dist/assets/{upload-CarpPiGw.js → upload-BmRx-uv4.js} +1 -1
  110. package/web-app/dist/assets/{usePolling-rJ7rM7R0.js → usePolling-ChHkSJye.js} +1 -1
  111. package/web-app/dist/assets/{user-cBhWpZen.js → user-ZXh_f35z.js} +1 -1
  112. package/web-app/dist/index.html +1 -1
  113. package/docs/walkthrough/README.md +0 -44
  114. package/packages/control-plane/ui/dist/assets/index-B6EiyukW.js +0 -114
@@ -5,8 +5,7 @@ _loki_completion() {
5
5
  _init_completion || return
6
6
 
7
7
  # Main subcommands (must match autonomy/loki main case statement)
8
- local main_commands="start backlog quick monitor demo tour welcome init stop pause resume steer status next ship dashboard web serve api sandbox notify import github issue config provider reset memory compound checkpoint council dogfood projects enterprise secrets cockpit secure own handoff doctor watchdog audit metrics syslog onboard share proof receipt outcomes explain plan report cost estimate kpis stats test ci watch telemetry agent context ctx code run export review optimize heal modernize migrate cluster worktree wt trigger failover remote deploy docker mcp magic assets analyze compliance crash control open otel preview quickstart rc rollback self-update sentrux setup-skill spec state template trust trust-metrics ultracode update verify voice why wiki bench cleanup logs grill docs cp version completions help keys"
9
- local main_commands="start backlog quick monitor demo tour welcome init stop pause resume steer status next ship dashboard web serve api sandbox notify import github issue intent config provider reset memory compound checkpoint council dogfood projects enterprise secrets cockpit secure own handoff doctor watchdog audit metrics syslog onboard share proof receipt explain plan report cost estimate kpis stats test ci watch telemetry agent context ctx code run export review optimize heal modernize migrate cluster worktree wt trigger failover remote deploy docker mcp magic assets analyze compliance crash control open otel preview quickstart rc rollback self-update sentrux setup-skill spec state template trust trust-metrics ultracode update verify voice why wiki bench cleanup logs grill docs cp version completions help keys"
8
+ local main_commands="start backlog quick monitor demo tour welcome init stop pause resume steer status next ship dashboard web serve api sandbox notify import github issue intent config provider reset memory compound checkpoint council dogfood projects enterprise secrets cockpit secure own handoff doctor watchdog audit metrics syslog onboard share proof receipt outcomes explain plan report cost estimate kpis stats test ci watch telemetry agent context ctx code run export review optimize heal modernize migrate cluster worktree wt trigger failover remote deploy docker mcp magic assets analyze compliance crash control workspace open otel preview quickstart rc rollback self-update sentrux setup-skill spec state template trust trust-metrics ultracode update verify voice why wiki bench cleanup logs grill docs cp version completions help keys"
10
9
 
11
10
  # 1. If we are on the first argument (subcommand)
12
11
  if [[ $cword -eq 1 ]]; then
@@ -7,7 +7,7 @@ Modules:
7
7
  control: Session control API (start/stop/pause/resume)
8
8
  """
9
9
 
10
- __version__ = "10.6.6"
10
+ __version__ = "10.6.8"
11
11
 
12
12
  # Expose the control app for easy import
13
13
  try:
@@ -32,7 +32,7 @@ The history was replaced wholesale and `verifyChain()` reported `valid: true`.
32
32
  `dashboard/audit.py` is a separate implementation with the same property:
33
33
  genesis is the constant `"0" * 64` (`:58`, `:115`), and `_compute_chain_hash`
34
34
  (`:194-200`) is an unkeyed `sha256(prev_hash + entry_json)`. Its own docstring
35
- at `:197` calls the result tamper-evident. Forged with the writer's exact recipe
35
+ at `:197` overstates what the chain proves. Forged with the writer's exact recipe
36
36
  (`json.dumps(entry, sort_keys=True, default=str)`, field `_integrity_hash`,
37
37
  `:369-371`), `verify_log_integrity` reports:
38
38
 
package/docs/DEMOS.md CHANGED
@@ -1,24 +1,12 @@
1
1
  # Loki Mode -- Interactive Content Index
2
2
 
3
- Complete listing of all interactive HTML experiences in the Loki Mode repository. 13 files total across three categories.
3
+ Complete listing of all interactive HTML experiences in the Loki Mode repository. 8 files total across three categories.
4
4
 
5
- ## Walkthroughs (6 HTML files)
5
+ ## Overview (1 HTML file)
6
6
 
7
- Located in `docs/walkthrough/`.
8
-
9
- | File | Title | Description |
10
- |------|-------|-------------|
11
- | `index.html` | Build Your First App | Step-by-step tutorial from PRD to deployment |
12
- | `architecture.html` | System Architecture | Interactive SVG diagram of the full system |
13
- | `comparison.html` | Feature Comparison | Loki Mode vs competitor feature matrix |
14
- | `gallery.html` | Project Gallery | Example projects across categories |
15
- | `video-placeholder.html` | Build Process Animation | CSS-animated build walkthrough |
16
- | `hub.html` | Walkthrough Hub | Links to all walkthroughs with categories and estimated durations |
17
-
18
- An earlier version of this page also listed `build-demo.html`, `ide-demo.html`,
19
- `enterprise-demo.html`, `provider-race-demo.html`, `memory-demo.html`, and
20
- `dashboard-demo.html`. None of those files exist in the repository; they have
21
- been removed from the list rather than left as broken references.
7
+ `docs/overview.html`: Loki Mode 10 explained in five views (Users, Engineers,
8
+ Architects, Executives, Pitch), with Mermaid flow diagrams. It replaces the six
9
+ legacy-era pages that used to live in `docs/walkthrough/`.
22
10
 
23
11
  ## Demo Apps (6 HTML files)
24
12
 
@@ -43,28 +31,25 @@ Located in `examples/`. Each was generated by Loki Mode from a single prompt.
43
31
 
44
32
  | Category | Count |
45
33
  |----------|-------|
46
- | Walkthroughs | 6 |
34
+ | Overview | 1 |
47
35
  | Demo Apps | 6 |
48
36
  | Product Website | 1 |
49
- | **Total** | **13** |
37
+ | **Total** | **8** |
50
38
 
51
39
  ## Viewing Locally
52
40
 
53
41
  All files are self-contained HTML. Open directly in any browser:
54
42
 
55
43
  ```bash
56
- # Open the demo hub (links to everything)
57
- open docs/walkthrough/hub.html
58
-
59
- # Open a specific walkthrough
60
- open docs/walkthrough/architecture.html
44
+ # Open the overview
45
+ open docs/overview.html
61
46
 
62
47
  # Open a demo app
63
48
  open examples/demo-saas-dashboard.html
64
49
 
65
50
  # Or serve the entire repo with a local server
66
51
  python3 -m http.server 8080
67
- # Then visit http://localhost:8080/docs/walkthrough/hub.html
52
+ # Then visit http://localhost:8080/docs/overview.html
68
53
  ```
69
54
 
70
55
  ## Design
@@ -75,4 +60,4 @@ All interactive content shares these characteristics:
75
60
  - **No build step** -- Open in any browser, works offline (except Google Fonts)
76
61
  - **Dark theme** -- Consistent dark design with purple accent (#553DE9)
77
62
  - **Responsive** -- Adapts to mobile, tablet, and desktop viewports
78
- - **No external dependencies** -- No npm packages, no CDN libraries, no frameworks
63
+ - **No build step dependencies** -- No npm packages; `docs/overview.html` loads Mermaid from a CDN to draw its diagrams
@@ -191,9 +191,8 @@ both of us if you find it here.
191
191
 
192
192
  - **No published enterprise case studies.** We have adoption signal (fork ratio
193
193
  well above the norm for a tool this size) but no named enterprise references.
194
- - **No independent third-party benchmark placement.** The SWE-bench Verified
195
- leaderboard is months stale and every entry on it is self-reported, ours would
196
- be too.
194
+ - **No independent third-party benchmark placement.** Public leaderboards are
195
+ self-reported, and ours would be too.
197
196
  - **Only the CLI surface is audited, not whole products.** Section 6 measures
198
197
  every named competitor that ships a local CLI (opencode, aider, codex, Claude
199
198
  Code, cursor-agent) and none exposes output verification. That is a real
@@ -2,9 +2,9 @@
2
2
 
3
3
  The flagship product of [Autonomi](https://www.autonomi.dev/). Loki Mode is a spec-driven autonomous builder with a built-in trust layer that takes any spec to a deployed product and verifies completion with evidence (quality gates plus a completion council), not just a "done" claim. Complete installation instructions for all platforms and use cases.
4
4
 
5
- **Version:** v10.6.6
5
+ **Version:** v10.6.8
6
6
 
7
- **Migration Note:** Legacy engine removed in 10.6.0. Use `loki "<task>"`, `loki owner/repo#N`, or `loki backlog` instead.
7
+ **Engine note:** `loki "<task>"`, `loki owner/repo#N` and `loki quick` run the Loki 10 engine. `loki start` still routes to the legacy engine, which is being removed (planned work resumes 2026-10-07); prefer `loki owner/repo#N`. See [docs/v10/GUIDE.md](v10/GUIDE.md).
8
8
 
9
9
  ---
10
10
 
package/docs/TOOLS.md CHANGED
@@ -607,7 +607,7 @@ Model cost advisor -- /tmp/ws
607
607
  Projected saving: UNKNOWN
608
608
  Records found: 0 measured: 0 priced: 0
609
609
 
610
- Cited external benchmark (SWE-bench verified) -- NOT a measurement of your workload:
610
+ Cited external benchmark -- NOT a measurement of your workload:
611
611
  MiniMax M2.5 (open weights) score 75.8 cost $36.64
612
612
  Claude Opus 4.6 score 75.6 cost $275.76
613
613
  the harness itself was worth about 3.4 points on an identical model
@@ -53,7 +53,7 @@ Measured on this machine, not asserted.
53
53
  | **1 Systems Thinking** | STRONG | 8 quality gates, RARV-C loop, council, Evidence Receipt, dual-route parity enforced by test |
54
54
  | **2 Speed** | MEASURED, UNOPTIMISED | agent call = **980s = 96%** of iteration; all gates together = 44s |
55
55
  | **3 Reliability** | STRONG, newly so | 73 mutation-proven trust invariants; four gates were shipping broken until v8.38.0 |
56
- | **4 Extensibility** | STRONG | 5 providers, agent type registry, MCP (36 tools), plugin marketplace |
56
+ | **4 Extensibility** | STRONG | 5 providers, agent type registry, MCP (39 tools), plugin marketplace |
57
57
  | **5 Feedback Loops / Evals** | **BROKEN** | `cost_usd == 0` on **3 of 5** efficiency records; no eval score for our own harness |
58
58
 
59
59
  **Principle 5 is the gap, and it is the one Wang weights highest.** He states the
@@ -0,0 +1,29 @@
1
+ # Workspaces: one issue across several repos
2
+
3
+ Experimental, off by default. Set `LOKI_WORKSPACES=1` to enable. Design: `docs/v10/D51-PHASE-B.md`.
4
+
5
+ Define a group of repos once in `loki.yaml`:
6
+
7
+ ```yaml
8
+ workspaces:
9
+ shop:
10
+ repos:
11
+ - {repo: acme/api, path: ~/src/api, setup: "npm ci"}
12
+ - {repo: acme/web, path: ~/src/web, after: [acme/api]}
13
+ integration: {command: "make e2e", timeout_s: 900}
14
+ ```
15
+
16
+ Then:
17
+
18
+ ```bash
19
+ LOKI_WORKSPACES=1 loki workspace list
20
+ LOKI_WORKSPACES=1 loki workspace run shop acme/api#12
21
+ ```
22
+
23
+ - Each repo gets its own git worktree on a `loki/ws-<run-id>-N` branch and its own engine run. Your checkouts are not touched.
24
+ - `after` orders repos: a repo starts once its predecessors succeed. If a predecessor fails, its dependents are SKIPPED.
25
+ - A failing repo does not stop the others (continue and report). The command exits 0 only when every repo succeeded and the integration step did not fail; otherwise 1.
26
+ - The repo that owns the issue ref gets the ref; other repos get a task text naming the ref and the sibling worktree paths as read-only context.
27
+ - After all repos finish, the `integration` command runs once from the run directory with `LOKI_WS_DIR_<OWNER>_<REPO>` pointing at each worktree. A timeout counts as failed. With no integration configured the status is `not_configured`.
28
+ - Evidence is written to `.loki/workspaces/<name>/<run-id>/integration.json`: head SHA per repo, exit code, log sha256. It is not part of the Seal.
29
+ - Without `path`, a repo is cloned to `~/.loki/repos/owner__name`.
@@ -13,7 +13,7 @@ Verified from vendor documentation, 2026-07-31:
13
13
  | Cursor | No. Cloud service; embeddings are uploaded (obfuscated and encrypted). |
14
14
  | Claude Code | Partly. Runs against Bedrock / Vertex / Foundry in your own cloud, so data residency is yours -- but a model endpoint is still required. |
15
15
  | Lovable, Replit, Emergent | No. Browser products on their infrastructure. |
16
- | opencode | Structurally yes (MIT, self-hostable) -- but no SOC2, SSO, audit logs, or support. |
16
+ | opencode | Structurally yes (MIT, self-hostable) -- but no SSO, audit logs, or support. |
17
17
 
18
18
  Devin's is the strongest enterprise packaging in the category and it still
19
19
  cannot run disconnected. That is a structural property of a hosted control
@@ -84,11 +84,13 @@ jobs:
84
84
  |-------|---------|-------------|
85
85
  | `mode` | `review` | `review`, `fix`, or `test` |
86
86
  | `provider` | `claude` | `claude` (recommended), `cline`, `codex`, `aider`, or `opencode`. `gemini` was REMOVED in v7.5.18. |
87
- | `budget_limit` | `5.00` | Max cost in USD |
87
+ | `budget_limit` | `5.00` | Max cost in USD (passed to the Loki 10 engine as `--max-cost`) |
88
88
  | `max_iterations` | `3` | Max RARV cycles |
89
89
  | `github_token` | (required) | GitHub token for PR comments |
90
90
  | `prd_file` | | Path to PRD file (for fix/test modes) |
91
91
 
92
+ **Engine:** every mode runs the Loki 10 engine through `loki start "<task>" --no-pr --provider <name> --max-cost <usd>` (the same path as `loki start owner/repo#N`), with `LOKI_ENGINE=v10`. The PRD file or PR diff is folded into the task text. The action never opens a PR itself (Rule of Two). A run that crosses the cap ends BUDGET_STOP (exit 3). The legacy `--simple` path is no longer used.
93
+
92
94
  **Modes:**
93
95
 
94
96
  | Mode | Description |
@@ -0,0 +1,45 @@
1
+ # Run the Control Plane in a container
2
+
3
+ The Control Plane (run ingest API plus UI) ships as its own small image built
4
+ from `Dockerfile.control-plane`. It serves on port 47821, stores its SQLite
5
+ database under `/data`, runs as a non-root user and contains no secrets.
6
+
7
+ The server has no authentication of its own. Keep it on a private network or
8
+ behind an authenticating proxy; do not expose it publicly.
9
+
10
+ ## Docker
11
+
12
+ ```bash
13
+ docker build -f Dockerfile.control-plane -t loki-control-plane .
14
+ docker run -d -p 47821:47821 -v loki-control:/data loki-control-plane
15
+ LOKI_CONTROL_URL=http://localhost:47821 loki control status
16
+ ```
17
+
18
+ Health: `/health` (liveness) and `/ready` (database check).
19
+
20
+ ## Helm
21
+
22
+ ```bash
23
+ helm install loki-control ./deploy/helm/control-plane \
24
+ --namespace loki --create-namespace \
25
+ --set image.repository=<your-registry>/loki-control-plane \
26
+ --set existingSecret=autonomi-secrets \
27
+ --set 'secretKeys={ANTHROPIC_API_KEY}'
28
+ ```
29
+
30
+ Provider keys are read from an existing Kubernetes Secret you name with
31
+ `existingSecret`; nothing is stored in values. Ingress is off by default
32
+ (`ingress.enabled=true` to turn it on). Keep `replicas: 1` (single SQLite volume).
33
+
34
+ ## ECS
35
+
36
+ See `deploy/ecs/README.md` and `deploy/ecs/control-plane-task.json` (Fargate,
37
+ EFS volume, secrets from Secrets Manager ARNs).
38
+
39
+ ## Configuration
40
+
41
+ | Variable | Default in image | Meaning |
42
+ | --- | --- | --- |
43
+ | `PORT` | 47821 | listen port |
44
+ | `LOKI_CONTROL_HOST` | 0.0.0.0 | bind address (outside the image: 127.0.0.1) |
45
+ | `LOKI_CONTROL_DB` | /data/control.db | SQLite path |
@@ -26,6 +26,8 @@ The dashboard automatically syncs with Loki Mode when it's running, polling `das
26
26
 
27
27
  **Ports:** The dashboard and API run on unified port **57374** (FastAPI serves both). See [INSTALLATION.md](INSTALLATION.md#ports) for details.
28
28
 
29
+ **Bound port:** if 57374 is held by something that is not this install's dashboard (another project, an older version, a foreign process), Loki walks to the next free port and never reuses or opens the foreign one. `loki start` and `loki dashboard` open and print the URL of the port actually bound; `loki start` publishes it to `.loki/dashboard/url`. A running dashboard is reused only when its `/health` reports the same version and install path.
30
+
29
31
  ---
30
32
 
31
33
  ## UI Components
@@ -97,3 +97,7 @@ Default-on in the Bun runner (see `CHANGELOG.md` v7.x entries; documented in `sk
97
97
  - `LOKI_HANDOFF_MD` -- write a structured handoff doc before iteration close.
98
98
 
99
99
  These knobs together implement the RARV-C (closure) loop: findings -> override council -> learnings -> handoff. Reference: `skills/quality-gates.md`, `CHANGELOG.md` entries from v7.x for default-on flip and override-council semantics.
100
+
101
+ ## Worktree substrate (autonomy/lib/worktree_prep.py)
102
+
103
+ `prepare_worktree(source_repo, dest, branch, setup=None, base=None)` creates an isolated git worktree and returns `{path, base_sha, deps, left_out_changes}`. The start point is `origin/HEAD` after a fetch (when a remote exists), else HEAD. Uncommitted edits in the source checkout are never carried or stashed; their count is reported as `left_out_changes`. An fcntl lock at `~/.loki/repos/<slug>.lock` covers fetch and worktree add. Dependencies: a `setup` command run in the worktree, else a copy-on-write copy of ignored top-level `node_modules`, `.venv`, `venv`, `vendor` (refused as "copy unsafe, declare setup" if it holds absolute symlinks or editable finders), else `none`. CLI: `python3 autonomy/lib/worktree_prep.py SRC DEST BRANCH [--setup CMD] [--base REF]` prints the result as JSON. Not yet wired into backlog or the UI.
@@ -72,7 +72,7 @@ autonomy/ # Runtime and autonomous execution
72
72
  context-tracker.py # Context window usage tracking
73
73
  notification-checker.py # Notification trigger evaluation
74
74
  templates/ # 21 PRD templates (saas, cli, discord-bot, etc.)
75
- benchmarks/ # SWE-bench and HumanEval benchmarks
75
+ benchmarks/ # benchmark harnesses
76
76
  ```
77
77
 
78
78
  ## Codebase Knowledge Graph (Quick Reference)
@@ -91,7 +91,7 @@ Line counts approximate; re-run `wc -l` for exact.
91
91
  | `memory/storage.py` | ~2,000 | File-based memory backend |
92
92
  | `memory/engine.py` | ~1,600 | Memory orchestrator |
93
93
  | `memory/consolidation.py` | ~1,100 | Episodic-to-semantic pipeline |
94
- | `mcp/server.py` | ~2,700 | MCP server (36 tools: 28 in-file + 7 magic + 1 gated managed; +3 resources, 2 prompts) |
94
+ | `mcp/server.py` | ~2,700 | MCP server (39 tools: 31 in-file + 7 magic + 1 gated managed; +3 resources, 2 prompts) |
95
95
  | `providers/loader.sh` | ~185 | Provider loader |
96
96
 
97
97
  ### Key Function Lookup
@@ -157,6 +157,5 @@ gh release view vX.Y.Z
157
157
  ## Testing
158
158
 
159
159
  ```bash
160
- ./benchmarks/run-benchmarks.sh humaneval --execute --loki
161
- ./benchmarks/run-benchmarks.sh swebench --execute --loki
160
+ npm test
162
161
  ```
@@ -202,7 +202,7 @@ Key methods:
202
202
  - `AuditLog.verifyChain()` -- Verify hash chain integrity, returns `{ valid, entries, brokenAt, error }`
203
203
  - `AuditLog.readEntries(filter)` -- Query entries with `who`, `what`, `since`, `until` filters
204
204
 
205
- The public API at `src/audit/index.js` adds compliance reporting (`generateReport('soc2'|'iso27001'|'gdpr')`) and data residency checks (`checkProvider(provider, region)`).
205
+ The public API at `src/audit/index.js` adds audit report summaries and data residency checks (`checkProvider(provider, region)`).
206
206
 
207
207
  **Python Audit (Dashboard-Level):** `dashboard/audit.py`
208
208
 
@@ -474,8 +474,8 @@ enterprise:
474
474
  ## Compliance Reporting
475
475
 
476
476
  **Loki does not generate framework-specific compliance reports.** An earlier
477
- version of this page showed `loki enterprise audit export --format soc2|hipaa|pci`
478
- and `loki compliance report --framework <name>`. Neither exists:
477
+ version of this page showed framework-specific export and report commands.
478
+ They do not exist:
479
479
  `loki enterprise audit` has only `summary` and `tail`, and `loki compliance`
480
480
  has only `snapshot`.
481
481
 
package/docs/slack.md ADDED
@@ -0,0 +1,26 @@
1
+ # Two-way Slack (preview)
2
+
3
+ Off by default. Set `LOKI_SLACK_INBOUND=1` to enable the inbound handler.
4
+
5
+ ```bash
6
+ export LOKI_SLACK_INBOUND=1
7
+ export SLACK_BOT_TOKEN=... # from env only, never stored by Loki
8
+ export SLACK_SIGNING_SECRET=...
9
+ loki slack serve --port 3000 # binds 127.0.0.1 unless --host is given
10
+ ```
11
+
12
+ Point the Slack Events API request URL at this server through a tunnel or reverse proxy you control.
13
+
14
+ ## What it does
15
+
16
+ - `@loki <issue ref or task text>` in a channel starts a Loki 10 run (the same entry as `loki "<task>"`) and replies in the thread with the run id.
17
+ - When the run ends BLOCKED, the question is posted in the same thread. A reply in that thread starts a follow-up run with your answer added to the original task (v10 has no in-place resume, BLOCKED is terminal).
18
+ - Every request is verified with the Slack signature (HMAC sha256 over `v0:timestamp:body`, constant-time compare, timestamps older than 5 minutes are rejected). Retried events are deduplicated.
19
+
20
+ ## App manifest scopes
21
+
22
+ Bot token scopes: `app_mentions:read`, `chat:write`, `channels:history` (and `groups:history` for private channels, `im:history` for DMs).
23
+
24
+ Subscribe to bot events: `app_mention`, `message.channels` (plus `message.groups` for private channels).
25
+
26
+ Outbound notifications (PR opened, BLOCKED, finished) are separate and use `LOKI_SLACK_WEBHOOK_URL`.
package/docs/v10/BOARD.md CHANGED
@@ -697,4 +697,29 @@ Source: ~/git/autonomi-dev/research/2026-09-30-adoption/SWARM-PROMPT-ADOPTION.md
697
697
  | A-134b | A-134 opus notes: (1) standalone autonomy/verify.sh prints no attestation line (only `loki verify` has _deploy_receipt_verdict); print `attestation: UNCHECKED (run via loki verify)` instead of silence; (2) the quiet failure tail grep `[Ff]ailed` matched the RALPH system-prompt line and printed ~1.5k chars; anchor to `^\[(ERROR|WARN)\]` or cap line length; (3) the quiet inner run starts as a background job so its stdin is /dev/null even from a TTY: pause-mode keypress resume changes for quiet runs; (4) `loki quick --verbose` is also the A-122 cmd_quick flag, done | autonomy/verify.sh, autonomy/run.sh | MEDIUM | each note has a test | merged@2026-10-01T05:22Z | |
698
698
  | A-134c | A-134b r1 review finding: provider call sites in autonomy/run.sh (mainline claude -p at about 25455/25460, provider_invoke_argv about 1050/1053) do not redirect stdin, so under LOKI_VERBOSE=1 (and any non-quiet path) a parent stdin pipe that never closes blocks `claude -p` reading stdin (pre-existing). Fix: `< /dev/null` at provider invocations that pass the prompt as an argument | autonomy/run.sh (provider call sites only), providers/*.sh, tests | MEDIUM | never-closing stdin pipe: verbose `loki quick` completes under timeout 60 | merged@2026-10-01T09:00Z | |
699
699
  | A-130 | v10 quiet by default (item 2) | see plan A-130 | MEDIUM | first-run-gate assertion per plan card | released@2026-10-01T01:19Z | Wave per plan section 5; one writer per file. Released in v10.5.14 (merge a518bfea is an ancestor of v10.5.14). |
700
- | A-130b | A-130 Reason line prints first_error from a failing check verbatim (capped at 200 chars, control chars stripped) but unredacted: a `ghp_` token in a test failure line reaches the terminal. No TS redactor is reachable from engine10 core (only autonomy/lib/proof_redact.py). Port the token patterns to a small TS helper outside core or redact first_error where it is captured in verify | loki-ts/src (util), verify.ts or output.ts, tests | MEDIUM | ghp_/sk- token in first_error prints redacted | released@2026-10-01T02:27Z | ; sonnet APPROVE be50510f (redaction before cap, parity with proof_redact.py) Released in v10.5.16 (merge f214a0fa is an ancestor of v10.5.16). |
700
+ | A-130b | A-130 Reason line prints first_error from a failing check verbatim (capped at 200 chars, control chars stripped) but unredacted: a `ghp_` token in a test failure line reaches the terminal. No TS redactor is reachable from engine10 core (only autonomy/lib/proof_redact.py). Port the token patterns to a small TS helper outside core or redact first_error where it is captured in verify | loki-ts/src (util), verify.ts or output.ts, tests | MEDIUM | ghp_/sk- token in first_error prints redacted | released@2026-10-01T02:27Z | ; sonnet APPROVE be50510f (redaction before cap, parity with proof_redact.py) Released in v10.5.16 (merge f214a0fa is an ancestor of v10.5.16). |
701
+ | D61-17 | D62 P1: D61 slice 17, large eval tier (8 lg- tasks, arms v10-parallel, v10-seq, raw-claude, tokens per completed) | eval/loki10/tasks/lg-*, eval/loki10/harness.py, eval/loki10/summarize, eval/loki10/test-harness.sh | MEDIUM | building@2026-10-03T01:52Z | Restart (prior worktree held no saved work). docs/v10/D61-SPEED.md section 4 row 17. |
702
+ | D61-01 | D62 P1: D61 slice 1, pre-model stage timer | engine10/supervisor.ts, engine10/output.ts, tests engine10/premodel_timing.test.ts | MEDIUM | building@2026-10-03T01:52Z | Behind LOKI_SPEED=1. D61-SPEED.md row 1. |
703
+ | D61-08 | D62 P1: D61 slice 8, deterministic decomposer DAG | new engine10/decompose.ts, tests engine10/decompose.test.ts | MEDIUM | building@2026-10-03T01:52Z | Behind LOKI_SPEED=1. D61-SPEED.md row 8. |
704
+ | D62-FIX | D62 P3: root action.yml routes to Loki 10 (no `--simple`), plus one real end-to-end BUDGET_STOP exit 3 test | action.yml, tests for action and budget e2e | MEDIUM | building@2026-10-03T01:52Z | Small fixes from the D60 report. |
705
+ | D61-02 | D62 P1: D61 slice 2, lean prefix default plus byte-identity guard | e10ext/lean_prefix.ts, stages/implement.ts, stages/fix.ts | MEDIUM | building@2026-10-03T01:55Z | Next seat. |
706
+ | D61-07 | D62 P1: D61 slice 7, worktree dependency prep | autonomy/lib/worktree_prep.py, tests/test-worktree-prep.sh | MEDIUM | building@2026-10-03T01:55Z | Next seat. |
707
+ | D62-VIS | D62 P2a: visual evidence in PRs (local Playwright screenshots of changed pages in the PR body) | TBD by architect | MEDIUM | building@2026-10-03T01:55Z | Needs a slice card (D63 order 2 and 5). |
708
+ | D62-JIRA | D62 P2c: Jira and Linear intake into v10 via autonomy/issue-providers.sh, intake only | TBD by architect | MEDIUM | building@2026-10-03T01:55Z | Needs a slice card (D63 order 2 and 5). |
709
+ | D64-VIS | D64 1: visual evidence, local Playwright screenshots plus trace or video of changed pages in the PR body and receipt | new loki-ts/src/engine10/evidence_visual.ts, engine10/pr_body.ts hook, tests | MEDIUM | parked | D64 withdrawn 00:25Z; not started. |
710
+ | D64-E2E | D64 2: verify runs the repo's Playwright or Cypress e2e when present; mobile only if already installed; never claim coverage that did not run | new loki-ts/src/engine10/e2e.ts, verify stage hook, tests | MEDIUM | parked | D64 withdrawn 00:25Z; not started. |
711
+ | D64-SERVE | D64 4: loki serve webhooks (GitHub, Linear, Jira) and cron schedules in the Control Plane | packages/control-plane/src/server/triggers*, tests | MEDIUM | parked | D64 withdrawn 00:25Z; not started. |
712
+ | D64-MERGE | D64 6: loki merge, merge queue landing approved Loki PRs in order with re-verify on the updated base | new loki-ts/src/engine10/merge_queue.ts, CLI arm, tests | MEDIUM | parked | D64 withdrawn 00:25Z; not started. |
713
+ | D64-REVIEW | D64 7: loki review <pr> posts a review with a deterministic risk score | new loki-ts/src/engine10/review_risk.ts, CLI arm, tests | MEDIUM | parked | D64 withdrawn 00:25Z; not started. |
714
+ | D64-PLAN | D64 8: loki plan shows contract, units and files for approval before running | new loki-ts/src/engine10/plan_mode.ts, CLI arm, tests | MEDIUM | parked | D64 withdrawn 00:25Z; not started. |
715
+ | D64-MEM | D64 9: project memory (D50 item 3) in the v10 context pack | new loki-ts/src/e10ext/project_memory.ts, tests | MEDIUM | parked | D64 withdrawn 00:25Z; not started. |
716
+ | D64-INTAKE | D64 10: Jira, Linear and Sentry intake into v10 via autonomy/issue-providers.sh | autonomy/issue-providers.sh, v10 intake ref parsing, tests | MEDIUM | parked | D64 withdrawn 00:25Z; not started. |
717
+ | D64-EASE | D64 ease: first-run gate ease row (time to first PR, prompt count), published in METRICS | first-run gate script, docs/v10/FIRST-RUN-GATE.md, METRICS | MEDIUM | parked | D64 withdrawn 00:25Z; not started. |
718
+ | D61-05 | D65: D61 slice 5, warm engine socket in the dashboard daemon | engine10/dashboard/server.ts, new engine10/warm.ts, tests | MEDIUM | building@2026-10-03T01:55Z | D65 phase 1. |
719
+ | D61-06 | D65: D61 slice 6, CLI warm client with 50ms socket try and cold fallback | engine10/cli.ts, new engine10/warm_client.ts, tests | MEDIUM | building@2026-10-03T01:55Z | D65 phase 1. |
720
+ | D65-CP | D65 D63-3: Control Plane as the default UI plus BLOCKED answer UI | packages/control-plane, loki control wiring | MEDIUM | building@2026-10-03T01:55Z | D65 phase 1. |
721
+ | D65-SLACK | D65 D63-4: Slack two-way (@loki starts a run, BLOCKED answers return) | new integrations slack module, docs | MEDIUM | building@2026-10-03T01:55Z | D65 phase 1. |
722
+ | D65-SPEC | D65 D63-6: spec to delivery contract with criteria traced in the receipt | new engine10/contract.ts, receipt fields | MEDIUM | building@2026-10-03T01:55Z | D65 phase 1. |
723
+ | D65-MULTI | D65 D63-7: multi-repo workspaces, D51 Phase B slices behind LOKI_WORKSPACES | per docs/v10/D51-PHASE-B.md | MEDIUM | building@2026-10-03T01:55Z | D65 phase 1. |
724
+ | D65-MCP | D65 D63-8: MCP server tools run, status and verify for v10 | mcp/server.py, tests | MEDIUM | building@2026-10-03T01:55Z | D65 phase 1. |
725
+ | D65-CONT | D65 D63-9: one container for the Control Plane plus Helm and ECS examples | Dockerfile.control-plane, deploy/helm, deploy/ecs, docs | MEDIUM | building@2026-10-03T01:55Z | D65 phase 1. |
@@ -100,3 +100,7 @@ Dependencies to add (none present today; web-app/package.json pins react 19, vit
100
100
  4. Retention: keep events forever, or prune `heartbeat` after N days?
101
101
  5. One shared token for ingest and read, or separate ingest-only tokens per team (D54 scale, team budgets)?
102
102
  6. Workspaces: once D51 Phase B lands, should group.json also be shipped as envelope events, the same way as backlog (CP-13)?
103
+
104
+ ## BLOCKED answer and default entry (D65)
105
+
106
+ A run blocked on a spec conflict shows its question in the run view with an answer box. The answer is POSTed to `/v1/runs/<source>/<run>/answer` (application/json, `answer` up to 4000 chars, the run must be blocked, ids are validated, the server binds 127.0.0.1) and written to `$LOKI_CONTROL_ANSWER_DIR` (default `~/.loki/control/answers`) as `<source>/<run>.answer.txt`, mode 0600. The engine has no in-place resume reader, so resuming is manual: `loki "$(cat <file>)"`. `LOKI_CONTROL_DEFAULT=1` (off by default) makes `loki dashboard` open the Control Plane.
@@ -0,0 +1,83 @@
1
+ # D61: speed for users (design)
2
+
3
+ Architect design, 2026-10-02, base fbbd31299, v10.6.6. Design only; nothing below is built unless marked "exists". Build flag `LOKI_SPEED=1` while slices land; it flips to default-on (and the flag is deleted) when slice 17's targets pass. Users never set a flag or write config.
4
+
5
+ ## 1. What the user sees (from the terminal outward)
6
+ - First run in a repo: `loki "fix the off-by-one in pager.py"`. Loki prints one start line, then streams stage lines, then the PR:
7
+ `loki: small task, lean path, sonnet, 3 impacted tests, cap $0.50, warm in 0.4s (first run here: maps built in 2.1s)`
8
+ Second and later runs say `warm in 0.1s`. No daemon setup, no prompt, no config: the warm engine starts itself in the background after the first run and is used if alive, ignored if not.
9
+ - Big work: `loki ./spec.md` or `loki "add CSV export to api, web and cli"`. Loki prints its decision before spending a token on code:
10
+ `loki: 5 units, 3 in parallel (decomposable: disjoint write sets, 1 shared file serialized), est 6-9 min`
11
+ `loki: live at http://127.0.0.1:57375/g/<group>` (or the Control Plane URL when LOKI_CONTROL_URL is set)
12
+ then a compact unit table repainted every 2s on a TTY (one line per state change otherwise): unit, files, stage, elapsed, tokens.
13
+ - When the work does not split: `loki: sequential (reason: units share 4 of 6 files)`. It never forces parallel.
14
+ - The end: one PR with a unit table (goal, files, tests, tokens, model per unit), one combined receipt, and a final line `done in 7m12s, 412k tokens (5 units, 1 fix unit), PR <url>`.
15
+ - `loki backlog` keeps per-issue parallelism (exists) and shares one slot pool with any issue that decomposes.
16
+
17
+ ## 2. What exists (evidence) and the gap
18
+ | Piece | Where | Status |
19
+ |---|---|---|
20
+ | Lean path (skip Plan and Wall for small tasks with relevant tests) | engine10/sizing.ts:44-46, stages/plan.ts:74-77, stages/wall.ts:145 | exists; gap: only fires when the task names a file (sizing.ts:10 namedFiles) |
21
+ | Byte-stable prefix | e10ext/lean_prefix.ts (LOKI_E10_PREFIX=lean) | exists, opt-in; no guard that every stage prompt starts with identical bytes |
22
+ | Repo map and test map cached by HEAD^{tree} | engine10/cache.ts, repomap.ts, testmap.ts | exists on disk; rebuilt per process, no in-memory warm copy |
23
+ | Impacted tests only | testmap.ts:201 impactedRefs, stages/verify.ts:251 | exists |
24
+ | Repo context pack (20 files plus impacted tests) | e10ext/context.ts | exists |
25
+ | Scope control (out-of-scope edits reverted, listed NOT PROVEN) | e10ext/scope.ts, e10ext/commit_filter.ts | exists; reusable as a unit's write-set fence |
26
+ | Sonnet-then-escalate cascade | sizing.ts:54 cascadeEnabled | exists |
27
+ | Cheap-model already-done check on the critical path | already_done.ts:167-182 (wallModel) | exists; cost on the small path not yet measured |
28
+ | Per-session child process | session.ts:1-2 (self-respawn through cli.ts) | exists; cold bun start per session |
29
+ | Parallel worktree runner | autonomy/lib/backlog.py:180-257 (worktree add -B loki/backlog-N, concurrency, daily cap) | exists; issue refs only, no dependency prep, in-memory queue |
30
+ | Worktree dependency prep (`worktree_prep`) | none (grep finds nothing); D51-PHASE-B.md notes fresh worktrees lack node_modules/.venv | MISSING |
31
+ | Decomposer, integrator, group run | none | MISSING |
32
+ | Local dashboard (SSE, folds .loki/runs) | engine10/dashboard/server.ts (port 57375) | exists; one repo, no group view |
33
+ | Control Plane v0 and live shipping | loki-ts/src/commands/control.ts, packages/control-plane/, e10ext/ship_hook.ts | exists, preview (LOKI_CONTROL=1); no group_id column |
34
+ | Eval tiers and token capture | eval/loki10/harness.py:53 TIERS includes large, :1157 _v10_tokens; stage-profile.py | exists; 0 lg- tasks, no parallel or sequential arm split |
35
+
36
+ ## 3. Design
37
+ **A. Small path (seconds).** (1) Warm engine: the engine10 dashboard process (already a long-lived bun server on 127.0.0.1) also serves a Unix socket `~/.loki/run/engine.sock`; it holds repo map and test map in memory keyed by (repoKey, HEAD^{tree}, dirty-file hash) and runs intake and sizing in-process. The CLI tries the socket for 50ms, else runs cold exactly as today and spawns the daemon detached for next time (fail-safe: no daemon never changes a result). (2) Pre-model overhead budget 2s, measured per stage from argv to the first provider byte and printed as `warm in Xs`. (3) Lean prefix becomes the default with a byte-identity guard. (4) Wider lean eligibility: a task that names no file uses context.ts keyword selection over the cached map, still requiring impacted tests (fail-safe keeps Wall). (5) The already-done model check moves off the critical path: it runs only when deterministic hits exist, concurrently with implement, and cancels implement on a confirmed hit.
38
+
39
+ **B. Big work (minutes, in parallel).** Decomposer (engine10/decompose.ts, deterministic first): split the task or spec into requirement items (numbered or bulleted lines, headings, issue checklists); map each to a write set via context.ts selection plus module boundaries (top-level dirs, package workspaces, test map ownership); union units whose write sets overlap; mark shared files (lockfiles, package manifests, barrels, CHANGELOG) as serialized. A cheap model (wallModel) may only confirm or merge proposed units against a strict JSON schema; invalid output means the deterministic DAG stands. Decomposability check: parallel only if at least 2 units, write-set overlap ratio below 0.2, no unit reads a symbol another unit creates, and each unit sizes small or normal. Otherwise one sequential run, reason printed. Runner: backlog.py's launch loop generalised to units (same worktree layout, branches loki/unit-<group>-<n>), each unit a full v10 run with `--no-pr`, its write set enforced by scope.ts, its own context pack, cheapest capable model via the cascade (escalation only on a failed check, research section 3). Integrator (engine10/integrate.ts): merge unit branches in DAG order onto loki/group-<id>; conflicts become targeted fix units (conflict hunks only); run the full suite once; failures map back to units through the test map and become fix units (at most 2 rounds); Seal once on the combined diff; one PR. Stacked PRs are a later option, not v1.
40
+
41
+ **C. Tokens at or below one sequential session.** No transcript sharing between units; each unit gets only its context pack and the shared lean prefix (cache hits across units); per-unit token budget = sequential estimate / units x 1.1, enforced by the existing budget path; deterministic search and test selection, no model-driven exploration in the decomposer. Every run prints tokens; the eval compares against sequential and raw.
42
+
43
+ **D. Live view.** run.started gains `group_id`, `unit_id`, `deps`; a group event file records the DAG and integrator stages. The dashboard adds /g/<group> (unit grid); the Control Plane runs table gains group_id so the same grid works there.
44
+
45
+ ## 4. Slices (numbered; each ships with its METRICS row)
46
+ | # | Goal | File set | Wall check | Budget | Tier |
47
+ |---|---|---|---|---|---|
48
+ | 1 | Pre-model stage timer: argv to first provider byte, per stage, in run.completed data and the start line | engine10/supervisor.ts, engine10/output.ts, tests engine10/premodel_timing.test.ts | test asserts the timing fields exist and sum within 50ms of the span; stage-profile.py prints a pre_model column | 30m | MEDIUM |
49
+ | 2 | Lean prefix default plus byte-identity guard across implement, fix, wall, plan prompts | e10ext/lean_prefix.ts, engine10/stages/implement.ts, stages/fix.ts, tests e10ext/prefix_identity.test.ts | guard fails when any stage prompt's first 200 bytes differ; second run shows cache_read tokens over 0 in the cost event | 30m | MEDIUM |
50
+ | 3 | Lean eligibility without a named file (context.ts selection), fail-safe to Wall | engine10/sizing.ts, tests engine10/sizing_lean.test.ts | fixtures: unnamed-file small task goes lean only when impacted tests exist; no-runner repo stays wall | 30m | MEDIUM |
51
+ | 4 | Already-done check off the critical path (deterministic hits gate it, runs concurrent with implement) | engine10/already_done.ts, engine10/stages/intake.ts, tests already_done.test.ts | no-hit task makes zero cheap-model calls; augmentiq #52 fixture still ALREADY_SATISFIED | 30m | HIGH |
52
+ | 5 | Warm engine socket in the dashboard daemon: in-memory maps keyed by tree plus dirty hash | engine10/dashboard/server.ts, new engine10/warm.ts, tests engine10/warm.test.ts | warm intake under 300ms on the fixture repo; dirty edit invalidates; daemon killed mid-run gives the same verdict cold | 30m | MEDIUM |
53
+ | 6 | CLI client: 50ms socket try, cold fallback, detached daemon start after first run, `warm in Xs` text | engine10/cli.ts, new engine10/warm_client.ts, tests warm_client.test.ts | no daemon: identical events to today; LOKI_NO_BROWSER honoured; no test binds 57374-57399 | 30m | MEDIUM |
54
+ | 7 | Worktree dependency prep: APFS/reflink clone of node_modules, .venv reuse, else install | new autonomy/lib/worktree_prep.py, tests/test-worktree-prep.sh | fresh worktree runs the fixture's tests with no network; copy-on-write used on darwin | 30m | MEDIUM |
55
+ | 8 | Decomposer, deterministic DAG (items, write sets, union on overlap, shared files serialized) | new engine10/decompose.ts, tests engine10/decompose.test.ts | 6 fixture specs: expected unit count and write sets; same input gives byte-identical DAG | 30m | MEDIUM |
56
+ | 9 | Decomposability check plus optional cheap-model confirm under a strict schema | engine10/decompose.ts (check fn only after 8 merges), tests decompose_check.test.ts | sequential fixtures return sequential with reason; malformed model JSON keeps the deterministic DAG | 30m | MEDIUM |
57
+ | 10 | Unit runner: backlog.py launch loop accepts a DAG, branches loki/unit-<g>-<n>, deps respected, one slot pool shared with issues | autonomy/lib/backlog.py, tests/test-backlog-units.sh | LOKI_BACKLOG_LAUNCHER stub: max concurrency never exceeded, dependent unit starts only after its parent passes | 30m | MEDIUM |
58
+ | 11 | Unit run mode: write set as scope fence, per-unit context pack and token budget, no transcript in | e10ext/scope.ts, e10ext/context.ts, tests e10ext/unit_mode.test.ts | an edit outside the write set is reverted and listed NOT PROVEN; brief contains only pack files | 30m | HIGH |
59
+ | 12 | Integrator merge and fix units (conflict hunks, failing tests mapped to units, 2 rounds max) | new engine10/integrate.ts, tests engine10/integrate.test.ts | fixture with one planted conflict and one cross-unit failure ends VERIFIED with exactly 2 fix units | 30m | HIGH |
60
+ | 13 | One Seal and combined receipt (per-unit sub-receipts) plus PR body unit table | engine10/stages/seal.ts, engine10/types.ts, engine10/pr_body.ts, tests seal_group.test.ts | `loki verify` passes on the combined receipt; tampering one unit's events fails it | 30m (60m review) | HIGH |
61
+ | 14 | Group events and terminal unit table (TTY repaint 2s, plain lines otherwise) | engine10/events.ts, engine10/output.ts, tests output_group.test.ts | snapshot tests for TTY and non-TTY; validateEnvelope accepts group fields | 30m | MEDIUM |
62
+ | 15 | Live grid: dashboard /g/<group> and Control Plane group_id column | engine10/dashboard/page.ts, packages/control-plane/src/server/runs.ts, packages/control-plane/src/db/, tests | ingesting a 3-unit fixture shows 3 rows with stage and elapsed; missing data says "no data ingested" | 30m | MEDIUM |
63
+ | 16 | Route `loki "<task>"` and `loki <file>` through decomposer behind LOKI_SPEED | engine10/cli.ts (route only), engine10/supervisor.ts (group entry), tests route_group.test.ts | flag off: byte-identical behaviour; flag on: small task never decomposes | 30m | HIGH |
64
+ | 17 | Speed eval tier: 8 spd- tasks (4 decomposable, 4 sequential by design), arms v10-parallel, v10-seq, raw-claude, tokens per completed for every arm | eval/loki10/tasks/spd-*, eval/loki10/harness.py, eval/loki10/summarize, eval/loki10/test-harness.sh | D38 provenance check passes; summarize prints wall, completion, tokens per arm; a capped arm is never completed | 30m x2 (tasks, harness) | MEDIUM |
65
+ | 18 | METRICS D61 section and the flag flip decision | docs/v10/METRICS.md | rows cite results.jsonl paths; losses shown; flip only if section 5 targets hold | 15m | LOW |
66
+
67
+ Order: 1, 2, 7, 8 start now (disjoint files); 3-6 and 9-11 next; 12-16 after 8-11; 17 in parallel from the start; 18 last. HIGH slices get opus reviewers (D12).
68
+
69
+ ## 5. Targets (measured on the eval, never claimed)
70
+ - A. Small tier (29 tasks): Loki p50 time to PR at or below raw `claude -p` (39s baseline, METRICS gate report) on the same model; tokens per completed at or below raw; pre-model overhead p50 under 2s warm. Losses published, including the D50 sonnet loss.
71
+ - B. Speed tier (authored spd- tasks, D67): on decomposable tasks, parallel wall time at most 0.5x sequential with completion not lower; on sequential-by-design tasks the check must choose sequential (a parallel run there counts as a loss).
72
+ - C. Parallel total tokens at or below v10-seq on the same task; report tokens per completed task for all three arms.
73
+ - D. Every slice adds its METRICS row (what changed, command, result file, exit code). Nothing flips to default on a fixture result alone (feedback: fixture-green is not verification).
74
+ - E. The `LOKI_SPEED` default flips only if 5 B and 5 C hold on the speed tier AND, on the real medium pub- tasks (plus any D34 large tasks on main), `LOKI_SPEED=1` shows completion not lower and p50 wall and tokens per completed not worse than `LOKI_SPEED=0`, at 2 runs per arm.
75
+
76
+ ## 6. Risks and non-goals
77
+ - Research section 4: parallel lost 39-70% on sequential work and multi-agent runs cost about 15x tokens. Defence: conservative check, no transcript sharing, single writer per file, one central integrator.
78
+ - Warm daemon must never be load-bearing: cold path stays the reference; slice 6 asserts identical events.
79
+ - Not in v1: stacked PRs, cross-repo groups (D51 Phase B), remote runners.
80
+
81
+ ## Slice 2 status: stage prefix (LOKI_SPEED=1)
82
+
83
+ With `LOKI_SPEED=1` (default off), the implement, fix, wall and plan stage prompts all begin with the same fixed block (`STAGE_PREFIX` in `loki-ts/src/e10ext/lean_prefix.ts`), so the provider prompt cache can reuse it across stages. With the flag off, prompts are unchanged byte for byte. `loki-ts/tests/e10ext/prefix_identity.test.ts` asserts the first 200 bytes match across stages and that flag-off output is unprefixed.
@@ -482,3 +482,36 @@ Loki's definition: "autonomous software factory that runs with the knowledge of
482
482
 
483
483
  ## D59: two-hour finish, then stop until next week (founder, 2026-10-01 18:10Z, override 18:14Z)
484
484
  Founder: "complete all loki mode work faster ... everything complete in two hours with least tokens used and highest code push and releases ... even if means no testing". Override given directly at 18:14Z: until 20:10Z, merge and release without waiting for Tests, Bun Parity, Coverage or Security Audit. Kept: rollback of `latest` by dist-tag if Post-Release Smoke shows `npm i -g loki-mode` or `loki --version` broken. Each release's CI result is recorded in docs/v10/HANDOFF-NEXT-WEEK.md. Order: 10.6.0, W1-ROUTE, D58-SCOPE, LEAK3, CP-RELAND, D57 W1 docs, one real-repo gate run against latest. Target 19:15Z, hard stop 20:10Z, then no agents, loops or crons until next week. Workflow-level gates (release.yml required-ci, pre-push secret scan) are not edited.
485
+
486
+ ## D60: one-hour user-impact sprint (founder via the autonomi-dev session, 2026-10-02 22:45Z)
487
+ Ends the D59 pause early for this sprint only. Five slices, released as soon as each is green: (1) `loki start` runs Loki 10, after porting moat P9 to the v10 issue path and re-landing b2e3afc43; (2) the dashboard opens the port it bound (LEAK3, with test-ui-bare-loki fixed); (3) an evidence-rich PR body (INTEL-3); (4) the shipped GitHub Action runs `loki owner/repo#N`, plus a documented nightly `loki backlog` cron; (5) a visible cost cap (INTEL-2) in the v10 start line. CI gates are unchanged: Tests, Bun Parity, Coverage and Security Audit must be green before a release, plus the two-leg promote. Anything red at about minute 50 is dropped. Report at minute 60, then stop per HANDOFF-NEXT-WEEK.md.
488
+
489
+ ## D61: speed for users (founder via the autonomi-dev session, 2026-10-02 22:50Z)
490
+ A product feature, not a build-process change: `loki "small task"` should finish in seconds, at or below raw Claude Code time and tokens. `loki "big task"` and `loki backlog` should decide by themselves whether the work splits, run the units in parallel worktrees on the user's machine, merge, test once and open one PR, using no more tokens than one sequential session, visible live and with no flags. Design only for now: docs/v10/D61-SPEED.md (an opus architect). Builders start after D60 and after the founder's go. Every target is measured on an eval arm and published in METRICS, losses included.
491
+
492
+ ## D60-5 default cost cap (2026-10-02 23:05Z)
493
+ A Loki 10 run caps priced spend at $20.00 by default. `--max-cost N` beats loki.yaml `budgets.per_run`, which beats the default. The start line prints the cap and its source. Hitting the cap ends the run as BUDGET_STOP with exit 3. Unpriced sessions (no cost event) never count toward the cap, so a subscription or local provider never stops on it.
494
+
495
+ ## D62: resume now, no pause until 2026-10-07 (founder via the autonomi-dev session, 2026-10-03 about 00:05Z)
496
+ Founder: "don't have to pause until wed oct 7th, remove that and resume now". Ends the D59 pause. Pacing follows the usage governor: week at 44% with about 4.6 days to reset, so about 0.5% per hour, seats scaled to live /usage. Trains and the D49 auto-promote continue unchanged. Priorities in order: (1) D61 speed (slice 17 large eval arm, then warm maps, then decomposer, integrator and parallel units, all behind LOKI_SPEED until the eval holds); (2) Vorflux gaps: visual evidence in PRs (local screenshots of changed pages when the repo has Playwright or a web app), multi-repo workspaces (D51 Phase B behind LOKI_WORKSPACES), Jira and Linear issue intake into v10 reusing autonomy/issue-providers.sh (intake only, no sync claims), project memory (D50 item 3); later merge queue, PR review risk score, REST API; (3) small fixes: root action.yml routes to v10 instead of `loki start --simple`, and one real end-to-end BUDGET_STOP exit 3 test. Each release reports its version and what users can now do to the autonomi-dev session.
497
+
498
+ ## D63: industry-standard autonomous software factory roadmap (founder via the autonomi-dev session, 2026-10-03 00:15Z)
499
+ Founder: "I want everything top notch features and UI and connections and updates to make loki mode the industry standard best tool comparable to cognition devin, factory.ai and even 8090.ai and claude code, but fully autonomous super intelligence software factory". Recorded as the roadmap in docs/v10/ROADMAP-D63.md (nine pillars, each with a measurable bar). D50, D51, D56 and D61 slot into it. No row is done without a test or an eval row. User-facing text makes no superintelligence or benchmark claims. Build order this week, under the governor: D61 eval and warm start, visual evidence in PRs, Control Plane default with the BLOCKED answer UI, two-way Slack, Jira and Linear intake, spec to contract, multi-repo, MCP run/verify server, containers.
500
+
501
+ ## D64 (WITHDRAWN 2026-10-03 00:25Z, never acted on): win every Vorflux row, 10/10 ease of use, max pace (founder via the autonomi-dev session, 2026-10-03 00:20Z)
502
+ Founder: "i want to win on all things versus vorflux and rated 10/10 in ease of use for users, anything that says vorflux wins should become loki, complete all releases towards that in fastest way and I want everything done right now". Raises D63 to max pace. The 0.5%/h pacing is lifted: as many parallel builders as the machine and CI allow (sonnet builders, haiku for docs and mechanical work, opus only for moat reviews). One hard floor: no new work starts when live /usage shows the week at 90% or above. CI gates and the two-leg promote stay. Every "Us" row in ~/git/autonomi-dev/research/vorflux/docs-teardown.md section 6 becomes a local, free Loki win, each on its own train: visual evidence (local Playwright screenshots, trace or video, in the PR and the receipt); browser testing in verify (Playwright or Cypress when present; mobile only when an emulator or simulator is already installed, said plainly otherwise; never claim coverage that did not run); D61 parallel units; triggers (`loki serve` webhooks for GitHub, Linear, Jira, plus cron); multi-repo (D51-B); merge queue (`loki merge`); PR review with a deterministic risk score (`loki review <pr>`); plan mode (`loki plan`); project memory; Jira, Linear and Sentry intake plus two-way Slack; Control Plane default with mobile layout and a REST API for runs. Ease of use is measured and gated: fresh machine to first merge-ready PR under 5 minutes, zero config with at most one decision, `loki` with no args opens the UI with guided onboarding, every error names the one fix, and an "ease" row in the first-run gate (time to first PR, prompt count) is published.
503
+
504
+ D64 withdrawn (founder via the autonomi-dev session, 00:25Z): "I think your build order is better, just follow that, ignore my last message". Recorded only; no D64 builder was started. Pacing and order return to D63: about 0.5% of the week per hour at a staffing of 4, order as in docs/v10/ROADMAP-D63.md. The Vorflux section 6 rows remain a reference for later D63 items.
505
+
506
+ ## D65: build all nine D63 items today, then one end-to-end pass (founder via the autonomi-dev session, 2026-10-03 00:35Z)
507
+ Founder: "this looks amazing ... i want everything done today, no testing required, first develop and complete all releases, then do one end to end testing of all things and fix bugs and make improvements". Phase 1: build all nine D63 items in D63 order, in parallel; builder-side test runs and review rounds are off (builders run typecheck and the structural dash check only, because a red train is dropped, not waited on); each slice merges and ships on trains as built. CI and the release gates are unchanged (required-ci, Tests, Bun Parity, Coverage, Security Audit, two-leg promote). The 0.5%/h pace is lifted for today; hard floor: no new work starts once live /usage shows the week at 85%, and the autonomi-dev session is told. Phase 2: from a clean `npm i -g loki-mode@latest` in a throwaway HOME, exercise every D63 feature on real push-disabled clones (augmentiq#52 plus two public eval repos), record pass or fail with evidence in docs/v10/E2E-D65.md, then fix bugs in priority order on trains. Phase 2 real-repo runs need provider auth present in the session environment; stored keys are never read.
508
+
509
+ ## D66: D65 feature code lives in loki-ts/src/features/ under its own cap (CTO call, 2026-10-03 02:00Z)
510
+ The D61 decomposer (125 lines) does not fit: engine10 core is at 4,993 of its 5,000-line cap (D29, D33, never raised) and e10ext at 1,490 of 1,500 (D42). New D65 modules (decomposer, warm start, visual evidence, contract, Slack inbound, Jira/Linear fetch) go in loki-ts/src/features/, with its own 3,000-line cap and the D42 import rules (no import of stages/, seal, verify, wall or verify_cmd except whole-statement `import type`), enforced in budget.test.ts. Core and e10ext caps are unchanged; each slice's edit to engine10 or e10ext is a hook of at most a few lines, and a slice that pushes core or e10ext over its cap is trimmed or dropped at the train.
511
+
512
+ ## D67: authored speed tier is separate from the D34 large tier (CTO, 2026-10-03, on the Chief of Staff's request)
513
+ - D61 slice 17 added 8 authored tasks under the lg- name with tier "large" and excluded lg-* from the D34 size gate. Rejected: the real D34/D38 large tasks are also named lg-<repo>-<issue> (EV-12F, EV-12G), so the exclusion would have exempted them on merge, and D34 already closed synthetic lg-* tasks.
514
+ - Authored decomposition tasks are a separate tier: id prefix spd-, "tier": "speed", a boolean "decomposable", and D38 hidden-test provenance, sha256 freeze and a requirements map. No refdiff and no size gate. validate enforces the prefix and the tier in both directions.
515
+ - D34 and D38 are unchanged. lg- and tier "large" mean only real upstream PR tasks. measure-size.py runs over every task with no name exclusion, and a test proves an unsized lg- task fails it.
516
+ - Speed-tier results measure decomposer choice and wall-time ratio only. They are never published as large-tier, "any size" or completion-at-scale claims.
517
+ - The LOKI_SPEED default flips only when D61 section 5 B and 5 C hold on the speed tier and LOKI_SPEED=1 is no worse than LOKI_SPEED=0 on completion, p50 wall and tokens per completed across the real medium tasks and any D34 large tasks on main, at 2 runs per arm. A loss on any axis keeps the default off.
package/docs/v10/DEPS.md CHANGED
@@ -261,6 +261,8 @@ Node.js current stable: 26.10.0 (cycle 26); Python current stable: 3.14.7 (cycle
261
261
  | File | Name | Current | Latest stable | Bump | Note |
262
262
  |---|---|---|---|---|---|
263
263
  | `Dockerfile` | `ubuntu:24.04` | `ubuntu:24.04` | `24.04.5 (newest line 26.04.1)` | MAJOR | EOL 2029-05-31 (not yet); patch in line; MAJOR to newest line |
264
+ | `Dockerfile.control-plane` | `oven/bun:1.4.2` | `oven/bun:1.4.2` | `-` | unknown | floating/arbitrary registry tag, see Docker section for endoflife-mapped images |
265
+ | `Dockerfile.control-plane` | `oven/bun:1.4.2-slim` | `oven/bun:1.4.2-slim` | `-` | unknown | floating/arbitrary registry tag, see Docker section for endoflife-mapped images |
264
266
  | `Dockerfile.purplelab-test` | `node:22-slim` | `node:22-slim` | `22.23.3 (newest line 26.10.0)` | MAJOR | EOL 2027-04-30 (not yet); minor in line; MAJOR to newest line |
265
267
  | `Dockerfile.sandbox` | `debian:bookworm-slim` | `debian:bookworm-slim` | `12.15 (newest line 13.7)` | MAJOR | EOL 2028-06-30 (not yet); minor in line; MAJOR to newest line |
266
268
  | `Dockerfile.sandbox` | `debian:bookworm-slim` | `debian:bookworm-slim` | `12.15 (newest line 13.7)` | MAJOR | EOL 2028-06-30 (not yet); minor in line; MAJOR to newest line |
@@ -293,6 +295,8 @@ Node.js current stable: 26.10.0 (cycle 26); Python current stable: 3.14.7 (cycle
293
295
  | `deploy/helm/autonomi/tests/test-health.yaml` | `curlimages/curl:8.5.0` | `curlimages/curl:8.5.0` | `-` | unknown | floating/arbitrary registry tag, see Docker section for endoflife-mapped images |
294
296
  | `deploy/helm/autonomi/values.yaml` | `alpine/git:latest` | `alpine/git:latest` | `-` | unknown | floating/arbitrary registry tag, see Docker section for endoflife-mapped images |
295
297
  | `deploy/helm/autonomi/values.yaml` | `image.repository` | `asklokesh/loki-mode:(defaults to appVersion)` | `-` | n/a | own product image, tracked via VERSION not a third-party dep |
298
+ | `deploy/helm/control-plane/Chart.yaml` | `appVersion` | `10.6.7` | `10.6.7` | up-to-date | repo VERSION file is 10.6.7 |
299
+ | `deploy/helm/control-plane/Chart.yaml` | `chart dependencies` | `(none declared)` | `-` | n/a | |
296
300
  | `helm/loki-mode/Chart.yaml` | `appVersion` | `9.19.1` | `10.2.1` | drifted | DRIFTED: chart appVersion does not track the product VERSION file (10.2.1) |
297
301
  | `helm/loki-mode/Chart.yaml` | `chart dependencies` | `(none declared)` | `-` | n/a | |
298
302
  | `helm/loki-mode/values.yaml` | `redis:7-alpine` | `redis:7-alpine` | `-` | unknown | floating/arbitrary registry tag, see Docker section for endoflife-mapped images |
@@ -372,8 +376,8 @@ Counts are all from the single `Bump` column (current line vs newest line in the
372
376
  | Python (pyproject) | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
373
377
  | GitHub Actions | 1 | 0 | 0 | 75 | 0 | 0 | 2 | 13 | 2 |
374
378
  | Runtimes | 0 | 5 | 0 | 2 | 1 | 0 | 1 | 0 | 0 |
375
- | Docker/Compose | 0 | 3 | 0 | 8 | 1 | 0 | 8 | 0 | 1 |
376
- | Helm | 0 | 0 | 0 | 0 | 0 | 2 | 5 | 0 | 34 |
379
+ | Docker/Compose | 0 | 3 | 0 | 8 | 1 | 0 | 10 | 0 | 1 |
380
+ | Helm | 0 | 0 | 0 | 0 | 0 | 2 | 5 | 1 | 35 |
377
381
  | Terraform | 0 | 0 | 0 | 4 | 0 | 0 | 0 | 0 | 15 |
378
382
  | Homebrew | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
379
383