loki-mode 11.36.3 → 11.36.5

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 (73) hide show
  1. package/SKILL.md +21 -41
  2. package/VERSION +1 -1
  3. package/autonomy/council-v2.sh +22 -22
  4. package/autonomy/run.sh +17 -21
  5. package/dashboard/__init__.py +1 -1
  6. package/docs/CLI-REFERENCE.md +1 -1
  7. package/docs/INSTALLATION.md +1 -1
  8. package/loki-ts/data/council-v2-schema.json +2 -2
  9. package/loki-ts/data/requirements-verdict-schema.json +39 -0
  10. package/loki-ts/dist/loki.js +2 -2
  11. package/mcp/__init__.py +1 -1
  12. package/package.json +2 -2
  13. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  14. package/skills/model-selection.md +2 -0
  15. package/skills/production.md +2 -0
  16. package/skills/release-cadence.md +47 -0
  17. package/web-app/dist/assets/{AdminPage-CuH90Z7M.js → AdminPage-CHgj9e9D.js} +1 -1
  18. package/web-app/dist/assets/{Avatar-MrMLoCy6.js → Avatar-DnjE-s2D.js} +1 -1
  19. package/web-app/dist/assets/{Badge-BqtSUHoo.js → Badge-rdohHwn5.js} +1 -1
  20. package/web-app/dist/assets/{Button-D2KewPNs.js → Button-lTMYLSNI.js} +1 -1
  21. package/web-app/dist/assets/{CockpitPage-3tf9ttHR.js → CockpitPage-DFSNq1wL.js} +1 -1
  22. package/web-app/dist/assets/{ComparePage-BFzvrQfl.js → ComparePage-CBKSLezp.js} +1 -1
  23. package/web-app/dist/assets/{ErrorBoundary-CSYtK_Ql.js → ErrorBoundary-Df48b6Je.js} +1 -1
  24. package/web-app/dist/assets/{EvidenceReceiptPanel-Dtgusy-n.js → EvidenceReceiptPanel-6tEgwPQd.js} +1 -1
  25. package/web-app/dist/assets/{GitHubIssuesPanel-D7APRlvp.js → GitHubIssuesPanel-4KtdfYjO.js} +1 -1
  26. package/web-app/dist/assets/{GitHubPRsPanel-D5TtRPvp.js → GitHubPRsPanel-ztgEOtRg.js} +1 -1
  27. package/web-app/dist/assets/{HomePage-Bs4gQ4dz.js → HomePage-CVpp8-H0.js} +2 -2
  28. package/web-app/dist/assets/{LoginPage-DkXUcbJN.js → LoginPage-39Yg6-rt.js} +1 -1
  29. package/web-app/dist/assets/{MagicPage-7-gGVFie.js → MagicPage-D8uO2CfY.js} +1 -1
  30. package/web-app/dist/assets/{MetricsPage-CiRxHt9W.js → MetricsPage-EEBGvoFa.js} +1 -1
  31. package/web-app/dist/assets/{NotFoundPage-Cvqdxu7U.js → NotFoundPage-CwA5UMmT.js} +1 -1
  32. package/web-app/dist/assets/{ProjectPage-DGGUjKSW.js → ProjectPage-DdhEf450.js} +3 -3
  33. package/web-app/dist/assets/{ProjectsPage-PLAsjWDD.js → ProjectsPage-DK3CCPYa.js} +1 -1
  34. package/web-app/dist/assets/{SettingsPage-B6ItJRX1.js → SettingsPage-CwAPYzTs.js} +1 -1
  35. package/web-app/dist/assets/{ShowcasePage-ollPThzp.js → ShowcasePage-BcAPaurm.js} +1 -1
  36. package/web-app/dist/assets/{SystemSettingsPage-RrQJ6hgE.js → SystemSettingsPage-CNK_GU7n.js} +1 -1
  37. package/web-app/dist/assets/{TeamsPage-DR1CnkVA.js → TeamsPage-EOCnELHx.js} +1 -1
  38. package/web-app/dist/assets/{TemplatesPage-BISn2mMO.js → TemplatesPage-D8TSQjKT.js} +1 -1
  39. package/web-app/dist/assets/{TerminalOutput-BL4IjivX.js → TerminalOutput-DPC844Oq.js} +1 -1
  40. package/web-app/dist/assets/{activity-CHGCQ1ln.js → activity-DxObm-vX.js} +1 -1
  41. package/web-app/dist/assets/{bell-BXk1VRzW.js → bell-C0V9I9_A.js} +1 -1
  42. package/web-app/dist/assets/{bot-BhK3RNQn.js → bot-CnZPc54e.js} +1 -1
  43. package/web-app/dist/assets/{check-q7Cvbd7C.js → check-Dd5qA3uZ.js} +1 -1
  44. package/web-app/dist/assets/{chevron-left-BlL730Fk.js → chevron-left-C14R0z9X.js} +1 -1
  45. package/web-app/dist/assets/{circle-alert-DSflJ9So.js → circle-alert-C-EfE6Vw.js} +1 -1
  46. package/web-app/dist/assets/{clock-BYVfALwV.js → clock-D8RNW4dW.js} +1 -1
  47. package/web-app/dist/assets/{cloud-6FiHtzjx.js → cloud-DzuWln3t.js} +1 -1
  48. package/web-app/dist/assets/{code-xml-QX5egMPL.js → code-xml-DkpAVWQ-.js} +1 -1
  49. package/web-app/dist/assets/{database-Ca3axEd-.js → database-D6hTs8Kt.js} +1 -1
  50. package/web-app/dist/assets/{dollar-sign-cl6AGufx.js → dollar-sign-Ccsa7tnO.js} +1 -1
  51. package/web-app/dist/assets/{file-code-corner-CR_do6C6.js → file-code-corner-BOp28Uv4.js} +1 -1
  52. package/web-app/dist/assets/{file-plus-eJKX5_kv.js → file-plus-BATdmKt_.js} +1 -1
  53. package/web-app/dist/assets/{globe-CkxB-2yg.js → globe-eGNmW-8B.js} +1 -1
  54. package/web-app/dist/assets/{hammer-DVKPJuF3.js → hammer-CCaNdMvB.js} +1 -1
  55. package/web-app/dist/assets/{index-C6D2eiYF.js → index-CNHrwYdB.js} +3 -3
  56. package/web-app/dist/assets/{layers-DCxyBgd5.js → layers-bEAuyJub.js} +1 -1
  57. package/web-app/dist/assets/{loader-circle-TL1CkPc6.js → loader-circle-Cl5tTUU9.js} +1 -1
  58. package/web-app/dist/assets/{lock-JpuGIyBV.js → lock-9F3O5BX4.js} +1 -1
  59. package/web-app/dist/assets/{package-Cc4KpZmt.js → package-DjrFCobf.js} +1 -1
  60. package/web-app/dist/assets/{plus-DFGCYzZW.js → plus-vgBsYAy2.js} +1 -1
  61. package/web-app/dist/assets/{refresh-cw-DVb8qXE-.js → refresh-cw-DRpVPRDs.js} +1 -1
  62. package/web-app/dist/assets/{rotate-ccw-ClYSXsGq.js → rotate-ccw-BFa26GQ_.js} +1 -1
  63. package/web-app/dist/assets/{scroll-text-DGOfLvaD.js → scroll-text-Cvtk-SSC.js} +1 -1
  64. package/web-app/dist/assets/{server-DRr0hCmB.js → server-7LV5yRjZ.js} +1 -1
  65. package/web-app/dist/assets/{shield-alert-BNSEbWlv.js → shield-alert-ChxIXXWO.js} +1 -1
  66. package/web-app/dist/assets/{thumbs-up-DNfJb1qA.js → thumbs-up-C71buuGd.js} +1 -1
  67. package/web-app/dist/assets/{trash-2-CVqHp_YC.js → trash-2-Bo4OKarF.js} +1 -1
  68. package/web-app/dist/assets/{trending-down-C90hEYqK.js → trending-down-BP0yx6CL.js} +1 -1
  69. package/web-app/dist/assets/{trending-up-CJrn5aDb.js → trending-up-CDwbdAOt.js} +1 -1
  70. package/web-app/dist/assets/{upload-DbK6V3Vn.js → upload-zNgjkRoA.js} +1 -1
  71. package/web-app/dist/assets/{usePolling-CHJrHPyC.js → usePolling-iB841MIM.js} +1 -1
  72. package/web-app/dist/assets/{user-DYU0O_4r.js → user-CQBySt07.js} +1 -1
  73. package/web-app/dist/index.html +1 -1
package/SKILL.md CHANGED
@@ -1,14 +1,16 @@
1
1
  ---
2
2
  name: loki-mode
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.
3
+ description: Runs an autonomous software factory that knows what it is supposed to deliver and proves it did, with a signed receipt. Use when the user says Loki Mode or asks to build, fix or verify software autonomously.
4
4
  ---
5
5
 
