loki-mode 11.123.0 → 11.124.0

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/README.md +1 -1
  2. package/SKILL.md +2 -2
  3. package/VERSION +1 -1
  4. package/autonomy/loki +16 -10
  5. package/bin/loki +25 -4
  6. package/dashboard/__init__.py +1 -1
  7. package/docs/CLI-REFERENCE.md +1 -1
  8. package/docs/COMPARE-OPENCODE.md +1 -1
  9. package/docs/INSTALLATION.md +1 -1
  10. package/docs/v10/GUIDE.md +17 -3
  11. package/loki-ts/data/child-env.json +0 -1
  12. package/loki-ts/dist/loki.js +1313 -1309
  13. package/mcp/__init__.py +1 -1
  14. package/package.json +2 -2
  15. package/packages/control-plane/dist/server.js +72 -33
  16. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  17. package/web-app/dist/assets/{AdminPage-D1Pq4MQi.js → AdminPage-BvAm4ySc.js} +1 -1
  18. package/web-app/dist/assets/{Avatar-A2BFZ8T8.js → Avatar-kQUzeStP.js} +1 -1
  19. package/web-app/dist/assets/{Badge-BeAiw5Sl.js → Badge-D4eUYCgq.js} +1 -1
  20. package/web-app/dist/assets/{Button-DprfqpF8.js → Button-WH99mfd7.js} +1 -1
  21. package/web-app/dist/assets/{CockpitPage-C4h6TT-c.js → CockpitPage-Cv5zO98w.js} +1 -1
  22. package/web-app/dist/assets/{ComparePage-apBsndqK.js → ComparePage-EV5xJmmI.js} +1 -1
  23. package/web-app/dist/assets/{ErrorBoundary-B6mK7ggZ.js → ErrorBoundary-L6iR8_c-.js} +1 -1
  24. package/web-app/dist/assets/{EvidenceReceiptPanel-DNEXfKYK.js → EvidenceReceiptPanel-BM5r70lI.js} +1 -1
  25. package/web-app/dist/assets/{GitHubIssuesPanel-BHMnS0dv.js → GitHubIssuesPanel--YZfG6dZ.js} +1 -1
  26. package/web-app/dist/assets/{GitHubPRsPanel-Bg1hQTBZ.js → GitHubPRsPanel-B-6TqaEm.js} +1 -1
  27. package/web-app/dist/assets/{HomePage-C0uIfnbC.js → HomePage-DvwjUEnK.js} +2 -2
  28. package/web-app/dist/assets/{LoginPage-C5W1PwxV.js → LoginPage-ko7MeVCY.js} +1 -1
  29. package/web-app/dist/assets/{MagicPage-B9v5J6kn.js → MagicPage-XhL6MTuJ.js} +1 -1
  30. package/web-app/dist/assets/{MetricsPage-TyFW2Mi7.js → MetricsPage-HcC3Or73.js} +1 -1
  31. package/web-app/dist/assets/{NotFoundPage-fhomLjyo.js → NotFoundPage-CeJEgHjE.js} +1 -1
  32. package/web-app/dist/assets/{ProjectPage-B7Q9_E7J.js → ProjectPage-CKU5LEDo.js} +3 -3
  33. package/web-app/dist/assets/{ProjectsPage-BRlw-ztJ.js → ProjectsPage-BgDkiPRW.js} +1 -1
  34. package/web-app/dist/assets/{SettingsPage-DBS-DpXz.js → SettingsPage-No-vQaFb.js} +1 -1
  35. package/web-app/dist/assets/{ShowcasePage-C609Y2vd.js → ShowcasePage-CHP4rl-j.js} +1 -1
  36. package/web-app/dist/assets/{SystemSettingsPage-CpZ_F3Pz.js → SystemSettingsPage-BKf5UPHR.js} +1 -1
  37. package/web-app/dist/assets/{TeamsPage-C8gdvyoH.js → TeamsPage-Cnp-tYk0.js} +1 -1
  38. package/web-app/dist/assets/{TemplatesPage-JcmMFDss.js → TemplatesPage-BpYzTNGm.js} +1 -1
  39. package/web-app/dist/assets/{TerminalOutput-DeKTksvK.js → TerminalOutput-CBQV2pLD.js} +1 -1
  40. package/web-app/dist/assets/{activity-fohF0bEH.js → activity-mdcFMSaL.js} +1 -1
  41. package/web-app/dist/assets/{bell-DXoB51yh.js → bell-Wg2pH1yn.js} +1 -1
  42. package/web-app/dist/assets/{bot-ozfD3tc3.js → bot-DKBlvxJ7.js} +1 -1
  43. package/web-app/dist/assets/{check-DJIvauO5.js → check-Xc05lcnu.js} +1 -1
  44. package/web-app/dist/assets/{chevron-left-DubgZZGE.js → chevron-left-DltqPq5E.js} +1 -1
  45. package/web-app/dist/assets/{circle-alert-DVP3spwP.js → circle-alert-BVh-fhvu.js} +1 -1
  46. package/web-app/dist/assets/{clock-D0y8bHsc.js → clock-B5cBSKWU.js} +1 -1
  47. package/web-app/dist/assets/{cloud-AZw6GZdP.js → cloud-BSX6IFA2.js} +1 -1
  48. package/web-app/dist/assets/{code-xml-lxx2SVRo.js → code-xml-B9hQtfJY.js} +1 -1
  49. package/web-app/dist/assets/{database-DSHk51Pu.js → database-BaZUbYQA.js} +1 -1
  50. package/web-app/dist/assets/{dollar-sign-jBZCz460.js → dollar-sign-DwQy7yIO.js} +1 -1
  51. package/web-app/dist/assets/{file-code-corner-HGtDqBI1.js → file-code-corner-DA2DZ0pw.js} +1 -1
  52. package/web-app/dist/assets/{file-plus-L3tAznio.js → file-plus-C1ACdrL7.js} +1 -1
  53. package/web-app/dist/assets/{globe-f50xCoGa.js → globe-DPYmKYx6.js} +1 -1
  54. package/web-app/dist/assets/{hammer-Btdop6UY.js → hammer-CeiyISLC.js} +1 -1
  55. package/web-app/dist/assets/{index-alvwtVBH.js → index-CDMhTULK.js} +3 -3
  56. package/web-app/dist/assets/{layers-WZi-3fiX.js → layers-Cx7Y47_Z.js} +1 -1
  57. package/web-app/dist/assets/{loader-circle-B13s_pbT.js → loader-circle-upNH5P_M.js} +1 -1
  58. package/web-app/dist/assets/{lock-DPzrJtGd.js → lock-DdZ3BKZK.js} +1 -1
  59. package/web-app/dist/assets/{package-q3dYbP9u.js → package-DbsEgrVK.js} +1 -1
  60. package/web-app/dist/assets/{plus-nLd8kLVM.js → plus-Cqvnwkwf.js} +1 -1
  61. package/web-app/dist/assets/{refresh-cw-T4m4o3p9.js → refresh-cw-BPCT2xXe.js} +1 -1
  62. package/web-app/dist/assets/{rotate-ccw-BsPRTRVr.js → rotate-ccw-D3dUoyD4.js} +1 -1
  63. package/web-app/dist/assets/{scroll-text-BKYY62-4.js → scroll-text-XglXNYfV.js} +1 -1
  64. package/web-app/dist/assets/{server-WY0czRua.js → server-oNbEjlvC.js} +1 -1
  65. package/web-app/dist/assets/{shield-alert-JFzWB4HO.js → shield-alert-DQpkGKgb.js} +1 -1
  66. package/web-app/dist/assets/{thumbs-up-DY-6b3kG.js → thumbs-up-MpxIM2sF.js} +1 -1
  67. package/web-app/dist/assets/{trash-2-Rij5mMzF.js → trash-2-B_9Ytb-g.js} +1 -1
  68. package/web-app/dist/assets/{trending-down-BwEIkU-x.js → trending-down-CywJR3Xl.js} +1 -1
  69. package/web-app/dist/assets/{trending-up-Coe2CO4y.js → trending-up-BgB1GV4J.js} +1 -1
  70. package/web-app/dist/assets/{upload-CPuWWzzF.js → upload-DWfOCF-u.js} +1 -1
  71. package/web-app/dist/assets/{usePolling-Ce5XHOw4.js → usePolling-BcMEuu-8.js} +1 -1
  72. package/web-app/dist/assets/{user-D1q10hes.js → user-Dxf7avUA.js} +1 -1
  73. package/web-app/dist/index.html +1 -1
