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.
Files changed (215) hide show
  1. package/README.md +68 -650
  2. package/SKILL.md +4 -4
  3. package/VERSION +1 -1
  4. package/autonomy/completion-council.sh +2 -2
  5. package/autonomy/context-tracker.py +4 -4
  6. package/autonomy/council-v2.sh +1 -1
  7. package/autonomy/grill.sh +1 -1
  8. package/autonomy/lib/done-recognition.sh +1 -1
  9. package/autonomy/lib/prd-enrich.sh +1 -1
  10. package/autonomy/lib/voter-agents.sh +1 -1
  11. package/autonomy/loki +99 -75
  12. package/autonomy/run.sh +30 -18
  13. package/autonomy/sandbox.sh +1 -1
  14. package/autonomy/tui.sh +6 -5
  15. package/autonomy/verify.sh +1 -1
  16. package/bin/loki +166 -59
  17. package/completions/_loki +2 -0
  18. package/completions/loki.bash +2 -2
  19. package/dashboard/__init__.py +1 -1
  20. package/dashboard/server.py +25 -31
  21. package/docs/ARCHITECTURE.md +337 -0
  22. package/docs/BRANDING.md +124 -0
  23. package/docs/CLI-REFERENCE.md +7 -1
  24. package/docs/COMPONENTS.md +447 -0
  25. package/docs/DEPLOYMENT.md +9 -9
  26. package/docs/DOCKER.md +469 -0
  27. package/docs/INSTALLATION.md +67 -1045
  28. package/docs/KNOWN-ISSUES.md +11 -35
  29. package/docs/TESTING.md +161 -0
  30. package/docs/air-gapped.md +1 -2
  31. package/docs/alternative-installations.md +14 -24
  32. package/docs/architecture/DECISIONS.md +333 -0
  33. package/docs/audit-logging.md +7 -7
  34. package/docs/authentication.md +3 -3
  35. package/docs/authorization.md +1 -1
  36. package/docs/certification/04-production-deployment/lab.md +6 -6
  37. package/docs/certification/04-production-deployment/lesson.md +4 -4
  38. package/docs/certification/README.md +1 -1
  39. package/docs/control-plane-container.md +2 -2
  40. package/docs/dev/real-run.md +34 -0
  41. package/docs/dev/release-checklist.md +2 -2
  42. package/docs/exit-codes.md +3 -3
  43. package/docs/git-workflow.md +3 -3
  44. package/docs/metrics.md +37 -55
  45. package/docs/network-security.md +1 -1
  46. package/docs/siem-integration.md +5 -5
  47. package/docs/v10/CLI-MODERN.md +4 -3
  48. package/docs/v10/DECISIONS.md +44 -0
  49. package/docs/v10/DEPS.md +22 -22
  50. package/docs/v10/ENGINE.md +1 -1
  51. package/docs/v10/FAILURE-CLASSES.md +118 -1
  52. package/docs/v10/FOUNDER-QUEUE.md +1 -0
  53. package/docs/v10/GUARDS.md +13 -0
  54. package/docs/v10/LEGACY-REMOVAL.md +4 -6
  55. package/docs/v10/METRICS.md +2 -2
  56. package/docs/v10/MODERNIZE.md +1 -1
  57. package/docs/v10/OPERATING-MODEL.md +2 -1
  58. package/docs/v10/PROGRESS.md +29 -0
  59. package/docs/v11/COST-HALF.md +352 -0
  60. package/docs/v11/MARKET-SLICES.md +315 -0
  61. package/docs/v11/REGISTRIES.md +730 -0
  62. package/loki-ts/data/model-pricing.json +52 -24
  63. package/loki-ts/dist/loki.js +1036 -957
  64. package/mcp/__init__.py +1 -1
  65. package/package.json +1 -1
  66. package/packages/control-plane/dist/server.js +2467 -736
  67. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  68. package/src/protocols/mcp-client.js +6 -2
  69. package/src/protocols/mcp-server.js +13 -3
  70. package/tools/audit-docs.py +1 -1
  71. package/web-app/dist/assets/{AdminPage-D_e45uTw.js → AdminPage-CMkHNJbF.js} +1 -1
  72. package/web-app/dist/assets/{Avatar-T3nIpoaf.js → Avatar-BJyjV7Zi.js} +1 -1
  73. package/web-app/dist/assets/{Badge-BKqb59pP.js → Badge-D572l0uq.js} +1 -1
  74. package/web-app/dist/assets/{Button-DjVlkh8_.js → Button-T4BnOZgl.js} +1 -1
  75. package/web-app/dist/assets/{CockpitPage-DXJgLGmh.js → CockpitPage-Cj_GFsNn.js} +1 -1
  76. package/web-app/dist/assets/{ComparePage-BRP_eVc_.js → ComparePage-A8m4ZXak.js} +1 -1
  77. package/web-app/dist/assets/{ErrorBoundary-CLjpGLjC.js → ErrorBoundary-hugCg5yg.js} +1 -1
  78. package/web-app/dist/assets/{EvidenceReceiptPanel-DX-vb4Xy.js → EvidenceReceiptPanel-CuJKDC2G.js} +1 -1
  79. package/web-app/dist/assets/{GitHubIssuesPanel-214HVHtX.js → GitHubIssuesPanel-BYGKjarC.js} +1 -1
  80. package/web-app/dist/assets/{GitHubPRsPanel-BEiZKc4t.js → GitHubPRsPanel-c7sFIJlf.js} +1 -1
  81. package/web-app/dist/assets/{HomePage-VvMHS5ga.js → HomePage-A1MIkG2P.js} +2 -2
  82. package/web-app/dist/assets/{LoginPage-5WD-v7n3.js → LoginPage-8KQMRhtR.js} +1 -1
  83. package/web-app/dist/assets/{MagicPage-DUQT_Jye.js → MagicPage-C05QW2Lx.js} +1 -1
  84. package/web-app/dist/assets/{MetricsPage-lga-z79v.js → MetricsPage-Oukv5hme.js} +1 -1
  85. package/web-app/dist/assets/{NotFoundPage-CGhBX3G1.js → NotFoundPage-DKIwsawz.js} +1 -1
  86. package/web-app/dist/assets/{ProjectPage-CdzF2GzZ.js → ProjectPage-DwFRPLCG.js} +3 -3
  87. package/web-app/dist/assets/{ProjectsPage-DRG64N8s.js → ProjectsPage-CgY4YYDX.js} +1 -1
  88. package/web-app/dist/assets/{SettingsPage-5fzW9Frb.js → SettingsPage-BpfcSjUA.js} +1 -1
  89. package/web-app/dist/assets/{ShowcasePage-DrTdxO4y.js → ShowcasePage-BqBakC4K.js} +1 -1
  90. package/web-app/dist/assets/{SystemSettingsPage-C9Mqs6Rd.js → SystemSettingsPage-CZLu5VB0.js} +1 -1
  91. package/web-app/dist/assets/{TeamsPage-CUGPdSWo.js → TeamsPage-D55S1jKz.js} +1 -1
  92. package/web-app/dist/assets/{TemplatesPage-CNraDY0F.js → TemplatesPage-D3SydvxN.js} +1 -1
  93. package/web-app/dist/assets/{TerminalOutput-BIu_6Pea.js → TerminalOutput-hNg8G1-e.js} +1 -1
  94. package/web-app/dist/assets/{activity-Bk-kgqaf.js → activity-D2C0VagO.js} +1 -1
  95. package/web-app/dist/assets/{bell-BXmUdmo8.js → bell-CMvYi36w.js} +1 -1
  96. package/web-app/dist/assets/{bot-CiuzXxUR.js → bot-BvtQ6lmo.js} +1 -1
  97. package/web-app/dist/assets/{check-BEzjXppd.js → check-B13xkXed.js} +1 -1
  98. package/web-app/dist/assets/{chevron-left-AYWCXHf8.js → chevron-left-emu6r49E.js} +1 -1
  99. package/web-app/dist/assets/{circle-alert-BNg2uSRq.js → circle-alert-CExlwjuy.js} +1 -1
  100. package/web-app/dist/assets/{clock-DTj0kkGT.js → clock-D7Uas3oL.js} +1 -1
  101. package/web-app/dist/assets/{cloud-x4nTDBLT.js → cloud-CkB4S86C.js} +1 -1
  102. package/web-app/dist/assets/{code-xml-BVh_MLrk.js → code-xml-SL9IIWIn.js} +1 -1
  103. package/web-app/dist/assets/{database-DdfBaowG.js → database-BQFkd7t1.js} +1 -1
  104. package/web-app/dist/assets/{dollar-sign-XuYFmAOY.js → dollar-sign-qHmnNYsU.js} +1 -1
  105. package/web-app/dist/assets/{file-code-corner-D4cRnmeL.js → file-code-corner-C2YUDP0K.js} +1 -1
  106. package/web-app/dist/assets/{file-plus-CyoVlHc_.js → file-plus-C_ooIkDe.js} +1 -1
  107. package/web-app/dist/assets/{globe-Y6IK2RPW.js → globe-CQ-GL485.js} +1 -1
  108. package/web-app/dist/assets/{hammer-BKzr9VZI.js → hammer-U05L_D7V.js} +1 -1
  109. package/web-app/dist/assets/{index-B20cSx5G.js → index-CooHd7I-.js} +3 -3
  110. package/web-app/dist/assets/{layers-DebNOhGS.js → layers-Buo17rjW.js} +1 -1
  111. package/web-app/dist/assets/{loader-circle-DyGbrEgd.js → loader-circle-15vK3oV1.js} +1 -1
  112. package/web-app/dist/assets/{lock-BKPpyt20.js → lock-BeXLebuJ.js} +1 -1
  113. package/web-app/dist/assets/{package-egF5Wi4y.js → package-MVh_6-6R.js} +1 -1
  114. package/web-app/dist/assets/{plus-OiEgKIc-.js → plus-Dh_nd9vS.js} +1 -1
  115. package/web-app/dist/assets/{refresh-cw-CzKvrONq.js → refresh-cw-C9cBJEAT.js} +1 -1
  116. package/web-app/dist/assets/{rotate-ccw-Bu2mII0p.js → rotate-ccw-D3PAtzST.js} +1 -1
  117. package/web-app/dist/assets/{scroll-text-CSkiyax8.js → scroll-text-DZCoXQjo.js} +1 -1
  118. package/web-app/dist/assets/{server-DlPthJFw.js → server-OCOLI5J_.js} +1 -1
  119. package/web-app/dist/assets/{shield-alert-CbpHWQQX.js → shield-alert-oVhmf1_h.js} +1 -1
  120. package/web-app/dist/assets/{thumbs-up-DgGpZe-Q.js → thumbs-up-B-kbX4vN.js} +1 -1
  121. package/web-app/dist/assets/{trash-2-BV3GlCB-.js → trash-2-EL6moveW.js} +1 -1
  122. package/web-app/dist/assets/{trending-down-Y4TJtXhD.js → trending-down-Cl3kjpsx.js} +1 -1
  123. package/web-app/dist/assets/{trending-up-DsDNoHZY.js → trending-up-DST7I6M2.js} +1 -1
  124. package/web-app/dist/assets/{upload-gkThrc_I.js → upload-CUOT780G.js} +1 -1
  125. package/web-app/dist/assets/{usePolling-jpNSeNAe.js → usePolling-Djmt90eb.js} +1 -1
  126. package/web-app/dist/assets/{user-3Zez1WOK.js → user-BRBohA6J.js} +1 -1
  127. package/web-app/dist/index.html +1 -1
  128. package/docs/ARCHITECTURE-OVERVIEW.md +0 -209
  129. package/docs/AUTONOMI-ECOSYSTEM.md +0 -107
  130. package/docs/COCKPIT-SPEC.md +0 -72
  131. package/docs/COCKPIT-UX-MANDATE.md +0 -53
  132. package/docs/COMPETITIVE-ANALYSIS.md +0 -303
  133. package/docs/COMPETITIVE-NEXT-10.md +0 -316
  134. package/docs/COMPETITIVE-RALPH-ZEROSHOT-2026-07-08.md +0 -81
  135. package/docs/DASHBOARD-9.12-EVIDENCE.md +0 -97
  136. package/docs/DASHBOARD-ARCHITECTURE.md +0 -425
  137. package/docs/DASHBOARD_V2_CHECKLIST.md +0 -243
  138. package/docs/DEMOS.md +0 -63
  139. package/docs/ENTERPRISE-IDENTITY-ROADMAP.md +0 -206
  140. package/docs/EVIDENCE-RECEIPT-BUILD-APPLICABILITY.md +0 -79
  141. package/docs/FEAT-PRDREUSE-DOCKER-PLAN.md +0 -144
  142. package/docs/GATE-FAILURE-TRIAGE.md +0 -254
  143. package/docs/HANDOFF-2026-08-03.md +0 -439
  144. package/docs/LOOP-CANDIDATE-PROPOSAL-v1.md +0 -167
  145. package/docs/LOOP-HARNESS-AUDIT.md +0 -684
  146. package/docs/MERGE-DEDUP-MAP.md +0 -420
  147. package/docs/MERGE-ROUTE-MAP.md +0 -139
  148. package/docs/MODEL-REGISTRY-PLAN.md +0 -155
  149. package/docs/OUTCOME-FRONTIER.md +0 -536
  150. package/docs/P2-SPEC-ROBUSTNESS-PLAN.md +0 -192
  151. package/docs/PLANS-INDEX.md +0 -32
  152. package/docs/PRD-REUSE-DONE-RECOGNITION-PLAN.md +0 -536
  153. package/docs/PROMPT-ABLATION-RESULT.md +0 -97
  154. package/docs/R4-TRUST-TRAJECTORY-DESIGN.md +0 -127
  155. package/docs/R5-AUTO-WIKI-DESIGN.md +0 -137
  156. package/docs/R6-ROLLBACK-CHECKPOINT-PLAN.md +0 -107
  157. package/docs/R7-ZERO-CONFIG-FIRST-RUN-PLAN.md +0 -137
  158. package/docs/R8-SHAREABLE-TEAM-ASSETS-PLAN.md +0 -129
  159. package/docs/R9-OPEN-CORE-HOOKS-PLAN.md +0 -113
  160. package/docs/RARV-C-100X-PLAN.md +0 -286
  161. package/docs/RARV-C-LOOP-EFFICIENCY-PLAN.md +0 -470
  162. package/docs/SHAREABLE-PROOF-PLAN.md +0 -194
  163. package/docs/SONNET5-DEFAULT-PLAN.md +0 -157
  164. package/docs/SPEED-AND-FIRST-PASS-PLAN.md +0 -281
  165. package/docs/STALE-STATE-AUDIT.md +0 -174
  166. package/docs/SYNERGY-TASKS.md +0 -143
  167. package/docs/TASKLIST-ACCURACY-PLAN.md +0 -355
  168. package/docs/TOP-100-BACKLOG.md +0 -159
  169. package/docs/V8-ACCEPTANCE-TRIAGE-2026-07-24.md +0 -114
  170. package/docs/V8-COMPLEXITY-AUDIT-2026-07-24.md +0 -45
  171. package/docs/V8-MAJOR-RELEASE-PLAN.md +0 -137
  172. package/docs/V8-OVERNIGHT-PLAN-2026-07-25.md +0 -82
  173. package/docs/V8-SDK-RESEARCH-RAW.md +0 -129
  174. package/docs/WELCOME-OPENER-PLAN.md +0 -106
  175. package/docs/adoption-baseline-2026-07-31.md +0 -84
  176. package/docs/architecture/bmad-integration-epic.md +0 -271
  177. package/docs/architecture/bmad-integration-review.md +0 -86
  178. package/docs/architecture/bmad-integration-validation.md +0 -249
  179. package/docs/architecture/bmad-loki-voice-agent-council-analysis.md +0 -61
  180. package/docs/auto-claude-comparison.md +0 -250
  181. package/docs/bug-fixes/agent-01-cli-fixes.md +0 -101
  182. package/docs/bug-fixes/agent-02-purplelab-fixes.md +0 -88
  183. package/docs/bug-fixes/agent-03-dashboard-fixes.md +0 -119
  184. package/docs/bug-fixes/agent-04-memory-fixes.md +0 -105
  185. package/docs/bug-fixes/agent-05-provider-fixes.md +0 -86
  186. package/docs/bug-fixes/agent-06-integration-fixes.md +0 -101
  187. package/docs/bug-fixes/agent-07-dash-run-fixes.md +0 -101
  188. package/docs/bug-fixes/agent-08-docker-fixes.md +0 -164
  189. package/docs/bug-fixes/agent-09-e2e-build-fixes.md +0 -69
  190. package/docs/bug-fixes/agent-10-e2e-fullstack-fixes.md +0 -102
  191. package/docs/bug-fixes/agent-11-e2e-session-fixes.md +0 -70
  192. package/docs/bug-fixes/agent-12-scenario-fixes.md +0 -120
  193. package/docs/bug-fixes/agent-13-enterprise-fixes.md +0 -143
  194. package/docs/bug-fixes/agent-14-uat-newuser-fixes.md +0 -88
  195. package/docs/bug-fixes/agent-15-uat-poweruser-fixes.md +0 -132
  196. package/docs/bug-fixes/agent-19-code-review.md +0 -316
  197. package/docs/bug-fixes/agent-20-architecture-review.md +0 -331
  198. package/docs/competitive/bolt-new-analysis.md +0 -579
  199. package/docs/competitive/emergence-others-analysis.md +0 -605
  200. package/docs/competitive/replit-lovable-analysis.md +0 -622
  201. package/docs/dashboard-guide.md +0 -487
  202. package/docs/enterprise/migration.md +0 -265
  203. package/docs/history/one-run-audit.md +0 -304
  204. package/docs/plans/FORGE-AUTONOMOUS-QUEUE.md +0 -312
  205. package/docs/plans/ULTRAPLAN-FORGE-BAAS.md +0 -612
  206. package/docs/plans/UT2-6-LSP-DIAGNOSTIC-BROADCAST.md +0 -394
  207. package/docs/prd-purple-lab-ide.md +0 -152
  208. package/docs/prd-purple-lab-platform-v2.md +0 -223
  209. package/docs/prd-purple-lab-platform.md +0 -319
  210. package/docs/retrospectives/v7.5.15-fleet-postmortem.md +0 -325
  211. package/docs/retrospectives/v7.5.15-honesty-audit.md +0 -136
  212. package/docs/retrospectives/v7.5.15-llm-failure-modes.md +0 -49
  213. package/docs/show-hn-post.md +0 -46
  214. package/docs/test-scenarios/enterprise-scenarios.md +0 -732
  215. package/docs/thick2thin.md +0 -173