6
- # Loki Mode v11.36.3
6
+ # Loki Mode v11.36.5
7
7
 
8
8
  **Current entry points (Loki 10 engine):** `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"` run the Loki 10 engine and end with a signed receipt (`loki verify`). `loki backlog owner/repo --all` runs many issues in parallel. Guide: `docs/v10/GUIDE.md`. The skill instructions below, and `loki start`, describe the previous bash loop. PRD-file starts (`loki start ./prd.md`) and the opencode provider still run on it until FC38-SWEEP ports them; the legacy-engine command and the LOKI_ENGINE switch remain removed. Prefer `loki owner/repo#N` for issues.
9
9
 
10
10
  **You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
11
11
 
12
+ **Prerequisite:** run `loki doctor` once; it checks the provider CLI, auth, git and runtime, and prints the fix for each failure.
13
+
12
14
  **Spec in, verified product out.** Spec-driven: a "spec" is whatever describes the work -- a Markdown PRD, a GitHub issue, an OpenAPI doc, a Jira ticket (a PRD is one form of spec). The differentiator is the trust layer: Loki does not call work done until it is verified. The RARV-C closure loop, 8 quality gates, the completion council, and the verified-completion evidence gate must all clear before completion is accepted. The evidence gate blocks on empty-diff, red tests, an unhealthy serveable app (runtime-boot axis, `LOKI_EVIDENCE_BOOT_GATE=0` to opt out), and a leaked credential in the changed files (secret-leak axis, `LOKI_EVIDENCE_SECRET_GATE=0` to opt out) -- v8.0.0.
13
15
 
14
16
  **Evidence Receipt (verify it yourself).** Every run writes a receipt to `.loki/proofs/<run_id>/` (opt out with `LOKI_PROOF=0`) that separates deterministic FACTS (git diff with base/head SHAs and a `diff_sha256`, the test command + exit code, the build command + exit code, each gate verdict) from AI ASSESSMENTS (the council verdict, labeled judgment not proof). The headline is computed only from the facts: VERIFIED (tests ran a real command and exited 0, diff non-empty, nothing skipped), VERIFIED WITH GAPS (each gap listed by name), or NOT VERIFIED (a check ran and failed). Inspect and re-check with `loki proof list|show <id>|verify <id>` (aliased `loki receipt`); `loki proof verify` re-hashes the receipt (tamper) and re-derives the diff from the recorded base SHA against the live repo (drift), exiting 0 clean / 1 tamper-or-drift / 2 could not check (64 usage, 66 unknown id; see `docs/exit-codes.md`). This is honesty-of-done, not a claim that the code is bug-free.
@@ -77,6 +79,19 @@ VERIFY: Run tests. Check build. Validate against spec.
77
79
  After 5 failures: Log to dead-letter queue, move to next task.
78
80
  ```
79
81
 
82
+ Copyable closure checklist (RARV-C; tick each before declaring a task done):
83
+
84
+ ```
85
+ - [ ] Reason: highest-priority unblocked task chosen
86
+ - [ ] Act: change committed atomically
87
+ - [ ] Reflect: outcome logged
88
+ - [ ] Verify: tests green, build passes, diff non-empty
89
+ - [ ] Compound: novel insight saved to ~/.loki/solutions/ (or none)
90
+ - [ ] Closure: gates and council clear; receipt is VERIFIED
91
+ ```
92
+
93
+ Example. Input: `loki owner/repo#123`. Output: a branch with the fix, a PR, and a receipt under `.loki/proofs/<run_id>/` whose headline reads `VERIFIED`; re-check with `loki proof verify <run_id>` (exit 0 = clean).
94
+
80
95
  ---
81
96
 
82
97
  ## PRIORITY 3: Autonomy Rules
@@ -455,45 +470,10 @@ See `CHANGELOG.md` entries [7.5.7], [7.5.8], [7.5.13] for the per-fix list and r
455
470
 
456
471
  ---
457
472
 
458
- ## Implemented Features
459
-
460
- | Feature | Added | Notes |
461
- |---------|-------|-------|
462
- | Multi-provider support (5 providers) | v5.0.0 | claude, codex, cline, aider, opencode -- see `providers/` |
463
- | CONTINUITY.md working memory | v5.35.0 | Auto-managed by run.sh, updated each iteration |
464
- | Quality gates 3-reviewer system | v5.35.0 | 5 specialist reviewers in `skills/quality-gates.md`; execution in run.sh |
465
- | Memory System (episodic/semantic/procedural) | v5.15.0 | Full implementation in `memory/` |
466
- | Context Window Tracking | v5.40.0 | Dashboard gauge, per-agent breakdown at `GET /api/context` |
467
- | Notification Triggers | v5.40.0 | `GET/PUT /api/notifications/triggers` |
468
- | GitHub integration | v5.42.2 | Import, sync-back, PR creation, export. CLI: `loki github`, API: `/api/github/*` |
469
- | Legacy System Healing | v6.67.0 | `loki heal <path>` -- friction-as-semantics, characterization tests |
470
- | Unified `loki start` | v6.84.0 | Auto-detects spec (PRD, OpenAPI, etc.) vs issue input |
471
- | Managed Agents (memory mirror) | v7.2.0 | Opt-in via `LOKI_MANAGED_AGENTS` -- see Managed Agents section |
472
- | Bun runtime (Phase 1) | v7.3.0 | Read-only commands routed through `bin/loki`; `LOKI_LEGACY_BASH=1` to revert |
473
- | Phase 1 RARV-C closure | v7.5.x | Findings injection, real judges, auto-learnings, handoff.md |
474
- | Anthropic SDK route | v8.0.0 | Opt-in, default-off; one switch `LOKI_SDK_MODE` -- see `references/sdk-mode.md` |
475
- | Harness intelligence | v8.0.0 | Prompt-cache discipline, confidence-spike re-check, goal scoring, smart retry |
476
- | SDK degradation event | v8.0.0 | Structured `capability_degraded` record on `.loki/events.jsonl` |
477
- | Time to first preview | v8.0.0 | `.loki/app-runner/first-preview.json`, write-once (bash route) |
478
- | Opt-in build analytics | v8.0.0 | `build_verified` event behind a strict second gate, allowlist-only fields |
479
-
480
- ## Planned / In-Progress Features
481
-
482
- | Feature | Target | Notes |
483
- |---------|--------|-------|
484
- | Bun runtime (Phase 2+) | TBD | Migrate write-path commands; tracked on `feat/bun-migration` |
485
- | Managed Agents multiagent path | TBD | `LOKI_EXPERIMENTAL_MANAGED_*` flags -- RESEARCH PREVIEW, not on live API |
486
- | Benchmarks | TBD | Runner scripts and datasets exist in `benchmarks/`; no published results |
487
- | `loki run` removal | with legacy removal | Currently a deprecated alias for `loki start` |
488
-
489
- ## Deprecated
490
-
491
- | Item | Deprecated In | Notes |
492
- |------|---------------|-------|
493
- | `loki run <issue>` | v6.84.0 | Alias for `loki start`. Removal is part of the planned legacy removal. |
494
- | `loki start`, RARV skill loop | v10.6.6 | Legacy engine, planned for removal; use `loki "<task>"` / `loki owner/repo#N`. |
495
- | VSCode extension (`vscode-extension/`) | v7.2.0 | No longer actively maintained; dashboard web UI is the supported front-end. |
473
+ ## Feature status
474
+
475
+ Implemented, planned and deprecated items, with the version each landed in: `skills/release-cadence.md` section 7. `loki start` and the RARV skill loop are the legacy engine (planned removal); prefer `loki "<task>"` or `loki owner/repo#N`.
496
476
 
497
477
  ---
498
478
 