package/README.md CHANGED
@@ -99,7 +99,7 @@ Time: 4m12s (intake 11s, plan 20s, implement 3m10s, verify 31s)
99
99
 
100
100
  | Command | What it does |
101
101
  |---------|--------------|
102
- | `loki start "<task>"` | The command you run: same provider model as a raw session, then the harness re-runs the checks and seals a receipt (`--no-pr`, `--provider`, `--max-cost`, `--haiku` to opt the first implement onto haiku). `loki "<task>"` and `loki owner/repo#N` are shorthand. No task and no git repo shows a receipt and spends nothing |
102
+ | `loki start "<task>"` | The command you run: same provider model as a raw session, then the harness re-runs the checks and seals a receipt (`--no-pr`, `--provider`, `--max-cost`, `--haiku` to run implement and fix on Haiku, climbing to Sonnet on a failed check). `loki "<task>"` and `loki owner/repo#N` are shorthand. No task and no git repo shows a receipt and spends nothing |
103
103
  | `loki edit "<change>"` | One targeted change in one pass, no PR, plan or council (`--verify`, `--receipt`, `--commit`, `--dry-run`) |
104
104
  | `loki quick "<task>"` | One small task with a verify loop, no PR |
105
105
  | `loki chat` | Interactive alternative: Plan and Build modes, slash commands, `/run` starts a `loki start` run, `--attach` joins one |
