loki-mode 11.3.9 → 11.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -18
- package/SKILL.md +3 -3
- package/VERSION +1 -1
- package/agents/custom_agents.py +280 -0
- package/autonomy/council-v2.sh +22 -1
- package/autonomy/edit.sh +242 -0
- package/autonomy/lib/chat.sh +312 -0
- package/autonomy/lib/help-core.sh +164 -0
- package/autonomy/lib/json-output.sh +38 -0
- package/autonomy/lib/run-summary.sh +96 -0
- package/autonomy/loki +105 -10
- package/autonomy/route.sh +270 -0
- package/autonomy/run.sh +6 -0
- package/autonomy/setup-wizard.sh +161 -0
- package/autonomy/verify.sh +22 -2
- package/bin/loki +73 -18
- package/completions/_loki +55 -0
- package/completions/loki.bash +49 -3
- package/dashboard/__init__.py +1 -1
- package/docs/CLI-CORE-VERBS.md +112 -0
- package/docs/CLI-REFERENCE.md +7 -1
- package/docs/COMPARE-OPENCODE.md +94 -0
- package/docs/COMPONENTS.md +1 -0
- package/docs/INSTALLATION.md +56 -12
- package/docs/KNOWN-ISSUES.md +2 -12
- package/docs/QUICKSTART.md +108 -0
- package/docs/environment-variables.md +9 -2
- package/docs/exit-codes.md +29 -12
- package/docs/v10/CLI-MODERN.md +10 -4
- package/docs/v10/GUIDE.md +270 -44
- package/docs/v10/OPENCODE-PARITY-PLAN.md +84 -0
- package/loki-ts/dist/loki.js +968 -933
- package/mcp/__init__.py +1 -1
- package/package.json +2 -2
- package/packages/control-plane/dist/server.js +180 -80
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/providers/claude.sh +16 -2
- package/providers/model_route_exec.sh +22 -0
- package/providers/model_routes.sh +188 -0
- package/skills/providers.md +13 -0
- package/templates/agents/planner.md +10 -0
- package/templates/agents/reviewer.md +10 -0
- package/templates/agents/tester.md +10 -0
- package/web-app/dist/assets/{AdminPage-QK-i_x-O.js → AdminPage-CYJ2BWRC.js} +1 -1
- package/web-app/dist/assets/{Avatar-DblkLNjB.js → Avatar-DdK4wynI.js} +1 -1
- package/web-app/dist/assets/{Badge-DIV2ny5H.js → Badge-CrX3MI7J.js} +1 -1
- package/web-app/dist/assets/{Button--rePJOlQ.js → Button-709-wwGM.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-BZlKxpGy.js → CockpitPage-BapdTInO.js} +1 -1
- package/web-app/dist/assets/{ComparePage-3_INSVux.js → ComparePage-DT99pGvA.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-DHG63CNr.js → ErrorBoundary-B0uJSys8.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-DFsBnLlO.js → EvidenceReceiptPanel-BtMFgElP.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-phPGah98.js → GitHubIssuesPanel-DjJuU941.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-T7KQqJmx.js → GitHubPRsPanel-HXfEX1BC.js} +1 -1
- package/web-app/dist/assets/{HomePage-DFjGUF5I.js → HomePage-Cqyves-S.js} +2 -2
- package/web-app/dist/assets/{LoginPage-CorUid_5.js → LoginPage-jUbtC7_Y.js} +1 -1
- package/web-app/dist/assets/{MagicPage-DofbSxKD.js → MagicPage-DHRsqjgR.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-qzrhhfLC.js → MetricsPage-B-pED05R.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-BAZR0mMb.js → NotFoundPage-CsbUs21R.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-BOSUzG9J.js → ProjectPage-BtlLEQwB.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-Ba0YLtzD.js → ProjectsPage-DaRbRjSp.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-Cr10Ue2K.js → SettingsPage-DALrtP3F.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-Czn655fe.js → ShowcasePage-CoPHSNP0.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-Dwjnw6Ob.js → SystemSettingsPage-kOuSN50O.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-D8nc69Be.js → TeamsPage-DGWK0LMp.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-DHsaCDGv.js → TemplatesPage-C-_10CwA.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-DBejni2a.js → TerminalOutput-Cz_vPbXL.js} +1 -1
- package/web-app/dist/assets/{activity-B2VsBl1C.js → activity-icIsXJVa.js} +1 -1
- package/web-app/dist/assets/{bell-CT77Fq2H.js → bell-DbPR2_4r.js} +1 -1
- package/web-app/dist/assets/{bot-DfaWgF4H.js → bot-DvjP3Yh5.js} +1 -1
- package/web-app/dist/assets/{check-D1yp7Ndv.js → check-D1OBxHeU.js} +1 -1
- package/web-app/dist/assets/{chevron-left-B6Pa8IOX.js → chevron-left-D09jDZ29.js} +1 -1
- package/web-app/dist/assets/{circle-alert-D5jrL_Y7.js → circle-alert-DyZMLOcC.js} +1 -1
- package/web-app/dist/assets/{clock-DIsY_fa_.js → clock-CdpdJTId.js} +1 -1
- package/web-app/dist/assets/{cloud-eGwLh1As.js → cloud-CoLTlmoj.js} +1 -1
- package/web-app/dist/assets/{code-xml-CGDIcZ3m.js → code-xml-DrkE2ZZY.js} +1 -1
- package/web-app/dist/assets/{database-CWpdaykI.js → database-CMQQuM2R.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-DZEuTCs6.js → dollar-sign-CuioDaOG.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-BHBW6m9v.js → file-code-corner-Cx9j9K1S.js} +1 -1
- package/web-app/dist/assets/{file-plus-D4h1jZSR.js → file-plus-CYD2zaaI.js} +1 -1
- package/web-app/dist/assets/{globe-CXdqKgwd.js → globe-6w-hnQkL.js} +1 -1
- package/web-app/dist/assets/{hammer-B3YuuYI_.js → hammer-BpqtautL.js} +1 -1
- package/web-app/dist/assets/{index-BLEnboSv.js → index-Dzs-9EgJ.js} +3 -3
- package/web-app/dist/assets/{layers-Dvp5nFtw.js → layers-D5hd7jb7.js} +1 -1
- package/web-app/dist/assets/{loader-circle-DodDmIZ3.js → loader-circle-C6Y9x_7H.js} +1 -1
- package/web-app/dist/assets/{lock-EiuaH1Ep.js → lock-D51L7rYh.js} +1 -1
- package/web-app/dist/assets/{package-Cx4m2hFg.js → package-BJF8hkP8.js} +1 -1
- package/web-app/dist/assets/{plus-D-Sd5rpH.js → plus-D5kUQ79n.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-C0w1cdmF.js → refresh-cw-BKdlCa7F.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-C_qk6MTT.js → rotate-ccw-_bd_YI1e.js} +1 -1
- package/web-app/dist/assets/{scroll-text-DSxiFtkc.js → scroll-text-DbkegIxF.js} +1 -1
- package/web-app/dist/assets/{server-NTJt7I8M.js → server-DAwqFIsq.js} +1 -1
- package/web-app/dist/assets/{shield-alert-HBxMQOvH.js → shield-alert-BuR1tPHu.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-DEgsHzSD.js → thumbs-up-BF6p3mRd.js} +1 -1
- package/web-app/dist/assets/{trash-2-px46FnTD.js → trash-2-BVpnkqqz.js} +1 -1
- package/web-app/dist/assets/{trending-down-CBosVGKa.js → trending-down-DpsDvRwW.js} +1 -1
- package/web-app/dist/assets/{trending-up-Dbd7zrQj.js → trending-up-mFogTjt3.js} +1 -1
- package/web-app/dist/assets/{upload-nhdFKAs1.js → upload-4T8zpBsi.js} +1 -1
- package/web-app/dist/assets/{usePolling-BgaGdinh.js → usePolling-DPXQv8WO.js} +1 -1
- package/web-app/dist/assets/{user-CzIihUy9.js → user-BYGIFaTm.js} +1 -1
- package/web-app/dist/index.html +1 -1
|
@@ -23,7 +23,7 @@ with nowhere to look them up.
|
|
|
23
23
|
|---|---|---|
|
|
24
24
|
| `LOKI_PRD_FILE` | none | Path to a spec file, as an alternative to the positional argument. |
|
|
25
25
|
| `LOKI_MAX_ITERATIONS` | `1000` | Hard cap on iterations. Reaching it is a deterministic terminal failure, not a success. Also in `config schema`. |
|
|
26
|
-
| `LOKI_BUDGET_LIMIT` | `100.00` | Spend cap in USD. Breaching it **pauses** the run (writes `.loki/PAUSE` and saves state); it never kills work or discards a deliverable. Remove `.loki/PAUSE` to resume, or raise the cap. Set to `""` for no cap. A warning is logged at 80%. |
|
|
26
|
+
| `LOKI_BUDGET_LIMIT` | `100.00` | Spend cap in USD on the previous loop (the Loki 10 engine uses `--max-cost`, `budgets.per_run` or a default of $100 only when `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` is set; none on a subscription). Also enforced by kill on codex, cline, aider and opencode in the Loki 10 engine. Breaching it **pauses** the run (writes `.loki/PAUSE` and saves state); it never kills work or discards a deliverable. Remove `.loki/PAUSE` to resume, or raise the cap. Set to `""` for no cap. A warning is logged at 80%. |
|
|
27
27
|
| `LOKI_MAX_DURATION` | unset (no cap) | Wall-clock cap in seconds. Stops cleanly at the next iteration boundary with a `max_duration_reached` terminal status. `loki start --max-duration` also accepts `90m` / `2h`. |
|
|
28
28
|
| `LOKI_AUTO_CONFIRM` | unset | `true`/`false` to control prompts. Takes precedence over `CI`. |
|
|
29
29
|
| `LOKI_CONFIG_DUMP` | `0` | `1` prints the resolved configuration and exits **without starting a run or spending anything**. |
|
|
@@ -40,7 +40,14 @@ interact and why hitting one is a failure rather than a success.
|
|
|
40
40
|
| `LOKI_PROVIDER` | `claude` | `claude`, `cline`, `codex`, `aider`, or `opencode`. |
|
|
41
41
|
| `LOKI_SESSION_MODEL` | `medium` | The capability tier for the run: `small`, `medium`, or `high`. See below. |
|
|
42
42
|
| `LOKI_MAX_TIER` | unlimited | Caps model tier, so a run cannot escalate past what you are willing to pay for. |
|
|
43
|
-
| `LOKI_MODEL_OVERRIDE` | unset | Overrides the resolved model outright. |
|
|
43
|
+
| `LOKI_MODEL_OVERRIDE` | unset | Overrides the resolved model outright. A route spec (`ollama/<id>`) works too. |
|
|
44
|
+
| `LOKI_MODEL_ROUTE` | unset | `<kind>/<id>` with kind `openrouter`, `ollama`, `lmstudio`, `llamacpp`, `vllm` or `custom`. Routes the Claude harness to that endpoint; `loki models` lists them, `loki models --local` discovers local runtimes. |
|
|
45
|
+
| `LOKI_MODEL_BASE_URL` | unset | Base URL for a `custom/<id>` route (required for `custom`). |
|
|
46
|
+
| `LOKI_MODEL_API_KEY` | unset | Token for a `custom/<id>` route (optional). OpenRouter reads `OPENROUTER_API_KEY`. |
|
|
47
|
+
| `LOKI_OPENCODE_MODEL` | unset | `provider/model` id passed to opencode (for example `openrouter/deepseek/deepseek-v3.2`). Also `LOKI_OPENCODE_FLAGS` and `LOKI_OPENCODE_CLI`. |
|
|
48
|
+
| `LOKI_EDIT_MODEL` | unset | Model for `loki edit`. |
|
|
49
|
+
| `LOKI_ENGINE` | unset | `legacy` forces the previous loop; the `--engine` flag wins over it. |
|
|
50
|
+
| `LOKI_SUMMARY_JSON` | unset | `1` prints the end-of-run summary as one JSON line on the previous loop. |
|
|
44
51
|
| `LOKI_TIER` | `oss` | **Not a model setting.** The open-core licensing seam. Leave it unset. |
|
|
45
52
|
| `LOKI_ALLOW_CLAUDE_SIDECALLS` | unset | `1` (exactly) lets PRD enrichment, done recognition, the council voters, the USAGE.md refresh and the quickstart intent check prompt the `claude` CLI under a non-claude provider; `loki doctor --airgap` then reports that as required egress to Anthropic. |
|
|
46
53
|
|
package/docs/exit-codes.md
CHANGED
|
@@ -22,7 +22,10 @@ is the part most likely to surprise a script author.
|
|
|
22
22
|
| 0 | The run completed |
|
|
23
23
|
| nonzero | Something went wrong |
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Usage errors are distinct from run outcomes: `loki start` with an unknown
|
|
26
|
+
option exits 64, and `loki quick` with no task description exits 64 (they were
|
|
27
|
+
1 and 2). A missing provider CLI still exits 2 before any spend. There is no
|
|
28
|
+
finer run-outcome signal. A gate that needs to tell "failed the quality gate"
|
|
26
29
|
from "crashed" must opt into the durable contract below.
|
|
27
30
|
|
|
28
31
|
### With `LOKI_DURABLE_STATE=1` (the platform contract)
|
|
@@ -56,6 +59,7 @@ identically; a parity test asserts they agree status for status.
|
|
|
56
59
|
|---|---|
|
|
57
60
|
| 0 | The run completed and its diff did not weaken the tests |
|
|
58
61
|
| 3 | The diff weakened the tests (a skip marker added in a test file, a test runner config changed, or an existing test file deleted or renamed). The receipt headline is NOT VERIFIED and names what was weakened, for example `NOT VERIFIED (tests weakened: skip added in sum.test.js)` |
|
|
62
|
+
| 64 | Usage error: no task description |
|
|
59
63
|
| other nonzero | The run itself failed; this code is passed through unchanged |
|
|
60
64
|
|
|
61
65
|
`loki quick` has no `--json` flag; its structured result is `loki why --json`, schema: `schemas/why-result.schema.json` (`state.lastExitCode` carries the ladder above).
|
|
@@ -72,8 +76,9 @@ headline caused by unproven gates alone also keeps exit 0. The signal is the
|
|
|
72
76
|
|---|---|
|
|
73
77
|
| 0 | VERIFIED |
|
|
74
78
|
| 1 | CONCERNS (findings below the block threshold, or inconclusive evidence) |
|
|
75
|
-
| 2 | BLOCKED (findings at or above the block threshold) |
|
|
76
|
-
| 3 | Verifier error: it could not complete, and never silently passes |
|
|
79
|
+
| 2 | BLOCKED (findings at or above the block threshold), or not a git directory |
|
|
80
|
+
| 3 | Verifier error: it could not complete, and never silently passes (also an empty diff) |
|
|
81
|
+
| 64 | Usage error: unknown option or unexpected argument |
|
|
77
82
|
|
|
78
83
|
`loki verify` has no `--json` flag. `loki status --json` schema: `schemas/status-result.schema.json`.
|
|
79
84
|
|
|
@@ -142,19 +147,21 @@ An early draft spec listed `1=BLOCKED, 2=CONCERNS`. That ordering was rejected:
|
|
|
142
147
|
it is not used anywhere, it has no consumers, and it inverts the
|
|
143
148
|
severity-rises-with-the-code rule that every other command follows.
|
|
144
149
|
|
|
145
|
-
###
|
|
150
|
+
### Contract enforced from v11.4.0
|
|
146
151
|
|
|
147
|
-
|
|
148
|
-
return
|
|
152
|
+
This is a deliberate contract change for the 11.4.0 minor release. Three inputs
|
|
153
|
+
that used to return a misleading code now return the table's value:
|
|
149
154
|
|
|
150
|
-
| Input | Command | Exit
|
|
155
|
+
| Input | Command | Exit | Note |
|
|
151
156
|
|---|---|---|---|
|
|
152
|
-
| Empty diff (a
|
|
153
|
-
| Not a git directory | `loki verify` |
|
|
154
|
-
| Unknown
|
|
157
|
+
| Empty diff (a repo with no changes vs base) | `loki verify` | 3 | Nothing to check is a verifier error, never a pass. VERDICT line still reads CONCERNS. |
|
|
158
|
+
| Not a git directory | `loki verify` | 2 | Could not check. VERDICT line still reads CONCERNS. |
|
|
159
|
+
| Unknown option or unexpected argument | `loki verify --no-such-flag` | 64 | Usage error, as in `proof verify`. |
|
|
155
160
|
|
|
156
|
-
|
|
157
|
-
|
|
161
|
+
A real finding keeps precedence: an empty diff that also carries a below-threshold
|
|
162
|
+
finding (for example spec drift) still exits 1, and a blocking finding still exits 2.
|
|
163
|
+
CI gates that tested `[ $rc -eq 1 ]` for these inputs must move to `[ $rc -ne 0 ]`.
|
|
164
|
+
The moat case `P2.verify-exit-contract` is no longer pending and is enforced.
|
|
158
165
|
|
|
159
166
|
### `loki verify --fast`
|
|
160
167
|
|
|
@@ -346,3 +353,13 @@ esac
|
|
|
346
353
|
Do not read an exit code through a pipe. `$?` after a pipeline reports the last
|
|
347
354
|
stage, so `loki verify | tee log` gives you `tee`'s status and always looks
|
|
348
355
|
successful. Use `${PIPESTATUS[0]}` in bash, or capture first and test after.
|
|
356
|
+
|
|
357
|
+
## `loki edit`
|
|
358
|
+
|
|
359
|
+
One provider pass, no loop.
|
|
360
|
+
|
|
361
|
+
| Code | Meaning |
|
|
362
|
+
|---|---|
|
|
363
|
+
| 0 | Edit done (or nothing to change, or `--dry-run` plan printed) |
|
|
364
|
+
| 1 | Provider pass failed, or `--verify` failed (nothing is committed) |
|
|
365
|
+
| 2 | Usage or setup error (no change text, not a git repo, claude or python3 missing, unsupported provider) |
|
package/docs/v10/CLI-MODERN.md
CHANGED
|
@@ -6,12 +6,12 @@ Classes: KEEP-MODERN (v10-native or engine-neutral), UPDATE (live but needs mode
|
|
|
6
6
|
|
|
7
7
|
## Counts
|
|
8
8
|
|
|
9
|
-
- KEEP-MODERN:
|
|
9
|
+
- KEEP-MODERN: 69
|
|
10
10
|
- UPDATE: 22
|
|
11
|
-
- DROP-LEGACY:
|
|
11
|
+
- DROP-LEGACY: 32
|
|
12
12
|
- DELETE: 14
|
|
13
|
-
- Total rows:
|
|
14
|
-
- Registry paths (commands and nested subcommands):
|
|
13
|
+
- Total rows: 137
|
|
14
|
+
- Registry paths (commands and nested subcommands): 188
|
|
15
15
|
|
|
16
16
|
## Commands
|
|
17
17
|
|
|
@@ -45,6 +45,11 @@ Classes: KEEP-MODERN (v10-native or engine-neutral), UPDATE (live but needs mode
|
|
|
45
45
|
| completion (hidden) | loki-ts/src/cli.ts | KEEP-MODERN | Hidden plumbing; completions install themselves |
|
|
46
46
|
| __complete (hidden) | loki-ts/src/cli.ts | KEEP-MODERN | Hidden plumbing for generated completions |
|
|
47
47
|
| help | autonomy/loki | KEEP-MODERN | Core |
|
|
48
|
+
| chat | autonomy/loki | KEEP-MODERN | Provider-neutral conversational verb |
|
|
49
|
+
| edit | autonomy/loki | KEEP-MODERN | Provider-neutral single-edit verb |
|
|
50
|
+
| diff | autonomy/loki | KEEP-MODERN | Passes extra args to git diff |
|
|
51
|
+
| models | autonomy/loki | KEEP-MODERN | Provider-neutral model tiers |
|
|
52
|
+
| setup | autonomy/loki | KEEP-MODERN | Onboarding gate |
|
|
48
53
|
| quick | autonomy/loki | UPDATE | Routes to the v10 lean path by default |
|
|
49
54
|
| quickstart | autonomy/loki | KEEP-MODERN | Onboarding path |
|
|
50
55
|
| init | autonomy/loki | UPDATE | Templates predate v10 |
|
|
@@ -129,6 +134,7 @@ Classes: KEEP-MODERN (v10-native or engine-neutral), UPDATE (live but needs mode
|
|
|
129
134
|
| cleanup | autonomy/loki | DROP-LEGACY | Legacy run.sh orphans |
|
|
130
135
|
| state | autonomy/loki | DROP-LEGACY | Legacy engine |
|
|
131
136
|
| agent | autonomy/loki | DROP-LEGACY | Legacy engine |
|
|
137
|
+
| agents | autonomy/loki | DROP-LEGACY | Legacy engine |
|
|
132
138
|
| trigger | autonomy/loki | DROP-LEGACY | Legacy engine |
|
|
133
139
|
| failover | autonomy/loki | DROP-LEGACY | Legacy engine |
|
|
134
140
|
| reset | autonomy/loki | DROP-LEGACY | Legacy engine |
|
package/docs/v10/GUIDE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Loki 10 engine guide
|
|
2
2
|
|
|
3
|
-
Default: Loki 10 engine for `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"`. `loki legacy`
|
|
3
|
+
Default: Loki 10 engine for `loki start`, `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"`. `loki legacy` was removed in 11.0.0; the previous loop runs only on an explicit `--engine legacy` or `LOKI_ENGINE=legacy` (see Routing). <!-- loki10-default -->
|
|
4
4
|
|
|
5
5
|
Loki 10 is the rewritten engine (docs/v10/ENGINE.md). Since the D48 flip it
|
|
6
6
|
runs `loki "<task>"`, `loki owner/repo#N` (issue mode) and `loki quick
|
|
@@ -12,29 +12,77 @@ newest entry in .loki/runs/ is a v10 run newer than the newest legacy proof
|
|
|
12
12
|
it runs the v10 verify, otherwise the legacy verify. If bun is missing or
|
|
13
13
|
LOKI_PROVIDER is unsupported, the default mode falls back to the bash path
|
|
14
14
|
and prints one stderr line saying why. In 11.0.0 (LEGACY-ZERO W1-01) `loki
|
|
15
|
-
legacy` was removed (it exits 2 with a removal message)
|
|
16
|
-
|
|
15
|
+
legacy` was removed (it exits 2 with a removal message). From 11.4.0
|
|
16
|
+
`--engine legacy|engine10` and LOKI_ENGINE select the engine explicitly (see
|
|
17
|
+
Routing below).
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
## Routing
|
|
20
|
+
|
|
21
|
+
Argument order and input form never change the engine. Flags are normalized
|
|
22
|
+
before the routing decision, so these all run on Loki 10:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
loki start prd.md loki start --no-pr prd.md
|
|
26
|
+
loki start owner/repo#123 loki start --provider codex owner/repo#123
|
|
27
|
+
loki start "fix the login bug" loki start --no-pr "fix the login bug"
|
|
28
|
+
loki start fixit loki quick -v "fix the login bug"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
A PRD file, an issue ref or URL, a multi-word task and a one-word brief take
|
|
32
|
+
the same path. `-v` means `--verbose`, `--budget` and `--budget-limit` mean
|
|
33
|
+
`--max-cost`, and `--yes`, `-y`, `--no-plan`, `--no-mirofish` and
|
|
34
|
+
`--no-dashboard` are accepted and ignored. A PRD file path that does not exist
|
|
35
|
+
exits 2 with "PRD file not found".
|
|
36
|
+
|
|
37
|
+
The previous loop (autonomy/run.sh) runs only when:
|
|
38
|
+
|
|
39
|
+
1. you pass `--engine legacy` or set `LOKI_ENGINE=legacy` (`--engine engine10`
|
|
40
|
+
forces Loki 10 and refuses a flag it cannot honor; the flag wins over the
|
|
41
|
+
variable), or
|
|
42
|
+
2. the call carries a flag Loki 10 does not support (for example `--simple`,
|
|
43
|
+
`--complex`, `--parallel`, `--github`, `--sandbox`, `--max-iterations`).
|
|
44
|
+
Only that call goes to the previous loop, and one stderr line names the flag
|
|
45
|
+
and the engine chosen, or
|
|
46
|
+
3. LOKI_PROVIDER (or `--provider`) names a provider Loki 10 has no invoker
|
|
47
|
+
for (anything but claude, codex, cline, aider, opencode), or bun is missing, or the
|
|
48
|
+
PRD is larger than 100000 bytes. One stderr line says why.
|
|
49
|
+
|
|
50
|
+
`loki <word>` with a single bare word stays the command namespace (`loki doctor`),
|
|
51
|
+
so use `loki start <word>` for a one-word brief. A first argument starting with
|
|
52
|
+
`-` followed by a multi-word task or an issue ref (`loki --no-pr "fix it now"`)
|
|
53
|
+
runs on Loki 10 like the positional form.
|
|
54
|
+
|
|
55
|
+
### See the route without running
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
loki route start prd.md
|
|
59
|
+
loki route quick "fix the login redirect loop" --json
|
|
60
|
+
loki start --simple prd.md --explain-route
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`loki route [start|quick] <same args>` and `--explain-route` on start or quick
|
|
64
|
+
print the engine, provider, model, input type and the reason, then exit 0
|
|
65
|
+
without running anything. `--json` prints one JSON object with the keys
|
|
66
|
+
`engine`, `provider`, `model`, `input_type`, `input`, `reason`.
|
|
24
67
|
|
|
25
68
|
Some pieces named in this guide are still being built. Each one below says
|
|
26
69
|
so plainly instead of describing a finished feature.
|
|
27
70
|
|
|
28
71
|
## Quickstart
|
|
29
72
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
73
|
+
`loki start` is the primary path. Give it a PRD file, an issue ref, a task in
|
|
74
|
+
quotes or a one-word brief. Flags may come before or after it; the engine is
|
|
75
|
+
the same (see Routing).
|
|
33
76
|
|
|
34
77
|
```
|
|
35
|
-
loki
|
|
78
|
+
loki start prd.md
|
|
79
|
+
loki start "fix the login redirect loop" --no-pr
|
|
36
80
|
```
|
|
37
81
|
|
|
82
|
+
`loki "<task>"` and `loki owner/repo#N` are shorthand for the same run.
|
|
83
|
+
`loki chat` is an interactive alternative that can start and join these runs
|
|
84
|
+
(see Chat below).
|
|
85
|
+
|
|
38
86
|
`loki quick "<task>"` is the small-task entry. It runs the same engine
|
|
39
87
|
without opening a pull request (the legacy quick never opened one), and the
|
|
40
88
|
engine's own sizing picks the lean path for a small task: Plan and Wall are
|
|
@@ -42,16 +90,16 @@ skipped and implement runs on your run's own model, like a raw session.
|
|
|
42
90
|
`LOKI_E10_CASCADE=1` opts in to the cheaper sonnet start (it prints and
|
|
43
91
|
records the downgrade); a repeated test failure always escalates up, never
|
|
44
92
|
down (Engine Law L1).
|
|
45
|
-
`loki quick --help`
|
|
46
|
-
|
|
93
|
+
`loki quick --help` prints the help; `loki quick -v "<task>"` runs on Loki 10 with
|
|
94
|
+
`--verbose`.
|
|
47
95
|
|
|
48
96
|
```
|
|
49
97
|
loki quick "fix the login redirect loop"
|
|
50
98
|
```
|
|
51
99
|
|
|
52
100
|
If bun is not installed, or LOKI_PROVIDER names a provider the v10 engine
|
|
53
|
-
has no invoker for (anything but claude, codex, cline, aider), these entry
|
|
54
|
-
points fall back to the legacy engine instead of failing.
|
|
101
|
+
has no invoker for (anything but claude, codex, cline, aider, opencode), these entry
|
|
102
|
+
points fall back to the legacy engine with a one-line notice instead of failing.
|
|
55
103
|
|
|
56
104
|
Issue refs work the same way:
|
|
57
105
|
|
|
@@ -74,14 +122,19 @@ Flags, from the engine's own `--help`:
|
|
|
74
122
|
from 480s to 1800s (`loki-ts/src/engine10/types.ts`).
|
|
75
123
|
- `--provider <name>`: pick the coding provider for this run. See the
|
|
76
124
|
provider table below.
|
|
77
|
-
- `--max-cost <usd>`: per-run cost cap in dollars
|
|
78
|
-
`
|
|
79
|
-
`budgets
|
|
80
|
-
the
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
125
|
+
- `--max-cost <usd>`: per-run cost cap in dollars (`--budget` and
|
|
126
|
+
`--budget-limit` are aliases). Order of precedence: the flag, then
|
|
127
|
+
`budgets.per_run` in the repo's `loki.yaml` (for example `budgets:` then
|
|
128
|
+
` per_run: 5`), then the default. The default is $100.00 when
|
|
129
|
+
`ANTHROPIC_API_KEY` or `OPENAI_API_KEY` is set, and no dollar cap on a
|
|
130
|
+
subscription login (usage then counts against your plan limits). Source:
|
|
131
|
+
`loki-ts/src/e10ext/budget_cap.ts`. The start line shows the cap in force,
|
|
132
|
+
for example `cap $100.00 (default)` or `no dollar cap (subscription)`. Once
|
|
133
|
+
priced cost reaches the cap the running stage is stopped, no later stage
|
|
134
|
+
starts, and the run ends BUDGET_STOP with exit code 3. Sessions with no
|
|
135
|
+
provider price never count toward the cap. On the previous loop the same cap
|
|
136
|
+
is `LOKI_BUDGET_LIMIT` (default 100.00 USD; set it to an empty string for
|
|
137
|
+
unlimited), and a breach pauses the run instead of killing it.
|
|
85
138
|
|
|
86
139
|
`--no-pr`, `--deep` and `--provider` are parsed by the supervisor
|
|
87
140
|
(`loki-ts/src/engine10/supervisor.ts`) and take effect on a real run.
|
|
@@ -99,9 +152,117 @@ verify, seal) and then, in the supervisor, the pr stage, ending in the
|
|
|
99
152
|
Slack is not part of the v10 engine surface (no command, no notification
|
|
100
153
|
hook) and is in progress, tracked with the other wave 3 items.
|
|
101
154
|
|
|
155
|
+
## Small changes: loki edit
|
|
156
|
+
|
|
157
|
+
`loki edit` is the lightest path: one Claude pass on the current repo with no
|
|
158
|
+
PRD, plan, council, PR, receipt or branch switch. It prints the diff stat, the
|
|
159
|
+
diff, and one line with cost and elapsed time.
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
loki edit "rename fooBar to foo_bar"
|
|
163
|
+
loki edit src/foo.ts "rename X to Y"
|
|
164
|
+
loki edit --verify --commit src/a.ts "add null checks"
|
|
165
|
+
loki edit --dry-run "describe the change"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
- `--verify` runs the fast verifier on the result.
|
|
169
|
+
- `--receipt` writes an unsigned receipt to `.loki/edit-receipts/`.
|
|
170
|
+
- `--commit` commits only the files the pass touched, by name; skipped when
|
|
171
|
+
verify failed.
|
|
172
|
+
- `--dry-run` plans only (plan permission mode); nothing changes.
|
|
173
|
+
- `LOKI_EDIT_MODEL` overrides the model. Claude provider only for now.
|
|
174
|
+
|
|
175
|
+
Use `loki edit` for a single pass, `loki quick "<task>"` for a small task with
|
|
176
|
+
a verify loop, and `loki start` for anything that needs a plan, verification
|
|
177
|
+
and a sealed receipt. Exit codes: 0 done, 1 provider or verify failure, 2
|
|
178
|
+
usage or setup error ([exit-codes.md](../exit-codes.md)).
|
|
179
|
+
|
|
180
|
+
## Custom agents
|
|
181
|
+
|
|
182
|
+
Define child agents as markdown with YAML frontmatter in `.loki/agents/<name>.md`
|
|
183
|
+
(project) or `~/.config/loki/agents/<name>.md` (user). A project agent wins
|
|
184
|
+
over a user agent of the same name. The body is the system prompt.
|
|
185
|
+
|
|
186
|
+
Frontmatter keys: `name` (must equal the file name without `.md`),
|
|
187
|
+
`description` (required), `model`, `provider` (`claude` by default; `codex`,
|
|
188
|
+
`cline`, `aider` or `opencode`), `tools` (allow list), `deny` (deny list) and
|
|
189
|
+
`permission` (`plan` default, `edit` or `full`).
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
loki agents list
|
|
193
|
+
loki agents new reviewer # reviewer, planner and tester copy shipped examples
|
|
194
|
+
loki agents show reviewer
|
|
195
|
+
loki agents export --claude # writes .claude/agents/ (add --user for ~/.claude/agents)
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
`permission: plan` exports as Claude Code `disallowedTools` Edit, Write,
|
|
199
|
+
NotebookEdit and Bash. Council reviewers pick up a matching agent: one named
|
|
200
|
+
`reviewer`, `tester` or `security` replaces the council-v2 reviewer prompt and
|
|
201
|
+
model for the matching roles (`code_quality_reviewer` and
|
|
202
|
+
`requirements_verifier` use `reviewer`; `test_auditor` uses `tester`;
|
|
203
|
+
`devils_advocate` uses `security`, then `reviewer`). With no agents configured
|
|
204
|
+
nothing changes. `loki agent` (singular) is the unchanged built-in agent-type
|
|
205
|
+
command.
|
|
206
|
+
|
|
207
|
+
## Chat (interactive alternative)
|
|
208
|
+
|
|
209
|
+
`loki start` stays the primary path. `loki chat` is an interactive session for
|
|
210
|
+
exploring and small steps, and it hands off to and from `loki start`.
|
|
211
|
+
|
|
212
|
+
- Start with `loki chat` (needs a TTY; for one-shot tasks use `loki quick`).
|
|
213
|
+
Bare `loki` does not open chat.
|
|
214
|
+
- The session starts in Plan mode (read-only); `/plan` and `/build` switch
|
|
215
|
+
modes and the prompt shows `loki[plan]>` or `loki[build]>`. Plan mode is
|
|
216
|
+
enforced for Claude (`--permission-mode plan`); other providers get a
|
|
217
|
+
prompt-level read-only instruction.
|
|
218
|
+
- Slash commands: `/plan`, `/build`, `/run <prd|brief>`, `/quick <task>`,
|
|
219
|
+
`/edit <change>`, `/verify`, `/receipt`, `/cost`, `/diff`, `/undo`,
|
|
220
|
+
`/model <id>`, `/provider <name>`, `/help`, `/exit`.
|
|
221
|
+
- `/run` starts a normal `loki start` run with the chat's model and provider.
|
|
222
|
+
- `loki chat --attach` joins a running or the last `loki start` session, with
|
|
223
|
+
`/status`, `/steer`, `/diff`, `/verify`, `/receipt` and `/stop`.
|
|
224
|
+
- `loki chat --tui` launches the full Claude Code TUI with the Loki system
|
|
225
|
+
prompt appended.
|
|
226
|
+
|
|
227
|
+
## Setup, doctor and config
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
loki setup # wizard: tools, Claude login, provider, model route, spend cap
|
|
231
|
+
loki setup --yes # non-interactive defaults
|
|
232
|
+
loki setup --check # report only
|
|
233
|
+
loki doctor --fix # create state dirs and a default config; prints exact commands for the rest
|
|
234
|
+
loki config list # also: get <key>, set <key> <value>, path
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
`loki setup` flags: `--provider claude|codex|cline|aider|opencode`,
|
|
238
|
+
`--model`, `--budget USD` and `--global`. `loki doctor --fix` never installs
|
|
239
|
+
system packages and never runs sudo. Prerequisites are in
|
|
240
|
+
[INSTALLATION.md](../INSTALLATION.md).
|
|
241
|
+
|
|
242
|
+
## Exit codes
|
|
243
|
+
|
|
244
|
+
One contract, enforced from 11.4.0 (details in [exit-codes.md](../exit-codes.md)).
|
|
245
|
+
`loki verify` exits 0 VERIFIED, 1 CONCERNS, 2 BLOCKED or not a git directory,
|
|
246
|
+
3 verifier error or empty diff, 64 usage error. Usage errors from `loki quick`
|
|
247
|
+
and `loki start` are also 64. CI gates should use `loki verify || fail`, not
|
|
248
|
+
`[ $rc -eq 1 ]`, and treat any code of 2 or higher as worse than CONCERNS. This
|
|
249
|
+
is a breaking change for scripts that tested rc==1 on an empty diff or a
|
|
250
|
+
non-git directory.
|
|
251
|
+
|
|
102
252
|
## The summary
|
|
103
253
|
|
|
104
|
-
|
|
254
|
+
Every run on both engines also ends with one unified block: `Result:`
|
|
255
|
+
(verified, done-unverified, failed or stopped), `Files:` (N changed, +ins
|
|
256
|
+
-del), `Cost:` (`$X.XX`, marked `(estimated)` when not provider-reported,
|
|
257
|
+
`not measured` when unknown), `Elapsed:`, `Receipt:` (path, when one exists)
|
|
258
|
+
and one `next:` line naming the suggested command (`loki diff`, `loki verify`,
|
|
259
|
+
`loki undo`, `loki status`, `loki doctor`, or `loki chat --attach`). Pass
|
|
260
|
+
`--quiet` to print only this block and `--json` to add a `summary` object to
|
|
261
|
+
the JSON output. `NO_COLOR=1` disables color, which is also off when stdout is
|
|
262
|
+
not a TTY. On the previous loop, `LOKI_SUMMARY_JSON=1` prints the summary as
|
|
263
|
+
one JSON line, and its cost is always an estimate from the context tracker.
|
|
264
|
+
|
|
265
|
+
A finished engine10 run prints the start line, then one label per line (Outcome,
|
|
105
266
|
PR, Receipt, NOT PROVEN, Cost, Time; a Reason line is added for any
|
|
106
267
|
outcome other than VERIFIED or ALREADY_SATISFIED). The quiet default stays
|
|
107
268
|
within 8 lines. The block below is the older 5-line form; the labels are the
|
|
@@ -221,18 +382,82 @@ receipt with no signing key configured (or a key that failed to load) reads
|
|
|
221
382
|
|
|
222
383
|
## Provider table
|
|
223
384
|
|
|
224
|
-
| Provider | Cost measured | Kill blocking enforced |
|
|
225
|
-
|
|
226
|
-
| claude | yes
|
|
227
|
-
| codex |
|
|
228
|
-
| cline |
|
|
229
|
-
| aider |
|
|
230
|
-
| opencode | not
|
|
385
|
+
| Provider | Cost measured | Spend cap enforced | Guardrail scan | Kill blocking enforced |
|
|
386
|
+
|----------|---------------|--------------------|----------------|------------------------|
|
|
387
|
+
| claude | yes (provider-reported) | yes | native | yes |
|
|
388
|
+
| codex | yes (parsed or estimated) | yes | yes | no |
|
|
389
|
+
| cline | yes (parsed or estimated) | yes | yes | no |
|
|
390
|
+
| aider | yes (reported or estimated) | yes | yes | no |
|
|
391
|
+
| opencode | no | no (cost not measured); wall clock limit still applies | yes | no |
|
|
392
|
+
|
|
393
|
+
Claude Code is the default and the only Tier-1 provider; the others are
|
|
394
|
+
optional. Select one with `--provider <name>` or `LOKI_PROVIDER`.
|
|
395
|
+
|
|
396
|
+
### Cost and the spend cap on non-Claude providers
|
|
397
|
+
|
|
398
|
+
For codex, cline and aider, engine10 reads token usage from the CLI output
|
|
399
|
+
(aider's `Cost: $X session` line is used as-is). If the CLI prints no usage,
|
|
400
|
+
cost is estimated from prompt and response sizes (about 4 characters per
|
|
401
|
+
token) with the built-in price table (`loki-ts/src/providers/price_table.ts`).
|
|
402
|
+
A model not in the table prices at a mid-range default of $2 per 1M input
|
|
403
|
+
tokens and $10 per 1M output tokens. Estimated figures carry `estimated: true`
|
|
404
|
+
and `cost_basis` (`provider-tokens` or `size-estimate`) on the `cost` event in
|
|
405
|
+
`events.jsonl`, and the efficiency record has `cost_source: "estimated"`.
|
|
406
|
+
Estimates are approximate. The cap in `--max-cost` applies unchanged. A run
|
|
407
|
+
with no prompt and no output stays `not measured`, never `$0.00`.
|
|
408
|
+
|
|
409
|
+
### Guardrails on non-Claude providers
|
|
410
|
+
|
|
411
|
+
With codex, cline, aider or opencode, engine10 enforces the wall-clock limit
|
|
412
|
+
and `BUDGET_LIMIT` (for example `BUDGET_LIMIT=5 loki start prd.md`) by killing
|
|
413
|
+
the process group. After each iteration it scans the diff and reverts and
|
|
414
|
+
fails the iteration on mass deletion of tracked files, `.git/config` changes,
|
|
415
|
+
new git hooks, and symlinks or paths outside the project (a `guard.violation`
|
|
416
|
+
event). Native flags are used where the CLI has them: codex runs with
|
|
417
|
+
`--sandbox workspace-write`, aider with `--no-auto-commits`. Cline and
|
|
418
|
+
opencode have no sandbox flag. The scan is post-hoc rather than inline, so
|
|
419
|
+
receipts still list `kill blocking not enforced` for these providers.
|
|
420
|
+
|
|
421
|
+
For opencode, a run's Cost line reads `not measured` and the NOT PROVEN line
|
|
422
|
+
adds the literal entry `kill blocking not enforced`
|
|
423
|
+
(`loki-ts/src/engine10/stages/seal.ts`). opencode is a supported
|
|
424
|
+
engine10 provider (`loki-ts/src/runner/provider_opencode.ts`): install it with
|
|
425
|
+
`npm install -g opencode-ai` and select it with `--provider opencode`. It runs
|
|
426
|
+
`opencode run --auto` non-interactively, takes a `provider/model` id from
|
|
427
|
+
`LOKI_OPENCODE_MODEL` (for example `openrouter/deepseek/deepseek-v3.2`; unset
|
|
428
|
+
uses opencode's own default), passes extra flags from `LOKI_OPENCODE_FLAGS`,
|
|
429
|
+
and honors `LOKI_OPENCODE_CLI` for the binary path. `LOKI_HOST_GUARD=1` is
|
|
430
|
+
incompatible with non-Claude providers.
|
|
431
|
+
|
|
432
|
+
### Model routes and local models
|
|
433
|
+
|
|
434
|
+
To run OpenRouter or a local model through the Claude harness, so every
|
|
435
|
+
Tier-1 control (cost, kill blocking, receipts) still applies, set
|
|
436
|
+
`LOKI_MODEL_ROUTE=<kind>/<id>` before `loki start`. Selection is by
|
|
437
|
+
environment variable; `loki start` has no `--model` flag.
|
|
438
|
+
|
|
439
|
+
```
|
|
440
|
+
LOKI_MODEL_ROUTE=ollama/qwen3-coder loki start prd.md
|
|
441
|
+
LOKI_MODEL_ROUTE=openrouter/deepseek/deepseek-v3.2 loki start "fix the login bug"
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
| Kind | Base URL | Token |
|
|
445
|
+
|------|----------|-------|
|
|
446
|
+
| `openrouter/<id>` | https://openrouter.ai/api | `OPENROUTER_API_KEY` |
|
|
447
|
+
| `ollama/<id>` | http://localhost:11434 | none |
|
|
448
|
+
| `lmstudio/<id>` | http://localhost:1234 | none |
|
|
449
|
+
| `llamacpp/<id>` | http://localhost:8080 | none |
|
|
450
|
+
| `vllm/<id>` | http://localhost:8000 | none |
|
|
451
|
+
| `custom/<id>` | `LOKI_MODEL_BASE_URL` (required) | `LOKI_MODEL_API_KEY` (optional) |
|
|
452
|
+
|
|
453
|
+
A route spec in `LOKI_MODEL_OVERRIDE` works too. The route environment
|
|
454
|
+
applies to the Claude child process only; the token is never exported into
|
|
455
|
+
your shell, put on a command line, or logged. Plain Claude ids (`opus`,
|
|
456
|
+
`sonnet`, `claude-*`) behave as before.
|
|
231
457
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
provider names (`claude`, `codex`, `cline`, `aider`); it is not supported.
|
|
458
|
+
`loki models` lists the routes. `loki models --local` probes Ollama, LM
|
|
459
|
+
Studio, llama.cpp and vLLM on their default ports (1s timeout each) and prints
|
|
460
|
+
ready-to-paste values. Both accept `--json`.
|
|
236
461
|
|
|
237
462
|
## Model routing
|
|
238
463
|
|
|
@@ -321,10 +546,11 @@ runs on the B9 corpus, and it can emit shape defaults from those runs
|
|
|
321
546
|
|
|
322
547
|
## After the flip
|
|
323
548
|
|
|
324
|
-
D48 made v10 the default for `loki "<task>"`,
|
|
325
|
-
`loki quick "<task>"`. 11.0.0 removed
|
|
326
|
-
2 with a removal message
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
README.md's Loki 10 section records the
|
|
549
|
+
D48 made v10 the default for `loki start`, `loki "<task>"`,
|
|
550
|
+
`loki owner/repo#N` and `loki quick "<task>"`. 11.0.0 removed `loki legacy`
|
|
551
|
+
(it exits 2 with a removal message). From 11.4.0, `--engine legacy|engine10`
|
|
552
|
+
and `LOKI_ENGINE` select the engine explicitly, and PRD-file starts, flag-first
|
|
553
|
+
calls, one-word briefs and the opencode provider run on Loki 10 (see Routing).
|
|
554
|
+
The previous bash loop runs only in the cases listed under Routing. The marked
|
|
555
|
+
line near the top of this file and of README.md's Loki 10 section records the
|
|
556
|
+
current state.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# v11.4.0 plan: beat opencode by 1-2 points in every category
|
|
2
|
+
|
|
3
|
+
Founder directive (2026-10-15): close every gap an outside assessment found
|
|
4
|
+
against opencode. Keep Loki autonomous. Keep the harness and internals
|
|
5
|
+
(RARV-C, receipts, Seal, council) as they are, and keep Claude Code as the
|
|
6
|
+
primary provider. Ship all of it as one MINOR release, v11.4.0, built in
|
|
7
|
+
parallel. Under the founder's standing waiver nothing is tested.
|
|
8
|
+
|
|
9
|
+
Founder clarification (2026-10-15): `loki start` is always the primary
|
|
10
|
+
path. `loki chat` is an alternative surface. Every improvement in this
|
|
11
|
+
release (model routes, local models, providers, agents, routing, exit codes,
|
|
12
|
+
run summary, onboarding) must work through `loki start` first. Chat must hand
|
|
13
|
+
off to and from `loki start` without friction: `/run` in chat starts the same
|
|
14
|
+
run with the same model, provider and agents, and chat can attach to a
|
|
15
|
+
running or finished `loki start` session (status, steer, diff, verify).
|
|
16
|
+
|
|
17
|
+
## Scorecard target
|
|
18
|
+
|
|
19
|
+
| Category | Was (Loki / opencode) | Target | Slices |
|
|
20
|
+
|---|---|---|---|
|
|
21
|
+
| Everyday user experience | 6 / 8 | 10 | OC-CHAT, OC-OUTPUT |
|
|
22
|
+
| Installation and onboarding | 6 / 8 | 10 | OC-ONBOARD, OC-DOCS |
|
|
23
|
+
| Learning curve | 5 / 8 | 10 | OC-ROUTE, OC-HELP |
|
|
24
|
+
| Interactive coding and exploration | 6 / 9 | 10 | OC-CHAT |
|
|
25
|
+
| Small, targeted changes | 7 / 8 | 10 | OC-EDIT |
|
|
26
|
+
| Model/provider flexibility | 5 / 9 | 10 | OC-MODELS, OC-OPENCODE-E10 |
|
|
27
|
+
| Local-model setup | 5 / 8 | 10 | OC-MODELS |
|
|
28
|
+
| Multi-agent workflow design | 7 / 8 | 10 | OC-AGENTS |
|
|
29
|
+
| Documentation consistency | 4 / 7 | 10 | OC-DOCS |
|
|
30
|
+
| Predictability across commands/upgrades | 5 / 6 | 10 | OC-ROUTE, OC-EXIT, OC-PARITY-COST, OC-PARITY-ENFORCE |
|
|
31
|
+
|
|
32
|
+
## Todo (one slice each, parallel, own branch `slice-OC-<KEY>`)
|
|
33
|
+
|
|
34
|
+
- [x] OC-CHAT: `loki chat` opens an interactive session (the first cut
|
|
35
|
+
also opened it from bare `loki` on a TTY; that was reverted, and bare `loki`
|
|
36
|
+
stays unchanged). Plan mode is read-only and Build mode edits; `/plan`
|
|
37
|
+
and `/build` switch between them. Slash commands: /run, /quick, /edit,
|
|
38
|
+
/verify, /receipt, /model, /provider, /cost, /diff, /undo, /help, /exit.
|
|
39
|
+
`loki chat --tui` launches Claude Code's own TUI.
|
|
40
|
+
- [x] OC-ROUTE: one predictable execution path. Flag-first calls, PRD files
|
|
41
|
+
and one-word starts reach the same engine as the positional form. The
|
|
42
|
+
legacy engine runs only on an explicit `--engine legacy` or
|
|
43
|
+
`LOKI_ENGINE=legacy`. `loki route <args>` prints the engine and why.
|
|
44
|
+
- [x] OC-EXIT: close the three `loki verify` exit-code gaps and use one
|
|
45
|
+
exit-code contract for verify, run, quick and edit. Update
|
|
46
|
+
docs/exit-codes.md and remove the KNOWN-ISSUES entry.
|
|
47
|
+
- [x] OC-MODELS: model routes over the Claude harness, so every Tier-1
|
|
48
|
+
control still works. Routes: `--model openrouter/<id>`, `ollama/<id>`,
|
|
49
|
+
`lmstudio/<id>`, `llamacpp/<id>`, `vllm/<id>`, and any
|
|
50
|
+
Anthropic-compatible base URL. `loki models` lists routes;
|
|
51
|
+
`loki models --local` discovers local runtimes.
|
|
52
|
+
- [x] OC-PARITY-COST: engine10 measures cost for Codex, Cline and Aider.
|
|
53
|
+
- [x] OC-PARITY-ENFORCE: engine10 enforces the budget kill, a post-iteration
|
|
54
|
+
guard scan and native sandbox flags for Codex, Cline, Aider and opencode.
|
|
55
|
+
Receipts still list `kill blocking not enforced` because the scan is post-hoc.
|
|
56
|
+
- [x] OC-OPENCODE-E10: opencode becomes a supported engine10 provider.
|
|
57
|
+
- [x] OC-AGENTS: configurable child agents in `.loki/agents/*.md` (model,
|
|
58
|
+
provider, tools, permissions, prompt), managed with
|
|
59
|
+
`loki agents list|new|show`. Councils and reviewers use them when present,
|
|
60
|
+
and they export to Claude Code subagents.
|
|
61
|
+
- [x] OC-EDIT: `loki edit "<change>"` makes a fast single-pass edit with no
|
|
62
|
+
PR, plan or council. It shows the diff; `--verify` and `--receipt` are
|
|
63
|
+
opt-in.
|
|
64
|
+
- [x] OC-ONBOARD: `loki setup` wizard and `loki doctor --fix`. Claude Code
|
|
65
|
+
first, with required and optional prerequisites stated plainly.
|
|
66
|
+
- [x] OC-HELP: `loki help` shows the core verbs, `loki help all` shows the
|
|
67
|
+
full surface, and `loki help <topic>` covers topics. Mistyped commands get
|
|
68
|
+
"did you mean" suggestions, and `--json` works the same everywhere.
|
|
69
|
+
- [x] OC-OUTPUT: one run summary across engines (result, cost, time,
|
|
70
|
+
receipt, next step), with `--quiet` and NO_COLOR honored.
|
|
71
|
+
- [ ] OC-START-INTEGRATION (after merge): wire every feature above into
|
|
72
|
+
`loki start` (`--model <route>`, `--provider`, configured agents, unified
|
|
73
|
+
summary, exit codes, explain-route). Bare `loki` keeps its current
|
|
74
|
+
behavior and does not open chat. Seamless chat handoff: `/run` reuses the
|
|
75
|
+
chat's model, provider and agents; `loki chat --attach` joins the current
|
|
76
|
+
or last `loki start` session; the run summary's next step names
|
|
77
|
+
`loki chat --attach`.
|
|
78
|
+
- [x] OC-DOCS (after merge; README, INSTALLATION, GUIDE, QUICKSTART and
|
|
79
|
+
COMPARE-OPENCODE written): README, INSTALLATION, GUIDE and a new QUICKSTART
|
|
80
|
+
agree with the code on prerequisites, the spend cap, routing and providers.
|
|
81
|
+
Add docs/COMPARE-OPENCODE.md.
|
|
82
|
+
- [ ] Release: merge onto train-v11.4.0, rebuild loki-ts dist, write a full
|
|
83
|
+
CHANGELOG v11.4.0 section, run `scripts/release.sh minor --bump-only`,
|
|
84
|
+
push main, and confirm the release run.
|