@@ -1,223 +0,0 @@
1
- # PRD: Purple Lab Platform v2 -- Hosted Autonomous Development IDE
2
- ## Post-Feedback Final Plan (3 review loops completed)
3
-
4
- ---
5
-
6
- ## Feedback Applied
7
-
8
- Three review loops identified these critical gaps in v1 of this PRD:
9
- 1. **Product review:** Missing deployment, secrets, import project, issue-driven workflow; `loki plan` should be default; timeline unrealistic
10
- 2. **Engineering review:** Only 2 pages exist today; sidebar/navigation is the foundational gap; Phase 1 needs auth to work as hosted platform
11
- 3. **Competitive review:** Bottom activity panel is on wrong page; AI Chat is missing entirely; platform feels 40% done -- needs structural work before features
12
-
13
- ---
14
-
15
- ## Current State (v6.41.0) -- Honest Assessment
16
-
17
- **Working:**
18
- - Monaco editor with syntax highlighting (17+ languages)
19
- - File tree with CRUD (create, save, delete files/dirs)
20
- - Tabs with unsaved indicator, Cmd+S save
21
- - Quick Open (Cmd+P) fuzzy file search
22
- - Live preview iframe with auto-refresh on save
23
- - Resizable split panes
24
- - URL routing (/project/:id persists on refresh)
25
- - Session history with status detection
26
- - WebSocket real-time streaming during builds
27
- - Error boundaries on all panels
28
-
29
- **Not working / missing:**
30
- - NO sidebar navigation (users stuck in IDE, can't browse projects)
31
- - NO projects list page
32
- - NO templates gallery page
33
- - NO settings page
34
- - NO AI chat (can't iterate by talking to agents)
35
- - Bottom activity panel (agents, quality gates, build output) only on HomePage, NOT in IDE workspace
36
- - NO deployment capability
37
- - NO secrets management
38
- - NO import project flow
39
- - Preview has no URL bar, back/forward, or open-in-new-tab
40
-
41
- ---
42
-
43
- ## Revised Architecture
44
-
45
- ### Phase 1: Platform Shell + Navigation (buildable now)
46
- **Goal:** Make Purple Lab feel like a real platform, not a disconnected prototype.
47
-
48
- **1a. Global Sidebar (all pages)**
49
- - Logo + "Purple Lab" branding
50
- - Nav items: Home, Projects, Templates, Settings
51
- - Active page highlight
52
- - Connection status indicator
53
- - Bottom: Docs link, version
54
-
55
- **1b. Projects Page (/projects)**
56
- - Card grid from `/api/sessions/history` (already returns status, file count, PRD snippet)
57
- - Search bar, status filter (completed/started/empty)
58
- - Actions per card: Open, Delete, Export as zip
59
- - Empty state: "No projects yet. Start building."
60
-
61
- **1c. Templates Gallery (/templates)**
62
- - Card grid from `/api/templates` (22 templates, already served)
63
- - Category badges: Simple (green), Standard (blue), Complex (orange)
64
- - Click -> pre-fills PRD on home page, user confirms and builds
65
- - Template preview (show first 10 lines of PRD content)
66
-
67
- **1d. Fix Workspace Navigation**
68
- - Add sidebar to ProjectPage (same sidebar as all pages)
69
- - Add breadcrumb: Projects > project-name
70
- - Back button navigates to /projects (not just /)
71
-
72
- **Files to create/modify:**
73
- - NEW: `web-app/src/components/Sidebar.tsx`
74
- - NEW: `web-app/src/pages/ProjectsPage.tsx`
75
- - NEW: `web-app/src/pages/TemplatesPage.tsx`
76
- - NEW: `web-app/src/pages/SettingsPage.tsx` (shell)
77
- - MODIFY: `web-app/src/App.tsx` (add routes, wrap in sidebar layout)
78
- - MODIFY: `web-app/src/pages/ProjectPage.tsx` (add sidebar)
79
-
80
- ---
81
-
82
- ### Phase 2: Enhanced Workspace (buildable now)
83
- **Goal:** Bring the monitoring panels into the IDE and add AI chat.
84
-
85
- **2a. Bottom Activity Panel in ProjectWorkspace**
86
- Tabbed panel below the editor (collapsible, resizable height):
87
- - **Build Log:** Real-time loki output (WebSocket, already works on HomePage)
88
- - **Agents:** Active agent cards with status (already built as AgentDashboard)
89
- - **Quality Gates:** 8-gate display (already built as QualityGatesPanel)
90
- - **AI Chat:** NEW -- text input that sends prompts to iterate on the project
91
-
92
- **2b. AI Chat (key differentiator)**
93
- - Input at bottom: "Make the header blue" or "Add user authentication"
94
- - Backend: `POST /api/sessions/:id/chat` which runs `loki quick "<prompt>"` in the project directory
95
- - Output streams to Build Log tab
96
- - File tree refreshes after completion
97
- - Preview auto-refreshes
98
-
99
- **2c. Mode Selector**
100
- In workspace header toolbar:
101
- - Quick (fast, 3 iterations) -- `loki quick`
102
- - Standard (full RARV, 5 iterations) -- `loki start`
103
- - Max (extended, 8+ iterations) -- `loki start --complexity complex`
104
-
105
- **2d. Plan Before Build**
106
- Default behavior: when user submits a PRD, run `loki plan` first.
107
- Show: complexity tier, estimated cost, iteration count, phases.
108
- User confirms "Build" or adjusts.
109
-
110
- **2e. Preview Toolbar**
111
- URL bar showing current preview path, Refresh button, Open in New Tab button.
112
-
113
- **Files to create/modify:**
114
- - NEW: `web-app/src/components/ActivityPanel.tsx` (bottom tabs: Build Log, Agents, Quality, Chat)
115
- - NEW: `web-app/src/components/AIChatPanel.tsx`
116
- - NEW: `web-app/src/components/PreviewToolbar.tsx`
117
- - MODIFY: `web-app/src/components/ProjectWorkspace.tsx` (add bottom panel, mode selector)
118
- - MODIFY: `web-app/server.py` (add POST /api/sessions/:id/chat endpoint)
119
-
120
- ---
121
-
122
- ### Phase 3: Import + Deploy + Secrets (needs backend work)
123
- **Goal:** Close the loop -- users can bring code in and ship code out.
124
-
125
- **3a. Import Project**
126
- - "Import from GitHub" button on Projects page
127
- - Backend: clone repo, run `loki onboard` to analyze, generate CLAUDE.md
128
- - User lands in IDE with file tree populated
129
- - Uses `loki explain` to show architecture summary on first open
130
-
131
- **3b. Deploy to Public URL**
132
- - "Deploy" button in workspace header
133
- - Backend: build the project (npm build / python build), serve on a public URL
134
- - URL format: `{project-id}.purplelab.dev` (or subdomain on autonomi.dev)
135
- - Show deployment status and live URL
136
- - Uses Docker container already present in workspace
137
-
138
- **3c. Secrets / Environment Variables**
139
- - Per-project secrets pane in workspace settings
140
- - Stored encrypted, injected into build container as env vars
141
- - UI: key-value editor with show/hide toggle
142
- - Uses existing `loki secrets` CLI command
143
-
144
- **3d. Cost Tracking**
145
- - Visible in workspace header: current session cost estimate
146
- - Uses existing `/api/cost` and `/api/budget` endpoints
147
- - Budget limit warning when approaching threshold
148
-
149
- ---
150
-
151
- ### Phase 4: Hosted Infrastructure (requires infra work)
152
- **Goal:** Multi-tenant hosted platform with user isolation.
153
-
154
- - Per-user container orchestration (Docker or Firecracker)
155
- - Persistent storage per workspace
156
- - User auth (email + OAuth via existing OIDC support)
157
- - Usage metering and billing
158
- - Custom preview domains
159
- - Provider failover (`loki failover`) for platform uptime
160
-
161
- ---
162
-
163
- ## What to Cut from v1
164
-
165
- Based on feedback:
166
- - Memory System Viewer (power-user debug tool, not customer-facing)
167
- - Full Integrations page (keep GitHub only, defer Jira/Linear/Slack/Teams)
168
- - Agent grid (most sessions have 1-3 agents active; show compact list instead)
169
- - Code Review panel (let quality gates surface findings inline)
170
- - Collaboration/multiplayer (acknowledged as future need, not v1)
171
- - Database provisioning (out of scope for v1)
172
-
173
- ---
174
-
175
- ## What to Fix Before Building (bugs from competitive review)
176
-
177
- 1. Preview only auto-refreshes on HTML/CSS/JS saves (not .py or .json)
178
- 2. Quick Open should show all results with scrolling (remove slice(0,20) limit)
179
- 3. File creation should optimistically update tree (no wait for API)
180
- 4. ProjectWorkspace should be read-only for completed sessions
181
- 5. No-HTML projects should show helpful message instead of blank preview
182
-
183
- ---
184
-
185
- ## Loki Features to Surface (under-leveraged)
186
-
187
- | Feature | Where in UI | Backend |
188
- |---------|-------------|---------|
189
- | `loki plan` | Plan step before every build | Exists |
190
- | `loki run <issue>` | "Import from Issue" on Home page | Exists |
191
- | `loki review` | Right-click file -> "Review this file" | Exists |
192
- | `loki test` | Right-click file -> "Generate tests" | Exists |
193
- | `loki explain` | "Explain Project" button in workspace | Exists |
194
- | `loki onboard` | Import project flow | Exists |
195
- | `loki failover` | Auto-provider switching | Exists |
196
- | `loki trigger` | Scheduled builds (cron) | Exists |
197
- | `loki ci` | Quality checks on save | Exists |
198
- | `--budget` | Cost display in header | Exists |
199
- | `--compliance` | Compliance preset selector | Exists |
200
-
201
- ---
202
-
203
- ## Realistic Timeline
204
-
205
- - **Phase 1 (Platform Shell):** 3-4 days -- sidebar, projects page, templates page, settings shell, workspace nav fix
206
- - **Phase 2 (Enhanced Workspace):** 5-7 days -- activity panel, AI chat, mode selector, plan-before-build, preview toolbar
207
- - **Phase 3 (Import + Deploy + Secrets):** 2-3 weeks -- needs backend work for GitHub import, deploy pipeline, secrets encryption
208
- - **Phase 4 (Hosted Infra):** 2-3 months -- container orchestration, auth, billing, custom domains
209
-
210
- **MVP milestone (Phase 1 + 2): ~2 weeks**
211
-
212
- ---
213
-
214
- ## Success Criteria (revised)
215
-
216
- - User can go from prompt to working preview in under 3 minutes
217
- - User can iterate via AI chat without starting a new session
218
- - Page refresh at any point preserves full state
219
- - User can browse all past projects and templates from sidebar
220
- - Plan step shows cost estimate before every build
221
- - Preview renders all relative assets correctly
222
- - Quality gates visible during builds
223
- - Cost tracking visible in workspace header
@@ -1,319 +0,0 @@
1
- # PRD: Purple Lab Platform -- Hosted Autonomous Development IDE
2
-
3
- ## Vision
4
-
5
- Purple Lab becomes a hosted development platform like Replit, but for autonomous AI-powered development. Users describe what they want, agents build it, and they can browse/edit/preview/deploy -- all from the browser. Autonomi manages the infrastructure, storage, and compute. No CLI installation needed.
6
-
7
- ## Key Insight
8
-
9
- Loki Mode already has 75+ commands and 120+ API endpoints. The platform doesn't need new capabilities -- it needs to surface existing ones through a production-grade web interface that matches or exceeds Replit's UX.
10
-
11
- ---
12
-
13
- ## Architecture: Local vs Hosted
14
-
15
- **Current (Local):** User installs CLI, runs `loki start`, views results locally.
16
-
17
- **Platform (Hosted):** User opens purplelab.dev (or app.autonomi.dev), types a prompt or picks a template, agents build on Autonomi infrastructure, user browses/edits/deploys from browser. Backend is the same server.py + run.sh, containerized per-workspace.
18
-
19
- **Per-workspace container model:**
20
- - Each project gets an isolated container (Docker or Firecracker)
21
- - Container runs: Purple Lab server + loki CLI + language runtimes
22
- - Persistent volume for project files
23
- - Ephemeral compute for builds (scale to zero when idle)
24
- - WebSocket proxy for real-time terminal/logs/preview
25
-
26
- ---
27
-
28
- ## Page Structure
29
-
30
- ### Page 1: Home (landing)
31
- **URL:** `/`
32
-
33
- **Layout:** Sidebar + main content (like Replit)
34
-
35
- **Left sidebar:**
36
- - Workspace name / avatar
37
- - Navigation: Home, Projects, Templates, Integrations, Settings
38
- - Bottom: Docs, Changelog, version
39
-
40
- **Main content:**
41
- - Prompt input: "Describe what you want to build..." with Plan toggle
42
- - Category shortcuts: Website, API, CLI, Mobile, Bot, Data Pipeline (maps to Loki templates)
43
- - Example prompts: rotated from curated list
44
- - Recent Projects: card grid with thumbnail, name, date, status, file count
45
-
46
- **Loki features surfaced:**
47
- - `loki init` templates -> category shortcuts
48
- - `loki plan` -> Plan toggle (shows estimate before building)
49
- - `loki start` -> Submit prompt
50
- - Session history -> Recent Projects
51
-
52
- ---
53
-
54
- ### Page 2: Projects List
55
- **URL:** `/projects`
56
-
57
- **Layout:** Sidebar + grid/list
58
-
59
- - Search and filter (status, date, provider, complexity)
60
- - Project cards: thumbnail (screenshot or file tree preview), name, status badge, date, file count, provider used
61
- - Actions: Open, Delete, Duplicate, Export
62
- - Sorting: newest first, name, status
63
-
64
- **Loki features surfaced:**
65
- - Session history API -> project list
66
- - `loki export` -> Export action
67
- - `loki share` -> Share as Gist action
68
-
69
- ---
70
-
71
- ### Page 3: Workspace (IDE)
72
- **URL:** `/project/:id`
73
-
74
- **Layout:** Full-screen IDE (already built in v6.41.0, needs enhancement)
75
-
76
- **Left panel: File Explorer**
77
- - File tree (exists)
78
- - Search files (Cmd+P, exists)
79
- - New file/folder (exists)
80
- - Git status indicators (show modified/added/untracked via colors)
81
-
82
- **Center panel: Editor**
83
- - Monaco editor (exists)
84
- - Tabs (exists)
85
- - Save with Cmd+S (exists)
86
- - Unsaved indicator (exists)
87
-
88
- **Right panel: Preview**
89
- - Live preview iframe (exists, needs enhancement)
90
- - URL bar with current path
91
- - Back/Forward/Refresh buttons
92
- - Open in new tab button
93
- - Auto-refresh on save (exists)
94
-
95
- **Bottom panel: Activity (NEW)**
96
- - Tabs: Terminal | Agent Log | Build Output | Quality Gates | AI Chat
97
- - **Terminal tab:** Real-time loki session output (already streamed via WebSocket)
98
- - **Agent Log tab:** Shows which agents are active, what they're working on (uses `/api/agents` and `/api/session/agents`)
99
- - **Build Output tab:** Structured build phases -- RARV cycle visualization, iteration count, current phase
100
- - **Quality Gates tab:** 8-gate status display (uses existing checklist/quality endpoints)
101
- - **AI Chat tab:** Send messages to iterate on the project ("fix the login page", "add dark mode") -- triggers `loki start` with the prompt as PRD amendment
102
-
103
- **Header toolbar:**
104
- - Project name + status
105
- - Provider selector: Claude / Codex / Gemini (uses `loki provider set`)
106
- - Mode selector: Quick (3 iterations) / Standard (5) / Max (8+) -- maps to complexity tiers
107
- - Run button (re-run build with current PRD)
108
- - Stop/Pause/Resume buttons (exist)
109
- - Share button -> GitHub Gist (`loki share`)
110
- - Deploy button (future: `loki deploy`)
111
- - Settings gear -> project config
112
-
113
- ---
114
-
115
- ### Page 4: Templates Gallery
116
- **URL:** `/templates`
117
-
118
- **Layout:** Grid of 22 template cards
119
-
120
- Each card:
121
- - Template name and description
122
- - Category badge (Simple / Standard / Complex)
123
- - Preview thumbnail
124
- - "Use Template" button -> pre-fills PRD and navigates to Home
125
-
126
- **Loki features surfaced:**
127
- - All 22 `templates/*.md` files
128
- - `loki plan` -> shows estimate on hover/click
129
- - `loki init` -> scaffolds project
130
-
131
- ---
132
-
133
- ### Page 5: Integrations
134
- **URL:** `/integrations`
135
-
136
- **Layout:** List of integration cards
137
-
138
- Integrations available:
139
- - **GitHub**: Connect repo, import issues, create PRs (`loki github`, `loki run`)
140
- - **Slack**: Notifications + slash commands (`LOKI_SLACK_*`)
141
- - **Teams**: Adaptive Cards notifications (`LOKI_TEAMS_*`)
142
- - **OpenTelemetry**: Trace export (`loki telemetry`)
143
-
144
- Each card: name, description, status (Connected/Not configured), Configure button
145
-
146
- ---
147
-
148
- ### Page 6: Settings
149
- **URL:** `/settings`
150
-
151
- Sections:
152
- - **Profile:** Name, email, avatar
153
- - **Provider:** Default provider selection, API keys, model preferences
154
- - **Enterprise:** Token management, OIDC/SSO config, audit log access
155
- - **Notifications:** Email/Slack/Teams triggers
156
- - **Billing:** Usage stats, cost tracking (uses `loki metrics` and `/api/cost`)
157
-
158
- ---
159
-
160
- ## Workspace Features Detail
161
-
162
- ### AI Chat Panel (Key differentiator from Replit)
163
-
164
- This is the "Loki way" -- instead of just editing code, users can talk to the AI to iterate:
165
-
166
- **Input:** Text prompt at bottom of workspace (like Replit's Agent chat)
167
- **Behavior:**
168
- 1. User types "add a dark mode toggle"
169
- 2. Purple Lab creates amendment to PRD
170
- 3. Runs `loki start` in the background (or uses `loki quick` for small changes)
171
- 4. Real-time agent activity streams to Agent Log tab
172
- 5. File tree updates as agents create/modify files
173
- 6. Preview auto-refreshes when build completes
174
- 7. User can continue iterating
175
-
176
- **This maps to Replit's "Agent modes":**
177
- - **Quick mode** (like Lite): `loki quick "<prompt>"` -- 3 iterations, fast
178
- - **Standard mode** (like Autonomous): `loki start` -- full RARV cycle
179
- - **Max mode** (like Max): `loki start --complexity complex` -- extended iterations
180
-
181
- ### Quality Gates Panel
182
-
183
- Shows the Loki quality gates and checks in real-time:
184
- 1. Static Analysis (CodeQL/ESLint)
185
- 2. 3-Reviewer Blind Review
186
- 3. Anti-Sycophancy Check
187
- 4. Severity Blocking (Critical/High)
188
- 5. Test Suite (pass/fail; coverage % not measured this release)
189
- 6. Security Scan (OWASP)
190
- 7. Performance Check
191
- 8. Mock Detector
192
- 9. Mutation Detector
193
-
194
- Each gate: name, status (pass/fail/pending), details expandable
195
-
196
- ### Agent Activity
197
-
198
- Real-time grid showing which agent types are active:
199
- - Agent name, type, domain, model tier (Opus/Sonnet/Haiku)
200
- - Current task
201
- - Status (working/idle/completed)
202
- - Duration
203
-
204
- ### Memory System Viewer
205
-
206
- Browse what the AI has learned across sessions:
207
- - Episodic memory: specific interactions
208
- - Semantic memory: generalized patterns
209
- - Procedural memory: learned skills
210
- - Token economics: discovery vs read efficiency
211
-
212
- ### Code Review Panel
213
-
214
- When quality gates run, show results:
215
- - Findings by severity (Critical/High/Medium/Low)
216
- - File + line links (click to jump in editor)
217
- - Suggested fixes
218
- - Approve/Reject actions
219
-
220
- ---
221
-
222
- ## API Endpoints Needed (New)
223
-
224
- Most features use existing endpoints. New ones needed for hosted platform:
225
-
226
- 1. `POST /api/workspace/create` -- create new workspace (container)
227
- 2. `DELETE /api/workspace/:id` -- destroy workspace
228
- 3. `GET /api/workspace/:id/status` -- container health
229
- 4. `POST /api/chat` -- send AI chat message (triggers loki quick/start)
230
- 5. `GET /api/templates` -- already exists
231
- 6. `POST /api/project/duplicate` -- clone a project
232
- 7. `POST /api/project/export` -- export as zip
233
- 8. `GET /api/project/:id/screenshot` -- generate thumbnail (headless browser or placeholder)
234
-
235
- ---
236
-
237
- ## Implementation Phases
238
-
239
- ### Phase 1: Platform Shell (1 week)
240
- - Sidebar navigation with page routing
241
- - Home page with prompt input + category shortcuts + recent projects
242
- - Projects list page with cards
243
- - Templates gallery page
244
- - Settings page shell
245
-
246
- ### Phase 2: Enhanced Workspace (1 week)
247
- - Bottom activity panel with tabs (Terminal, Agents, Build, Quality, Chat)
248
- - AI Chat input that triggers builds
249
- - Quality gates real-time display
250
- - Agent activity grid
251
- - Preview URL bar with navigation
252
- - Mode selector (Quick/Standard/Max)
253
-
254
- ### Phase 3: Hosted Infrastructure (2 weeks)
255
- - Per-workspace container orchestration
256
- - Persistent storage per project
257
- - User authentication (OIDC/email)
258
- - Usage metering and billing hooks
259
- - Custom domain for previews (project-id.purplelab.dev)
260
-
261
- ### Phase 4: Polish (1 week)
262
- - Project thumbnails/screenshots
263
- - Integrations settings page
264
- - Memory system browser
265
- - Code review panel
266
- - Onboarding flow for new users
267
-
268
- ---
269
-
270
- ## What We Already Have vs What's New
271
-
272
- | Feature | Status | Source |
273
- |---------|--------|--------|
274
- | Monaco editor | DONE | v6.40.0 |
275
- | File tree + CRUD | DONE | v6.40.0 |
276
- | Tabs | DONE | v6.41.0 |
277
- | Quick Open (Cmd+P) | DONE | v6.41.0 |
278
- | Live preview | DONE | v6.39.0 |
279
- | Preview auto-refresh | DONE | v6.41.0 |
280
- | URL routing | DONE | v6.39.0 |
281
- | Session persistence | DONE | v6.39.0 |
282
- | Resizable panes | DONE | v6.40.0 |
283
- | Error boundaries | DONE | v6.38.4 |
284
- | WebSocket real-time | DONE | v6.36.0 |
285
- | Session history | DONE | v6.36.1 |
286
- | Provider selection | DONE | v6.35.0 |
287
- | Template gallery | EXISTS (API) | Needs UI page |
288
- | Quality gates display | EXISTS (API) | Needs panel |
289
- | Agent activity | EXISTS (API) | Needs panel |
290
- | Memory browser | EXISTS (API) | Needs panel |
291
- | Code review | EXISTS (API) | Needs panel |
292
- | AI Chat | NEEDS BUILD | New component |
293
- | Sidebar navigation | NEEDS BUILD | New layout |
294
- | Projects list page | NEEDS BUILD | New page |
295
- | Settings page | NEEDS BUILD | New page |
296
- | Bottom activity panel | NEEDS BUILD | New component |
297
- | Container orchestration | NEEDS BUILD | Infrastructure |
298
-
299
- ---
300
-
301
- ## Design Language
302
-
303
- Match Autonomi design system (already used in Purple Lab):
304
- - Light bg: #FFFEFB, card: #FFFFFF, accent: #553DE9
305
- - Font: Inter (body), JetBrains Mono (code), DM Serif Display (headings)
306
- - Glass effect on panels
307
- - Rounded corners (xl/2xl)
308
- - Minimal, clean, professional -- not flashy
309
-
310
- ---
311
-
312
- ## Success Metrics
313
-
314
- - User can go from prompt to working preview in under 5 minutes
315
- - Page refresh at any point preserves full state
316
- - Preview renders all relative assets correctly
317
- - Quality gates visible in real-time during builds
318
- - AI chat iteration feels natural (no context loss between prompts)
319
- - 95%+ uptime for hosted workspaces