loki-mode 9.12.6 → 9.17.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 +81 -101
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/intent.sh +414 -0
- package/autonomy/issue-providers.sh +24 -0
- package/autonomy/lib/agent_readiness.py +280 -0
- package/autonomy/lib/claim_grounding.py +171 -0
- package/autonomy/lib/config-map.sh +10 -6
- package/autonomy/lib/decision_record.py +198 -0
- package/autonomy/lib/failure_memory.py +199 -0
- package/autonomy/lib/gate_policy.py +166 -0
- package/autonomy/lib/outcome_ledger.py +620 -0
- package/autonomy/lib/preedit_snapshot.py +216 -0
- package/autonomy/lib/proof-generator.py +71 -4
- package/autonomy/lib/verdict.py +204 -0
- package/autonomy/loki +430 -15
- package/autonomy/notify.sh +70 -1
- package/autonomy/provider-offer.sh +25 -1
- package/autonomy/queue-consumer.sh +290 -18
- package/autonomy/run.sh +527 -12
- package/autonomy/telemetry.sh +8 -1
- package/completions/_loki +5 -0
- package/completions/loki.bash +2 -1
- package/dashboard/__init__.py +1 -1
- package/dashboard/run.py +13 -2
- package/dashboard/scim.py +221 -0
- package/dashboard/server.py +190 -1
- package/dashboard/static/index.html +248 -55
- package/docs/GATE-FAILURE-TRIAGE.md +254 -0
- package/docs/LOOP-CANDIDATE-PROPOSAL-v1.md +167 -0
- package/docs/LOOP-HARNESS-AUDIT.md +53 -0
- package/docs/QUEUE-OPERATIONS.md +107 -0
- package/docs/VERIFICATION-COST.md +273 -0
- package/docs/WANG-PRINCIPLES-PLAN.md +1 -1
- package/loki-ts/dist/loki.js +414 -416
- package/mcp/__init__.py +1 -1
- package/mcp/_sdk_loader.py +25 -0
- package/package.json +1 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
# What our verification costs, and what it does not prove
|
|
2
|
+
|
|
3
|
+
This page exists because the most credible thing 8090 AI published was not a
|
|
4
|
+
capability claim. It was a cost:
|
|
5
|
+
|
|
6
|
+
> "the most common failure mode of vendor evaluation frameworks is to promise
|
|
7
|
+
> that no operational burden falls on the customer team. That promise is
|
|
8
|
+
> incompatible with a measurement signal that survives audit. The eval that
|
|
9
|
+
> costs nothing to run is, in our experience, the eval that cannot be defended
|
|
10
|
+
> in a regulatory inspection."
|
|
11
|
+
|
|
12
|
+
They name a seven-minute-per-document human cost, a 50-document golden dataset,
|
|
13
|
+
and several days per quarter of recalibration, and they refuse to automate the
|
|
14
|
+
one human signal away. That refusal is what makes the rest of their numbers
|
|
15
|
+
believable.
|
|
16
|
+
|
|
17
|
+
So here are ours. Every figure below was measured on this repository, and the
|
|
18
|
+
command that produces it is given so you can measure it yourself and get a
|
|
19
|
+
different answer on your hardware.
|
|
20
|
+
|
|
21
|
+
## Measured cost
|
|
22
|
+
|
|
23
|
+
| Check | Cost | How it was measured |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| FULL local gate | 23 to 26 minutes | `LOCAL_CI_TIER=full bash scripts/local-ci.sh`, 166 checks, five runs on an M-series Mac |
|
|
26
|
+
| FAST local gate | about 1 minute | `bash scripts/local-ci.sh`, the documented pre-push tier |
|
|
27
|
+
| Shell suite, sharded | 352 seconds | 323 suites, `LOCAL_CI_SHARDS=4`; 1440 seconds serial, so 4.1x |
|
|
28
|
+
| `loki outcomes` | under 1 second per receipt | `git blame` and one `git log` per changed file |
|
|
29
|
+
| `loki intent status` | milliseconds | hash comparison against `.loki/spec/spec.lock` |
|
|
30
|
+
| Agent readiness | milliseconds | filesystem checks only, no network |
|
|
31
|
+
| Pre-edit snapshot | one `git diff` per run | write-once, at agent stop |
|
|
32
|
+
|
|
33
|
+
The FULL gate is the honest headline: **a full verification run costs about 25
|
|
34
|
+
minutes of wall clock**. We do not offer a mode that makes that free, because
|
|
35
|
+
the checks that take the time are the ones doing the work.
|
|
36
|
+
|
|
37
|
+
## What our verification does NOT prove
|
|
38
|
+
|
|
39
|
+
Stated as plainly as we can, because a limits section that reads like marketing
|
|
40
|
+
is worse than none.
|
|
41
|
+
|
|
42
|
+
**A receipt is not proof the code is correct.** It proves a specific diff was
|
|
43
|
+
subjected to specific checks and records what each returned. A change can pass
|
|
44
|
+
every gate and still be wrong.
|
|
45
|
+
|
|
46
|
+
**The unsigned receipt path is forgeable.** Someone who rewrites both the facts
|
|
47
|
+
and the headline into a mutually consistent lie and recomputes the hash will
|
|
48
|
+
pass verification. That is defense in depth, not non-forgeability. Neutral
|
|
49
|
+
non-forgeability requires the signed path
|
|
50
|
+
(`LOKI_PROOF_GPG_KEY`, see [SIGNED-RECEIPTS.md](SIGNED-RECEIPTS.md)). We removed
|
|
51
|
+
our own "non-forgeable" claim in v7.111.0 after finding it false on that path.
|
|
52
|
+
|
|
53
|
+
**Only four of the eight quality gates are agent-independent.** Static analysis,
|
|
54
|
+
mock-integrity, test-mutation and documentation coverage do not ask a model
|
|
55
|
+
anything. The other four involve model judgment and are labelled ASSESSMENTS
|
|
56
|
+
rather than FACTS in every receipt.
|
|
57
|
+
|
|
58
|
+
**Verification cannot prove the spec was right.** This is the sharpest limit and
|
|
59
|
+
it is structural. Our gates prove code matches spec; if the spec diverged from
|
|
60
|
+
what you actually wanted, a passing gate is a correct answer to the wrong
|
|
61
|
+
question. `loki intent` measures that divergence where an intent has been
|
|
62
|
+
recorded, and reports UNKNOWN where it has not, which is most runs today.
|
|
63
|
+
|
|
64
|
+
**`loki outcomes` reports UNKNOWN on most existing receipts.** Measured on this
|
|
65
|
+
repository: 0 of 9 receipts are anchored, because 8 carry no recorded baseline
|
|
66
|
+
and 1 uses the empty-tree sha. A receipt is measured only when sha algebra
|
|
67
|
+
proves `base..head` is that change. We would rather print UNKNOWN than a
|
|
68
|
+
change-failure rate of 0.0 that no data supports.
|
|
69
|
+
|
|
70
|
+
**Generation is not air-gapped.** The verification path is local and offline;
|
|
71
|
+
generating code calls a model provider.
|
|
72
|
+
|
|
73
|
+
**We have no independent benchmark placement and no enterprise case studies.**
|
|
74
|
+
Neither exists yet. When they do they will be linked here, and until then their
|
|
75
|
+
absence is not evidence of anything except their absence.
|
|
76
|
+
|
|
77
|
+
## What we refuse to build
|
|
78
|
+
|
|
79
|
+
Each of these would look good in a comparison table and would make the numbers
|
|
80
|
+
above less trustworthy:
|
|
81
|
+
|
|
82
|
+
- **A semantic fidelity score.** Asking a model whether a spec expresses an
|
|
83
|
+
intent and printing a percentage is a judgment wearing the costume of a
|
|
84
|
+
measurement.
|
|
85
|
+
- **A composite trust score.** Averaging a revert count, a hash comparison, a
|
|
86
|
+
path match and a model id yields a number whose movement nobody can explain.
|
|
87
|
+
- **A readiness percentage.** "There is no test command" tells you what to do.
|
|
88
|
+
"Readiness 62%" does not.
|
|
89
|
+
- **Any gate that punishes an agent for needing human edits.** It would train
|
|
90
|
+
the agent toward diffs nobody edits, which is not the same as good diffs.
|
|
91
|
+
|
|
92
|
+
## Check any of this yourself
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
LOCAL_CI_TIER=full bash scripts/local-ci.sh # the full gate, timed
|
|
96
|
+
loki outcomes --json # post-merge outcomes, or UNKNOWN with reasons
|
|
97
|
+
loki intent status --json # spec-vs-intent drift
|
|
98
|
+
loki proof verify <id> # re-hash a receipt, exit 1 on tamper
|
|
99
|
+
bash tests/test-competitor-verify-surface.sh # the competitor CLI measurement
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
If a number here does not reproduce on your machine, that is a defect and we
|
|
103
|
+
want the report.
|
|
104
|
+
|
|
105
|
+
## How we compare, and what we cannot measure
|
|
106
|
+
|
|
107
|
+
A goal was set to be "2-10x better than factory.ai, cognition devin, 8090.ai
|
|
108
|
+
and replit". This section reports what is measurable and refuses the rest.
|
|
109
|
+
|
|
110
|
+
### What is NOT benchmarked, and why
|
|
111
|
+
|
|
112
|
+
None of those four products has a runnable local arm. Checked on this machine:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
droid NOT installed devin NOT installed
|
|
116
|
+
replit NOT installed
|
|
117
|
+
claude on PATH aider on PATH
|
|
118
|
+
codex on PATH loki on PATH
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Devin and 8090 are hosted services with no CLI. Factory's droid and Replit run
|
|
122
|
+
cloud-side. `benchmarks/bench/adapters/` can drive a competing arm as a
|
|
123
|
+
subprocess (`claude_code.py` invokes `claude -p` live), but it cannot drive a
|
|
124
|
+
product that has no local binary.
|
|
125
|
+
|
|
126
|
+
**So there is no "2-10x vs Factory/Devin/8090/Replit" number here, and any such
|
|
127
|
+
figure elsewhere should be treated as unearned.** Publishing one would be the
|
|
128
|
+
same error as sourcing a colour token from a frontend that does not ship: a
|
|
129
|
+
number that looks authoritative and measures something else.
|
|
130
|
+
|
|
131
|
+
### What IS measured: the verification surface
|
|
132
|
+
|
|
133
|
+
`tests/test-competitor-verify-surface.sh`, run on this machine:
|
|
134
|
+
|
|
135
|
+
> **5 installed competitor CLIs. 0 expose an output-verification command.**
|
|
136
|
+
|
|
137
|
+
That is not a multiplier, it is a category. The comparison is not "our
|
|
138
|
+
verification is faster" but "there is nothing on the other side to compare
|
|
139
|
+
against". Re-run it yourself; it names each CLI it checked and SKIPs the ones
|
|
140
|
+
it could not find rather than counting them as absent.
|
|
141
|
+
|
|
142
|
+
### What the competitors say about verification, in their own words
|
|
143
|
+
|
|
144
|
+
Verbatim, with the file each came from, so every line is checkable against the
|
|
145
|
+
scraped corpora:
|
|
146
|
+
|
|
147
|
+
| Source | Their words |
|
|
148
|
+
|---|---|
|
|
149
|
+
| `factory_ai/docs.factory.ai_missions_overview.md` | "**How do you maximize correctness?** Long-running plans accumulate errors." -- published as an OPEN QUESTION |
|
|
150
|
+
| `factory_ai/docs.factory.ai_missions_overview.md` | "Without it, the mission **cannot reliably verify its own work**" (Missions require repo readiness Level 4+) |
|
|
151
|
+
| `devin_cognition_ai/docs.devin.ai_admin_security.md.md` | "it can still experience **hallucinations, introduce bugs into code**, or suggest insecure code" |
|
|
152
|
+
| `8090_ai/www.8090.ai_terms-of-service.md` | "**HUMAN REVIEW AND VERIFICATION OF ALL OUTPUT**" required, while the same ToS caps liability at "FIFTY US DOLLARS" and disclaims "ACCURACY" |
|
|
153
|
+
|
|
154
|
+
Factory's is the most honest of the four: they name verification as an open
|
|
155
|
+
research question rather than a solved feature, and they state that
|
|
156
|
+
self-verification is a property of the ENVIRONMENT, not of the agent. We agree,
|
|
157
|
+
which is why `loki readiness` measures the repo and not the model.
|
|
158
|
+
|
|
159
|
+
### The claim we will actually defend
|
|
160
|
+
|
|
161
|
+
Not a multiplier. A receipt you can recompute:
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
loki proof verify <id> # re-hash the receipt; exit 1 on tamper
|
|
165
|
+
loki outcomes --json # anchored, or UNKNOWN with a named reason
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Against "human review and verification of all output" and "cannot reliably
|
|
169
|
+
verify its own work", an anchored receipt is a categorical difference. It is
|
|
170
|
+
also falsifiable: if `loki outcomes` reports UNKNOWN, we say UNKNOWN. On this
|
|
171
|
+
repo it reported ANCHORED 0 of 9 for weeks, and the fix
|
|
172
|
+
(`facts.git.base_sha` was empty) is in the history.
|
|
173
|
+
|
|
174
|
+
### Honest limits on this section
|
|
175
|
+
|
|
176
|
+
- The verify-surface count is a check for a COMMAND, not for internal
|
|
177
|
+
verification a product may do without exposing it. A hosted product could
|
|
178
|
+
verify server-side and expose nothing to a CLI.
|
|
179
|
+
- It measures what is installed HERE. A CLI absent from this machine is
|
|
180
|
+
reported as SKIP, never as a competitor that lacks the feature.
|
|
181
|
+
- Nothing here measures build quality, speed, or cost against those four.
|
|
182
|
+
Those comparisons are not available to us and are not claimed.
|
|
183
|
+
|
|
184
|
+
### Measured: what the harness is worth, model held constant
|
|
185
|
+
|
|
186
|
+
The one comparison we CAN run. `benchmarks/bench/matrix.sh` defines two
|
|
187
|
+
configs against the same task and the same model:
|
|
188
|
+
|
|
189
|
+
- `baseline` -- raw model, minimal orchestration (in-repo comment: "the
|
|
190
|
+
Replit/Cursor mode")
|
|
191
|
+
- `full` -- the harness: council, code review, self-heal, auto-tune
|
|
192
|
+
|
|
193
|
+
Paired on identical tasks, both arms on `haiku`, from
|
|
194
|
+
`benchmarks/bench/results/`:
|
|
195
|
+
|
|
196
|
+
| Task | harness (`full`) | raw model (`baseline`) | verdict |
|
|
197
|
+
|---|---|---|---|
|
|
198
|
+
| `hard-2-ledger` | **4/4**, $0.89 | **0/4**, $0.19 | harness wins outright |
|
|
199
|
+
| `hard-1-order-api` | 3 runs, 1.00, $0.58 | 1 run, 1.00, $0.20 | harness cost 2.8x for nothing |
|
|
200
|
+
| `multifail-1-two-modules` | 2 runs, 1.00, $0.27 | 1 run, 1.00, $0.14 | harness cost 1.9x for nothing |
|
|
201
|
+
|
|
202
|
+
**Two of the three paired tasks are UNFAVOURABLE to the harness.** That is the
|
|
203
|
+
honest headline, and it is narrower than "the harness is worth more than the
|
|
204
|
+
model":
|
|
205
|
+
|
|
206
|
+
**The harness matters on hard tasks and is pure overhead on easy ones.**
|
|
207
|
+
|
|
208
|
+
On `hard-2-ledger` the raw model never finished the task across 4 trials and
|
|
209
|
+
the harness finished it every time. That is not a percentage improvement; the
|
|
210
|
+
baseline success rate is zero. It cost 4.7x more per run and produced a working
|
|
211
|
+
result instead of nothing.
|
|
212
|
+
|
|
213
|
+
On the other two, both arms succeed and the harness simply costs 1.9x-2.8x
|
|
214
|
+
more. We publish those rows because the direction is unfavourable to us, and a
|
|
215
|
+
benchmark table that only survives its favourable rows is an advertisement.
|
|
216
|
+
|
|
217
|
+
**Two further baseline cells were attempted and produced NO data.**
|
|
218
|
+
`tokenheavy-1-crm` (2 trials) and a wider `hard-1-order-api` (3 trials) both hit
|
|
219
|
+
the 1200s cell timeout, which caps all trials of a cell together. The harness
|
|
220
|
+
wrote no result file and the runner said so:
|
|
221
|
+
|
|
222
|
+
> WARNING: cell haiku-baseline / tokenheavy-1-crm wrote NO new result (likely
|
|
223
|
+
> timed out at 1200s). This cell is MISSING from the report.
|
|
224
|
+
|
|
225
|
+
They are absent from the table rather than counted as failures. A timeout is
|
|
226
|
+
not evidence the raw model cannot do the task; it is evidence we did not
|
|
227
|
+
measure it. Reporting them as baseline losses would have made the harness look
|
|
228
|
+
better on data that does not exist.
|
|
229
|
+
|
|
230
|
+
An earlier version of this section reported only the first two tasks and read
|
|
231
|
+
as a stronger claim than the data supported. The `multifail` baseline arm was
|
|
232
|
+
run afterwards specifically to test whether the claim would survive more data.
|
|
233
|
+
It did not survive intact, and the table was corrected rather than the
|
|
234
|
+
measurement dropped.
|
|
235
|
+
|
|
236
|
+
Aggregate across all recorded cells:
|
|
237
|
+
|
|
238
|
+
| Cell | n | success (median) | cost (median) |
|
|
239
|
+
|---|---|---|---|
|
|
240
|
+
| `haiku` + harness | 11 | 1.00 | $0.54 |
|
|
241
|
+
| `opus` + baseline | 5 | 1.00 | $0.83 |
|
|
242
|
+
| `haiku` + baseline | 8 | 0.50 | $0.19 |
|
|
243
|
+
|
|
244
|
+
The cheap model WITH the harness matches the expensive model without it, at
|
|
245
|
+
35% lower cost. Treat that as directional, not as a headline: the task sets
|
|
246
|
+
differ between those three cells, which is exactly why the paired table above
|
|
247
|
+
is the one that carries the argument.
|
|
248
|
+
|
|
249
|
+
**Limits of this measurement, stated so it cannot be over-read:**
|
|
250
|
+
|
|
251
|
+
- Two paired tasks. `hard-1-order-api`'s baseline arm is n=1.
|
|
252
|
+
- It measures OUR harness against OUR baseline config. `baseline` is a
|
|
253
|
+
documented stand-in for "raw model, minimal orchestration", NOT a
|
|
254
|
+
measurement of Replit, Cursor, or any other product.
|
|
255
|
+
- Success is a held-out acceptance exit code, not a judgement of code quality.
|
|
256
|
+
- Reproduce it: `LOKI_BENCH_SPEND_APPROVED=1 bash benchmarks/bench/matrix.sh pilot`.
|
|
257
|
+
The spend interlock is default-deny on purpose; a benchmark that starts a
|
|
258
|
+
paid tool without an explicit opt-in is how a surprise bill happens.
|
|
259
|
+
|
|
260
|
+
**The exclusion rule, observed on a live run rather than asserted.** A fresh
|
|
261
|
+
`haiku-full` trial on `hard-1-order-api` (2026-08-07) hit the 1200s adapter
|
|
262
|
+
timeout. The held-out grader inspected the workdir and returned
|
|
263
|
+
`success: true` -- there WAS a passing artifact. The harness still recorded
|
|
264
|
+
`measured: false`, `unmeasured_reasons: ["adapter exit_status=timeout"]`, and
|
|
265
|
+
excluded the trial from k/N, with this note in the result file:
|
|
266
|
+
|
|
267
|
+
> "the held-out grader's own verdict on whatever was in the workdir. Real
|
|
268
|
+
> evidence about the ARTIFACT; NOT evidence that a run happened."
|
|
269
|
+
|
|
270
|
+
A naive harness scores that 1/1. Ours scores it 0/0 and says why, so the
|
|
271
|
+
`hard-1-order-api` row above stayed at n=3 instead of being inflated to n=4 by
|
|
272
|
+
a run that never finished. The number in this document is smaller because of
|
|
273
|
+
that rule, which is the point of having it.
|
|
@@ -53,7 +53,7 @@ Measured on this machine, not asserted.
|
|
|
53
53
|
| **1 Systems Thinking** | STRONG | 8 quality gates, RARV-C loop, council, Evidence Receipt, dual-route parity enforced by test |
|
|
54
54
|
| **2 Speed** | MEASURED, UNOPTIMISED | agent call = **980s = 96%** of iteration; all gates together = 44s |
|
|
55
55
|
| **3 Reliability** | STRONG, newly so | 73 mutation-proven trust invariants; four gates were shipping broken until v8.38.0 |
|
|
56
|
-
| **4 Extensibility** | STRONG | 4 providers, 41 agent types, MCP (
|
|
56
|
+
| **4 Extensibility** | STRONG | 4 providers, 41 agent types, MCP (36 tools), plugin marketplace |
|
|
57
57
|
| **5 Feedback Loops / Evals** | **BROKEN** | `cost_usd == 0` on **3 of 5** efficiency records; no eval score for our own harness |
|
|
58
58
|
|
|
59
59
|
**Principle 5 is the gap, and it is the one Wang weights highest.** He states the
|