loki-mode 10.5.20 → 10.5.23

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 (78) hide show
  1. package/README.md +3 -2
  2. package/SKILL.md +2 -2
  3. package/VERSION +1 -1
  4. package/autonomy/loki +19 -5
  5. package/bin/loki +67 -20
  6. package/completions/_loki +1 -0
  7. package/completions/loki.bash +2 -2
  8. package/dashboard/__init__.py +1 -1
  9. package/docs/INSTALLATION.md +1 -1
  10. package/docs/enterprise/integration-cookbook.md +4 -7
  11. package/docs/enterprise/migration.md +1 -0
  12. package/docs/exit-codes.md +10 -1
  13. package/docs/v10/BOARD.md +8 -6
  14. package/docs/v10/GUARDS.md +22 -0
  15. package/docs/v10/GUIDE.md +58 -26
  16. package/docs/v10/PROGRESS.md +24 -0
  17. package/loki-ts/dist/loki.js +445 -435
  18. package/mcp/__init__.py +1 -1
  19. package/package.json +1 -1
  20. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  21. package/src/integrations/sync-subscriber.js +7 -2
  22. package/web-app/dist/assets/{AdminPage-HjtApbcL.js → AdminPage-d3ZLc0Tl.js} +1 -1
  23. package/web-app/dist/assets/{Avatar-BcwLENsU.js → Avatar-CGHT_M4V.js} +1 -1
  24. package/web-app/dist/assets/{Badge-DjJhHJj0.js → Badge-BpS5M2it.js} +1 -1
  25. package/web-app/dist/assets/{Button-CSMstrCz.js → Button-CCMn0nm5.js} +1 -1
  26. package/web-app/dist/assets/{CockpitPage-BHihN-aq.js → CockpitPage-DoMtDXzu.js} +1 -1
  27. package/web-app/dist/assets/{ComparePage-_6JtexDp.js → ComparePage-Cz6TyKKO.js} +1 -1
  28. package/web-app/dist/assets/{ErrorBoundary-Cx2fnw3q.js → ErrorBoundary-Bp1h5DLV.js} +1 -1
  29. package/web-app/dist/assets/{EvidenceReceiptPanel-DcUQAnju.js → EvidenceReceiptPanel-pd499gha.js} +1 -1
  30. package/web-app/dist/assets/{GitHubIssuesPanel-1dYpQ5Rx.js → GitHubIssuesPanel-BUo-iqwK.js} +1 -1
  31. package/web-app/dist/assets/{GitHubPRsPanel-BPdDD1kX.js → GitHubPRsPanel-BOPE7_nD.js} +1 -1
  32. package/web-app/dist/assets/{HomePage-JfmwLGnQ.js → HomePage-9t7S6TXu.js} +2 -2
  33. package/web-app/dist/assets/{LoginPage-7SnMHzPc.js → LoginPage-CMcdbSSk.js} +1 -1
  34. package/web-app/dist/assets/{MagicPage-C0IkoOzD.js → MagicPage-GLxvn0g8.js} +1 -1
  35. package/web-app/dist/assets/{MetricsPage-BJOZ0L3F.js → MetricsPage-B9W-6UdL.js} +1 -1
  36. package/web-app/dist/assets/{NotFoundPage-S49UjLyW.js → NotFoundPage-MC-jWzoM.js} +1 -1
  37. package/web-app/dist/assets/{ProjectPage-Dj_nv2kT.js → ProjectPage-2KpaMSFP.js} +3 -3
  38. package/web-app/dist/assets/{ProjectsPage-C7thLjOm.js → ProjectsPage-DJS11cL0.js} +1 -1
  39. package/web-app/dist/assets/{SettingsPage-DEcJyfsU.js → SettingsPage-BfPM6_z-.js} +1 -1
  40. package/web-app/dist/assets/{ShowcasePage-B5PshXNg.js → ShowcasePage-GyglRuEI.js} +1 -1
  41. package/web-app/dist/assets/{SystemSettingsPage-Cnp4BkN7.js → SystemSettingsPage-CSKCUbJ1.js} +1 -1
  42. package/web-app/dist/assets/{TeamsPage-1ImpgMzs.js → TeamsPage-CoDhZujG.js} +1 -1
  43. package/web-app/dist/assets/{TemplatesPage-BOYKrPX8.js → TemplatesPage-fKK76P9Q.js} +1 -1
  44. package/web-app/dist/assets/{TerminalOutput-LPxzwfwm.js → TerminalOutput-DsXECPhC.js} +1 -1
  45. package/web-app/dist/assets/{activity-Hl7iDpX_.js → activity-BwDl_Q_K.js} +1 -1
  46. package/web-app/dist/assets/{bell-DrBfjAq4.js → bell--8hyo_jC.js} +1 -1
  47. package/web-app/dist/assets/{bot-6SoklKaZ.js → bot-hPGKMvTk.js} +1 -1
  48. package/web-app/dist/assets/{check-DhHuZH8k.js → check-B4ZqF56K.js} +1 -1
  49. package/web-app/dist/assets/{chevron-left-BUERGaLO.js → chevron-left-xA4SyYir.js} +1 -1
  50. package/web-app/dist/assets/{circle-alert-D7UOw5bc.js → circle-alert-C3UhYgmz.js} +1 -1
  51. package/web-app/dist/assets/{clock-t3v_i7fP.js → clock-D6xXQU0l.js} +1 -1
  52. package/web-app/dist/assets/{cloud-CP3eLZts.js → cloud-BVk8faZy.js} +1 -1
  53. package/web-app/dist/assets/{code-xml-DU-CmwVx.js → code-xml-C0OlIR2z.js} +1 -1
  54. package/web-app/dist/assets/{database-J27fE_Ot.js → database-C4c3W0Km.js} +1 -1
  55. package/web-app/dist/assets/{dollar-sign-BdU_HR9C.js → dollar-sign-DDnUM3_j.js} +1 -1
  56. package/web-app/dist/assets/{file-code-corner-Cu4A1aIH.js → file-code-corner-OsCs14OL.js} +1 -1
  57. package/web-app/dist/assets/{file-plus-BTli76r5.js → file-plus-d4XtHwBc.js} +1 -1
  58. package/web-app/dist/assets/{globe-Bz3m1c_-.js → globe-CwNeqLUu.js} +1 -1
  59. package/web-app/dist/assets/{hammer-HNN6jr92.js → hammer-CN4bs4-3.js} +1 -1
  60. package/web-app/dist/assets/{index-CgK4xqUy.js → index-DtLzMLmc.js} +3 -3
  61. package/web-app/dist/assets/{layers-DhuXUuM6.js → layers-BRYYE6CG.js} +1 -1
  62. package/web-app/dist/assets/{loader-circle-CeBjdh2y.js → loader-circle-D90eq7gm.js} +1 -1
  63. package/web-app/dist/assets/{lock-DjSqmIVZ.js → lock-BeRwCbex.js} +1 -1
  64. package/web-app/dist/assets/{package-NL0AdpIi.js → package-XOV5thdu.js} +1 -1
  65. package/web-app/dist/assets/{plus-Lbz3hom-.js → plus-CK2Uaks7.js} +1 -1
  66. package/web-app/dist/assets/{refresh-cw-uKARwuER.js → refresh-cw-DghJ663b.js} +1 -1
  67. package/web-app/dist/assets/{rotate-ccw-ByA6XJq1.js → rotate-ccw-BDPsaXZ4.js} +1 -1
  68. package/web-app/dist/assets/{scroll-text-BV8Blxig.js → scroll-text-B3TH5Vpl.js} +1 -1
  69. package/web-app/dist/assets/{server-Cy3R5hde.js → server-CstqZqRH.js} +1 -1
  70. package/web-app/dist/assets/{shield-alert-rE_xXx7r.js → shield-alert-CzJK0DC6.js} +1 -1
  71. package/web-app/dist/assets/{thumbs-up-CNMITZHD.js → thumbs-up-B7loUo5h.js} +1 -1
  72. package/web-app/dist/assets/{trash-2-BP3Rr5SU.js → trash-2-D9bAmqG1.js} +1 -1
  73. package/web-app/dist/assets/{trending-down-BE_8lCjD.js → trending-down-DShy2Lhi.js} +1 -1
  74. package/web-app/dist/assets/{trending-up-CF6E9-9a.js → trending-up-D3VOAwuk.js} +1 -1
  75. package/web-app/dist/assets/{upload-D-Ui4N6K.js → upload-DjJQpUPc.js} +1 -1
  76. package/web-app/dist/assets/{usePolling-DIVX97OV.js → usePolling-BG1VuJza.js} +1 -1
  77. package/web-app/dist/assets/{user-7rTiTfDj.js → user-BW8cZn07.js} +1 -1
  78. package/web-app/dist/index.html +1 -1
