loki-mode 10.5.35 → 10.6.6
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.
- package/README.md +15 -308
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/loki +34 -1
- package/autonomy/telemetry.sh +1 -1
- package/bin/loki +5 -5
- package/completions/_loki +1 -0
- package/completions/loki.bash +2 -2
- package/dashboard/__init__.py +1 -1
- package/docs/INSTALLATION.md +6 -5
- package/docs/v10/BOARD.md +1 -0
- package/docs/v10/CONTROL-PLANE.md +102 -0
- package/docs/v10/DECISIONS.md +33 -0
- package/docs/v10/DEPS.md +16 -0
- package/docs/v10/LEGACY-REMOVAL.md +101 -0
- package/docs/v10/OPERATING-MODEL.md +1 -1
- package/docs/v10/PROGRESS.md +6 -0
- package/loki-ts/dist/loki.js +485 -464
- package/mcp/__init__.py +1 -1
- package/package.json +14 -3
- package/packages/control-plane/dist/server.js +5919 -0
- package/packages/control-plane/drizzle/0000_new_maelstrom.sql +49 -0
- package/packages/control-plane/drizzle/meta/0000_snapshot.json +343 -0
- package/packages/control-plane/drizzle/meta/_journal.json +13 -0
- package/packages/control-plane/package.json +20 -0
- package/packages/control-plane/src/db/migrate.ts +20 -0
- package/packages/control-plane/src/db/schema.ts +54 -0
- package/packages/control-plane/src/server/app.ts +63 -0
- package/packages/control-plane/src/server/ingest.ts +52 -0
- package/packages/control-plane/src/server/runs.ts +116 -0
- package/packages/control-plane/src/server/serve.ts +15 -0
- package/packages/control-plane/src/shipper/backfill.ts +40 -0
- package/packages/control-plane/src/shipper/ship.ts +95 -0
- package/packages/control-plane/ui/dist/assets/index-B6EiyukW.js +114 -0
- package/packages/control-plane/ui/dist/assets/index-BH3LtKcG.css +1 -0
- package/packages/control-plane/ui/dist/index.html +13 -0
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/web-app/dist/assets/{AdminPage-DEZMrOU2.js → AdminPage-CH-bmw4l.js} +1 -1
- package/web-app/dist/assets/{Avatar-Dcn23Doz.js → Avatar-Bos-ky_x.js} +1 -1
- package/web-app/dist/assets/{Badge-CsV7PB4a.js → Badge-DNJyHg9Y.js} +1 -1
- package/web-app/dist/assets/{Button-C8Q1ckXg.js → Button-KqD3Tt-I.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-YYX4FOT9.js → CockpitPage-l6oTsRaL.js} +1 -1
- package/web-app/dist/assets/{ComparePage-BrA6JGOn.js → ComparePage-DN6uxXko.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-CA3xFm23.js → ErrorBoundary-CKQhnvU9.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-C9151UPM.js → EvidenceReceiptPanel-CzSIqLmy.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-DBYUDlkc.js → GitHubIssuesPanel-YJUcDezn.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-x-Ug3n6Q.js → GitHubPRsPanel-Bv7xFvJN.js} +1 -1
- package/web-app/dist/assets/{HomePage-DHPokDA2.js → HomePage-CJsxBbii.js} +2 -2
- package/web-app/dist/assets/{LoginPage-CB8h5M-E.js → LoginPage-D1V2Ag0s.js} +1 -1
- package/web-app/dist/assets/{MagicPage-B6Zg4DHE.js → MagicPage-BBVNMEr5.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-JN6AkYit.js → MetricsPage-CtHM-IlA.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-dOUCtSdt.js → NotFoundPage-BBEEJLj5.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-DfyhdFcg.js → ProjectPage-BVRJoEaQ.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-oHMOXioV.js → ProjectsPage-DqaA9rUa.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-D4BGbBbt.js → SettingsPage-B_RQV_vF.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-CCkk1kPK.js → ShowcasePage-DqN-mrZ8.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-N2_JdIbZ.js → SystemSettingsPage-D-CvuL-K.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-CEDSFaIj.js → TeamsPage-CzkkDcPj.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-DB9WjPjI.js → TemplatesPage-Bbchk7YQ.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-DK55nBdV.js → TerminalOutput-B32BAX--.js} +1 -1
- package/web-app/dist/assets/{activity-3EPj3lfE.js → activity-C9vnEmhG.js} +1 -1
- package/web-app/dist/assets/{bell-05FwE2g4.js → bell-XsIhkyjq.js} +1 -1
- package/web-app/dist/assets/{bot-DAtzuPmj.js → bot-CvQhqBws.js} +1 -1
- package/web-app/dist/assets/{check-DVZjl88M.js → check-HmG8WcD-.js} +1 -1
- package/web-app/dist/assets/{chevron-left-BaNjYaIh.js → chevron-left-C1KNgnbD.js} +1 -1
- package/web-app/dist/assets/{circle-alert-DlvI6QdR.js → circle-alert-DSmCvZju.js} +1 -1
- package/web-app/dist/assets/{clock-B0vWVEQz.js → clock-CPhE3RXd.js} +1 -1
- package/web-app/dist/assets/{cloud-Du5W0a4Q.js → cloud-29lwqocB.js} +1 -1
- package/web-app/dist/assets/{code-xml-CBNJDFTV.js → code-xml-4jZUzbPt.js} +1 -1
- package/web-app/dist/assets/{database-CCqFWW7j.js → database-H0Ct2r-8.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-BiD3YO1u.js → dollar-sign-DsXkO0yT.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-DCelfbWq.js → file-code-corner-BM8w_nvX.js} +1 -1
- package/web-app/dist/assets/{file-plus-B18v-CXD.js → file-plus-BWkYTJ4D.js} +1 -1
- package/web-app/dist/assets/{globe-DdaeBtBG.js → globe-FOFDl_8Z.js} +1 -1
- package/web-app/dist/assets/{hammer-BaxkIYAS.js → hammer-orm5gvky.js} +1 -1
- package/web-app/dist/assets/{index-BnsxsCEv.js → index-B6juCuPX.js} +3 -3
- package/web-app/dist/assets/{layers-jmRqcTgA.js → layers-DUQPkPAl.js} +1 -1
- package/web-app/dist/assets/{loader-circle-B5eWOgN-.js → loader-circle-Deq6bDar.js} +1 -1
- package/web-app/dist/assets/{lock-DCOObKS4.js → lock-CSzWTPRC.js} +1 -1
- package/web-app/dist/assets/{package-1nzEtHlZ.js → package-CmACgZuF.js} +1 -1
- package/web-app/dist/assets/{plus-B5cRKjki.js → plus-BjPW5v3A.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-D769PBG8.js → refresh-cw-DhI1sHaj.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-CTHsioqQ.js → rotate-ccw-Byi2ouWB.js} +1 -1
- package/web-app/dist/assets/{scroll-text-DcwZwpH-.js → scroll-text-gq7bJ81H.js} +1 -1
- package/web-app/dist/assets/{server-DvIdr3uc.js → server-YbY5s1-X.js} +1 -1
- package/web-app/dist/assets/{shield-alert-HsBQ7gvc.js → shield-alert-DhKjtwZt.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-Dwy2c2yM.js → thumbs-up-D2X5JR-5.js} +1 -1
- package/web-app/dist/assets/{trash-2-DhZM5W4J.js → trash-2-BHAmMxTq.js} +1 -1
- package/web-app/dist/assets/{trending-down-Bw3nDTCd.js → trending-down-C41kQa-Q.js} +1 -1
- package/web-app/dist/assets/{trending-up-CbZDPnht.js → trending-up-M-OK_9DC.js} +1 -1
- package/web-app/dist/assets/{upload-w6RYv_bT.js → upload-CarpPiGw.js} +1 -1
- package/web-app/dist/assets/{usePolling-9hkUOMWP.js → usePolling-rJ7rM7R0.js} +1 -1
- package/web-app/dist/assets/{user-Cct2X0U_.js → user-cBhWpZen.js} +1 -1
- package/web-app/dist/index.html +1 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Loki Control Plane (D56)
|
|
2
|
+
|
|
3
|
+
Architect design, 2026-10-01, base 1dfc87103. Design only. Flag: `LOKI_CONTROL=1` until acceptance (slice CP-17).
|
|
4
|
+
|
|
5
|
+
## 1. Goal
|
|
6
|
+
1. One service plus one UI, `loki control`, replaces dashboard/, dashboard-ui/ and engine10/dashboard. Zero config locally; deployed once for hundreds of runs.
|
|
7
|
+
2. Stateless processes, all state in one DB (SQLite by default, Postgres via DATABASE_URL), self-healing, horizontally scalable on Postgres.
|
|
8
|
+
3. Every number is folded from ingested run events. A panel with no data says "no data ingested", never 0.
|
|
9
|
+
|
|
10
|
+
## 2. Data sources today
|
|
11
|
+
| Source | Where | Status |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| Run event log, append-only JSONL, envelope `{v,seq,ts,run,type,stage,data}` | engine10/events.ts:11-23 (validate), :54-89 (single writer), types.ts:26-43 (26 types) | REAL. The spool. |
|
|
14
|
+
| Folded run state: verdict, stages, cost (usd null when any session unpriced) | events.ts:106-140 `fold()`, :143-152 `partialCost()` | REAL. Reuse as is. |
|
|
15
|
+
| Run start data: task_source, issue_ref, provider, model, deep, cap_s, branch, origin_repo | supervisor.ts:194, cli data at supervisor.ts:331-334 | REAL |
|
|
16
|
+
| PR URL | `pr.opened {url,draft,existing}` supervisor.ts:233; `run.completed.pr_url` supervisor.ts:252 | REAL (opened only) |
|
|
17
|
+
| PR merged, issue closed | nowhere | MISSING. No event records merge or close. |
|
|
18
|
+
| Cost per session: usd, tokens, cache tokens, model, source | `cost` event session.ts:127-130 | REAL |
|
|
19
|
+
| Receipt and NOT PROVEN | receipt.json, schema types.ts:139-181; `receipt.sealed {path,receipt_sha256,signed,verdict,not_proven}` stages/seal.ts:292; `run.completed.not_proven` supervisor.ts:252 | REAL |
|
|
20
|
+
| Backlog queue (queued, running, BUDGET_STOP) | autonomy/lib/backlog.py:194-257, in memory only | MISSING from any durable store |
|
|
21
|
+
| Workspace group state | `~/.loki/workspaces/<ws>/<group>/group.json`, docs/v10/D51-PHASE-B.md | NOT BUILT (design only) |
|
|
22
|
+
| engine10 dashboard | engine10/dashboard/server.ts:30-57 (fold-based), routes :116-125 | REAL, but one repo, one process, 127.0.0.1 |
|
|
23
|
+
| Python dashboard, 168 routes | dashboard/server.py (13,171 lines); cost reads `.loki/metrics/efficiency` server.py:7869 | REAL but legacy: reads run.sh state that v10 runs never write |
|
|
24
|
+
| Pricing table | dashboard/server.py:7748, :8582 ("Unverified placeholder rate") | INVENTED |
|
|
25
|
+
| dashboard-ui /api/v2 activity, agents/leaderboard, cost/breakdown, memory/graph, pipeline/status, providers/health | dashboard-ui/index.js:100-105, issue #203 | INVENTED (no server route) |
|
|
26
|
+
| Secret redaction | util/redact.ts:4-14 `redactSecrets`; seal.ts:30 `sanitizeReason`; output.ts:79 Reason line | REAL. Reuse. |
|
|
27
|
+
|
|
28
|
+
## 3. Data model (Drizzle, one schema for SQLite and Postgres)
|
|
29
|
+
- `sources(id PK, host_hash, repo_path_hash, origin_repo, first_seen, last_seen)`. id = sha256(hostname + "\0" + realpath(repo)) truncated to 16 hex, computed by the shipper. No raw paths or hostnames stored.
|
|
30
|
+
- `events(source_id, run_id, seq, PK(source_id, run_id, seq), ts, type, stage, data JSON, line_sha256, received_at)`. Index (run_id, seq), (type, ts).
|
|
31
|
+
- `runs(source_id, run_id, PK(source_id, run_id), origin_repo, issue_ref, task_source, provider, model, started_at, ended_at, verdict, outcome, pr_url, pr_draft, cost_usd NULL, partial_usd, measured_sessions, total_sessions, input_tokens, output_tokens, wall_s, last_seq, last_event_at, tampered, conflict)`. A projection, rebuilt from `events` by `fold()` on every ingest batch for the touched runs; never written any other way.
|
|
32
|
+
- `receipts(source_id, run_id, PK, receipt_sha256, verdict, not_proven JSON, body JSON)`.
|
|
33
|
+
- `work_items(origin_repo, kind 'issue'|'pr', number, PK(origin_repo, kind, number), state, url, observed_at, run_id NULL)`. Fed only by `work.observed` events (CP-12).
|
|
34
|
+
- Event id = `source_id:run_id:seq`. Same id and same line_sha256 is a no-op (idempotent retry). Same id with a different hash returns 409, sets `runs.conflict = 1` and never overwrites.
|
|
35
|
+
- Derived views (SQL, not tables): in-progress = started, no run.completed, last_event_at within 10 min; stale = same but older (heartbeat lost); per-day cost; verdict counts; issue to PR join on (origin_repo, issue_ref).
|
|
36
|
+
- Seal verification stays with `loki verify` on local files: the shipper redacts, so stored bytes may differ from events.jsonl.
|
|
37
|
+
|
|
38
|
+
## 4. API (Hono, JSON, prefix /v1)
|
|
39
|
+
- `POST /v1/ingest {source, run_id, events[]}`: at most 500 events or 1 MB, each validated with `validateEnvelope()` (events.ts:11), redacted again server-side with `redactSecrets`. Returns `{accepted, duplicate, conflict, last_seq}`.
|
|
40
|
+
- `PUT /v1/runs/:source/:run/receipt`: receipt.json; 400 unless its receipt_sha256 matches a received `receipt.sealed` event.
|
|
41
|
+
- Reads: `GET /v1/runs?repo=&verdict=&provider=&since=&cursor=`, `/v1/runs/:source/:run` (summary + timeline), `/v1/runs/:source/:run/events?after_seq=`, `/v1/stats`, `/v1/costs?group=day|repo|model`, `/v1/compare?ids=`, `/v1/work`, `/v1/backlog`.
|
|
42
|
+
- `GET /health` (process up; `{service:"loki-control", version, install_path, pid}`, the P0-DASH-STATIC identity); `GET /ready` (DB reachable and migrations at head, else 503).
|
|
43
|
+
- Auth: binds 127.0.0.1 by default with no token. A non-loopback bind refuses to start unless `LOKI_CONTROL_TOKEN` is set; then every /v1 call needs `Authorization: Bearer`. Ingest and read share the token in v1.
|
|
44
|
+
|
|
45
|
+
## 5. Shipper and spool
|
|
46
|
+
- events.jsonl is the spool. The shipper never writes to it (the supervisor treats outside writes as tamper). Its acked cursor lives in `.loki/runs/<id>/ship.json {acked_seq, url}`, written atomically.
|
|
47
|
+
- Started by the supervisor next to the log (one hook line at supervisor.ts:194), it uses `tail()` (events.ts:155), batches up to 200 events or 1 s, and POSTs. Backoff 1, 2, 4 ... 60 s with jitter. It never blocks or fails the run: on supervisor exit it flushes for at most 5 s, then leaves the rest for replay.
|
|
48
|
+
- Every string in `data` goes through `redactSecrets` before sending.
|
|
49
|
+
- Replay: `loki control backfill [--repo DIR]` and every `loki` start ship each run whose ship.json acked_seq is below its last seq. Backfill of old .loki/runs uses the same code path.
|
|
50
|
+
|
|
51
|
+
## 6. Local auto-start and reuse
|
|
52
|
+
- With LOKI_CONTROL=1 and no LOKI_CONTROL_URL, `loki` reads `~/.loki/control/instance.json {pid, port, version, install_path, db}`.
|
|
53
|
+
- Reuse only when `/health` reports the same version and install_path and `/` returns HTML (the 10.5.34 P0-DASH-STATIC rule). Otherwise start a fresh one on a free port; never kill a process you did not record.
|
|
54
|
+
- A dead pid or failed probe means restart, then replay. The DB defaults to `~/.loki/control/control.db`. Tests always pass a temp HOME, an ephemeral port and `LOKI_NO_BROWSER=1`, and stop by recorded PID.
|
|
55
|
+
|
|
56
|
+
## 7. Deploy
|
|
57
|
+
- One image: `oven/bun` base, the service plus built UI assets, `bun packages/control-plane/dist/server.js`. Probes: liveness /health, readiness /ready.
|
|
58
|
+
- Helm chart `deploy/helm/loki-control`: replicas 1 with SQLite on a PVC (single writer, documented); replicas N only with DATABASE_URL. Migrations run on boot under a Postgres advisory lock. No in-process pub/sub: the UI polls with a cursor, so any replica serves any request.
|
|
59
|
+
- Clients set `LOKI_CONTROL_URL` and `LOKI_CONTROL_TOKEN`; containers and Helm runs of `loki start` ship the same way.
|
|
60
|
+
|
|
61
|
+
## 8. Migration and deletion
|
|
62
|
+
1. Build in packages/control-plane/ behind LOKI_CONTROL=1. The old UIs keep running; old-dashboard bug work is retired (D56.6).
|
|
63
|
+
2. Acceptance (CP-17): real runs in, correct counts out, on SQLite and Postgres; first-run gate passes with the flag on.
|
|
64
|
+
3. Flip the default. One release later, delete dashboard/, dashboard-ui/, engine10/dashboard/ (and its registry.ts:19 line), `loki dashboard` becomes an alias of `loki control`, and the dashboard tests are removed (CP-18).
|
|
65
|
+
|
|
66
|
+
## 9. v0 (ships in 1 to 2 hours on a D46 train)
|
|
67
|
+
CP-00 corpus, then CP-01, CP-02 and CP-03 in parallel, then CP-04 to wire them: SQLite service with ingest, the shipper with backfill, and a UI with the Runs list and detail, all behind the flag.
|
|
68
|
+
|
|
69
|
+
## 10. Slices
|
|
70
|
+
Rules for every card: file sets do not overlap; only CP-02 touches supervisor.ts and registry.ts, only CP-04 touches autonomy/loki and root package.json. Every Wall check feeds the CP-00 corpus through the real ingest path and asserts exact counts, starting the service on an ephemeral port with a temp DB under LOKI_RUN_TMP. Any new tests/*.sh needs runner registration, a shard row, `timeout -k` and shellcheck.
|
|
71
|
+
|
|
72
|
+
| ID | Scope and file set | Wall check (fixture in, counts out) | Tier | Deps |
|
|
73
|
+
|---|---|---|---|---|
|
|
74
|
+
| CP-00 | Corpus: events.jsonl and receipts written by the real supervisor under the engine10 e2e fake sessions (VERIFIED, PARTIAL, FAILED, BLOCKED, cap.hit, tampered, unpriced cost, resumed). `packages/control-plane/test/fixtures/runs/` + `EXPECTED.json` | EXPECTED.json counts equal a direct `fold()` over each file | LOW | none |
|
|
75
|
+
| CP-01 | **Parallel A.** Service + DB: `src/server/{app,ingest,runs}.ts`, `src/db/{schema,migrate}.ts`, `drizzle/`, `package.json` | ingest corpus twice: run count, verdict counts, cost_usd (null where expected), duplicate=all on 2nd pass; changed line gives 409 | MEDIUM | CP-00 |
|
|
76
|
+
| CP-02 | **Parallel B.** Shipper + backfill: `src/shipper/{ship,backfill}.ts`, hook `loki-ts/src/e10ext/ship_hook.ts`, one line each in supervisor.ts and registry.ts | backfill corpus into a CP-01 stub server; kill mid-batch, rerun: every event exactly once; redacted token never appears in the posted body; ship.json advances | MEDIUM | CP-00 |
|
|
77
|
+
| CP-03 | **Parallel C.** UI: `ui/` (Vite, React, Tailwind), Runs list with filters, run detail timeline, receipt and NOT PROVEN panel; empty states | build, render against section 4 JSON captured from the corpus: row count, verdict badges and NOT PROVEN items match EXPECTED.json; empty DB shows "no runs ingested" | MEDIUM | CP-00 |
|
|
78
|
+
| CP-04 | Wire: service serves `ui/dist`; `loki control [serve,backfill,status]` in autonomy/loki + loki-ts cli; bundle into the npm package (`files[]`) | `npm pack` tarball contains server and UI; `loki control serve` + backfill corpus: /v1/runs count = corpus | MEDIUM | 01,02,03 |
|
|
79
|
+
| CP-05 | Local lifecycle: `src/local/lifecycle.ts` (instance.json, reuse rule, restart, replay) | stale-version instance not reused; dead pid restarted and replayed; never touches unrecorded pid | MEDIUM | CP-04 |
|
|
80
|
+
| CP-06 | Auth and bind: `src/server/auth.ts` | non-loopback bind without token exits non-zero; wrong token 401 on ingest and read; loopback no token 200 | HIGH | CP-01 |
|
|
81
|
+
| CP-07 | Postgres: `src/db/pg.ts`, advisory-lock migrations | with DATABASE_URL: two instances ingest corpus concurrently, counts equal SQLite run | MEDIUM | CP-01 |
|
|
82
|
+
| CP-08 | Receipts: `src/server/receipts.ts` + `ui/src/receipt/` | receipt PUT accepted only with matching sealed hash; NOT PROVEN items equal receipt.json | MEDIUM | 01,03 |
|
|
83
|
+
| CP-09 | Overview: `src/server/stats.ts`, `ui/src/overview/` | totals, verdict split, in-progress and stale counts equal EXPECTED.json | LOW | 01,03 |
|
|
84
|
+
| CP-10 | Costs: `src/server/costs.ts`, `ui/src/costs/` | per-day and per-model usd; unpriced run shows partial "N of M sessions", never 0 | MEDIUM | 01,03 |
|
|
85
|
+
| CP-11 | Compare: `src/server/compare.ts`, `ui/src/compare/` | two runs: stage times, cost, verdict, not_proven diff match fixtures | LOW | 01,03 |
|
|
86
|
+
| CP-12 | Work: issues to PRs; `loki control sync` turns `gh pr view`/`gh issue view` on the client into `work.observed` events (no token on the server). `src/sync/`, `src/server/work.ts`, `ui/src/work/` | open, merged, blocked, pending counts from fixture gh JSON; without sync the panel says "merge state not ingested" | MEDIUM | 01,03 |
|
|
87
|
+
| CP-13 | Backlog: backlog.py writes envelope events (`backlog.queued`, `backlog.dispatched`, `backlog.stopped`) to `.loki/backlog/<batch>/events.jsonl`; backfill ships it. `autonomy/lib/backlog.py`, `src/server/backlog.ts`, `ui/src/backlog/` | 5-issue fixture batch: queued, running, done and BUDGET_STOP counts | MEDIUM | 02,03 |
|
|
88
|
+
| CP-14 | Live: cursor polling `ui/src/live/`, `?after_seq=` | append 3 events to a fixture run while open: detail shows them within 2 polls | LOW | 01,03 |
|
|
89
|
+
| CP-15 | Deploy: `packages/control-plane/Dockerfile`, `deploy/helm/loki-control/` | image boots, /ready 200 after migrations; `helm template` renders probes; replicas>1 without DATABASE_URL fails render | MEDIUM | CP-07 |
|
|
90
|
+
| CP-16 | Self-heal: /ready gating, stale-run derivation, replay on boot | DB file removed while up: /ready 503, recovers; stale run flagged after heartbeat gap | LOW | 01,05 |
|
|
91
|
+
| CP-17 | Acceptance + flag flip | full corpus and one real first-run demo run on SQLite and Postgres: every view's counts equal EXPECTED.json | HIGH | all above |
|
|
92
|
+
| CP-18 | Delete dashboard/, dashboard-ui/, engine10/dashboard/, their tests and references | `rg` finds no imports; local-ci fast tier green; first-run gate opens the control UI | HIGH | CP-17 + 1 release |
|
|
93
|
+
|
|
94
|
+
Dependencies to add (none present today; web-app/package.json pins react 19, vite 6, tailwind 3, so align): hono, drizzle-orm, drizzle-kit (dev), react, react-dom, vite, @vitejs/plugin-react, tailwindcss. SQLite uses built-in `bun:sqlite`. Postgres uses drizzle's `bun-sql` driver if the pinned drizzle-orm exports it, otherwise `postgres` is the one extra. No hard blocker found: Bun is already the runtime (bin/loki:94).
|
|
95
|
+
|
|
96
|
+
## 11. Open questions
|
|
97
|
+
1. Merge state source: client-side `loki control sync` (chosen default, no server secret) versus a GitHub webhook or App into the service. Webhooks need a public endpoint and a secret.
|
|
98
|
+
2. Legacy run.sh runs (`LOKI_ENGINE=legacy`) write no events.jsonl. Proposed: not shown. Confirm.
|
|
99
|
+
3. web-app/ is a fourth UI (Purple Lab, already deprecated). In scope for deletion or not?
|
|
100
|
+
4. Retention: keep events forever, or prune `heartbeat` after N days?
|
|
101
|
+
5. One shared token for ingest and read, or separate ingest-only tokens per team (D54 scale, team budgets)?
|
|
102
|
+
6. Workspaces: once D51 Phase B lands, should group.json also be shipped as envelope events, the same way as backlog (CP-13)?
|
package/docs/v10/DECISIONS.md
CHANGED
|
@@ -449,3 +449,36 @@ Loki's definition: "autonomous software factory that runs with the knowledge of
|
|
|
449
449
|
2. Out of scope for v1 (frozen unless a bug blocks v1): loki modernize, new verification features, the gaming matrix, extra dashboards, extra providers, certifications, new engines. Verification is bug-fix only.
|
|
450
450
|
3. Amendment 15:05Z, the founder's words: "I want sellable product but I don't need to sell right now, don't price anything, everything is still free to use". There is no paid edition and no pricing anywhere; remove "paid", "Team edition", "commercial editions" and "pricing TBD" from docs, README, CLI help and UI. No feature gating, license keys or upgrade prompts in code. LICENSE is untouched (FOUNDER-QUEUE row 7).
|
|
451
451
|
4. Order: P0 first-run bugs, first run end to end with a recorded demo, PR body and cost cap, D51 Phase B, D51 Phase C. D50 continues only where it raises completion or merge rate. Every release note leads with the user-visible v1 change.
|
|
452
|
+
|
|
453
|
+
## D55 (CTO, 2026-10-01; reversible via repo variable LOKI_E160_REUSE=0): a push to main reuses a train's verdict for the identical SHA
|
|
454
|
+
1. Rule (E-160, scripts/ci/train-verdict-reuse.sh). A push to refs/heads/main skips the heavy jobs only when ALL hold: LOKI_E160_REUSE is not 0; the workflow-runs listing for the SHA has total_count of 100 or less; among completed push runs of the same workflow file, other than this run, whose head_branch starts with train/, there is at least one success and no failure, timed_out or startup_failure (cancelled, skipped and neutral count for nothing); and, for Tests only, BEFORE is not all zeros and the BEFORE...SHA compare succeeded, lists fewer than 300 files and touches none of loki-ts/bun.lock, requirements-test.txt, dashboard-ui/package-lock.json. Any parse or API error means reuse=false and the full suite runs. The newest success by created_at is recorded (run id, attempt, branch) in the step summary and a notice; attempts above 1 are accepted.
|
|
455
|
+
2. Wiring. test.yml: the version-bump-gate skip output is true when either the S-132 gate or the reuse step says so. bun-parity, coverage, first-run-gate and security-audit get a first job train-reuse; every other job needs it and runs under `!cancelled() && needs.train-reuse.outputs.reuse != 'true'`. security-audit sast (CodeQL) is never gated: it always runs on main. coverage and first-run-gate take test.yml's concurrency block (per-ref with cancel for pull_request and train/**, per-SHA without cancel on main).
|
|
456
|
+
3. Rationale: D28 and D46 item 4 (same SHA means same tree means same workflow YAML). required-ci, train-cycle, the pulse and the version-bump gate already read the train run by head_sha, so no gate gains new trust. Dependency lockfiles are excluded because a fast-forward from an older main can change resolved dependencies that the train run did not see.
|
|
457
|
+
## D56 (founder, relayed 15:40Z; numbered D56 because D55 is the E-160 CTO ruling): the Loki Control Plane replaces the dashboards
|
|
458
|
+
1. One service plus one UI, `loki control`, replaces dashboard/, dashboard-ui/ and engine10/dashboard. It runs locally with zero config or is deployed once for many runs. It is stateless and horizontally scalable, keeps all state in a DB (SQLite locally, Postgres via DATABASE_URL), and is self-healing (/health, /ready, migrations on boot, spool replay, CLI restart of a dead local instance, k8s probes, version-checked reuse).
|
|
459
|
+
2. Stack: TypeScript on Bun with Hono and Drizzle; React, Vite and Tailwind built into static assets served by the same service; one container image.
|
|
460
|
+
3. Ingest: engine10 ships batched events with idempotent ids to LOKI_CONTROL_URL, with retry; the run's own events.jsonl is the spool. `loki control backfill` imports existing runs.
|
|
461
|
+
4. Every number comes from ingested events; no placeholders or invented data; an empty panel says so. Localhost-only by default, token auth when bound non-local, no secrets in events.
|
|
462
|
+
5. Built in packages/control-plane/ behind LOKI_CONTROL=1 until it passes its acceptance tests (real runs in, correct counts out), then the default flips and the old UIs are deleted. v0 (service, SQLite, ingest, shipper, Runs list and detail) ships on D46 trains first; the other views follow train by train.
|
|
463
|
+
6. Design: docs/v10/CONTROL-PLANE.md (architect slice in progress). Old-dashboard bug work is retired, except the P0 that shipped in 10.5.34.
|
|
464
|
+
## D55 (CTO, 2026-10-01; reversible via repo variable LOKI_E160_REUSE=0): a push to main reuses a train's verdict for the identical SHA
|
|
465
|
+
1. Rule (E-160, scripts/ci/train-verdict-reuse.sh). A push to refs/heads/main skips the heavy jobs only when ALL hold: LOKI_E160_REUSE is not 0; the workflow-runs listing for the SHA has total_count of 100 or less; among completed push runs of the same workflow file, other than this run, whose head_branch starts with train/, there is at least one success and no failure, timed_out or startup_failure (cancelled, skipped and neutral count for nothing); and, for Tests only, BEFORE is not all zeros and the BEFORE...SHA compare succeeded, lists fewer than 300 files and touches none of loki-ts/bun.lock, requirements-test.txt, dashboard-ui/package-lock.json. Any parse or API error means reuse=false and the full suite runs. The newest success by created_at is recorded (run id, attempt, branch) in the step summary and a notice; attempts above 1 are accepted.
|
|
466
|
+
2. Wiring. test.yml: the version-bump-gate skip output is true when either the S-132 gate or the reuse step says so. bun-parity, coverage, first-run-gate and security-audit get a first job train-reuse; every other job needs it and runs under `!cancelled() && needs.train-reuse.outputs.reuse != 'true'`. security-audit sast (CodeQL) is never gated: it always runs on main. coverage and first-run-gate take test.yml's concurrency block (per-ref with cancel for pull_request and train/**, per-SHA without cancel on main).
|
|
467
|
+
3. Rationale: D28 and D46 item 4 (same SHA means same tree means same workflow YAML). required-ci, train-cycle, the pulse and the version-bump gate already read the train run by head_sha, so no gate gains new trust. Dependency lockfiles are excluded because a fast-forward from an older main can change resolved dependencies that the train run did not see.
|
|
468
|
+
|
|
469
|
+
## D57 (founder, relayed 16:50Z; "faster" 16:52Z): remove everything legacy, v10 only
|
|
470
|
+
1. The founder's words: "completely eliminate, deprecate and delete everything legacy, just v10 is enough since our user base so far is super low and we don't have to support anything from legacy". Supersedes the E-35 deprecation, `loki legacy` as an escape hatch, and the legacy leg of the promote gate.
|
|
471
|
+
2. Wave 1 (10.6.0, minor bump because it breaks the legacy path, within 1 to 2 trains): every entry point routes to v10; `loki legacy`, LOKI_ENGINE and the legacy fallback are removed; when bun cannot run, loki prints a plain error with the one-line fix and exits non-zero (never runs legacy); promote gate leg 2 asserts that error and exit code; README, docs, wiki, CLI help and CHANGELOG say v10 only, with the migration note "legacy removed in 10.6.0; use loki \"<task>\", loki owner/repo#N, loki backlog".
|
|
472
|
+
3. Wave 2 (following trains): delete legacy code, tests, CI jobs and fixtures in parallel slices, one directory each, every slice independently green (v10 suite, Bun Parity, first-run gate, moat on v10). Anything v10, loki-seal or the Control Plane imports at runtime is kept or ported, never deleted blind. The Python dashboard goes only once Control Plane v0 is the default (D56). Lines deleted are tracked in METRICS.
|
|
473
|
+
4. Guard: a test fails if any shipped file references run.sh, LOKI_ENGINE or `loki legacy` outside CHANGELOG and the migration note.
|
|
474
|
+
5. Inventory: docs/v10/LEGACY-REMOVAL.md (architect, 20 minutes, routing and docs surface first).
|
|
475
|
+
6. D57 product calls (founder delegation, ruled by autonomy-dev-dc, relayed 17:19Z; reversible): (a) PRD and spec start (`loki start ./prd.md`, `--openspec`) have no legacy path; `loki <file>` and `loki "<task>"` read an existing .md, .txt or .yaml file as the task and spec text for one v10 run; greenfield multi-phase PRD builds are dropped (out of D54 v1). (b) `loki quickstart` and templates are removed; first run is `loki` (UI) or `loki "<task>"`; `npx loki-mode tour` stays only if it has no legacy dependency. (c) `loki modernize` already runs on v10 (M-08): code kept, hidden from help and docs as experimental (D54 freeze). (d) The MCP server and the legacy loki-mode Claude Code plugin are removed if they front legacy; only MCP tools that call v10 directly survive; loki-seal stays the only marketplace plugin. (e) Council, gates, RARV, swarms, agent types, voice, grill, BMAD, OpenSpec and Mirofish adapters, `loki heal`, `loki migrate`, and Jira sync if legacy-only are deleted with their docs. (f) Anything else with no v10 equivalent is deleted unless it is in D54 v1 scope; when unsure, it is listed in LEGACY-REMOVAL.md as "deleted, no v10 equivalent" without asking.
|
|
476
|
+
|
|
477
|
+
## D58 (founder, relayed 17:40Z: "are we even of any use at all for users now?"): basics first, freeze the rest
|
|
478
|
+
1. Overrides D46 release-rate chasing, D48 and INTEL until all five basics pass. Release count is not the metric until then; pass or fail per basic is reported every hour.
|
|
479
|
+
2. The five basics, staffed together: (1) `loki start <owner/repo#N | "task" | file>` runs v10 and no user entry point ever invokes legacy (D57 W1-ROUTE); (2) no test binds 57374-57399, the CLI prints and opens the bound port, and Control Plane v0 shows a live run (stage, elapsed time, files touched, PR link); (3) v10 scope control: the committed diff contains only files the task needs, unrelated source edits are reverted, never committed, and listed in NOT PROVEN; (4) install is clean, with no npm allow-scripts warning (BUN-OPT); (5) the real-repo acceptance gate passes before `latest` moves.
|
|
480
|
+
3. Real-repo gate: from a clean `npm i -g` in a throwaway HOME, `loki start <real issue> --no-pr` on 3 real repos: asklokesh/augmentiq#52 (cloned, no push; expected ALREADY_SATISFIED in under 60s with no diff; 10.5.35 v10 already does this in 24s at $0.07, while legacy ran 18+ minutes and touched 19 files), plus 2 public eval-corpus repos with real open issues that need a change, so the PR path is covered. Pass: v10 engine, 15 minutes or less, diff limited to relevant files, tests green, receipt verifies, dashboard shows the run. Wall time, cost and diff stat per repo go in METRICS. Any failure keeps `latest` where it is.
|
|
481
|
+
4. D57 Wave 2 deletions continue only as part of basic 1.
|
|
482
|
+
|
|
483
|
+
## D59: two-hour finish, then stop until next week (founder, 2026-10-01 18:10Z, override 18:14Z)
|
|
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.
|
package/docs/v10/DEPS.md
CHANGED
|
@@ -24,6 +24,22 @@ Inventory only. No dependency, lockfile, workflow or image was changed to produc
|
|
|
24
24
|
| `package.json` | `jest` | `^29.7.0` | `30.5.2` | MAJOR | |
|
|
25
25
|
| `package.json` | `jsdom` | `^24.0.0` | `30.1.1` | MAJOR | |
|
|
26
26
|
| `package.json` | `typescript` | `^5.9.3` | `7.0.2` | MAJOR | |
|
|
27
|
+
| `packages/control-plane/package.json` | `drizzle-kit` | `^0.31.11` | `0.31.11` | up-to-date | |
|
|
28
|
+
| `packages/control-plane/package.json` | `drizzle-orm` | `^0.45.3` | `0.45.3` | up-to-date | |
|
|
29
|
+
| `packages/control-plane/package.json` | `hono` | `^4.13.12` | `4.13.12` | up-to-date | |
|
|
30
|
+
| `packages/control-plane/ui/package.json` | `@happy-dom/global-registrator` | `^18.0.1` | `20.14.5` | MAJOR | |
|
|
31
|
+
| `packages/control-plane/ui/package.json` | `@testing-library/react` | `^16.3.0` | `16.3.3` | patch | |
|
|
32
|
+
| `packages/control-plane/ui/package.json` | `@types/react` | `^19.0.0` | `19.3.0` | minor | |
|
|
33
|
+
| `packages/control-plane/ui/package.json` | `@types/react-dom` | `^19.0.0` | `unknown` | unknown | |
|
|
34
|
+
| `packages/control-plane/ui/package.json` | `@vitejs/plugin-react` | `^4.3.4` | `6.1.1` | MAJOR | |
|
|
35
|
+
| `packages/control-plane/ui/package.json` | `autoprefixer` | `^10.6.1` | `10.6.1` | up-to-date | |
|
|
36
|
+
| `packages/control-plane/ui/package.json` | `lucide-react` | `^0.577.0` | `1.49.0` | MAJOR | |
|
|
37
|
+
| `packages/control-plane/ui/package.json` | `postcss` | `^8.5.28` | `8.5.28` | up-to-date | |
|
|
38
|
+
| `packages/control-plane/ui/package.json` | `react` | `^19.3.0` | `19.3.0` | up-to-date | |
|
|
39
|
+
| `packages/control-plane/ui/package.json` | `react-dom` | `^19.3.0` | `19.3.0` | up-to-date | |
|
|
40
|
+
| `packages/control-plane/ui/package.json` | `tailwindcss` | `^3.4.17` | `4.3.3` | MAJOR | |
|
|
41
|
+
| `packages/control-plane/ui/package.json` | `typescript` | `~5.7.2` | `7.0.2` | MAJOR | |
|
|
42
|
+
| `packages/control-plane/ui/package.json` | `vite` | `^6.2.0` | `8.3.2` | MAJOR | |
|
|
27
43
|
| `sdk/typescript/package.json` | `typescript` | `^5.9.3` | `7.0.2` | MAJOR | |
|
|
28
44
|
| `vscode-extension/package.json` | `@types/node` | `^20.10.0` | `26.6.3` | MAJOR | |
|
|
29
45
|
| `vscode-extension/package.json` | `@types/vscode` | `^1.85.0` | `1.138.0` | minor | |
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Legacy removal inventory (D57)
|
|
2
|
+
|
|
3
|
+
Architect inventory, 2026-10-01, base `main` 80cdb7193. Product calls are D57 item 6 (a to f); nothing here is an open question. "No v10 equivalent" rows are deleted per 6(f) unless named in D54 v1 scope. Evidence is a grep or a file:line; anything not proven unused is KEEP-CHECK, never delete.
|
|
4
|
+
|
|
5
|
+
## 1. Routing surface (Wave 1, builders already on it)
|
|
6
|
+
|
|
7
|
+
Entry point: package.json `bin.loki = bin/loki`. `BASH_CLI=autonomy/loki` (bin/loki:33). Every `exec "$BASH_CLI"` below is a legacy route.
|
|
8
|
+
|
|
9
|
+
| Where | Legacy behavior | v10 replacement |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| bin/loki:81, 92, 115 | bad LOKI_TS_ENTRY, BUN_FROM_SOURCE miss, no dist and no src: exec bash | plain error, exit non-zero |
|
|
12
|
+
| bin/loki:242-243 | LOKI_LEGACY_BASH=1 forces bash for every command | delete the knob |
|
|
13
|
+
| bin/loki:300-309 | `modernize` without `--to` goes to bash (heal, migrate) | v10 modernize only, hidden (6c); `heal`, `migrate` deleted (6e) |
|
|
14
|
+
| bin/loki:313-319 | `loki legacy <args>` re-execs with LOKI_ENGINE=legacy | delete; migration note |
|
|
15
|
+
| bin/loki:325-326 | `LOKI_ENGINE` switch, default v10, any other value skips v10 | delete the variable, v10 unconditional |
|
|
16
|
+
| bin/loki:331-342 | status, verify, dashboard, keys reach v10 only with explicit LOKI_ENGINE=v10; bare `verify` picks newest of e10 run vs legacy proof | always engine10 status/verify/keys; dashboard goes to `loki control` once D56 flips |
|
|
17
|
+
| bin/loki:344 | bare `loki` and any flag-first call go to bash | engine10 usage (engine10/cli.ts USAGE) |
|
|
18
|
+
| bin/loki:347-352 | `loki quick --no-pr`, `quick --help` (flag-first) go to legacy quick | `quick <flags> <task>` maps to engine10 `--no-pr`; flags passed through |
|
|
19
|
+
| bin/loki:360 | any one-word argument goes to bash (start, init, stop, config, backlog...) | per-command table below |
|
|
20
|
+
| bin/loki:364-371 | unsupported LOKI_PROVIDER (opencode etc.) falls to legacy | plain error naming claude, codex, cline, aider |
|
|
21
|
+
| bin/loki:372-384 | no working bun: "Running the legacy engine instead" | D57 item 2: print the one-line fix, exit non-zero |
|
|
22
|
+
| bin/loki:388 | error text says "set LOKI_ENGINE=legacy" | drop that hint |
|
|
23
|
+
| bin/loki:397-399 | no bun on PATH: exec bash for everything | same no-bun error as 372-384 |
|
|
24
|
+
| bin/loki:474-477 | `start` with LOKI_SDK_LOOP: v8 Bun loop, diverts to bash for --parallel, --github, --issue, --openspec, --bmad-project, --mirofish*, --sandbox, opencode | `loki <file>` / `loki "<task>"` (6a); issue refs already v10 |
|
|
25
|
+
| bin/loki:492-507 | `trust detail`, `doctor --airgap` exec bash | trust: delete (verification frozen, D54); doctor --airgap: KEEP-CHECK (D54 "your infrastructure"), port to Bun doctor |
|
|
26
|
+
| bin/loki:532-554, 596 | Bun allowlist (version, status, stats, doctor, provider, memory, rollback, internal, kpis, trust, proof, receipt, wiki, crash) runs v8 Bun commands, not engine10 | keep version, doctor; status goes engine10; rest deleted |
|
|
27
|
+
| bin/loki:599 | catch-all `*` exec bash | engine10 run (task) or "unknown command" |
|
|
28
|
+
| loki-ts/src/cli.ts:7, 38-39, 18 | help says "falls through to bash", LOKI_LEGACY_BASH | rewrite help to engine10 USAGE |
|
|
29
|
+
| loki-ts/src/cli.ts:149 | `report` delegates to bash (util/bash_delegate.ts) | delete with report |
|
|
30
|
+
| loki-ts/src/cli.ts:209-231, 295, 313 | `internal` hooks driven by run.sh; `start` (v8 loop); bench to benchmarks/bench/run.sh | delete internal and start; bench KEEP-CHECK (dev tool, not shipped CLI) |
|
|
31
|
+
| loki-ts/src/engine10/cli.ts:3, 28 | comments and USAGE say "LOKI_ENGINE=v10" | drop the phrase |
|
|
32
|
+
|
|
33
|
+
One-word bash commands (autonomy/loki main(), line 21621) and their fate:
|
|
34
|
+
- PORT (v10 scope, hosted in bash today): `backlog` (cmd_backlog autonomy/loki:12875, runs autonomy/lib/backlog.py; D57 migration note depends on it), `config` / `config validate` / `config schema` (D51 loki.yaml), `doctor --airgap`. These must move to Bun before autonomy/loki is deleted. Wave 1 keeps routing them to bash explicitly by name, not via the catch-all.
|
|
35
|
+
- REPLACED: `start <prd>` / `run` / `--openspec` (6a, `loki <file>`), `issue`, `github`, `import` (issue refs), `status`, `verify`, `keys` (engine10), `dashboard`, `web` (`loki control`, D56).
|
|
36
|
+
- DELETED, decided: `quickstart`, `template` (6b); `council`, `grill`, `voice`, `heal`, `migrate`, `agent`, swarm/RARV surfaces (6e). `tour`/`demo` kept only if legacy-free; today they run bash (DELETED unless reimplemented).
|
|
37
|
+
- DELETED, no v10 equivalent (6f): init, stop, cleanup, pause, steer, resume, why, next, stats, monitor, welcome, docker, preview, deploy, ship, open, logs, serve, api, sandbox, notify, watch, cockpit, export, assets, reset, memory, compound, checkpoint, rollback, dogfood, projects, enterprise, secrets, sentrux, setup-skill, self-update, watchdog, audit, compliance, review, ultracode, optimize, spec, intent, mcp, cluster, worktree, state, metrics, cost, estimate, trust, syslog, telemetry, remote, trigger, plan, failover, analyze, onboard, explain, docs, wiki, magic, ci, test, report, crash, share, proof, outcomes, secure, own, context, code, kpis.
|
|
38
|
+
- KEEP-CHECK against D54 v1 "cost and control, scale, audit log, team budgets": `cost`, `audit`, `plan` (cmd_plan carries D5x refs), `self-update`, `provider`. Confirm with PM before deleting; default delete per 6(f) if no v1 owner claims them in one train.
|
|
39
|
+
|
|
40
|
+
## 2. Docs and help surface (Wave 1)
|
|
41
|
+
|
|
42
|
+
`grep -rlE "run.sh|LOKI_ENGINE|loki legacy|legacy engine"` counts (files / mentions):
|
|
43
|
+
- Root: README.md 19, SKILL.md 10, ARCHITECTURE.md 9, COMPONENTS.md 4, AGENTS.md 2, CONTRIBUTING.md 2, TESTING.md 2, CLAUDE.md 1, SETUP.md 1, Dockerfile 1.
|
|
44
|
+
- docs/: 109 files, 1200 mentions. Shipped (package.json `docs/**/*.md`). Heaviest: v10/BOARD.md 72, BUG-AUDIT-v6.61.0.md 61, ONE-RUN-AUDIT.md 44, BRANCH-LIFECYCLE-PLAN.md 44, CONFIG-FILE-PLAN.md 41, architecture/STATE-MACHINES.md 33, test-scenarios/edge-cases.md 32, v10/ENGINE.md 30, V8-AGENT-SDK-PLAN.md 28, dev/project-structure.md 14. Most are legacy plans: delete, not edit. Keep docs/v10/ (internal records; exclude from `files`).
|
|
45
|
+
- wiki/: 6 files, 13 mentions (Quality-Gates, Enterprise-Features, Enterprise, Contributing, Checkpoints, API-Reference). Quality-Gates and Checkpoints are legacy features: delete pages.
|
|
46
|
+
- skills/ 9 files 33, references/ 7 files 16, vscode-extension/ 3 files 4, integrations/ 2 files 3, templates/ 1 file 2, agent-skills/ 1, packages/loki-seal 4 files 4 (wording only; loki-seal stays).
|
|
47
|
+
- CLI help: autonomy/loki help (goes with the file), loki-ts/src/cli.ts HELP, engine10/cli.ts USAGE, bin/loki error strings (lines 81, 92, 382, 388).
|
|
48
|
+
- completions/_loki, completions/loki.bash: 0 pattern hits but list every bash command; regenerate from the v10 command list.
|
|
49
|
+
- website/: 0 hits.
|
|
50
|
+
|
|
51
|
+
## 3. Directory classification
|
|
52
|
+
|
|
53
|
+
Evidence: `grep -rn autonomy/|providers/` over loki-ts/src/engine10, packages/control-plane, packages/loki-seal; engine10 relative imports.
|
|
54
|
+
|
|
55
|
+
| Area | Verdict | Evidence |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| autonomy/run.sh, autonomy/loki, most of autonomy/lib (69 files) | DELETE | no engine10 import; 133k lines in autonomy/ |
|
|
58
|
+
| autonomy/issue-providers.sh | KEEP | engine10/fetch_issue.ts:24 |
|
|
59
|
+
| autonomy/lib/engine10-push.sh, lib/secret-scan.sh | KEEP | stages/pr.ts:24, stages/deep.ts:52-53 |
|
|
60
|
+
| autonomy/lib/modernize/ | KEEP (hidden, 6c) | engine10/modernize via util/python.ts |
|
|
61
|
+
| autonomy/lib/backlog.py | PORT | cmd_backlog; migration note |
|
|
62
|
+
| autonomy/lib/cost-summary.py, app-runner.sh | KEEP-CHECK | named in engine10 comments only (cost.ts:9, deep.ts:102) |
|
|
63
|
+
| autonomy/telemetry.sh, lib/sdk-mode.sh | PORT then delete | sourced by bin/loki:42, 230-238 |
|
|
64
|
+
| providers/*.sh, models.sh | DELETE | ported to loki-ts runner/providers.ts |
|
|
65
|
+
| providers/model_catalog.json | KEEP | engine10/sizing.ts:58 |
|
|
66
|
+
| loki-ts/src/runner, commands, providers (v8 loop) | PORT subset | engine10 imports runner/github_token, types, retry_class, providers, budget; providers/claude_flags, mcp_config; delete the rest |
|
|
67
|
+
| council/, quality gates scripts, swarm/, agents/ | DELETE (6e) | no engine10 refs |
|
|
68
|
+
| dashboard/ (Python) | KEEP until D56 flip, then DELETE | D57 item 3 |
|
|
69
|
+
| dashboard-ui/ | KEEP until D56 flip, then DELETE | same |
|
|
70
|
+
| engine10/dashboard | KEEP until D56 flip | engine10/cli.ts TABLE |
|
|
71
|
+
| web-app/ (Purple Lab) | DELETE | no engine10 or CP ref; 55k lines |
|
|
72
|
+
| mcp/ | DELETE (6d) | mcp/server.py has 0 engine10 calls; loki-ts refs are v8 runner only |
|
|
73
|
+
| skills/, SKILL.md, plugins/, claude/hooks, .claude-plugin | DELETE (6d legacy plugin) | SKILL.md: replace with a v10 stub only if release scripts require it (KEEP-CHECK scripts/ grep) |
|
|
74
|
+
| templates/ | DELETE (6b) | |
|
|
75
|
+
| Dockerfile, helm/, deploy/ | KEEP, PORT entrypoint | D54 v1 scope (container, Helm); Dockerfile has 1 legacy mention |
|
|
76
|
+
| memory/, events/, learning/, magic/, lokistore/, api/, state/, src/ | DELETE, KEEP-CHECK first | in `files`; no engine10 import found |
|
|
77
|
+
| tests/ | 417 of 1186 files reference autonomy/run.sh or autonomy/loki: DELETE with their owner. 16 reference engine10: KEEP |
|
|
78
|
+
| tests/moat/p2, p3, p4 | PORT first | reference autonomy/run.sh; moat must run on v10 |
|
|
79
|
+
| CI: promote.yml:122-146 leg 2 `--engine legacy` | PORT (Wave 1) | assert the no-bun error and exit code |
|
|
80
|
+
| CI: test.yml legacy shards, check-phase6-ready.yml, parity-drift.yml, bun-parity.yml | DELETE with their suites; bun-parity is a Wall check, redefine as v10 Bun suite first |
|
|
81
|
+
|
|
82
|
+
## 4. Wave 2 slices (safe order, one area each)
|
|
83
|
+
|
|
84
|
+
Wall check for every slice: v10 suite, Bun Parity (redefined in W2-01), first-run gate, moat on v10, all green.
|
|
85
|
+
1. W2-01 tests/moat port to v10 + redefine Bun Parity as the v10 Bun suite (adds ~300, deletes ~200).
|
|
86
|
+
2. W2-02 PORT backlog, config, doctor --airgap to Bun (adds ~600).
|
|
87
|
+
3. W2-03 web-app/ delete (~55k).
|
|
88
|
+
4. W2-04 templates/, quickstart, tour/demo (~4k).
|
|
89
|
+
5. W2-05 council, gates scripts, swarm, agents, grill, voice (~10k).
|
|
90
|
+
6. W2-06 mcp/ + skills/ + plugins/ + SKILL.md + claude/hooks (~16k).
|
|
91
|
+
7. W2-07 memory/, learning/, magic/, lokistore/, events/, api/, state/, src/ after KEEP-CHECK (~25k).
|
|
92
|
+
8. W2-08 legacy tests/ (417 files, ~120k) and their CI shards.
|
|
93
|
+
9. W2-09 loki-ts v8 runner/commands not imported by engine10 (~15k).
|
|
94
|
+
10. W2-10 providers/*.sh (~3k).
|
|
95
|
+
11. W2-11 autonomy/run.sh, autonomy/loki, autonomy/lib except KEEP rows (~125k). Last code slice; depends on 01, 02, 08, 09.
|
|
96
|
+
12. W2-12 legacy docs/ plans and wiki pages (~1000 mentions).
|
|
97
|
+
13. W2-13 dashboard/ + dashboard-ui/ (~113k), only after D56 default flip.
|
|
98
|
+
|
|
99
|
+
## 5. Guard spec (D57 item 4)
|
|
100
|
+
|
|
101
|
+
New test `tests/test-no-legacy-refs.sh`: for every path in `npm pack --dry-run --json` output (the shipped set) plus README.md and wiki/, fail on `autonomy/run\.sh`, a bare `\brun\.sh\b` not preceded by `moat/` or `bench/`, `LOKI_ENGINE`, `LOKI_LEGACY_BASH`, or `loki legacy`. Exclusions: CHANGELOG.md and docs/MIGRATION-10.6.md (the migration note) only. Positive control: the test plants one hit in a temp copy and must go red (loki-verify). Phase in: advisory after Wave 1, blocking after W2-11.
|
|
@@ -29,7 +29,7 @@ The CEO is Lokesh Mure (Loki), the founder. Everyone else is an agent. The compa
|
|
|
29
29
|
|
|
30
30
|
## Release pipeline
|
|
31
31
|
- Tier A fast gate on every change (target 60-120s): syntax checks, changed-file shellcheck, diff-selected tests, moat suite split per property. It is feedback, not release authority.
|
|
32
|
-
- Tier B full
|
|
32
|
+
- Tier B: every main commit has a full Tier B verdict on its exact tree, run on main or on the train that produced it (D55); never cancelled on main.
|
|
33
33
|
- Release = a lookup: publish a commit whose tree already has a Tier B pass. A VERSION-only bump reuses its parent's verdict. Target: 2 min from verified to npm.
|
|
34
34
|
- Trains: the Release Manager batches merged slices; one push per train; releases when verified; the next train opens immediately. Never hold a train for one HIGH slice.
|
|
35
35
|
- If Tier B fails on main: stop releases, open a P0 fix-forward slice. Never unpublish; npm deprecate is allowed.
|
package/docs/v10/PROGRESS.md
CHANGED
|
@@ -1892,3 +1892,9 @@ The swarm is stopped: .loki/V10-STOP exists, the loop has no wake-ups, and the c
|
|
|
1892
1892
|
- train/62 red on tsc (D50-F2r TS2532): F2r dropped, re-landed as F2r4 with a typecheck fix. train/63 red: RC-AUTO (Linux fixture default branch master) and PY-ABORT (os._exit in main() killed pytest workers) dropped and re-landed as RC-AUTO2 and PY-ABORT2. The new rule from two incidents: every loki-ts slice runs bun run typecheck; bun test does not typecheck.
|
|
1893
1893
|
- train/64 (b9b7c8a3) in CI: P0 dashboard fix (founder-reported: loki start showed the frontend-not-found JSON; test suites had leaked dashboards into the real HOME and reuse trusted them; now reuse needs same version, package and HTML, LISTEN-only port check, built-in HTML fallback, first-run gate checks GET /), D54 no-pricing sweep, D50-F5, D50-F2r4.
|
|
1894
1894
|
- D54 product scope recorded (docs/PRODUCT.md, free, no editions); OPEN ITEMS ledger re-ranked; D50-W1 and D53-Q1 ruled.
|
|
1895
|
+
|
|
1896
|
+
## 2026-10-01T16:35Z releases automated; npm processing lag; Control Plane v0 near
|
|
1897
|
+
- Releases per hour: 1 in the trailing hour. v10.5.34 (P0 dashboard fix, ceb6942a) published 15:37Z but npm made it visible only at 16:05:58Z (about 29 min); its Post-Release Smoke failed ETARGET during the lag, so promote skipped. Smoke re-run 16:31Z; a green smoke fires the normal two-leg promote. v10.5.35 (c7f80c0b) was cut automatically by train-cycle.sh at 15:50Z (its first automatic release; it also promoted train/65 at 15:40Z); npm still processing at 16:30Z.
|
|
1898
|
+
- NPM-LAG guard row: publish, smoke and promote wait up to 45 min for the version and re-trigger promote; train-cycle merges origin/main back after each release (it stalled at 16:20Z, merged by hand as cc3e1392).
|
|
1899
|
+
- E-160 (D55, train verdict reuse on main; CodeQL always runs; kill switch LOKI_E160_REUSE=0) merged locally after an opus APPROVE.
|
|
1900
|
+
- D56 Control Plane: design (docs/v10/CONTROL-PLANE.md, 19 slices), CP-00 corpus, CP-01 service (Hono, Drizzle, bun:sqlite; idempotent ingest, 409 on conflict, fold-derived runs), CP-02 shipper (no-op unless LOKI_CONTROL_URL; exactly-once backfill; redaction) and CP-03 UI (runs list and detail; unpriced never shown as 0) merged locally. CP-04 (wire loki control, packaging, CI, test isolation) and BUN-OPT (npm 11 allow-scripts warning: per-platform @oven/bun packages) building.
|