499
- **v11.36.3 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
479
+ **v11.36.5 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 11.36.3
1
+ 11.36.5
@@ -134,11 +134,11 @@ council_v2_vote() {
134
134
  votes_json="$votes_json$vote_content"
135
135
 
136
136
  local verdict
137
- verdict=$(echo "$vote_content" | "$_c2_py" -I -S -c "import sys; sys.path[:] = [p for p in sys.path if p not in ('', '.')]; import json; print(json.load(sys.stdin).get('verdict','').upper())" 2>/dev/null || echo "UNKNOWN")
137
+ verdict=$(echo "$vote_content" | "$_c2_py" -I -S -c "import sys; sys.path[:] = [p for p in sys.path if p not in ('', '.')]; import json; print(json.load(sys.stdin).get('verdict','').strip().upper())" 2>/dev/null || echo "UNKNOWN")
138
138
  # TRUST: a reviewer that could not be REACHED did not vote REJECT.
139
139
  #
140
140
  # Every provider arm below used to substitute a literal
141
- # {"verdict":"REJECT","reasoning":"review execution failed"} on any
141
+ # {"verdict":"REJECT","justification":"review execution failed"} on any
142
142
  # miss -- CLI absent, timeout, transient error, unparseable output --
143
143
  # and this tally counted "anything not APPROVE" as a rejection. The
144
144
  # engine therefore fabricated a reviewer vote the model never gave,
@@ -218,7 +218,7 @@ print('{:.3f}'.format(detect_sycophancy(votes)))
218
218
  # Same trust rule as the main tally: an unparseable devil's
219
219
  # advocate did not vote REJECT. Defaulting to REJECT here would
220
220
  # silently overturn a unanimous APPROVE on a transient failure.
221
- da_verdict=$(cat "$da_vote" | "$_c2_py" -I -S -c "import sys; sys.path[:] = [p for p in sys.path if p not in ('', '.')]; import json; print(json.load(sys.stdin).get('verdict','').upper())" 2>/dev/null || echo "INCONCLUSIVE")
221
+ da_verdict=$(cat "$da_vote" | "$_c2_py" -I -S -c "import sys; sys.path[:] = [p for p in sys.path if p not in ('', '.')]; import json; print(json.load(sys.stdin).get('verdict','').strip().upper())" 2>/dev/null || echo "INCONCLUSIVE")
222
222
  if [ "$da_verdict" = "INCONCLUSIVE" ]; then
223
223
  log_warn "Devil's advocate produced no verdict -- unanimous approval left UNCHANGED (not overturned)"
224
224
  elif [ "$da_verdict" = "REJECT" ]; then
@@ -323,19 +323,19 @@ council_v2_run_reviewer() {
323
323
  local prompt
324
324
  case "$role" in
325
325
  requirements_verifier)
326
- prompt="You are a requirements verification reviewer. Review the evidence and PRD below. Check if all requirements are implemented. Output a JSON object with keys: verdict (APPROVE or REJECT), reasoning (string), issues (array of {severity, description})."
326
+ prompt="You are a requirements verification reviewer. Review the evidence and PRD below. Check if all requirements are implemented. Output a JSON object with keys: verdict (APPROVE or REJECT), justification (string), issues (array of {severity, description})."
327
327
  ;;
328
328
  test_auditor)
329
- prompt="You are a test auditor reviewer. Review the evidence below. Check test coverage, test quality, and assertion density. Output a JSON object with keys: verdict (APPROVE or REJECT), reasoning (string), issues (array of {severity, description})."
329
+ prompt="You are a test auditor reviewer. Review the evidence below. Check test coverage, test quality, and assertion density. Output a JSON object with keys: verdict (APPROVE or REJECT), justification (string), issues (array of {severity, description})."
330
330
  ;;
331
331
  code_quality_reviewer)
332
- prompt="You are a code quality reviewer. Review the evidence below. Check for SOLID violations, security issues, performance problems. Output a JSON object with keys: verdict (APPROVE or REJECT), reasoning (string), issues (array of {severity, description})."
332
+ prompt="You are a code quality reviewer. Review the evidence below. Check for SOLID violations, security issues, performance problems. Output a JSON object with keys: verdict (APPROVE or REJECT), justification (string), issues (array of {severity, description})."
333
333
  ;;
334
334
  devils_advocate)
335
- prompt="You are a devil's advocate reviewer. Your job is to find reasons this code should NOT be approved. Be skeptical and contrarian. Output a JSON object with keys: verdict (APPROVE or REJECT), reasoning (string), issues (array of {severity, description})."
335
+ prompt="You are a devil's advocate reviewer. Your job is to find reasons this code should NOT be approved. Be skeptical and contrarian. Output a JSON object with keys: verdict (APPROVE or REJECT), justification (string), issues (array of {severity, description})."
336
336
  ;;
337
337
  *)
338
- prompt="You are a general reviewer. Evaluate project completion. Output a JSON object with keys: verdict (APPROVE or REJECT), reasoning (string), issues (array of {severity, description})."
338
+ prompt="You are a general reviewer. Evaluate project completion. Output a JSON object with keys: verdict (APPROVE or REJECT), justification (string), issues (array of {severity, description})."
339
339
  ;;
340
340
  esac
341
341
 
@@ -355,7 +355,7 @@ council_v2_run_reviewer() {
355
355
  if [ -n "$_c2_agent_prompt" ]; then
356
356
  prompt="$_c2_agent_prompt
357
357
 
358
- Output a JSON object with keys: verdict (APPROVE or REJECT), reasoning (string), issues (array of {severity, description})."
358
+ Output a JSON object with keys: verdict (APPROVE or REJECT), justification (string), issues (array of {severity, description})."
359
359
  fi
360
360
  fi
361
361
  fi
@@ -480,38 +480,38 @@ except Exception:
480
480
  fi
481
481
  # Fall through to the plain text call (+ sed-carve) on any miss.
482
482
  if [ -z "$result" ]; then
483
- result=$(echo "$full_prompt" | CAVEMAN_DEFAULT_MODE=off claude "${_c2_argv[@]}" -p 2>/dev/null || echo '{"verdict":"INCONCLUSIVE","reasoning":"review execution failed (no verdict obtained; NOT a rejection)","issues":[]}')
483
+ result=$(echo "$full_prompt" | CAVEMAN_DEFAULT_MODE=off claude "${_c2_argv[@]}" -p 2>/dev/null || echo '{"verdict":"INCONCLUSIVE","justification":"review execution failed (no verdict obtained; NOT a rejection)","issues":[]}')
484
484
  fi
485
485
  else
486
- result='{"verdict":"INCONCLUSIVE","reasoning":"reviewer CLI unavailable (no verdict obtained; NOT a rejection)","issues":[]}'
486
+ result='{"verdict":"INCONCLUSIVE","justification":"reviewer CLI unavailable (no verdict obtained; NOT a rejection)","issues":[]}'
487
487
  fi
488
488
  ;;
489
489
  codex)
490
490
  if command -v codex &>/dev/null; then
491
- result=$(codex exec -q "$full_prompt" 2>/dev/null || echo '{"verdict":"INCONCLUSIVE","reasoning":"review execution failed (no verdict obtained; NOT a rejection)","issues":[]}')
491
+ result=$(codex exec -q "$full_prompt" 2>/dev/null || echo '{"verdict":"INCONCLUSIVE","justification":"review execution failed (no verdict obtained; NOT a rejection)","issues":[]}')
492
492
  else
493
- result='{"verdict":"INCONCLUSIVE","reasoning":"reviewer CLI unavailable (no verdict obtained; NOT a rejection)","issues":[]}'
493
+ result='{"verdict":"INCONCLUSIVE","justification":"reviewer CLI unavailable (no verdict obtained; NOT a rejection)","issues":[]}'
494
494
  fi
495
495
  ;;
496
496
  gemini)
497
497
  if command -v gemini &>/dev/null; then
498
- result=$(echo "$full_prompt" | gemini 2>/dev/null || echo '{"verdict":"INCONCLUSIVE","reasoning":"review execution failed (no verdict obtained; NOT a rejection)","issues":[]}')
498
+ result=$(echo "$full_prompt" | gemini 2>/dev/null || echo '{"verdict":"INCONCLUSIVE","justification":"review execution failed (no verdict obtained; NOT a rejection)","issues":[]}')
499
499
  else
500
- result='{"verdict":"INCONCLUSIVE","reasoning":"reviewer CLI unavailable (no verdict obtained; NOT a rejection)","issues":[]}'
500
+ result='{"verdict":"INCONCLUSIVE","justification":"reviewer CLI unavailable (no verdict obtained; NOT a rejection)","issues":[]}'
501
501
  fi
502
502
  ;;
503
503
  cline)
504
504
  if command -v cline &>/dev/null; then
505
- result=$(cline -y "$full_prompt" 2>/dev/null || echo '{"verdict":"INCONCLUSIVE","reasoning":"review execution failed (no verdict obtained; NOT a rejection)","issues":[]}')
505
+ result=$(cline -y "$full_prompt" 2>/dev/null || echo '{"verdict":"INCONCLUSIVE","justification":"review execution failed (no verdict obtained; NOT a rejection)","issues":[]}')
506
506
  else
507
- result='{"verdict":"INCONCLUSIVE","reasoning":"reviewer CLI unavailable (no verdict obtained; NOT a rejection)","issues":[]}'
507
+ result='{"verdict":"INCONCLUSIVE","justification":"reviewer CLI unavailable (no verdict obtained; NOT a rejection)","issues":[]}'
508
508
  fi
509
509
  ;;
510
510
  aider)
511
511
  if command -v aider &>/dev/null; then
512
- result=$(aider --message "$full_prompt" --yes-always --no-auto-commits --no-git 2>/dev/null || echo '{"verdict":"INCONCLUSIVE","reasoning":"review execution failed (no verdict obtained; NOT a rejection)","issues":[]}')
512
+ result=$(aider --message "$full_prompt" --yes-always --no-auto-commits --no-git 2>/dev/null || echo '{"verdict":"INCONCLUSIVE","justification":"review execution failed (no verdict obtained; NOT a rejection)","issues":[]}')
513
513
  else
