loki-mode 7.129.4 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +81 -5
  2. package/SKILL.md +66 -5
  3. package/VERSION +1 -1
  4. package/autonomy/app-runner.sh +37 -0
  5. package/autonomy/completion-council.sh +862 -28
  6. package/autonomy/council-v2.sh +39 -0
  7. package/autonomy/crash.sh +3 -2
  8. package/autonomy/grill.sh +42 -0
  9. package/autonomy/hooks/validate-bash.sh +301 -4
  10. package/autonomy/lib/cockpit-render.sh +8 -2
  11. package/autonomy/lib/cr-rematerialize.py +101 -4
  12. package/autonomy/lib/deadline.py +957 -0
  13. package/autonomy/lib/dependency-setup.sh +205 -0
  14. package/autonomy/lib/done-recognition.sh +45 -0
  15. package/autonomy/lib/efficiency_cost.py +13 -6
  16. package/autonomy/lib/no_mock_scan.py +793 -0
  17. package/autonomy/lib/prd-enrich.sh +42 -0
  18. package/autonomy/lib/proof-analytics-props.py +69 -0
  19. package/autonomy/lib/proof-generator.py +282 -95
  20. package/autonomy/lib/proof-template.html +15 -12
  21. package/autonomy/lib/proof-verify.py +151 -102
  22. package/autonomy/lib/requirements_contract.py +848 -0
  23. package/autonomy/lib/sdk-mode.sh +103 -0
  24. package/autonomy/lib/secret-scan.sh +139 -0
  25. package/autonomy/lib/spec-expand.sh +208 -0
  26. package/autonomy/lib/tree_digest.py +266 -0
  27. package/autonomy/lib/voter-agents.sh +58 -8
  28. package/autonomy/lib/workspace_diff.py +124 -0
  29. package/autonomy/loki +189 -17
  30. package/autonomy/playwright-verify.sh +501 -0
  31. package/autonomy/prd-checklist.sh +17 -8
  32. package/autonomy/provider-offer.sh +111 -0
  33. package/autonomy/run.sh +4424 -678
  34. package/autonomy/sandbox.sh +42 -0
  35. package/autonomy/spec-interrogation.sh +148 -5
  36. package/autonomy/spec.sh +118 -1
  37. package/autonomy/telemetry.sh +133 -7
  38. package/autonomy/verify.sh +107 -0
  39. package/bin/loki +110 -3
  40. package/completions/_loki +10 -0
  41. package/completions/loki.bash +1 -1
  42. package/dashboard/__init__.py +1 -1
  43. package/dashboard/audit.py +96 -7
  44. package/dashboard/build_supervisor.py +1619 -0
  45. package/dashboard/control.py +8 -0
  46. package/dashboard/prompt_optimizer.py +7 -0
  47. package/dashboard/server.py +577 -22
  48. package/dashboard/static/trust.html +1 -1
  49. package/docs/ARCHITECTURE-OVERVIEW.md +207 -0
  50. package/docs/AUTONOMI-ECOSYSTEM.md +107 -0
  51. package/docs/INSTALLATION.md +19 -2
  52. package/docs/MODEL-EQUIVALENCE-HARNESS-PLAN.md +70 -0
  53. package/docs/PLANS-INDEX.md +33 -0
  54. package/docs/PRIVACY.md +29 -1
  55. package/docs/SIGNED-RECEIPTS.md +102 -0
  56. package/docs/SONNET5-DEFAULT-PLAN.md +1 -1
  57. package/docs/V8-ACCEPTANCE-TRIAGE-2026-07-24.md +114 -0
  58. package/docs/V8-AGENT-SDK-PLAN.md +692 -0
  59. package/docs/V8-COMPLEXITY-AUDIT-2026-07-24.md +45 -0
  60. package/docs/V8-MAJOR-RELEASE-PLAN.md +137 -0
  61. package/docs/V8-OVERNIGHT-PLAN-2026-07-25.md +82 -0
  62. package/docs/V8-RUNTIME-TRUTH-2026-07-25.md +232 -0
  63. package/docs/V8-SDK-RESEARCH-RAW.md +129 -0
  64. package/docs/alternative-installations.md +4 -4
  65. package/loki-ts/dist/loki.js +674 -285
  66. package/loki-ts/package.json +2 -0
  67. package/mcp/__init__.py +1 -1
  68. package/package.json +7 -6
  69. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  70. package/providers/claude.sh +75 -0
  71. package/providers/codex.sh +85 -13
  72. package/references/sdk-mode.md +106 -0
  73. package/skills/model-selection.md +1 -1
  74. package/skills/quality-gates.md +22 -0