package/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: loki-mode
3
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.123.0
6
+ # Loki Mode v11.124.0
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
 
@@ -461,4 +461,4 @@ Implemented, planned and deprecated items, with the version each landed in: `CHA
461
461
 
462
462
  ---
463
463
 
464
- **v11.123.0 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
464
+ **v11.124.0 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 11.123.0
1
+ 11.124.0
package/autonomy/loki CHANGED
@@ -1937,7 +1937,7 @@ show_help_all() {
1937
1937
  echo " --no-dashboard Disable web dashboard"
1938
1938
  echo " --isolation LVL Per-run isolation dial: none (default) | worktree | docker"
1939
1939
  echo " --skip-memory Skip loading memory context at startup"
1940
- echo " --cost PROFILE Opt-in cost profile: lean sets LOKI_IMPLEMENT_HAIKU_FIRST=1, LOKI_E10_TRIM=1, LOKI_E10_SMALL_NO_RUNNER=1 and LOKI_E10_SMALL_MAX_CHARS=1200 unless already set (also LOKI_COST_PROFILE)"
1940
+ echo " --cost PROFILE Opt-in cost profile: lean sets LOKI_ROUTER=auto, LOKI_E10_TRIM=1, LOKI_E10_SMALL_NO_RUNNER=1 and LOKI_E10_SMALL_MAX_CHARS=1200 unless already set (also LOKI_COST_PROFILE)"
1941
1941
  echo " --spec FILE Run against an edited spec (written by 'loki plan <task> --spec'; see also --spec-first)"
1942
1942
  echo " --fresh-prd Regenerate the PRD from the codebase (no-PRD runs; ignores the reusable generated PRD)"
1943
1943
  echo " --compliance PRESET Enable compliance mode (default|healthcare|fintech|government)"
@@ -2660,9 +2660,15 @@ _loki_e10_resume_map() {
2660
2660
 
2661
2661
  # TEN-COST-01 lean levers (the bash twin of COST_PROFILES.lean in loki-ts/src/util/cost_profile.ts).
2662
2662
  # Fills only unset variables, so explicit env wins. Shared by --cost lean and --haiku.
2663
+ # $1 names the flag for the one line printed when an explicit LOKI_ROUTER wins.
2663
2664
  loki_lean_levers() {
2664
- : "${LOKI_IMPLEMENT_HAIKU_FIRST:=1}" "${LOKI_E10_TRIM:=1}" "${LOKI_E10_SMALL_NO_RUNNER:=1}" "${LOKI_E10_SMALL_MAX_CHARS:=1200}"
2665
- export LOKI_IMPLEMENT_HAIKU_FIRST LOKI_E10_TRIM LOKI_E10_SMALL_NO_RUNNER LOKI_E10_SMALL_MAX_CHARS
2665
+ case "${LOKI_ROUTER:-auto}" in
2666
+ auto|AUTO|Auto) ;;
2667
+ *) [ -n "${_LOKI_ROUTER_KEPT_NOTED:-}" ] || echo "${1:---cost lean}: LOKI_ROUTER=${LOKI_ROUTER} is already set and wins; the auto preset is not applied" >&2
2668
+ _LOKI_ROUTER_KEPT_NOTED=1 ;;
2669
+ esac
2670
+ : "${LOKI_ROUTER:=auto}" "${LOKI_E10_TRIM:=1}" "${LOKI_E10_SMALL_NO_RUNNER:=1}" "${LOKI_E10_SMALL_MAX_CHARS:=1200}"
2671
+ export LOKI_ROUTER LOKI_E10_TRIM LOKI_E10_SMALL_NO_RUNNER LOKI_E10_SMALL_MAX_CHARS
2666
2672
  }
2667
2673
 
2668
2674
  # --haiku opt-in: the lean levers plus LOKI_COST_FIRST=1. Does not change the
@@ -2672,7 +2678,7 @@ loki_apply_haiku_optin() {
2672
2678
  local _a
2673
2679
  for _a in "$@"; do
2674
2680
  [ "$_a" = "--haiku" ] || continue
2675
- loki_lean_levers
2681
+ loki_lean_levers --haiku
2676
2682
  : "${LOKI_COST_FIRST:=1}"
2677
2683
  export LOKI_COST_FIRST
2678
2684
  return 0
@@ -2990,8 +2996,8 @@ cmd_start() {
2990
2996
  echo " --regenerate-prd, --regen, or LOKI_PRD_REGEN=1)"
2991
2997
  echo " --compliance PRESET Enable compliance mode (default|healthcare|fintech|government)"
2992
2998
  echo " --budget USD Per-run cost cap (default $(loki_budget_default_usd); auto-pause when exceeded)"
2993
- echo " --cost PROFILE Opt-in cost profile: lean (LOKI_IMPLEMENT_HAIKU_FIRST=1, LOKI_E10_TRIM=1, LOKI_E10_SMALL_NO_RUNNER=1, LOKI_E10_SMALL_MAX_CHARS=1200 unless already set) or off"
2994
- echo " --haiku Opt in to haiku for the first implement. Same levers as --cost lean, plus LOKI_COST_FIRST=1. A failed check climbs back to the session model. Default is the provider model"
2999
+ echo " --cost PROFILE Opt-in cost profile: lean (LOKI_ROUTER=auto, LOKI_E10_TRIM=1, LOKI_E10_SMALL_NO_RUNNER=1, LOKI_E10_SMALL_MAX_CHARS=1200 unless already set) or off"
3000
+ echo " --haiku Opt in to Haiku for implement and fix (LOKI_ROUTER=auto, the --cost lean levers, plus LOKI_COST_FIRST=1). A failed check climbs to Sonnet, then Opus. An explicit LOKI_ROUTER wins. Default is the provider model"
2995
3001
  echo " Proof Default LOKI_MUTATION_STRICT=1 and LOKI_E10_TRIM=1. A behavior change is VERIFIED only when a Wall test fails on the old code. Tool logs are trimmed before the next turn; a command's tail is kept. Opt out: LOKI_MUTATION_STRICT=0, LOKI_E10_TRIM=0"
2996
3002
  echo " --bmad-project PATH Use BMAD Method project artifacts as input"
2997
3003
  echo " --openspec PATH Use OpenSpec change directory as input"
@@ -3432,9 +3438,9 @@ cmd_start() {
3432
3438
  --cost|--cost=*)
3433
3439
  if [[ "$1" == --cost=* ]]; then _cost_val="${1#*=}"; _cost_n=1; else _cost_val="${2:-}"; _cost_n=2; fi
3434
3440
  case "$_cost_val" in
3435
- lean) loki_lean_levers
3441
+ lean) loki_lean_levers "--cost lean"
3436
3442
  export LOKI_COST_PROFILE=lean
3437
- echo "cost profile lean: LOKI_IMPLEMENT_HAIKU_FIRST=$LOKI_IMPLEMENT_HAIKU_FIRST LOKI_E10_TRIM=$LOKI_E10_TRIM LOKI_E10_SMALL_NO_RUNNER=$LOKI_E10_SMALL_NO_RUNNER LOKI_E10_SMALL_MAX_CHARS=$LOKI_E10_SMALL_MAX_CHARS" ;;
3443
+ echo "cost profile lean: LOKI_ROUTER=$LOKI_ROUTER LOKI_E10_TRIM=$LOKI_E10_TRIM LOKI_E10_SMALL_NO_RUNNER=$LOKI_E10_SMALL_NO_RUNNER LOKI_E10_SMALL_MAX_CHARS=$LOKI_E10_SMALL_MAX_CHARS" ;;
3438
3444
  off) ;;
3439
3445
  *) echo -e "${RED}--cost must be lean or off${NC}" >&2; exit 2 ;;
3440
3446
  esac
@@ -17137,8 +17143,8 @@ cmd_factory() {
17137
17143
  echo "When the contract cannot be satisfied the run stops with one question (BLOCKED)."
17138
17144
  echo "The summary still prints outcome, receipt, cost and the next command."
17139
17145
  echo ""
17140
- echo "loki start keeps the provider model. Pass --haiku (or --cost lean) to try haiku for"
17141
- echo "the first implement; a failed check climbs back. --max-cost stays the hard cap."
17146
+ echo "loki start keeps the provider model. Pass --haiku (or --cost lean) to run implement and"
17147
+ echo "fix on Haiku (LOKI_ROUTER=auto); a failed check climbs to Sonnet. --max-cost stays the hard cap."
17142
17148
  return 0
17143
17149
  fi
17144
17150
  exec "$SKILL_DIR/bin/loki" start "$@"
package/bin/loki CHANGED
@@ -325,21 +325,42 @@ if [ "$_cf_has" = "1" ]; then
325
325
  fi
326
326
  unset _cf_has _cf_out _cf_a
327
327
 
328
- # --haiku opts the first implement onto haiku (the existing lean levers).
328
+ # LOKI_IMPLEMENT_HAIKU_FIRST was removed: a set value maps to LOKI_ROUTER=auto
329
+ # when LOKI_ROUTER is unset, then is cleared. bin/loki is the only entry that
330
+ # reads it; neither engine looks at it.
331
+ case "${LOKI_IMPLEMENT_HAIKU_FIRST:-}" in
332
+ ""|0|false|FALSE) ;;
333
+ *)
334
+ if [ -n "${LOKI_ROUTER:-}" ]; then
335
+ _hf_why="LOKI_ROUTER=${LOKI_ROUTER} is already set and wins."
336
+ else
337
+ export LOKI_ROUTER=auto
338
+ _hf_why="Mapped to LOKI_ROUTER=auto (Haiku executes implement and fix)."
339
+ fi
340
+ echo "Note: 'LOKI_IMPLEMENT_HAIKU_FIRST' is deprecated and has no effect of its own since the router auto preset. ${_hf_why} Accepted for back-compat only." >&2
341
+ unset LOKI_IMPLEMENT_HAIKU_FIRST _hf_why
342
+ ;;
343
+ esac
344
+
345
+ # --haiku opts implement and fix onto haiku (LOKI_ROUTER=auto plus the lean levers).
329
346
  # The default model stays the provider default, the same one a raw claude
330
- # session uses. A failed check still climbs back (haikuFirstDowngrade).
347
+ # session uses. A failed check climbs to sonnet (the router ladder, runner/router/unit_model.ts).
331
348
  # Explicit env wins. Stripped so neither engine treats it as an unknown flag.
332
349
  _hk_has=0
333
350
  for _hk_a in "$@"; do
334
351
  case "$_hk_a" in --haiku) _hk_has=1 ;; esac
335
352
  done
336
353
  if [ "$_hk_has" = "1" ]; then
337
- : "${LOKI_IMPLEMENT_HAIKU_FIRST:=1}"
354
+ case "${LOKI_ROUTER:-auto}" in
355
+ auto|AUTO|Auto) ;;
356
+ *) echo "--haiku: LOKI_ROUTER=${LOKI_ROUTER} is already set and wins; the auto preset is not applied" >&2 ;;
357
+ esac
358
+ : "${LOKI_ROUTER:=auto}"
338
359
  : "${LOKI_E10_TRIM:=1}"
339
360
  : "${LOKI_E10_SMALL_NO_RUNNER:=1}"
340
361
  : "${LOKI_E10_SMALL_MAX_CHARS:=1200}"
341
362
  : "${LOKI_COST_FIRST:=1}"
342
- export LOKI_IMPLEMENT_HAIKU_FIRST LOKI_E10_TRIM LOKI_E10_SMALL_NO_RUNNER LOKI_E10_SMALL_MAX_CHARS LOKI_COST_FIRST
363
+ export LOKI_ROUTER LOKI_E10_TRIM LOKI_E10_SMALL_NO_RUNNER LOKI_E10_SMALL_MAX_CHARS LOKI_COST_FIRST
343
364
  _hk_out=()
344
365
  for _hk_a in "$@"; do
345
366
  [ "$_hk_a" = "--haiku" ] || _hk_out+=("$_hk_a")
@@ -7,6 +7,6 @@ Modules:
7
7
  control: Session control helpers (status, atomic writes, origin check)
8
8
  """
9
9
 
10
- __version__ = "11.123.0"
10
+ __version__ = "11.124.0"
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.123.0. Do not edit by hand.
3
+ Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.124.0. Do not edit by hand.
4
4
  Hidden and legacy-only commands are omitted; see `docs/CLI-INVENTORY.md` for the full inventory.
5
5
 
6
6
  | Command | Description |
@@ -19,7 +19,7 @@ Loki can also drive opencode as a provider (`loki start --provider opencode`).
19
19
  | Provider flexibility | Claude default (CLI or Agent SDK); opencode; OpenRouter and local routes | Very wide provider catalog, first-class | opencode |
20
20
  | Local models | `loki models --local`, `LOKI_MODEL_ROUTE=ollama/...`, lmstudio, llamacpp, vllm, custom URL | Local providers via config | Even |
21
21
  | Multi-agent | Role agents, council review, custom agents in `.loki/agents/*.md`, the run view names the active stage | Configurable agents and subagents | Loki when you want the receipt to name who ran |
22
- | Cost control | Same provider model as a raw session. Tool logs are trimmed before the next turn so a long run does not resend them. `--max-cost` and `budgets.per_run` are hard caps. `--haiku` or `--cost lean` opts the first implement onto haiku; a failed check climbs back. `--cost-first` (or `LOKI_COST_FIRST=1`, also set by `--haiku`) keeps a haiku route only when the advisor marks the risk low; a history floor, no advisor, or an explicit model override still raise it | User watches the TUI | Loki when the result has to be a check the model did not grade |
22
+ | Cost control | Same provider model as a raw session. Tool logs are trimmed before the next turn so a long run does not resend them. `--max-cost` and `budgets.per_run` are hard caps. `--haiku` or `--cost lean` (LOKI_ROUTER=auto) runs implement and fix on haiku; a failed check climbs to sonnet. `--cost-first` (or `LOKI_COST_FIRST=1`, also set by `--haiku`) keeps a haiku route only when the advisor marks the risk low; a history floor, no advisor, or an explicit model override still raise it | User watches the TUI | Loki when the result has to be a check the model did not grade |
23
23
  | Proof | Signed receipt, `loki verify`, NOT PROVEN list, and a PR comment. A behavior change is verified only when a Wall test fails on the old code and passes after (`LOKI_MUTATION_STRICT=0` opts out) | The diff in the TUI | Loki |
24
24
  | Docs consistency | One routing story, one cap rule, generated CLI table | Single product surface | Even |
25
25
  | Predictability | Order-independent routing, documented exit-code contract, spend cap, STALLED is never a verified receipt | Interactive, user-driven | Loki for unattended use |
@@ -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.123.0
5
+ **Version:** v11.124.0
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
 
package/docs/v10/GUIDE.md CHANGED
@@ -99,6 +99,18 @@ skipped and implement runs on your run's own model, like a raw session.
99
99
  `LOKI_E10_CASCADE=1` opts in to the cheaper sonnet start (it prints and
100
100
  records the downgrade); a repeated test failure always escalates up, never
101
101
  down (Engine Law L1).
102
+ `LOKI_ROUTER=auto` (also set by `--haiku` and `--cost lean`) is the router's
103
+ auto preset (Engine Law L1, as amended 2026-11-01, allows Haiku as the
104
+ executor when asked for): Haiku runs implement and fix, Opus writes the plan
105
+ of a hard task (judged from the task, never the repo size: sized large, or
106
+ a task naming more than 4 distinct non-test files), the Opus advisor tool is
107
+ attached to a fix round on Haiku or Sonnet (never to an Opus session), a
108
+ Haiku implement that claims the work is already done with no diff climbs one
109
+ rung, and a code-owned
110
+ failure, a stall or a spec conflict climbs the router's ladder (Sonnet, then
111
+ Opus). The start line names the downgrade and the route; the receipt's route
112
+ block records the executor and every climb. `LOKI_ROUTER_EXECUTOR` picks
113
+ another executor; `LOKI_ALLOW_HAIKU=false` makes it Sonnet.
102
114
  `loki quick --help` prints the help; `loki quick -v "<task>"` runs on Loki 10 with
103
115
  `--verbose`.
104
116
 
@@ -494,9 +506,11 @@ ready-to-paste values. Both accept `--json`.
494
506
  Model routing picks which Claude model does each stage of a run. It is OFF
495
507
  by default in 11.2.0. Set `LOKI_ROUTER=1` to opt in. `LOKI_ROUTER=0` is the
496
508
  explicit opt-out and keeps the exact pre-router model behavior, pins
497
- included. Explicit
498
- `LOKI_MODEL_OVERRIDE` and `LOKI_CLAUDE_MODEL_DEVELOPMENT` still win and
499
- bypass the router. The other knobs are `LOKI_ROUTER_EXECUTOR` (post-flip
509
+ included. Explicit `LOKI_MODEL_OVERRIDE`, `LOKI_CLAUDE_MODEL_DEVELOPMENT`,
510
+ `LOKI_MODEL_DEVELOPMENT` and `LOKI_SESSION_MODEL` (set by `--model`) still
511
+ win and bypass the router. `LOKI_SESSION_MODEL` and `LOKI_MODEL_DEVELOPMENT`
512
+ joined this list in the auto-preset change, so a `LOKI_ROUTER=1` run with
513
+ `--model` set now runs every session on that model instead of routing. The other knobs are `LOKI_ROUTER_EXECUTOR` (post-flip
500
514
  default sonnet; haiku only by earned evidence), `LOKI_ROUTER_ESCALATE` (default sonnet) and `LOKI_ROUTER_ADVISOR`
501
515
  (default opus; `off` disables the advisor). The router engine itself lands in
502
516
  11.2.0; the pieces below marked "shipped in 11.1.0" are already in the code.
@@ -165,7 +165,6 @@
165
165
  "LOKI_HOOK_EVENTS",
166
166
  "LOKI_HOOK_TIMEOUT",
167
167
  "LOKI_HOSTED_ENDPOINT",
168
- "LOKI_IMPLEMENT_HAIKU_FIRST",
169
168
  "LOKI_INFERENCE_GEO",
170
169
  "LOKI_INJECT_FINDINGS",
171
170
  "LOKI_INTENT_CARD",