package/README.md CHANGED
@@ -48,6 +48,7 @@ Upgrade with `loki self-update`. Long form: [Installation Guide](docs/INSTALLATI
48
48
  ```bash
49
49
  export ANTHROPIC_API_KEY=sk-...
50
50
  loki doctor
51
+ loki quick "fix the login bug" # one small task on the Loki 10 engine
51
52
  ```
52
53
 
53
54
  <details>
@@ -71,9 +72,9 @@ loki-seal is a Claude Code Stop hook that runs your repo's real test suite when
71
72
 
72
73
  ## Loki 10 engine
73
74
 
74
- Opt-in: set LOKI_ENGINE=v10 <!-- loki10-default -->
75
+ Default: Loki 10 engine for `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"`. Set LOKI_ENGINE=legacy or run `loki legacy <args>` for the previous engine. <!-- loki10-default -->
75
76
 
76
- Loki 10 is the rewritten engine. It is not the default yet: with `LOKI_ENGINE` unset, `loki` runs the [legacy engine](#legacy-engine-reference) exactly as before. A default flip is in flight; this section describes what `main` does today (`bin/loki` routes to the v10 engine only when `LOKI_ENGINE=v10` is set). Guide, provider table and summary format: [docs/v10/GUIDE.md](docs/v10/GUIDE.md).
77
+ Loki 10 is the rewritten engine and the default for tasks, issue mode and `quick`; `status`, `verify` and `dashboard` use it when `LOKI_ENGINE=v10` is set. Guide, provider table and summary format: [docs/v10/GUIDE.md](docs/v10/GUIDE.md).
77
78
 
78
79
  ```
79
80
  LOKI_ENGINE=v10 loki "fix the login redirect loop" --no-pr
package/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: loki-mode
3
3
  description: An autonomous software factory that knows what it is supposed to deliver, and proves it did. Use when the user says Loki Mode or asks to build, fix or verify software autonomously.
4
4
  ---
5
5
 
6
- # Loki Mode v10.5.20
6
+ # Loki Mode v10.5.23
7
7
 
8
8
  **You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
9
9
 
@@ -470,4 +470,4 @@ See `CHANGELOG.md` entries [7.5.7], [7.5.8], [7.5.13] for the per-fix list and r
470
470
 
471
471
  ---
472
472
 
473
- **v10.5.20 | [Autonomi](https://www.autonomi.dev/) flagship product | ~410 lines core**
473
+ **v10.5.23 | [Autonomi](https://www.autonomi.dev/) flagship product | ~410 lines core**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 10.5.20
1
+ 10.5.23
package/autonomy/loki CHANGED
@@ -1606,7 +1606,9 @@ show_help() {
1606
1606
  echo " loki doctor Check your setup is ready (a few seconds)"
1607
1607
  echo " loki quickstart Guided first build from your idea (no PRD needed)"
1608
1608
  echo " loki start ./prd.md Build from a spec (PRD file, GitHub/GitLab/Jira/Azure issue, or no arg)"
1609
- echo " quickstart = guided first build; quick = one small task (3 iters max)."
1609
+ echo " quickstart = guided first build; quick = one small task (Loki 10 engine, no PR)."
1610
+ echo " loki \"<task>\", loki owner/repo#N and loki quick run on the Loki 10 engine by default."
1611
+ echo " Previous engine: set LOKI_ENGINE=legacy or run 'loki legacy <args>'."
1610
1612
  echo " Docs: https://github.com/asklokesh/loki-mode | Report a problem: loki crash"
1611
1613
  echo ""
1612
1614
  # CLI consolidation (Phase A): the front page presents ~17 canonical
@@ -1640,6 +1642,7 @@ show_help() {
1640
1642
  echo ""
1641
1643
  echo "Verify / trust:"
1642
1644
  echo " verify [base] Deterministic PR verification (CI-gate exit codes)"
1645
+ echo " keys export Print the public receipt-signing key (JWK) for third-party verify --pubkey"
1643
1646
  echo " review [opts] Standalone code review with quality gates"
1644
1647
  echo " ultracode \"task\" Run a task as a native Claude Code Dynamic Workflow (opt-in, Claude-only)"
1645
1648
  echo " trust [cmd] Visible trust trajectory; 'trust detail' for metrics"
@@ -1705,7 +1708,7 @@ show_help() {
1705
1708
  echo " loki start PROJ-456 # Jira issue"
1706
1709
  echo " loki start --bg ./prd.md # Start in background"
1707
1710
  echo " loki start --parallel ./prd.md # Parallel mode (git worktrees)"
1708
- echo " loki quick \"add dark mode\" # Single-task mode (3 iters max)"
1711
+ echo " loki quick \"add dark mode\" # Single-task mode (Loki 10 engine; LOKI_ENGINE=legacy for 3 iters max)"
1709
1712
  echo " loki tour # See a real sample result (no provider, no key, no spend)"
1710
1713
  echo " loki demo # Build a sample todo app end to end"
1711
1714
  echo " loki init -t saas-starter # Scaffold from template"
@@ -1916,7 +1919,7 @@ show_landing() {
1916
1919
  echo -e " ${CYAN}loki doctor${NC} Check your setup is ready (a few seconds)"
1917
1920
  echo -e " ${CYAN}loki quickstart${NC} Guided first build from your idea (no PRD needed)"
1918
1921
  echo -e " ${CYAN}loki start ./prd.md${NC} Build from a spec (PRD file, GitHub/GitLab/Jira/Azure issue, or no arg)"
1919
- echo " quickstart = guided first build; quick = one small task (3 iters max)."
1922
+ echo " quickstart = guided first build; quick = one small task (Loki 10 engine, no PR)."
1920
1923
  echo ""
1921
1924
  echo -e "Need help? ${CYAN}loki help${NC} lists every command."
1922
1925
  echo "Tip: preview cost and scope before building: loki plan <your-prd.md>"
@@ -16408,8 +16411,10 @@ cmd_quick() {
16408
16411
  echo ""
16409
16412
  echo "Usage: loki quick \"description of what to do\""
16410
16413
  echo ""
16411
- echo "Runs Loki with a lightweight execution profile: 3 iterations max,"
16412
- echo "no quality council, no completion gate. Best for tiny tasks."
16414
+ echo "Runs the Loki 10 engine on one small task (no PR is opened). Set"
16415
+ echo "LOKI_ENGINE=legacy or run 'loki legacy quick ...' for the previous engine:"
16416
+ echo "a lightweight profile, 3 iterations max, no quality council, no completion"
16417
+ echo "gate. Best for tiny tasks. The options below apply to the previous engine."
16413
16418
  echo ""
16414
16419
  echo "Examples:"
16415
16420
  echo " loki quick \"add dark mode to this React app\""
@@ -18647,6 +18652,11 @@ with open(manifest_path, 'w') as f:
18647
18652
  # usable.
18648
18653
  # ---------------------------------------------------------------------------
18649
18654
  cmd_verify() {
18655
+ # D48: --pubkey verifies a receipt against a given public key (v10 engine, no ~/.loki needed).
18656
+ local _pk_arg
18657
+ for _pk_arg in "$@"; do
18658
+ [ "$_pk_arg" = "--pubkey" ] && LOKI_ENGINE=v10 exec "$_LOKI_SCRIPT_DIR/../bin/loki" verify "$@"
18659
+ done
18650
18660
  # --fast: deterministic checks only, in milliseconds. Measured on this repo
18651
18661
  # (1,932 tracked files): 298 ms cold, 87 ms warm, 19 ms diff-scoped, against
18652
18662
  # an 11,040 ms shell-based baseline.
@@ -21959,6 +21969,10 @@ main() {
21959
21969
  verify)
21960
21970
  cmd_verify "$@"
21961
21971
  ;;
21972
+ keys)
21973
+ # D48: public-key export lives in the Bun v10 engine; re-enter the shim on that route.
21974
+ LOKI_ENGINE=v10 exec "$_LOKI_SCRIPT_DIR/../bin/loki" keys "$@"
21975
+ ;;
21962
21976
  spec)
21963
21977
  cmd_spec "$@"
21964
21978
  ;;
package/bin/loki CHANGED
@@ -271,26 +271,73 @@ if [ "${1:-}" = "modernize" ]; then
271
271
  unset _loki_mod_a
272
272
  fi
273
273
 
274
- # Loki 10 engine (D29): additive; skipped entirely unless LOKI_ENGINE=v10.
275
- if [ "${LOKI_ENGINE:-}" = "v10" ]; then
276
- _e10=0
277
- case "${1:-}" in
278
- status|verify|dashboard) _e10=1 ;;
279
- ""|-*) _e10=0 ;;
280
- # http*://*/issues/* also covers GitLab's /-/issues/ URLs.
281
- */*\#[0-9]*|http*://*/issues/*|http*://*/browse/*) _e10=1 ;;
282
- *" "*) _e10=1 ;;
283
- # ponytail: a one-word argument stays on the legacy CLI. The telemetry
284
- # allowlist is not a command registry (estimate, intent, outcomes are
285
- # missing from it), so it cannot decide routing. Multi-word tasks and
286
- # issue refs reach v10.
287
- *) _e10=0 ;;
288
- esac
289
- if [ "$_e10" = "1" ]; then
290
- command -v bun >/dev/null 2>&1 || { echo "Error: LOKI_ENGINE=v10 needs bun. Unset LOKI_ENGINE to use the current engine." >&2; exit 1; }
291
- exec bun "$BUN_CLI" engine10 "$@"
292
- fi
293
- fi
274
+ # `loki legacy <args>` (D29/D48): the previous engine, exactly as LOKI_ENGINE=legacy.
275
+ # Re-runs this shim with the pin so every route below is the pre-flip route.
276
+ case "${1:-}" in
277
+ legacy)
278
+ shift
279
+ [ -f "$REPO_ROOT/autonomy/lib/engine10-legacy-notice.txt" ] && cat "$REPO_ROOT/autonomy/lib/engine10-legacy-notice.txt" >&2
280
+ LOKI_ENGINE=legacy exec "$SCRIPT_PATH" "$@"
281
+ ;;
282
+ esac
283
+
284
+ # Loki 10 engine (D29, flipped to the default by D48 rows 7-9). LOKI_ENGINE unset
285
+ # or v10 routes `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"` to
286
+ # engine10; LOKI_ENGINE=v10 (explicit) also routes status/verify/dashboard. Any
287
+ # other value (legacy, v9, ...) skips this block: the previous engine, unchanged.
288
+ _loki_engine_default="v10"
289
+ case "${LOKI_ENGINE:-$_loki_engine_default}" in
290
+ v10)
291
+ _e10=0
292
+ _e10_args=("$@")
293
+ case "${1:-}" in
294
+ status|verify|dashboard|keys)
295
+ [ "${LOKI_ENGINE:-}" = "v10" ] && _e10=1
296
+ # Bare `loki verify` follows the newest run: a v10 run newer than the newest
297
+ # legacy proof is verified by v10, so a FAILED default run is never VERIFIED.
298
+ # Only a bare call or a v10 run id (e10-*) goes there; any flag (--fast, --pr, --json, unknown) stays on legacy verify.
299
+ if [ "$1" = "verify" ] && [ "$_e10" = "0" ] && [ -z "${LOKI_ENGINE:-}" ] && case "${2:-}" in ""|e10-*) true ;; *) false ;; esac; then
300
+ _r10=""; _p10=""
301
+ for _d in "${LOKI_DIR:-.loki}"/runs/e10-*/; do [ -d "$_d" ] && _r10="$_d"; done
302
+ for _d in "${LOKI_DIR:-.loki}"/proofs/*/proof.json; do [ -f "$_d" ] && { [ -z "$_p10" ] || [ "$_d" -nt "$_p10" ]; } && _p10="$_d"; done
303
+ if [ -n "$_r10" ] && { [ -z "$_p10" ] || [ "$_r10" -nt "$_p10" ]; }; then _e10=1; fi
304
+ unset _r10 _p10 _d
305
+ fi
306
+ ;;
307
+ ""|-*) _e10=0 ;;
308
+ # quick: the lean small path, no PR (legacy quick never opened one). A flag-first
309
+ # call (--help, -v) stays on the legacy quick.
310
+ quick)
311
+ case "${2:-}" in
312
+ ""|-*) _e10=0 ;;
313
+ *) _e10=1; _e10_args=(--no-pr "${@:2}") ;;
314
+ esac
315
+ ;;
316
+ # http*://*/issues/* also covers GitLab's /-/issues/ URLs.
317
+ */*\#[0-9]*|http*://*/issues/*|http*://*/browse/*) _e10=1 ;;
318
+ *" "*) _e10=1 ;;
319
+ # ponytail: a one-word argument stays on the legacy CLI. The telemetry
320
+ # allowlist is not a command registry (estimate, intent, outcomes are
321
+ # missing from it), so it cannot decide routing. Multi-word tasks and
322
+ # issue refs reach v10.
323
+ *) _e10=0 ;;
324
+ esac
325
+ # Default (unset) mode never breaks a host: no bun, or a provider engine10 has no
326
+ # invoker for, falls through to the legacy engine. Explicit v10 keeps its hard error.
327
+ if [ "$_e10" = "1" ] && [ "${LOKI_ENGINE:-}" != "v10" ]; then
328
+ case "${LOKI_PROVIDER:-claude}" in claude|codex|cline|aider) ;; *) _e10=0 ;; esac
329
+ command -v bun >/dev/null 2>&1 || _e10=0
330
+ if [ "$_e10" = "0" ]; then
331
+ echo "loki: using the legacy engine (the Loki 10 engine needs bun and LOKI_PROVIDER of claude, codex, cline or aider)." >&2
332
+ fi
333
+ fi
334
+ if [ "$_e10" = "1" ]; then
335
+ command -v bun >/dev/null 2>&1 || { echo "Error: LOKI_ENGINE=v10 needs bun. Install bun, or set LOKI_ENGINE=legacy to use the previous engine." >&2; exit 1; }
336
+ exec bun "$BUN_CLI" engine10 "${_e10_args[@]}"
337
+ fi
338
+ unset _e10 _e10_args
339
+ ;;
340
+ esac
294
341
 