@@ -0,0 +1,114 @@
1
+ # v8 acceptance-test triage (partial, in progress)
2
+
3
+ Date: 2026-07-24. Read-only audit against the v8 competitive plan (P2).
4
+ Method: source-verified only. A filename containing a relevant word does NOT
5
+ count as EXISTS; the assertion or enforcing code must be read.
6
+
7
+ ## Why this triage exists
8
+
9
+ Source 08 proposes 26 release-blocking acceptance tests. The plan's P2 says
10
+ triage them EXISTS / PARTIAL / NET-NEW before treating any as work, because
11
+ three earlier "gaps" from the same research corpus turned out already shipped
12
+ (evidence-in-PR, the offline verifier, stuck-detection signals). Writing this as
13
+ "add 26 tests" would repeat that error at 26x scale.
14
+
15
+ Repo has 456 files under `tests/`.
16
+
17
+ ## Verified so far
18
+
19
+ | # | Test | Verdict | Evidence |
20
+ |---|---|---|---|
21
+ | 15 | empty diff != complete | **EXISTS** | `tests/test-evidence-gate.sh` enumerates 13 gate cases including case 2 "empty diff (baseline==HEAD, clean) -> BLOCK (rc 1), reason empty_diff" (`:21`), case 10 "empty diff + red tests -> BLOCK, reason empty_diff_and_tests_red" (`:29`), case 13 "truly-empty run (no untracked) -> BLOCK, reason empty_diff" (`:32`). Enforced in `autonomy/lib/proof-generator.py:1238` ("A non-empty diff is a PREREQUISITE for VERIFIED") and `autonomy/verify.sh:2067` ("empty diff yields CONCERNS (nothing to verify), never VERIFIED"). Note `test-evidence-gate.sh:126` explicitly guards against a false-pass where `.loki/` being untracked would mask the empty-diff BLOCK. |
22
+ | 19 | unhealthy app != complete | **EXISTS** | `tests/test-evidence-boot-axis.sh` drives the REAL `council_evidence_gate` (sourced from `autonomy/completion-council.sh`, not a mock) with synthetic app-runner fixtures, isolating the boot axis by making the diff and test axes pass. Contract (`:2-7`): a SERVEABLE app confirmed unhealthy -> BLOCK; a non-web project (no serveable runner) or an un-probed one -> inconclusive pass-through, so a CLI/library build cannot deadlock. Health source is `.loki/app-runner/health.json` written by `app_runner_health_check`. |
23
+
24
+ | 20 | stale/forged evidence != new run | **EXISTS (partial, honestly scoped)** | `tests/test-proof-forgery-defense.sh` locks THREE facts about `proof-verify.py` (v7.111.0) and is deliberately explicit that the non-forgeability gap is MITIGATED AND RELABELED, NOT closed: (a) genuine proof -> `ok:true, headline_consistent:true`; (b) INCONSISTENT forgery (headline flipped to VERIFIED, facts left `not_run`, hash recomputed) -> `ok:false, headline_consistent:false`; (c) CONSISTENT forgery on the UNSIGNED path -> STILL `ok:true`, reporting `generator_trusted:true`. |
25
+
26
+ | 16 | failing tests != complete | **EXISTS** | `tests/test-evidence-gate-rc.sh` guards `_evidence_gate_and_surface()` (`autonomy/run.sh:10168`) rc propagation: a failing evidence gate must propagate its exact non-zero rc out of the wrapper, preserving the caller's `! council_evidence_gate` elif-chain semantics byte-for-byte. Written because the wrapper's own rc propagation had never been driven against the real function body (another test stubs it out), so a regression returning 0 unconditionally would have swallowed the gate. |
27
+ | 17 | fake test output cannot satisfy gate | **EXISTS** | `tests/test-enforce-mutation-integrity.sh` drives `enforce_mutation_integrity()` (`autonomy/run.sh:10505`) against a REAL project fixture with an actual HIGH-severity finding. Wraps `tests/detect-test-mutations.sh` (Quality Gate 9) with `--block-high`; blocks the iteration (rc 1) iff output has at least one `[HIGH]` line, else rc 0 with MEDIUM/LOW routed to an advisory findings file. Explicitly guards the threat model: "a test-fitted commit (assertions mutated to match buggy output) sail[ing] through completion ungated". |
28
+ | 18 | mock-only cannot satisfy prod completion | **EXISTS** | `tests/test-nomock-data-render.sh` drives both `autonomy/verify.sh` and `autonomy/completion-council.sh` against real fixtures, distinguishing legitimate static content catalogs from mock OPERATIONAL data (so a docs/content site is not false-failed while a mock-backed app is not false-passed). |
29
+ | 24 | trust-core regressions pass | **EXISTS** | `tests/test-completion-council-affirmative-evidence.sh` locks the v7.41.5 trust-gate inversion: `council_evaluate_member` now requires AFFIRMATIVE positive evidence before voting COMPLETE. |
30
+
31
+ ### Note: item 24 documents a real historical false-green
32
+
33
+ Before v7.41.5, `council_evaluate_member` DEFAULTED to vote=COMPLETE and only
34
+ flipped to CONTINUE on a DETECTED failure. On a greenfield run with an empty
35
+ `.loki/` (no test results, no queue, few TODO files), `requirements_verifier`
36
+ and `devils_advocate` both defaulted COMPLETE while only `test_auditor` went
37
+ CONTINUE, so 2-of-3 cleared the size-3 threshold and the council approved a
38
+ project with ZERO positive evidence. The fix inverts the default to CONTINUE
39
+ and votes COMPLETE only on a real positive signal (shared base:
40
+ `.loki/quality/test-results.json` present AND not red).
41
+
42
+ This matters for positioning: it is a documented, fixed instance of exactly the
43
+ failure class the moat claims to prevent, found and closed by the project
44
+ itself. It is also a caution - the moat is an ongoing engineering commitment,
45
+ not a property the architecture grants for free.
46
+
47
+ ### Note: item 20's test is itself moat evidence
48
+
49
+ Case (c) is a test written to STOP THE PROJECT OVERCLAIMING ITS OWN SECURITY. It
50
+ asserts that a forger who rewrites both the facts and the headline into a
51
+ mutually consistent lie and recomputes the hash STILL PASSES on the unsigned
52
+ path. Neutral non-forgeability requires the signed record. This is the same
53
+ honesty-engineering signal as the v7.111.0 removal of Loki's own false
54
+ "non-forgeable" claim, and it is rare: most projects test that their defense
55
+ works, not that it does not work as well as marketing might imply.
56
+
57
+ Direct consequence for the plan: it names exactly what receipt SIGNING buys
58
+ (neutral non-forgeability against a consistent forger), which is the remaining
59
+ half of the "sign the receipt" item. The verifier and GPG path already exist in
60
+ `autonomy/lib/proof-verify.py` (`_verify_gpg`); what is missing is key
61
+ distribution and a signed-by-default path, not the mechanism.
62
+
63
+ ## Additional corroborating tests (not yet read, listed to avoid re-derivation)
64
+
65
+ The verdicts above rest on the assertions cited. These further files also bear
66
+ on the same items and would deepen (not change) the verdicts:
67
+ `test-evidence-gate-no-tests.sh`, `test-completion-route-evidence-gate.sh`
68
+ (#16); `detect-test-mutations.sh` (#17); `detect-mock-problems.sh` (#18);
69
+ `tests/test_proof_verify.py`, `test-completion-signal-consume.sh` (#20);
70
+ `test-iteration-complete-accuracy.sh` (#24).
71
+
72
+ ## Known NET-NEW (verified elsewhere this session)
73
+
74
+ - **#3 no SDK-full silent fallback to legacy** and the stuck/stagnation coverage:
75
+ **RESOLVED 2026-07-25, this section is kept for history.** When written, the
76
+ stagnation and done-signal force-stop valves were NOT active on the TS/SDK
77
+ route (`trackIteration` wrote placeholder zeros) while bash had both
78
+ (`autonomy/completion-council.sh:4519`, `:4528`), making the port a hard
79
+ prerequisite of the SDK-default flip.
80
+
81
+ Both valves were ported in commit `5c3d2769` and now run on the TS route,
82
+ persisting counters to `.loki/council/state.json` so they survive a runner
83
+ restart (`loki-ts/src/runner/council.ts`). Fail-closed behavior for #3 was
84
+ separately source-verified in `docs/V8-RUNTIME-TRUTH-2026-07-25.md`: there is
85
+ no CLI fallback branch, and `sawResult ? exitCode : 1` means a stream that
86
+ never produced a terminal result is a FAILED iteration.
87
+
88
+ Note also that this document's related claim about SDK **session continuity**
89
+ blocking the flip was later found FALSE and corrected in `c31f6f20` -- legacy
90
+ session stamping is default-OFF and emits a per-iteration DISTINCT uuid, so it
91
+ never provided cross-iteration continuity either. No capability regression
92
+ blocks the flip; the remaining gate is the untested acceptance items.
93
+
94
+ ## Honest status
95
+
96
+ INCOMPLETE but no longer thin. 7 of 26 assertion-verified: items 15, 16, 17, 18,
97
+ 19, 20, 24 all EXISTS; the stuck/stagnation axis is NET-NEW on the TS route.
98
+
99
+ **The pattern is now strong enough to state as a finding:** every trust-core
100
+ acceptance test the research proposed as new work already exists, and several
101
+ are more rigorous than the proposal (they drive real function bodies rather than
102
+ mocks, and two of them exist specifically to prevent the project overclaiming).
103
+ The research's "26 release-blocking tests to add" framing was wrong for this
104
+ bucket. Remaining NET-NEW risk is concentrated in the SDK/TS runtime items, not
105
+ in the trust core.
106
+
107
+ Not yet triaged: 1-14, 21, 22, 23, 25, 26. Items 1-14 concern SDK runtime truth,
108
+ crash/resume, cancel, sandbox cleanup, secrets and network isolation; several
109
+ are likely PARTIAL and are downstream of the Phase-0 runtime-truth audit anyway.
110
+
111
+ Published partial rather than padded: a plausible-looking full table with
112
+ unverified rows is worse than an admitted gap, which is the exact failure mode
113
+ this plan exists to avoid. Two delegated audit agents returned no findings; all
114
+ verdicts here were verified by reading source directly.