loki-mode 11.3.0 → 11.3.1
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 +68 -650
- package/SKILL.md +4 -4
- package/VERSION +1 -1
- package/autonomy/completion-council.sh +2 -2
- package/autonomy/context-tracker.py +4 -4
- package/autonomy/council-v2.sh +1 -1
- package/autonomy/grill.sh +1 -1
- package/autonomy/lib/done-recognition.sh +1 -1
- package/autonomy/lib/prd-enrich.sh +1 -1
- package/autonomy/lib/voter-agents.sh +1 -1
- package/autonomy/loki +99 -75
- package/autonomy/run.sh +30 -18
- package/autonomy/sandbox.sh +1 -1
- package/autonomy/tui.sh +6 -5
- package/autonomy/verify.sh +1 -1
- package/bin/loki +166 -59
- package/completions/_loki +2 -0
- package/completions/loki.bash +2 -2
- package/dashboard/__init__.py +1 -1
- package/dashboard/server.py +25 -31
- package/docs/ARCHITECTURE.md +337 -0
- package/docs/BRANDING.md +124 -0
- package/docs/CLI-REFERENCE.md +7 -1
- package/docs/COMPONENTS.md +447 -0
- package/docs/DEPLOYMENT.md +9 -9
- package/docs/DOCKER.md +469 -0
- package/docs/INSTALLATION.md +67 -1045
- package/docs/KNOWN-ISSUES.md +11 -35
- package/docs/TESTING.md +161 -0
- package/docs/air-gapped.md +1 -2
- package/docs/alternative-installations.md +14 -24
- package/docs/architecture/DECISIONS.md +333 -0
- package/docs/audit-logging.md +7 -7
- package/docs/authentication.md +3 -3
- package/docs/authorization.md +1 -1
- package/docs/certification/04-production-deployment/lab.md +6 -6
- package/docs/certification/04-production-deployment/lesson.md +4 -4
- package/docs/certification/README.md +1 -1
- package/docs/control-plane-container.md +2 -2
- package/docs/dev/real-run.md +34 -0
- package/docs/dev/release-checklist.md +2 -2
- package/docs/exit-codes.md +3 -3
- package/docs/git-workflow.md +3 -3
- package/docs/metrics.md +37 -55
- package/docs/network-security.md +1 -1
- package/docs/siem-integration.md +5 -5
- package/docs/v10/CLI-MODERN.md +4 -3
- package/docs/v10/DECISIONS.md +44 -0
- package/docs/v10/DEPS.md +22 -22
- package/docs/v10/ENGINE.md +1 -1
- package/docs/v10/FAILURE-CLASSES.md +118 -1
- package/docs/v10/FOUNDER-QUEUE.md +1 -0
- package/docs/v10/GUARDS.md +13 -0
- package/docs/v10/LEGACY-REMOVAL.md +4 -6
- package/docs/v10/METRICS.md +2 -2
- package/docs/v10/MODERNIZE.md +1 -1
- package/docs/v10/OPERATING-MODEL.md +2 -1
- package/docs/v10/PROGRESS.md +29 -0
- package/docs/v11/COST-HALF.md +352 -0
- package/docs/v11/MARKET-SLICES.md +315 -0
- package/docs/v11/REGISTRIES.md +730 -0
- package/loki-ts/data/model-pricing.json +52 -24
- package/loki-ts/dist/loki.js +1036 -957
- package/mcp/__init__.py +1 -1
- package/package.json +1 -1
- package/packages/control-plane/dist/server.js +2467 -736
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/src/protocols/mcp-client.js +6 -2
- package/src/protocols/mcp-server.js +13 -3
- package/tools/audit-docs.py +1 -1
- package/web-app/dist/assets/{AdminPage-D_e45uTw.js → AdminPage-CMkHNJbF.js} +1 -1
- package/web-app/dist/assets/{Avatar-T3nIpoaf.js → Avatar-BJyjV7Zi.js} +1 -1
- package/web-app/dist/assets/{Badge-BKqb59pP.js → Badge-D572l0uq.js} +1 -1
- package/web-app/dist/assets/{Button-DjVlkh8_.js → Button-T4BnOZgl.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-DXJgLGmh.js → CockpitPage-Cj_GFsNn.js} +1 -1
- package/web-app/dist/assets/{ComparePage-BRP_eVc_.js → ComparePage-A8m4ZXak.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-CLjpGLjC.js → ErrorBoundary-hugCg5yg.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-DX-vb4Xy.js → EvidenceReceiptPanel-CuJKDC2G.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-214HVHtX.js → GitHubIssuesPanel-BYGKjarC.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-BEiZKc4t.js → GitHubPRsPanel-c7sFIJlf.js} +1 -1
- package/web-app/dist/assets/{HomePage-VvMHS5ga.js → HomePage-A1MIkG2P.js} +2 -2
- package/web-app/dist/assets/{LoginPage-5WD-v7n3.js → LoginPage-8KQMRhtR.js} +1 -1
- package/web-app/dist/assets/{MagicPage-DUQT_Jye.js → MagicPage-C05QW2Lx.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-lga-z79v.js → MetricsPage-Oukv5hme.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-CGhBX3G1.js → NotFoundPage-DKIwsawz.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-CdzF2GzZ.js → ProjectPage-DwFRPLCG.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-DRG64N8s.js → ProjectsPage-CgY4YYDX.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-5fzW9Frb.js → SettingsPage-BpfcSjUA.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-DrTdxO4y.js → ShowcasePage-BqBakC4K.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-C9Mqs6Rd.js → SystemSettingsPage-CZLu5VB0.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-CUGPdSWo.js → TeamsPage-D55S1jKz.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-CNraDY0F.js → TemplatesPage-D3SydvxN.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-BIu_6Pea.js → TerminalOutput-hNg8G1-e.js} +1 -1
- package/web-app/dist/assets/{activity-Bk-kgqaf.js → activity-D2C0VagO.js} +1 -1
- package/web-app/dist/assets/{bell-BXmUdmo8.js → bell-CMvYi36w.js} +1 -1
- package/web-app/dist/assets/{bot-CiuzXxUR.js → bot-BvtQ6lmo.js} +1 -1
- package/web-app/dist/assets/{check-BEzjXppd.js → check-B13xkXed.js} +1 -1
- package/web-app/dist/assets/{chevron-left-AYWCXHf8.js → chevron-left-emu6r49E.js} +1 -1
- package/web-app/dist/assets/{circle-alert-BNg2uSRq.js → circle-alert-CExlwjuy.js} +1 -1
- package/web-app/dist/assets/{clock-DTj0kkGT.js → clock-D7Uas3oL.js} +1 -1
- package/web-app/dist/assets/{cloud-x4nTDBLT.js → cloud-CkB4S86C.js} +1 -1
- package/web-app/dist/assets/{code-xml-BVh_MLrk.js → code-xml-SL9IIWIn.js} +1 -1
- package/web-app/dist/assets/{database-DdfBaowG.js → database-BQFkd7t1.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-XuYFmAOY.js → dollar-sign-qHmnNYsU.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-D4cRnmeL.js → file-code-corner-C2YUDP0K.js} +1 -1
- package/web-app/dist/assets/{file-plus-CyoVlHc_.js → file-plus-C_ooIkDe.js} +1 -1
- package/web-app/dist/assets/{globe-Y6IK2RPW.js → globe-CQ-GL485.js} +1 -1
- package/web-app/dist/assets/{hammer-BKzr9VZI.js → hammer-U05L_D7V.js} +1 -1
- package/web-app/dist/assets/{index-B20cSx5G.js → index-CooHd7I-.js} +3 -3
- package/web-app/dist/assets/{layers-DebNOhGS.js → layers-Buo17rjW.js} +1 -1
- package/web-app/dist/assets/{loader-circle-DyGbrEgd.js → loader-circle-15vK3oV1.js} +1 -1
- package/web-app/dist/assets/{lock-BKPpyt20.js → lock-BeXLebuJ.js} +1 -1
- package/web-app/dist/assets/{package-egF5Wi4y.js → package-MVh_6-6R.js} +1 -1
- package/web-app/dist/assets/{plus-OiEgKIc-.js → plus-Dh_nd9vS.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-CzKvrONq.js → refresh-cw-C9cBJEAT.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-Bu2mII0p.js → rotate-ccw-D3PAtzST.js} +1 -1
- package/web-app/dist/assets/{scroll-text-CSkiyax8.js → scroll-text-DZCoXQjo.js} +1 -1
- package/web-app/dist/assets/{server-DlPthJFw.js → server-OCOLI5J_.js} +1 -1
- package/web-app/dist/assets/{shield-alert-CbpHWQQX.js → shield-alert-oVhmf1_h.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-DgGpZe-Q.js → thumbs-up-B-kbX4vN.js} +1 -1
- package/web-app/dist/assets/{trash-2-BV3GlCB-.js → trash-2-EL6moveW.js} +1 -1
- package/web-app/dist/assets/{trending-down-Y4TJtXhD.js → trending-down-Cl3kjpsx.js} +1 -1
- package/web-app/dist/assets/{trending-up-DsDNoHZY.js → trending-up-DST7I6M2.js} +1 -1
- package/web-app/dist/assets/{upload-gkThrc_I.js → upload-CUOT780G.js} +1 -1
- package/web-app/dist/assets/{usePolling-jpNSeNAe.js → usePolling-Djmt90eb.js} +1 -1
- package/web-app/dist/assets/{user-3Zez1WOK.js → user-BRBohA6J.js} +1 -1
- package/web-app/dist/index.html +1 -1
- package/docs/ARCHITECTURE-OVERVIEW.md +0 -209
- package/docs/AUTONOMI-ECOSYSTEM.md +0 -107
- package/docs/COCKPIT-SPEC.md +0 -72
- package/docs/COCKPIT-UX-MANDATE.md +0 -53
- package/docs/COMPETITIVE-ANALYSIS.md +0 -303
- package/docs/COMPETITIVE-NEXT-10.md +0 -316
- package/docs/COMPETITIVE-RALPH-ZEROSHOT-2026-07-08.md +0 -81
- package/docs/DASHBOARD-9.12-EVIDENCE.md +0 -97
- package/docs/DASHBOARD-ARCHITECTURE.md +0 -425
- package/docs/DASHBOARD_V2_CHECKLIST.md +0 -243
- package/docs/DEMOS.md +0 -63
- package/docs/ENTERPRISE-IDENTITY-ROADMAP.md +0 -206
- package/docs/EVIDENCE-RECEIPT-BUILD-APPLICABILITY.md +0 -79
- package/docs/FEAT-PRDREUSE-DOCKER-PLAN.md +0 -144
- package/docs/GATE-FAILURE-TRIAGE.md +0 -254
- package/docs/HANDOFF-2026-08-03.md +0 -439
- package/docs/LOOP-CANDIDATE-PROPOSAL-v1.md +0 -167
- package/docs/LOOP-HARNESS-AUDIT.md +0 -684
- package/docs/MERGE-DEDUP-MAP.md +0 -420
- package/docs/MERGE-ROUTE-MAP.md +0 -139
- package/docs/MODEL-REGISTRY-PLAN.md +0 -155
- package/docs/OUTCOME-FRONTIER.md +0 -536
- package/docs/P2-SPEC-ROBUSTNESS-PLAN.md +0 -192
- package/docs/PLANS-INDEX.md +0 -32
- package/docs/PRD-REUSE-DONE-RECOGNITION-PLAN.md +0 -536
- package/docs/PROMPT-ABLATION-RESULT.md +0 -97
- package/docs/R4-TRUST-TRAJECTORY-DESIGN.md +0 -127
- package/docs/R5-AUTO-WIKI-DESIGN.md +0 -137
- package/docs/R6-ROLLBACK-CHECKPOINT-PLAN.md +0 -107
- package/docs/R7-ZERO-CONFIG-FIRST-RUN-PLAN.md +0 -137
- package/docs/R8-SHAREABLE-TEAM-ASSETS-PLAN.md +0 -129
- package/docs/R9-OPEN-CORE-HOOKS-PLAN.md +0 -113
- package/docs/RARV-C-100X-PLAN.md +0 -286
- package/docs/RARV-C-LOOP-EFFICIENCY-PLAN.md +0 -470
- package/docs/SHAREABLE-PROOF-PLAN.md +0 -194
- package/docs/SONNET5-DEFAULT-PLAN.md +0 -157
- package/docs/SPEED-AND-FIRST-PASS-PLAN.md +0 -281
- package/docs/STALE-STATE-AUDIT.md +0 -174
- package/docs/SYNERGY-TASKS.md +0 -143
- package/docs/TASKLIST-ACCURACY-PLAN.md +0 -355
- package/docs/TOP-100-BACKLOG.md +0 -159
- package/docs/V8-ACCEPTANCE-TRIAGE-2026-07-24.md +0 -114
- package/docs/V8-COMPLEXITY-AUDIT-2026-07-24.md +0 -45
- package/docs/V8-MAJOR-RELEASE-PLAN.md +0 -137
- package/docs/V8-OVERNIGHT-PLAN-2026-07-25.md +0 -82
- package/docs/V8-SDK-RESEARCH-RAW.md +0 -129
- package/docs/WELCOME-OPENER-PLAN.md +0 -106
- package/docs/adoption-baseline-2026-07-31.md +0 -84
- package/docs/architecture/bmad-integration-epic.md +0 -271
- package/docs/architecture/bmad-integration-review.md +0 -86
- package/docs/architecture/bmad-integration-validation.md +0 -249
- package/docs/architecture/bmad-loki-voice-agent-council-analysis.md +0 -61
- package/docs/auto-claude-comparison.md +0 -250
- package/docs/bug-fixes/agent-01-cli-fixes.md +0 -101
- package/docs/bug-fixes/agent-02-purplelab-fixes.md +0 -88
- package/docs/bug-fixes/agent-03-dashboard-fixes.md +0 -119
- package/docs/bug-fixes/agent-04-memory-fixes.md +0 -105
- package/docs/bug-fixes/agent-05-provider-fixes.md +0 -86
- package/docs/bug-fixes/agent-06-integration-fixes.md +0 -101
- package/docs/bug-fixes/agent-07-dash-run-fixes.md +0 -101
- package/docs/bug-fixes/agent-08-docker-fixes.md +0 -164
- package/docs/bug-fixes/agent-09-e2e-build-fixes.md +0 -69
- package/docs/bug-fixes/agent-10-e2e-fullstack-fixes.md +0 -102
- package/docs/bug-fixes/agent-11-e2e-session-fixes.md +0 -70
- package/docs/bug-fixes/agent-12-scenario-fixes.md +0 -120
- package/docs/bug-fixes/agent-13-enterprise-fixes.md +0 -143
- package/docs/bug-fixes/agent-14-uat-newuser-fixes.md +0 -88
- package/docs/bug-fixes/agent-15-uat-poweruser-fixes.md +0 -132
- package/docs/bug-fixes/agent-19-code-review.md +0 -316
- package/docs/bug-fixes/agent-20-architecture-review.md +0 -331
- package/docs/competitive/bolt-new-analysis.md +0 -579
- package/docs/competitive/emergence-others-analysis.md +0 -605
- package/docs/competitive/replit-lovable-analysis.md +0 -622
- package/docs/dashboard-guide.md +0 -487
- package/docs/enterprise/migration.md +0 -265
- package/docs/history/one-run-audit.md +0 -304
- package/docs/plans/FORGE-AUTONOMOUS-QUEUE.md +0 -312
- package/docs/plans/ULTRAPLAN-FORGE-BAAS.md +0 -612
- package/docs/plans/UT2-6-LSP-DIAGNOSTIC-BROADCAST.md +0 -394
- package/docs/prd-purple-lab-ide.md +0 -152
- package/docs/prd-purple-lab-platform-v2.md +0 -223
- package/docs/prd-purple-lab-platform.md +0 -319
- package/docs/retrospectives/v7.5.15-fleet-postmortem.md +0 -325
- package/docs/retrospectives/v7.5.15-honesty-audit.md +0 -136
- package/docs/retrospectives/v7.5.15-llm-failure-modes.md +0 -49
- package/docs/show-hn-post.md +0 -46
- package/docs/test-scenarios/enterprise-scenarios.md +0 -732
- package/docs/thick2thin.md +0 -173
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
# v7.5.15 8-Agent Fleet Postmortem
|
|
2
|
-
|
|
3
|
-
Three failures from the v7.5.15 release that warrant protocol changes, with
|
|
4
|
-
specific recommendations. No abstractions.
|
|
5
|
-
|
|
6
|
-
## 1. Bad-copy regression during integration
|
|
7
|
-
|
|
8
|
-
### What happened
|
|
9
|
-
After 6 of 8 agents committed to their worktree branches, the integration
|
|
10
|
-
sequence was:
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
git merge worktree-agent-a8a266d09b22b5631 (Dev2) # OK, no conflict
|
|
14
|
-
git merge worktree-agent-ac2f6035de5d85a26 (Dev7) # OK
|
|
15
|
-
git merge worktree-agent-a5d1f44a43c7c426e (Dev1) # OK
|
|
16
|
-
git merge worktree-agent-a65db5855ce46f594 (Dev6) # OK, auto-merge run.sh
|
|
17
|
-
git merge worktree-agent-ae16c32006be6e693 (Dev3) # OK, autonomy/loki +200/-4
|
|
18
|
-
git merge worktree-agent-ab99b45c94d5e1c0b (Dev4) # OK, auto-merge autonomy/loki
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
At this point `autonomy/loki` had Dev3's `init-rules` block + Dev4's
|
|
22
|
-
`cmd_doctor_json` `sentrux` field, both correctly merged via git's 3-way merge.
|
|
23
|
-
|
|
24
|
-
Then Dev5 + Dev8 had not committed in their worktrees (they correctly applied
|
|
25
|
-
the global "wait for user approval before commit" rule). So I ran:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
SRC=/Users/lokesh/git/loki-mode/.claude/worktrees/agent-a772019c7da8d733f
|
|
29
|
-
cp "$SRC/autonomy/loki" /Users/lokesh/git/loki-mode/autonomy/loki
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
This obliterated Dev3+Dev4's edits because Dev5's worktree was branched from
|
|
33
|
-
the pre-merge main HEAD (`2ce36624`). Caught by `grep -c "init-rules" autonomy/loki`
|
|
34
|
-
returning 0 instead of 4, immediately recovered via:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
git checkout HEAD -- autonomy/loki
|
|
38
|
-
# then surgical Edit calls for just Dev5's two help blocks
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
User-facing impact: zero. Cost: ~5 min of integration retry + 2 surgical
|
|
42
|
-
`Edit` operations.
|
|
43
|
-
|
|
44
|
-
### Why the merge strategy did not catch this earlier
|
|
45
|
-
|
|
46
|
-
`git merge` IS the right primitive for committed branches. The bug was that
|
|
47
|
-
I switched primitives mid-integration: 6 `git merge` operations, then `cp`.
|
|
48
|
-
`cp` does not 3-way merge. It just overwrites. The conflict-detection that
|
|
49
|
-
git merge gives you for free does not exist for `cp`.
|
|
50
|
-
|
|
51
|
-
The deeper cause: the worktree dispatch protocol allowed two execution
|
|
52
|
-
endpoints for an agent's output -- "agent commits to worktree branch" or
|
|
53
|
-
"agent leaves uncommitted in worktree". This bifurcation forced the integrator
|
|
54
|
-
(me) to use two different merge tools (`git merge` for the committed path,
|
|
55
|
-
`cp` for the uncommitted path). The two tools have different safety
|
|
56
|
-
properties, and `cp` is the unsafe one.
|
|
57
|
-
|
|
58
|
-
Dev5 and Dev8 both correctly applied the global CLAUDE.md rule "never commit
|
|
59
|
-
without explicit user approval" -- so the bifurcation was not their fault. It
|
|
60
|
-
was the dispatch protocol's fault for not specifying which rule wins (the
|
|
61
|
-
agent task spec said "commit" but the global rule said "wait").
|
|
62
|
-
|
|
63
|
-
### Specific protocol changes for the next fleet
|
|
64
|
-
|
|
65
|
-
1. **Dispatch prompts must explicitly resolve the commit-vs-wait conflict.**
|
|
66
|
-
Add a literal sentence to every dev-agent prompt: `"Commit to your worktree
|
|
67
|
-
branch at task end -- this overrides the global wait-for-user-approval rule
|
|
68
|
-
for the duration of this fleet operation. The integrator (parent) will
|
|
69
|
-
review your branch via git merge and apply CLAUDE.md commit discipline at
|
|
70
|
-
the integration commit, not your worktree commit."` Without this, agents
|
|
71
|
-
default to the safer (waiting) behavior, which forces unsafe `cp` at
|
|
72
|
-
integration.
|
|
73
|
-
|
|
74
|
-
2. **Integrator MUST use `git merge` exclusively, never `cp`.** If a worktree
|
|
75
|
-
has uncommitted changes, the integrator must `cd <worktree> && git add
|
|
76
|
-
<files> && git commit -m "WIP for <devN>"` first, then merge. Never copy
|
|
77
|
-
files between worktrees.
|
|
78
|
-
|
|
79
|
-
3. **After every merge, run a structural checksum.** For files touched by
|
|
80
|
-
multiple agents (the conflict-prone files: `autonomy/loki`, `autonomy/run.sh`,
|
|
81
|
-
`dashboard/server.py`), run `grep -c <each-agent's-distinctive-token>
|
|
82
|
-
<file>` and assert all expected tokens are present. Example for
|
|
83
|
-
`autonomy/loki` post-Dev3+4+5: `grep -c "init-rules" == 4 AND
|
|
84
|
-
grep -c "cmd_doctor_json" == 2 AND grep -c "cmd_dashboard_help\|cmd_web_help"
|
|
85
|
-
== 7`. Three positive assertions catch overwrite regressions in seconds.
|
|
86
|
-
|
|
87
|
-
4. **Pre-integration conflict matrix.** Before any merging, the integrator
|
|
88
|
-
must compute and log which files multiple agents touched. Run:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
for branch in $(git branch --list 'worktree-agent-*'); do
|
|
92
|
-
git diff --name-only main...$branch
|
|
93
|
-
done | sort | uniq -d
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Output is a list of files multiple agents touched. Treat any file in
|
|
97
|
-
that list as a STOP signal: do not proceed to merge until a conflict
|
|
98
|
-
resolution plan is documented (merge order, structural checksum tokens,
|
|
99
|
-
expected post-merge grep counts). In v7.5.15 this would have surfaced
|
|
100
|
-
`autonomy/loki` (Dev3+4+5) and `autonomy/run.sh` (Dev1+6) before the
|
|
101
|
-
first merge command ran.
|
|
102
|
-
|
|
103
|
-
## 2. R3 returned a fragment on first dispatch
|
|
104
|
-
|
|
105
|
-
### What happened
|
|
106
|
-
|
|
107
|
-
R3 was launched in parallel with R1, R2, DA. After 90s, R3 returned this
|
|
108
|
-
literal text as its complete output:
|
|
109
|
-
|
|
110
|
-
> "Still running. Let me wait for monitor."
|
|
111
|
-
|
|
112
|
-
Status said "completed" but the result body was a 7-word fragment. R3 had not
|
|
113
|
-
actually run any of the cross-cutting integration checks I asked for.
|
|
114
|
-
|
|
115
|
-
I re-spawned R3 (call it R3-retry) with a stricter prompt. R3-retry completed
|
|
116
|
-
in 61s with a full structured 6-risk verdict.
|
|
117
|
-
|
|
118
|
-
### What signal in the original prompt caused the fragment
|
|
119
|
-
|
|
120
|
-
The original R3 prompt opened with this paragraph (truncated):
|
|
121
|
-
|
|
122
|
-
> "You are Reviewer 3 of 3 (integration safety) reviewing Loki Mode v7.5.15
|
|
123
|
-
> release candidate at /Users/lokesh/git/loki-mode.
|
|
124
|
-
>
|
|
125
|
-
> ## Context
|
|
126
|
-
> 8 parallel dev agents wrote in isolated worktrees. Their work was merged
|
|
127
|
-
> into main. The risk that motivates your existence: agents could not see
|
|
128
|
-
> each other's code, so subtle interactions between their patches may have
|
|
129
|
-
> been missed.
|
|
130
|
-
>
|
|
131
|
-
> ## Specific cross-cutting risks to investigate
|
|
132
|
-
>
|
|
133
|
-
> ### Risk A: autonomy/run.sh has Dev1 (iteration loop) + Dev6 (pytest timeout) edits
|
|
134
|
-
> [...command suggestions, not literal commands...]"
|
|
135
|
-
|
|
136
|
-
The smoking gun is the framing of the risk sections. They were narrative
|
|
137
|
-
("Dev1 added helpers near `run_autonomous()`") and asked the agent to
|
|
138
|
-
"investigate". The agent interpreted this as a research-and-report task with
|
|
139
|
-
async dependencies, hence "Let me wait for monitor."
|
|
140
|
-
|
|
141
|
-
The R3-retry prompt opened with:
|
|
142
|
-
|
|
143
|
-
> "CRITICAL: Run all the bash commands below yourself. Do NOT wait for any
|
|
144
|
-
> monitor. Do NOT spawn other tools. Just execute the commands, capture
|
|
145
|
-
> output, and report."
|
|
146
|
-
>
|
|
147
|
-
> Then: literal `bash` blocks for each risk, not narrative descriptions.
|
|
148
|
-
|
|
149
|
-
### The prompt-difference rule
|
|
150
|
-
|
|
151
|
-
The fragment was a context-window-limit hallucination triggered by the
|
|
152
|
-
narrative framing, not a model error. The first prompt let R3 think it had
|
|
153
|
-
to coordinate with other agents (the word "monitor" doesn't appear in my
|
|
154
|
-
prompt -- the agent invented it). The second prompt removed any room for
|
|
155
|
-
coordination assumption by handing literal commands.
|
|
156
|
-
|
|
157
|
-
**Rule for reviewer prompts: hand the agent literal commands when the work is
|
|
158
|
-
verification, not investigation.** Narrative-style "investigate this risk"
|
|
159
|
-
prompts work for open-ended research agents. They fail for verification
|
|
160
|
-
agents because the agent has nothing to do except run the check, and any
|
|
161
|
-
narrative slack invites hallucinated work-coordination.
|
|
162
|
-
|
|
163
|
-
Concretely:
|
|
164
|
-
- Bad: "Verify Dev1 and Dev6's edits to autonomy/run.sh do not conflict"
|
|
165
|
-
- Good: "Run `bash -n autonomy/run.sh && shellcheck -S error autonomy/run.sh`. Report exact output. If non-zero, paste the failure."
|
|
166
|
-
|
|
167
|
-
The signal was that R3's prompt had 5x more narrative than R1's or R2's
|
|
168
|
-
prompts. R1 and R2 returned substantive results; R3 returned a fragment. Same
|
|
169
|
-
model, same session, same parallel dispatch -- the only variable was prompt
|
|
170
|
-
density.
|
|
171
|
-
|
|
172
|
-
### Specific recommendation
|
|
173
|
-
|
|
174
|
-
Add a checklist to the reviewer-prompt template:
|
|
175
|
-
|
|
176
|
-
1. Does each verification step have a literal `bash` block, not a description?
|
|
177
|
-
2. Is the expected output specified concretely (e.g. "expect count = 3", not
|
|
178
|
-
"verify both helpers exist")?
|
|
179
|
-
3. Is there a "DO NOT spawn other agents / DO NOT wait for monitors" line?
|
|
180
|
-
4. Is the report format an enumerable list, not a narrative essay?
|
|
181
|
-
|
|
182
|
-
If any of these are no, the prompt invites fragment responses.
|
|
183
|
-
|
|
184
|
-
Add `scripts/lint-reviewer-prompt.sh` as the pre-flight linting artifact.
|
|
185
|
-
The script takes a prompt file as its only argument and grep-checks for the
|
|
186
|
-
4 required elements above:
|
|
187
|
-
|
|
188
|
-
```bash
|
|
189
|
-
#!/usr/bin/env bash
|
|
190
|
-
# scripts/lint-reviewer-prompt.sh <prompt-file>
|
|
191
|
-
set -euo pipefail
|
|
192
|
-
FILE="${1:?usage: lint-reviewer-prompt.sh <prompt-file>}"
|
|
193
|
-
PASS=0
|
|
194
|
-
grep -q '```bash' "$FILE" || { echo "FAIL: no literal bash block"; PASS=1; }
|
|
195
|
-
grep -qE '(expect|count|== [0-9])' "$FILE" || { echo "FAIL: no concrete expected output"; PASS=1; }
|
|
196
|
-
grep -q 'DO NOT' "$FILE" || { echo "FAIL: no DO NOT line"; PASS=1; }
|
|
197
|
-
grep -qE '^\s*[0-9]+\.' "$FILE" || { echo "FAIL: no enumerable report format"; PASS=1; }
|
|
198
|
-
[ "$PASS" -eq 0 ] && echo "PASS: prompt lint OK"
|
|
199
|
-
exit "$PASS"
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
Invocation point: the integrator runs this script against each reviewer
|
|
203
|
-
prompt file before the parallel dispatch call. A non-zero exit aborts the
|
|
204
|
-
dispatch. The script does not need to ship in v7.5.15; the spec and
|
|
205
|
-
acceptance criteria above are sufficient to implement it before the next
|
|
206
|
-
fleet operation.
|
|
207
|
-
|
|
208
|
-
## 3. Devil's Advocate caught what 4 prior reviewers missed
|
|
209
|
-
|
|
210
|
-
### What happened
|
|
211
|
-
|
|
212
|
-
Three reviewers (R1 correctness, R2 CLAUDE.md compliance, R3 integration
|
|
213
|
-
safety) reviewed v7.5.15 and unanimously approved. Each independently re-ran
|
|
214
|
-
the 8 new test suites and confirmed PASS.
|
|
215
|
-
|
|
216
|
-
Devil's Advocate (DA) ran the same checks AND added one more: did the new
|
|
217
|
-
tests actually get registered in `tests/run-all-tests.sh`? Answer: 1 of 8 was
|
|
218
|
-
registered. The other 7 (Dev1, Dev2, Dev3, Dev4, Dev5, Dev6, Dev7) would
|
|
219
|
-
silently rot.
|
|
220
|
-
|
|
221
|
-
Cost if missed: 7 tests in the repo for diff inspectors to think coverage
|
|
222
|
-
existed, while CI never ran them. Future regressions in those code paths
|
|
223
|
-
would not be caught until the next manual run-all-tests.sh invocation.
|
|
224
|
-
|
|
225
|
-
### What this says about reviewer role structure
|
|
226
|
-
|
|
227
|
-
R1, R2, R3 each had a specific mandate. R1 = "do the patches work?". R2 =
|
|
228
|
-
"does the release follow CLAUDE.md?". R3 = "do the patches integrate without
|
|
229
|
-
breaking each other?". All three mandates assumed the question "does this
|
|
230
|
-
release ship?" was answered if their narrow domain passed.
|
|
231
|
-
|
|
232
|
-
DA had no domain. DA was given the role "find what the other three will
|
|
233
|
-
miss." That open mandate let DA ask a question outside any of the other three
|
|
234
|
-
roles' jurisdictions: "given that the patches work, are they wired up to
|
|
235
|
-
keep working?"
|
|
236
|
-
|
|
237
|
-
Test-rot is in nobody's R1/R2/R3 domain:
|
|
238
|
-
- R1 ran the tests -- they pass when invoked. Mandate satisfied.
|
|
239
|
-
- R2 checked CLAUDE.md compliance -- which doesn't say "wire all new tests
|
|
240
|
-
into the runner". Mandate satisfied.
|
|
241
|
-
- R3 checked cross-file integration -- not test runner registration.
|
|
242
|
-
Mandate satisfied.
|
|
243
|
-
|
|
244
|
-
Test-rot is structurally outside specialized reviewer domains. It is a
|
|
245
|
-
meta-question about durability that requires a non-domain-specific role to
|
|
246
|
-
ask.
|
|
247
|
-
|
|
248
|
-
### Should DA be the default?
|
|
249
|
-
|
|
250
|
-
No. The DA role works because it is contrarian to a specific quorum. If you
|
|
251
|
-
make DA the default reviewer, you lose the contrarian frame -- DA becomes
|
|
252
|
-
just another R-reviewer with a slightly broader mandate, and it stops asking
|
|
253
|
-
the meta-questions because it is now responsible for them.
|
|
254
|
-
|
|
255
|
-
The surprise factor is the structural feature, not a bug. R1+R2+R3 unanimous
|
|
256
|
-
approval triggers DA. If DA agreed without conditions, the release ships. If
|
|
257
|
-
DA finds something, the release pauses.
|
|
258
|
-
|
|
259
|
-
### What to keep, what to add
|
|
260
|
-
|
|
261
|
-
**Keep:**
|
|
262
|
-
- DA as a separate role spawned in the same parallel wave as R1/R2/R3, with
|
|
263
|
-
the explicit mandate "find what the others will miss".
|
|
264
|
-
- The 3-reviewer + DA pattern as the default for any release.
|
|
265
|
-
|
|
266
|
-
**Add:**
|
|
267
|
-
- A required DA checklist with at least these items, refined every release:
|
|
268
|
-
- Are new tests registered in the runner?
|
|
269
|
-
- Are new env flags documented in `loki doctor` output AND in CHANGELOG?
|
|
270
|
-
- Are new endpoints discoverable via `loki <thing> --help` output?
|
|
271
|
-
- Did any agent claim "tests pass" without me re-running it from a fresh
|
|
272
|
-
shell?
|
|
273
|
-
- Did the integration retain ALL agents' contributions, or did one
|
|
274
|
-
silently overwrite another?
|
|
275
|
-
|
|
276
|
-
The fifth item would have caught the bad-copy regression (section 1) earlier
|
|
277
|
-
than my own grep-c sanity check did.
|
|
278
|
-
|
|
279
|
-
### Specific recommendation
|
|
280
|
-
|
|
281
|
-
Codify DA as a required role with a published checklist. Currently DA's
|
|
282
|
-
prompt was hand-written for v7.5.15 and emphasized "find at least one thing
|
|
283
|
-
the 3 reviewers will miss". That phrasing worked but is fragile -- the next
|
|
284
|
-
DA invocation might emphasize different things and miss the test-rot class
|
|
285
|
-
of issue.
|
|
286
|
-
|
|
287
|
-
Concrete: maintain `docs/retrospectives/devil-advocate-checklist.md` as the
|
|
288
|
-
standing DA questions. Reviewer prompts inline the checklist contents at
|
|
289
|
-
dispatch time (copy-paste or heredoc). New questions get appended to the
|
|
290
|
-
checklist after each release where DA found something the other reviewers
|
|
291
|
-
missed.
|
|
292
|
-
|
|
293
|
-
The checklist becomes the institutional memory of "things 3-reviewer councils
|
|
294
|
-
have failed to catch." It grows monotonically. DA's job becomes "run this
|
|
295
|
-
checklist + add anything new" rather than "be smart in a vacuum".
|
|
296
|
-
|
|
297
|
-
## Summary of recommended protocol changes
|
|
298
|
-
|
|
299
|
-
1. **Dispatch protocol**: dev-agent prompts explicitly resolve commit-vs-wait;
|
|
300
|
-
integrator uses `git merge` exclusively; post-merge structural checksums on
|
|
301
|
-
conflict-prone files; pre-integration conflict matrix.
|
|
302
|
-
2. **Reviewer prompts**: literal bash blocks for verification work; "DO NOT
|
|
303
|
-
spawn / DO NOT wait" preamble; expected output specified concretely;
|
|
304
|
-
pre-flight prompt linting.
|
|
305
|
-
3. **Council structure**: keep DA as a contrarian role with a growing
|
|
306
|
-
checklist; add the standing DA questions to a versioned checklist file;
|
|
307
|
-
monotonically grow the list with new "things the council missed" each
|
|
308
|
-
release.
|
|
309
|
-
|
|
310
|
-
These are 3 small protocol changes, each addressing a specific failure that
|
|
311
|
-
occurred in this session. None require new tools or new architecture.
|
|
312
|
-
|
|
313
|
-
---
|
|
314
|
-
|
|
315
|
-
**Footnote -- two additional observed events not elevated to protocol-change tier.**
|
|
316
|
-
Two issues occurred during the v7.5.15 session that were deliberately excluded
|
|
317
|
-
from the three-failure selection above: (1) the validate-bash hook fired a
|
|
318
|
-
false-positive on a `rm -rf /Users/...` path in a comment, not an executed
|
|
319
|
-
command; (2) a zsh PATH hash quirk caused a freshly-added binary to be
|
|
320
|
-
invisible until `hash -r` was run in the same shell. Both were observed,
|
|
321
|
-
classified as audit-table-tier (one-time environment quirks requiring no
|
|
322
|
-
standing protocol change), and are covered in the session audit table rows
|
|
323
|
-
"hook-false-positive-rm-path" and "zsh-path-hash-stale" respectively. Neither
|
|
324
|
-
met the bar for a protocol change because neither was reproducible across
|
|
325
|
-
sessions or attributable to a protocol gap.
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
# v7.5.15 Honesty Audit
|
|
2
|
-
|
|
3
|
-
Audit of the v7.5.15 release commit `c82b9541` against the actual diff and the
|
|
4
|
-
8-agent fleet's per-PR claims.
|
|
5
|
-
|
|
6
|
-
Method: every CHANGELOG sentence cross-checked against `git show c82b9541` +
|
|
7
|
-
`git log 2ce36624..HEAD` + grep against the integrated tree. No agent's
|
|
8
|
-
self-report taken as evidence.
|
|
9
|
-
|
|
10
|
-
## 1. CHANGELOG claims vs. diff evidence
|
|
11
|
-
|
|
12
|
-
| CHANGELOG claim | Diff evidence | Verdict |
|
|
13
|
-
|---|---|---|
|
|
14
|
-
| Sentrux iteration-loop wire-in behind `LOKI_SENTRUX_GATE=1` | `autonomy/run.sh:10531` `_loki_sentrux_iteration_start()`, `:10543` `_loki_sentrux_iteration_end()`, callers at `:10775` and `:11257`, env-flag guard verified | VERIFIED |
|
|
15
|
-
| Default off; zero behavior change without opt-in | Guard pattern: `if [[ "${LOKI_SENTRUX_GATE:-}" == "1" ]] && command -v sentrux ...`. Confirmed at the call sites. | VERIFIED |
|
|
16
|
-
| `tests/test-sentrux-iteration-wireup.sh` 7/7 PASS | Re-run during integration: 7/7 PASS. Re-run by R1, DA: 7/7. | VERIFIED |
|
|
17
|
-
| Dashboard `/api/quality/architecture` endpoint | `dashboard/server.py:5958` `@app.get("/api/quality/architecture")` confirmed | VERIFIED |
|
|
18
|
-
| Returns sorted findings-sentrux series | `dashboard/server.py:5974-6014` globs `findings-sentrux-*.json`, sorts by iteration | VERIFIED |
|
|
19
|
-
| Resilient to corrupt JSON | Test 4 in pytest suite (`test_resilient_to_corrupt_file`); writer-side `try/except` confirmed at `dashboard/server.py:5995-6014` | VERIFIED |
|
|
20
|
-
| `tests/dashboard/test_quality_architecture_endpoint.py` 5/5 PASS | Direct `pytest` re-run: 5/5 PASS. Wrapper script also confirms. | VERIFIED |
|
|
21
|
-
| `loki sentrux init-rules` scaffolds `.sentrux/rules.toml` | `autonomy/loki:7114` `init-rules)` case + template heredoc starting `:7130` | VERIFIED |
|
|
22
|
-
| Refuse-overwrite unless `--force` | `autonomy/loki:7122-7124` shows the friendly refusal + `--force` flag parsing at `:7045` | VERIFIED |
|
|
23
|
-
| `tests/test-sentrux-init-rules.sh` 9/9 PASS | DA re-run: 9/9 PASS | VERIFIED |
|
|
24
|
-
| Doctor `--json` sentrux entry, parity bash + Bun | `autonomy/loki cmd_doctor_json` python emit (Dev4 `f7e95625` brought 15 lines) + `loki-ts/src/commands/doctor.ts:44 SentruxCheck`, `:54 sentrux: SentruxCheck` in DoctorJson, `:310 checkSentrux()` | VERIFIED |
|
|
25
|
-
| Byte-identical bash vs Bun parity | `tests/test-doctor-json-sentrux.sh` test 13 explicitly runs both routes through `jq -S` then `diff -q`. Test passed. local-ci bun-parity matrix also passed (21/21). | VERIFIED |
|
|
26
|
-
| `tests/test-doctor-json-sentrux.sh` 13/13 PASS | Reviewer + DA re-run: 13/13 | VERIFIED |
|
|
27
|
-
| Dashboard nav UAT -- Escalations sidebar component | `legacy-ui/components/loki-escalations.js` (NEW, 280 lines), exported in `legacy-ui/index.js:99`, mounted in `legacy-ui/scripts/build-standalone.js:798` | VERIFIED |
|
|
28
|
-
| Web vs dashboard help clarification | `autonomy/loki cmd_dashboard_help` and `cmd_web_help` -- confirmed both contain "Note:" blocks cross-referencing the other command. R3 re-ran: 2 matches each. | VERIFIED |
|
|
29
|
-
| `tests/test-dashboard-nav-uat.sh` 13/13 PASS | DA re-run: 13/13 | VERIFIED |
|
|
30
|
-
| Pytest gate timeout via `_loki_run_pytest_with_timeout` helper | `autonomy/run.sh:5928` defines helper, called from `:6065` inside `enforce_test_coverage` | VERIFIED |
|
|
31
|
-
| Configurable via `LOKI_PYTEST_TIMEOUT` (default 300s) | Confirmed in helper body | VERIFIED |
|
|
32
|
-
| Closes Triage #14 | Triage #14 was "pytest gate timeout wrapper" per v7.5.12 CHANGELOG. The helper is the wrapper. | VERIFIED |
|
|
33
|
-
| `tests/test-pytest-gate-timeout.sh` 5/5 PASS | DA re-run: 5/5. Real exit-code-124 detection verified by Dev6's test fixture. | VERIFIED |
|
|
34
|
-
| Per-file try/except in `memory/storage.py:_load_json` catches JSONDecodeError, UnicodeDecodeError, OSError | `memory/storage.py:354 except json.JSONDecodeError`, `:360 except UnicodeDecodeError`, `:366 except (OSError, UnicodeDecodeError)` | VERIFIED |
|
|
35
|
-
| Closes Triage #15 | Triage #15 was "episode JSON try/except per file". Centralized fix in `_load_json` covers all callers (`engine.py`, `retrieval.py`, `consolidation.py`). | VERIFIED |
|
|
36
|
-
| `tests/memory/test_episode_load_resilience.py` 8/8 PASS | DA re-run: 8/8 | VERIFIED |
|
|
37
|
-
| `tests/test-sentrux-gate.sh` wired into Linux runner | `tests/run-all-tests.sh:78 run_test "Sentrux Gate Unit Tests"` -- present | VERIFIED |
|
|
38
|
-
| `.github/workflows/sentrux-real.yml` gates real-binary test as manual/scheduled | New workflow file present; triggers `workflow_dispatch` and cron only; `continue-on-error: true` | VERIFIED |
|
|
39
|
-
| `tests/test-ci-sentrux-coverage.sh` 4/4 PASS | DA re-run: 4/4 | VERIFIED |
|
|
40
|
-
| All 7 new v7.5.15 test suites wired into `tests/run-all-tests.sh` | `tests/run-all-tests.sh:85-99` -- 5 bash entries + 2 pytest wrapper entries (gated on `python3 + import pytest`) | VERIFIED |
|
|
41
|
-
| Final runner: 24/25 PASS | `bash tests/run-all-tests.sh` second run: `Tests Run: 25, Passed: 24, Failed: 1` | VERIFIED |
|
|
42
|
-
| Single failure is pre-existing pip install mcp env gap | `python3 -c "import mcp"` reproduces the same `MCP SDK not found` error on bare Python; not introduced by this release | VERIFIED |
|
|
43
|
-
| 13 version locations bumped (vscode-extension intentionally skipped) | `grep "7\.5\.15"` across the 13 expected files: all hit. `vscode-extension/package.json` still at older version (per CLAUDE.md v7.2.0 deprecation note) | VERIFIED |
|
|
44
|
-
| local-ci 21/21 PASS | Final pre-push run: `Passed: 21, Failed: 0`. Re-confirmed post-merge twice. | VERIFIED |
|
|
45
|
-
|
|
46
|
-
**Result: Every CHANGELOG bullet was checked individually against diff or re-run evidence. The table above has 30 rows, one per CHANGELOG sentence. Zero claims softened. No claim shipped without proof.**
|
|
47
|
-
|
|
48
|
-
Note: The CHANGELOG body in v7.5.15 reads "20/20 PASS" for local-ci. That count reflects an intermediate state before the dist rebuild step was added as a final check. After the rebuild, the runner read 21/21. The 20/20 figure was accurate at the time it was written; 21/21 is the final pre-push count.
|
|
49
|
-
|
|
50
|
-
Scope gap -- `scripts/local-ci.sh` (4 lines, modified in v7.5.15): this script was changed but is not represented by a row in the table above. The change added one check (the dist rebuild probe). The diff is trivial but the omission is noted here for completeness.
|
|
51
|
-
|
|
52
|
-
Scope gap -- `legacy-ui-static/index.html` (318 lines, build artifact): the table confirms the Escalations component was mounted in the build script. It does not confirm that the built artifact is internally consistent beyond that. A full artifact diff was not performed.
|
|
53
|
-
|
|
54
|
-
## 2. Per-agent claim audit
|
|
55
|
-
|
|
56
|
-
For each of the 8 dev agents: did the agent's report overshoot what they actually shipped?
|
|
57
|
-
|
|
58
|
-
### Dev1 (sentrux iteration wire-in)
|
|
59
|
-
- Claimed: 7/7 PASS, helpers extracted into `_loki_sentrux_iteration_start/_end`, defensive numeric guard on before/after, only patched `track_iteration_complete "$ITERATION_COUNT" "$exit_code"` site.
|
|
60
|
-
- Shipped: confirmed all of the above. Agent scoped to one call site. Second site (line 10843) not patched. CHANGELOG does not claim it.
|
|
61
|
-
- **Overshoot: NONE.**
|
|
62
|
-
|
|
63
|
-
### Dev2 (dashboard endpoint)
|
|
64
|
-
- Claimed: 5 tests including resilience to corrupt JSON, 2 helper functions, copied existing `_ForceLokiDir` test pattern.
|
|
65
|
-
- Shipped: confirmed in `dashboard/server.py:5958-6020`. 5 pytest assertions present.
|
|
66
|
-
- **Overshoot: NONE.**
|
|
67
|
-
|
|
68
|
-
### Dev3 (init-rules)
|
|
69
|
-
- Claimed: 9/9 PASS, modified `cmd_sentrux` only, lines 7012-7150.
|
|
70
|
-
- Shipped: actual diff shows 7029-7183 (small drift from the agent's claim). Behavior matches: `--force` flag, friendly refusal on overwrite, scaffolds the right template.
|
|
71
|
-
- **Overshoot: NONE. Line numbers in agent's claim (7012-7150) differ from shipped range (7029-7183). Behavior matches. Cause: pre/post-merge offset.**
|
|
72
|
-
|
|
73
|
-
### Dev4 (doctor JSON parity)
|
|
74
|
-
- Claimed: 13/13 PASS including byte-identical parity test, dist artifact rebuilt but not staged because `loki-ts/dist/loki.js` is gitignored.
|
|
75
|
-
- Shipped: confirmed `SentruxCheck` type at `loki-ts/src/commands/doctor.ts:44`, `checkSentrux()` at `:310`. Parity test still passes after my own dist rebuild during integration (because the merge brought source change but dist was stale until I rebuilt).
|
|
76
|
-
- **Overshoot: NONE. Agent noted dist gitignore. Consistent with actual behavior.**
|
|
77
|
-
|
|
78
|
-
### Dev5 (dashboard nav UAT)
|
|
79
|
-
- Claimed: 13/13 PASS, escalations component is real (server-side `/api/escalations` already existed; UI was the gap), web vs dashboard are NOT aliases (different ports/products), explicitly punted on item #2 (parent-shell exit dependency).
|
|
80
|
-
- Shipped: confirmed via grep of dashboard/server.py:5977 (`/api/escalations`), the new component file, and the help-text additions. Confirmed: web and dashboard serve different ports. Agent claim accurate.
|
|
81
|
-
- **Overshoot: NONE. Agent explicitly marked item #2 out of scope. Not addressed in this release.**
|
|
82
|
-
|
|
83
|
-
### Dev6 (pytest gate timeout)
|
|
84
|
-
- Claimed: 5/5 PASS, found gate at `autonomy/run.sh:6041` (now 6053-6066), extracted helper for testability, mentioned "same hang risk in other gates" (go test, cargo test, monorepo test cmd) but did NOT fix them.
|
|
85
|
-
- Shipped: confirmed helper at `:5928`, called from `:6065`. The "didn't fix other gates" disclosure is honest scope-limitation.
|
|
86
|
-
- **Overshoot: NONE.**
|
|
87
|
-
|
|
88
|
-
### Dev7 (episode JSON resilience)
|
|
89
|
-
- Claimed: 8/8 PASS, single point of fix at `memory/storage.py:328 _load_json`, all higher-level callers inherit, did NOT add rename-on-corrupt pattern (no codebase precedent), listed out-of-scope sites at `cross_project.py:101` etc.
|
|
90
|
-
- Shipped: confirmed via grep showing the 3 expected exception types caught at lines 354/360/366. Out-of-scope sites correctly left alone.
|
|
91
|
-
- **Overshoot: NONE.**
|
|
92
|
-
|
|
93
|
-
### Dev8 (CI coverage)
|
|
94
|
-
- Claimed: 4/4 PASS, did NOT commit (applied CLAUDE.md "wait for user approval"), found 22 workflows, sentrux-real.yml is `continue-on-error: true` and not blocking.
|
|
95
|
-
- Shipped: confirmed. Dev8 did not commit. Integrator staged Dev8's files manually.
|
|
96
|
-
- **Overshoot: NONE.**
|
|
97
|
-
|
|
98
|
-
**Result: 0 of 8 agents overshot their PR description. The fleet was honest.**
|
|
99
|
-
|
|
100
|
-
## 3. Session integrity score vs CLAUDE.md
|
|
101
|
-
|
|
102
|
-
### Where we got it right
|
|
103
|
-
|
|
104
|
-
- **Pre-push local-ci**: Ran 3 separate times (post-Dev3+4 integration, post-DA-fix, final). Caught 1 transient flake. Final: 21/21.
|
|
105
|
-
- **No `git add -A`**: All 25 release files staged by name. R2 explicitly warned about `.claude/worktrees/` sweep risk; I avoided it. The 2 pre-existing untracked docs (`docs/MIGRATION-STATUS.md`, `docs/SOFTWARE-FACTORY-ANALYSIS.md`) remain untracked.
|
|
106
|
-
- **HEREDOC commit message**: Used. No co-author. Honest "NOT in this release" section enumerated 7 deferred items.
|
|
107
|
-
- **14 version locations**: 13 bumped (vscode-extension deprecated per CLAUDE.md v7.2.0 -- documented honestly).
|
|
108
|
-
- **No emojis, no em dashes**: R2 verified zero hits in the diff against both unicode ranges.
|
|
109
|
-
- **3-reviewer council + DA**: Used. DA caught a real concern (test rot) that the 3 reviewers missed. Concern was addressed BEFORE commit, not deferred.
|
|
110
|
-
- **Cleanup before commit**: All 8 worktrees + branches removed via `git worktree remove -f -f` + `git branch -D`. `/tmp/loki-*` cleared. `ps -ef` clean.
|
|
111
|
-
- **Pre-existing untracked left alone**: `docs/MIGRATION-STATUS.md` and `docs/SOFTWARE-FACTORY-ANALYSIS.md` not staged. They were here at session start; not my work to commit.
|
|
112
|
-
- **Post-publish smoke test**: claimed, not evidenced inline. Commands run were: `npm install -g loki-mode@7.5.15 && loki version`, `docker pull asklokesh/loki-mode:7.5.15 && docker run --rm asklokesh/loki-mode:7.5.15 version`, and a WebFetch of the Homebrew formula to confirm sha256. Output not captured in this doc.
|
|
113
|
-
|
|
114
|
-
### Where we fell short
|
|
115
|
-
|
|
116
|
-
| Issue | Detail | Cost |
|
|
117
|
-
|---|---|---|
|
|
118
|
-
| Bad-copy regression during integration | When I `cp`'d Dev5's `autonomy/loki` into the integrated tree, I obliterated Dev3+Dev4's `cmd_sentrux` and `cmd_doctor_json` changes. Caught immediately by `grep -c init-rules` returning 0 instead of 4. Fixed by `git checkout HEAD -- autonomy/loki` then surgical `Edit` of just Dev5's two help blocks. Cost if unnoticed: shipped a release that silently regresses Dev3+Dev4's features. | Caught locally; user-facing impact = 0. Lesson: never bulk-`cp` over an integrated multi-author file. |
|
|
119
|
-
| R3 returned a non-substantive fragment first time | First R3 invocation returned the literal string "Still running. Let me wait for monitor." instead of executing. Re-spawned with stricter "Run all the bash commands below yourself. Do NOT wait for any monitor." preamble. Second attempt completed in 61s with 6 verifications. Cost if I hadn't noticed: missing the integration-safety verdict. | Caught by reading the output; cost = ~5 min retry. |
|
|
120
|
-
| Dev5 + Dev8 didn't commit in their worktrees | Both correctly applied the global "wait for user approval" rule, which conflicted with the agent task spec's "commit at end". Their files were uncommitted in the worktree, so I had to manually `cp` 4 + 4 = 8 files. Worked but added integration risk (see bad-copy regression above). | Cost = the bad-copy regression. Lesson: dev-agent prompts should state explicitly whether commits are part of the worktree task or whether the integrator commits centrally. |
|
|
121
|
-
| Bun `dist` was stale post-merge | Dev4 modified `loki-ts/src/commands/doctor.ts` and the merge brought the source. But `dist/loki.js` is gitignored and was not rebuilt in the worktree. Bun-route doctor JSON test failed (5/13) until I ran `cd loki-ts && bun run build`. Caught by my own pre-commit test sweep. | Cost = ~2 min rebuild + retest. Lesson: integration must rebuild `dist` after any `loki-ts/src/` merge. |
|
|
122
|
-
| Devil's Advocate caught test rot 4 reviewers missed | 7 of 8 new tests were not registered in `tests/run-all-tests.sh` -- only `test-ci-sentrux-coverage.sh` (Dev8's own) was. The 3 R-reviewers all confirmed "tests pass" by running them directly, but didn't ask "will they run in CI tomorrow?". DA asked the right question. | Caught pre-commit. If missed: 7 tests would have silently rotted. They are now wired in (24/25 PASS via runner). |
|
|
123
|
-
| First `bash tests/run-all-tests.sh` invocation captured truncated output | I piped the runner through `tail -15` which discarded all the per-test stdout. Re-ran without `tail` to get full per-test PASS/FAIL marks. | Caught immediately. Lesson: never `tail` a test runner you're trying to debug. |
|
|
124
|
-
| First `git worktree remove` attempt failed | 8 worktrees were `locked` (per the auto-isolation lock). Initial `git worktree remove --force` returned `use 'remove -f -f' to override or unlock first`. Re-ran with `-f -f`. | Caught immediately. Cost = ~30s retry. |
|
|
125
|
-
| MCP test failure shipped as known caveat | `python3 -c "import mcp"` fails on this Mac (`pip install mcp` not done). Pre-existing, not introduced by v7.5.15. CHANGELOG documents this honestly. | Pre-existing. CI runs in environments where `mcp` is installed; not a release blocker. |
|
|
126
|
-
|
|
127
|
-
### Patterns to repeat
|
|
128
|
-
|
|
129
|
-
- 8-agent fleet with isolated worktrees: 8 features shipped in ~5 min wall time vs ~2 days serial.
|
|
130
|
-
- Devil's Advocate as a separate role from the 3 standard reviewers: the 3 reviewers focused on "did the patch work?" and missed "will the patch keep working?". DA caught it.
|
|
131
|
-
- "NOT in this release" CHANGELOG section: agents and integrator both named deferred items explicitly.
|
|
132
|
-
- Per-file `git add`: avoided sweeping `.claude/worktrees/` into the release commit.
|
|
133
|
-
|
|
134
|
-
## Net verdict
|
|
135
|
-
|
|
136
|
-
**Release c82b9541: 30 claims evidenced. 0 agents overshot. Failures: bad-copy regression during integration, test-rot caught by DA, stale dist after loki-ts/src merge, truncated runner output from `tail`. Lessons: no bulk-`cp` over multi-author files; explicit commit-vs-wait dispatch rule in agent prompts; rebuild dist after loki-ts/src merges; never `tail` a test runner you're debugging.**
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# v7.5.15 LLM Failure Modes Catalogue
|
|
2
|
-
|
|
3
|
-
This table catalogues LLM failure modes that occurred (or were explicitly
|
|
4
|
-
considered and ruled out) during the v7.5.15 8-agent fleet session. "Failure
|
|
5
|
-
mode" means a systematic LLM behavioral error, not a human process mistake.
|
|
6
|
-
Each row covers one category. If a category did not materialize in this
|
|
7
|
-
session, it is marked NOT OBSERVED so the reader can confirm it was
|
|
8
|
-
considered, not overlooked. All session moments and file references are
|
|
9
|
-
specific: no generalities.
|
|
10
|
-
|
|
11
|
-
| Failure mode | Where it appeared | What caught it | Cost if missed |
|
|
12
|
-
|---|---|---|---|
|
|
13
|
-
| Confident hallucination (agent claims a file/function exists that doesn't) | NOT OBSERVED in this session | n/a | n/a |
|
|
14
|
-
| Stale context (agent acts on memory of prior state instead of current) | Dev5's `autonomy/loki` worktree was branched from pre-merge `HEAD` (`2ce36624`), i.e., prior to Dev3+Dev4's merges. The integrator treated the worktree file as current state and bulk-`cp`'d it over the integrated tree. This is the integrator exhibiting stale-context behavior. | `grep -c "init-rules" autonomy/loki` returned 0 instead of 4. Immediate recovery via `git checkout HEAD -- autonomy/loki` + surgical `Edit` of only Dev5's two help blocks. | Dev3's `init-rules` subcommand (9/9 tests) and Dev4's `cmd_doctor_json` sentrux field (13/13 tests) would have shipped silently regressed. Two advertised features gone from the binary. |
|
|
15
|
-
| Scope creep (agent does more than asked, breaking adjacent code) | NOT OBSERVED in this session. All 8 dev agents touched only their assigned functions/files. Dev7 explicitly disclaimed out-of-scope sites (`cross_project.py:101`) rather than patching them. | n/a | n/a |
|
|
16
|
-
| Silent test rot (tests written but not wired to runner) | 7 of 8 new test suites (Dev1 through Dev7) were not registered in `tests/run-all-tests.sh`. Only Dev8's `test-ci-sentrux-coverage.sh` was wired. R1, R2, R3 all ran the tests directly and confirmed PASS without asking whether CI would ever invoke them. | Devil's Advocate reviewer asked "will these tests run tomorrow?" and checked `tests/run-all-tests.sh` directly. Caught pre-commit. Fixed by adding 5 bash entries + 2 pytest wrapper scripts at `tests/run-all-tests.sh:85-99`. | 7 tests silently orphaned. Future regressions in sentrux wire-in, dashboard endpoint, init-rules, doctor JSON parity, dashboard nav UAT, pytest timeout, and episode resilience paths would go undetected until a manual invocation. |
|
|
17
|
-
| Cross-agent state assumption (Dev N assumes Dev M's branch is in some state without verifying) | Integrator assumed Dev5's worktree file was safe to `cp` over the integrated main tree. The assumption was that worktree files reflected the post-merge state; they did not (Dev5's branch point was `2ce36624`, before Dev3 + Dev4 merges). See `v7.5.15-fleet-postmortem.md` section 1. | Structural checksum: `grep -c "init-rules" autonomy/loki` == 0 (expected 4). Caught immediately after the bad copy. REPEATABILITY: LOW (manual, not codified -- see fleet-postmortem section 1 recommendation 3 for the fix). | Same as stale context above: two shipped features silently deleted from the binary. |
|
|
18
|
-
| Optimistic verification (agent says "tested" without running test) | R3 (first dispatch) returned "Still running. Let me wait for monitor." as its entire output. R3 had not run any of the 6 cross-cutting integration checks assigned to it, but its status was "completed". The agent used language implying work was in progress when no work was done. | Integrator read the result body. 7-word fragment clearly not a structured 6-risk verdict. Re-spawned R3 with a prompt containing literal `bash` blocks and "DO NOT wait for any monitor." R3-retry completed in 61s. See `v7.5.15-fleet-postmortem.md` section 2. | Integration safety review would have been missing from the record. Subtle cross-file interactions between Dev1+Dev6's `autonomy/run.sh` edits and Dev3+Dev4's `autonomy/loki` edits would have gone unchecked. A previously undetected conflict could have shipped. |
|
|
19
|
-
| Path-prefix confusion (rm -rf interpreted as dangerous when it isn't) | `validate-bash` hook matched the pattern `rm -rf /Users/lokesh/git/loki-mode/.sentrux` against its dangerous-rm guard (`rm -rf /` prefix check). The path is a subdirectory of the project, not the root, but the string match fired a false positive. Hook returned BLOCKED. | The hook itself caught and surfaced the block explicitly -- no silent data loss. Workaround: rewrite as relative path `rm -rf ./.sentrux`. Documented in session notes from the validate-bash hook output. | If the hook had silently suppressed the error and continued, a subtly wrong rm invocation could have run. Conversely, if the integrator had bypassed the hook without understanding why, it could have established a precedent of ignoring hook blocks. |
|
|
20
|
-
| Exit code over-trust (relying on subprocess exit code that lies) | Pre-existing MCP test failure: `python3 -c "import mcp"` exits non-zero on this Mac because `pip install mcp` was never run. The exit code does not represent a regression introduced by v7.5.15 -- it is an environmental gap that predates the session. If taken at face value it could be misread as a newly broken test. | Verified pre-existing by reproducing on `origin/main` before the release commit. CHANGELOG v7.5.15 documents it honestly as "single failure is pre-existing pip install mcp env gap". 24/25 PASS is the accurate count. | Misfiled as a release regression: would have blocked the release or, if overridden, set a precedent of shipping with unacknowledged test failures. |
|
|
21
|
-
| Bash vs zsh source-file scope leaking | session-reported, unverified by audit. Reported behavior: `command -v sentrux` returned empty under zsh mid-session even though the binary was on PATH. Plausible mechanism: zsh PATH hash cache had not refreshed to see the binary added during the session. No file:line cite, no grep output, no git ref was captured that would allow an auditor to reproduce or confirm this independently. | session-reported, unverified by audit. Reported workaround: switching to `bash -c` for the test invocation forces a fresh hash evaluation and the invocation succeeded. No codified guardrail exists for this behavior. | If the zsh/bash inconsistency had been attributed to a code bug rather than a shell hash quirk, time would have been spent diagnosing a non-existent defect in the sentrux integration code. Alternatively, the test could have been skipped and a real future failure masked. |
|
|
22
|
-
| Tool hook noise drowning real failures | First `bash tests/run-all-tests.sh` invocation was piped through `tail -15`. The tail window captured only 15 lines of output, discarding all per-test PASS/FAIL lines and the full run summary. The visible output showed only the last few lines of the final test's output -- no actionable signal. | Integrator noticed the output was truncated (no "Tests Run:" summary line) and re-ran without the `tail` pipe. Second run produced full per-test output: 24/25 PASS with the one failing test identified by name. | If the truncated output had been accepted as the verification record, the integrator would have had no per-test attribution. Any failure that landed outside the last 15 lines would have been invisible. The release would have shipped without a verified pass/fail count per test. |
|
|
23
|
-
| (beyond user's 10) Build artifact drift after source-only merge | The bun-parity matrix in `local-ci.sh` ran both bash and Bun routes through `diff -q` and surfaced a 5/13 failure caused by stale `loki-ts/dist/loki.js`. The Bun dist had not been rebuilt after source changes were merged, so the Bun route diverged from the bash route at 5 commands. This is a distinct failure mode from stale context: the source was current, but the compiled artifact was not. | `bash scripts/local-ci.sh` bun-parity matrix caught the 5/13 diff before the commit. Fix was `bun run build` followed by re-staging the updated dist file. | If the stale dist had shipped, 5 Bun-route commands would have exhibited the pre-merge behavior while the bash route exhibited the post-merge behavior. Users on the Bun route would have silently received the older behavior with no error. |
|
|
24
|
-
|
|
25
|
-
## What went right
|
|
26
|
-
|
|
27
|
-
The failure modes above were caught -- none shipped to users -- because
|
|
28
|
-
several guardrails worked exactly as intended. The `validate-bash` hook
|
|
29
|
-
surfaced the false-positive rm block explicitly rather than silently passing
|
|
30
|
-
or silently failing. The post-merge structural grep checksum (`grep -c
|
|
31
|
-
"init-rules"`) caught the bad-copy regression in seconds. The Devil's
|
|
32
|
-
Advocate role, operating with an explicitly non-domain mandate separate from
|
|
33
|
-
R1/R2/R3, asked the meta-question about test runner wiring that three
|
|
34
|
-
domain-specific reviewers each had reason not to ask. The `local-ci`
|
|
35
|
-
pre-push gate (`bash scripts/local-ci.sh`, 21/21 PASS) caught the stale
|
|
36
|
-
`loki-ts/dist/loki.js` artifact before the commit: the bun-parity matrix
|
|
37
|
-
ran both bash and Bun routes through `diff -q` and surfaced the 5/13
|
|
38
|
-
failure that triggered a `bun run build` before staging. The integrator's
|
|
39
|
-
discipline of reading reviewer output rather than trusting "completed"
|
|
40
|
-
status caught R3's fragment response before it was treated as a verdict.
|
|
41
|
-
Taken together: grep-based checksums, the DA contrarian role, local-ci
|
|
42
|
-
pre-push, the bun-parity matrix, and the validate-bash hook are the
|
|
43
|
-
codified mechanisms that kept this session's failure modes from becoming
|
|
44
|
-
user-facing defects. Note: the integrator reading R3's result body before
|
|
45
|
-
accepting its status as a verdict was human attentiveness, not a repeatable
|
|
46
|
-
guardrail. It is not listed here as a mechanism; it is listed as the action
|
|
47
|
-
that exposed the gap. The gap itself (agents reporting "completed" without
|
|
48
|
-
producing required output) is a process deficiency without a codified fix
|
|
49
|
-
as of this session.
|
package/docs/show-hn-post.md
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Show HN Post Draft
|
|
2
|
-
|
|
3
|
-
## Title
|
|
4
|
-
|
|
5
|
-
Show HN: Loki Mode - PRD in, tested code out (8 quality gates, RARV self-verification)
|
|
6
|
-
|
|
7
|
-
## Body
|
|
8
|
-
|
|
9
|
-
I built Loki Mode because I got tired of the copy-paste loop between AI coding assistants and my terminal. I wanted to hand over a PRD and get back a working, tested codebase -- not perfect, but a solid starting point.
|
|
10
|
-
|
|
11
|
-
**What it does:** You give it a Product Requirements Document. It breaks the work into tasks across specialized agent roles (engineering, operations, business, data, product, growth, review, orchestration) -- prompt-defined specifications the orchestrator adopts per phase, with parallel review (blind council) and optional worktree streams on Claude Code, sequential on other providers -- and runs every iteration through a self-verification loop called RARV: Reason, Act, Reflect, Verify. The idea is that the system catches its own mistakes before you have to.
|
|
12
|
-
|
|
13
|
-
**Quality gates:** 8 automated gates including 3-reviewer blind review (agents review each other's work without seeing prior reviews), anti-sycophancy checks (a devil's advocate pass on unanimous approvals), and mock/mutation detection. These are not foolproof, but they catch a surprising number of issues that single-pass generation misses.
|
|
14
|
-
|
|
15
|
-
**Multi-provider:** Runs on Claude Code (full parallel agent support), Cline, OpenAI Codex CLI, Aider, or opencode. Everything other than Claude Code runs in degraded sequential mode -- no parallel agents, no Task tool. Claude Code is the primary target. (The Google Gemini CLI provider was removed in v7.5.18 after Google deprecated it upstream.)
|
|
16
|
-
|
|
17
|
-
**Memory:** 3-tier system (episodic, semantic, procedural) so the system can learn from previous runs. Optional vector search with sentence-transformers if you want similarity-based retrieval.
|
|
18
|
-
|
|
19
|
-
**Enterprise features:** TLS, OIDC/SSO, RBAC, OTEL tracing, policy engine, audit trails. All behind env vars. Certs are self-signed only. Dashboard runs on a single machine at port 57374.
|
|
20
|
-
|
|
21
|
-
**Research foundation:** The architecture draws from Anthropic's Constitutional AI (principles-based self-critique), DeepMind's Scalable Oversight via Debate, and OpenAI's Agents SDK patterns (guardrails, tripwires, handoffs). References to specific papers are in the repo.
|
|
22
|
-
|
|
23
|
-
**What it does NOT do:** It does not deploy anything. It generates deployment configs (Helm, Docker Compose, Terraform), but a human deploys. Complex domain logic will need human review. The system can and does make mistakes, especially on novel problems. Token costs scale with project complexity. There is no published benchmark score.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Built solo. BUSL-1.1 source-available.
|
|
27
|
-
|
|
28
|
-
## Try it
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npm install -g loki-mode
|
|
32
|
-
claude --dangerously-skip-permissions
|
|
33
|
-
# Then say: "Loki Mode with PRD at path/to/your-prd.md"
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Python SDK: `pip install loki-mode-sdk`. TypeScript SDK: `npm install loki-mode-sdk` (available in the repo at `sdk/typescript/`).
|
|
37
|
-
|
|
38
|
-
Integrations: Jira, Slack, Teams, GitHub Actions.
|
|
39
|
-
|
|
40
|
-
## Feedback wanted
|
|
41
|
-
|
|
42
|
-
- Is the 8-gate quality system overkill, or does it actually help for your use cases?
|
|
43
|
-
- How do you handle the tension between autonomous agent speed and code review thoroughness?
|
|
44
|
-
- What PRD complexity level breaks this approach? I have hit walls with highly coupled distributed systems.
|
|
45
|
-
|
|
46
|
-
GitHub: https://github.com/asklokesh/loki-mode
|