295
342
  # Bun must be installed for the new path; if it isn't, fall through to bash
296
343
  # silently rather than fail. This keeps users on systems without Bun working.
package/completions/_loki CHANGED
@@ -193,6 +193,7 @@ function _loki_commands {
193
193
  'spec:Living spec drift detection'
194
194
  'intent:Does the spec still say what was actually wanted'
195
195
  'verify:Deterministic PR verification'
196
+ 'keys:Export the receipt-signing public key'
196
197
  'grill:Interrogate a spec before building'
197
198
  'trust:Visible trust trajectory'
198
199
  'trust-metrics:Trust metrics report'
@@ -5,8 +5,8 @@ _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 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"
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 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"
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 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 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
10
 
11
11
  # 1. If we are on the first argument (subcommand)
12
12
  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.5.20"
10
+ __version__ = "10.5.23"
11
11
 
12
12
  # Expose the control app for easy import
13
13
  try:
@@ -2,7 +2,7 @@
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.5.20
5
+ **Version:** v10.5.23
6
6
 
7
7
  ---
8
8
 
@@ -173,16 +173,12 @@ curl -X POST "$LOKI_TEAMS_WEBHOOK_URL" \
173
173
  | Variable | Required | Description |
174
174
  |----------|----------|-------------|
175
175
  | `LOKI_JIRA_URL` | Yes | Jira Cloud base URL |
176
+ | `LOKI_JIRA_EMAIL` | Yes | Email of the Jira user that owns the API token |
176
177
  | `LOKI_JIRA_TOKEN` | Yes | Jira API token |
177
178
  | `LOKI_JIRA_EPIC_KEY` | No | Epic that run events are synced to |
178
179
 
179
- These are read by `src/integrations/sync-subscriber.js`. The Jira user email is
180
- passed to `JiraApiClient` in code (see below); no environment variable carries it.
181
-
182
- Known issue on main: `src/integrations/sync-subscriber.js` constructs `JiraApiClient`
183
- without the `email` and `apiToken` it requires, so Jira auto-sync from these
184
- variables does not start. Construct `JiraApiClient({ baseUrl, email, apiToken })`
185
- in code until that is fixed.
180
+ These are read by `src/integrations/sync-subscriber.js`. If only some of the
181
+ three required variables are set, it logs one line naming the missing ones.
186
182
 
187
183
  ### Configuration
188
184
 
@@ -194,6 +190,7 @@ in code until that is fixed.
194
190
 
195
191
  ```bash
196
192
  export LOKI_JIRA_URL="https://company.atlassian.net"
193
+ export LOKI_JIRA_EMAIL="user@company.com"
197
194
  export LOKI_JIRA_TOKEN="your-api-token"
198
195
  ```
199
196
 
@@ -98,6 +98,7 @@ These variables from v5.50.0 continue to work identically:
98
98
  | `LOKI_TLS_CERT` | (unset) | TLS certificate path |
99
99
  | `LOKI_TLS_KEY` | (unset) | TLS key path |
100
100
  | `LOKI_JIRA_URL` | (unset) | Jira Cloud base URL |
101
+ | `LOKI_JIRA_EMAIL` | (unset) | Jira user email for the API token |
101
102
  | `LOKI_JIRA_TOKEN` | (unset) | Jira API token |
102
103
  | `LOKI_JIRA_EPIC_KEY` | (unset) | Jira epic that run events sync to |
103
104
  | `LOKI_LINEAR_TOKEN` | (unset) | Linear API key |
@@ -89,9 +89,18 @@ not rank above UNCHECKED.
89
89
  | Legacy shell (`autonomy/verify.sh`) | BLOCKED (non-zero) | the receipt line passes with the same accepted line |
90
90
 
91
91
  Engine10 `loki verify [run-id]` exits: 0 verified, 1 tampered, 2 unchecked,
92
- 3 unsigned (refused), 66 no runs. The flag never changes TAMPERED or UNCHECKED,
92
+ 3 unsigned (refused), 4 run outcome not verified (a sealed receipt of a FAILED or
93
+ otherwise unverified run), 66 no runs. The outcome check runs before the UNSIGNED
94
+ branch, so the flag never changes exit 4, TAMPERED or UNCHECKED,
93
95
  and verify never creates a signing key.
94
96
 
97
+ `loki verify --pubkey FILE <receipt.json|run-id>` (v10 only) checks the signature
98
+ against the supplied Ed25519 public key (JWK from `loki keys export`, or PEM) and
99
+ never the local JWKS. Exits: 0 VERIFIED, 1 TAMPERED, 2 UNCHECKED (kid does not
100
+ match the key, or the key file is unusable), 3 UNSIGNED (a receipt with no
101
+ signature is refused even with `--allow-unsigned`, because the caller asked for a
102
+ signature check), 4 run outcome not verified (checked before UNSIGNED).
103
+
95
104
  An early draft spec listed `1=BLOCKED, 2=CONCERNS`. That ordering was rejected:
96
105
  it is not used anywhere, it has no consumers, and it inverts the
97
106
  severity-rises-with-the-code rule that every other command follows.
package/docs/v10/BOARD.md CHANGED
@@ -459,14 +459,14 @@ set is declared to avoid overlap with those and with each other.
459
459
  | E-129 | BACKLOG 117 remainder: WhatsNew.tsx hardcodes a stale CURRENT_VERSION (9.55.0) that drifts from the shipped release | web-app/src/components/WhatsNew.tsx, tests/test-whatsnew-version-sync.sh | LOW | bash tests/test-whatsnew-version-sync.sh | released@2026-09-30T18:50Z | Source: BACKLOG 117. Evidence: WhatsNew.tsx:5 against VERSION 10.5.3. Released in v10.5.7 (merge 0c9daffc is an ancestor of v10.5.7). |
460
460
  | E-130 | D41 item 4 (speed): cache dependency install by lockfile hash in the bash parallel-worktree bootstrap | autonomy/run.sh (create_worktree only), tests/test-worktree-install-cache.sh | MEDIUM | bash tests/test-worktree-install-cache.sh | released@2026-09-30T18:50Z | Source: D41 item 4. Evidence: run.sh:6298-6304 installs unconditionally on every worktree. Released in v10.5.7 (merge 17af0439 is an ancestor of v10.5.7). |
461
461
  | E-131 | BACKLOG 146: P7 sink regex misses a computed or bracket-indexed sink name, for example window[sinkName](rows) | tests/moat/p7-no-fabricated-data.sh | HIGH | bash tests/moat/p7-no-fabricated-data.sh | merged@2026-09-30T18:11Z | Source: BACKLOG 146. Evidence: SETTER regex at p7-no-fabricated-data.sh:771 matches only literal names. Same engineer as E-128. |
462
- | E-132 | Wall classifier: a missing test runner (python -m pytest exits 1 with No module named pytest) reads as red, not not_run; D42 red requires the runner to start and at least one test to fail, so require a pytest summary line with failed before red | loki-ts/src/engine10/stages/wall.ts, loki-ts/tests/engine10/wall.test.ts | HIGH | cd loki-ts and bun test tests/engine10/wall.test.ts with a pytest-less python first on PATH | ready@2026-09-28T22:47Z | Source: main red on 04d3ac9c and 708c2907 (CI Bun job had no pytest); reproduced locally with a pytest-less venv, tests (3b) and (4) read fail 1. Seal still refuses later (not_run), so no false VERIFIED, but the Wall mis-seals. Coordinate with E-125 (same classifier). Core budget binds. |
462
+ | E-132 | Wall classifier: a missing test runner (python -m pytest exits 1 with No module named pytest) reads as red, not not_run; D42 red requires the runner to start and at least one test to fail, so require a pytest summary line with failed before red | loki-ts/src/engine10/stages/wall.ts, loki-ts/tests/engine10/wall.test.ts | HIGH | cd loki-ts and bun test tests/engine10/wall.test.ts with a pytest-less python first on PATH | merged@2026-10-01T06:47Z | Source: main red on 04d3ac9c and 708c2907 (CI Bun job had no pytest); reproduced locally with a pytest-less venv, tests (3b) and (4) read fail 1. Seal still refuses later (not_run), so no false VERIFIED, but the Wall mis-seals. Coordinate with E-125 (same classifier). Core budget binds. |
463
463
  | E-133 | release.sh guard: refuse to commit dist maps that contain an absolute path (a node_modules symlink in a release worktree wrote 133 /Users paths into loki.js.map and one into cockpit.js.map at v10.5.4) | scripts/release.sh, tests/test-release-dist-guard.sh | MEDIUM | bash tests/test-release-dist-guard.sh | released@2026-09-30T18:50Z | Source: v10.5.4 cut 2026-09-28, caught by hand before commit (paths rewritten to ../node_modules/). Guard: grep the dist maps for an absolute or home-directory path after the bump and exit nonzero. Released in v10.5.7 (merge 53918a30 is an ancestor of v10.5.7). |
464
464
  | E-134 | spawn_env_fsmonitor.test.ts positive control fails on Bun 1.4.2 (Nightly red 2026-09-29 and 09-30, both OSes): Bun no longer inherits the START env for a spawn with no env option, so the bare control call stops leaking the canary and the test proves nothing there. Keep the product assertions unconditional; add a control that passes the canary explicitly so the hook is proven to record env on any Bun; report which inheritance mode the running Bun has | loki-ts/tests/runner/spawn_env_fsmonitor.test.ts | HIGH | cd loki-ts and bun test tests/runner/spawn_env_fsmonitor.test.ts on Bun 1.3.13 and on latest | released@2026-09-30T18:50Z | Source: Nightly run 36719756873 job 109901555421 (bun-v1.4.2): control record held the withheld sentinel, not the canary. Product calls still did not leak. Security guard, opus review. Released in v10.5.7 (merge f0ba0d4d is an ancestor of v10.5.7). |
465
465
  | E-135 | Post-Release Smoke PyPI install gives up after about 10.5 min (6 attempts, 30s steps) while the published version is still propagating; v10.5.5 failed this way though PyPI now has it. Add --no-cache-dir and widen the window | .github/workflows/post-release-smoke.yml | LOW | bash -n on the step script; a rerun of the smoke on the next release | released@2026-09-30T18:50Z | Source: Post-Release Smoke run 36497082408 job 109179083720 (FATAL loki-mode-sdk==10.5.5 not installable after retries); PyPI shows 10.5.5 on 2026-09-30. Rerun of the failed jobs requested. Released in v10.5.7 (merge 1d4975a1 is an ancestor of v10.5.7). |
466
466
  | E-136 | measure-size.py counts any touched non-test .py file, so a docstring-only or typing-only second file makes a one-file fix read as medium (click-3449 utils.py, marshmallow-2170, pluggy-442); count only files whose change alters code, not comments or docstrings | eval/loki10/measure-size.py, its test | MEDIUM | the measure-size self test plus a fixture diff with a docstring-only second file reading small | released@2026-09-30T18:50Z | Source: S41-20a opus review 2026-09-30 (criterion 7 cannot stand in for criterion 1). Use the Python ast module to compare function bodies with docstrings stripped. Released in v10.5.7 (merge d116c91b is an ancestor of v10.5.7). |
467
467
  | E-137 | S41-18 interrupt test (legA in eval/loki10/test-scorecard-run.sh) leaks an orphaned run.sh plus harness.py (tasks rt1,rt2) when the run is torn down: two groups found reparented to PID 1 after 18 and 32 min on 2026-09-30, from a removed worktree and a reviewer probe dir | eval/loki10/test-scorecard-run.sh | MEDIUM | bash eval/loki10/test-scorecard-run.sh twice, then no run.sh or harness.py with --tasks rt1,rt2 remains | released@2026-09-30T19:22Z | Source: pulse Orphan worktree/run.sh processes 2 at 17:30Z; PIDs 56770/56781 and 96302/96310 stopped by literal PID after inspection (the python harness ignored SIGTERM). Fix: trap EXIT in the test that stops the recorded group, and assert no survivors. Released in v10.5.8 (merge 030cd521 is an ancestor of v10.5.8). |
468
468
  | E-138 | P7 scanner misses optional-call sinks and one-hop aliasing: setRows?.([...]), window[k]?.(rows), const s = setRows; s(rows), and a memo or local that forwards a fabricator result; accept an optional ?. before the call in the three sink heads and follow one alias hop | tests/moat/p7-no-fabricated-data.sh | HIGH | bash tests/moat/p7-no-fabricated-data.sh with red and green fixtures per form | parked@2026-09-30T20:04Z | Source: E-128/E-131 opus review 2026-09-30 (lines 776, 1067, 1172 use a (?=[(<]) or \s*\( lookahead); pre-existing at base, not opened by E-131. PARKED 20:05Z by the adoption directive (docs/v10/PROGRESS.md 20:05Z); resumes after Tier 0 is green. |
469
- | E-139 | spawn_env_fsmonitor.test.ts follow-ups from E-134 review: comments at lines 16-17 and 114 overstate Bun 1.4.2 (Bun.spawn and Bun.spawnSync with no env still inherit the START env; only node:child_process inherits current), name spawn_env_guard.test.ts as the guard for them; line 94 driver should run process.execPath, not the bun on PATH | loki-ts/tests/runner/spawn_env_fsmonitor.test.ts | LOW | cd loki-ts and bun test tests/runner/spawn_env_fsmonitor.test.ts | ready@2026-09-30T18:08Z | Source: E-134 opus review 2026-09-30 (probe: Bun.spawn on 1.4.2 printed START env). |
469
+ | E-139 | spawn_env_fsmonitor.test.ts follow-ups from E-134 review: comments at lines 16-17 and 114 overstate Bun 1.4.2 (Bun.spawn and Bun.spawnSync with no env still inherit the START env; only node:child_process inherits current), name spawn_env_guard.test.ts as the guard for them; line 94 driver should run process.execPath, not the bun on PATH | loki-ts/tests/runner/spawn_env_fsmonitor.test.ts | LOW | cd loki-ts and bun test tests/runner/spawn_env_fsmonitor.test.ts | released@2026-09-30T23:00Z | Source: E-134 opus review 2026-09-30 (probe: Bun.spawn on 1.4.2 printed START env). |
470
470
  | E-140 | Something deletes run-owned loki-run.* directories under TMPDIR while another agent is using them (an opus reviewer's dir and its Bun 1.4.2 binary vanished mid-review on 2026-09-30; unfamiliar dirs with e10ext subdirs appeared inside). Find the sweeper (a test cleanup, a trap, or a script removing loki-run.* by pattern) and make it remove only its own validated dir | the offending script or test (to locate), plus a guard test | HIGH | a guard that plants two run-owned dirs and runs the suspected cleanup, asserting the foreign one survives | released@2026-09-30T19:22Z | Source: E-134 opus review cleanup note 2026-09-30. CLAUDE.md forbids sweeping TMPDIR by pattern. Released in v10.5.8 (merge 98eadf90 is an ancestor of v10.5.8). |
471
471
  | E-141 | treeswap passes an explicit env to its git spawns (spawn_env_guard, BACKLOG 149) | loki-ts/src/e10ext/treeswap.ts and its test | MEDIUM | bun test tests/e10ext | released@2026-09-30T18:50Z | Merged c2305c99 via 0bf98fd0. S41-13 binding note records the scrubbed-env requirement. Released in v10.5.7 (merge 0bf98fd0 is an ancestor of v10.5.7). |
472
472
  | E-142 | D44-C follow-ups: structural-checks changed_chars diffs against the merge-base (committed dashes/emoji caught), typecheck prints SKIP without node_modules, register test-v10-ops.sh and fix the IGNORE comment (slow, not hanging) | scripts/structural-checks.sh, tests/test-structural-checks.sh, tests/test-registration-coverage.sh, tests/run-all-tests.sh, tests/shard-durations.tsv | LOW | bash tests/test-structural-checks.sh; each check under 10s | merged@2026-09-30T18:49Z | Source: D44-C TL review (APPROVE with notes). |
@@ -478,7 +478,7 @@ set is declared to avoid overlap with those and with each other.
478
478
  | E-148 | Review follow-ups: test-stop-process-group.sh still kills by `pkill -f "loki-$PGTEST_TAG"` (pattern kill, forbidden by CLAUDE.md): replace with recorded PIDs or a process-group kill; test-audit-chain-cross-file.sh test 1 reads the real ~/.loki/dashboard/audit (fails on hosts with old tampered data): make it hermetic; E-147 timeout message says "after all cases passed" when there was zero output: say "no PASS output (possible hang before the first case)" | tests/test-stop-process-group.sh, tests/test-audit-chain-cross-file.sh, tests/test-trust-core-probe-isolation.sh | LOW | each suite passes on a host with a tampered ~/.loki audit file; no pkill -f remains | merged@2026-09-30T19:53Z | Source: E-143 and E-147 TL reviews (APPROVE with notes). |
479
479
  | E-149 | loki-ts/tests/engine10/modernize/java_capture.test.ts "unitClassesFromGraph (M-04 integration)" times out at bun's 5s default under CI load (5169ms, Coverage run 36764748814 on train/5 1cd5feac; also failed on train/2 and in a local full run): measure, make it cheaper or set an explicit measured timeout; sweep modernize tests over 2.5s | loki-ts/tests/engine10/modernize/*.test.ts | LOW | before/after durations under 3x load; bun test tests/engine10/modernize 0 fail | released@2026-09-30T20:08Z | Source: D44 train/5 red (Coverage). Rerun of the failed job in flight. Released in v10.5.10 (merge 2394dc4a is an ancestor of v10.5.10). |
480
480
  | E-151 | Release blocker guard: v10.5.10 (69ebc03e) shipped loki-ts/dist/loki.js.map stale because the bump changed it (version literal 10.5.9 to 10.5.10 changed length, shifting mappings) and the release commit staged a fixed file list. scripts/release.sh --bump-only should print every file it changed (including dist maps), and a check (in release.sh or a pre-push rule for "release: v*" commits) should refuse a release commit that leaves a stamped tracked file modified in the worktree | scripts/release.sh, tests/test-release-dist-guard.sh | LOW | fixture: a bump that changes the map, commit without it, check refuses; with it, passes | released@2026-09-30T21:23Z | Source: v10.5.10 release; interim procedure: assert `git status --porcelain` is empty after the release commit before pushing. Map corrected on the next train. Released in v10.5.11 (merge bd5834a9 is an ancestor of v10.5.11). |
481
- | E-152 | release.sh --bump-only "stage these files:" list must print a copy-paste command that works: loki-ts/dist is gitignored, so `git add loki-ts/dist/loki.js` refuses (seen 19:58Z on train/7); print `git add -f` for paths under an ignored directory (git check-ignore) and plain `git add` otherwise | scripts/release.sh, tests/test-release-dist-guard.sh | LOW | fixture with an ignored-but-tracked dist file: the printed command stages it | ready@2026-09-30T19:58Z | Source: first live use of E-151 --check-clean caught the unstaged dist (rc=1). |
481
+ | E-152 | release.sh --bump-only "stage these files:" list must print a copy-paste command that works: loki-ts/dist is gitignored, so `git add loki-ts/dist/loki.js` refuses (seen 19:58Z on train/7); print `git add -f` for paths under an ignored directory (git check-ignore) and plain `git add` otherwise | scripts/release.sh, tests/test-release-dist-guard.sh | LOW | fixture with an ignored-but-tracked dist file: the printed command stages it | released@2026-10-01T06:40Z | Source: first live use of E-151 --check-clean caught the unstaged dist (rc=1). |
482
482
  | E-153 | Incident 20:16Z: a reviewer's fixture setup ran `git commit` with the MAIN CHECKOUT as cwd, committing author `t <t@t>` "init" that replaced the real package.json with a fixture and added sum.js/sum.test.js (local only, never pushed; undone with `git reset --keep 1c96ab16`). Guard: a pre-commit hook in .githooks refusing any commit in this repository whose author email is not the repo-local identity (git config user.email) unless LOKI_ALLOW_FOREIGN_AUTHOR=1, so fixture commits made in the wrong cwd fail loudly; fixture commits in real temp repos are unaffected | .githooks/pre-commit, tests/test-pre-commit-author-guard.sh | LOW | red first: in a scratch clone with the hook installed, `git -c user.email=t@t commit` is refused; the repo identity commits | ready@2026-09-30T20:17Z | Source: loki-seal r2 review fixture (agent stopped at 20:17Z). Reviewer prompts now require `git -C "$FIXTURE"` and a pwd check under LOKI_RUN_TMP. |
483
483
  | S41-10b | Static-first fixed-rules block for the implement and fix briefs (S41-10 card remainder): a byte-identical rules block in the cache-stable prefix, per-task context after it; drive-letter and ~ plan paths filtered like absolute ones | loki-ts/src/engine10/stages/implement.ts, fix.ts (prefix only), loki-ts/src/e10ext/context.ts and tests | MEDIUM | red first: two different tasks produce byte-identical prefix bytes; core net-zero lines | merged@2026-09-30T19:19Z | Source: S41-10 reviews (APPROVE r2, remainder). |
484
484
  | S41-20h | Medium-task MINING pass (no task building): shortlist 12 candidate merged PRs whose shape survives the one-file probe (a semantic or signature change in file A that an independently tested caller in file B must match; not helper extraction, parameter threading, moved classes or typing-only files), each with a written one-file-fix attempt run against the upstream tests and its result | eval/loki10/tasks/CANDIDATES.md (new) | MEDIUM | every shortlisted PR has a failing one-file attempt recorded with command and rc | merged@2026-09-30T19:19Z | Source: S41-20b/c/d/e/f: 11 of 16 candidates fell to a reviewer one-file fix; S41-20f built 0. |
@@ -628,10 +628,12 @@ Source: ~/git/autonomi-dev/research/2026-09-30-adoption/SWARM-PROMPT-ADOPTION.md
628
628
  | E-157 | D46: Security Audit verdict reuse. (a) security-audit.yml also runs on push to train/** so every train tip gets the full --all gitleaks scan before main is fast-forwarded; (b) required-ci reuses the parent Security Audit verdict for an eligible VERSION-only bump under the existing eligibility rule (diff is VERSION plus generated version stamps only, parent run success at that exact SHA). Moat test: a non-VERSION-only bump still re-runs Security Audit. Supersedes FOUNDER-QUEUE 14 | .github/workflows/security-audit.yml, release.yml (required-ci), tests | HIGH | non-VERSION-only bump re-runs the scan | merged@2026-10-01T03:03Z | after slice-D46-ci; r3 opus APPROVE 57b511d2; DROPPED from train/21 (D46): STEP 1 re-indent broke S-132 normalizer parity (test-version-bump-only 28/1), reverted 7d1a0f15, r4 with CI-health |
629
629
  | E-159 | Pre-existing secret-scan gaps found by the E-157 r2 opus reviewer: (a) an evil merge, a merge commit whose OWN content adds a secret (merge -s ours --no-commit, token in the merge commit), is invisible to both the PARENT..SHA range scan and the --all scan (only `gitleaks dir` found it); (b) pinned gitleaks 8.30.0 exits 0 when its internal git log fails (invalid range), a latent fail-open. Fix: --diff-merges=first-parent (or -m) in --log-opts for both modes or a working-tree scan at the release SHA; guard `git rev-list RANGE` success or treat `[git] fatal` as failure | scripts/security-audit-gitleaks.sh, workflows, tests | HIGH | evil-merge and bad-range fixtures fail the scan | merged@2026-10-01T03:03Z | CI-health engineer after E-157 r3; r1 opus REJECT 5f33451d: stdin merge scan false-positives on real history (v10.5.13..14 rc 1), Wall checks skip in CI |
630
630
  | E-160 | D46 runner contention (peer steer 02:11Z): a green train SHA fast-forwarded to main re-runs Tests (8 shards), Bun Parity, Security Audit and First-run gate on the identical SHA, doubling runner load and queueing the next train. Proposal: on push to main, a first job checks for a successful run of the same workflow at the same SHA from a train/** push and, if found, exits success recording the reused run id (D28: same SHA = same tree); any SHA not train-tested runs in full. CTO call FIRST: OPERATING-MODEL says "Tier B full verification on every main commit (never cancelled on main)"; confirm reuse does not weaken Release required-ci, branch-conditional steps (train vs main), or the Security Audit range (base tag config). Sequence after E-157 r4 (same files) | .github/workflows/test.yml, bun-parity.yml, security-audit.yml, tests/test_release_required_ci.py | HIGH | main push of a train-green SHA records reuse and finishes in under 1 min; an untested SHA runs in full; a train-red SHA is not reused | ready@2026-10-01T02:10Z | CTO decision first; after E-157 |
631
- | E-161 | INCIDENT 02:46Z: an opus reviewer ran `git checkout --detach <tag>` x7 plus a `.gitleaksignore` overwrite in the SHARED main checkout (reflog 02:46:04Z to 02:46:38Z). Cause: its run-owned clone dir was deleted, the next `cd` into a new clone failed, and the shell cwd fell back to the main checkout; every later command ran there. Restored by the Chief of Staff (`git checkout main`, fafe50dd, clean). Guard: v10-guard.sh (PreToolUse) blocks `git checkout`/`git switch`/`git reset`/`git worktree remove` and writes to tracked files when cwd resolves to the main checkout and the caller is an agent (not the leader session); agent prompts use `cd DIR` followed by an exit-on-failure check. Test: a hook test with cwd=main checkout blocks a detached checkout and allows it in a worktree | scripts/v10-guard.sh, tests | HIGH | detached checkout in main checkout blocked; same in a worktree allowed | ready@2026-10-01T02:47Z | GUARDS.md entry |
631
+ | E-161 | INCIDENT 02:46Z: an opus reviewer ran `git checkout --detach <tag>` x7 plus a `.gitleaksignore` overwrite in the SHARED main checkout (reflog 02:46:04Z to 02:46:38Z). Cause: its run-owned clone dir was deleted, the next `cd` into a new clone failed, and the shell cwd fell back to the main checkout; every later command ran there. Restored by the Chief of Staff (`git checkout main`, fafe50dd, clean). Guard: v10-guard.sh (PreToolUse) blocks `git checkout`/`git switch`/`git reset`/`git worktree remove` and writes to tracked files when cwd resolves to the main checkout and the caller is an agent (not the leader session); agent prompts use `cd DIR` followed by an exit-on-failure check. Test: a hook test with cwd=main checkout blocks a detached checkout and allows it in a worktree | scripts/v10-guard.sh, tests | HIGH | detached checkout in main checkout blocked; same in a worktree allowed | merged@2026-10-01T06:47Z | GUARDS.md entry |
632
632
  | E-162 | Founder "faster" (03:05Z): slice CI runs only Tier A plus diff-selected suites (the existing Tier A selection), Bun Parity and the structural guards; the full 8-shard Tests stays on train/** and main, and the train stays the release verdict. Frees runners and targets about 2 min slice CI | .github/workflows/test.yml (slice-* job matrix only), tests | HIGH | slice-* push runs no 8-shard matrix; train/** and main still run all 8 shards; a slice touching a suite runs that suite | merged@2026-10-01T05:22Z | after E-157 r4 (same file) |
633
- | E-165 | tests/test-mirofish-integration.sh line 413 runs `autonomy/loki start --no-mirofish` in the repo root: a live autonomous build that ran about 45 min, switched a worktree branch to loki/session-* and committed a docs change (found by DOC-02). Guard: the test must run against a run-owned fixture repo with a stub provider and LOKI_NO_BROWSER=1, never the repo root; add a structural guard that no test launches start/run against REPO_ROOT | tests/test-mirofish-integration.sh, a structural guard | HIGH | the test never runs loki start in the repo root; guard catches a planted case | ready@2026-10-01T04:07Z | P0 guard (D26) |
634
- | E-166 | Jira auto-sync never starts: src/integrations/sync-subscriber.js builds JiraApiClient without the required email and apiToken, so LOKI_JIRA_URL plus LOKI_JIRA_TOKEN do nothing (DOC-02 added a known-issue note to the setup docs). Fix the wiring or remove the advertised auto-sync | src/integrations/sync-subscriber.js, tests | MEDIUM | with env set, the subscriber constructs a working client (mocked API) | ready@2026-10-01T04:07Z | none |
633
+ | E-165 | tests/test-mirofish-integration.sh line 413 runs `autonomy/loki start --no-mirofish` in the repo root: a live autonomous build that ran about 45 min, switched a worktree branch to loki/session-* and committed a docs change (found by DOC-02). Guard: the test must run against a run-owned fixture repo with a stub provider and LOKI_NO_BROWSER=1, never the repo root; add a structural guard that no test launches start/run against REPO_ROOT | tests/test-mirofish-integration.sh, a structural guard | HIGH | the test never runs loki start in the repo root; guard catches a planted case | merged@2026-10-01T06:52Z | P0 guard (D26) |
634
+ | E-166 | Jira auto-sync never starts: src/integrations/sync-subscriber.js builds JiraApiClient without the required email and apiToken, so LOKI_JIRA_URL plus LOKI_JIRA_TOKEN do nothing (DOC-02 added a known-issue note to the setup docs). Fix the wiring or remove the advertised auto-sync | src/integrations/sync-subscriber.js, tests | MEDIUM | with env set, the subscriber constructs a working client (mocked API) | merged@2026-10-01T06:43Z | none |
635
+ | P0-promote-bun | Auto-promote of 10.5.22 failed: promote.yml ran the first-run gate without bun, the installed CLI fell back to legacy, 7 v10 checks failed and the cost check crashed (IndexError). Install bun before the gate; cost check fails closed; explicit engine-fallback check | .github/workflows/promote.yml, scripts/first-run-gate.sh, tests/test-first-run-gate.sh | test-first-run-gate 56/0 incl. fallback fixture; gate --stub 0 failed | HIGH | merged@2026-10-01T07:09Z | opus CTO APPROVE 5bdfe2f8 |
636
+ | E-167 | Gate the no-bun path end to end (CTO follow-up to P0-promote-bun): run the default entry with bun absent from PATH and assert the legacy receipt, NOT VERIFIED on a skipped target and the documented exit codes; the promote gate currently proves only the bun path | scripts/first-run-gate.sh, tests/test-first-run-gate.sh | no-bun stub run fails closed on a skipped test; clean no-bun run reads its legacy receipt | MEDIUM | ready@2026-10-01T07:09Z | none |
635
637
  | D49-auto | Auto-promote to latest on Post-Release Smoke success (founder D49) | .github/workflows/promote.yml, tests/test_release_next_tag.py | HIGH | smoke-success from Release promotes; manual smoke never promotes; not-lower guard | merged@2026-10-01T03:03Z | opus APPROVE 5510b8c8. Follow-ups (D49-auto-b): not-lower guard fails OPEN on an npm error (make it fail closed); loki-mode-sdk latest has no not-lower guard; a newer queued promote can replace a pending one in a release burst |
636
638
  | D51-A3 | Headless `loki backlog owner/repo --all/--label/--issues` plus loki.yaml (schema, validator, env overrides) | autonomy/lib/backlog.py, autonomy/lib/loki_yaml.py, autonomy/loki, schemas/loki-yaml.schema.json, tests/test-backlog.sh | HIGH | backlog 47/0 | merged@2026-10-01T03:11Z | sonnet APPROVE 14ff9ae2; follow-up D51-A3b: `loki_yaml.py show` echoes a token pasted into git.token_env (redact x-secret-ref fields); no-parser test case; re-run of a failed issue discards its kept worktree |
637
639
  | D51-A4 | Slack on the v10 path (PR opened, BLOCKED, finished), webhook from the env var named by LOKI_SLACK_WEBHOOK_ENV, URL redacted, 5s bounded post | loki-ts/src/e10ext/slack_events.ts, engine10/supervisor.ts, tests | MEDIUM | slack tests 40/0 | merged@2026-10-01T03:11Z | sonnet APPROVE adb838b2; one labelled test message after it ships |
@@ -797,3 +797,25 @@ previously mismarked two merged guards (S-16, S-74) as PENDING.
797
797
  no-op (`return dict(row)`) reproduces the incident directly: the planted
798
798
  secret and the log paths both survive.
799
799
  Run: `bash tests/test-prune-worktrees.sh && bash tests/test-eval-archive.sh`.
800
+
801
+ ## 21. A failed `cd` let an agent detach the shared main checkout (E-161)
802
+
803
+ - **Incident:** an agent ran `cd <temp clone>` which failed, then fell back
804
+ to the shared main checkout and ran `git checkout --detach <tag>` there 7
805
+ times, leaving the founder's checkout detached each time.
806
+ - **Guard:** RULE8 in `scripts/v10-guard.sh` (PreToolUse Bash hook). In the
807
+ primary worktree (git-dir equals git-common-dir) it blocks `git checkout
808
+ --detach`, `git checkout <tag|sha|remote-ref>` and `git switch --detach`
809
+ for every caller. When the hook input carries `agent_id` (set only for
810
+ subagents; the leader has none) it also blocks all `git checkout`/`switch`,
811
+ `reset --hard`, `stash`, `clean` and `worktree remove` of the main
812
+ checkout. A dangerous git command after a `cd` not followed by `&&`/`||`
813
+ is blocked when the hook cwd is the primary worktree. The leader keeps
814
+ `git checkout main`, merge, revert and commit.
815
+ - **Limit:** `cd X || true; git ...` counts as handled. If a host stops
816
+ sending `agent_id`, only the always-on detach forms remain.
817
+ - **The test that proves it fires:** `tests/test-v10-guard.sh` (Rule 8
818
+ section): detached checkout in the main checkout blocked, same in a linked
819
+ worktree allowed, leader `git checkout main` allowed, subagent forms and
820
+ the unchecked-`cd` case blocked.
821
+ Run: `bash tests/test-v10-guard.sh`.
package/docs/v10/GUIDE.md CHANGED
@@ -1,10 +1,20 @@
1
1
  # Loki 10 engine guide
2
2
 
3
- Opt-in: set LOKI_ENGINE=v10 <!-- loki10-default -->
4
-
5
- Loki 10 is the rewritten engine (docs/v10/ENGINE.md). It is not the default
6
- yet. Every command below only runs when LOKI_ENGINE=v10 is set; leave it
7
- unset and `loki` keeps using the current (legacy) engine exactly as before.
3
+ Default: Loki 10 engine for `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"`. Set LOKI_ENGINE=legacy or run `loki legacy <args>` for the previous engine. <!-- loki10-default -->
4
+
5
+ Loki 10 is the rewritten engine (docs/v10/ENGINE.md). Since the D48 flip it
6
+ is the default for three entry points: `loki "<task>"`, `loki owner/repo#N`
7
+ (issue mode) and `loki quick "<task>"`. Each prints one start line,
8
+ `Loki 10 engine (set LOKI_ENGINE=legacy or run 'loki legacy' for the previous
9
+ engine)`, then the summary below. Everything else (`loki start`, `loki
10
+ status`, `loki dashboard` and the rest) is unchanged unless you set
11
+ LOKI_ENGINE=v10 explicitly, which also routes status, verify and dashboard
12
+ to the v10 commands. Bare `loki verify` (no LOKI_ENGINE) follows the newest
13
+ run: when the newest entry in .loki/runs/ is a v10 run newer than the newest
14
+ legacy proof it runs the v10 verify, otherwise the legacy verify. If bun is
15
+ missing or LOKI_PROVIDER is unsupported, the default mode falls back to the
16
+ legacy engine and prints one stderr line saying why. The previous engine stays one step away:
17
+ `loki legacy <args>` and LOKI_ENGINE=legacy.
8
18
 
9
19
  Some pieces named in this guide are still being built. Each one below says
10
20
  so plainly instead of describing a finished feature.
@@ -12,19 +22,34 @@ so plainly instead of describing a finished feature.
12
22
  ## Quickstart
13
23
 
14
24
  Put the task first, as a quoted multi-word string, so bin/loki's router
15
- sends it to the v10 engine instead of the legacy one. A one-word argument
16
- that is not an issue ref, or any first argument starting with `-`, stays
17
- on the legacy engine.
25
+ sends it to the v10 engine. A one-word argument that is not an issue ref,
26
+ or any first argument starting with `-`, stays on the legacy engine.
27
+
28
+ ```
29
+ loki "fix the login redirect loop" --no-pr
30
+ ```
31
+
32
+ `loki quick "<task>"` is the small-task entry. It runs the same engine
33
+ without opening a pull request (the legacy quick never opened one), and the
34
+ engine's own sizing picks the lean path for a small task: Plan and Wall are
35
+ skipped and implement starts on sonnet, escalating to the top model only
36
+ on a real test failure (E-64; `LOKI_E10_CASCADE=0` turns the cascade off).
37
+ `loki quick --help` and a flag-first `loki quick -v "<task>"` stay on the
38
+ legacy quick.
18
39
 
19
40
  ```
20
- LOKI_ENGINE=v10 loki "fix the login redirect loop" --no-pr
41
+ loki quick "fix the login redirect loop"
21
42
  ```
22
43
 
44
+ If bun is not installed, or LOKI_PROVIDER names a provider the v10 engine
45
+ has no invoker for (anything but claude, codex, cline, aider), these entry
46
+ points fall back to the legacy engine instead of failing.
47
+
23
48
  Issue refs work the same way:
24
49
 
25
50
  ```
26
- LOKI_ENGINE=v10 loki owner/repo#123
27
- LOKI_ENGINE=v10 loki https://github.com/owner/repo/issues/123
51
+ loki owner/repo#123
52
+ loki https://github.com/owner/repo/issues/123
28
53
  ```
29
54
 
30
55
  bin/loki routes GitHub, GitLab (`.../-/issues/N`) and Jira
@@ -58,9 +83,13 @@ verify, seal) and then, in the supervisor, the pr stage, ending in the
58
83
  Slack is not part of the v10 engine surface (no command, no notification
59
84
  hook) and is in progress, tracked with the other wave 3 items.
60
85
 
61
- ## The 5-line summary
86
+ ## The summary
62
87
 
63
- A finished run prints five lines, one label each:
88
+ A finished run prints the start line, then one label per line (Outcome,
89
+ PR, Receipt, NOT PROVEN, Cost, Time; a Reason line is added for any
90
+ outcome other than VERIFIED or ALREADY_SATISFIED). The quiet default stays
91
+ within 8 lines. The block below is the older 5-line form; the labels are the
92
+ same:
64
93
 
65
94
  ```
66
95
  PR: https://github.com/owner/repo/pull/1
@@ -81,7 +110,13 @@ Time: 4m12s (intake 11s, plan 20s, implement 3m10s, verify 31s)
81
110
  separate `; flaky ...` clause on the same line.
82
111
  - **Cost**: the provider-reported dollar figure and token count. When the
83
112
  provider does not report cost, this line reads `not measured` instead of
84
- `$0.00`; a missing cost is never rendered as free.
113
+ `$0.00`; a missing cost is never rendered as free. The one exception is the
114
+ CLI invoker (LOKI_E10_INVOKER=cli, which the first-run gate's stub uses): it
115
+ has no dollar figure to report, so the run records 0 with the source marker
116
+ `cli-invoker-unmetered` in the cost event, the receipt (`cost.source`) and
117
+ the efficiency record, shows `$0.00 (...; CLI invoker records no cost)`, and
118
+ adds `cost unmetered (CLI invoker; recorded as 0)` to NOT PROVEN. The cost
119
+ fields are never null on such a run.
85
120
  - **Time**: total wall time, then each stage's own duration in parentheses.
86
121
 
87
122
  This formatter (`loki-ts/src/engine10/output.ts`, `formatSummary`) is
@@ -138,15 +173,12 @@ provider names (`claude`, `codex`, `cline`, `aider`); it is not supported.
138
173
 
139
174
  ## After the flip
140
175
 
141
- Once v10 becomes the default (docs/v10/DECISIONS.md, D29), `loki`, `loki
142
- status`, `loki verify` and `loki dashboard` with no `LOKI_ENGINE` set will
143
- mean the v10 commands described above. The previous engine stays
144
- reachable through `LOKI_ENGINE=legacy` (bin/loki sends every value other
145
- than `v10` to it), unchanged. Nothing is removed at the flip. A separate
146
- legacy alias command is planned (docs/v10/ENGINE.md, E-31) but is not on
147
- main.
148
-
149
- That flip has not happened on main as of this guide. The opt-in line near
150
- the top of this file and of README.md's section is the one place that
151
- records which state we are in; it changes in the same commit as the flip
152
- itself.
176
+ D48 made v10 the default for `loki "<task>"`, `loki owner/repo#N` and
177
+ `loki quick "<task>"`. The previous engine stays fully reachable and
178
+ unchanged: `loki legacy <args>` (prints a short deprecation notice to
179
+ stderr, then runs exactly the pre-flip route for `<args>`) and
180
+ `LOKI_ENGINE=legacy` (the same, without the notice, for scripts). Any
181
+ LOKI_ENGINE value other than v10 or unset also keeps the legacy engine.
182
+ Nothing is removed at the flip. The one place that records which state we
183
+ are in is the marked line near the top of this file and of README.md's
184
+ Loki 10 section; it changed in the same commit as the flip.
@@ -1747,3 +1747,27 @@ The swarm is stopped: .loki/V10-STOP exists, the loop has no wake-ups, and the c
1747
1747
  - Merged on local main: D48-flip r3 (opus APPROVE: FAILED receipt exits 4 with or without --allow-unsigned; dispatch 56/0; gate --stub 0 failed), A-134b r4 (sonnet APPROVE; registration rc=0, shard rc=0, own test 6/0), E-162 (opus APPROVE as CTO call).
1748
1748
  - train/33 63db8710 pushed. Guards: registration rc=0, shard-coverage rc=0 (E2e Features row 19 -> 20 to keep the five heaviest suites in distinct shards), v10-ops rc=0, run-shellcheck rc=0, docs-cli-drift rc=0, release-dist-guard rc=0, budget.test 24 pass.
1749
1749
  - REJECTED, fix rounds building: E-163 (live /usage timeout has no process-group kill), D48-r2 (unsigned receipt exits 0 under --pubkey; merge conflicts with the exit-4 change).
1750
+
1751
+ ## 2026-10-01T05:34Z v10.5.19 published and auto-promoted; train/33 red, flip dropped
1752
+ - v10.5.19: Release run 47050d65 completed success; npm view loki-mode@10.5.19 gitHead 47050d6533d7 matches; dist-tags latest=10.5.19 next=10.5.19 (D49 auto-promote). Unblocks the CodeQL P0 (10.5.18 never published).
1753
+ - train/33 63db8710 RED: Tests shard 7/8, suite "first-run gate assertion logic (A-02)" (tests/test-first-run-gate.sh): "FAIL clean: gate exit 1". Reproduced locally on 63db8710, not on aad61f9a. Cause: D48-flip r3 added gate checks (engine-start-line, cost-non-null, output-lines 8, bare verify rc 4) that the test's clean fixture does not emit.
1754
+ - D46 drop: reverted c2c43fd10 on main (5d25b205; reverted paths identical to aad61f9a; local test-first-run-gate rc=0, 0 FAIL). train/34 5d25b205 pushed with E-163 r3 (haiku fix; env parse probes abc/-5/nan/inf/0 -> 20, 46/0), A-134b r4, E-162.
1755
+ - D48-flip r4 (fixture fix) building; D48-r2b (pubkey, null-jwt exits 3 under --pubkey) built, in opus re-review; it needs the flip re-landed first.
1756
+
1757
+ ## 2026-10-01T06:07Z v10.5.20 promoted; v10.5.21 (D48 engine flip) cut, Release FAILED, NOT published (see 06:30Z); train/39
1758
+ - v10.5.20 240f3285: Release success; npm gitHead 240f3285f42b matches; dist-tags latest=10.5.20 next=10.5.20 (auto-promote, watcher bybzbhat6). Contents A-134b, E-162, E-163.
1759
+ - train/35 RED (Tests shard 1/8: "1 command(s) absent from 'loki help': keys"). D46 drop of D48-r2b (76e3d25c, revert clean vs flip-r4 merge). Fix r2c 2e7c68a3 (one help line), re-landed as 3eade3d4; train/37 green on Tests, Bun Parity, Coverage, Security Audit.
1760
+ - train/36 76e3d25c green (all four); main fast-forwarded; v10.5.21 189f347e pushed (--check-clean rc=0, parent == origin/main). CHANGELOG corrected: the flip's Unreleased notes said "loki verify unchanged"; r3 routes bare verify to v10 when the newest run is a v10 run (bin/loki:296-305), exit 4 for a non-VERIFIED outcome. Watcher bpighrue2.
1761
+ - Tier A red on every train since train/33: E-162 ran tests/test-shard-coverage.sh before the Python deps install; two pytest-gated suites (run-all-tests.sh:782-787) were not registered, 666 of 668. Fix 55d559ea moves the step after pip install (train/38).
1762
+ - train/39 c34511e5 = flip + keys (D48 rows 2, 7-9) + Tier A fix + 10.5.21 merge; local help, registration, shard-coverage, docs-drift, v10-ops all rc=0.
1763
+
1764
+ ## 2026-10-01T06:29Z CORRECTION: v10.5.21 not published (P0, fix forward)
1765
+ - v10.5.21 189f347e: Release run completed failure. Tests at that SHA failed in shard 6/8: "CHANGELOG Unreleased does not record the v10 default flip" (tests/test-engine10-legacy-notice.sh). The release CHANGELOG moved the flip note from Unreleased into the v10.5.21 section. Post-Release Smoke and Promote skipped; npm dist-tags latest=next=10.5.20. The 06:07Z entry's "released" was premature and is corrected above; rows say released only once npm has the version.
1766
+ - Moat suite passed at 189f347e, so the train/39 P2.checklist-verify-not-shadowed failure did not recur on the same code (local p2 run on c34511e5 also PASS); still treated as unconfirmed until train/40.
1767
+ - Fix baf5e2c8: the test now requires 'Loki 10.*now the default' anywhere in CHANGELOG. Intent kept: a copy of CHANGELOG with that line removed fails the pattern, the real file passes. train/40 baf5e2c8 in CI; on green, fast-forward and cut 10.5.22 (flip, keys, Tier A fix), CHANGELOG stating 10.5.21 was never published.
1768
+
1769
+ ## 2026-10-01T07:03Z v10.5.22 published to next; auto-promote FAILED (P0)
1770
+ - v10.5.22 9b22a347: Release success; npm view loki-mode@10.5.22 gitHead 9b22a3477072 matches; dist-tags next=10.5.22, latest=10.5.20 (UNCHANGED). Release body 11 lines. Contents: D48 flip (rows 7-9), keys export and verify --pubkey (row 2), Tier A fix, E-35 test fix. v10.5.21 was never published.
1771
+ - promote.yml run at 07:00Z: completed failure, correctly refused to move latest. first-run-gate.sh --installed loki-mode@10.5.22 ran on ubuntu-latest WITHOUT bun; the installed CLI fell back to the legacy engine ("the Loki 10 engine needs bun"), so 7 v10 checks failed (digest-matches, verify-ok, receipt-signed, output-lines 13>8, engine-start-line, cost-non-null, skip-bare-verify) and the cost check crashed with IndexError (no v10 run dir).
1772
+ - P0 fix slice-P0-promote-bun building: setup-bun in promote (and any other gate job on an installed package), cost check fails closed instead of crashing, explicit "engine fell back to legacy" check. CTO (opus) review before merge; release-gate change.
1773
+ - train/42 73dbe61b (E-166, E-161, E-132 test, E-165) in CI.