loki-mode 11.128.2 → 11.129.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/README.md +1 -0
- package/SKILL.md +3 -3
- package/VERSION +1 -1
- package/autonomy/lib/help-core.sh +30 -42
- package/autonomy/lib/workspace.py +292 -19
- package/autonomy/lib/workspace_comment.py +40 -11
- package/autonomy/loki +97 -159
- package/autonomy/route.sh +3 -2
- package/autonomy/trigger-server.py +373 -32
- package/bin/loki +77 -14
- package/completions/_loki +11 -142
- package/completions/loki.bash +4 -2
- package/dashboard/__init__.py +1 -1
- package/docs/CLI-CORE-VERBS.md +61 -37
- package/docs/CLI-INVENTORY.md +152 -153
- package/docs/CLI-REFERENCE.md +20 -166
- package/docs/DEPLOYMENT.md +38 -3
- package/docs/INSTALLATION.md +7 -1
- package/docs/KNOWN-ISSUES.md +1 -1
- package/docs/PROOF-PASSPORT.md +21 -0
- package/docs/WORKSPACES.md +27 -0
- package/docs/cost-controls.md +74 -12
- package/docs/dev/architecture-reference.md +2 -2
- package/docs/environment-variables.md +7 -0
- package/docs/merge-queue.md +44 -3
- package/docs/sentry-intake.md +1 -1
- package/docs/slack.md +1 -1
- package/docs/v10/GUIDE.md +22 -4
- package/loki-ts/dist/loki.js +1510 -1465
- package/mcp/__init__.py +1 -1
- package/memory/knowledge_graph.py +442 -56
- package/package.json +2 -2
- package/packages/control-plane/dist/server.js +1901 -1585
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/schemas/loki-yaml.schema.json +1 -0
- package/web-app/dist/assets/{AdminPage-B-9a_urH.js → AdminPage-uxbsIyND.js} +1 -1
- package/web-app/dist/assets/{Avatar-DWFQPBje.js → Avatar-5GhUf4pP.js} +1 -1
- package/web-app/dist/assets/{Badge-CuLYjGKc.js → Badge-93rdLyl8.js} +1 -1
- package/web-app/dist/assets/{Button-Cws5TOeA.js → Button-C94f2_e6.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-CCT1U0rq.js → CockpitPage-C8cDx1mp.js} +1 -1
- package/web-app/dist/assets/{ComparePage-ChcsGaeo.js → ComparePage-BU7VVcVf.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-C5Mz6Y_d.js → ErrorBoundary-Bn81ZPkG.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-jXRFyeG-.js → EvidenceReceiptPanel-CVqzhxXI.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-C_YjFJSB.js → GitHubIssuesPanel-i1Yjc0mH.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-B3bRY_lb.js → GitHubPRsPanel-eoXw0hiw.js} +1 -1
- package/web-app/dist/assets/{HomePage-JLwBDYu8.js → HomePage-Cv_BXFF9.js} +2 -2
- package/web-app/dist/assets/{LoginPage-BcDvWJr1.js → LoginPage-CWYdAQSQ.js} +1 -1
- package/web-app/dist/assets/{MagicPage-Bj3qzygY.js → MagicPage-5r2ci7MS.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-9k0NVtge.js → MetricsPage-C37jE1uR.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-D81Z_SCM.js → NotFoundPage-CuBrziZd.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-D9CkJI0B.js → ProjectPage-59GLzJlR.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-vxSmYYzh.js → ProjectsPage-DgDtFRNm.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-Cd2AS1Sg.js → SettingsPage-DjMSy-kZ.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-DOZCRLg5.js → ShowcasePage-DESkYmrG.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-wl2UO5DF.js → SystemSettingsPage-d5jFreyF.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-CA9FPLPm.js → TeamsPage-BEVAkxj3.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-DLRTBM8i.js → TemplatesPage-DeK9wx22.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-RqmPEs4o.js → TerminalOutput-2vwck437.js} +1 -1
- package/web-app/dist/assets/{activity-CoyjHBZ4.js → activity-XgL1xWCM.js} +1 -1
- package/web-app/dist/assets/{bell-Dn2BCsQu.js → bell-EXDsjrzh.js} +1 -1
- package/web-app/dist/assets/{bot-CNqPuD8h.js → bot-B9I58zKH.js} +1 -1
- package/web-app/dist/assets/{check-BWAwFpe2.js → check-DgLUYM2x.js} +1 -1
- package/web-app/dist/assets/{chevron-left-BgTjvxLB.js → chevron-left-BhHLpt7K.js} +1 -1
- package/web-app/dist/assets/{circle-alert-CIYxFeDp.js → circle-alert-rgioMmC9.js} +1 -1
- package/web-app/dist/assets/{clock-Dj6DRvL7.js → clock-BO__fq1n.js} +1 -1
- package/web-app/dist/assets/{cloud-DZBvW6-f.js → cloud-iLJ3RtJs.js} +1 -1
- package/web-app/dist/assets/{code-xml-B0sAmzAO.js → code-xml-BFYU6YlU.js} +1 -1
- package/web-app/dist/assets/{database-BkO44OAR.js → database-CXDLeUh_.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-ChTZgVxB.js → dollar-sign-C9Jbgo-O.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-CQSIiG1T.js → file-code-corner-CNPi6dkK.js} +1 -1
- package/web-app/dist/assets/{file-plus-BAV2KC_M.js → file-plus-DAc0Sd1J.js} +1 -1
- package/web-app/dist/assets/{globe-TUNeqVA9.js → globe-DN0njo3S.js} +1 -1
- package/web-app/dist/assets/{hammer-CMD4wrup.js → hammer-CnpZO-SH.js} +1 -1
- package/web-app/dist/assets/{index-B5lRV-ZJ.js → index-BHwx0KjF.js} +3 -3
- package/web-app/dist/assets/{layers-BxXkAn6j.js → layers-_kP2XVgZ.js} +1 -1
- package/web-app/dist/assets/{loader-circle-CE46Yvcr.js → loader-circle-CcupfVc5.js} +1 -1
- package/web-app/dist/assets/{lock-3uBPp5eV.js → lock-D3I89F_A.js} +1 -1
- package/web-app/dist/assets/{package-DjPZ3DLs.js → package-BMz7_qR6.js} +1 -1
- package/web-app/dist/assets/{plus-D8v6ZCYM.js → plus-3rKyjjc7.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-BSPJHBul.js → refresh-cw-DGI9P9uf.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-D0u6PH4j.js → rotate-ccw-CEIZqe5z.js} +1 -1
- package/web-app/dist/assets/{scroll-text-Dcwu9apa.js → scroll-text-CBQ5ISFk.js} +1 -1
- package/web-app/dist/assets/{server-pd5YWyJw.js → server-DOr9ns7A.js} +1 -1
- package/web-app/dist/assets/{shield-alert-C3TqM2Xm.js → shield-alert-pcQbbyMb.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-U1Wkm_Rg.js → thumbs-up-Q7fwPWa9.js} +1 -1
- package/web-app/dist/assets/{trash-2-BspH7NSu.js → trash-2-D81689SS.js} +1 -1
- package/web-app/dist/assets/{trending-down-DNg_ybr3.js → trending-down-8b0O5hb9.js} +1 -1
- package/web-app/dist/assets/{trending-up-CYzIu-lq.js → trending-up-CD0tv_w5.js} +1 -1
- package/web-app/dist/assets/{upload-ChhyDeon.js → upload-CphI5Pe_.js} +1 -1
- package/web-app/dist/assets/{usePolling-ClMveR0q.js → usePolling-yhGOhxnY.js} +1 -1
- package/web-app/dist/assets/{user-BlFXAv0-.js → user-CXM61B6o.js} +1 -1
- package/web-app/dist/index.html +1 -1
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.129.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
|
|
|
@@ -78,6 +78,12 @@ loki doctor --json # machine-readable
|
|
|
78
78
|
|
|
79
79
|
`loki doctor --fix` creates state directories and a default config. It never installs system packages or runs sudo; it prints those commands instead.
|
|
80
80
|
|
|
81
|
+
### Tests Loki can run
|
|
82
|
+
|
|
83
|
+
Loki detects pytest, unittest, vitest, jest, bun, node, npm, go, cargo, maven, gradle, javac and dotnet tests from the repo's own files, with no environment variable and no config. JVM and .NET repos need `mvn`, `gradle` or `dotnet` on PATH, or a committed `mvnw` or `gradlew` wrapper. A committed `verify.test_command` in `loki.yaml` overrides the detected command. `loki doctor --repo` shows the command Loki will run.
|
|
84
|
+
|
|
85
|
+
When no test can run on this machine (the build tool is missing and there is no wrapper, or the stack has no runner Loki supports, such as Ruby), `loki start` prints `loki: cannot run this repo's tests on this machine: <reason>` before any model session. The run continues, but it cannot end VERIFIED. Not covered yet: Kotlin tests are not detected, and a Python interpreter without pytest is not flagged up front.
|
|
86
|
+
|
|
81
87
|
---
|
|
82
88
|
|
|
83
89
|
## IDE and MCP client install
|
package/docs/KNOWN-ISSUES.md
CHANGED
|
@@ -4,7 +4,7 @@ Issues in the current release that are known and not yet fixed. Report new ones
|
|
|
4
4
|
|
|
5
5
|
## Which engine runs
|
|
6
6
|
|
|
7
|
-
From 11.4.0, `loki start`, `loki "<task>"`, `loki owner/repo#N` and `loki quick` run the Loki 10 engine whatever the flag order or input form. The previous loop runs only on `--engine legacy`, `LOKI_ENGINE=legacy`, for a provider with no Loki 10 invoker, for a PRD over 100000 bytes, or never because of a flag: a flag Loki 10 cannot honor (`--simple`, `--sandbox`, `--ship`, `--worktree`, `--
|
|
7
|
+
From 11.4.0, `loki start`, `loki "<task>"`, `loki owner/repo#N` and `loki quick` run the Loki 10 engine whatever the flag order or input form. The previous loop runs only on `--engine legacy`, `LOKI_ENGINE=legacy`, for a provider with no Loki 10 invoker, for a PRD over 100000 bytes, or never because of a flag: a flag Loki 10 cannot honor (`--simple`, `--sandbox`, `--ship`, `--worktree`, `--parallel`, ...) is refused with exit 2 and names its replacement, and `--engine legacy` keeps it. `--pr` is accepted (Loki 10 opens the PR by default), `--quiet` and `--resume` are honored, and `--dry-run` prints the route, max-cost and run cap without starting. Check with `loki route start <args> --json`: it reports `engine`, `adapter`, `reason` and `capability_differences`. The full table is in the Routing contract section of `docs/exit-codes.md`.
|
|
8
8
|
|
|
9
9
|
## Exit codes
|
|
10
10
|
|
package/docs/PROOF-PASSPORT.md
CHANGED
|
@@ -143,3 +143,24 @@ The bare word `VERIFIED` therefore means: integrity not failed, no failed checks
|
|
|
143
143
|
- Existing JSON fields are untouched. `verification` is additive.
|
|
144
144
|
- Receipts written before this contract lack `facts.environment` and `facts.git.dirty`. They report environment `not recorded` and may report freshness `unknown`.
|
|
145
145
|
- `loki proof show <id>` used to print the raw JSON. Scripts that parsed it must now pass `--json`.
|
|
146
|
+
|
|
147
|
+
## Passport on every PR
|
|
148
|
+
|
|
149
|
+
A VERIFIED Loki 10 PR carries a portable proof passport in its receipt comment (the comment marked `<!-- loki-receipt -->`). It is the run receipt as a signed DSSE envelope (in-toto Statement v1, Ed25519 over the DSSE pre-authentication encoding, the same envelope `loki verify --export-dsse` writes) plus the public JWK of the signing key. The comment also prints the key id and the commit the receipt covers.
|
|
150
|
+
|
|
151
|
+
To check a PR offline, with no account and no network:
|
|
152
|
+
|
|
153
|
+
1. Copy the two blocks under "Proof passport" in the comment into `receipt.dsse.json` and `pubkey.jwk`.
|
|
154
|
+
2. Run `loki verify --pubkey pubkey.jwk receipt.dsse.json`. Expected: `verdict: VERIFIED`, exit 0. A changed byte reads TAMPERED (exit 1).
|
|
155
|
+
3. Check that the commit printed in the comment is the PR's head commit.
|
|
156
|
+
|
|
157
|
+
Key trust: the key inside the comment proves integrity only. Anyone can sign a receipt with their own key and post it with their own matching key. Compare the key id with one you obtained out of band (`loki keys export` prints it), or run `loki verify` with a key file you already trust. `loki review queue` never trusts the embedded key: it checks passports only against `--pubkey FILE` or the local receipt key, and a passport from any other key reads `unchecked`.
|
|
158
|
+
|
|
159
|
+
What the passport does not cover:
|
|
160
|
+
|
|
161
|
+
- Draft and non-VERIFIED PRs get no passport; the comment says why (`not issued: run outcome PARTIAL`). Only VERIFIED and ALREADY_SATISFIED receipts are exported, the same policy as `--export-dsse`.
|
|
162
|
+
- `events.jsonl` is not in the envelope, so the event-log checks do not run on a passport. For the full evidence (receipt, event log, key) use `loki proof bundle <run-id>`.
|
|
163
|
+
- The envelope is a copy of the receipt predicate: checks, cost, toolchain, evidence and assumptions are visible to anyone who can read the PR. Two guards keep it from leaking local detail: a receipt that mentions the repository path, your home directory, `/Users/` or `/home/` gets no passport (`receipt holds local paths`), and a passport above 60000 characters is not posted (`passport too large`). In both cases use `loki proof bundle`.
|
|
164
|
+
|
|
165
|
+
`LOKI_PR_PASSPORT=0` turns the passport off; the comment then says `Passport: passport disabled`. See `docs/merge-queue.md` for `loki review queue`, which ranks open Loki PRs and marks the ones whose passport verifies.
|
|
166
|
+
|
package/docs/WORKSPACES.md
CHANGED
|
@@ -13,6 +13,7 @@ workspaces:
|
|
|
13
13
|
integration: {command: "make e2e", timeout_s: 900, per_stage: false}
|
|
14
14
|
concurrency: 2
|
|
15
15
|
plan: false
|
|
16
|
+
affected: false
|
|
16
17
|
```
|
|
17
18
|
|
|
18
19
|
The `workspaces:` block is validated and fails closed: a misspelled key (for example `afer`) or a wrong type exits 2 and names the key.
|
|
@@ -27,6 +28,7 @@ loki workspace show shop
|
|
|
27
28
|
loki workspace run shop acme/api#12
|
|
28
29
|
loki start --workspace shop "<brief>" # same runner, from the primary command
|
|
29
30
|
loki workspace infer shop # print suggested after: edges
|
|
31
|
+
loki workspace affected shop "rename customer id" # print which repos the goal touches
|
|
30
32
|
loki workspace status # every recorded run, one row per repo
|
|
31
33
|
loki workspace status <run-id>
|
|
32
34
|
```
|
|
@@ -46,6 +48,31 @@ loki workspace status <run-id>
|
|
|
46
48
|
- Verify a run: see "Verify a workspace run" below.
|
|
47
49
|
- Backlog (`loki backlog`) and dashboard starts now share the workspace worktree prep: a per-repo lock, a clean start point and copied dependencies. `LOKI_WORKSPACES=0` restores the previous worktree creation (D51-B05, D51-B06).
|
|
48
50
|
|
|
51
|
+
## Let the goal pick the repos
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
loki workspace affected shop "rename customer id everywhere" # print-only, no model call, writes nothing
|
|
55
|
+
LOKI_WORKSPACE_AFFECTED=1 loki workspace run shop "rename customer id everywhere"
|
|
56
|
+
loki start --workspace shop "<goal>" # with LOKI_WORKSPACE_AFFECTED=1 or `affected: true`
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`affected` searches each repo's tracked files (`git grep`, skipping node_modules, dist, build, vendor and .loki) for terms taken from the goal and prints one row per repo: `selected` with the first `file:line (term)` hit, or `not selected (no match)`, then the run order. Add `--json` for the full selection (`terms`, `selected`, `not_selected`, `evidence`, `fallback`, `order`).
|
|
60
|
+
|
|
61
|
+
Terms are lexical and limited:
|
|
62
|
+
- Explicit identifiers are taken verbatim: backticked or quoted text, words containing `_`, camelCase words, and capitalised words that do not start the goal.
|
|
63
|
+
- Every run of 2 or 3 consecutive plain words (stopwords such as rename, all, the break a run) becomes spelling variants: `customer_id`, `customer-id`, `customerId`, `CustomerId`, `CUSTOMER_ID`, `customerid`, and `customerID` and `CustomerID` when the last word is 3 letters or fewer. A single plain word is never a term.
|
|
64
|
+
- A hit must sit on word boundaries: `customerId` matches `customerIdentity` no more than `id` matches `idle`.
|
|
65
|
+
- A synonym or abbreviation (`custId` for "customer id") is missed, and a mention in docs or a comment counts as a hit.
|
|
66
|
+
- With an `owner/repo#N` goal the issue owner is always selected and the issue title and body supply the terms (a `gh` failure prints `issue text unavailable` and uses no terms).
|
|
67
|
+
|
|
68
|
+
Fail-open cases, so a repo is never silently dropped on an error: a repo with no local checkout is included unscanned, a repo whose scan errors or exceeds 60 seconds is included, and when no repo matches at all every repo runs (`no repo matched the goal; running every repo`).
|
|
69
|
+
|
|
70
|
+
With `affected: true` or `LOKI_WORKSPACE_AFFECTED=1`, `run` runs only the selected repos. Their order is the declared `after` edges plus the edges `infer` computes (manifest, import and OpenAPI generator evidence), limited to the selected repos; an inferred cycle falls back to the declared edges and prints why. Unselected repos are not changed, but the integration command still sees their checkouts through `LOKI_WS_DIR_<OWNER>_<REPO>`. The selection (with evidence) is written to integration.json, so the signed composite.json also attests which repos were chosen and why.
|
|
71
|
+
|
|
72
|
+
Every repo PR comment now ends with a "Linked PRs" section naming each sibling PR (with `(this PR)` and `(draft)` markers), and the run summary prints each PR URL plus `linked PRs: K of N repos have an open PR (R ready, D draft)`. These need `gh`; without it the line reads 0 of N.
|
|
73
|
+
|
|
74
|
+
Pruning is off by default, because a lexical miss would leave a repo out of the linked set while the run exits 0. Turn it on per workspace with `affected: true`, or per run (including `loki start --workspace`) with `LOKI_WORKSPACE_AFFECTED=1`.
|
|
75
|
+
|
|
49
76
|
## Verify a workspace run
|
|
50
77
|
|
|
51
78
|
After `loki workspace run <name> <ref>` finishes, check the evidence rather than trusting the exit code alone:
|
package/docs/cost-controls.md
CHANGED
|
@@ -61,7 +61,7 @@ Where the default applies:
|
|
|
61
61
|
|
|
62
62
|
| Route | Default applies | What the cap does |
|
|
63
63
|
| --- | --- | --- |
|
|
64
|
-
| engine10 (`loki "<task>"`, the Loki 10 engine) | Only when an API key is set (`ANTHROPIC_API_KEY` or `OPENAI_API_KEY`). A subscription run (no key) has no dollar cap. |
|
|
64
|
+
| engine10 (`loki "<task>"`, the Loki 10 engine) | Only when an API key is set (`ANTHROPIC_API_KEY` or `OPENAI_API_KEY`). A subscription run (no key) has no dollar cap. | Stops starting stages and seals what exists (see "What you keep at the cap"). |
|
|
65
65
|
| Bash loop (`loki start`, `autonomy/run.sh`) | Always, key or not. | Pauses the run (writes `.loki/PAUSE` and `.loki/signals/BUDGET_EXCEEDED`); remove both to resume. |
|
|
66
66
|
|
|
67
67
|
The README and the engine guide have shown different figures in the past (100 and
|
|
@@ -85,7 +85,8 @@ Every start prints the active cap and where it came from.
|
|
|
85
85
|
|
|
86
86
|
- engine10: the start line ends the cap clause with `cap $X.XX (SOURCE)` where SOURCE
|
|
87
87
|
is `--max-cost`, `env`, `loki.yaml` or `default`, or `no dollar cap (subscription)`.
|
|
88
|
-
The
|
|
88
|
+
The same line carries the cost and time quote (see "Preview the cost before
|
|
89
|
+
spending anything"). The default output stays within its 8-line limit.
|
|
89
90
|
- bash route: `Budget limit set: $X.XX (source: flag|env|config|default)`.
|
|
90
91
|
|
|
91
92
|
A cap set through the bash settings file is reported as `config`; the `--config`
|
|
@@ -107,14 +108,36 @@ file loader exports the variable, so it reports as `env`.
|
|
|
107
108
|
### Enforcement point and overshoot
|
|
108
109
|
|
|
109
110
|
engine10 checks the cap before each stage starts (`machine.ts`, `capReached`), using
|
|
110
|
-
the cost events recorded so far
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
the cost events recorded so far, and each session is handed what is left of the cap
|
|
112
|
+
(`engine10/session.ts`, `childBudgetLimit`, exported as `LOKI_BUDGET_LIMIT` and passed to
|
|
113
|
+
Claude Code as `--max-budget-usd` by `loki-ts/src/providers/claude_flags.ts`). So a session that is
|
|
114
|
+
already running is bounded by the remaining cap, with a floor of $0.01, and the overshoot is
|
|
115
|
+
bounded per session. The plan and wall stages can run together, so up to two sessions can
|
|
116
|
+
be in flight when the cap is crossed. Time caps and the per-session time limit still apply
|
|
117
|
+
inside a stage. A provider that reports no cost (opencode) has no dollar enforcement; the
|
|
118
|
+
start line warns about it.
|
|
114
119
|
|
|
115
120
|
The bash route checks after each iteration (`check_budget_limit`), so the overshoot is
|
|
116
121
|
up to one iteration.
|
|
117
122
|
|
|
123
|
+
### What you keep at the cap
|
|
124
|
+
|
|
125
|
+
When the cap is reached no later stage starts, but the closing stages (commit and seal)
|
|
126
|
+
still run, so the work done so far is kept and the run ends with a receipt that names the
|
|
127
|
+
cap:
|
|
128
|
+
|
|
129
|
+
- The edits are committed on `loki/<runId>` and your checkout returns to the branch you
|
|
130
|
+
started on, untouched. The run prints where the work is.
|
|
131
|
+
- If the cap is crossed while implement is running or after it, the outcome is `PARTIAL`
|
|
132
|
+
(exit 6) with `Reason: cost/time cap reached`. If it is crossed before any change exists,
|
|
133
|
+
the outcome is `FAILED` (exit 1) with the same reason and there is nothing to keep.
|
|
134
|
+
`tests/min/engine10-e2e-stub.sh` pins the first case.
|
|
135
|
+
- `BUDGET_STOP` (exit 3) is reserved for a run that ended without sealing a receipt.
|
|
136
|
+
Then `.loki/runs/<id>/budget.json` records the cap, the amount spent and the source,
|
|
137
|
+
and the next step reads "raise with --max-cost". A rerun of the same task starts from
|
|
138
|
+
that spend (see "A budget stop survives a rerun").
|
|
139
|
+
- To continue after a cap, raise it with `--max-cost` and rerun.
|
|
140
|
+
|
|
118
141
|
### Missing prices
|
|
119
142
|
|
|
120
143
|
Cost is never reported as 0 when it was not measured.
|
|
@@ -174,14 +197,53 @@ See [exit codes](./exit-codes.md) for the full contract.
|
|
|
174
197
|
|
|
175
198
|
## Preview the cost before spending anything
|
|
176
199
|
|
|
177
|
-
|
|
178
|
-
|
|
200
|
+
Every `loki "<task>"` start line carries one quote, printed before any session starts:
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
... cap $5.00 (--max-cost); estimate: about $0.19 (range $0.12-$0.39), about 1 min (range 1-5 min), first run in this repo (benchmark prior, loki-default)
|
|
179
204
|
```
|
|
180
205
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
206
|
+
`loki estimate` prints the same quote without starting a run (`--model M`, `--provider P`
|
|
207
|
+
and `--json` are accepted). Where the numbers come from:
|
|
208
|
+
|
|
209
|
+
- **First run in a repo, or fewer than 3 verified runs of the project shape.** The quote
|
|
210
|
+
is a benchmark prior: the p10 to p90 range and the median of the measured cost and wall
|
|
211
|
+
time of Loki runs in the committed citable head-to-head results
|
|
212
|
+
(`benchmarks/h2h/results`, the file list is `PRIOR_SOURCES` in
|
|
213
|
+
`loki-ts/src/runner/router/cost_preview.ts`, and `tests/min/outcome-metrics.sh`
|
|
214
|
+
recomputes every number from those files). A plain `loki start` quotes the
|
|
215
|
+
`loki-default` band (24 runs): about $0.19, range $0.12-$0.39, about 1 min, range 1-5 min.
|
|
216
|
+
`loki start --haiku` and `LOKI_ROUTER=auto` quote the `loki-haiku-flag` band (96 runs).
|
|
217
|
+
A pinned model quotes its own family band.
|
|
218
|
+
- **After 3 verified runs of the same project shape in this repo.** The quote is the
|
|
219
|
+
median and range of those runs' own cost and time, labelled "from K prior runs of shape S".
|
|
220
|
+
- **Never from task text.** A model with no benchmark row (an opencode model) prints
|
|
221
|
+
`NOT AVAILABLE (reason)`, never a guess.
|
|
222
|
+
- **Subscription runs.** The dollars are what the same usage would cost at API prices,
|
|
223
|
+
not an amount billed to you.
|
|
224
|
+
|
|
225
|
+
Switches: `LOKI_COST_PREVIEW=0` turns every quote surface off, `LOKI_COST_PRIOR=0` drops the
|
|
226
|
+
first-run prior (the line then reads NOT AVAILABLE until history exists), and
|
|
227
|
+
`LOKI_COST_CONFIRM=1` asks y/N before a run starts.
|
|
228
|
+
|
|
229
|
+
How accurate the quote was: `loki stats --outcomes` prints a `Quote accuracy` row, how many
|
|
230
|
+
of the last 50 sealed runs landed inside the quoted dollar range and the median error against
|
|
231
|
+
the quoted middle (`quote_accuracy` in `--json`).
|
|
232
|
+
|
|
233
|
+
What the quote is not:
|
|
234
|
+
|
|
235
|
+
- The prior comes from small benchmark tasks, so it under-quotes large real work until the
|
|
236
|
+
repo has its own history. The range is shown for that reason.
|
|
237
|
+
- The default band was measured on one account whose Claude Code default model is not
|
|
238
|
+
recorded (its cost tracks the Opus band, so a Sonnet-default or Pro user is over-quoted).
|
|
239
|
+
- Quote accuracy counts sealed runs only. A run that ended without a receipt has no
|
|
240
|
+
actual cost on a receipt and is not in the row, so the figure reads optimistic.
|
|
241
|
+
- It is not a cap. The cap is the separate `cap $X` clause on the same line.
|
|
242
|
+
|
|
243
|
+
For the older loop, `loki plan ./prd.md --json` reports complexity, estimated iterations,
|
|
244
|
+
token usage and cost without executing. No provider call, no spend.
|
|
245
|
+
`LOKI_CONFIG_DUMP=1 loki start ./prd.md` prints the resolved configuration and exits, so you
|
|
246
|
+
can confirm your caps are actually set before a real run.
|
|
185
247
|
|
|
186
248
|
## What you are charged for, stated plainly
|
|
187
249
|
|
|
@@ -35,7 +35,7 @@ explicitly rather than inheriting the session model.
|
|
|
35
35
|
- **Progressive Disclosure**: 3-layer loading (index, timeline, full details)
|
|
36
36
|
- **Token Economics**: Discovery vs read token tracking
|
|
37
37
|
- **Vector Search**: Optional embedding-based similarity (sentence-transformers)
|
|
38
|
-
- **Cross-project index + knowledge graph**: `memory/cross_project.py`, `memory/knowledge_graph.py` (added v7.x)
|
|
38
|
+
- **Cross-project index + knowledge graph**: `memory/cross_project.py`, `memory/knowledge_graph.py` (added v7.x; FR06: `ingest_repo`/`merge_repo` store per-repo services, CODEOWNERS rules and decision docs in graph.json, `org_context` renders them cited)
|
|
39
39
|
- **Managed memory client**: `memory/managed_memory/` -- gated on `LOKI_MANAGED_MEMORY=true`. See `skills/memory.md`.
|
|
40
40
|
- **CLI**: `loki memory index|timeline|consolidate|economics|retrieve|episode|pattern|skill|vectors`
|
|
41
41
|
- **API**: REST endpoints at `/api/memory/*`
|
|
@@ -135,7 +135,7 @@ extract_learnings_from_session (autonomy/run.sh) mirrors learnings and decisions
|
|
|
135
135
|
- Composite: `features/speed/seal_group.ts` composeComposite/verifyComposite (schema `loki.v10.composite/1`), sealed by `loki verify --seal-composite <run_dir>`, signed with the existing `signReceipt`, capped by `capGroupVerdict`. Workspace runs seal it after integration.json.
|
|
136
136
|
- Autonomy ladder: `src/policies/engine.js` allowedActions(level) (propose = none, execute = pr, operate = pr + deploy; merge never). engine10 `supervisor.ts` prGate consults `src/policies/check.js`; `loki deploy --execute` consults it for `deploy` and fails closed. `loki trust` graduationAdvice is advisory and never writes the policy file.
|
|
137
137
|
- 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.
|
|
138
|
-
- 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.
|
|
138
|
+
- 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.
|
|
139
139
|
|
|
140
140
|
- Wall publish (FC-VERIFIED-PR-WITHOUT-ITS-TEST): 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).
|
|
141
141
|
|
|
@@ -28,6 +28,7 @@ with nowhere to look them up.
|
|
|
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**. |
|
|
30
30
|
| `LOKI_KEEP_RUN_BRANCH` | unset | When a Loki 10 run ends, Loki returns your checkout to the branch you started from (only when it has no uncommitted changes; otherwise it prints how to return), removes the run's leftover temporary worktrees, and deletes the `loki/e10-*` run branch. A branch that was pushed is simply deleted; an unpushed one is first saved as a git bundle in `.loki/runs/<run-id>/branch.bundle` (with `branch.json` holding the branch name and head SHA), and the summary prints the restore command `git fetch .loki/runs/<run-id>/branch.bundle <branch>:<branch>`. If the bundle cannot be written, the branch is kept. Run branches left by earlier runs are saved and removed the same way at the end of the next run (bundles without a run directory go to `.loki/runs/legacy-branches/`). A run that passed but published nothing (no remote, or `--no-pr`) keeps its branch checked out, a run you can still resume keeps its branch, and a live run's branch or a branch checked out in any worktree is never touched; branches not named `loki/e10-*` are never touched. `1` turns all of this off and keeps every run branch, as before. Independently of this setting, session id files are written in the run directory instead of loose in `.loki/`, and the next run moves older loose ones there. |
|
|
31
|
+
| `LOKI_EPIC_PARALLEL` | provider slots, at most 4 (claude 4, opencode 1) | How many slices of a split issue (`loki start owner/repo#N` on a large issue) run at once. Slices with no dependency run at the same time, each in its own worktree; a slice that depends on another waits for it and starts on its branch. `1` runs them one at a time. A failing or spec-conflicting slice skips only the slices that depend on it. Slices share one `--max-cost` cap, which can be passed by up to (slices in flight - 1) session costs because each running session sees the cap at its next cost event. |
|
|
31
32
|
|
|
32
33
|
For a cost estimate before committing to a run, `loki plan <spec> --json` is
|
|
33
34
|
the better tool: it reports complexity, iterations, tokens and cost without
|
|
@@ -40,6 +41,9 @@ interact and why hitting one is a failure rather than a success.
|
|
|
40
41
|
|---|---|---|
|
|
41
42
|
| `LOKI_PROVIDER` | `claude` | `claude` or `opencode`. `codex`, `cline`, `aider` and `gemini` were removed and exit 2 with a migration line. |
|
|
42
43
|
| `LOKI_SESSION_MODEL` | `medium` | The capability tier for the run: `small`, `medium`, or `high`. See below. |
|
|
44
|
+
| `LOKI_DETACH_SETTLE_S` | `3` | Seconds `--detach` waits to see the run survive before it reports "Detached". An engine exit inside the window is reported with the log tail and the engine's exit code. |
|
|
45
|
+
| `LOKI_DETACH_CAFFEINATE` | `1` | On macOS, `--detach` holds `caffeinate -i` for the run (blocks idle sleep, not a closed lid). `0` turns it off. |
|
|
46
|
+
| `LOKI_DETACHED` | unset | Set to `1` on a detached run. Informational. |
|
|
43
47
|
| `LOKI_MAX_TIER` | unlimited | Caps model tier, so a run cannot escalate past what you are willing to pay for. |
|
|
44
48
|
| `LOKI_MODEL_OVERRIDE` | unset | Overrides the resolved model outright. A route spec (`ollama/<id>`) works too. |
|
|
45
49
|
| `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. |
|
|
@@ -153,6 +157,9 @@ with no gain in pass rate. Set each to `1` to turn it on.
|
|
|
153
157
|
| Variable | Default | Effect |
|
|
154
158
|
|---|---|---|
|
|
155
159
|
| `LOKI_REVIEW_DEFAULT` | off | With no reviewer configured, a medium risk run asks its own CLI for one code review before seal. Off, the receipt lists "one reviewer" as not proven. A high risk run gets that review by default either way, and a configured reviewer (`review:` in loki.yaml, `LOKI_REVIEW_PROVIDER`, a reviewer agent) always runs. |
|
|
160
|
+
| `LOKI_ORG_GRAPH` | off | Adds a short "Org knowledge" block to the implement brief on `loki start`: the services this repo defines, who owns the paths the task touches (CODEOWNERS), services in other ingested repos that depend on this one, and ADRs or decision docs that match the task, each line citing repo, path and line. At most 1500 bytes. This repo is re-ingested on every run; other repos are as fresh as their last `loki memory graph ingest`. The size and line count are recorded in `.loki/runs/<id>/lessons-injected.json`. The graph is per machine (not shared across a team) and does not yet read trackers or chat. Repos without an origin remote are keyed by directory name, so two such directories with the same name share facts. With the switch off nothing is spawned or written. |
|
|
161
|
+
| `LOKI_KNOWLEDGE_DIR` | `~/.loki/knowledge` | Directory of the org knowledge store (`graph.json`, `patterns.jsonl`). |
|
|
162
|
+
| `LOKI_PR_PASSPORT` | on | Set to `0` to leave the proof passport (signed DSSE receipt and public key) out of the PR receipt comment. Only VERIFIED runs get one, and never when the receipt holds local paths or is over 60000 characters. See `docs/PROOF-PASSPORT.md`. |
|
|
156
163
|
| `LOKI_PR_LESSONS` | off | Adds lessons from earlier runs and merged PRs to the implement brief: only a failing check, a restored test edit or a spec conflict on a file this run will touch, one line each, at most 400 bytes. Each run's injected lessons are recorded in `.loki/runs/<id>/lessons-injected.json`. Lessons are recorded either way, including checks that blocked a session stop. |
|
|
157
164
|
| `LOKI_WORKED_EXAMPLE` | off | Adds an earlier VERIFIED run as a short worked example to the implement brief, only when the new task is a near-duplicate of it. |
|
|
158
165
|
| `LOKI_E10_ALREADY_DONE_CHECK` | off | Runs the separate already-done confirmation on a direct task too. Issue tasks always get it; on a direct task the implement session reports already-done itself. |
|
package/docs/merge-queue.md
CHANGED
|
@@ -16,9 +16,14 @@ exits nonzero. Nothing is force-pushed and no check is bypassed.
|
|
|
16
16
|
|
|
17
17
|
One PR through the same gate. It is refused (PR left open) when it is a draft,
|
|
18
18
|
when `gh pr checks` is not green after polling, or, with --require-verified,
|
|
19
|
-
when the run
|
|
20
|
-
--
|
|
21
|
-
|
|
19
|
+
when the run is not VERIFIED for the PR's head commit. The refusal names the gate.
|
|
20
|
+
--require-verified accepts either a legacy proof in `.loki/proofs` whose head
|
|
21
|
+
commit is the PR head, or a Loki 10 receipt in `.loki/runs` whose `head_sha` is the
|
|
22
|
+
PR head and which `loki verify <run-id>` reports VERIFIED (a run outcome that is
|
|
23
|
+
not VERIFIED, or a receipt that does not verify, refuses with `gate: verdict`; no
|
|
24
|
+
receipt for that head refuses with `gate: head`). It reads local runs, so run it on
|
|
25
|
+
the machine that ran `loki start`. The merge passes `--match-head-commit`, so a
|
|
26
|
+
push after the gate cannot land unjudged.
|
|
22
27
|
|
|
23
28
|
loki merge watch <pr|branch> [--require-verified] [--delete-branch]
|
|
24
29
|
|
|
@@ -30,3 +35,39 @@ Green goes through the same merge gate as `loki merge pr`. When attempts run out
|
|
|
30
35
|
the PR is returned to draft, nothing merges, and the last failure log is printed.
|
|
31
36
|
`loki start --ship --engine legacy` calls this after it opens the PR; `/merge watch <pr>` runs it
|
|
32
37
|
from `loki chat`.
|
|
38
|
+
|
|
39
|
+
## Review queue
|
|
40
|
+
|
|
41
|
+
loki review queue [--repo owner/repo] [--pubkey FILE] [--limit N] [--json] [--mark]
|
|
42
|
+
|
|
43
|
+
One list of every open Loki PR (head branch `loki/*`), ranked by risk. Read-only
|
|
44
|
+
unless `--mark` is given. It needs the Bun runtime and an authenticated `gh`.
|
|
45
|
+
|
|
46
|
+
A PR is READY only when all of these hold:
|
|
47
|
+
|
|
48
|
+
- it is not a draft;
|
|
49
|
+
- `gh pr checks` is green (no checks reported counts as not green);
|
|
50
|
+
- the risk tier is low. The tier is recomputed from the PR's live diff with the
|
|
51
|
+
same classifier the run used (`classifyRisk`); `LOKI_RISK_TIER` is ignored, so
|
|
52
|
+
nothing can lower it. This is not the `loki review --risk` score, which stays a
|
|
53
|
+
separate advisory view. Critical-path rules (CODEOWNERS, `.loki/config.json`)
|
|
54
|
+
are read at the PR's base commit when it is in the local clone, else from the
|
|
55
|
+
working tree;
|
|
56
|
+
- its proof passport (see `docs/PROOF-PASSPORT.md`) verifies against `--pubkey FILE`
|
|
57
|
+
or, without it, the local receipt key, and names the PR's exact head commit.
|
|
58
|
+
A teammate without the author's key sees every PR as unchecked until they pass
|
|
59
|
+
the author's public key (`loki keys export`).
|
|
60
|
+
|
|
61
|
+
Every other PR is listed as `NEEDS REVIEW` with each reason in plain words. Order:
|
|
62
|
+
READY rows first (fewest changed lines first), then needs-review rows by tier
|
|
63
|
+
(high, medium, low), then by lines changed. A READY row prints a short summary: the
|
|
64
|
+
changed files, the proof card (cost, time, checks run outside the model, fail-to-pass
|
|
65
|
+
line, receipt hash), what is not proven, the risk line, and the next step
|
|
66
|
+
`gh pr review N --approve && loki merge pr N --require-verified`.
|
|
67
|
+
|
|
68
|
+
`--json` prints one object per PR: number, url, title, head, branch, ready, rank,
|
|
69
|
+
reasons, risk, passport (status, outcome, receipt_sha256, kid), checks, lines, files.
|
|
70
|
+
`--mark` creates the `loki-ready` label, adds it to READY PRs and removes it from Loki
|
|
71
|
+
PRs that carry it but are not READY; a label failure is reported and never changes
|
|
72
|
+
the result. The command makes three `gh` calls per PR; `--limit` defaults to 50.
|
|
73
|
+
|
package/docs/sentry-intake.md
CHANGED
|
@@ -27,7 +27,7 @@ The output is a receipt-gated PR only, never a deploy. Whether the PR opens is s
|
|
|
27
27
|
|
|
28
28
|
## Slack, Linear, Jira and Teams delegation
|
|
29
29
|
|
|
30
|
-
`loki trigger` server setup for delegating a job from chat or a tracker. Both routes enqueue through the same job queue and runner as `POST /jobs`; a completion summary goes back to the origin. Nothing unauthenticated can start a job or choose a reply URL.
|
|
30
|
+
`loki trigger` server setup for delegating a job from chat or a tracker. Both routes enqueue through the same job queue and runner as `POST /jobs`; a completion summary goes back to the origin. Nothing unauthenticated can start a job or choose a reply URL. Sentry, Slack, Linear, Jira and Teams runs each count toward their own source's auto-pause (see "Auto-pause and trigger health" in `docs/DEPLOYMENT.md`).
|
|
31
31
|
|
|
32
32
|
Secrets are env only and must differ from each other, the GitHub webhook secret, the API token and the Sentry secret (an equal secret disables its route at startup). A missing secret answers 503 naming the variable, and the server logs a startup warning. None of them reach the `loki start` child environment.
|
|
33
33
|
|
package/docs/slack.md
CHANGED
|
@@ -32,6 +32,6 @@ Bot token scopes: `app_mentions:read`, `chat:write`, `channels:history` (and `gr
|
|
|
32
32
|
|
|
33
33
|
Subscribe to bot events: `app_mention`, `message.channels` (plus `message.groups` for private channels).
|
|
34
34
|
|
|
35
|
-
Outbound notifications (PR opened, BLOCKED, finished) are separate and use `LOKI_SLACK_WEBHOOK_URL`.
|
|
35
|
+
Outbound notifications (PR opened, BLOCKED, finished) are separate and use `LOKI_SLACK_WEBHOOK_URL`. They are how a run started with `--detach` reports its outcome after the terminal is gone.
|
|
36
36
|
|
|
37
37
|
Stuck-run alert: if a live run writes no event for `LOKI_STUCK_MIN` minutes (default 15), one alert names the last stage, its event time and a suggested action. It always prints to stderr and also goes to Slack when a webhook is set. A new event clears the alert, and a later silence can alert again. Checked on the 15-second supervisor beat. A value of 0, a negative number or a non-number falls back to 15.
|
package/docs/v10/GUIDE.md
CHANGED
|
@@ -131,8 +131,22 @@ Issue refs work the same way:
|
|
|
131
131
|
```
|
|
132
132
|
loki owner/repo#123
|
|
133
133
|
loki https://github.com/owner/repo/issues/123
|
|
134
|
+
loki "fix #123"
|
|
135
|
+
loki "#123"
|
|
136
|
+
loki "<issue URL as copied, with ?query or #comment>"
|
|
137
|
+
loki https://github.com/o/r/pull/5 # verify-pr
|
|
134
138
|
```
|
|
135
139
|
|
|
140
|
+
A pasted goal that names one issue is read as that issue: a copied URL loses a
|
|
141
|
+
trailing slash, ?query or #fragment, and "#123", "fix #123" or "fix issue 123"
|
|
142
|
+
becomes owner/repo#123 from the checkout's origin ("#N" needs a GitHub origin;
|
|
143
|
+
quote it, since an unquoted # starts a shell comment). Loki prints a `goal:`
|
|
144
|
+
line when it read a ref. Extra words ("fix #123 and add a test") keep the goal
|
|
145
|
+
as text, and LOKI_GOAL_REF=0 turns the reading off. The run itself asks
|
|
146
|
+
nothing: headless intake records its assumptions in the receipt. The only
|
|
147
|
+
terminal prompt is the optional rating after VERIFIED (LOKI_SATISFACTION=0
|
|
148
|
+
turns it off). Models and --deep are not auto-picked yet.
|
|
149
|
+
|
|
136
150
|
bin/loki routes GitHub, GitLab (`.../-/issues/N`) and Jira
|
|
137
151
|
(`.../browse/KEY`) issue URLs to the v10 engine, and the issue-fetch step
|
|
138
152
|
(autonomy/issue-providers.sh) fetches title/body/labels from all three.
|
|
@@ -163,9 +177,13 @@ Flags, from the engine's own `--help`:
|
|
|
163
177
|
`ANTHROPIC_API_KEY` or `OPENAI_API_KEY` is set, and no dollar cap on a
|
|
164
178
|
subscription login (usage then counts against your plan limits). Source:
|
|
165
179
|
`loki-ts/src/e10ext/budget_cap.ts`. The start line shows the cap in force,
|
|
166
|
-
for example `cap $100.00 (default)` or `no dollar cap (subscription)
|
|
167
|
-
|
|
168
|
-
|
|
180
|
+
for example `cap $100.00 (default)` or `no dollar cap (subscription)`, then
|
|
181
|
+
the cost and time quote, for example `estimate: about $0.19 (range
|
|
182
|
+
$0.12-$0.39), about 1 min (range 1-5 min), first run in this repo (benchmark
|
|
183
|
+
prior, loki-default)`. Once priced cost reaches the cap no later stage
|
|
184
|
+
starts and each session is limited to what is left; the closing stages seal
|
|
185
|
+
what exists (PARTIAL with the work on `loki/<runId>`, or BUDGET_STOP with exit
|
|
186
|
+
code 3 when no receipt was sealed; see docs/cost-controls.md). Sessions with no
|
|
169
187
|
provider price never count toward the cap. On the previous loop the same cap
|
|
170
188
|
is `LOKI_BUDGET_LIMIT` (default 100.00 USD; set it to an empty string for
|
|
171
189
|
unlimited), and a breach pauses the run instead of killing it.
|
|
@@ -382,7 +400,7 @@ on:
|
|
|
382
400
|
|
|
383
401
|
Before anything runs, `loki backlog` triages every issue into one of three classes, each printed with a one-line reason (`--dry-run` prints only this and launches nothing):
|
|
384
402
|
|
|
385
|
-
- `implement`: a concrete target (a file, function, value or expected result), or a large issue. Only these run. Large has one definition, the same one `loki start owner/repo#N` uses: an epic label (`epic`, `umbrella`, `tracking` or `meta`), or at least two of 4 or more solution parts, 4 or more acceptance criteria, and both a backend and a frontend named. A large issue is split into slices that each run on their own (the reason says `runs split into slices`).
|
|
403
|
+
- `implement`: a concrete target (a file, function, value or expected result), or a large issue. Only these run. Large has one definition, the same one `loki start owner/repo#N` uses: an epic label (`epic`, `umbrella`, `tracking` or `meta`), or at least two of 4 or more solution parts, 4 or more acceptance criteria, and both a backend and a frontend named. A large issue is split into slices that each run on their own (the reason says `runs split into slices`). Slices that do not depend on each other run at the same time (up to 4; `LOKI_EPIC_PARALLEL=1` runs them one at a time), and a slice that fails or reports a spec conflict skips only the slices built on it. Each slice opens its own draft pull request, stacked on the slice it depends on.
|
|
386
404
|
- `spec`: vague or ambiguous (no concrete target named, or an ambiguity score at the threshold). Loki drafts `.loki/specs/<slug>.md` with `loki plan --spec`, runs nothing, and prints `loki start --spec .loki/specs/<slug>.md` to run after you edit or approve it.
|
|
387
405
|
- `human`: the issue touches secrets, production or a destructive operation. Never run headless; listed with the reason. Repos without tests, UI work and infra work still run: Loki writes its own tests and verifies once at the end.
|
|
388
406
|
|