loki-mode 11.3.0 → 11.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -650
- package/SKILL.md +5 -5
- 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/efficiency_cost.py +8 -0
- package/autonomy/lib/engine10-push.sh +22 -8
- package/autonomy/lib/prd-enrich.sh +1 -1
- package/autonomy/lib/voter-agents.sh +1 -1
- package/autonomy/loki +161 -105
- 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 +195 -59
- package/completions/_loki +8 -0
- package/completions/loki.bash +3 -3
- package/dashboard/__init__.py +1 -1
- package/dashboard/server.py +47 -45
- package/docs/AGENT-CHANGE-RECEIPT.md +2 -2
- package/docs/ARCHITECTURE.md +337 -0
- package/docs/BRANDING.md +124 -0
- package/docs/CLI-REFERENCE.md +11 -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/OTEL-COLLECTOR.md +24 -0
- package/docs/ROUTING-EVIDENCE.md +32 -0
- 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/environment-variables.md +1 -0
- 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/spec-first-intent.md +28 -0
- package/docs/v10/CLI-MODERN.md +7 -3
- package/docs/v10/DECISIONS.md +59 -0
- package/docs/v10/DEPS.md +22 -22
- package/docs/v10/ENGINE.md +1 -1
- package/docs/v10/FAILURE-CLASSES.md +212 -1
- package/docs/v10/FOUNDER-QUEUE.md +1 -0
- package/docs/v10/GUARDS.md +31 -0
- package/docs/v10/GUIDE.md +7 -5
- package/docs/v10/LEGACY-REMOVAL.md +4 -6
- package/docs/v10/METRICS.md +14 -2
- package/docs/v10/MODERNIZE.md +1 -1
- package/docs/v10/OPERATING-MODEL.md +4 -3
- package/docs/v10/PROGRESS.md +35 -0
- package/docs/v11/COST-HALF.md +352 -0
- package/docs/v11/INTOTO-AGENT-CHANGE-PREDICATE.md +77 -0
- package/docs/v11/MARKET-SLICES.md +315 -0
- package/docs/v11/MCP-2026-07-28.md +55 -0
- package/docs/v11/REGISTRIES.md +730 -0
- package/docs/v11/VERIFY-PR-SANDBOX.md +41 -0
- package/loki-ts/data/model-pricing.json +52 -24
- package/loki-ts/dist/loki.js +1185 -945
- package/mcp/__init__.py +1 -1
- package/mcp/v10_tools.py +29 -0
- package/package.json +9 -11
- package/packages/control-plane/dist/ask-tools-server.js +8 -2
- package/packages/control-plane/dist/server.js +15832 -12361
- package/packages/control-plane/drizzle/0006_token_sessions.sql +1 -0
- package/packages/control-plane/drizzle/meta/0006_snapshot.json +807 -0
- package/packages/control-plane/drizzle/meta/_journal.json +7 -0
- package/packages/control-plane/src/db/schema.ts +1 -0
- package/packages/control-plane/src/server/routes/cost.ts +4 -3
- package/packages/control-plane/src/server/runs.ts +3 -3
- package/packages/control-plane/ui/dist/assets/index-DbLzr87u.js +190 -0
- package/packages/control-plane/ui/dist/index.html +1 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/providers/opencode.sh +2 -3
- package/src/observability/genai-spans.js +104 -0
- package/src/observability/otel-bridge.js +49 -1
- package/src/observability/otel.js +2 -2
- package/src/protocols/mcp-client.js +6 -2
- package/src/protocols/mcp-server.js +191 -6
- package/src/protocols/transport/sse.js +23 -2
- package/tools/audit-docs.py +1 -1
- package/web-app/dist/assets/{AdminPage-D_e45uTw.js → AdminPage-DuRQZsF9.js} +1 -1
- package/web-app/dist/assets/{Avatar-T3nIpoaf.js → Avatar-7GtOQvsO.js} +1 -1
- package/web-app/dist/assets/{Badge-BKqb59pP.js → Badge-CYgTnIxj.js} +1 -1
- package/web-app/dist/assets/{Button-DjVlkh8_.js → Button-rYSyIu7X.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-DXJgLGmh.js → CockpitPage-9adANY4o.js} +1 -1
- package/web-app/dist/assets/{ComparePage-BRP_eVc_.js → ComparePage-DEG2oA-R.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-CLjpGLjC.js → ErrorBoundary-CwtvY4xs.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-DX-vb4Xy.js → EvidenceReceiptPanel-DTT73pPB.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-214HVHtX.js → GitHubIssuesPanel-CpWZLz2x.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-BEiZKc4t.js → GitHubPRsPanel-H293R7E2.js} +1 -1
- package/web-app/dist/assets/{HomePage-VvMHS5ga.js → HomePage-B11Imp9k.js} +2 -2
- package/web-app/dist/assets/{LoginPage-5WD-v7n3.js → LoginPage-BZBgx5Jr.js} +1 -1
- package/web-app/dist/assets/{MagicPage-DUQT_Jye.js → MagicPage-B27S4_X8.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-lga-z79v.js → MetricsPage-CfbJWNDG.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-CGhBX3G1.js → NotFoundPage-Tp_4zMSm.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-CdzF2GzZ.js → ProjectPage-CM4fgMsV.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-DRG64N8s.js → ProjectsPage-DP2Fvsrd.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-5fzW9Frb.js → SettingsPage-C4G9-EAy.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-DrTdxO4y.js → ShowcasePage-Dj-n4dwu.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-C9Mqs6Rd.js → SystemSettingsPage-BqMLpuGt.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-CUGPdSWo.js → TeamsPage-mIH8H96m.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-CNraDY0F.js → TemplatesPage-BagW-v4n.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-BIu_6Pea.js → TerminalOutput-CTQRHhnK.js} +1 -1
- package/web-app/dist/assets/{activity-Bk-kgqaf.js → activity-DNQiBDDL.js} +1 -1
- package/web-app/dist/assets/{bell-BXmUdmo8.js → bell-Coiwdad1.js} +1 -1
- package/web-app/dist/assets/{bot-CiuzXxUR.js → bot-Cou-rTgR.js} +1 -1
- package/web-app/dist/assets/{check-BEzjXppd.js → check-CsF-XtQp.js} +1 -1
- package/web-app/dist/assets/{chevron-left-AYWCXHf8.js → chevron-left-BJiy55Ht.js} +1 -1
- package/web-app/dist/assets/{circle-alert-BNg2uSRq.js → circle-alert-D6-pQQWq.js} +1 -1
- package/web-app/dist/assets/{clock-DTj0kkGT.js → clock-BOGqwgt9.js} +1 -1
- package/web-app/dist/assets/{cloud-x4nTDBLT.js → cloud-DsxhTtf5.js} +1 -1
- package/web-app/dist/assets/{code-xml-BVh_MLrk.js → code-xml-CxJDHUlE.js} +1 -1
- package/web-app/dist/assets/{database-DdfBaowG.js → database-BJePscl_.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-XuYFmAOY.js → dollar-sign-6qWGAkZo.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-D4cRnmeL.js → file-code-corner-DcOtYeDb.js} +1 -1
- package/web-app/dist/assets/{file-plus-CyoVlHc_.js → file-plus-WuRyLFo0.js} +1 -1
- package/web-app/dist/assets/{globe-Y6IK2RPW.js → globe-r-xCP4DE.js} +1 -1
- package/web-app/dist/assets/{hammer-BKzr9VZI.js → hammer-DTt0SsCB.js} +1 -1
- package/web-app/dist/assets/{index-B20cSx5G.js → index-BkbXyH8y.js} +3 -3
- package/web-app/dist/assets/{layers-DebNOhGS.js → layers-BvZhvSMY.js} +1 -1
- package/web-app/dist/assets/{loader-circle-DyGbrEgd.js → loader-circle-3gosTei9.js} +1 -1
- package/web-app/dist/assets/{lock-BKPpyt20.js → lock-CZZMxP0U.js} +1 -1
- package/web-app/dist/assets/{package-egF5Wi4y.js → package-C5A8CkJr.js} +1 -1
- package/web-app/dist/assets/{plus-OiEgKIc-.js → plus-Btv7tTIF.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-CzKvrONq.js → refresh-cw-DsWLXgs_.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-Bu2mII0p.js → rotate-ccw-DOVDjway.js} +1 -1
- package/web-app/dist/assets/{scroll-text-CSkiyax8.js → scroll-text-smySzlrX.js} +1 -1
- package/web-app/dist/assets/{server-DlPthJFw.js → server-b5PHsqAU.js} +1 -1
- package/web-app/dist/assets/{shield-alert-CbpHWQQX.js → shield-alert-BD7FDlh-.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-DgGpZe-Q.js → thumbs-up-CAsFzbyE.js} +1 -1
- package/web-app/dist/assets/{trash-2-BV3GlCB-.js → trash-2-BJ35qHgl.js} +1 -1
- package/web-app/dist/assets/{trending-down-Y4TJtXhD.js → trending-down-Ozrd26cZ.js} +1 -1
- package/web-app/dist/assets/{trending-up-DsDNoHZY.js → trending-up-BhnMcM32.js} +1 -1
- package/web-app/dist/assets/{upload-gkThrc_I.js → upload-JVHfdwoA.js} +1 -1
- package/web-app/dist/assets/{usePolling-jpNSeNAe.js → usePolling-CTzbDV-e.js} +1 -1
- package/web-app/dist/assets/{user-3Zez1WOK.js → user-Bks3-GYv.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
- package/packages/control-plane/ui/dist/assets/index-DcBJXjCJ.js +0 -190
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# BMAD Method x Loki Mode Voice Agent -- Council Analysis
|
|
2
|
-
|
|
3
|
-
**Date:** 2026-02-25
|
|
4
|
-
**Council:** 3 Opus reviewers (blind review)
|
|
5
|
-
**Verdict:** Unanimous YES with phased approach
|
|
6
|
-
|
|
7
|
-
## Proposal Summary
|
|
8
|
-
|
|
9
|
-
Integrate the BMAD Method (https://github.com/bmad-code-org/BMAD-METHOD) with Loki Mode
|
|
10
|
-
to create a structured requirements elicitation pipeline. BMAD provides a 4-phase
|
|
11
|
-
workflow (Analysis, Planning, Solutioning, Implementation) with agent personas, step-file
|
|
12
|
-
architecture, and adversarial review -- complementing Loki Mode's autonomous execution engine.
|
|
13
|
-
|
|
14
|
-
## Council Findings
|
|
15
|
-
|
|
16
|
-
### Reviewer 1: Architecture Focus
|
|
17
|
-
|
|
18
|
-
**Vote:** YES (phased)
|
|
19
|
-
|
|
20
|
-
- BMAD's step-file architecture aligns with Loki's progressive disclosure model
|
|
21
|
-
- BMAD artifacts (product-brief, PRD, architecture, epics) map cleanly to Loki's SDLC phases
|
|
22
|
-
- Context budget is manageable: BMAD step files load one-at-a-time (~3K tokens each)
|
|
23
|
-
- Integration surface is well-defined: `.loki/queue/`, `build_prompt()`, event bus
|
|
24
|
-
- Risk: BMAD is an external dependency that may change format without notice
|
|
25
|
-
|
|
26
|
-
### Reviewer 2: Integration Feasibility
|
|
27
|
-
|
|
28
|
-
**Vote:** YES (phased)
|
|
29
|
-
|
|
30
|
-
- BMAD PRD output sections (Functional Requirements, Success Criteria, User Journeys)
|
|
31
|
-
match most of prd-analyzer.py's existing dimension patterns
|
|
32
|
-
- Agent overlap is complementary, not conflicting: BMAD covers pre-development, Loki covers execution
|
|
33
|
-
- Voice.sh needs significant extension for structured dialogue (currently only 4-section dictation)
|
|
34
|
-
- MIT license is fully compatible with Loki Mode's distribution
|
|
35
|
-
- Risk: Voice agent layer (Phase 3) has highest uncertainty; STT reliability for technical terms
|
|
36
|
-
|
|
37
|
-
### Reviewer 3: Risk and Quality
|
|
38
|
-
|
|
39
|
-
**Vote:** YES (phased, with gates)
|
|
40
|
-
|
|
41
|
-
- Backward compatibility is achievable: BMAD integration is additive (new flag, new adapter)
|
|
42
|
-
- Existing non-BMAD projects are untouched unless `--bmad-project` is explicitly used
|
|
43
|
-
- Quality gates apply to all new code: 3-reviewer blind review, anti-sycophancy, test coverage
|
|
44
|
-
- BMAD's adversarial review methodology strengthens Loki's existing quality gate system
|
|
45
|
-
- Risk: Scope creep from Epic 2 (engine embedding) and Epic 3 (voice agent) -- phase gates essential
|
|
46
|
-
|
|
47
|
-
## Recommended Phased Approach
|
|
48
|
-
|
|
49
|
-
| Phase | Epic | Priority | Risk |
|
|
50
|
-
|-------|-------|----------|------|
|
|
51
|
-
| P0 | BMAD Artifact Pipeline (parse, score, load) | Must-have | Low |
|
|
52
|
-
| P1 | BMAD Engine Embedding (agent YAML parser, step processor) | Should-have | Medium |
|
|
53
|
-
| P2 | Voice Agent Layer (structured dialogue, BMAD-to-voice) | Nice-to-have | High |
|
|
54
|
-
|
|
55
|
-
## Key Constraints
|
|
56
|
-
|
|
57
|
-
1. P0 must ship independently and prove value before P1/P2 begin
|
|
58
|
-
2. No runtime dependency on BMAD repo -- adapter reads BMAD output artifacts only
|
|
59
|
-
3. Zero regression on existing non-BMAD workflows
|
|
60
|
-
4. All code must pass existing 8-gate quality system
|
|
61
|
-
5. Context budget: BMAD additions must stay under 15K tokens per iteration
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
# Auto-Claude vs Loki Mode: Honest Technical Comparison
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
| Metric | Auto-Claude | Loki Mode |
|
|
6
|
-
|--------|-------------|-----------|
|
|
7
|
-
| **GitHub Stars** | 11,479 | 594 |
|
|
8
|
-
| **Release Type** | Desktop app (Electron) | CLI skill |
|
|
9
|
-
| **License** | AGPL-3.0 | MIT |
|
|
10
|
-
| **Requires** | Claude Pro/Max subscription | Claude API (any tier) |
|
|
11
|
-
| **Version** | v2.7.5 (stable) | v5.25.0 |
|
|
12
|
-
| **Created** | Dec 2025 | Jan 2026 |
|
|
13
|
-
| **Community** | Discord, YouTube | GitHub only |
|
|
14
|
-
|
|
15
|
-
## Honest Assessment: Where Auto-Claude is Better
|
|
16
|
-
|
|
17
|
-
### 1. Desktop GUI with Visual Task Management
|
|
18
|
-
Auto-Claude provides a native Electron app with:
|
|
19
|
-
- Kanban board for visual task tracking
|
|
20
|
-
- Multiple agent terminals (up to 12)
|
|
21
|
-
- Real-time progress visualization
|
|
22
|
-
- Point-and-click interface
|
|
23
|
-
|
|
24
|
-
**Loki Mode:** CLI + web dashboard with dark Vercel/Linear theme, sidebar navigation, overview cards, Completion Council views. Dashboard served on port 57374.
|
|
25
|
-
|
|
26
|
-
**Verdict: Auto-Claude wins** - GUI significantly lowers barrier to entry.
|
|
27
|
-
|
|
28
|
-
### 2. Package Distribution
|
|
29
|
-
Auto-Claude provides:
|
|
30
|
-
- Pre-built binaries for Windows, macOS (Intel + ARM), Linux
|
|
31
|
-
- Auto-updates
|
|
32
|
-
- SHA256 checksums
|
|
33
|
-
- VirusTotal scans for security
|
|
34
|
-
|
|
35
|
-
**Loki Mode:** npm, Homebrew, Docker, and git clone. Multiple distribution methods.
|
|
36
|
-
|
|
37
|
-
**Verdict: Auto-Claude wins** - Professional distribution.
|
|
38
|
-
|
|
39
|
-
### 3. Community and Adoption
|
|
40
|
-
- Auto-Claude: 11,479 stars, Discord community, YouTube channel, active development
|
|
41
|
-
- Loki Mode: 594 stars, GitHub-only community, CONTRIBUTING.md + issue templates added
|
|
42
|
-
|
|
43
|
-
**Verdict: Auto-Claude wins** - Network effects matter.
|
|
44
|
-
|
|
45
|
-
### 4. External Integrations
|
|
46
|
-
Auto-Claude has built-in:
|
|
47
|
-
- GitHub/GitLab integration (import issues, create MRs)
|
|
48
|
-
- Linear integration (sync tasks)
|
|
49
|
-
- OAuth setup flow
|
|
50
|
-
|
|
51
|
-
**Loki Mode:** No built-in integrations. Manual git operations.
|
|
52
|
-
|
|
53
|
-
**Verdict: Auto-Claude wins** - Better workflow integration.
|
|
54
|
-
|
|
55
|
-
### 5. Interactive Controls
|
|
56
|
-
Auto-Claude allows:
|
|
57
|
-
- Ctrl+C to pause and add instructions
|
|
58
|
-
- HUMAN_INPUT.md for file-based intervention
|
|
59
|
-
- PAUSE file to pause after current session
|
|
60
|
-
|
|
61
|
-
**Loki Mode:** Limited. INTERVENTION_NEEDED signal exists but less refined.
|
|
62
|
-
|
|
63
|
-
**Verdict: Auto-Claude wins** - Better human-in-the-loop.
|
|
64
|
-
|
|
65
|
-
### 6. AI-Powered Merge
|
|
66
|
-
Auto-Claude has automatic conflict resolution when merging branches.
|
|
67
|
-
|
|
68
|
-
**Loki Mode:** Has auto-merge but aborts on conflicts.
|
|
69
|
-
|
|
70
|
-
**Verdict: Auto-Claude wins** - Smarter merge handling.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Honest Assessment: Where Loki Mode is Better
|
|
75
|
-
|
|
76
|
-
### 1. Research Foundation
|
|
77
|
-
Loki Mode is built on peer-reviewed research:
|
|
78
|
-
- Anthropic: Constitutional AI, alignment detection
|
|
79
|
-
- DeepMind: SIMA 2, Scalable Oversight via Debate
|
|
80
|
-
- OpenAI: Agents SDK patterns
|
|
81
|
-
- Academic: CONSENSAGENT (ACL 2025), GoalAct, A-Mem/MIRIX
|
|
82
|
-
|
|
83
|
-
**Auto-Claude:** No documented research foundation.
|
|
84
|
-
|
|
85
|
-
**Verdict: Loki Mode wins** - Academically grounded.
|
|
86
|
-
|
|
87
|
-
### 3. Full SDLC Coverage
|
|
88
|
-
Loki Mode covers:
|
|
89
|
-
- Engineering (code, tests, deployment)
|
|
90
|
-
- Business operations (marketing, sales, legal)
|
|
91
|
-
- Growth (A/B testing, community, lifecycle)
|
|
92
|
-
|
|
93
|
-
**Auto-Claude:** Engineering only. No business/marketing agents.
|
|
94
|
-
|
|
95
|
-
**Verdict: Loki Mode wins** - Full spec-to-product lifecycle vs coding only.
|
|
96
|
-
|
|
97
|
-
### 4. Anti-Sycophancy Measures
|
|
98
|
-
Loki Mode implements CONSENSAGENT (ACL 2025):
|
|
99
|
-
- Blind 3-reviewer system
|
|
100
|
-
- Devil's advocate on unanimous approval
|
|
101
|
-
- Severity-based blocking
|
|
102
|
-
|
|
103
|
-
**Auto-Claude:** Single QA loop with no anti-sycophancy checks.
|
|
104
|
-
|
|
105
|
-
**Verdict: Loki Mode wins** - Research-backed quality assurance.
|
|
106
|
-
|
|
107
|
-
### 5. Quality Gates
|
|
108
|
-
Loki Mode runs 8 deterministic quality gates plus full SDLC phase coverage.
|
|
109
|
-
|
|
110
|
-
The 8 deterministic quality gates: static analysis (CodeQL, ESLint), test suite (pass/fail), blind 3-reviewer review with severity blocking, anti-sycophancy Devil's Advocate, mock-integrity, test-mutation, documentation coverage, and Magic Modules debate. (Backward-compatibility is a conditional healing-mode auditor, not a numbered gate.)
|
|
111
|
-
|
|
112
|
-
Beyond the gates, the SDLC pipeline covers these phases:
|
|
113
|
-
1. Static analysis (CodeQL, ESLint)
|
|
114
|
-
2. Unit tests (test suite passes; coverage % not measured this release)
|
|
115
|
-
3. API/Integration tests
|
|
116
|
-
4. E2E tests (Playwright)
|
|
117
|
-
5. Security scanning (OWASP)
|
|
118
|
-
6. Parallel code review (3 reviewers)
|
|
119
|
-
7. Performance/load testing
|
|
120
|
-
8. Accessibility (WCAG)
|
|
121
|
-
9. Regression testing
|
|
122
|
-
10. UAT simulation
|
|
123
|
-
11. Anti-sycophancy check
|
|
124
|
-
12. Scale-aware review intensity
|
|
125
|
-
13. Continuous monitoring
|
|
126
|
-
|
|
127
|
-
**Auto-Claude:** Single QA validation loop (up to 50 iterations).
|
|
128
|
-
|
|
129
|
-
**Verdict: Loki Mode wins** - Comprehensive quality vs single loop.
|
|
130
|
-
|
|
131
|
-
### 7. Licensing
|
|
132
|
-
- Loki Mode: BUSL-1.1 (source-available)
|
|
133
|
-
- Auto-Claude: AGPL-3.0 (copyleft, requires open-sourcing modifications)
|
|
134
|
-
|
|
135
|
-
### 8. API Access
|
|
136
|
-
- Loki Mode: Works with Claude API (any tier)
|
|
137
|
-
- Auto-Claude: Requires Claude Pro/Max subscription
|
|
138
|
-
|
|
139
|
-
**Verdict: Loki Mode wins** - Lower barrier to entry.
|
|
140
|
-
|
|
141
|
-
### 9. No External Dependencies
|
|
142
|
-
- Loki Mode: Pure bash/skill, no Electron, no Python backend
|
|
143
|
-
- Auto-Claude: Requires Python 3.9+, Node.js, Electron, specific npm packages
|
|
144
|
-
|
|
145
|
-
**Verdict: Loki Mode wins** - Simpler, lighter footprint.
|
|
146
|
-
|
|
147
|
-
### 10. Cursor Scale Patterns (v3.3.0)
|
|
148
|
-
Loki Mode now incorporates proven patterns from Cursor's large-scale agent deployments:
|
|
149
|
-
- Recursive sub-planners
|
|
150
|
-
- Judge agents for cycle decisions
|
|
151
|
-
- Optimistic concurrency control
|
|
152
|
-
- Scale-aware review intensity
|
|
153
|
-
|
|
154
|
-
**Auto-Claude:** Does not document scale patterns.
|
|
155
|
-
|
|
156
|
-
**Verdict: Loki Mode wins** - Production-tested at scale.
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
## Feature Comparison Matrix
|
|
161
|
-
|
|
162
|
-
| Feature | Auto-Claude | Loki Mode |
|
|
163
|
-
|---------|:-----------:|:---------:|
|
|
164
|
-
| Desktop GUI | Yes | Web Dashboard (dark theme) |
|
|
165
|
-
| CLI Support | Yes | Yes |
|
|
166
|
-
| Git Worktrees | Yes | Yes |
|
|
167
|
-
| Parallel Agents | 12 terminals | 3-5 sessions |
|
|
168
|
-
| Memory Persistence | Yes (Graphiti) | Yes (episodic/semantic) |
|
|
169
|
-
| GitHub Integration | Yes | No |
|
|
170
|
-
| Linear Integration | Yes | No |
|
|
171
|
-
| Auto-Updates | Yes | No |
|
|
172
|
-
| Research Foundation | No | Yes |
|
|
173
|
-
| Specialized Agents | 4 types | 41 types |
|
|
174
|
-
| Business Automation | No | Yes |
|
|
175
|
-
| Anti-Sycophancy | No | Yes |
|
|
176
|
-
| Quality Gates | 1 (QA loop) | 14 + Completion Council |
|
|
177
|
-
| Published Benchmarks | No | Yes |
|
|
178
|
-
| AI Merge Resolution | Yes | No |
|
|
179
|
-
| Complexity Tiers | Yes | No |
|
|
180
|
-
| Human Intervention | Yes (Ctrl+C, files) | Limited |
|
|
181
|
-
| License | AGPL-3.0 | MIT |
|
|
182
|
-
| Subscription Required | Yes (Pro/Max) | No |
|
|
183
|
-
|
|
184
|
-
---
|
|
185
|
-
|
|
186
|
-
## What Loki Mode Should Learn from Auto-Claude
|
|
187
|
-
|
|
188
|
-
### High Priority
|
|
189
|
-
1. **AI-Powered Merge Resolution** - Handle conflicts automatically instead of aborting
|
|
190
|
-
2. **Human Intervention Mechanism** - Add Ctrl+C pause, HUMAN_INPUT.md, PAUSE file
|
|
191
|
-
3. **Complexity Tiers** - Simple (3 phases), Standard (6), Complex (8)
|
|
192
|
-
4. **Session Memory Persistence** - Graphiti-style cross-session memory
|
|
193
|
-
|
|
194
|
-
### Medium Priority
|
|
195
|
-
5. **Visual Dashboard Upgrade** - Better than current basic HTML polling
|
|
196
|
-
6. **Spec Runner Pattern** - Interactive spec creation like Auto-Claude's CLI
|
|
197
|
-
7. **GitHub/GitLab Integration** - Import issues, create MRs
|
|
198
|
-
|
|
199
|
-
### Lower Priority
|
|
200
|
-
8. **Package Distribution** - Consider Electron or at least versioned releases
|
|
201
|
-
9. **Discord Community** - Build community infrastructure
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
## What Auto-Claude Could Learn from Loki Mode
|
|
206
|
-
|
|
207
|
-
1. **Research Foundation** - Document the science behind decisions
|
|
208
|
-
3. **Anti-Sycophancy** - Blind review prevents false positives
|
|
209
|
-
4. **Full SDLC** - Business, marketing, growth automation
|
|
210
|
-
6. **Source-available (BUSL-1.1)** - Inspect and self-host the full code
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
-
|
|
214
|
-
## Conclusion
|
|
215
|
-
|
|
216
|
-
**Auto-Claude is better if you want:**
|
|
217
|
-
- Visual GUI with Kanban board
|
|
218
|
-
- Pre-packaged desktop app
|
|
219
|
-
- GitHub/Linear integration
|
|
220
|
-
- Large community
|
|
221
|
-
|
|
222
|
-
**Loki Mode is better if you want:**
|
|
223
|
-
- Research-backed architecture
|
|
224
|
-
- Full spec-to-product lifecycle (not just coding)
|
|
225
|
-
- 41 specialized agent roles
|
|
226
|
-
- Anti-sycophancy measures
|
|
227
|
-
- Source-available (BUSL-1.1) license
|
|
228
|
-
- No subscription requirement
|
|
229
|
-
- Verified benchmarks
|
|
230
|
-
|
|
231
|
-
### Honest Summary
|
|
232
|
-
|
|
233
|
-
Auto-Claude has better UX and community. Loki Mode has better architecture and coverage.
|
|
234
|
-
|
|
235
|
-
Auto-Claude is a polished product. Loki Mode is a research-backed system.
|
|
236
|
-
|
|
237
|
-
For pure coding tasks with GUI preference: **Auto-Claude wins**.
|
|
238
|
-
For full autonomous spec-to-product delivery with quality guarantees: **Loki Mode wins**.
|
|
239
|
-
|
|
240
|
-
---
|
|
241
|
-
|
|
242
|
-
## Sources
|
|
243
|
-
|
|
244
|
-
- [Auto-Claude GitHub](https://github.com/AndyMik90/Auto-Claude)
|
|
245
|
-
- [MemOS - Memory Operating System](https://github.com/MemTensor/MemOS)
|
|
246
|
-
- [Dexter - Financial Research Agent](https://github.com/virattt/dexter)
|
|
247
|
-
- [Simon Willison - Scaling Long-Running Autonomous Coding](https://simonwillison.net/2026/Jan/19/scaling-long-running-autonomous-coding/)
|
|
248
|
-
- [Cursor - Scaling Agents Blog](https://cursor.com/blog/scaling-agents)
|
|
249
|
-
- [CONSENSAGENT - ACL 2025](https://aclanthology.org/2025.findings-acl.1141/)
|
|
250
|
-
- [Agentic AI Trends 2026](https://machinelearningmastery.com/7-agentic-ai-trends-to-watch-in-2026/)
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
# Agent 01 - CLI Functional Testing Bug Fixes
|
|
2
|
-
|
|
3
|
-
File modified: `autonomy/loki`
|
|
4
|
-
Total changes: 166 insertions, 39 deletions
|
|
5
|
-
|
|
6
|
-
## Known Bugs Fixed
|
|
7
|
-
|
|
8
|
-
### BUG-CLI-003 | PID recycling guard for `cmd_web_stop`
|
|
9
|
-
- **Location**: `cmd_web_stop()` PID file kill block
|
|
10
|
-
- **Fix**: Before killing a PID from the PID file, verify the process command matches `python`, `uvicorn`, or `Purple` via `ps -p PID -o comm=`. If the PID has been recycled by the OS to a non-Purple-Lab process, skip the kill and warn the user.
|
|
11
|
-
|
|
12
|
-
### BUG-CLI-012 | Shell injection via unquoted Python file paths
|
|
13
|
-
- **Location**: Multiple `python3 -c` calls throughout the CLI
|
|
14
|
-
- **Fix**: Replaced all `open('$variable')` patterns in `python3 -c` calls with environment-variable-based parameter passing (`_VAR="$value" python3 -c "import os; open(os.environ['_VAR'])"`). Fixed 14 instances across:
|
|
15
|
-
- `cmd_status` context window (lines ~1741-1742)
|
|
16
|
-
- Healing report (friction map, failure modes)
|
|
17
|
-
- Trigger schedule count
|
|
18
|
-
- Failover chain providers
|
|
19
|
-
- Vector index stats (numpy)
|
|
20
|
-
- Context show (5 token metrics)
|
|
21
|
-
- Budget cost display (2 metrics)
|
|
22
|
-
- OTEL config endpoint
|
|
23
|
-
- Project description JSON output
|
|
24
|
-
|
|
25
|
-
### BUG-CLI-005 | `cmd_web_status` wrong port and log paths
|
|
26
|
-
- **Location**: `cmd_web_status()`
|
|
27
|
-
- **Fix**: Port lookup now checks `$PURPLE_LAB_STATE_DIR/port` (home-based) first before CWD-based fallback. Log path resolves against home-based state dir first, falling back to CWD-based path.
|
|
28
|
-
|
|
29
|
-
### BUG-CLI-006 | `loki logs` truncates to 50 lines silently
|
|
30
|
-
- **Location**: `cmd_logs()`
|
|
31
|
-
- **Fix**: Added full argument parsing with `--tail/-n`, `--follow/-f`, `--all/-a`, and `--help`. The 50-line default is now documented in a hint line shown with output. Added `--follow` for live streaming.
|
|
32
|
-
|
|
33
|
-
### BUG-CLI-007 | `loki init` skips directory creation on failure
|
|
34
|
-
- **Location**: `cmd_init()` project directory creation
|
|
35
|
-
- **Fix**: Added `if ! mkdir -p` guards for both the project directory and `.loki` directory creation. Script now exits with an error message if directory creation fails.
|
|
36
|
-
|
|
37
|
-
### BUG-CLI-008 | `loki export` overwrites without confirmation
|
|
38
|
-
- **Location**: `_export_json()`, `_export_markdown()`, `_export_csv()`, `_export_timeline()`
|
|
39
|
-
- **Fix**: Added `_export_check_overwrite()` helper that checks if the output file exists and prompts `Overwrite? [y/N]` before writing. Called in all four export format functions.
|
|
40
|
-
|
|
41
|
-
### BUG-CLI-009 | `loki share` generates non-unique IDs
|
|
42
|
-
- **Location**: `cmd_share()` gist description
|
|
43
|
-
- **Fix**: Changed gist description timestamp from `%Y-%m-%d` (day granularity) to `%Y-%m-%dT%H:%M:%S` (second granularity) to avoid collisions when sharing multiple times per day.
|
|
44
|
-
|
|
45
|
-
### BUG-CLI-010 | `loki config set` accepts any key without validation
|
|
46
|
-
- **Location**: `cmd_config_set()` wildcard case
|
|
47
|
-
- **Fix**: Changed from a warning that stores the value anyway to a hard error that lists valid keys and returns 1. Unknown keys are now rejected.
|
|
48
|
-
|
|
49
|
-
### BUG-CLI-011 | `config_get` error handling
|
|
50
|
-
- **Location**: `cmd_config_get()`
|
|
51
|
-
- **Fix**: Wrapped the Python heredoc in a subshell capture with `|| { error; return 1; }` pattern to gracefully handle python3 failures without leaking state. Removed unnecessary `unset` of inline env vars.
|
|
52
|
-
|
|
53
|
-
### BUG-CLI-008 (Medium) | `LOKI_DIR` not exported for Python heredocs
|
|
54
|
-
- **Location**: Line 129
|
|
55
|
-
- **Fix**: Added `export LOKI_DIR` immediately after assignment. This ensures all Python heredocs using `os.environ.get("LOKI_DIR", ".loki")` receive the correct value.
|
|
56
|
-
|
|
57
|
-
### BUG-PAR-002 | `worktree list` branch pattern never matches
|
|
58
|
-
- **Location**: `cmd_worktree()` list subcommand
|
|
59
|
-
- **Fix**: Branch matching pattern changed from `loki-parallel-*` to match both `parallel-*` and `loki-parallel-*`. The actual branches created by `run.sh` use `parallel-<stream>` prefix (line 2130 of run.sh), not `loki-parallel-`.
|
|
60
|
-
|
|
61
|
-
### BUG-PAR-010 | `worktree clean` doesn't kill running sessions
|
|
62
|
-
- **Location**: `cmd_worktree()` clean subcommand
|
|
63
|
-
- **Fix**: Before removing a worktree via `git worktree remove`, check for `.loki/loki.pid` in the worktree directory. If a session is running, send SIGTERM, wait 1 second, then SIGKILL if needed.
|
|
64
|
-
|
|
65
|
-
## New Bugs Found and Fixed
|
|
66
|
-
|
|
67
|
-
### NEW-CLI-001 | Division by zero in context percentage calculation
|
|
68
|
-
- **Location**: `cmd_status()` and `_context_show()`
|
|
69
|
-
- **Fix**: Added `if [ "$ctx_total" -gt 0 ]` / `if [ "$total_tokens" -gt 0 ]` guards before the `$((used * 100 / total))` arithmetic. If total is zero, percentage defaults to 0.
|
|
70
|
-
|
|
71
|
-
### NEW-CLI-002 | Missing `loki web logs` subcommand
|
|
72
|
-
- **Location**: `cmd_web()` case dispatch
|
|
73
|
-
- **Fix**: Added `logs)` case to `cmd_web()` that displays Purple Lab server logs using `tail -n`. Defaults to 100 lines. Also checks home-based state dir and CWD-based fallback for log file location. Updated `cmd_web_help()` to list the `logs` subcommand.
|
|
74
|
-
|
|
75
|
-
## Bugs Investigated But Not Fixed (Already Correct)
|
|
76
|
-
|
|
77
|
-
### BUG-CLI-001 / BUG-CLI-002 | `--port` / `--prd` unbound variable
|
|
78
|
-
- **Status**: Already fixed in current code. `cmd_web_start()` initializes `port="${PURPLE_LAB_DEFAULT_PORT}"` and `prd_file=""` before the argument parsing loop. The `--port` and `--prd` handlers properly check `${2:-}` before accessing `$2`.
|
|
79
|
-
|
|
80
|
-
### BUG-CLI-004 | `--no-open` flag ignored
|
|
81
|
-
- **Status**: Already working correctly. The `open_browser` variable is set to `false` by `--no-open` and checked with `if [ "$open_browser" = true ]` before any browser-open calls.
|
|
82
|
-
|
|
83
|
-
### BUG-CLI-009 (Medium) | Empty array with `set -u` in `list_running_sessions`
|
|
84
|
-
- **Status**: Already fixed. Uses `${sessions[@]+"${sessions[@]}"}` pattern throughout, which is the correct `set -u`-safe array expansion.
|
|
85
|
-
|
|
86
|
-
### BUG-CMD-001 | `cmd_web` wildcard duplicates arguments
|
|
87
|
-
- **Status**: Analyzed and found to be working correctly. The `*)` case properly shifts the subcommand-as-flag, then passes it along with remaining args to `cmd_web_start`.
|
|
88
|
-
|
|
89
|
-
## Bugs Found But Not Fixed (Out of Scope or Extensive)
|
|
90
|
-
|
|
91
|
-
### Missing `$2` guards in `shift 2` patterns
|
|
92
|
-
- **Location**: Multiple argument parsers (e.g., `cmd_state query`, trigger config parsing)
|
|
93
|
-
- **Issue**: Under `set -u`, if a flag like `--agent` is the last argument without a value, `$2` is unset, causing a crash. The pattern `shift 2 ;;` should be guarded with `${2:-}` checks.
|
|
94
|
-
- **Impact**: Low -- only triggers on malformed user input.
|
|
95
|
-
- **Scope**: 20+ occurrences across the file; would require systematic refactoring.
|
|
96
|
-
|
|
97
|
-
### Remaining shell-expanded heredocs with `$variable` in `open()` calls
|
|
98
|
-
- **Location**: Lines 3745, 8002, 9332, 10228, 10262, 12604, 16844, etc.
|
|
99
|
-
- **Issue**: Double-quoted heredocs (`<< HEREDOC`) interpolate shell variables into Python `open()` calls. While the variables are internally-constructed paths (not user input), specially-crafted directory names with quotes could theoretically cause injection.
|
|
100
|
-
- **Impact**: Very low -- would require the user to be working in a directory with Python metacharacters in its path.
|
|
101
|
-
- **Scope**: 15+ occurrences; fixing all requires converting to single-quoted heredocs with env var passing.
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
# Agent 02: Purple Lab Functional Testing - Bug Fix Report
|
|
2
|
-
|
|
3
|
-
## Summary
|
|
4
|
-
|
|
5
|
-
Audited `web-app/server.py` (5,679 lines) and all frontend components in `web-app/src/` (50 files).
|
|
6
|
-
Fixed 8 bugs (3 security, 2 resource leaks, 2 race conditions, 1 missing validation).
|
|
7
|
-
Verified all 13 bugs from BUG-AUDIT-v6.61.0 against the current codebase.
|
|
8
|
-
|
|
9
|
-
## Bugs Fixed
|
|
10
|
-
|
|
11
|
-
### FIX-1: `_save_secrets()` crashes when crypto module is missing (BUG-PL-013 related)
|
|
12
|
-
- **File**: `web-app/server.py:2431`
|
|
13
|
-
- **Severity**: Medium
|
|
14
|
-
- **Problem**: `_save_secrets()` calls `from crypto import encrypt_value, encryption_available` without try/except ImportError. When the crypto module is not installed, saving any secret (POST /api/secrets) crashes with an unhandled ImportError. The counterpart `_load_secrets()` already handles this correctly.
|
|
15
|
-
- **Fix**: Wrapped the crypto import in try/except ImportError with plaintext fallback, matching the pattern in `_load_secrets()`.
|
|
16
|
-
|
|
17
|
-
### FIX-2: `fix_session` orphans child processes (BUG-PL-007 related)
|
|
18
|
-
- **File**: `web-app/server.py:4203`
|
|
19
|
-
- **Severity**: High
|
|
20
|
-
- **Problem**: `run_fix()` in the `/api/sessions/{id}/fix` endpoint spawns a subprocess but never calls `_track_child_pid()` or `_untrack_child_pid()`. When `loki web stop` runs, these fix processes are not found in the tracking list and remain as orphans, consuming resources. The chat endpoint (`run_chat()`) correctly tracks and untracks -- this was a missed pattern.
|
|
21
|
-
- **Fix**: Added `_track_child_pid(proc.pid)` after process creation and `_untrack_child_pid(proc.pid)` in the finally block.
|
|
22
|
-
|
|
23
|
-
### FIX-3: Session history leaks full filesystem paths (BUG-PL-003 from task description)
|
|
24
|
-
- **File**: `web-app/server.py:3411`
|
|
25
|
-
- **Severity**: Medium (security/information disclosure)
|
|
26
|
-
- **Problem**: `get_sessions_history()` returned `"path": str(entry)` which exposes full paths like `/Users/lokesh/purple-lab-projects/project-123`. In deployed scenarios this leaks the server's filesystem structure, username, and directory layout.
|
|
27
|
-
- **Fix**: Replaced with sanitized relative paths using `~/` prefix (e.g., `~/purple-lab-projects/project-123`). This is safe because the session history path is display-only on the frontend.
|
|
28
|
-
|
|
29
|
-
### FIX-4: `delete_session` leaks filesystem path in response
|
|
30
|
-
- **File**: `web-app/server.py:3495`
|
|
31
|
-
- **Severity**: Low (security/information disclosure)
|
|
32
|
-
- **Problem**: `delete_session()` returned `"path": str(target)` in its response, exposing the full filesystem path to the client.
|
|
33
|
-
- **Fix**: Changed to return `"session_id": session_id` instead.
|
|
34
|
-
|
|
35
|
-
### FIX-5: `start_session` accepts arbitrary projectDir without validation
|
|
36
|
-
- **File**: `web-app/server.py:2510`
|
|
37
|
-
- **Severity**: High (security)
|
|
38
|
-
- **Problem**: The `projectDir` field from StartRequest was used directly without any path validation. A malicious client could pass `/etc`, `/root`, or any system path, and the server would create directories and write PRD files there. The `onboard_session` endpoint already validates paths correctly.
|
|
39
|
-
- **Fix**: Added validation ensuring user-supplied `projectDir` resolves to within the home directory, matching the pattern in `onboard_session`.
|
|
40
|
-
|
|
41
|
-
### FIX-6: `create_session_file` missing content size limit (BUG-PL-005 from task description)
|
|
42
|
-
- **File**: `web-app/server.py:3691`
|
|
43
|
-
- **Severity**: Medium
|
|
44
|
-
- **Problem**: `create_session_file()` (POST) accepts file content without any size validation. The sibling `save_session_file()` (PUT) correctly enforces a 1MB limit. A client could create arbitrarily large files via the POST endpoint.
|
|
45
|
-
- **Fix**: Added `len(req.content.encode(...)) > 1_048_576` check matching the PUT endpoint.
|
|
46
|
-
|
|
47
|
-
### FIX-7: `pause_session` and `resume_session` mutate state without lock
|
|
48
|
-
- **File**: `web-app/server.py:2972, 2989`
|
|
49
|
-
- **Severity**: Medium (race condition)
|
|
50
|
-
- **Problem**: Both `pause_session()` and `resume_session()` read `session.running`, `session.process`, and write `session.paused` without holding `session._lock`. Concurrent pause/resume and stop operations could produce torn state. The `stop_session` and `start_session` endpoints correctly use `async with session._lock`.
|
|
51
|
-
- **Fix**: Wrapped both endpoints' state access in `async with session._lock`.
|
|
52
|
-
|
|
53
|
-
### FIX-8: `delete_secret` endpoint missing key format validation
|
|
54
|
-
- **File**: `web-app/server.py:4340`
|
|
55
|
-
- **Severity**: Low (defense in depth)
|
|
56
|
-
- **Problem**: The `delete_secret()` endpoint accepts arbitrary strings as the `key` parameter without validation. While not exploitable (used only as dict key lookup), the `set_secret()` endpoint validates key format -- the inconsistency could mask bugs.
|
|
57
|
-
- **Fix**: Added `re.match(r'^[A-Za-z_][A-Za-z0-9_]*$', key)` validation matching `set_secret()`.
|
|
58
|
-
|
|
59
|
-
## Bugs from Audit Already Fixed in Current Codebase
|
|
60
|
-
|
|
61
|
-
The following bugs from BUG-AUDIT-v6.61.0 were already fixed before this audit:
|
|
62
|
-
|
|
63
|
-
| Bug ID | Description | Status |
|
|
64
|
-
|--------|-------------|--------|
|
|
65
|
-
| BUG-PL-001 | Dead code after `stop_session` return | Fixed: no early return, full cleanup runs |
|
|
66
|
-
| BUG-PL-002 | `session.reset()` never called on stop | Fixed: `session.reset()` called at line 2742 |
|
|
67
|
-
| BUG-PL-003 (audit) | Reader task sets `running=False` without lock | Fixed: uses `async with session._lock` at line 2361 |
|
|
68
|
-
| BUG-PL-004 | Chat/fix missing secrets injection | Fixed: both endpoints call `_load_secrets()` |
|
|
69
|
-
| BUG-PL-005 (audit) | Pause state never tracked | Fixed: `session.paused` set in both pause/resume |
|
|
70
|
-
| BUG-PL-006 | `delete_session` can delete active session | Fixed: explicit active session check at line 3458 |
|
|
71
|
-
| BUG-PL-009 | Project dir name collision (second-granularity) | Fixed: uses milliseconds (`time.time() * 1000`) |
|
|
72
|
-
| BUG-PL-010 | `get_status` mutates `running` without lock | Fixed: uses local `is_running` variable, not session state |
|
|
73
|
-
| BUG-PL-011 | Session history breaks after first non-empty dir | Fixed: no early `break` in history loop |
|
|
74
|
-
| BUG-PL-012 | `cancel_chat` unhandled `TimeoutExpired` | Fixed: caught at line 4133 |
|
|
75
|
-
|
|
76
|
-
## New Bugs Discovered (Beyond Audit)
|
|
77
|
-
|
|
78
|
-
All bugs listed in the "Bugs Fixed" section above (FIX-1 through FIX-8) are new discoveries not covered by the original BUG-AUDIT-v6.61.0 for the Purple Lab category. FIX-1, FIX-2, FIX-5, FIX-6, FIX-7, and FIX-8 are entirely new findings.
|
|
79
|
-
|
|
80
|
-
## Verification
|
|
81
|
-
|
|
82
|
-
- Python syntax: `ast.parse()` passes on modified server.py
|
|
83
|
-
- Frontend build: `npm run build` succeeds with no new errors
|
|
84
|
-
- All changes are backward-compatible (no API contract changes except delete_session response field rename from `path` to `session_id`)
|
|
85
|
-
|
|
86
|
-
## Files Modified
|
|
87
|
-
|
|
88
|
-
- `web-app/server.py` -- 8 bug fixes (50 insertions, 26 deletions)
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
# Agent 03: Dashboard API Functional Testing - Bug Fix Report
|
|
2
|
-
|
|
3
|
-
## Scope
|
|
4
|
-
File: `dashboard/server.py` (~5,259 lines, FastAPI)
|
|
5
|
-
Focus: All API routes, WebSocket handlers, task board features, security audit
|
|
6
|
-
|
|
7
|
-
## Bug Audit Status from BUG-AUDIT-v6.61.0.md
|
|
8
|
-
|
|
9
|
-
### Already Fixed (verified in current codebase)
|
|
10
|
-
|
|
11
|
-
| Bug ID | Description | Status |
|
|
12
|
-
|--------|-------------|--------|
|
|
13
|
-
| BUG-DASH-001 | Token creation endpoint has no authentication | FIXED - `require_scope("admin")` dependency at line 1719 |
|
|
14
|
-
| BUG-DASH-002 | WebSocket rate-limit calls close() on unaccepted connection | FIXED - `accept()` then `close()` at lines 1396-1397 |
|
|
15
|
-
| BUG-DASH-003 | WebSocket connection limit rejection enters receive loop | FIXED - `connect()` returns False, caller returns at line 1421-1422 |
|
|
16
|
-
| BUG-DASH-004 | `create_project` doesn't validate tenant_id | FIXED - Tenant existence check + `Field(..., gt=0)` validation |
|
|
17
|
-
| BUG-DASH-005 | `update_task` doesn't clear completed_at on reopen | FIXED - `completed_at = None` in else branch at line 1254 |
|
|
18
|
-
| BUG-DASH-006 | Task state machine missing DONE transitions | FIXED - `DONE: {IN_PROGRESS, REVIEW}` at line 1316 |
|
|
19
|
-
| BUG-DASH-009 | ProjectUpdate.status allows arbitrary strings | FIXED - `Literal["active", "archived", "completed", "paused"]` at line 179 |
|
|
20
|
-
| BUG-DASH-010 | Audit log offset allows negative values | FIXED - `ge=0` constraint at line 1824 |
|
|
21
|
-
| BUG-DASH-011 | Learning signals offset allows negative values | FIXED - `ge=0` constraint at line 2443 |
|
|
22
|
-
| BUG-DASH-012 | WebSocket idle timeout doesn't call disconnect | FIXED - `finally: manager.disconnect(websocket)` at line 1469 |
|
|
23
|
-
| BUG-DASH-013 | GET /api/tasks ignores project_id parameter | FIXED - Filter applied at lines 1132-1134 |
|
|
24
|
-
|
|
25
|
-
### Not Applicable (code removed)
|
|
26
|
-
|
|
27
|
-
| Bug ID | Description | Status |
|
|
28
|
-
|--------|-------------|--------|
|
|
29
|
-
| BUG-PL-001 | Dead code after stop_session return | N/A - Purple Lab code removed from server.py |
|
|
30
|
-
| BUG-PL-002 | session.reset() never called on stop | N/A - Purple Lab code removed from server.py |
|
|
31
|
-
| BUG-PL-003 | Reader task sets running=False without lock | N/A - Purple Lab code removed |
|
|
32
|
-
| BUG-PL-004 | Chat/fix/auto-fix missing secrets injection | N/A - Purple Lab code removed |
|
|
33
|
-
| BUG-PL-005 | Pause state never tracked | N/A - Purple Lab code removed |
|
|
34
|
-
| BUG-PL-006 | delete_session can delete active directory | N/A - Purple Lab code removed |
|
|
35
|
-
| BUG-PL-007 | Chat PIDs tracked but never untracked | N/A - Purple Lab code removed |
|
|
36
|
-
| BUG-DS-002 | Auto-fix restart double-wraps command | N/A - Dev server code removed |
|
|
37
|
-
| BUG-DS-003 | Overly broad port regex | N/A - Dev server code removed |
|
|
38
|
-
| BUG-DS-004 | pip install into server's own environment | N/A - Dev server code removed |
|
|
39
|
-
| BUG-DS-005 | Docker Compose port parsing crash | N/A - Dev server code removed |
|
|
40
|
-
| BUG-DASH-007 | pause_session polling loop is dead code | N/A - pause_session rewritten (no polling loop) |
|
|
41
|
-
|
|
42
|
-
## Fixes Applied in This Session
|
|
43
|
-
|
|
44
|
-
### 1. BUG-DASH-008: `_safe_read_text` not truly safe (lines 95-101)
|
|
45
|
-
|
|
46
|
-
**Problem**: `_safe_read_text` used `Path.read_text()` directly without exception handling. While `Path.read_text()` properly manages file handles (no leak), the function could raise `OSError` on permission errors or missing files. The "safe" name was misleading -- callers expected it to never raise.
|
|
47
|
-
|
|
48
|
-
**Fix**: Wrapped in try/except to return empty string on any I/O error, making the function truly safe as its name implies.
|
|
49
|
-
|
|
50
|
-
### 2. SECURITY: `/api/focus` POST/DELETE missing authentication (lines 1637, 1672)
|
|
51
|
-
|
|
52
|
-
**Problem**: The `/api/focus` POST and DELETE endpoints had no auth dependency. Any network-reachable client could redirect the dashboard to read from an arbitrary project directory, potentially exposing data from other projects or causing the dashboard to process attacker-controlled state files.
|
|
53
|
-
|
|
54
|
-
**Fix**:
|
|
55
|
-
- Added `dependencies=[Depends(auth.require_scope("control"))]` to both POST and DELETE
|
|
56
|
-
- Added validation requiring the target directory to contain a `.loki/` subdirectory to prevent pointing the dashboard at arbitrary filesystem locations
|
|
57
|
-
- Changed to resolve path before checking, preventing TOCTOU issues
|
|
58
|
-
|
|
59
|
-
### 3. SECURITY: `/api/enterprise/tokens` GET missing authentication (line 1766)
|
|
60
|
-
|
|
61
|
-
**Problem**: The token listing endpoint had no auth dependency. When enterprise mode was enabled, any client could enumerate all API tokens (names, scopes, creation dates, expiration). While raw token values are not returned, the metadata exposure is still a security risk for token enumeration and scope discovery.
|
|
62
|
-
|
|
63
|
-
**Fix**: Added `dependencies=[Depends(auth.require_scope("admin"))]` to require admin authentication.
|
|
64
|
-
|
|
65
|
-
### 4. Deprecated `asyncio.get_event_loop()` in sync_registry (line 1600)
|
|
66
|
-
|
|
67
|
-
**Problem**: Used `asyncio.get_event_loop()` which is deprecated in Python 3.10+ for getting the running loop from within an async function. This could cause `DeprecationWarning` or incorrect behavior in future Python versions.
|
|
68
|
-
|
|
69
|
-
**Fix**: Changed to `asyncio.get_running_loop()` which is the correct API for async contexts.
|
|
70
|
-
|
|
71
|
-
### 5. Input validation: timeRange parameters on learning endpoints (lines 2361, 2430, 2450)
|
|
72
|
-
|
|
73
|
-
**Problem**: The `timeRange` parameters on `/api/learning/metrics`, `/api/learning/trends`, and `/api/learning/signals` accepted arbitrary strings with no validation. While `_parse_time_range()` handles invalid input gracefully (returns None), passing malformed strings wastes processing and could be used for fuzzing.
|
|
74
|
-
|
|
75
|
-
**Fix**: Added `Query(..., pattern=r"^\d{1,4}[hdm]$")` constraint to validate format (1-4 digit number followed by h/d/m).
|
|
76
|
-
|
|
77
|
-
### 6. Input validation: quality report format parameter (line 4970)
|
|
78
|
-
|
|
79
|
-
**Problem**: The `format` parameter on `/api/quality-report` accepted any string, passing it to `rigour.export_report()`. Arbitrary format strings could cause unexpected behavior in the export function.
|
|
80
|
-
|
|
81
|
-
**Fix**: Added `pattern="^(json|markdown|html)$"` constraint to limit to known formats.
|
|
82
|
-
|
|
83
|
-
### 7. Input validation: migration start target and codebase_path (line 5048)
|
|
84
|
-
|
|
85
|
-
**Problem**: The `start_migration` endpoint accepted `codebase_path` and `target` without type checking. Non-string values (lists, dicts) from JSON body would cause cryptic errors downstream.
|
|
86
|
-
|
|
87
|
-
**Fix**: Added type validation (`isinstance` check for str) and length limit (255 chars) for `target`.
|
|
88
|
-
|
|
89
|
-
## Security Audit Summary (OWASP Top 10)
|
|
90
|
-
|
|
91
|
-
| OWASP Category | Status | Notes |
|
|
92
|
-
|----------------|--------|-------|
|
|
93
|
-
| A01: Broken Access Control | FIXED | Added auth to /api/focus, /api/enterprise/tokens |
|
|
94
|
-
| A02: Cryptographic Failures | OK | Token generation uses `secrets` module |
|
|
95
|
-
| A03: Injection | OK | SQLAlchemy ORM prevents SQL injection; list-form subprocess calls prevent shell injection; realpath + regex prevent path traversal |
|
|
96
|
-
| A04: Insecure Design | FIXED | Focus endpoint now requires .loki/ subdirectory |
|
|
97
|
-
| A05: Security Misconfiguration | OK | CORS restricted to localhost; default bind to 127.0.0.1; TLS optional |
|
|
98
|
-
| A06: Vulnerable Components | N/A | Dependency audit out of scope |
|
|
99
|
-
| A07: Auth Failures | OK | Rate limiting on sensitive endpoints; token management requires admin |
|
|
100
|
-
| A08: Data Integrity | OK | Atomic file writes for state mutations (tmp + rename) |
|
|
101
|
-
| A09: Logging Failures | OK | Audit logging on destructive operations (delete, stop, kill) |
|
|
102
|
-
| A10: SSRF | MITIGATED | Focus endpoint restricted to dirs with .loki/ subdirectory |
|
|
103
|
-
|
|
104
|
-
## Route Coverage Audit
|
|
105
|
-
|
|
106
|
-
Verified all 100+ routes in server.py for:
|
|
107
|
-
- Authentication requirements (auth scope dependencies)
|
|
108
|
-
- Input validation (Pydantic models, Query constraints, regex patterns)
|
|
109
|
-
- Error handling (try/except with proper HTTP status codes)
|
|
110
|
-
- Rate limiting (control and read limiters)
|
|
111
|
-
- Path traversal protection (realpath checks, SAFE_ID_RE regex)
|
|
112
|
-
- Resource cleanup (WebSocket disconnect in finally block)
|
|
113
|
-
|
|
114
|
-
## Verification
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
python3 -c "import ast; ast.parse(open('dashboard/server.py').read()); print('Syntax OK')"
|
|
118
|
-
# Output: Syntax OK
|
|
119
|
-
```
|