514
- result='{"verdict":"INCONCLUSIVE","reasoning":"reviewer CLI unavailable (no verdict obtained; NOT a rejection)","issues":[]}'
514
+ result='{"verdict":"INCONCLUSIVE","justification":"reviewer CLI unavailable (no verdict obtained; NOT a rejection)","issues":[]}'
515
515
  fi
516
516
  ;;
517
517
  *)
@@ -536,7 +536,7 @@ except Exception:
536
536
  [ "$_c2_seam_rc" -ne 0 ] && result=''
537
537
  fi
538
538
  if [ -z "$result" ]; then
539
- result='{"verdict":"INCONCLUSIVE","reasoning":"review not supported for this provider (no verdict obtained; NOT a rejection)","issues":[]}'
539
+ result='{"verdict":"INCONCLUSIVE","justification":"review not supported for this provider (no verdict obtained; NOT a rejection)","issues":[]}'
540
540
  fi
541
541
  ;;
542
542
  esac
@@ -578,7 +578,7 @@ else:
578
578
  sys.exit(1) # ambiguous or absent -> stay inconclusive
579
579
  print(json.dumps({
580
580
  "verdict": v,
581
- "reasoning": "recovered from unstructured output (model stated %s in prose)" % v,
581
+ "justification": "recovered from unstructured output (model stated %s in prose)" % v,
582
582
  "issues": [],
583
583
  "recovered": True,
584
584
  }))
