claude-code-session-manager 0.87.0 → 0.88.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 (291) hide show
  1. package/README.md +26 -53
  2. package/dist/assets/{AgentLibrary-DyLWzZDf.js → AgentLibrary-kQF8_wAw.js} +1 -1
  3. package/dist/assets/{DataModel--mISIJ6h.js → DataModel-CY_mMnsr.js} +1 -1
  4. package/dist/assets/{History-C2ahUXTg.js → History-Sji2brb0.js} +1 -1
  5. package/dist/assets/{Hooks-BiC6oyR2.js → Hooks-CtqpO-p5.js} +1 -1
  6. package/dist/assets/{HostBilko-BPleEOld.js → HostBilko-DN0ydOCr.js} +1 -1
  7. package/dist/assets/{Library-Dc8Qst1R.js → Library-CoiLZTKh.js} +1 -1
  8. package/dist/assets/{ListDetail-DIXh-OLX.js → ListDetail-CmqiQ_io.js} +1 -1
  9. package/dist/assets/{MarkdownEditor-C90bkLXK.js → MarkdownEditor-HPoNeKhT.js} +1 -1
  10. package/dist/assets/{McpServers-DqcbLOLZ.js → McpServers-Bj1X3_NT.js} +1 -1
  11. package/dist/assets/{Memory-CW62MXlh.js → Memory-1PKjsM3b.js} +1 -1
  12. package/dist/assets/{Panel-Bw1FhRuF.js → Panel-I1s6ghPo.js} +1 -1
  13. package/dist/assets/{Permissions-BcUC-5y8.js → Permissions-BhiiZjHQ.js} +1 -1
  14. package/dist/assets/{Plugins-BnKx9flD.js → Plugins-gv3_fkPX.js} +2 -2
  15. package/dist/assets/{ProvenanceBadge-Bw5vNVPT.js → ProvenanceBadge-BGcgBd8V.js} +1 -1
  16. package/dist/assets/{SaveBar-CWr0O_w-.js → SaveBar-BGr9eZ4g.js} +1 -1
  17. package/dist/assets/{Scheduler-DYdLuUqq.js → Scheduler-Bdo_awPq.js} +7 -7
  18. package/dist/assets/{ScopeSwitcher-CrBLbg8s.js → ScopeSwitcher-ukl0qWaA.js} +1 -1
  19. package/dist/assets/{Settings-DluB-vN1.js → Settings-DJkFj22G.js} +1 -1
  20. package/dist/assets/{SkillReferenceGraph-CHLSseay.js → SkillReferenceGraph-0t1Qblp6.js} +1 -1
  21. package/dist/assets/{Skills-gNdo_HNK.js → Skills-CeVdBGE-.js} +1 -1
  22. package/dist/assets/{SystemPrompt-Cru05-Ia.js → SystemPrompt-CfKvNHi3.js} +1 -1
  23. package/dist/assets/{TagLibrary-DNHY0xou.js → TagLibrary-DAzNaUPd.js} +1 -1
  24. package/dist/assets/{TiptapBody-I4lmbCgP.js → TiptapBody--S_rGXoA.js} +1 -1
  25. package/dist/assets/{Toggle-bWMHjmRh.js → Toggle-Dszm0xnp.js} +1 -1
  26. package/dist/assets/{index-DV3PorRY.css → index-BHTX4OTc.css} +1 -1
  27. package/dist/assets/{index-fc_JjdxL.js → index-Dp4Rc--q.js} +356 -356
  28. package/dist/assets/{settingsSchema-BfhtZnGD.js → settingsSchema-BLbssMYo.js} +1 -1
  29. package/dist/assets/{whisperWorker-Dbia1OpC.js → whisperWorker-C7ZGQwKg.js} +7 -7
  30. package/dist/index.html +2 -2
  31. package/dist/vad/ort-wasm-simd-threaded.asyncify.mjs +106 -110
  32. package/dist/vad/ort-wasm-simd-threaded.asyncify.wasm +0 -0
  33. package/dist/vad/ort-wasm-simd-threaded.jsep.mjs +98 -98
  34. package/dist/vad/ort-wasm-simd-threaded.jsep.wasm +0 -0
  35. package/dist/vad/ort-wasm-simd-threaded.jspi.mjs +99 -102
  36. package/dist/vad/ort-wasm-simd-threaded.jspi.wasm +0 -0
  37. package/dist/vad/ort-wasm-simd-threaded.mjs +46 -46
  38. package/dist/vad/ort-wasm-simd-threaded.wasm +0 -0
  39. package/package.json +10 -13
  40. package/scripts/README.md +59 -0
  41. package/scripts/audit-ops-hygiene.cjs +350 -0
  42. package/scripts/hooks/guard-destructive-git.cjs +10 -34
  43. package/scripts/hooks/guard-inline-implementation.cjs +14 -8
  44. package/scripts/hooks/guard-prd-writes.cjs +7 -36
  45. package/scripts/hooks/guard-self-schedule.cjs +175 -0
  46. package/scripts/ops-sweep.cjs +355 -0
  47. package/scripts/scheduler-mcp-server.cjs +28 -71
  48. package/src/main/__tests__/bilkoHost-integration.test.cjs +3 -3
  49. package/src/main/__tests__/chat-cancel-terminal.test.cjs +6 -9
  50. package/src/main/__tests__/chat-exit-close-race.test.cjs +3 -3
  51. package/src/main/__tests__/chat-mcp-consent-notice.test.cjs +4 -5
  52. package/src/main/__tests__/chat-queue.test.cjs +2 -2
  53. package/src/main/__tests__/chat-stop-signal.test.cjs +2 -2
  54. package/src/main/__tests__/dep-orphan-archive-health.test.cjs +77 -0
  55. package/src/main/__tests__/dod-batchkey.test.cjs +2 -2
  56. package/src/main/__tests__/dod-drain-hook.test.cjs +2 -2
  57. package/src/main/__tests__/dod-report.test.cjs +2 -2
  58. package/src/main/__tests__/dod-reverify.test.cjs +2 -2
  59. package/src/main/__tests__/epicMint.test.cjs +2 -2
  60. package/src/main/__tests__/exchanges.test.cjs +2 -2
  61. package/src/main/__tests__/extractJson.test.cjs +2 -2
  62. package/src/main/__tests__/files-reject-credentials.test.cjs +1 -1
  63. package/src/main/__tests__/fixtures/1218-fo-01-move-scripts-lib-into-src-main-lib.log +556 -0
  64. package/src/main/__tests__/health-build-freshness.test.cjs +39 -0
  65. package/src/main/__tests__/health-delegation-chain.test.cjs +15 -1
  66. package/src/main/__tests__/health-queue-dispatch.test.cjs +58 -7
  67. package/src/main/__tests__/health-tick-liveness.test.cjs +27 -3
  68. package/src/main/__tests__/health-usage-poller.test.cjs +70 -23
  69. package/src/main/__tests__/historyRollup.test.cjs +2 -2
  70. package/src/main/__tests__/kg-augment.test.cjs +2 -2
  71. package/src/main/__tests__/mcpStatus.test.cjs +2 -2
  72. package/src/main/__tests__/memoryAggregate.test.cjs +1 -1
  73. package/src/main/__tests__/memoryStale.test.cjs +1 -1
  74. package/src/main/__tests__/opsErrorLogTelemetryTap.test.cjs +25 -1
  75. package/src/main/__tests__/pollLoop-dispatch-on-failure.test.cjs +33 -3
  76. package/src/main/__tests__/prd-group-allocator.test.cjs +2 -2
  77. package/src/main/__tests__/prdAdminRouteParity.test.cjs +2 -0
  78. package/src/main/__tests__/prdAdminRoutes.test.cjs +14 -2
  79. package/src/main/__tests__/prdAuthoringSeed.test.cjs +39 -0
  80. package/src/main/__tests__/prdLocationsArchived.test.cjs +20 -13
  81. package/src/main/__tests__/proc-role-env.test.cjs +125 -0
  82. package/src/main/__tests__/procname-claude-spawn-sites.test.cjs +304 -0
  83. package/src/main/__tests__/procname-sm-processes.test.cjs +127 -0
  84. package/src/main/__tests__/projectHomeAdminRoutes.test.cjs +81 -401
  85. package/src/main/__tests__/projectPages.test.cjs +63 -149
  86. package/src/main/__tests__/queue-health-verdict.test.cjs +9 -9
  87. package/src/main/__tests__/queue-starvation-dispatch-driver.test.cjs +117 -20
  88. package/src/main/__tests__/queueHistory.test.cjs +2 -2
  89. package/src/main/__tests__/rateLimitPollerStreak.test.cjs +38 -3
  90. package/src/main/__tests__/runVerify-landed-commit-outranks.test.cjs +181 -0
  91. package/src/main/__tests__/runVerify.test.cjs +5 -5
  92. package/src/main/__tests__/scheduleJobStatusDrift.test.cjs +3 -3
  93. package/src/main/__tests__/scheduleJobTransitions.test.cjs +2 -2
  94. package/src/main/__tests__/scheduler-adopted-run-supervision.test.cjs +143 -0
  95. package/src/main/__tests__/scheduler-autofix-select.test.cjs +2 -2
  96. package/src/main/__tests__/scheduler-autopromote.test.cjs +2 -2
  97. package/src/main/__tests__/scheduler-bash-timeout-env.test.cjs +3 -5
  98. package/src/main/__tests__/scheduler-boot-orphans.test.cjs +78 -97
  99. package/src/main/__tests__/scheduler-default-eligible-heal.test.cjs +161 -0
  100. package/src/main/__tests__/scheduler-dispatch-loop.test.cjs +58 -0
  101. package/src/main/__tests__/scheduler-epic-digest.test.cjs +3 -5
  102. package/src/main/__tests__/scheduler-force-tick-outcome.test.cjs +2 -2
  103. package/src/main/__tests__/scheduler-gate-shadow.test.cjs +119 -0
  104. package/src/main/__tests__/scheduler-guard-verdict-autoresolve.test.cjs +46 -0
  105. package/src/main/__tests__/scheduler-heartbeat-payload.test.cjs +80 -0
  106. package/src/main/__tests__/scheduler-inplace-salvage.test.cjs +25 -18
  107. package/src/main/__tests__/scheduler-investigation-prompt.test.cjs +4 -4
  108. package/src/main/__tests__/scheduler-launch-failure.test.cjs +3 -5
  109. package/src/main/__tests__/scheduler-looks-done.test.cjs +26 -7
  110. package/src/main/__tests__/scheduler-manual-pause.test.cjs +118 -0
  111. package/src/main/__tests__/scheduler-meta-code-sha.test.cjs +26 -3
  112. package/src/main/__tests__/scheduler-prd-missing-skip.test.cjs +17 -2
  113. package/src/main/__tests__/scheduler-prd-persona-spawn.test.cjs +3 -5
  114. package/src/main/__tests__/scheduler-quiet-machine-lease.test.cjs +41 -6
  115. package/src/main/__tests__/scheduler-rate-limit-pause.test.cjs +62 -6
  116. package/src/main/__tests__/scheduler-rate-limit-spin-guard.test.cjs +3 -5
  117. package/src/main/__tests__/scheduler-reap-dead-running-jobs.test.cjs +23 -4
  118. package/src/main/__tests__/scheduler-reconcile-cwd-preserve.test.cjs +100 -0
  119. package/src/main/__tests__/scheduler-reconcile-invalid-repair.test.cjs +3 -3
  120. package/src/main/__tests__/scheduler-reconcile-quarantine.test.cjs +4 -4
  121. package/src/main/__tests__/scheduler-shard-quarantine.test.cjs +110 -0
  122. package/src/main/__tests__/scheduler-shared-tree-guard.test.cjs +81 -1
  123. package/src/main/__tests__/scheduler-stall-per-project.test.cjs +14 -0
  124. package/src/main/__tests__/scheduler-starve-escalation.test.cjs +4 -4
  125. package/src/main/__tests__/scheduler-stranded-autofix-park.test.cjs +245 -0
  126. package/src/main/__tests__/scheduler-supervisor-record.test.cjs +81 -0
  127. package/src/main/__tests__/scheduler-tick-cancel-token.test.cjs +2 -2
  128. package/src/main/__tests__/scheduler-tick-wedge.test.cjs +172 -0
  129. package/src/main/__tests__/scheduler-transient-failure.test.cjs +2 -2
  130. package/src/main/__tests__/scheduler-worktree-cap-defer.test.cjs +37 -11
  131. package/src/main/__tests__/scheduler-worktree-exec-cwd.test.cjs +3 -5
  132. package/src/main/__tests__/usageSingleFlight.test.cjs +157 -0
  133. package/src/main/__tests__/workTypeLibrary.test.cjs +1 -1
  134. package/src/main/bilkoHost.cjs +16 -7
  135. package/src/main/build-info.json +8 -0
  136. package/src/main/chatRunner.cjs +4 -2
  137. package/src/main/config.cjs +2 -3
  138. package/src/main/docEdit.cjs +4 -2
  139. package/src/main/health.cjs +276 -52
  140. package/src/main/heapSnapshot.cjs +2 -2
  141. package/src/main/historyAggregator.cjs +1 -1
  142. package/src/main/index.cjs +61 -10
  143. package/src/main/ipcSchemas.cjs +6 -17
  144. package/src/main/lib/__tests__/auditLog.test.cjs +38 -0
  145. package/src/main/lib/__tests__/buildIdentity.test.cjs +121 -0
  146. package/src/main/lib/__tests__/cwdClassify.test.cjs +111 -0
  147. package/src/main/lib/__tests__/definitionOfDoneSequence.test.cjs +95 -0
  148. package/src/main/lib/__tests__/delegationReadiness.test.cjs +1 -1
  149. package/src/main/lib/__tests__/dispatchLoop.test.cjs +63 -0
  150. package/src/main/lib/__tests__/gateFixtures.json +20 -0
  151. package/src/main/lib/__tests__/gitWorktree.test.cjs +8 -1
  152. package/src/main/lib/__tests__/instanceLock.test.cjs +93 -7
  153. package/src/main/lib/__tests__/jobSupervisorRecord.test.cjs +78 -0
  154. package/src/main/lib/__tests__/jobWorktreeBootLive.test.cjs +11 -0
  155. package/src/main/lib/__tests__/localAdminHttp.test.cjs +1 -1
  156. package/src/main/lib/__tests__/mcpToolCatalog.test.cjs +6 -1
  157. package/src/main/lib/__tests__/procIdentity.test.cjs +119 -0
  158. package/src/main/lib/__tests__/procName.test.cjs +92 -0
  159. package/src/main/lib/__tests__/queueStoreMachineStateRecovery.test.cjs +67 -0
  160. package/src/main/lib/__tests__/schedulerMcpServerHelp.test.cjs +6 -7
  161. package/src/main/lib/__tests__/schedulerMcpServerProjectHome.test.cjs +37 -204
  162. package/src/main/lib/__tests__/schedulerPaths.test.cjs +226 -0
  163. package/src/main/lib/__tests__/schedulerPathsWorktree.test.cjs +94 -0
  164. package/src/main/lib/__tests__/schedulerRuntimeState.test.cjs +56 -0
  165. package/src/main/lib/__tests__/sessionSlots.test.cjs +45 -0
  166. package/src/main/lib/__tests__/telemetryBacklog.test.cjs +1 -1
  167. package/src/main/lib/__tests__/upgradeDrain.test.cjs +130 -0
  168. package/src/main/lib/__tests__/usageCircuit.test.cjs +61 -0
  169. package/src/main/lib/__tests__/watchdog-helpers.test.cjs +63 -0
  170. package/src/main/lib/__tests__/watchdog-relaunch.test.cjs +73 -0
  171. package/src/main/lib/activeIndexRebuild.cjs +1 -3
  172. package/src/main/lib/activeSessions.cjs +20 -88
  173. package/src/main/lib/adoptedRunSupervisor.cjs +136 -0
  174. package/src/main/lib/agentModelResolve.cjs +33 -1
  175. package/src/main/lib/agentPersonaSchema.cjs +2 -2
  176. package/src/main/lib/auditLog.cjs +30 -5
  177. package/src/main/lib/buildIdentity.cjs +113 -0
  178. package/src/main/lib/classifyPromptTicket.cjs +3 -2
  179. package/src/main/lib/claudeBin.cjs +37 -2
  180. package/src/main/lib/cleanEnv.cjs +27 -1
  181. package/src/main/lib/credentials.cjs +4 -2
  182. package/src/main/lib/cwdClassify.cjs +185 -0
  183. package/src/main/lib/definitionOfDone.cjs +296 -52
  184. package/src/main/lib/dispatchLoop.cjs +40 -0
  185. package/src/main/lib/effectiveModelInfo.cjs +9 -10
  186. package/src/main/lib/ephemeralCwd.cjs +7 -28
  187. package/src/main/lib/gitWorktree.cjs +95 -8
  188. package/src/main/lib/guardShims.cjs +3 -3
  189. package/src/main/lib/historyRollup.cjs +6 -7
  190. package/src/main/lib/instanceLock.cjs +32 -5
  191. package/src/main/lib/jobSupervisorRecord.cjs +147 -0
  192. package/src/main/lib/jobWorktreeBootLive.cjs +9 -5
  193. package/src/main/lib/localAdminHttp.cjs +9 -27
  194. package/src/main/lib/mcpToolCatalog.cjs +29 -77
  195. package/src/main/lib/opsOwnership.cjs +27 -19
  196. package/src/main/lib/prdAuthoringSeed.cjs +36 -0
  197. package/src/main/lib/prdLocations.cjs +48 -1
  198. package/src/main/lib/procIdentity.cjs +126 -0
  199. package/src/main/lib/procName.cjs +98 -0
  200. package/src/main/lib/projectHomeAdminRoutes.cjs +56 -327
  201. package/src/main/lib/queueHistory.cjs +8 -7
  202. package/src/main/lib/queueStore.cjs +57 -37
  203. package/src/main/lib/quietMachineLease.cjs +19 -2
  204. package/src/main/lib/reservationExpiry.cjs +30 -0
  205. package/src/main/lib/runClaudeP.cjs +4 -2
  206. package/src/main/lib/runLogRetention.cjs +3 -2
  207. package/src/main/lib/scheduleJobSchema.cjs +2 -2
  208. package/src/main/lib/scheduleJobTransitions.cjs +29 -2
  209. package/src/main/lib/schedulerBatch.cjs +27 -2
  210. package/src/main/lib/schedulerPaths.cjs +175 -0
  211. package/src/main/lib/schedulerRuntimeState.cjs +59 -0
  212. package/src/main/lib/sessionSlots.cjs +47 -9
  213. package/src/main/lib/smProcNames.cjs +51 -0
  214. package/src/main/lib/upgradeDrain.cjs +188 -0
  215. package/src/main/lib/usageCircuit.cjs +53 -6
  216. package/src/main/lib/watchdogHelpers.cjs +70 -37
  217. package/src/main/lib/withTimeout.cjs +33 -0
  218. package/src/main/mcpStatus.cjs +4 -2
  219. package/src/main/pluginInstall.cjs +6 -2
  220. package/src/main/projectPages.cjs +41 -145
  221. package/src/main/pty.cjs +8 -1
  222. package/src/main/queueOps.cjs +10 -10
  223. package/src/main/runVerify.cjs +69 -3
  224. package/src/main/scheduler.cjs +1607 -383
  225. package/src/main/seedAgentPersonas.cjs +1 -1
  226. package/src/main/seedDevPlugin.cjs +1 -1
  227. package/src/main/seedSchedulerMcp.cjs +7 -6
  228. package/src/main/seedStatus.cjs +1 -1
  229. package/src/main/supervisor.cjs +5 -3
  230. package/src/main/usage.cjs +126 -62
  231. package/src/preload/api.d.ts +18 -64
  232. package/src/preload/index.cjs +2 -4
  233. package/src/seed/agents/project-home-builder.md +31 -48
  234. package/screenshots/.gitkeep +0 -0
  235. package/screenshots/README-screenshots.md +0 -13
  236. package/src/main/lib/projectPageSummarySchema.cjs +0 -181
  237. package/src/main/teams.cjs +0 -95
  238. package/src/main/templates/project-pages-catalog.json +0 -741
  239. package/src/main/templates/project-pages-default-home.html +0 -123
  240. package/src/main/templates/project-pages-pipeline.md +0 -417
  241. package/src/seed/prompts/code-review/ac-coverage-check.md +0 -8
  242. package/src/seed/prompts/code-review/correctness-only.md +0 -8
  243. package/src/seed/prompts/code-review/full-spectrum-high.md +0 -8
  244. package/src/seed/prompts/code-review/hallucination-check.md +0 -8
  245. package/src/seed/prompts/code-review/public-api-compat.md +0 -8
  246. package/src/seed/prompts/code-review/readability-naming.md +0 -8
  247. package/src/seed/prompts/debugging/bug-as-failing-test.md +0 -8
  248. package/src/seed/prompts/debugging/git-bisect-regression.md +0 -8
  249. package/src/seed/prompts/debugging/instrument-intermittent-bug.md +0 -8
  250. package/src/seed/prompts/debugging/localize-pipeline-failure.md +0 -8
  251. package/src/seed/prompts/debugging/reproduce-then-diagnose.md +0 -8
  252. package/src/seed/prompts/documentation/adr-from-change.md +0 -8
  253. package/src/seed/prompts/documentation/module-readme.md +0 -8
  254. package/src/seed/prompts/documentation/onboarding-plan.md +0 -8
  255. package/src/seed/prompts/documentation/refresh-claude-md.md +0 -8
  256. package/src/seed/prompts/documentation/tsdoc-public-exports.md +0 -8
  257. package/src/seed/prompts/git-pr/conventional-commit.md +0 -8
  258. package/src/seed/prompts/git-pr/draft-pr-title-body.md +0 -8
  259. package/src/seed/prompts/git-pr/pre-commit-safety-sweep.md +0 -8
  260. package/src/seed/prompts/git-pr/release-notes-block.md +0 -8
  261. package/src/seed/prompts/git-pr/split-large-pr.md +0 -8
  262. package/src/seed/prompts/performance/bundle-startup-audit.md +0 -8
  263. package/src/seed/prompts/performance/complexity-audit.md +0 -8
  264. package/src/seed/prompts/performance/cpu-profile-hot-path.md +0 -8
  265. package/src/seed/prompts/performance/db-query-plan-review.md +0 -8
  266. package/src/seed/prompts/performance/memory-leak-hunt.md +0 -8
  267. package/src/seed/prompts/qa/api-contract-tests.md +0 -8
  268. package/src/seed/prompts/qa/e2e-critical-path.md +0 -8
  269. package/src/seed/prompts/qa/failing-test-for-bug.md +0 -8
  270. package/src/seed/prompts/qa/find-missing-test-coverage.md +0 -8
  271. package/src/seed/prompts/qa/stabilize-flaky-test.md +0 -8
  272. package/src/seed/prompts/qa/tdd-red-first.md +0 -8
  273. package/src/seed/prompts/qa/visual-regression-review.md +0 -8
  274. package/src/seed/prompts/qa/wcag-axe-scan.md +0 -8
  275. package/src/seed/prompts/refactoring/dead-code-sweep.md +0 -8
  276. package/src/seed/prompts/refactoring/extract-duplicated-pattern.md +0 -8
  277. package/src/seed/prompts/refactoring/modernize-legacy-file.md +0 -8
  278. package/src/seed/prompts/refactoring/reduce-cyclomatic-complexity.md +0 -8
  279. package/src/seed/prompts/refactoring/tighten-module-boundaries.md +0 -8
  280. package/src/seed/prompts/security/authz-audit.md +0 -8
  281. package/src/seed/prompts/security/crypto-correctness.md +0 -8
  282. package/src/seed/prompts/security/cwe-top-25-hunt.md +0 -8
  283. package/src/seed/prompts/security/dependency-audit.md +0 -8
  284. package/src/seed/prompts/security/ipc-boundary-hardening.md +0 -8
  285. package/src/seed/prompts/security/owasp-top-10-staged-diff.md +0 -8
  286. package/src/seed/prompts/security/secret-credential-scan.md +0 -8
  287. package/web/README.md +0 -41
  288. package/web/project-pages/logic/dist/logic.cjs +0 -4709
  289. package/web/project-pages/render.cjs +0 -70
  290. package/web/project-pages/renderer/dist/renderer.cjs +0 -18900
  291. package/web/project-pages/validate-summary.cjs +0 -62
