loki-mode 11.139.0 → 11.140.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.
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/dashboard/__init__.py +1 -1
- package/docs/CLI-REFERENCE.md +1 -1
- package/docs/INSTALLATION.md +1 -1
- package/docs/dev/architecture-reference.md +22 -4
- package/loki-ts/dist/loki.js +1791 -1748
- package/mcp/__init__.py +1 -1
- package/package.json +2 -2
- package/packages/control-plane/dist/server.js +4071 -3226
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/web-app/dist/assets/{AdminPage-jtODIZAt.js → AdminPage-AnTJfYHn.js} +1 -1
- package/web-app/dist/assets/{Avatar-H6kG2p-Z.js → Avatar-D5vJgobT.js} +1 -1
- package/web-app/dist/assets/{Badge-dvq7uYlK.js → Badge-3wfrvysN.js} +1 -1
- package/web-app/dist/assets/{Button-BpCs2ymD.js → Button-CGZjyCE6.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-07_s_vDT.js → CockpitPage-C7mqBi9n.js} +1 -1
- package/web-app/dist/assets/{ComparePage-JZ_tqDD7.js → ComparePage-D3-obrte.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-RPeSycKt.js → ErrorBoundary-Bs43Su89.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-C-RfDk9Y.js → EvidenceReceiptPanel-xLwznkum.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-C4rzHzQU.js → GitHubIssuesPanel-BpBghyAA.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-YEdboNBe.js → GitHubPRsPanel-DnmivBIU.js} +1 -1
- package/web-app/dist/assets/{HomePage-B-ydKDOS.js → HomePage-NShCAanO.js} +2 -2
- package/web-app/dist/assets/{LoginPage-Kk5BXqtE.js → LoginPage-BVdS4b5G.js} +1 -1
- package/web-app/dist/assets/{MagicPage-DjAQZxUp.js → MagicPage-olsKKr2s.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-BWBhkKm3.js → MetricsPage-5Tpzi-m_.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-DYk7XnfY.js → NotFoundPage-DGc0rIRK.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-Ct3U8d6B.js → ProjectPage-W1TfOMF0.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-D5LNFNgR.js → ProjectsPage-Bgcxx5KG.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-BSUvkHRg.js → SettingsPage-BzDq7U69.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-cjK3oiWS.js → ShowcasePage-CX1VViUt.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-CqzpIcJZ.js → SystemSettingsPage-B6T8o5Sx.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-BijziNIs.js → TeamsPage-CMEiG4uP.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-BRBVRhPF.js → TemplatesPage-BKR6J5Ll.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-BMlB6qgt.js → TerminalOutput-rbmcfF-w.js} +1 -1
- package/web-app/dist/assets/{activity-CXniysN_.js → activity-ZjbYoVdt.js} +1 -1
- package/web-app/dist/assets/{bell-BpAF2cGg.js → bell-dnzVJHRx.js} +1 -1
- package/web-app/dist/assets/{bot-DOaFRkHH.js → bot-DZ93FeML.js} +1 -1
- package/web-app/dist/assets/{check-zFtYcq5D.js → check-BWG8-QRb.js} +1 -1
- package/web-app/dist/assets/{chevron-left-B4VXdl63.js → chevron-left-BcIUnNVH.js} +1 -1
- package/web-app/dist/assets/{circle-alert-dffDY3lc.js → circle-alert-DSUMN2Ag.js} +1 -1
- package/web-app/dist/assets/{clock-BAVVykfZ.js → clock-CTsf9GNv.js} +1 -1
- package/web-app/dist/assets/{cloud-C_gcDus6.js → cloud-CD5QNCYt.js} +1 -1
- package/web-app/dist/assets/{code-xml-ZrMx0o2t.js → code-xml-C3xkqqgT.js} +1 -1
- package/web-app/dist/assets/{database-BXzQLO2m.js → database-MKFTZWrp.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-B4FRzesC.js → dollar-sign-DgiA1wBy.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-7DVYtgwI.js → file-code-corner-I2g6rLZE.js} +1 -1
- package/web-app/dist/assets/{file-plus-Q-mb47pO.js → file-plus-DbhvhoLG.js} +1 -1
- package/web-app/dist/assets/{globe-CHWygSVz.js → globe-BfMA-pSa.js} +1 -1
- package/web-app/dist/assets/{hammer-fF96WcCX.js → hammer-Cud0M92b.js} +1 -1
- package/web-app/dist/assets/{index-C6S2czMH.js → index-3cLafqmP.js} +3 -3
- package/web-app/dist/assets/{layers-wNvjKZxj.js → layers-BE2O5qhC.js} +1 -1
- package/web-app/dist/assets/{loader-circle-TNNUU4Vp.js → loader-circle-DJZ69MCM.js} +1 -1
- package/web-app/dist/assets/{lock-ONDlSN5z.js → lock-BNPYDDqH.js} +1 -1
- package/web-app/dist/assets/{package-itd_dmpo.js → package-Cz5ktewS.js} +1 -1
- package/web-app/dist/assets/{plus-wz8cb6su.js → plus-C4TXh0S_.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-Ddchs-pF.js → refresh-cw-DRI1ZECq.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-C0t4Hbq2.js → rotate-ccw-WJ_wl2QR.js} +1 -1
- package/web-app/dist/assets/{scroll-text-CgXZq0KV.js → scroll-text-CfGN1Pna.js} +1 -1
- package/web-app/dist/assets/{server-CNAbZ5mD.js → server-BEjlKkq8.js} +1 -1
- package/web-app/dist/assets/{shield-alert-C4atr8M0.js → shield-alert-hGEgtX7e.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-CtOVJ2-w.js → thumbs-up-CFpE08NC.js} +1 -1
- package/web-app/dist/assets/{trash-2-CNWZa26a.js → trash-2-u1mzVC4h.js} +1 -1
- package/web-app/dist/assets/{trending-down-BQ9GpDnf.js → trending-down-DKwwom19.js} +1 -1
- package/web-app/dist/assets/{trending-up-jtsRG0TV.js → trending-up-TXMyIGFb.js} +1 -1
- package/web-app/dist/assets/{upload-C1Rxb2Gu.js → upload-Dtje_MkI.js} +1 -1
- package/web-app/dist/assets/{usePolling-Bd-Eo5wk.js → usePolling-CV8no3Jz.js} +1 -1
- package/web-app/dist/assets/{user-CqNKv1gV.js → user-C83wfF0K.js} +1 -1
- package/web-app/dist/index.html +1 -1
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.
|
|
6
|
+
# Loki Mode v11.140.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.
|
|
464
|
+
**v11.140.0 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
11.
|
|
1
|
+
11.140.0
|
package/dashboard/__init__.py
CHANGED
package/docs/CLI-REFERENCE.md
CHANGED
|
@@ -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.
|
|
3
|
+
Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.140.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 |
|
package/docs/INSTALLATION.md
CHANGED
|
@@ -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.
|
|
5
|
+
**Version:** v11.140.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
|
|
|
@@ -131,7 +131,7 @@ These knobs together implement the RARV-C (closure) loop: findings -> override c
|
|
|
131
131
|
- `LOKI_E10_SMALL_NO_RUNNER` -- default on: a missing test runner no longer disqualifies a task from "small". A small task skips the plan session (the implementer plans) and the skipped plan writes `plan-scope.json` from the files the task names. Set to `0` to make a missing runner force "normal".
|
|
132
132
|
- `LOKI_E10_SMALL_MAX_CHARS` -- task text length above which a task is not small (positive number, default 600; an invalid value falls back to 600 with a stderr note).
|
|
133
133
|
- `LOKI_E10_SCAFFOLD` -- release-note fragment writer (on by default; `=0` opts out). Right before the first verify, when the implement stage ended `done` and the repo keeps changesets (`.changeset/config.json`) or towncrier fragments, and the diff carries no fragment, Loki writes one with no model call: the package of each changed file (public workspace packages only, config `ignore` honored) or `<issue>.<type><ext>` named from the task number and the repo's own fragments, the body from the task title plus one sentence of the implement summary, quote style and trailing period from the newest real fragment. Nothing is written when the task says no changelog, the title is an internal change (chore, refactor, docs, ci, deps), only tests or docs changed, or the type or issue number is unclear; `changeset status` / `towncrier build --draft` remove a fragment they reject. Emits `scaffold.applied`. Whenever it writes a fragment, the receipt (not-proven list) and the PR body both say: "Loki added <path> as the release note for this change; delete it if this change needs no release note (LOKI_E10_SCAFFOLD=0 turns this off)." (`fragmentNoticeLine`). Code: `writeReleaseNoteFragment` in `loki-ts/src/project_model/conventions.ts`; tests in `tests/min/context-pack.sh`.
|
|
134
|
-
- `LOKI_E10_ATTEMPTS` --
|
|
134
|
+
- `LOKI_E10_ATTEMPTS` -- best-of-N implement attempts (EXP-0010, `loki-ts/src/features/attempts.ts`). N is the TOTAL count: unset, `0`, `1` and anything unparseable are off (one attempt); `on`/`true`/`yes` is 2; a whole number 2-6 sets N on any model. Before 11.140 the number was the EXTRA count after a red verify, so `LOKI_E10_ATTEMPTS=3` meant 3 extra attempts and now means 3 in all. When the first attempt (fix rounds included) is not clean (a red check, a spec conflict, or a NOT PROVEN line from verify or a fix round; `pre red:` lines do not count), N-1 more independent attempts run in parallel on the same model (`LOKI_E10_ATTEMPT_MODELS`, unset by default, is a comma list with one model per attempt in order: `haiku,sonnet` runs the first attempt's implement session on Haiku and the extra one on Sonnet; an attempt past the list reuses its last entry; the receipt's `attempts` lines then name each attempt's model and `implement.attempts` records `models` and `winner_model`), each in a detached worktree in its own temp directory with a different instruction (smallest change, test first, read the covering tests first). Each finished attempt is swapped into the primary and gets Loki's normal verify (the complete one, never a fix round's quick one); the first clean one stops the others. Otherwise `e10ext/select.ts` rankAttempts orders them on what a user can see: verify green, then no spec conflict, then fewer NOT PROVEN lines. A disqualified attempt (killed, errored, an empty diff without already-done evidence, a loosened existing or Wall test) never wins. A tie at the top goes to one tool-less review (reviewTie; `LOKI_E10_SELECT_REVIEW_MODEL`, default claude-sonnet-5-5, `opus` for a reviewer independent of a Sonnet judge; `LOKI_E10_ATTEMPTS_REVIEW_MODEL` is its older name and loses to the new one; aliases resolve through `providers/model_catalog.json`; `LOKI_E10_ATTEMPTS_REVIEW=0` keeps the lowest index). It compares the tied diffs, new files included, against the issue, the repo's CONTRIBUTING, PR template, style configs, top-level entries and the pre-fix text of every touched file, all read at the base commit. It is shown in forward and reversed order and counts only when both orders name the same attempt; anything else keeps the lowest index. No hidden test or benchmark file is read. Only the chosen tree is sealed, with its own verify and fix outputs; the receipt field `attempts` lists every attempt and the selection reason, and is omitted when no extra attempt ran. Shares the run's `--max-cost` and time caps and needs one 90 s window. Journal event `attempts.selected`, stage data `implement.attempts`.
|
|
135
135
|
- `LOKI_E10_PATCH` -- the implement patch protocol (`loki-ts/src/features/patch_protocol.ts`, wired in `engine10/stages/implement.ts`). On by default; `0`/`off`/`false` turns it off. Lean path only (plan skipped, router off, no session to continue, claude provider, a named model). One tool-less call (`runner/sdk_invoker.ts` toolLessCall, thinking off; `claude -p --tools ""` under `LOKI_E10_INVOKER=cli`) gets a dossier: the context pack's code, the heads and test names of the tests covering it, and the check command. It answers with FILE/SEARCH/REPLACE edit blocks. Before anything is written the harness refuses edits to lockfiles the task does not ask to change, test-runner and compiler configs (`features/runner_config.ts` RUNNER_CONFIGS), Wall tests, `.git`, `.loki`, paths outside the repo or through any symlink (realpath check), and an edit that changes nothing; the rest applies all-or-nothing (an exact, unique SEARCH match). The harness runs the targeted tests with verify's runner. At most one repair call follows (a red check with a failure digest and the edited regions, a rejected or missed edit, a NEED read, or a green fix with no regression test, which gets a test-only turn that can never make the green tree worse). Green means a check ran and passed and at least one of the checks is a test that existed before the change (the model's own new test alone never counts); the agentic session is then skipped and verify and seal judge the tree as usual. Any other end, including an exception anywhere in the protocol, restores every file the protocol wrote and today's agentic session runs, so the outcome floor is unchanged. A failed patch's spend still lands in the receipt total. Cost lands in the child ledger under phase `implement-patch`; the stage data carries `implement.patch` (status, calls, applied, refused, restored, usd, check) and the run dir keeps `implement-patch-<n>.txt` (prompt and reply). The receipt carries `patch` (outcome green, fallback or error, the protocol status, calls, seconds and dollars), so a scored run can count the fallback rate.
|
|
136
136
|
- `LOKI_E10_LEAN_CALLS` -- on by default, `0` opts out (`loki-ts/src/util/cost_profile.ts`): skips the coverage claim re-ask `-c2`, whose result changed no outcome on the 20-task Haiku bench (v11.137.1, patch off: 11 of 11 sessions edited nothing, 3 of 3 on v11.137.0; 4.6% of the arm's dollars). An explicit `LOKI_E10_CLAIM_CHECK=1` keeps the call. The same knob sets three more cheaper defaults, each with its own opt-out: the Opus consult and never-stop are off (`LOKI_E10_OPUS_CONSULT=1` turns them on), the exec-spec generator call is off (`LOKI_E10_EXEC_SPEC=1` turns it on) and the coverage requirement is folded into the implement brief instead of a separate turn (`LOKI_E10_COVERAGE_RESUME=1` restores the turn). `LOKI_E10_LEAN_CALLS=0` restores all four v11.138.0 defaults.
|
|
137
137
|
- `LOKI_E10_OPUS_CONSULT` -- off by default under `LOKI_E10_LEAN_CALLS` (`1` turns it on, `0` keeps it off; `loki-ts/src/features/opus_consult.ts` consultEnabled): one knob gates both the tool-less Opus consult (triggers stop, red-verify, open-choice; at most `LOKI_E10_CONSULT_MAX` per run) and never-stop (a headless run that would end SPEC_CONFLICT implements the most likely intent and is capped at PARTIAL). Off, a conflict ends BLOCKED as before v11.138.0. The default is set on cost. On the 20-task Haiku tuning bench (EVAL-2026-11-12-1, v11.138.0) each firing cost about $0.034, about $0.010 per task on average. On the 6 tasks where it fired, the runs cost $0.48 for 3/6 merge-ready with it on against $0.29 for 4/6 with it off. False VERIFIED is no worse with it off (0 against 2). The arm-level merge-ready gap (17/20 against 11/20, paired +0.30) is mostly one-seed variance, not an effect of the consult: it fired on only 1 of the 6 tasks gained.
|
|
@@ -139,15 +139,32 @@ These knobs together implement the RARV-C (closure) loop: findings -> override c
|
|
|
139
139
|
- `LOKI_E10_COVERAGE_MAX_TURNS` -- default 10, `0`/`off` opts out (`loki-ts/src/util/conflict_resume.ts`): the coverage turn (`-c`, `-c2`) ends at this many turns. On the v11.137 Haiku bench arms 31 of 36 coverage turns took 2 to 8 turns and the other 5 took 13 to 33 (up to $0.031); a capped turn ends like a reply without LOKI_DONE, so the first result stands.
|
|
140
140
|
- `LOKI_E10_SUITE_FIX_SKIP` -- on by default, `0` opts out (`loki-ts/src/engine10/machine.ts` suiteOnlyRed): no fix round when every blocking group is a full-suite or startup failure, no failing full-suite id names a changed file, nothing held out failed and a targeted test of the change passed. 21 such first rounds on the v11.137 bench arms turned no run green (18 made no edit). The receipt carries a NOT PROVEN line; the verify stays red, so the run is never VERIFIED.
|
|
141
141
|
- `LOKI_E10_CLAIM_CHECK` -- off by default under `LOKI_E10_LEAN_CALLS` (`1` turns it on; with `LOKI_E10_LEAN_CALLS=0` it is on by default and `0` opts out; only with `LOKI_E10_COVERAGE_RESUME`; one extra session only when a claim is found absent): the coverage turn also asks for `SITE <path>:<line>: changed|unchanged` lines; a site claimed changed whose line is byte-identical to the base (claimed_change_absent) is re-asked once (`-c2`), recorded as `implement.claim_absent`. With `0`, the coverage turn is exactly as before.
|
|
142
|
-
- `LOKI_E10_ATTEMPTS_EARLY` -- `1` (off by default): on Haiku, run the `LOKI_E10_ATTEMPTS` attempts (
|
|
142
|
+
- `LOKI_E10_ATTEMPTS_EARLY` -- `1` (off by default): on Haiku, run the `LOKI_E10_ATTEMPTS` attempts (N=2 in all when that is unset) right after the first red verify, before any fix round, and skip the fix rounds when an attempt goes green; if none does, the fix rounds run on the best tree as usual. The switch also makes N=2 apply to the after-fix hook on Haiku when `LOKI_E10_ATTEMPTS` is unset.
|
|
143
143
|
|
|
144
144
|
## engine10 improvement knobs, on by default (opt out with `=0`)
|
|
145
145
|
|
|
146
146
|
- `LOKI_E10_COVERAGE_RESUME` -- lean path only (plan skipped). Default (`fold`, under `LOKI_E10_LEAN_CALLS`): the implement brief carries one fixed line right after `FOLD_PLAN_INSTRUCTION` (cache-stable prefix) asking that every site, symbol, example or case the task names be mapped to its hunk and test, any gap fixed and a test added where none exists, so no separate turn runs (`coverage_resume: folded`). `=1`/`on` (or `LOKI_E10_LEAN_CALLS=0`) restores the separate turn: a clean LOKI_DONE with a non-empty diff gets one more turn in the same session that maps every named site to a change and a test and fixes any gap, with the edit-shape site hints. `=0` (or `off`/`false`) does neither. On the 20-task Haiku bench (v11.137.1, patch off) the separate turn cost 18% of the arm's dollars for 1 source edit in 18 (9 of 18 added tests). Code: `coverageMode` in `loki-ts/src/util/conflict_resume.ts`.
|
|
147
|
+
- `LOKI_E10_PINNED_TEST_UPDATE` -- on by default, `0` opts out (Z2 with Z1 folded in; `loki-ts/src/e10ext/context.ts` FIXED_RULES / fixedRules, `util/test_guard.ts` pinnedTestUpdates, `util/conflict_resume.ts` pinnedTestCite). The implement and fix Rules block (cache-stable prefix) now says that an existing assertion pinning the OLD behavior the issue explicitly asks to change is not a spec conflict: its expected value changes to the issue's stated behavior and nothing else in that test changes. Every other protection stays: no deleting tests, no skip, xfail or only, no widened tolerance, and no touching a test unrelated to the named behavior; any other contradicting test is still a spec conflict. Each such change is reported on an `UPDATED TEST <path>:<line>: <old> -> <new>; issue: "<sentence>"` line. The implement stage checks each one (the file is a test file on base that the change modified, the old value is on base at that line, the new value is in the edited file, the quoted sentence is in the task) and records `pinned_test_updates`. The receipt lists them all for the evaluator's test-gaming audit (lab/EVALUATOR.md 4b), and an unverified one also gets a NOT PROVEN line. Z1: when implement still ends LOKI_SPEC_CONFLICT citing an existing test (path:line) whose cited lines assert a literal the task text quotes, the one FC-19 correction says to update that expected value instead of repeating the generic text (implement records `pin_conflict`). `=0` restores the v11.139.0 rules text byte for byte and the generic correction. On the real-world bench the old rule made Haiku skip a site the issue named, and stopped two other runs BLOCKED; the test fixtures are synthetic.
|
|
148
|
+
- Tool-less Agent SDK calls (T201; `loki-ts/src/runner/sdk_invoker.ts` toolLessCall, shared by the Opus consult, the exec-spec generator, the ranked-remedy check and the precedent vote). A failed call writes its full error to the child ledger: class, message, HTTP status, the CLI's stderr tail, elapsed time and whether our own timeout fired. classifyToolLessFailure sorts it three ways:
|
|
149
|
+
- output cap: the CLI refuses a reply longer than `CLAUDE_CODE_MAX_OUTPUT_TOKENS` ("response exceeded the N output token maximum"). It is reported as truncated and never retried.
|
|
150
|
+
- transient: HTTP 408/409/429/5xx, overloaded, rate limited, or a reset or refused connection. It is retried with backoff (about 1 s, then 3 s), at most 3 calls in all.
|
|
151
|
+
- fatal: anything else (auth, our own timeout, a stream with no result). It stops at once.
|
|
152
|
+
The bench's empty remedy checks, recorded as transport with 0 tokens, were the output cap. Measured at load average 30 to 40: 9 of 12 concurrent checks at the 50-token cap failed that way, 0 of 12 at 256, and none for a network or auth reason. The remedy check now runs at 256 (`REMEDY_MAX_TOKENS`); output is billed by the tokens written.
|
|
153
|
+
- `LOKI_E10_NAMED_SITES` -- on by default, `0` opts out (R2; `loki-ts/src/util/conflict_resume.ts` namedSites / resumeForNamedSites / namedUnchangedOf, read by `stages/seal.ts`). An extension of the coverage map: every symbol the task names (a site atom of `features/exec_spec.ts` that resolves to a definition in the repo; a callee it was not named for is left out) is either changed by the diff (its file is) or written by the model as `SITE <path>:<line>: unchanged - <why>` with a reason about the code. A reason that only restates the task's hedge ("may need", "out of scope", "optional") does not count. The fold brief carries one more fixed line (NAMED_SITE_LINE, cache-stable prefix). After a clean done with a non-empty diff, an unaccounted named site gets one "-ns" resume that names it. Seal reads the final diff (a winning extra attempt's own SITE reasons replace the first attempt's): each named site left unchanged is listed in the receipt key `named_unchanged` with its reason, and one with no reason adds `named site unchanged without a reason: <symbol> (<path>:<line>)` and caps VERIFIED at PARTIAL. Off: the fold brief is byte-identical to the coverage map alone, no resume runs and the key is omitted. Stage data `implement.named_sites`.
|
|
154
|
+
- `LOKI_E10_PLAN_SCOPE_ANCHOR` -- on by default, `0` opts out (R3; `loki-ts/src/e10ext/scope.ts` anchoredPlanScope, read by the commit stage's scope notes and by the attempts ranking). plan-scope.json's file list is the scope only when it holds a file the task names (its path, or its basename in the same case) or a file that defines a symbol the task names. When the task names a file or symbol and the list holds none, the list is discarded and the other scope signals decide (often "scope not determined", a disclosure that never caps). A task that names nothing keeps the list. The failure: a prose word matched a same-named file case-insensitively, that file became the whole scope, and the real fix file was flagged "outside stated scope".
|
|
155
|
+
- `LOKI_E10_INTAKE_CAP_S` -- default 180, `0` opts out to the per-command caps alone (R3; `loki-ts/src/runner/repo_profile.ts` intakeCapS / baselineSuites `deadlineMs`, wired in `stages/intake.ts` and `project_model/install.ts` intakeDeps). One budget in seconds for all of intake's baseline test runs together: the root baseline, its rerun after an install, and the per-suite baselines. A run the budget cuts is recorded as cut off, and a suite with no budget left reads "baseline budget used up", as before. The dependency install keeps its own cap (INSTALL_CAP_MS) and is not counted. The failure: a suite past the 300 s per-command cap was measured twice under two names, so intake spent 600 s on two cut-off runs that excuse nothing. Of 65 recorded bench baselines, 6 took over 180 s in all; 1 of them (195.8 s root, 219.2 s suite) completed and would now be cut.
|
|
156
|
+
- `LOKI_E10_MOCHA_TARGETED` -- on by default, `0` opts out (R5; `loki-ts/src/engine10/testmap.ts` mochaTargets, used by `stages/verify.ts`). When verify selects no test at all, a changed JS/TS file whose nearest package.json declares mocha (a dependency, a script, a `mocha` key, or a .mocharc file beside it) maps to its own test file: itself under the package's test/, tests/ or spec/ directory (fixtures excluded), else the file at the same path under one of them (with or without the source's first directory). At most 8, each run as `npx --no-install mocha <file>` (runner `mocha`, which runner detection never lists) through the normal test path, so base subtraction and the flaky rerun apply and a passing one covers its source. Mocha test files carry no .test or .spec suffix, so such a repo verified with no test at all.
|
|
157
|
+
- `LOKI_E10_BASE_RED_SHAPE` -- on by default, `0` opts out (acc-147; `loki-ts/src/runner/repo_profile.ts` sameUnattributableRed inside attributeFullSuite, `loki-ts/src/util/check_result.ts` failureShape). The intake baseline records the output shape of a base suite that is red with no parseable failing ids (`failing_shape`). A head full suite of the same command is pre-existing only when it fails in the identical kind: the same exit code, no parseable ids, and the same shape (whole output, only durations, clock times, timestamps and hex addresses normalized). A newly broken test, a different message or count, or another exit code stays introduced. The excuse is disclosed on NOT PROVEN. Dev corpus 2026-11-13: 4 of 24 runs ended FAILED with fix rounds chasing such a suite ("the base run is not attributable").
|
|
158
|
+
- `LOKI_E10_EVIDENCE_PER_PACKAGE` -- on by default, `0` opts out (acc-147; `loki-ts/src/engine10/testmap.ts` buildTestMap marks, `loki-ts/src/util/test_file_text.ts` scopeRunnersByPackage). Package scoping grants a runner to every package that owns a file proving it (go.mod, Cargo.toml, a test file), not only to the package of the first such file listed. Without it a multi-module repo whose nested module sorts first (go-chi/chi `_examples/rest/go.mod`) left the root module with no runner and 0 tests once the Project Model loaded. The 5 tuning repos' test maps are unchanged.
|
|
159
|
+
- `LOKI_E10_ENCLOSING_DECL` -- on by default, `0` opts out (acc-147; `loki-ts/src/util/check_result.ts` changedSymbols / enclosingDecl, read by `stages/seal.ts` and `stages/verify.ts`). When a hunk declares nothing and git's `@@` context names nothing (an edit inside an indented method: git's default funcname reads only unindented lines, and JS/TS has no built-in driver), the enclosing declaration is read from the head file. Hunks whose context already names a declaration are unchanged. Without it the lean gate and the fail-then-pass proof read "(no declared symbol)" and a run with a real fail-then-pass test stayed PARTIAL (commander.js).
|
|
160
|
+
- `LOKI_E10_PRECEDENCE_CHECK` -- on by default, `0` opts out (F3; `loki-ts/src/util/edit_shape.ts` precedenceSites / precedenceBrief, `util/conflict_resume.ts` resumeForPrecedence). The edit-shape precedence rule detects a widened check from the diff alone: a Go `x.(T)` replaced by `errors.As` or `errors.Is`, an `isinstance` or `instanceof` moved to another type, or an exact `==` / `===` comparison replaced by a membership test (`includes`, `in`, `strings.Contains`). For each such site it lists the other type or value checks in the same function, the inputs that took their own branch before. After a clean LOKI_DONE with a non-empty diff, a site that has such inputs gets one follow-up resume (`-pr`) naming each input and asking that it still take its branch, with a test case per input; only a clean LOKI_DONE replaces the first result. Nothing fires, and nothing is spent, without such a site. The implement stage records `precedence_check: {sites, resumed}`. The tuning case was a widened error check placed ahead of an existing assertion branch; the test fixtures are synthetic.
|
|
161
|
+
- `LOKI_E10_SCOPE_TEST_DROP` -- on by default, `0` opts out (J3; `loki-ts/src/e10ext/scope.ts` crossPackageTestEdits, applied by the commit stage in `stages/seal.ts`). The one non-advisory scope rule: a test file the run added or modified in an owner package (a Go directory, or a JS/TS package with its own package.json) where the change has no non-test change, the package has source files, and the task names neither the file nor the package, is reset to base (index and tree) before commit, with a NOT PROVEN line naming it. Source files, Python layouts, Go tests-only directories and test-only changes are never touched. On the tuning bench it fires on the 3 cross-package test scope fails and on 0 of 160 lean runs.
|
|
162
|
+
- `LOKI_E10_FORMAT_RESOLVE` -- on by default, `0` opts out (J1; `loki-ts/src/runner/repo_profile.ts` detectFormatters / runFormattersRecord, called by the commit stage through `e10ext/commit_filter.ts` formatChangedRecord). The repo's own formatter is resolved the way verify resolves its linter: ruff through `util/check_result.ts` resolveTool (the project `.venv` or `venv`, then `uv run`, then PATH); prettier and biome stay repo-local binaries only. Only files the run added or modified and kept are formatted, and a modified file whose BASE text is not formatter-clean (the formatter's stdin mode prints something else, or fails) is left alone, so the run never reformats lines it did not write. The commit stage records `format: [{tool, cmd, formatted, skipped, error}]`, so a missing binary is visible. On the tuning bench the bare `ruff` argv found no binary (the repo's ruff is `.venv/bin/ruff`), nothing was formatted, and 11 judge fails were formatting. `=0` restores the bare argv with no base check.
|
|
163
|
+
- `LOKI_E10_RANKED_REMEDY` -- on by default, `0` opts out (`loki-ts/src/features/spec_ambiguity.ts` rankedRemedy, `loki-ts/src/util/conflict_resume.ts` resumeForRemedy). Intake extracts the issue's first-ranked remedy deterministically: a numbered list of at least two items under a "Possible / Suggested / Proposed fix or solution" heading or intro, or after "in order of preference" / "preferred"; the item marked preferred (and not a fallback) wins over item 1. It is stored as `intake.ranked_remedy`, never in `assumptions`. The implement brief names it after the task block (per-task text, outside the cache-stable prefix; `COVERAGE_FOLD` is unchanged) as the first site of the coverage check. After a clean LOKI_DONE with a non-empty diff, one tool-less Haiku check (`LOKI_E10_RANKED_REMEDY_MODEL`, default claude-haiku-5-5; the diff capped at 12,000 chars, at most 50 output tokens, thinking off) answers IMPLEMENTED or MISSING; only a parsed MISSING starts one targeted resume (`-rr`), and only a clean LOKI_DONE reply replaces the first result. The implement stage records `ranked_remedy: {check, usd, resumed}`. It fires only when a ranked list exists: on the 20 tuning tasks that was one task, where the runs had implemented the second-ranked remedy instead of the first.
|
|
147
164
|
- `LOKI_E10_PACK_DIET` -- the implement context keeps only the code the task names plus its direct callers and callees (no fill up to the budget). `=0` restores the full pack. Code: `packDietEnabled` in `loki-ts/src/util/context_pack.ts`.
|
|
148
165
|
- `LOKI_E10_PRECEDENT` -- sibling-implementation precedent is added to open either/or choices in the task. `=0` (or `off`/`false`) removes it. Code: `resolveChoices` in `loki-ts/src/features/spec_ambiguity.ts`.
|
|
149
166
|
- `LOKI_E10_DEFECT_PIN` -- existing assertions that pin the wrong value the issue reports are listed in the implement brief, and a pure value replacement of exactly such an assertion is not counted as a weakened test (it never counts as fail-then-pass proof, and the receipt always lists the rewrite). `=0` turns both off. Code: `findDefectPins` in `loki-ts/src/e10ext/context.ts`, `pinLift` in `loki-ts/src/engine10/stages/seal.ts`.
|
|
150
|
-
- `LOKI_E10_ATTEMPTS` and `LOKI_E10_ATTEMPTS_EARLY` stay off by default (
|
|
167
|
+
- `LOKI_E10_ATTEMPTS` and `LOKI_E10_ATTEMPTS_EARLY` stay off by default (N=1) until the bench decides; the older form (2 extra attempts after a red verify) raised cost per run 17-47% on the v131 ledger with no accuracy evidence.
|
|
151
168
|
|
|
152
169
|
## Worktree substrate (autonomy/lib/worktree_prep.py)
|
|
153
170
|
|
|
@@ -164,7 +181,8 @@ extract_learnings_from_session (autonomy/run.sh) mirrors learnings and decisions
|
|
|
164
181
|
- Parallel units: `route.ts` maybeRunGroup defaults to `features/speed/run_group.ts`, which freezes per-unit acceptance (`features/contract.ts`), runs units, merges with `engine10/integrate.ts` and seals once via sealGroup.
|
|
165
182
|
- Lessons: every sealed run appends a receipt fact (`LOKI_AUTO_LEARN_PR`, default on) outside the receipt body; `implement.ts` injects lessons and relevant learnings inside the untrusted-data fence; `loki memory brief --task T` prints the same block. With `LOKI_ORG_GRAPH=1` (off) `implement.ts` also appends `orgKnowledgeBlock` (util/pr_lessons.ts, python3 by file path, 10 s cap, 1500 bytes) and records org_bytes/org_lines in lessons-injected.json.
|
|
166
183
|
|
|
167
|
-
-
|
|
184
|
+
- `LOKI_COMMIT_WALL` -- off by default, `1` publishes (J2; `util/check_result.ts` commitWallEnabled). Loki's own `loki_wall_*` acceptance files stay out of the delivered branch: a VERIFIED seal makes no Wall child commit and records `wall_kept: {files, sha256, cmds, sealed_dir}` on its data instead, and the WIP commit of an unsealed end (`e10ext/commit_filter.ts` commitUnsealedWork) resets them like other churn and removes a run-created one from the tree. The sealed copy stays in `runDir/wall`, and the receipt keeps its sha256 (`wall.files`) and the check's rerun command. On the tuning bench every published Wall file whose run passed hidden failed the judge (3 of 3). `=0` also drops the copy-integrity notes, as before; `=1` restores the publish below.
|
|
185
|
+
- Wall publish (FC-VERIFIED-PR-WITHOUT-ITS-TEST): with `LOKI_COMMIT_WALL=1`, on a VERIFIED seal only, `publishWall` (`util/check_result.ts`, called from `stages/seal.ts`) makes ONE child commit (trailer `Loki-Wall-Publish: <runId>`) of the SEALED Wall bytes (`runDir/wall`, hash-checked against `wall.files[].sha256`) that verify ran and passed (`publishableWall`). Before writing, the realpath of each Wall file's parent directory must be inside the repo, and an existing file or symlink is removed first. The child commit runs with hooks and signing OFF (the default `git()` call, no `userHooks`), so a pre-commit hook cannot add files or rewrite the Wall bytes. Afterwards the commit must touch exactly the published paths and each committed blob must equal the blob hash of the sealed bytes (computed in process, never read from the worktree); on any mismatch the child is rolled back (`update-ref` HEAD to the product head plus `read-tree`), nothing is published and a NOT PROVEN note is added. The receipt binds the PRODUCT head (head_sha, tree, diff_sha256 are computed before the child commit). A re-seal binds `HEAD^` only when HEAD's message has the exact trailer line for this run, HEAD touches only paths of this run's `wall.files`, and every blob sha256 matches (`wallChild`); a forged trailer is not enough. `util/seal_drift.ts` accepts a moved HEAD after head_sha as benign only when every commit after it is such a Wall publish commit (linear, trailer line for the receipt's run_id, only `wall.files` paths, blob sha256 equal to the sealed one); any commit after head_sha that carries this run's trailer but fails that check is head drift (UNCHECKED). Later commits without the trailer stay under the TEN-GATES-16 sealed-path overlap rule. The PR body gains an "Acceptance tests" section. Commit stage and `backstopCommit` still drop Wall files. `LOKI_COMMIT_WALL=0` restores the old behavior (nothing published).
|
|
168
186
|
|
|
169
187
|
### Python anthropic SDK (RQ-105: pinned `anthropic==2.6.0`)
|
|
170
188
|
|