@@ -593,7 +593,7 @@ print(json.dumps({
593
593
  # prose could not be carved into JSON did not vote REJECT. Recording one
594
594
  # here would turn "your model formats poorly" into "your code was
595
595
  # rejected" -- a block the user cannot act on and did not earn.
596
- extracted='{"verdict":"INCONCLUSIVE","reasoning":"failed to parse review output (no verdict obtained; NOT a rejection)","issues":[]}'
596
+ extracted='{"verdict":"INCONCLUSIVE","justification":"failed to parse review output (no verdict obtained; NOT a rejection)","issues":[]}'
597
597
  fi
598
598
 
599
599
  echo "$extracted" > "$output_file"
package/autonomy/run.sh CHANGED
@@ -16584,6 +16584,14 @@ _dispatch_reviewer() {
16584
16584
  if [ -n "$_cr_requirements_manifest" ]; then
16585
16585
  _cr_schema="${LOKI_REVIEW_REQUIREMENTS_SCHEMA:-}"
16586
16586
  fi
16587
+ # The SDK judge always gets a STATIC schema file: the API caches
16588
+ # compiled schemas for 24h, so run-specific manifest content (hash,
16589
+ # ids, count) must never enter one. The manifest rides in the prompt
16590
+ # body and cr-rematerialize.py enforces it fail-closed.
16591
+ local _cr_sdk_schema="$_cr_schema"
16592
+ if [ -n "$_cr_requirements_manifest" ]; then
16593
+ _cr_sdk_schema="${_cr_root}/loki-ts/data/requirements-verdict-schema.json"
16594
+ fi
16587
16595
  local _cr_provider_env=(env)
16588
16596
  if [ -n "$_cr_requirements_manifest" ]; then
16589
16597
  local _cr_secret_name
@@ -16638,30 +16646,21 @@ _dispatch_reviewer() {
16638
16646
  # Critical/High). Same schema the claude --json-schema path uses, so
16639
16647
  # verdict parity holds by construction.
16640
16648
  if [ "${LOKI_SDK_CODE_REVIEW:-0}" = "1" ] \
16641
- && [ -f "$_cr_schema" ] && [ -f "$_cr_remat" ]; then
16642
- local _crs_loki _crs_pf _crs_out _crs_rc _crs_schema_file=""
16643
- local _crs_schema_content="" _crs_manifest_content=""
16649
+ && [ -f "$_cr_sdk_schema" ] && [ -f "$_cr_remat" ]; then
16650
+ local _crs_loki _crs_pf _crs_out _crs_rc
16651
+ local _crs_manifest_content=""
16644
16652
  local _crs_invoked=false
16645
16653
  _crs_loki="${_cr_root}/bin/loki"
16646
16654
  if [ -x "$_crs_loki" ] && command -v bun >/dev/null 2>&1; then
16647
16655
  _crs_pf="$(mktemp 2>/dev/null)" || _crs_pf=""
16648
- _crs_schema_file="$_cr_schema"
16649
- if [ -n "$_cr_requirements_manifest" ]; then
16650
- _crs_schema_file="$(mktemp 2>/dev/null)" || _crs_schema_file=""
16651
- fi
16652
- if [ -n "$_crs_pf" ] && [ -n "$_crs_schema_file" ]; then
16656
+ if [ -n "$_crs_pf" ]; then
16653
16657
  if [ -n "$_cr_requirements_manifest" ]; then
16654
- _crs_schema_content="$(_loki_requirements_contract_emit schema 2>/dev/null)" || {
16655
- rm -f "$_crs_pf" "$_crs_schema_file" 2>/dev/null || true
16656
- return 125
16657
- }
16658
- printf '%s' "$_crs_schema_content" > "$_crs_schema_file"
16659
- chmod 600 "$_crs_schema_file" 2>/dev/null || {
16660
- rm -f "$_crs_pf" "$_crs_schema_file" 2>/dev/null || true
16658
+ # Contract integrity check only; its output is never
16659
+ # written into a schema.
16660
+ _loki_requirements_contract_emit schema >/dev/null 2>&1 || {
16661
+ rm -f "$_crs_pf" 2>/dev/null || true
16661
16662
  return 125
16662
16663
  }
16663
- else
16664
- _crs_schema_file="$_cr_schema"
16665
16664
  fi
16666
16665
  printf '%s' "$prompt_text" > "$_crs_pf"
16667
16666
  _crs_rc=0
@@ -16680,14 +16679,11 @@ _dispatch_reviewer() {
16680
16679
  fi
16681
16680
  _crs_out="$(_loki_with_deadline "$_crs_cap" \
16682
16681
  "${_cr_provider_env[@]}" "$_crs_loki" internal sdk-judge \
16683
- --prompt-file "$_crs_pf" --schema-file "$_crs_schema_file" \
16682
+ --prompt-file "$_crs_pf" --schema-file "$_cr_sdk_schema" \
16684
16683
  --model "${LOKI_SDK_REVIEW_MODEL:-sonnet}" --effort high \
16685
16684
  --timeout-ms "$(( _crs_to_s * 1000 ))")" || _crs_rc=$?
16686
16685
  _crs_invoked=true
16687
16686
  rm -f "$_crs_pf" 2>/dev/null || true
16688
- if [ -n "$_cr_requirements_manifest" ]; then
16689
- rm -f "$_crs_schema_file" 2>/dev/null || true
16690
- fi
16691
16687
  case "$_crs_rc" in
16692
16688
  124|125) return "$_crs_rc" ;;
16693
16689
  esac
@@ -7,6 +7,6 @@ Modules:
7
7
  control: Session control helpers (status, atomic writes, origin check)
8
8
  """
9
9
 
10
- __version__ = "11.36.3"
10
+ __version__ = "11.36.5"
11
11
 
12
12
  __all__ = ["__version__"]
@@ -1,6 +1,6 @@
1
1
  # CLI reference
2
2
 
3
- Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.36.3. Do not edit by hand.
3
+ Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.36.5. Do not edit by hand.
4
4
  Hidden and legacy-only commands are omitted; see `docs/v10/CLI-MODERN.md` for the full inventory.
5
5
 
6
6
  | Command | Description |
@@ -2,7 +2,7 @@
2
2
 
3
3
  Loki Mode, by [Autonomi](https://www.autonomi.dev/), turns a spec or an issue into a verified pull request with a receipt you can check. This page covers installing it, a first run, and the options around it.
4
4
 
5
- **Version:** v11.36.3
5
+ **Version:** v11.36.5
6
6
 
7
7
  **Engine note:** `loki start` is the primary command. `loki start`, `loki "<task>"`, `loki owner/repo#N` and `loki quick` all run the Loki 10 engine, whatever the flag order or input form (PRD file, issue ref, task or one-word brief). The previous loop runs only on `--engine legacy`, `LOKI_ENGINE=legacy`, or for one call when a flag Loki 10 cannot honor is present. See the [user guide](v10/GUIDE.md) and the [5-minute quickstart](QUICKSTART.md).
8
8
 
@@ -5,14 +5,14 @@
5
5
  "description": "Structured output contract for a council-v2 reviewer (requirements/test/quality/devils-advocate/general). Claude Code emits this when invoked with --json-schema (INLINE content, not a path) --output-format json. The council-v2 dispatch reads structured_output directly; a sed-carve of prose JSON remains the fail-closed fallback. verdict is the gating token; any parse miss defaults to REJECT (the safe direction).",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
- "required": ["verdict", "reasoning", "issues"],
8
+ "required": ["verdict", "justification", "issues"],
9
9
  "properties": {
10
10
  "verdict": {
11
11
  "type": "string",
12
12
  "enum": ["APPROVE", "REJECT"],
13
13
  "description": "APPROVE if the evidence satisfies the requirements for this reviewer's lens; REJECT otherwise."
14
14
  },
15
- "reasoning": {
15
+ "justification": {
16
16
  "type": "string",
17
17
  "minLength": 1,
18
18
  "maxLength": 4000,
@@ -0,0 +1,39 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://loki-mode.dev/schemas/requirements-verdict.json",
4
+ "title": "Loki Requirements Verdict (static)",
5
+ "description": "Static structural contract for the requirements-mode SDK judge. Run-specific values (spec_sha256, requirement ids and count) are NOT in this schema because the API caches compiled schemas for 24h; they travel in the prompt body and autonomy/lib/cr-rematerialize.py enforces them fail-closed.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schema", "spec_sha256", "verdict", "requirements", "findings"],
9
+ "properties": {
10
+ "schema": { "type": "string", "enum": ["loki-requirements-verdict/v1"] },
11
+ "spec_sha256": { "type": "string" },
12
+ "verdict": { "type": "string", "enum": ["PASS", "FAIL"] },
13
+ "requirements": {
14
+ "type": "array",
15
+ "items": {
16
+ "type": "object",
17
+ "additionalProperties": false,
18
+ "required": ["id", "status", "evidence"],
19
+ "properties": {
20
+ "id": { "type": "string" },
21
+ "status": { "type": "string", "enum": ["PASS", "FAIL"] },
22
+ "evidence": { "type": "string", "maxLength": 2000 }
23
+ }
24
+ }
25
+ },
26
+ "findings": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": ["severity", "description"],
32
+ "properties": {
33
+ "severity": { "type": "string", "enum": ["Critical", "High", "Medium", "Low"] },
34
+ "description": { "type": "string", "maxLength": 2000 }
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- var ib0=Object.create;var{getPrototypeOf:ob0,defineProperty:AK,getOwnPropertyNames:yi,getOwnPropertyDescriptor:nb0}=Object,vi=Object.prototype.hasOwnProperty;function hi(Z){return this[Z]}var sb0,rb0,tb0=(Z,$,J)=>{var X=Z!=null&&typeof Z==="object";if(X){var Y=$?sb0??=new WeakMap:rb0??=new WeakMap,Q=Y.get(Z);if(Q)return Q}J=Z!=null?ib0(ob0(Z)):{};let z=$||!Z||!Z.__esModule?AK(J,"default",{value:Z,enumerable:!0}):J;for(let W of yi(Z))if(!vi.call(z,W))AK(z,W,{get:hi.bind(Z,W),enumerable:!0});if(X)Y.set(Z,z);return z},eb0=(Z)=>{var $=(bi??=new WeakMap).get(Z),J;if($)return $;if($=AK({},"__esModule",{value:!0}),Z&&typeof Z==="object"||typeof Z==="function"){for(var X of yi(Z))if(!vi.call($,X))AK($,X,{get:hi.bind(Z,X),enumerable:!(J=nb0(Z,X))||J.enumerable})}return bi.set(Z,$),$},bi,gN=(Z,$)=>()=>($||Z(($={exports:{}}).exports,$),$.exports);var Zy0=(Z)=>Z;function $y0(Z,$){this[Z]=Zy0.bind(null,$)}var A0=(Z,$)=>{for(var J in $)AK(Z,J,{get:$[J],enumerable:!0,configurable:!0,set:$y0.bind($,J)})};var S=(Z,$)=>()=>(Z&&($=Z(Z=0)),$);var s9=import.meta.require;var gi={};A0(gi,{lokiDir:()=>P0,homeLokiDir:()=>B2,findRepoRootForVersion:()=>LK,REPO_ROOT:()=>F0});import{resolve as jZ,dirname as lR}from"path";import{fileURLToPath as Jy0}from"url";import{existsSync as mN}from"fs";import{homedir as Xy0}from"os";function Yy0(){let Z=fi;for(let $=0;$<6;$++){if(mN(jZ(Z,"VERSION"))&&mN(jZ(Z,"autonomy/run.sh")))return Z;let J=lR(Z);if(J===Z)break;Z=J}return jZ(fi,"..","..","..")}function LK(Z){let $=Z;for(let J=0;J<6;J++){if(mN(jZ($,"VERSION"))&&mN(jZ($,"autonomy/run.sh")))return $;let X=lR($);if(X===$)break;$=X}return jZ(Z,"..","..","..")}function P0(){return process.env.LOKI_DIR??jZ(process.cwd(),".loki")}function B2(){return jZ(Xy0(),".loki")}var fi,F0;var n0=S(()=>{fi=lR(Jy0(import.meta.url));F0=Yy0()});import{readFileSync as Qy0}from"fs";import{resolve as zy0,dirname as Wy0}from"path";import{fileURLToPath as Ky0}from"url";function q6(){if(w1!==null)return w1;let Z="11.36.3";if(typeof Z==="string"&&Z.length>0)return w1=Z,w1;try{let $=Wy0(Ky0(import.meta.url)),J=LK($);w1=Qy0(zy0(J,"VERSION"),"utf-8").trim()}catch{w1="unknown"}return w1}var w1=null;var FZ=S(()=>{n0()});import{mkdirSync as iR,readFileSync as uN,realpathSync as Vy0,statSync as Gy0,writeFileSync as oR}from"fs";import{dirname as XY,join as aR,resolve as mi}from"path";function Ny0(){return mi(B2(),"cache","update-check.json")}function CZ(Z){let $=/^(\d+)\.(\d+)\.(\d+)$/.exec(Z.trim());if(!$)return null;return[Number($[1]),Number($[2]),Number($[3])]}function jK(Z,$){let J=CZ(Z),X=CZ($);if(!J||!X)return!1;let[Y,Q,z]=J,[W,K,V]=X;if(Y!==W)return Y>W;if(Q!==K)return Q>K;return z>V}function ui(){let Z=(process.env.LOKI_NO_UPDATE_CHECK??"").trim().toLowerCase();if(Z==="1"||Z==="true"||Z==="yes")return!0;if(process.env.CI)return!0;if(!process.stdout.isTTY)return!0;return!1}function pi(Z){try{let $=uN(Z,"utf-8"),J=JSON.parse($);if(typeof J.checkedAt==="number"&&typeof J.latest==="string"&&CZ(J.latest)!==null)return{checkedAt:J.checkedAt,latest:J.latest}}catch{}return null}function My0(Z){try{let $=JSON.parse(uN(Z,"utf-8")).failedAt;if(typeof $==="number")return $}catch{}return null}function Oy0(Z,$){let J=pi(Z);try{iR(XY(Z),{recursive:!0}),oR(Z,JSON.stringify({...J??{},failedAt:$}),"utf-8")}catch{}}function Ay0(Z,$){try{iR(XY(Z),{recursive:!0}),oR(Z,JSON.stringify($),"utf-8")}catch{}}async function Ly0(){try{let Z=await fetch(Hy0,{signal:AbortSignal.timeout(Uy0),headers:{accept:"application/json"}});if(!Z.ok)return null;let $=await Z.json();if(typeof $.version==="string"&&CZ($.version)!==null)return $.version}catch{}return null}async function jy0(Z=Date.now(),$=Ly0,J=Ny0()){let X=pi(J);if(X&&Z-X.checkedAt<qy0)return X.latest;let Y=My0(J);if(Y!==null&&Z-Y>=0&&Z-Y<By0)return null;let Q=await $();if(Q===null)return Oy0(J,Z),null;return Ay0(J,{checkedAt:Z,latest:Q}),Q}function Fy0(Z,$=process.env){if(CZ(Z)===null)return null;let X=$.PATH;if(!X)return null;let Y=new Set;for(let Q of X.split(":")){if(!Q)continue;let z=aR(Q,"loki"),W;try{Gy0(z),W=Vy0(z)}catch{continue}if(Y.has(W))continue;Y.add(W);try{let K=aR(XY(XY(W)),"package.json"),V=JSON.parse(uN(K,"utf8")).version;if(typeof V!=="string")continue;if(jK(V,Z))return{path:z,version:V}}catch{continue}}return null}function Cy0(){return mi(B2(),"cache","last-seen-version.json")}function Iy0(Z,$={}){try{if(ui())return!1;if(CZ(Z)===null)return!1;let J=$.seenFile??Cy0(),X=null;try{let Q=JSON.parse(uN(J,"utf-8")).version;if(typeof Q==="string"&&CZ(Q)!==null)X=Q}catch{}if(X!==null&&!jK(Z,X))return!1;try{iR(XY(J),{recursive:!0}),oR(J,JSON.stringify({version:Z}),"utf-8")}catch{return!1}if(X===null)return!1;return($.write??((Q)=>process.stderr.write(Q)))(`Loki Mode upgraded ${X} -> ${Z}. What is new: https://github.com/asklokesh/loki-mode/releases/tag/v${Z}
2
+ var ib0=Object.create;var{getPrototypeOf:ob0,defineProperty:AK,getOwnPropertyNames:yi,getOwnPropertyDescriptor:nb0}=Object,vi=Object.prototype.hasOwnProperty;function hi(Z){return this[Z]}var sb0,rb0,tb0=(Z,$,J)=>{var X=Z!=null&&typeof Z==="object";if(X){var Y=$?sb0??=new WeakMap:rb0??=new WeakMap,Q=Y.get(Z);if(Q)return Q}J=Z!=null?ib0(ob0(Z)):{};let z=$||!Z||!Z.__esModule?AK(J,"default",{value:Z,enumerable:!0}):J;for(let W of yi(Z))if(!vi.call(z,W))AK(z,W,{get:hi.bind(Z,W),enumerable:!0});if(X)Y.set(Z,z);return z},eb0=(Z)=>{var $=(bi??=new WeakMap).get(Z),J;if($)return $;if($=AK({},"__esModule",{value:!0}),Z&&typeof Z==="object"||typeof Z==="function"){for(var X of yi(Z))if(!vi.call($,X))AK($,X,{get:hi.bind(Z,X),enumerable:!(J=nb0(Z,X))||J.enumerable})}return bi.set(Z,$),$},bi,gN=(Z,$)=>()=>($||Z(($={exports:{}}).exports,$),$.exports);var Zy0=(Z)=>Z;function $y0(Z,$){this[Z]=Zy0.bind(null,$)}var A0=(Z,$)=>{for(var J in $)AK(Z,J,{get:$[J],enumerable:!0,configurable:!0,set:$y0.bind($,J)})};var S=(Z,$)=>()=>(Z&&($=Z(Z=0)),$);var s9=import.meta.require;var gi={};A0(gi,{lokiDir:()=>P0,homeLokiDir:()=>B2,findRepoRootForVersion:()=>LK,REPO_ROOT:()=>F0});import{resolve as jZ,dirname as lR}from"path";import{fileURLToPath as Jy0}from"url";import{existsSync as mN}from"fs";import{homedir as Xy0}from"os";function Yy0(){let Z=fi;for(let $=0;$<6;$++){if(mN(jZ(Z,"VERSION"))&&mN(jZ(Z,"autonomy/run.sh")))return Z;let J=lR(Z);if(J===Z)break;Z=J}return jZ(fi,"..","..","..")}function LK(Z){let $=Z;for(let J=0;J<6;J++){if(mN(jZ($,"VERSION"))&&mN(jZ($,"autonomy/run.sh")))return $;let X=lR($);if(X===$)break;$=X}return jZ(Z,"..","..","..")}function P0(){return process.env.LOKI_DIR??jZ(process.cwd(),".loki")}function B2(){return jZ(Xy0(),".loki")}var fi,F0;var n0=S(()=>{fi=lR(Jy0(import.meta.url));F0=Yy0()});import{readFileSync as Qy0}from"fs";import{resolve as zy0,dirname as Wy0}from"path";import{fileURLToPath as Ky0}from"url";function q6(){if(w1!==null)return w1;let Z="11.36.5";if(typeof Z==="string"&&Z.length>0)return w1=Z,w1;try{let $=Wy0(Ky0(import.meta.url)),J=LK($);w1=Qy0(zy0(J,"VERSION"),"utf-8").trim()}catch{w1="unknown"}return w1}var w1=null;var FZ=S(()=>{n0()});import{mkdirSync as iR,readFileSync as uN,realpathSync as Vy0,statSync as Gy0,writeFileSync as oR}from"fs";import{dirname as XY,join as aR,resolve as mi}from"path";function Ny0(){return mi(B2(),"cache","update-check.json")}function CZ(Z){let $=/^(\d+)\.(\d+)\.(\d+)$/.exec(Z.trim());if(!$)return null;return[Number($[1]),Number($[2]),Number($[3])]}function jK(Z,$){let J=CZ(Z),X=CZ($);if(!J||!X)return!1;let[Y,Q,z]=J,[W,K,V]=X;if(Y!==W)return Y>W;if(Q!==K)return Q>K;return z>V}function ui(){let Z=(process.env.LOKI_NO_UPDATE_CHECK??"").trim().toLowerCase();if(Z==="1"||Z==="true"||Z==="yes")return!0;if(process.env.CI)return!0;if(!process.stdout.isTTY)return!0;return!1}function pi(Z){try{let $=uN(Z,"utf-8"),J=JSON.parse($);if(typeof J.checkedAt==="number"&&typeof J.latest==="string"&&CZ(J.latest)!==null)return{checkedAt:J.checkedAt,latest:J.latest}}catch{}return null}function My0(Z){try{let $=JSON.parse(uN(Z,"utf-8")).failedAt;if(typeof $==="number")return $}catch{}return null}function Oy0(Z,$){let J=pi(Z);try{iR(XY(Z),{recursive:!0}),oR(Z,JSON.stringify({...J??{},failedAt:$}),"utf-8")}catch{}}function Ay0(Z,$){try{iR(XY(Z),{recursive:!0}),oR(Z,JSON.stringify($),"utf-8")}catch{}}async function Ly0(){try{let Z=await fetch(Hy0,{signal:AbortSignal.timeout(Uy0),headers:{accept:"application/json"}});if(!Z.ok)return null;let $=await Z.json();if(typeof $.version==="string"&&CZ($.version)!==null)return $.version}catch{}return null}async function jy0(Z=Date.now(),$=Ly0,J=Ny0()){let X=pi(J);if(X&&Z-X.checkedAt<qy0)return X.latest;let Y=My0(J);if(Y!==null&&Z-Y>=0&&Z-Y<By0)return null;let Q=await $();if(Q===null)return Oy0(J,Z),null;return Ay0(J,{checkedAt:Z,latest:Q}),Q}function Fy0(Z,$=process.env){if(CZ(Z)===null)return null;let X=$.PATH;if(!X)return null;let Y=new Set;for(let Q of X.split(":")){if(!Q)continue;let z=aR(Q,"loki"),W;try{Gy0(z),W=Vy0(z)}catch{continue}if(Y.has(W))continue;Y.add(W);try{let K=aR(XY(XY(W)),"package.json"),V=JSON.parse(uN(K,"utf8")).version;if(typeof V!=="string")continue;if(jK(V,Z))return{path:z,version:V}}catch{continue}}return null}function Cy0(){return mi(B2(),"cache","last-seen-version.json")}function Iy0(Z,$={}){try{if(ui())return!1;if(CZ(Z)===null)return!1;let J=$.seenFile??Cy0(),X=null;try{let Q=JSON.parse(uN(J,"utf-8")).version;if(typeof Q==="string"&&CZ(Q)!==null)X=Q}catch{}if(X!==null&&!jK(Z,X))return!1;try{iR(XY(J),{recursive:!0}),oR(J,JSON.stringify({version:Z}),"utf-8")}catch{return!1}if(X===null)return!1;return($.write??((Q)=>process.stderr.write(Q)))(`Loki Mode upgraded ${X} -> ${Z}. What is new: https://github.com/asklokesh/loki-mode/releases/tag/v${Z}
3
3
  `),!0}catch{return!1}}function Ty0(Z){let $=Z.replace(/\\/g,"/");if($.includes("/Cellar/"))return"brew upgrade loki-mode";if(/\/pnpm\//.test($)||$.includes("/.pnpm/"))return"pnpm add -g loki-mode (or npm i -g loki-mode)";if($.includes("/yarn/global/")||$.includes("/.yarn/"))return"yarn global add loki-mode (or npm i -g loki-mode)";if($.includes("/.bun/"))return"bun install -g loki-mode (or npm i -g loki-mode)";if($.includes("/lib/node_modules/"))return"npm i -g loki-mode (or bun install -g loki-mode)";if($.includes("/homebrew/"))return"brew upgrade loki-mode";return"bun install -g loki-mode (or npm i -g loki-mode)"}async function ci(Z,$={}){try{if(ui())return;if(CZ(Z)===null)return;let J=$.write??((Q)=>process.stderr.write(Q));Iy0(Z,{write:J,...$.cacheFile?{seenFile:aR(XY($.cacheFile),"last-seen-version.json")}:{}});let X=Fy0(Z,$.env??process.env);if(X!==null){J(`Loki Mode ${X.version} is installed but not the one running (you are running ${Z}).
4
4
  Another loki earlier on PATH is winning. Newer copy: ${X.path}
5
5
  Run \`which -a loki\` to see the order, then remove or re-point the earlier entry.
@@ -3238,4 +3238,4 @@ Unknown commands exit 2 with a suggestion; run 'loki help' for the full list.
3238
3238
  `);{let{suggestCommand:X}=await Promise.resolve().then(() => (t4(),Fo)),Y=$===void 0?void 0:X($);if(Y)process.stderr.write(`Did you mean 'loki ${Y}'?
3239
3239
  `)}return process.stderr.write(mb0),2}}aF0();var ub0=()=>globalThis[Symbol.for("loki.ownsStopSignals")]===!0;process.on("SIGINT",()=>{if(!ub0())process.exit(130)});process.on("SIGTERM",()=>{if(!ub0())process.exit(143)});var Wq9=await zq9(Bun.argv.slice(2));process.exit(Wq9);
3240
3240
 
3241
- //# debugId=006CC110F33224D5A79A6ABC36E9D6B7
3241
+ //# debugId=BA375869B0B1AD17096C626D398EE2B1
package/mcp/__init__.py CHANGED
@@ -75,4 +75,4 @@ try:
75
75
  except ImportError:
76
76
  __all__ = ['mcp']
77
77
 
78
- __version__ = '11.36.3'
78
+ __version__ = '11.36.5'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "loki-mode",
3
3
  "mcpName": "io.github.asklokesh/loki-mode",
4
- "version": "11.36.3",
4
+ "version": "11.36.5",
5
5
  "description": "An autonomous software factory that knows what it is supposed to deliver, and proves it did.",
6
6
  "keywords": [
7
7
  "agent",
@@ -160,5 +160,5 @@
160
160
  "dependencies": {
161
161
  "@resvg/resvg-wasm": "^2.6.2"
162
162
  },
163
- "gitHead": "1c64c5e6108d0ca683948b63d797bdc164ca0bf8"
163
+ "gitHead": "05a0a46cd6571cdf1965bfe868fc972c40333f28"
164
164
  }
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "loki-mode",
4
4
  "displayName": "Loki Mode",
5
- "version": "11.36.3",
5
+ "version": "11.36.5",
6
6
  "description": "Autonomous spec-to-product build system with a built-in trust layer (RARV-C closure loop, 8 quality gates, completion council). Ships Loki's spec-hardening, drift-detection, and deterministic PR verification commands plus the Loki MCP server.",
7
7
  "author": {
8
8
  "name": "Autonomi",
@@ -34,6 +34,8 @@
34
34
  - [Metrics for Tier Optimization](#metrics-for-tier-optimization)
35
35
  <!-- TOC:END -->
36
36
 
37
+ For current model ids, pricing, parameters, prompt caching and token counting, use the `claude-api` skill; this module holds only the tier policy and does not restate them.
38
+
37
39
  ## Session-Pinned Model (default)
38
40
 
39
41
  Since v6.81.0, the main RARV loop uses **one pinned model per session** instead of rotating models per RARV phase. This eliminates per-iteration tier churn and keeps the main loop behavior predictable.
@@ -56,6 +56,8 @@ This module consolidates battle-tested insights from:
56
56
  - Simon Willison's Superpowers coding agent patterns
57
57
  - Multi-agent orchestration real-world deployments
58
58
 
59
+ **Per-surface constraints:** Claude Code has full network access and can install packages locally; the Claude API runs tools without network access and without runtime package installs; claude.ai installs packages from the standard registries only. Check the target surface before a pattern below assumes network or installs.
60
+
59
61
  ---
60
62
 
61
63
  ## Proactive Context Management (OpenCode Pattern)
@@ -14,6 +14,10 @@
14
14
  - [5. After the push: verify provenance, not the version string](#5-after-the-push-verify-provenance-not-the-version-string)
15
15
  - [5.1 Confirm a release-critical fix THREE ways, never one](#51-confirm-a-release-critical-fix-three-ways-never-one)
16
16
  - [6. The cadence, end to end](#6-the-cadence-end-to-end)
17
+ - [7. Feature status: implemented, planned, deprecated](#7-feature-status-implemented-planned-deprecated)
18
+ - [7.1 Implemented](#71-implemented)
19
+ - [7.2 Planned and in progress](#72-planned-and-in-progress)
20
+ - [7.3 Deprecated](#73-deprecated)
17
21
  <!-- TOC:END -->
18
22
 
19
23
  **Purpose:** the shortest VERIFIED path from idea to published. Shortest and
@@ -392,3 +396,46 @@ green job is not yet proof the version is fetchable.
392
396
  Steps 4 through 7 are the verified part of "shortest verified path". Dropping
393
397
  any one of them has already produced a release that reported success and
394
398
  shipped nothing.
399
+
400
+ ## 7. Feature status: implemented, planned, deprecated
401
+
402
+ Moved from `SKILL.md` so the entry file carries no dated text. Update a row here when a release changes its status.
403
+
404
+ ### 7.1 Implemented
405
+
406
+ | Feature | Added | Notes |
407
+ |---------|-------|-------|
408
+ | Multi-provider support (5 providers) | v5.0.0 | claude, codex, cline, aider, opencode -- see `providers/` |
409
+ | CONTINUITY.md working memory | v5.35.0 | Auto-managed by run.sh, updated each iteration |
410
+ | Quality gates 3-reviewer system | v5.35.0 | 5 specialist reviewers in `skills/quality-gates.md`; execution in run.sh |
411
+ | Memory System (episodic/semantic/procedural) | v5.15.0 | Full implementation in `memory/` |
412
+ | Context Window Tracking | v5.40.0 | Dashboard gauge, per-agent breakdown at `GET /api/context` |
413
+ | Notification Triggers | v5.40.0 | `GET/PUT /api/notifications/triggers` |
414
+ | GitHub integration | v5.42.2 | Import, sync-back, PR creation, export. CLI: `loki github`, API: `/api/github/*` |
415
+ | Legacy System Healing | v6.67.0 | `loki heal <path>` -- friction-as-semantics, characterization tests |
416
+ | Unified `loki start` | v6.84.0 | Auto-detects spec (PRD, OpenAPI, etc.) vs issue input |
417
+ | Managed Agents (memory mirror) | v7.2.0 | Opt-in via `LOKI_MANAGED_AGENTS` -- see Managed Agents section |
418
+ | Bun runtime (Phase 1) | v7.3.0 | Read-only commands routed through `bin/loki`; `LOKI_LEGACY_BASH=1` to revert |
419
+ | Phase 1 RARV-C closure | v7.5.x | Findings injection, real judges, auto-learnings, handoff.md |
420
+ | Anthropic SDK route | v8.0.0 | Opt-in, default-off; one switch `LOKI_SDK_MODE` -- see `references/sdk-mode.md` |
421
+ | Harness intelligence | v8.0.0 | Prompt-cache discipline, confidence-spike re-check, goal scoring, smart retry |
422
+ | SDK degradation event | v8.0.0 | Structured `capability_degraded` record on `.loki/events.jsonl` |
423
+ | Time to first preview | v8.0.0 | `.loki/app-runner/first-preview.json`, write-once (bash route) |
424
+ | Opt-in build analytics | v8.0.0 | `build_verified` event behind a strict second gate, allowlist-only fields |
425
+
426
+ ### 7.2 Planned and in progress
427
+
428
+ | Feature | Target | Notes |
429
+ |---------|--------|-------|
430
+ | Bun runtime (Phase 2+) | TBD | Migrate write-path commands; tracked on `feat/bun-migration` |
431
+ | Managed Agents multiagent path | TBD | `LOKI_EXPERIMENTAL_MANAGED_*` flags -- RESEARCH PREVIEW, not on live API |
432
+ | Benchmarks | TBD | Runner scripts and datasets exist in `benchmarks/`; no published results |
433
+ | `loki run` removal | with legacy removal | Currently a deprecated alias for `loki start` |
434
+
435
+ ### 7.3 Deprecated
436
+
437
+ | Item | Deprecated In | Notes |
438
+ |------|---------------|-------|
439
+ | `loki run <issue>` | v6.84.0 | Alias for `loki start`. Removal is part of the planned legacy removal. |
440
+ | `loki start`, RARV skill loop | v10.6.6 | Legacy engine, planned for removal; use `loki "<task>"` / `loki owner/repo#N`. |
441
+ | VSCode extension (`vscode-extension/`) | v7.2.0 | No longer actively maintained; dashboard web UI is the supported front-end. |
@@ -1,4 +1,4 @@
1
- import{c as L,r as x,j as e,w as re,Z as ne,m as le,h as ie,p as P,F as ye,U as I,X as ce,L as de,x as oe,M as Ae,T as Z,S as we,l as xe,k as me,y as Ce,E as Fe,a0 as Se,a as U,a2 as he}from"./index-C6D2eiYF.js";import{B as C}from"./Button-D2KewPNs.js";import{T as $e}from"./trending-up-CJrn5aDb.js";import{C as z}from"./clock-BYVfALwV.js";import{A as Be,U as ue,M as De}from"./Avatar-MrMLoCy6.js";import{A as J}from"./activity-CHGCQ1ln.js";import{R as pe}from"./refresh-cw-DVb8qXE-.js";import{G as ze}from"./globe-CkxB-2yg.js";import{C as Le}from"./chevron-left-BlL730Fk.js";import{C as je}from"./check-q7Cvbd7C.js";import{D as Y}from"./dollar-sign-cl6AGufx.js";import{U as Te}from"./user-DYU0O_4r.js";import{D as Me}from"./database-Ca3axEd-.js";import{L as Ue}from"./lock-JpuGIyBV.js";import{S as Re}from"./scroll-text-DGOfLvaD.js";import{S as Ie}from"./shield-alert-BNSEbWlv.js";/**
1
+ import{c as L,r as x,j as e,w as re,Z as ne,m as le,h as ie,p as P,F as ye,U as I,X as ce,L as de,x as oe,M as Ae,T as Z,S as we,l as xe,k as me,y as Ce,E as Fe,a0 as Se,a as U,a2 as he}from"./index-CNHrwYdB.js";import{B as C}from"./Button-lTMYLSNI.js";import{T as $e}from"./trending-up-CDwbdAOt.js";import{C as z}from"./clock-D8RNW4dW.js";import{A as Be,U as ue,M as De}from"./Avatar-DnjE-s2D.js";import{A as J}from"./activity-DxObm-vX.js";import{R as pe}from"./refresh-cw-DRpVPRDs.js";import{G as ze}from"./globe-eGNmW-8B.js";import{C as Le}from"./chevron-left-C14R0z9X.js";import{C as je}from"./check-Dd5qA3uZ.js";import{D as Y}from"./dollar-sign-Ccsa7tnO.js";import{U as Te}from"./user-CQBySt07.js";import{D as Me}from"./database-D6hTs8Kt.js";import{L as Ue}from"./lock-9F3O5BX4.js";import{S as Re}from"./scroll-text-Cvtk-SSC.js";import{S as Ie}from"./shield-alert-ChxIXXWO.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as l,j as s}from"./index-C6D2eiYF.js";/**
1
+ import{c as l,j as s}from"./index-CNHrwYdB.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as e}from"./index-C6D2eiYF.js";import{C as r}from"./clock-BYVfALwV.js";import{C as a}from"./circle-alert-DSflJ9So.js";import{C as l}from"./check-q7Cvbd7C.js";const i={completed:"bg-[#1FC5A8]/10 text-[#1FC5A8]",running:"bg-[#553DE9]/10 text-[#553DE9]",failed:"bg-[#C45B5B]/10 text-[#C45B5B]",started:"bg-[#D4A03C]/10 text-[#D4A03C]",empty:"bg-[#F8F4F0] text-[#6B6960]",version:"bg-[#553DE9]/10 text-[#553DE9]"};function o({status:t}){switch(t){case"completed":return e.jsx(l,{size:12});case"running":return e.jsxs("span",{className:"relative flex h-2 w-2",children:[e.jsx("span",{className:"animate-ping motion-reduce:animate-none absolute inline-flex h-full w-full rounded-full bg-current opacity-75"}),e.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-current"})]});case"failed":return e.jsx(a,{size:12});case"started":return e.jsx(r,{size:12});default:return null}}function f({status:t,children:n,className:s=""}){return e.jsxs("span",{className:["inline-flex items-center gap-1 rounded-btn px-2.5 py-0.5 text-xs font-semibold",i[t],s].filter(Boolean).join(" "),children:[e.jsx(o,{status:t}),n]})}export{f as B};
1
+ import{j as e}from"./index-CNHrwYdB.js";import{C as r}from"./clock-D8RNW4dW.js";import{C as a}from"./circle-alert-C-EfE6Vw.js";import{C as l}from"./check-Dd5qA3uZ.js";const i={completed:"bg-[#1FC5A8]/10 text-[#1FC5A8]",running:"bg-[#553DE9]/10 text-[#553DE9]",failed:"bg-[#C45B5B]/10 text-[#C45B5B]",started:"bg-[#D4A03C]/10 text-[#D4A03C]",empty:"bg-[#F8F4F0] text-[#6B6960]",version:"bg-[#553DE9]/10 text-[#553DE9]"};function o({status:t}){switch(t){case"completed":return e.jsx(l,{size:12});case"running":return e.jsxs("span",{className:"relative flex h-2 w-2",children:[e.jsx("span",{className:"animate-ping motion-reduce:animate-none absolute inline-flex h-full w-full rounded-full bg-current opacity-75"}),e.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-current"})]});case"failed":return e.jsx(a,{size:12});case"started":return e.jsx(r,{size:12});default:return null}}function f({status:t,children:n,className:s=""}){return e.jsxs("span",{className:["inline-flex items-center gap-1 rounded-btn px-2.5 py-0.5 text-xs font-semibold",i[t],s].filter(Boolean).join(" "),children:[e.jsx(o,{status:t}),n]})}export{f as B};
@@ -1 +1 @@
1
- import{r as p,j as t}from"./index-C6D2eiYF.js";const m={primary:"bg-[#553DE9] text-white hover:bg-[#4432c4] shadow-button rounded-btn",secondary:"border border-[#553DE9] text-[#553DE9] hover:bg-[#E8E4FD] bg-transparent rounded-btn",ghost:"text-[#36342E] hover:bg-[#F8F4F0] rounded-btn",danger:"bg-[#C45B5B]/10 text-[#C45B5B] border border-[#C45B5B]/20 hover:bg-[#C45B5B]/20 rounded-btn"},b={sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},u={sm:14,md:16,lg:18};function h({size:e}){return t.jsxs("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[t.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),t.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})}const B=p.forwardRef(({variant:e="primary",size:o="md",icon:n,iconRight:i,loading:r=!1,disabled:a,className:c="",children:l,...x},d)=>{const s=u[o];return t.jsxs("button",{ref:d,disabled:a||r,className:["inline-flex items-center justify-center gap-2 font-medium transition-colors",m[e],b[o],(a||r)&&"opacity-60 cursor-not-allowed",c].filter(Boolean).join(" "),...x,children:[r?t.jsx(h,{size:s}):n?t.jsx(n,{size:s}):null,l,i&&!r&&t.jsx(i,{size:s})]})});B.displayName="Button";export{B};
1
+ import{r as p,j as t}from"./index-CNHrwYdB.js";const m={primary:"bg-[#553DE9] text-white hover:bg-[#4432c4] shadow-button rounded-btn",secondary:"border border-[#553DE9] text-[#553DE9] hover:bg-[#E8E4FD] bg-transparent rounded-btn",ghost:"text-[#36342E] hover:bg-[#F8F4F0] rounded-btn",danger:"bg-[#C45B5B]/10 text-[#C45B5B] border border-[#C45B5B]/20 hover:bg-[#C45B5B]/20 rounded-btn"},b={sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},u={sm:14,md:16,lg:18};function h({size:e}){return t.jsxs("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[t.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),t.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})}const B=p.forwardRef(({variant:e="primary",size:o="md",icon:n,iconRight:i,loading:r=!1,disabled:a,className:c="",children:l,...x},d)=>{const s=u[o];return t.jsxs("button",{ref:d,disabled:a||r,className:["inline-flex items-center justify-center gap-2 font-medium transition-colors",m[e],b[o],(a||r)&&"opacity-60 cursor-not-allowed",c].filter(Boolean).join(" "),...x,children:[r?t.jsx(h,{size:s}):n?t.jsx(n,{size:s}):null,l,i&&!r&&t.jsx(i,{size:s})]})});B.displayName="Button";export{B};
@@ -1,4 +1,4 @@
1
- import{c as $,r as l,j as e,G as we,Q as Se,F as Ce,h as Re,T as U,Z as Ee,a as S,V as Me,S as $e,Y as Te,X as Pe,P as ie,i as Ae,g as ze,C as Ie,l as Le,N as I,J as _e,K as De,O as Fe,u as Oe}from"./index-C6D2eiYF.js";import{P as K,S as He,E as Be}from"./ErrorBoundary-CSYtK_Ql.js";import{C as qe,F as Ge,M as Ue,H as Ke,a as We,G as Ve,T as Qe}from"./thumbs-up-DNfJb1qA.js";import{C as oe}from"./check-q7Cvbd7C.js";import{C as Ye}from"./clock-BYVfALwV.js";import{D as Xe}from"./dollar-sign-cl6AGufx.js";import{U as Ze}from"./upload-DbK6V3Vn.js";import{L as V}from"./loader-circle-TL1CkPc6.js";/**
1
+ import{c as $,r as l,j as e,G as we,Q as Se,F as Ce,h as Re,T as U,Z as Ee,a as S,V as Me,S as $e,Y as Te,X as Pe,P as ie,i as Ae,g as ze,C as Ie,l as Le,N as I,J as _e,K as De,O as Fe,u as Oe}from"./index-CNHrwYdB.js";import{P as K,S as He,E as Be}from"./ErrorBoundary-Df48b6Je.js";import{C as qe,F as Ge,M as Ue,H as Ke,a as We,G as Ve,T as Qe}from"./thumbs-up-C71buuGd.js";import{C as oe}from"./check-Dd5qA3uZ.js";import{C as Ye}from"./clock-D8RNW4dW.js";import{D as Xe}from"./dollar-sign-Ccsa7tnO.js";import{U as Ze}from"./upload-zNgjkRoA.js";import{L as V}from"./loader-circle-Cl5tTUU9.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.