@@ -1,123 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1" />
6
- <title>Project Home</title>
7
- <meta name="description" content="Project Home — a hosted document generated from this project's own repo, not yet generated for this project." />
8
- <style>
9
- /* Design tokens copied from src/renderer/lib/projectPages/library/kit.tsx's
10
- PK palette/fonts — no font files are embedded here (unlike the
11
- generated lenses), so the font-family stacks fall back to their system
12
- alternatives (Georgia / system-ui / ui-monospace). This keeps the
13
- document a zero-network, zero-JS static file while still reading as
14
- the same visual system: same colors, same type scale, same shapes. */
15
- :root {
16
- --pk-paper: #f6efe1;
17
- --pk-panel: #efe6d3;
18
- --pk-card: #fbf6ec;
19
- --pk-deep: #2a221a;
20
- --pk-edge: #e0d3b8;
21
- --pk-rule: #d9c9a8;
22
- --pk-ink: #2a221a;
23
- --pk-ink-soft: #5b4a36;
24
- --pk-ink-mute: #8a7a60;
25
- --pk-accent: #b85c34;
26
- --pk-accent-deep: #9c4a26;
27
- --pk-sage: #6f7d52;
28
- --pk-butter: #e4b85a;
29
- --pk-serif: 'Newsreader', Georgia, serif;
30
- --pk-sans: 'Geist', system-ui, sans-serif;
31
- --pk-mono: 'IBM Plex Mono', ui-monospace, monospace;
32
- }
33
- * { box-sizing: border-box; }
34
- html, body { margin: 0; padding: 0; background: var(--pk-paper); color: var(--pk-ink); }
35
- body { font-family: var(--pk-sans); }
36
- .eyebrow {
37
- font-family: var(--pk-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
38
- color: var(--pk-accent); font-weight: 500;
39
- }
40
- .pill {
41
- display: inline-flex; align-items: center; gap: 6px; font-family: var(--pk-mono); font-size: 11px;
42
- color: var(--pk-ink-soft); background: transparent; border: 1px solid var(--pk-rule); border-radius: 999px;
43
- padding: 3px 9px; white-space: nowrap;
44
- }
45
- h1 {
46
- margin: 0; font-family: var(--pk-serif); font-weight: 500; font-size: clamp(30px, 5vw, 44px);
47
- line-height: 1.1; letter-spacing: -0.015em; color: var(--pk-ink);
48
- }
49
- h2 {
50
- margin: 0; font-family: var(--pk-serif); font-weight: 500; font-size: 24px; line-height: 1.15;
51
- letter-spacing: -0.01em; color: var(--pk-ink);
52
- }
53
- p { margin: 0; font-family: var(--pk-sans); font-size: 16px; line-height: 1.62; color: var(--pk-ink-soft); }
54
- section { padding: clamp(28px, 6vw, 72px); }
55
- .hero { border-bottom: 1px solid var(--pk-rule); background: var(--pk-panel); }
56
- .hero-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
57
- .cta {
58
- display: inline-flex; width: fit-content; align-items: center; gap: 8px; font-family: var(--pk-sans);
59
- font-size: 14px; font-weight: 600; padding: 11px 20px; border-radius: 9px; border: 1px solid transparent;
60
- background: var(--pk-accent); color: #fff;
61
- }
62
- .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; max-width: 960px; margin: 0 auto; }
63
- .card {
64
- background: var(--pk-card); border: 1px solid var(--pk-edge); border-radius: 12px; padding: 20px;
65
- display: flex; flex-direction: column; gap: 8px;
66
- }
67
- .card .k { font-family: var(--pk-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pk-ink-mute); }
68
- .card .t { font-family: var(--pk-serif); font-size: 18px; color: var(--pk-ink); }
69
- .card .d { font-size: 13.5px; line-height: 1.55; color: var(--pk-ink-soft); }
70
- .footnote { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
71
- .footnote .label { font-family: var(--pk-mono); font-size: 11px; color: var(--pk-ink-mute); }
72
- </style>
73
- </head>
74
- <body>
75
- <section class="hero">
76
- <div class="hero-inner">
77
- <span class="pill">Shipped default — not yet generated for this project</span>
78
- <div class="eyebrow">Project Home</div>
79
- <h1>This is Project Home's shipped default page.</h1>
80
- <p>
81
- Project Home is a hosted document — a self-contained page describing this specific
82
- project: what it is, its main areas, and what it's for. Session-manager ships this
83
- default so the page is never empty, but it does not describe your project yet.
84
- Nothing shown on this page is specific to any real project.
85
- </p>
86
- <a class="cta" href="#" onclick="return false;">Generate My Project Home</a>
87
- <p style="font-size: 13px; color: var(--pk-ink-mute);">
88
- Press "Generate My Project Home" in the app (this link is inert inside this static
89
- preview) to replace this page with one generated from your project's own repo.
90
- </p>
91
- </div>
92
- </section>
93
- <section>
94
- <div class="grid">
95
- <div class="card">
96
- <div class="k">What it reads</div>
97
- <div class="t">Your repo, live</div>
98
- <div class="d">Generation reads this project's own files, git history, and CLAUDE.md conventions — never invented content.</div>
99
- </div>
100
- <div class="card">
101
- <div class="k">What it produces</div>
102
- <div class="t">A static document</div>
103
- <div class="d">A self-contained HTML page — inline styling, no network calls, no live app state — that replaces this default at a fixed path.</div>
104
- </div>
105
- <div class="card">
106
- <div class="k">How it stays fresh</div>
107
- <div class="t">On demand</div>
108
- <div class="d">Regenerate any time from Project Home; this default only ever shows before the first generation.</div>
109
- </div>
110
- </div>
111
- </section>
112
- <section>
113
- <div class="footnote">
114
- <div class="label">About this page</div>
115
- <p style="font-size: 13.5px;">
116
- Shipped with Session Manager as a build-time asset — the same design system as a
117
- generated Project Home page, but honest, generic copy instead of project-specific
118
- content. See "About these templates" for how a generated page is built.
119
- </p>
120
- </div>
121
- </section>
122
- </body>
123
- </html>
@@ -1,417 +0,0 @@
1
- # Project Pages pipeline — architecture spec
2
-
3
- Canonical design for the "Project Page" feature: Project Home generates 5
4
- static HTML pages per project (**Home**, Marketing Landing, Feature
5
- Description, Architecture Overview, **Brief**) from a fixed component
6
- library, plus a never-generated "About these templates" view explaining the
7
- five lenses and where to hand-edit them. This is the design source of truth
8
- for the four `project_home_*` MCP tools (`project_home_get_contract`,
9
- `project_home_validate_summary`, `project_home_render`, `project_home_status`,
10
- served over the app's admin routes, PRD 1089) that actually drive a
11
- `project-home-builder` Epic's session — edit here, not in the tool
12
- implementations, when the design changes.
13
-
14
- **Correction, PRD "project-home-portable-persona":** generation is no longer
15
- grounded by pointing a session at this file (or any other repo-relative
16
- path) directly. This spec stopped being something a builder Epic reads —
17
- neither the seeded `project-home-builder` persona
18
- (`src/seed/agents/project-home-builder.md`, delivered to
19
- `~/.claude/agents/`) nor the `project-home-builder` Epic tag's grounding
20
- prompt (`src/renderer/lib/agentTagDefs.ts`) names a repo path anymore, because
21
- a builder Epic can run against a project that never had this repo checked
22
- out (the npm-installed case). Instead, both now point a session at the
23
- `project_home_get_contract` MCP tool as the FIRST call of the run — its
24
- response is a fully self-contained protocol + schema + catalog payload
25
- computed from this spec (see "Epic tag" below). This file remains the
26
- design source of truth for whoever implements or changes the MCP tools
27
- themselves; it is no longer read at generation time by the builder Epic.
28
- session-manager's own repo keeps a lean project-local overlay,
29
- `.claude/agents/project-home-builder.md`, that adds only session-manager-
30
- specific historical context (the saved design-mock library) on top of the
31
- seeded persona's real protocol — see that file.
32
-
33
- **Correction, 2026-08-02:** the original spec shipped 3 lenses
34
- (marketing/feature/architecture) only, with Project Home's own live Brief
35
- dashboard staying a separate, hand-built React view above the generated
36
- block. The human then asked for the Brief's own content to be available as a
37
- 4th generated template too ("Home") — same component-library/summary/picks
38
- pipeline as the other three, reusing `identity`/`stats`/`pillars` (already
39
- in `ProjectPageSummary`, no schema change needed) rather than the live
40
- Epic-queue data the React Brief shows (that stays live-only; a static page
41
- can't show "what's running right now" truthfully). The live Brief dashboard
42
- above the Project Pages block is unchanged and still the primary live view —
43
- Home is an *additional* static snapshot, not a replacement for it.
44
-
45
- **Correction, 2026-08-03 (Epic "Project Home Layout"):** the 2026-08-02
46
- correction above is now itself superseded. Project Home is no longer a
47
- hand-built React page with a Project Pages viewer embedded at the bottom —
48
- its primary content area IS the generated `home` document, hosted at a fixed
49
- path, with a shipped default so a brand-new project is never empty. The
50
- live Brief dashboard's synthesized fields (purpose/what/areas/scope/
51
- conventions) become their own 5th generated lens, `brief`, rather than a
52
- separate hand-built React block stack — see "Project Home is a hosted
53
- document, not a React page" below for the full design, and Stage 4 for how
54
- the display changes. `PhNow`/`PhOpenQuestions` (live Epic-queue and
55
- open-question state) are the one part of the old React page that stays
56
- live React, per the same "a static page can't show what's running right now
57
- truthfully" reasoning the 2026-08-02 correction already established for
58
- Epic-queue data.
59
-
60
- ## Project Home is a hosted document, not a React page
61
-
62
- - Project Home's main content area renders a generated, self-contained
63
- static HTML document, displayed via the same sandboxed
64
- `<iframe sandbox="allow-same-origin" srcDoc={html} />` mechanism Stage 4
65
- already uses for the other lenses — Project Home does not recompose this
66
- content live in its own React tree.
67
- - That document lives at a **fixed path**,
68
- `session-manager-operations/project-pages/output/home.html` — this is what
69
- the app always reads for Project Home's main view, regardless of whether
70
- it was just generated or is days old.
71
- - Session-manager **ships a default `home.html`** baked into the app build
72
- (not per-project state — see "Storage / ownership" below). A brand-new
73
- project with no generated output still renders a real page, never an
74
- empty state.
75
- - The only way that document is replaced is the **"Generate My Project
76
- Home"** action, which creates (or resumes) an Epic tagged
77
- `project-home-builder`, bound to the `project-home-builder` agent — reusing
78
- the exact Epic-creation mechanism `ProjectPagesSection.tsx`'s
79
- `findActiveBuilderEpic` + `composeEpicIntake` already implement for
80
- "Generate Now" today (see Stage 4). Never an inline function call, never a
81
- main-process `claude -p` spawn — same non-negotiable Stage 1 already
82
- states for `summary.json`.
83
-
84
- ## Inputs (as specified by the human, 2026-08-01, extended 2026-08-02, 2026-08-03)
85
-
86
- 1. **Component Library** — fixed, ships with the app. Source design for the
87
- original 3 lenses saved at
88
- `session-manager-operations/design-mocks/project-pages-component-library/`
89
- (read its `README.md` first) — the `home` lens has no saved design mock;
90
- it was authored directly in
91
- `src/renderer/lib/projectPages/library/homeSlots.tsx` reusing the same
92
- `PageLensDef` shape and the marketing lens's `identity`/`stats`/`pillars`
93
- fields, styled as an internal dashboard rather than an outward pitch. The
94
- `brief` lens likewise has no saved design mock — it is authored directly
95
- against `ProjectBrief`'s own fields (see "Stage 1" below for the exact
96
- source-field mapping), styled as a straightforward read of what the
97
- project is, what it does, and its conventions, rather than a pitch or a
98
- dashboard.
99
- Shape: 5 lenses (`home` / `marketing` / `feature` / `architecture` /
100
- `brief`), each a stack of **slots**, each slot 2-4 **variant** components,
101
- each lens shipping named **presets** (fixed slot→variant picks) plus a
102
- "custom" override state.
103
- 2. **Project summary** — a JSON computed per project (see schema below).
104
- 3. **Summary → component mapping** — picks the best-fitting variant per slot
105
- (and/or a whole preset) from the summary's content, then renders.
106
-
107
- ## Non-negotiables from the human's instructions
108
-
109
- - Output **MUST be static HTML** — 5 files, one per lens. Project Home does
110
- not recompose the pages live in its own React tree; it hosts pre-rendered
111
- HTML. This is what "guaranteed to render" means: the generated artifact is
112
- immune to the app's own React/Tailwind version ever drifting under it.
113
- - Before the first "Generate My Project Home" run, Project Home renders the
114
- **shipped default `home.html`** (see "Project Home is a hosted document,
115
- not a React page" above) — no placeholder/fake content ever, and no
116
- fabricated per-project claims in the default either (see Stage 4's
117
- "Shipped default" subsection).
118
- - Generation is not a bare function call — it runs as an Epic of a
119
- **new type, `project-home-builder`**, so grounding, objective and output
120
- are pinned before the agent starts (see "Epic tag" below), the same way
121
- every other unit of work in this app is an Epic (CLAUDE.md's TAB/EPIC
122
- domain model).
123
- - The agent doing the generation is a **registered local agent**
124
- (`.claude/agents/project-home-builder.md`), not an ad hoc prompt.
125
- - Never fabricate content. Every field in the summary must trace to
126
- something concrete (an Epic goal, a file/dir, a CLAUDE.md convention, a
127
- git log entry) — same rule already enforced for `project-brief`, and now
128
- also the rule governing the shipped default `home.html`'s copy.
129
-
130
- ## Stage 0 — Component Library (build-time asset, already captured)
131
-
132
- Port `design-mocks/project-pages-component-library/source/*.jsx` into real
133
- `.tsx` under `src/renderer/lib/projectPages/library/` (or a sibling location
134
- a PRD should decide precisely). Precompile with esbuild into a pure
135
- function:
136
-
137
- ```ts
138
- renderProjectPages(summary: ProjectPageSummary, picks: ProjectPagePicks)
139
- => { home: string; marketing: string; feature: string; architecture: string; brief: string }
140
- ```
141
-
142
- Each string is a **fully self-contained HTML document** — inline CSS, fonts
143
- self-hosted as local assets bundled with the app (never fetched from Google
144
- Fonts at generation time — this is the same "no network egress" principle
145
- the design library's own `PROJ.arch.principles` already states). No runtime
146
- JSX transform, no CDN script tags, no in-browser Babel (the source bundle
147
- uses browser-side Babel for its own live-preview tool; that is NOT the
148
- shipped renderer).
149
-
150
- ## Stage 1 — Project Summary (`ProjectPageSummary`, computed per project)
151
-
152
- New schema, a strict superset of the existing `ProjectBrief`
153
- (`session-manager-operations/project-brief/`, `purpose/what/areas/scope/
154
- conventions` only). Build incrementally on top of an already-generated
155
- Brief rather than re-reading the repo from scratch:
156
-
157
- - `identity`: name, tagline, oneLine, claim, sub, install command — derived
158
- from `package.json` + Brief's `purpose`.
159
- - `stats[]`, `pillars[]` — derived from Brief's `areas` (file counts, heat,
160
- notes become pillar copy).
161
- - `feature` (ONE deep-dive) — derived from the most-active open Epic
162
- (highest `heat`/most recent scope entries): name, problem/solution framed
163
- from that Epic's goal + its scope-timeline entries, steps from its PRD
164
- chain if one exists.
165
- - `architecture` — layers/modules from Brief's `areas` + their `epic`
166
- ownership; decisions from Brief's `scope` entries tagged `decided`; risks
167
- are the one field with no clean Brief source — leave empty rather than
168
- invent, or optionally source from open `discussion`-tagged Epics.
169
- - `brief` — the `brief` lens's source fields, read directly off
170
- `ProjectBrief` (`session-manager-operations/project-brief/brief.json`)
171
- with no reshaping: `purpose` (string), `what[]`, `areas[]`, `scope[]`,
172
- `conventions[]`. This is the generated form of what the live React Brief
173
- used to render by hand (`PhWhat`/`PhAreas`/`PhScope`/`PhConventions`) —
174
- the `brief` lens's slots map one-to-one to these four array fields plus
175
- the `purpose` string; a later PRD implementing the lens should not need to
176
- invent any additional source data. `brief.json`'s `pins` (per-block
177
- edit-pins) still apply at the Brief-authoring layer (Stage 1, before this
178
- mapping) — the `brief` lens renders whatever `brief.json` currently holds,
179
- pinned or not, same as every other summary field here.
180
- - `quotes[]` — **do not fabricate testimonials**. Either omit entirely
181
- (proof-strip variants that need a quote simply aren't selectable) or wire
182
- a future opt-in source (e.g. GitHub issue comments) — out of scope for v1.
183
-
184
- Written to `session-manager-operations/project-pages/summary.json`.
185
-
186
- **Correction vs. an earlier draft of this spec:** this is NOT a
187
- `projectBrief.refresh`-style main-process-orchestrated `claude -p` spawn.
188
- Per the human's explicit instruction, generation runs as a
189
- `project-home-builder`-tagged **Epic** — an ordinary Chat/Terminal claude
190
- session grounded by that tag's `initialPromptTemplate` (`agentTagDefs.ts`),
191
- which drives the session to call the `project_home_get_contract` MCP tool
192
- first and follow the protocol it returns (see the correction note at the top
193
- of this file). That session reads `brief.json` and the repo directly
194
- (Read/Grep/Bash tools) and composes `summary.json` itself, then writes it
195
- via `project_home_render` (not a raw Write-tool file write — see Stage 3).
196
- There is no separate nested `claude -p` call and no new main-process IPC for
197
- synthesis beyond the four `project_home_*` admin-routed tools themselves.
198
- Cost-gating is inherent: it only runs when a human clicks **"Generate My
199
- Project Home"** (which creates/resumes the Epic), same discipline as any
200
- other Epic. `brief.json` itself is still produced by
201
- `projectBrief.refresh`'s existing main-process-orchestrated mechanism — that
202
- mechanism is unchanged and stays, because `brief.json` remains an *input* to
203
- Stage 1, read by the `project-home-builder` Epic session same as any other
204
- repo file. What changes is only that `projectBrief.refresh` no longer has
205
- its own dedicated user-facing button — see Stage 4's "One action, not two"
206
- subsection.
207
-
208
- ## Stage 2 — Summary → component mapping (selection)
209
-
210
- **Reversed 2026-08-03 (Epic "Project Home Layout"): there is no separate
211
- deterministic selection stage.** The `project-home-builder` agent itself
212
- picks each slot's variant, by reasoning over its composed summary against
213
- the component library's own variant notes — the same class of step as
214
- Stage 1's summary authoring, not a distinct machine-checkable predicate
215
- scorer. Concretely: for each lens, for each slot, the agent reads the
216
- candidate variants' prose `note`/description — served to it directly in
217
- `project_home_get_contract`'s catalog response, sourced server-side from
218
- `src/renderer/lib/projectPages/library/*.tsx` so the agent never needs to
219
- read that source itself (e.g. "Needs a real quote.", "Needs a strong
220
- screenshot.") — and judges which variant genuinely fits this project's
221
- summary content, then passes the resulting picks to `project_home_render` —
222
- no intermediate predicate language, no scorer script.
223
-
224
- Output persisted to `session-manager-operations/project-pages/picks.json`
225
- in the same shape as before (`Record<lensId, Record<slotId, variantId>>`),
226
- plus a top-level `schemaVersion` field (see "Stale-picks migration" below).
227
- **The 'respect existing hand-picks unless explicit start-over' rule is
228
- unchanged and still what keeps selection stable across regenerates**: a
229
- project's picks are judged once (or on an explicit reset request) and then
230
- persisted like `project-brief`'s pinned blocks, so moving selection from a
231
- script to agent judgment does not reintroduce per-regenerate
232
- nondeterminism — the agent must not silently overwrite it (mirrors
233
- `project-brief`'s per-block `pins`, but per-slot-pick here instead of
234
- per-paragraph-text).
235
-
236
- **Stale-picks migration (found 2026-08-03).** Today's on-disk
237
- `picks.json` was written by the now-deleted deterministic scorer
238
- (`selectionPredicates.ts`, retired by PRD 958) — every existing project's
239
- picks are preset-`v1` defaults, not real judgment. The 'preserve existing
240
- hand-picks on regenerate' rule above would otherwise grandfather these in
241
- forever, silently defeating agent-owned selection for every project that
242
- already has a `picks.json`. Decided: `picks.json` carries
243
- `schemaVersion: 1` for scorer-era files (files with no `schemaVersion`
244
- field at all are treated as `schemaVersion: 1` — the scorer never wrote
245
- one) and `schemaVersion: 2` once written by the agent or hand-edited by a
246
- human. On the first `project-home-builder` Epic run after this change, the
247
- agent checks `picks.json`'s `schemaVersion`: if `1` (or absent), the
248
- existing picks are **non-authoritative** — the agent re-judges every slot
249
- from scratch (ignoring the stale values, not merging with them) and writes
250
- the result back as `schemaVersion: 2`. Every later run treats a
251
- `schemaVersion: 2` file as real hand/agent judgment and follows the normal
252
- 'preserve unless explicit start-over' rule. This re-judgment happens
253
- exactly once per project, not on every run — `schemaVersion` is the marker
254
- that prevents repeating it.
255
-
256
- ## Stage 3 — Render
257
-
258
- `renderProjectPages(summary, picks)` → 5 HTML strings. Write to
259
- `session-manager-operations/project-pages/output/{home,marketing,feature,
260
- architecture,brief}.html` plus a `manifest.json` (`generatedAt`, `model`,
261
- `summarySynthesizedAt`, and a drift flag vs. the Brief's own
262
- `synthesizedAt` — same drift-chip idea `project-brief` already uses).
263
- `output/home.html` is the fixed path Project Home's main view reads (see
264
- "Project Home is a hosted document, not a React page" above) — it is
265
- written by this same single render pass as the other four lenses, not by a
266
- separate mechanism.
267
-
268
- ## Stage 4 — Project Home display
269
-
270
- - **No empty state for the main view.** With a shipped default `home.html`
271
- (see "Project Home is a hosted document, not a React page" above), Project
272
- Home's main content area always has something real to show — either the
273
- shipped default or a project-generated document. What the UI must surface
274
- instead is **provenance**: a chip stating whether the currently-displayed
275
- `home.html` is the shipped default or a generated document, and if
276
- generated, when (`manifest.json`'s `generatedAt`). The **"Generate My
277
- Project Home"** action is always available regardless of which state is
278
- showing.
279
- - **Shipped default `home.html`** is a **build-time asset**, not per-project
280
- state — it ships baked into the app bundle (same "ships with the app"
281
- status as the component library in Stage 0), not written into any
282
- project's `session-manager-operations/`. It must be honest about being a
283
- default: its copy describes what Project Home is in general and prompts
284
- the reader to press "Generate My Project Home" — it must **not** contain
285
- fabricated project-specific content (name, stats, claims about this
286
- particular repo), per this spec's existing never-fabricate rule. The app
287
- falls back to this shipped asset whenever a project's own
288
- `output/home.html` is absent; once a project has generated its own, that
289
- file (at the fixed per-project path) takes over and the shipped default is
290
- never shown again for that project.
291
- - **"Generate My Project Home"** click creates (or resumes) an Epic tagged
292
- `project-home-builder` in the active project and sends it the tag's
293
- grounding prompt (see Epic tag below) as the opening message — the Epic
294
- IS the unit of work, same as every other Epic in this app. This reuses
295
- the exact mechanism `ProjectPagesSection.tsx`'s `findActiveBuilderEpic` +
296
- `composeEpicIntake` already implement today (there under the "Generate
297
- Now"/"Regenerate" names) — no new Epic-creation code path, only a rename
298
- and a widened trigger surface (see "One action, not two" below).
299
- - **One action, not two.** Today there are two competing CTAs: "Refresh
300
- brief" (regenerates `brief.json` for the old hand-built React blocks) and
301
- "Generate Now"/"Regenerate" (regenerates the Project Pages HTML). These
302
- **consolidate into the single "Generate My Project Home" action**, because
303
- the Brief's content is now one of the five generated lenses (`brief`) —
304
- there is no longer a separate live-React consumer of `brief.json` that
305
- needs its own refresh trigger. `brief.json` itself, and the
306
- `projectBrief.refresh` mechanism that writes it, are unchanged and still
307
- needed — `brief.json` is still an *input* to Stage 1 (see Stage 1's
308
- correction note above) — it simply stops being exposed as its own
309
- user-facing button. "Generate My Project Home" is responsible for
310
- ensuring `brief.json` is fresh enough before it runs Stages 1-3 (e.g.
311
- invoking `projectBrief.refresh` itself as a first step, or the
312
- `project-home-builder` agent reading `brief.json` and refreshing it
313
- in-session if stale) — the exact mechanics of that call are an
314
- implementation detail for the PRD that wires the button, not specified
315
- further here.
316
- - Once a project has generated its own `output/*.html`, Project Home renders
317
- the 5 pages via a sandboxed
318
- `<iframe sandbox="allow-same-origin" srcDoc={html} />`, toggled by lens
319
- (Home / Marketing / Feature / Architecture / Brief) — never re-parsed into
320
- the app's own React tree. The main Project Home view defaults to the
321
- `home` lens; the other four remain reachable the same way
322
- `ProjectPagesSection.tsx` exposes them today.
323
- - **`PhNow` and `PhOpenQuestions` stay live React**, rendered as a thin strip
324
- **above** the hosted HTML document (default or generated) rather than
325
- folded into any generated lens. Reason: they show live state — "what is
326
- in flight" (the live Epic queue) and "waiting on you" (live unresolved
327
- questions) — and injecting live data into a generated static document
328
- would violate this spec's own non-negotiable that the generated artifact
329
- is "self-contained static HTML, immune to the app's own React/Tailwind
330
- drift" (see "Non-negotiables" above): a document that embeds live data
331
- stops being self-contained the moment that data changes underneath it.
332
- This is the same reasoning the 2026-08-02 correction already applied to
333
- the old React Brief's Epic-queue data — carried forward unchanged, just
334
- now scoped to two specific components instead of the whole page.
335
- - A 6th tab, **"About these templates,"** is always reachable (even before
336
- the first "Generate My Project Home") and is never part of
337
- `output/*.html` — it's static explainer copy
338
- (`ProjectPagesLibraryExplainer` in `ProjectPagesSection.tsx`) naming the 5
339
- lenses, their source slot files, and the 3 real on-disk paths a human
340
- would touch to change what gets generated:
341
- `project-pages/summary.json` (the computed inputs), `project-pages/
342
- picks.json` (per-project, per-slot overrides — hand-edit a pick here and
343
- regenerating preserves it, since the `project-home-builder` agent respects
344
- existing picks unless explicitly told to start over, same rule Stage 2
345
- already had — see Stage 2's schema-version note for the one-time
346
- exception), and `src/renderer/lib/projectPages/library/` (the component
347
- library itself, shared across every project — editing it is a code
348
- change, not a per-project override).
349
-
350
- ## Storage / ownership
351
-
352
- **Correction, PRD 1089/1090 (`project_home_*` MCP tools):** the write path
353
- described in an earlier draft of this section — a builder Epic's own `Write`
354
- tool writing `summary.json`/`picks.json`/`output/*.html` directly, with no
355
- `OWNERS` entry needed because no main-process code was involved — is
356
- superseded. `project_home_render` now writes those files via the app's
357
- admin API, which IS main-process code going through `config.cjs`'s write
358
- helpers. `project-pages` is therefore now listed in `OWNERS`
359
- (`src/main/lib/opsOwnership.cjs`), owned by `project-home`, scoped to the
360
- app's admin render route only (per CLAUDE.md's domain-model law) — see
361
- `project-pages/README.md` for the exact split. A builder Epic's own direct
362
- Write-tool authoring of anything under `project-pages/` (as opposed to going
363
- through `project_home_render`) stays ungoverned/unsupported; the sanctioned
364
- path for a builder Epic is always the MCP tool, never a raw file write.
365
-
366
- The concurrency concern is real but bounded a different way: "Generate My
367
- Project Home" must check for an already-active `project-home-builder` Epic
368
- for this project and **resume/focus it** instead of creating a second one —
369
- the same "refuse a live session" guard pattern `deleteEpic` already uses
370
- elsewhere — rather than relying on filesystem-level write arbitration.
371
-
372
- The **shipped default `home.html`** is a different storage class again: it
373
- is packaged with the app build itself (e.g. under the renderer's own static
374
- assets, resolved at runtime the same way other build-time-baked assets are)
375
- — it is never written to, or read from, any project's
376
- `session-manager-operations/` tree, and carries no per-project state at all.
377
- It is not part of `project-pages/` and is not a candidate for an `OWNERS`
378
- entry.
379
-
380
- Add `session-manager-operations/project-pages/README.md` once the first
381
- file lands, documenting the shape (matching `design-mocks/`'s and
382
- `HUMAN_LEARN/`'s own READMEs, not an `OWNERS` namespace README).
383
-
384
- ## Epic tag: `project-home-builder`
385
-
386
- Added to `src/renderer/lib/tagLibrary.ts` (`EpicTag` union + `TAG_LIBRARY`
387
- entry) and `src/renderer/lib/agentTagDefs.ts` (`AGENT_TAG_DEFS` entry with
388
- an `initialPromptTemplate` that grounds the session): call
389
- `project_home_get_contract` first — its response IS the protocol, the
390
- schemas, and the catalog, entirely self-contained — then follow it through
391
- `project_home_validate_summary` → `project_home_render` →
392
- `project_home_status`. The template names no repo-relative path (this is
393
- what makes generation work on a machine with only the npm package
394
- installed) and explicitly instructs the session to report and stop, never
395
- build pipeline infrastructure, if the contract tool is unavailable or
396
- errors. Deliberately **not**
397
- added to `AGENT_TAG_DEFS`'s `AGENT_TAG_ORDER` yet — same precedent as the
398
- existing `build` tag ("no UI surface to create a build-tagged Epic exists
399
- yet"): the creation surface (the "Generate My Project Home" button) is
400
- itself one of the PRDs building this feature, so it adds the tag to
401
- `AGENT_TAG_ORDER` at the same time it wires the button, rather than exposing
402
- a half-built creation path in the New Epic composer before that button
403
- exists.
404
-
405
- ## Screenshots
406
-
407
- Several variants need real app screenshots (`FvShot` placeholders in the
408
- saved library). Reuse the existing `blog-for-project-feature` skill's real-
409
- capture pipeline rather than building a second one — out of scope for the
410
- first PRD chain; ship with the honest placeholder pattern until wired.
411
-
412
- ## Explicit non-goals for v1
413
-
414
- - No installable "design pack" packaging (Stage 0 ships baked into the app;
415
- making it swappable is a later roadmap item, not part of this build).
416
- - No automatic/background regeneration — manual trigger only, same
417
- cost-discipline as `project-brief`.
@@ -1,8 +0,0 @@
1
- ---
2
- id: code-review/ac-coverage-check
3
- title: Pre-merge acceptance-criteria check
4
- category: Code Review
5
- sendMode: paste
6
- description: Maps each AC item to the diff line that satisfies it; flags scope creep and unverified claims.
7
- ---
8
- Engage the `requesting-code-review` skill. Compare the diff against the acceptance criteria in the PRD/issue I link below. For each AC item, mark satisfied / partial / missing, and cite the file:line in the diff that satisfies it. List any code in the diff that is NOT covered by an AC (scope creep). Flag any AC the diff claims to satisfy but does not actually exercise (e.g., feature flagged off, dead code path).
@@ -1,8 +0,0 @@
1
- ---
2
- id: code-review/correctness-only
3
- title: Review staged diff for correctness bugs only
4
- category: Code Review
5
- sendMode: auto-fire
6
- description: Logic errors, race conditions, missing awaits, swallowed errors — no style or naming nits.
7
- ---
8
- Invoke the `code-reviewer` subagent on the staged diff. Find correctness bugs only — logic errors, null dereferences, race conditions, off-by-one, missing await, swallowed errors, wrong operator, wrong sign, leaked resources. Ignore formatting, style, and naming. For each finding output `file:line — one-sentence description — suggested patch (≤ 5 lines)`. Be conservative: only report issues you can defend with a concrete reproducer or a clear code path.
@@ -1,8 +0,0 @@
1
- ---
2
- id: code-review/full-spectrum-high
3
- title: Full-spectrum review at high effort
4
- category: Code Review
5
- sendMode: auto-fire
6
- description: Correctness + security + performance + maintainability + test coverage with merge verdict.
7
- ---
8
- Run the `code-review` skill at effort level "high" on the current diff. Cover: correctness, security, performance, maintainability, test coverage, error handling, edge cases, and API/contract compatibility. Group findings by severity (must-fix / should-fix / nit). Cite file:line for every finding. End with a verdict: ready to merge / changes requested / needs design discussion. Do not invent issues to pad the review — if the diff is clean, say so.
@@ -1,8 +0,0 @@
1
- ---
2
- id: code-review/hallucination-check
3
- title: Hallucination check on AI-generated code
4
- category: Code Review
5
- sendMode: auto-fire
6
- description: Verifies every imported symbol, signature, and API in the diff exists in the pinned dep version.
7
- ---
8
- This diff was written by an AI assistant. Verify it does not hallucinate. For every import, function call, and library API used, confirm the symbol actually exists in the installed dependency version (check `node_modules` / `package.json` / project source). Flag any non-existent functions, wrong signatures, hallucinated package names, or APIs that exist in a different version than what is pinned. Also check the happy path was not assumed — flag missing null/empty/error handling for inputs the function can actually receive.
@@ -1,8 +0,0 @@
1
- ---
2
- id: code-review/public-api-compat
3
- title: Public API compatibility review
4
- category: Code Review
5
- sendMode: paste
6
- description: Classifies every exported-symbol change as additive / breaking / semantic-breaking and proposes a shim.
7
- ---
8
- Compare the diff against the previous version of every exported symbol. For each public function, class, type, or schema that changed, classify: (a) backward-compatible additive, (b) breaking — signature change, (c) breaking — semantic change, (d) breaking — removal. For each breaking change, propose either a deprecation shim, a major-version bump, or a migration note. Output as a table with `symbol — change class — proposed remediation`.
@@ -1,8 +0,0 @@
1
- ---
2
- id: code-review/readability-naming
3
- title: Diff readability + naming pass
4
- category: Code Review
5
- sendMode: paste
6
- description: Surface-only review of names, magic numbers, lying comments, and overlong blocks.
7
- ---
8
- Read the diff and report only on readability: unclear variable names, functions doing more than one thing, magic numbers without a named constant, comments that lie about what the code does, control flow that would benefit from early returns or guard clauses, and any block over ~30 lines that should be extracted. Propose concrete renames and extractions with a one-line justification each. Skip correctness and security — other passes cover that.
@@ -1,8 +0,0 @@
1
- ---
2
- id: debugging/bug-as-failing-test
3
- title: Capture this bug as a failing test
4
- category: Debugging
5
- sendMode: auto-fire
6
- description: Converts a bug report into a regression test that fails today on main and passes after the fix.
7
- ---
8
- Hand off to the `debugger` subagent. Convert this bug report into a failing test before fixing anything: [paste bug report]. The test must fail on `main` with an assertion error that mirrors the user-visible symptom, not a setup error. Place it next to existing tests for the same module. Once the test fails the right way, fix the code, watch the test go green, and leave the test committed as a regression guard.
@@ -1,8 +0,0 @@
1
- ---
2
- id: debugging/git-bisect-regression
3
- title: Bisect commits to find the regression
4
- category: Debugging
5
- sendMode: paste
6
- description: Runs git bisect from known-good to HEAD, records each step, then fixes preserving original intent.
7
- ---
8
- This used to work and now it doesn't: [describe the broken behavior]. Run `git bisect` between the last known-good commit and HEAD. For each step, check out the commit, run the minimal reproducer I provide below, and mark good/bad. Record each bisection step so the path to the offending commit is reproducible. Once isolated, read the offending commit's diff, identify the line that introduced the regression, and propose a fix that preserves the original intent of that commit.
@@ -1,8 +0,0 @@
1
- ---
2
- id: debugging/instrument-intermittent-bug
3
- title: Instrument to make an intermittent bug reproducible
4
- category: Debugging
5
- sendMode: paste
6
- description: Adds ring-buffer logging at branch points; replays the captured sequence as a deterministic test.
7
- ---
8
- This bug happens "sometimes" and we cannot reproduce it on demand: [describe symptom]. Add lightweight instrumentation (structured logs, counters, an in-memory ring buffer of recent state transitions) at every suspected branch point. Run the app under load or in the wild until the bug triggers, then read back the captured state to identify the unique sequence that led to it. Once captured, write a deterministic test that replays that sequence. Remove the instrumentation only after the regression test exists.
@@ -1,8 +0,0 @@
1
- ---
2
- id: debugging/localize-pipeline-failure
3
- title: Localize the failure in a long pipeline
4
- category: Debugging
5
- sendMode: paste
6
- description: Halves the pipeline at midpoints to localize the bug to one transform; outputs a bisection log.
7
- ---
8
- The pipeline [name it] produces wrong output at the end. Halve the pipeline: log or assert intermediate state at the midpoint and determine whether the bug is upstream or downstream of that midpoint. Recurse until the bug localizes to a single function or transform. Output the bisection log as a list of `checkpoint → state observed → conclusion`. Once localized, diagnose the specific function and propose a patch.