claude-code-session-manager 0.140.0 → 0.142.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/README.md +80 -70
  2. package/bin/cli.cjs +11 -0
  3. package/dist/assets/AppSettings-BcZgIvvY.js +2 -0
  4. package/dist/assets/{History--JwsFnbn.js → History-DpZuJXi1.js} +1 -1
  5. package/dist/assets/HomeClaudeConfig-D32ZJtU-.js +3 -0
  6. package/dist/assets/{Panel-CALyU0pe.js → Panel-BjdJjhqt.js} +1 -1
  7. package/dist/assets/{ProjectClaudeConfig-sdlA-fUb.js → ProjectClaudeConfig-BTClYV6i.js} +7 -7
  8. package/dist/assets/Scheduler-DPobKx1Z.js +16 -0
  9. package/dist/assets/{SkillReferenceGraph-CxAuwhNN.js → SkillReferenceGraph-Cqyu4mef.js} +1 -1
  10. package/dist/assets/{Skills-DtRzghn5.js → Skills-vv0noNVI.js} +5 -5
  11. package/dist/assets/{TiptapBody-DApeu7x8.js → TiptapBody-CXi8Pvut.js} +1 -1
  12. package/dist/assets/Toggle-CiYCWLjh.js +1 -0
  13. package/dist/assets/{VoiceButton-DtStfv1H.js → VoiceButton-4NKKd1sC.js} +1 -1
  14. package/dist/assets/{historyTotals-ydfnwepc.js → historyTotals-DDunb8Ch.js} +1 -1
  15. package/dist/assets/index-Cn5E9958.js +3133 -0
  16. package/dist/assets/{index-DKXdXfka.css → index-DVHIHoJf.css} +1 -1
  17. package/dist/index.html +2 -2
  18. package/dist-web/app.css +1 -1
  19. package/dist-web/app.js +496 -484
  20. package/package.json +4 -2
  21. package/plugins/AGENTS.md +4 -3
  22. package/plugins/session-manager-dev/hooks/hooks.json +15 -0
  23. package/plugins/session-manager-dev/hooks/residue-check.cjs +241 -0
  24. package/plugins/session-manager-dev/skills/builder/SKILL.md +4 -2
  25. package/plugins/session-manager-dev/skills/develop/SKILL.md +55 -18
  26. package/plugins/session-manager-dev/skills/develop/standards.md +3 -2
  27. package/scripts/README.md +1 -0
  28. package/scripts/hooks/guard-tool-risk.cjs +5 -1
  29. package/scripts/hooks/lib/guard-tool-risk-policy.cjs +158 -1
  30. package/scripts/scheduler-mcp-server.cjs +737 -110
  31. package/src/main/adminRouteRegistry.cjs +59 -0
  32. package/src/main/agentLibrary.cjs +72 -4
  33. package/src/main/agentsIpc.cjs +3 -2
  34. package/src/main/build-info.json +4 -4
  35. package/src/main/chatRunner.cjs +231 -16
  36. package/src/main/config.cjs +30 -0
  37. package/src/main/docEdit.cjs +4 -2
  38. package/src/main/health.cjs +91 -0
  39. package/src/main/index.cjs +98 -48
  40. package/src/main/ipcSchemas.cjs +171 -8
  41. package/src/main/lib/AGENTS.md +1 -1
  42. package/src/main/lib/chatBootRecovery.cjs +2 -0
  43. package/src/main/lib/claude/agentModelResolve.cjs +51 -25
  44. package/src/main/lib/claude/agentSnapshot.cjs +186 -0
  45. package/src/main/lib/claude/environmentProfiles.cjs +242 -0
  46. package/src/main/lib/claude/jobSandboxPolicy.cjs +241 -33
  47. package/src/main/lib/claude/personaToolScope.cjs +82 -31
  48. package/src/main/lib/claude/runClaudeP.cjs +4 -2
  49. package/src/main/lib/claude/toolRiskMarks.cjs +41 -1
  50. package/src/main/lib/claude/usageCircuit.cjs +49 -21
  51. package/src/main/lib/claude/vaultRefs.cjs +277 -0
  52. package/src/main/lib/demo-video-kit/capture.cjs +282 -12
  53. package/src/main/lib/demo-video-kit/cast.md +43 -0
  54. package/src/main/lib/demo-video-kit/character.cjs +722 -30
  55. package/src/main/lib/demo-video-kit/checks.cjs +120 -1
  56. package/src/main/lib/demo-video-kit/export.cjs +218 -0
  57. package/src/main/lib/demo-video-kit/frames.cjs +104 -9
  58. package/src/main/lib/demo-video-kit/kind-marketing.md +121 -0
  59. package/src/main/lib/demo-video-kit/kind-tiktok.md +99 -0
  60. package/src/main/lib/demo-video-kit/kokoroSay.cjs +205 -0
  61. package/src/main/lib/demo-video-kit/project-home-html.md +43 -0
  62. package/src/main/lib/demo-video-kit/resumableRun.cjs +298 -0
  63. package/src/main/lib/demo-video-kit/seedKit.cjs +3 -3
  64. package/src/main/lib/demo-video-kit/voiceLane.cjs +233 -0
  65. package/src/main/lib/demo-video-kit/voiceLibrary.cjs +312 -0
  66. package/src/main/lib/epic/artifactAdminRoutes.cjs +211 -0
  67. package/src/main/lib/epic/artifactIpc.cjs +153 -0
  68. package/src/main/lib/epic/artifactNotice.cjs +72 -0
  69. package/src/main/lib/epic/artifactRetention.cjs +310 -0
  70. package/src/main/lib/epic/artifactStore.cjs +392 -0
  71. package/src/main/lib/epic/delegationReadiness.cjs +76 -2
  72. package/src/main/lib/epic/epicAgentRefresh.cjs +97 -0
  73. package/src/main/lib/epic/epicEventLog.cjs +214 -0
  74. package/src/main/lib/epic/epicMint.cjs +43 -1
  75. package/src/main/lib/epic/epicOutsideRead.cjs +1 -0
  76. package/src/main/lib/epic/epicOutsideState.cjs +18 -4
  77. package/src/main/lib/epic/epicPurge.cjs +347 -0
  78. package/src/main/lib/epic/epicReopen.cjs +5 -2
  79. package/src/main/lib/epic/epicSettle.cjs +4 -13
  80. package/src/main/lib/epic/epicSpawnPlan.cjs +57 -4
  81. package/src/main/lib/epic/epicStatusMirror.cjs +34 -1
  82. package/src/main/lib/epic/epicTransitions.cjs +139 -0
  83. package/src/main/lib/epic/epicValidationHook.cjs +81 -2
  84. package/src/main/lib/epic/guardSpawnSettings.cjs +3 -2
  85. package/src/main/lib/externalContract.cjs +37 -4
  86. package/src/main/lib/feedback-remote/crossProjectReply.cjs +389 -126
  87. package/src/main/lib/feedback-remote/customerFeedbackAdminRoutes.cjs +16 -3
  88. package/src/main/lib/feedback-remote/customerFeedbackClient.cjs +11 -6
  89. package/src/main/lib/feedback-remote/customerFeedbackInbox.cjs +26 -1
  90. package/src/main/lib/feedback-remote/customerFeedbackIpc.cjs +5 -2
  91. package/src/main/lib/feedback-remote/feedbackBoxDrain.cjs +409 -0
  92. package/src/main/lib/feedback-remote/feedbackBoxKeys.cjs +218 -0
  93. package/src/main/lib/feedback-remote/feedbackEnvelope.cjs +163 -0
  94. package/src/main/lib/feedback-remote/feedbackRelayClient.cjs +164 -0
  95. package/src/main/lib/feedback-remote/feedbackReport.cjs +234 -0
  96. package/src/main/lib/feedback-remote/feedbackSeal.cjs +217 -0
  97. package/src/main/lib/feedback-remote/localAdminHttp.cjs +108 -2
  98. package/src/main/lib/feedback-remote/macroAdminRoutes.cjs +2 -1
  99. package/src/main/lib/feedback-remote/needsYouIpc.cjs +17 -0
  100. package/src/main/lib/feedback-remote/needsYouStore.cjs +177 -6
  101. package/src/main/lib/feedback-remote/pendingReplies.cjs +189 -0
  102. package/src/main/lib/feedback-remote/projectHomeAdminRoutes.cjs +188 -10
  103. package/src/main/lib/feedback-remote/serviceClient.cjs +429 -0
  104. package/src/main/lib/feedback-remote/serviceMcpSession.cjs +252 -0
  105. package/src/main/lib/feedback-remote/serviceMcpTools.cjs +284 -0
  106. package/src/main/lib/feedback-remote/servicePairings.cjs +313 -0
  107. package/src/main/lib/feedback-remote/serviceStdioBridge.cjs +290 -0
  108. package/src/main/lib/feedback-remote/siteFeedbackAdminRoutes.cjs +295 -0
  109. package/src/main/lib/feedback-remote/siteFeedbackInbox.cjs +598 -0
  110. package/src/main/lib/feedback-remote/siteFeedbackIpc.cjs +86 -0
  111. package/src/main/lib/feedback-remote/siteFeedbackService.cjs +477 -0
  112. package/src/main/lib/git/worktreeDeps.cjs +77 -2
  113. package/src/main/lib/mcpToolCatalog.cjs +315 -30
  114. package/src/main/lib/opsOwnership.cjs +29 -1
  115. package/src/main/lib/opsRetentionSettings.cjs +27 -5
  116. package/src/main/lib/persona-macro/builtinMacros.cjs +7 -2
  117. package/src/main/lib/persona-macro/macroJobDispatch.cjs +52 -8
  118. package/src/main/lib/persona-macro/macroJobIpc.cjs +16 -6
  119. package/src/main/lib/persona-macro/macroLibrary.cjs +49 -7
  120. package/src/main/lib/persona-macro/personaFrontmatterSchema.cjs +83 -0
  121. package/src/main/lib/persona-macro/projectVideoToolCheck.cjs +3 -0
  122. package/src/main/lib/persona-macro/shippedPersonaSeeds.cjs +263 -0
  123. package/src/main/lib/phaseProjection.cjs +103 -0
  124. package/src/main/lib/prd/depSlugResolve.cjs +4 -13
  125. package/src/main/lib/prd/prdBodyPatch.cjs +12 -17
  126. package/src/main/lib/prd/prdCreate.cjs +67 -5
  127. package/src/main/lib/prd/prdCriteria.cjs +225 -0
  128. package/src/main/lib/prd/prdFrontmatter.cjs +68 -3
  129. package/src/main/lib/prd/prdGateFiles.cjs +125 -49
  130. package/src/main/lib/prd/prdSizing.cjs +3 -1
  131. package/src/main/lib/process/cleanEnv.cjs +52 -1
  132. package/src/main/lib/process/leftoverRenice.cjs +178 -0
  133. package/src/main/lib/process/memoryScope.cjs +31 -3
  134. package/src/main/lib/project-pages/pagesLibrary.cjs +72 -6
  135. package/src/main/lib/project-pages/videoReviewIpc.cjs +3 -2
  136. package/src/main/lib/project-pages/voiceAdminRoutes.cjs +175 -0
  137. package/src/main/lib/project-pages/voicePreview.cjs +196 -0
  138. package/src/main/lib/project-pages/voicesIpc.cjs +186 -0
  139. package/src/main/lib/promptSessionSchema.cjs +6 -0
  140. package/src/main/lib/scheduler/cancelledRow.cjs +57 -0
  141. package/src/main/lib/scheduler/cpuSample.cjs +133 -42
  142. package/src/main/lib/scheduler/criteriaChecks.cjs +169 -0
  143. package/src/main/lib/scheduler/definitionOfDone.cjs +44 -5
  144. package/src/main/lib/scheduler/jobMemoryStats.cjs +313 -0
  145. package/src/main/lib/scheduler/loadGate.cjs +82 -4
  146. package/src/main/lib/scheduler/planRecordHarvest.cjs +32 -2
  147. package/src/main/lib/scheduler/prdOutcomeRecord.cjs +133 -0
  148. package/src/main/lib/scheduler/preflightCheck.cjs +97 -0
  149. package/src/main/lib/scheduler/reviewNotice.cjs +39 -0
  150. package/src/main/lib/scheduler/runLogRetention.cjs +42 -1
  151. package/src/main/lib/scheduler/scheduleJobSchema.cjs +5 -0
  152. package/src/main/lib/scheduler/scheduleJobTransitions.cjs +47 -0
  153. package/src/main/lib/scheduler/schedulerConfig.cjs +47 -0
  154. package/src/main/lib/scheduler/schedulerPaths.cjs +0 -3
  155. package/src/main/lib/scheduler/schedulerRuntimeState.cjs +50 -1
  156. package/src/main/lib/scheduler/sessionSlots.cjs +5 -1
  157. package/src/main/lib/scheduler/slotsRoute.cjs +237 -0
  158. package/src/main/lib/scheduler/toolClearance.cjs +258 -0
  159. package/src/main/lib/scheduler/validatorVerdictSchema.cjs +140 -10
  160. package/src/main/lib/tasks/memoryConsolidation.cjs +300 -0
  161. package/src/main/lib/tasks/mitigationReview.cjs +294 -0
  162. package/src/main/lib/tasks/taskAdminRoutes.cjs +312 -22
  163. package/src/main/lib/tasks/taskIpc.cjs +22 -18
  164. package/src/main/lib/tasks/taskLedger.cjs +147 -25
  165. package/src/main/lib/tasks/taskRun.cjs +186 -17
  166. package/src/main/lib/tasks/taskSwitch.cjs +85 -12
  167. package/src/main/lib/tasks/taskSwitchRoute.cjs +172 -0
  168. package/src/main/lib/telemetry/auditEvents.cjs +207 -6
  169. package/src/main/lib/telemetry/eventsAdminRoutes.cjs +198 -6
  170. package/src/main/lib/telemetry/webhookDelivery.cjs +205 -0
  171. package/src/main/lib/telemetry/webhookRegistry.cjs +281 -0
  172. package/src/main/lib/toolUseClassify.cjs +181 -0
  173. package/src/main/lib/util/smfileRange.cjs +77 -0
  174. package/src/main/projectPages.cjs +3 -1
  175. package/src/main/promptSessionEvents.cjs +5 -0
  176. package/src/main/pty.cjs +68 -0
  177. package/src/main/queueOps.cjs +32 -13
  178. package/src/main/runVerify.cjs +74 -9
  179. package/src/main/scheduler/AGENTS.md +1 -0
  180. package/src/main/scheduler/budget.cjs +6 -5
  181. package/src/main/scheduler/prdParser.cjs +62 -14
  182. package/src/main/scheduler/reviewLadder.cjs +45 -28
  183. package/src/main/scheduler/starvation.cjs +69 -0
  184. package/src/main/scheduler/utilizationHold.cjs +101 -0
  185. package/src/main/scheduler.cjs +1745 -210
  186. package/src/main/templates/PRD_AUTHORING.md +13 -2
  187. package/src/main/webRemote.cjs +463 -6
  188. package/src/preload/api.d.ts +529 -38
  189. package/src/preload/apiSurface.json +209 -7
  190. package/src/preload/index.cjs +46 -1
  191. package/src/seed/agents/architect.md +6 -1
  192. package/src/seed/agents/blender-artist.md +2 -1
  193. package/src/seed/agents/competitive-analyst.md +3 -1
  194. package/src/seed/agents/competitive-researcher.md +2 -1
  195. package/src/seed/agents/demo-video-builder.md +87 -83
  196. package/src/seed/agents/dev-lead.md +3 -3
  197. package/src/seed/agents/project-home-builder.md +9 -31
  198. package/src/seed/agents/validator.md +9 -10
  199. package/dist/assets/AppSettings-CMFEM68R.js +0 -2
  200. package/dist/assets/HomeClaudeConfig-ijEXs--3.js +0 -3
  201. package/dist/assets/Scheduler-YT3j8SUa.js +0 -16
  202. package/dist/assets/ViewTabs-B7qLXRAH.js +0 -1
  203. package/dist/assets/index-CtxruO1L.js +0 -3121
  204. package/src/main/lib/epic/epicStateWatcher.cjs +0 -157
@@ -87,6 +87,18 @@ const SHIPPED_PERSONA_SEEDS = deepFreeze({
87
87
  tools: "Read, Grep, Glob, Bash, Edit, Write",
88
88
  },
89
89
  },
90
+ {
91
+ commit: "3861-finish-whole-job",
92
+ bodySha256: "c769191b123d30ab967e89066171e3ff73bb90b3fc403c0939bb3a5c394304a1",
93
+ fm: {
94
+ description: "The primary Actor for an Epic's whole interactive conversation — owns overall plan and decomposition, clarifies scope, searches before building, decomposes work into scheduled PRDs via /develop, tracks them to completion, and verifies before calling anything done. Never implements a PRD itself — that's dev-lead's job, one PRD at a time, headless. Task-type framing is the Epic's Mission tag's job, not this persona's.",
95
+ model: "opus",
96
+ effort: "medium",
97
+ tags: "feature, bug, discussion, art",
98
+ title: "Engineering — Architect",
99
+ tools: "Read, Grep, Glob, Bash, Edit, Write",
100
+ },
101
+ },
90
102
  ],
91
103
  "dev-lead": [
92
104
  {
@@ -195,6 +207,30 @@ const SHIPPED_PERSONA_SEEDS = deepFreeze({
195
207
  tools: "Read, Grep, Glob, Bash, Edit, Write",
196
208
  },
197
209
  },
210
+ {
211
+ "commit": "mm-registry",
212
+ "bodySha256": "049f6a9a8578638dd426defd430ba481e1aea9073241ff0ee2b0e094924e3086",
213
+ "fm": {
214
+ "description": "Executes exactly one already-scoped PRD at a time, headless, start to finish — reads the PRD's Goal/Acceptance Criteria/Implementation notes and standards.md, implements it, verifies against its own AC, and reports. Has no visibility into the overall plan — that's architect's job. This is the default persona a scheduled PRD runs as: the scheduler resolves a PRD's `agentType` frontmatter field (default `dev-lead`) to this file and launches the headless executor AS this persona via `--append-system-prompt`.",
215
+ "effort": "medium",
216
+ "executorOnly": "true",
217
+ "model": "sonnet",
218
+ "title": "Engineering — Software Engineer",
219
+ "tools": "Read, Grep, Glob, Bash, Edit, Write"
220
+ }
221
+ },
222
+ {
223
+ commit: "followup-commit-trailers",
224
+ bodySha256: "ca65b05026e3d9f603c5a6efeb0d456686d4413089080ad7596cb9f051162646",
225
+ fm: {
226
+ description: "Executes exactly one already-scoped PRD at a time, headless, start to finish — reads the PRD's Goal/Acceptance Criteria/Implementation notes and standards.md, implements it, verifies against its own AC, and reports. Has no visibility into the overall plan — that's architect's job. This is the default persona a scheduled PRD runs as: the scheduler resolves a PRD's `agentType` frontmatter field (default `dev-lead`) to this file and launches the headless executor AS this persona via `--append-system-prompt`.",
227
+ effort: "medium",
228
+ executorOnly: "true",
229
+ model: "sonnet",
230
+ title: "Engineering — Software Engineer",
231
+ tools: "Read, Grep, Glob, Bash, Edit, Write",
232
+ },
233
+ },
198
234
  ],
199
235
  "project-home-builder": [
200
236
  // Not from src/seed git history: this body was written to ~/.claude/agents by this repo's own
@@ -282,6 +318,30 @@ const SHIPPED_PERSONA_SEEDS = deepFreeze({
282
318
  effort: "medium",
283
319
  },
284
320
  },
321
+ {
322
+ commit: "seed-v7",
323
+ bodySha256: "69890c9b83fb8f2f3a10ab2e0b6a932c3f86be9d7c1d40276113d08fc4d5ba28",
324
+ fm: {
325
+ description: "Reads a project and writes ONE Knowledge Page (Overview by default, or How it works, FAQ, or a custom topic) for its Project Home tab, then saves it with a single project_page_write call.",
326
+ tools: "Read, Grep, Glob, Bash, Write, Edit, mcp__session-manager-scheduler__project_home_write, mcp__session-manager-scheduler__project_page_write",
327
+ mcpServers: "session-manager-scheduler",
328
+ title: "Project Home — Builder",
329
+ model: "sonnet",
330
+ effort: "medium",
331
+ },
332
+ },
333
+ {
334
+ commit: "seed-v8",
335
+ bodySha256: "05dce94b324b8df98e74121fd1156d7b35dad78e92261275d81ba7bf5ee890c0",
336
+ fm: {
337
+ description: "Reads a project and writes ONE Knowledge Page (Overview by default, or How it works, FAQ, or a custom topic) for its Project Home tab, then saves it with a single project_page_write call.",
338
+ tools: "Read, Grep, Glob, Bash, Write, Edit, mcp__session-manager-scheduler__project_home_write, mcp__session-manager-scheduler__project_page_write",
339
+ mcpServers: "session-manager-scheduler",
340
+ title: "Project Home — Builder",
341
+ model: "sonnet",
342
+ effort: "medium",
343
+ },
344
+ },
285
345
  ],
286
346
  "validator": [
287
347
  {
@@ -388,6 +448,50 @@ const SHIPPED_PERSONA_SEEDS = deepFreeze({
388
448
  tools: "Read, Grep, Glob, Bash",
389
449
  },
390
450
  },
451
+ {
452
+ "commit": "mm-registry",
453
+ "bodySha256": "85760d6b48408f97271c21b7eb5bee51a866265a34a2f4ea8578fa99b2fcd533",
454
+ "fm": {
455
+ "description": "Validates a finished PLAN (the PRDs its validate PRD lists) once, after its last PRD lands — re-runs each PRD's gate, checks every acceptance criterion against the real tree, reviews the plan's combined diff, and reports one VERIFIED/REFUTED verdict per PRD as checked JSON (the CLI enforces the schema). Runs headless as a scheduled PRD (agentType: validator); never edits product code and never queues work.",
456
+ "executorOnly": "true",
457
+ "model": "sonnet",
458
+ "title": "Engineering — Plan Validator",
459
+ "tools": "Read, Grep, Glob, Bash"
460
+ }
461
+ },
462
+ {
463
+ commit: "validator-verdict-criteria",
464
+ bodySha256: "e61b8d66ca07b7edd96bb16b0721f2afa1b7626a432d2528dacc1bfd80ae3c71",
465
+ fm: {
466
+ description: "Validates a finished PLAN (the PRDs its validate PRD lists) once, after its last PRD lands — re-runs each PRD's gate, checks every acceptance criterion against the real tree, reviews the plan's combined diff, and reports one VERIFIED/REFUTED verdict per PRD as checked JSON (the CLI enforces the schema). Runs headless as a scheduled PRD (agentType: validator); never edits product code and never queues work.",
467
+ executorOnly: "true",
468
+ model: "sonnet",
469
+ title: "Engineering — Plan Validator",
470
+ tools: "Read, Grep, Glob, Bash",
471
+ },
472
+ },
473
+ {
474
+ commit: "validator-self-review-only",
475
+ bodySha256: "8177df9ecd027d28ad91f353fd1786076515fcc187d6ce98178af3b5047835c4",
476
+ fm: {
477
+ description: "Validates a finished PLAN (the PRDs its validate PRD lists) once, after its last PRD lands — re-runs each PRD's gate, checks every acceptance criterion against the real tree, reviews the plan's combined diff, and reports one VERIFIED/REFUTED verdict per PRD as checked JSON (the CLI enforces the schema). Runs headless as a scheduled PRD (agentType: validator); never edits product code and never queues work.",
478
+ executorOnly: "true",
479
+ model: "sonnet",
480
+ title: "Engineering — Plan Validator",
481
+ tools: "Read, Grep, Glob, Bash",
482
+ },
483
+ },
484
+ {
485
+ commit: "validator-reads-followup-trailers",
486
+ bodySha256: "55c48dee7ee34391b369abb2998c4be5008738f9df5e803623e38ade0de03977",
487
+ fm: {
488
+ description: "Validates a finished PLAN (the PRDs its validate PRD lists) once, after its last PRD lands — re-runs each PRD's gate, checks every acceptance criterion against the real tree, reviews the plan's combined diff, and reports one VERIFIED/REFUTED verdict per PRD as checked JSON (the CLI enforces the schema). Runs headless as a scheduled PRD (agentType: validator); never edits product code and never queues work.",
489
+ executorOnly: "true",
490
+ model: "sonnet",
491
+ title: "Engineering — Plan Validator",
492
+ tools: "Read, Grep, Glob, Bash",
493
+ },
494
+ },
391
495
  ],
392
496
  "demo-video-builder": [
393
497
  {
@@ -577,6 +681,112 @@ const SHIPPED_PERSONA_SEEDS = deepFreeze({
577
681
  effort: "max",
578
682
  },
579
683
  },
684
+ {
685
+ commit: "seed-v15",
686
+ bodySha256: "b75f3f3bb195fef2b6c451fd6e20c54132764bff4d11253371b948fab4396a5f",
687
+ fm: {
688
+ description: "30-second or 1-minute self-contained HTML/JS demo video for Project Home, saved via project_video_write.",
689
+ tools: "Read, Grep, Glob, Bash, Write, Edit, mcp__session-manager-scheduler__project_demo_video_write, mcp__session-manager-scheduler__project_video_write, mcp__session-manager-scheduler__project_character_write, mcp__session-manager-scheduler__project_video_review_write",
690
+ title: "Project Home — Demo Video",
691
+ model: "opus",
692
+ effort: "max",
693
+ },
694
+ },
695
+ {
696
+ "commit": "mm-registry",
697
+ "bodySha256": "a8e9aaeef7efa62c9efaa3b0338b593516bd75e139058db5dd5cf0082c9e4c12",
698
+ "fm": {
699
+ "description": "30-second or 1-minute self-contained HTML/JS demo video for Project Home, saved via project_video_write.",
700
+ "effort": "max",
701
+ "model": "opus",
702
+ "title": "Project Home — Demo Video",
703
+ "tools": "Read, Grep, Glob, Bash, Write, Edit, mcp__session-manager-scheduler__project_demo_video_write, mcp__session-manager-scheduler__project_video_write, mcp__session-manager-scheduler__project_character_write, mcp__session-manager-scheduler__project_video_review_write"
704
+ }
705
+ },
706
+ {
707
+ commit: "seed-v17",
708
+ bodySha256: "a8e9aaeef7efa62c9efaa3b0338b593516bd75e139058db5dd5cf0082c9e4c12",
709
+ fm: {
710
+ description: "30-second or 1-minute self-contained HTML/JS demo video for Project Home, saved via project_video_write.",
711
+ tools: "Read, Grep, Glob, Bash, Write, Edit, mcp__session-manager-scheduler__project_demo_video_write, mcp__session-manager-scheduler__project_video_write, mcp__session-manager-scheduler__project_character_write, mcp__session-manager-scheduler__project_video_review_write",
712
+ mcpServers: "session-manager-scheduler",
713
+ title: "Project Home — Demo Video",
714
+ model: "opus",
715
+ effort: "max",
716
+ },
717
+ },
718
+ {
719
+ commit: "seed-v18",
720
+ bodySha256: "282b99ac85c30ba6c6075597732cb212e9f1e70d8970643a2a270efe36d5a03d",
721
+ fm: {
722
+ description: "30-second or 1-minute self-contained HTML/JS demo video for Project Home, saved via project_video_write.",
723
+ tools: "Read, Grep, Glob, Bash, Write, Edit, mcp__session-manager-scheduler__project_demo_video_write, mcp__session-manager-scheduler__project_video_write, mcp__session-manager-scheduler__project_character_write, mcp__session-manager-scheduler__project_video_review_write, mcp__session-manager-scheduler__project_video_outcome_write",
724
+ mcpServers: "session-manager-scheduler",
725
+ title: "Project Home — Demo Video",
726
+ model: "opus",
727
+ effort: "max",
728
+ },
729
+ },
730
+ {
731
+ commit: "seed-v19",
732
+ bodySha256: "a6478eea07eaac1665847e08ae1f42bdb0d7b8bddfbcfc491d29ea842771602f",
733
+ fm: {
734
+ description: "30-second or 1-minute self-contained HTML/JS demo video for Project Home, saved via project_video_write.",
735
+ tools: "Read, Grep, Glob, Bash, Write, Edit, mcp__session-manager-scheduler__project_demo_video_write, mcp__session-manager-scheduler__project_video_write, mcp__session-manager-scheduler__project_character_write, mcp__session-manager-scheduler__project_video_review_write, mcp__session-manager-scheduler__project_video_outcome_write",
736
+ mcpServers: "session-manager-scheduler",
737
+ title: "Project Home — Demo Video",
738
+ model: "opus",
739
+ effort: "max",
740
+ },
741
+ },
742
+ {
743
+ commit: "seed-v20",
744
+ bodySha256: "1ec4facff8cf740f57313ffca32fc0abd1dce7438c2642097b530f5b2ed48d0b",
745
+ fm: {
746
+ description: "30-second or 1-minute self-contained HTML/JS demo video for Project Home, saved via project_video_write.",
747
+ tools: "Read, Grep, Glob, Bash, Write, Edit, mcp__session-manager-scheduler__project_demo_video_write, mcp__session-manager-scheduler__project_video_write, mcp__session-manager-scheduler__project_character_write, mcp__session-manager-scheduler__project_video_review_write, mcp__session-manager-scheduler__project_video_outcome_write",
748
+ mcpServers: "session-manager-scheduler",
749
+ title: "Project Home — Demo Video",
750
+ model: "opus",
751
+ effort: "max",
752
+ },
753
+ },
754
+ {
755
+ commit: "seed-v21",
756
+ bodySha256: "f8bd1686767fe0105211d59d48ce5676fa40d0948eb2a496080b57534965ed76",
757
+ fm: {
758
+ description: "30-second or 1-minute self-contained HTML/JS demo video for Project Home, saved via project_video_write.",
759
+ tools: "Read, Grep, Glob, Bash, Write, Edit, mcp__session-manager-scheduler__project_demo_video_write, mcp__session-manager-scheduler__project_video_write, mcp__session-manager-scheduler__project_character_write, mcp__session-manager-scheduler__project_video_review_write, mcp__session-manager-scheduler__project_video_outcome_write",
760
+ mcpServers: "session-manager-scheduler",
761
+ title: "Project Home — Demo Video",
762
+ model: "opus",
763
+ effort: "max",
764
+ },
765
+ },
766
+ {
767
+ commit: "seed-v22",
768
+ bodySha256: "5401a01bcc363cae894655faa613119193e432e28641f8bf4004be3b6b7a8c49",
769
+ fm: {
770
+ description: "30-second or 1-minute self-contained HTML/JS demo video for Project Home, saved via project_video_write.",
771
+ tools: "Read, Grep, Glob, Bash, Write, Edit, mcp__session-manager-scheduler__project_demo_video_write, mcp__session-manager-scheduler__project_video_write, mcp__session-manager-scheduler__project_character_write, mcp__session-manager-scheduler__project_video_review_write, mcp__session-manager-scheduler__project_video_outcome_write",
772
+ mcpServers: "session-manager-scheduler",
773
+ title: "Project Home — Demo Video",
774
+ model: "opus",
775
+ effort: "max",
776
+ },
777
+ },
778
+ {
779
+ commit: "seed-v23",
780
+ bodySha256: "a2a8606a00002f7836fcf680206d37153dd2c31dd7528389402485d0b4e02fb0",
781
+ fm: {
782
+ description: "30-second or 1-minute self-contained HTML/JS demo video for Project Home, saved via project_video_write.",
783
+ tools: "Read, Grep, Glob, Bash, Write, Edit, mcp__session-manager-scheduler__project_demo_video_write, mcp__session-manager-scheduler__project_video_write, mcp__session-manager-scheduler__project_character_write, mcp__session-manager-scheduler__project_video_review_write, mcp__session-manager-scheduler__project_video_outcome_write",
784
+ mcpServers: "session-manager-scheduler",
785
+ title: "Project Home — Demo Video",
786
+ model: "opus",
787
+ effort: "max",
788
+ },
789
+ },
580
790
  ],
581
791
  "blender-artist": [
582
792
  {
@@ -592,6 +802,20 @@ const SHIPPED_PERSONA_SEEDS = deepFreeze({
592
802
  executorOnly: "true",
593
803
  },
594
804
  },
805
+ {
806
+ commit: "seed-v2",
807
+ bodySha256: "9cc52c7a1e35f81a158cccfd6b05974ed7a95e23cb98666c8f68dab54c9a6b5a",
808
+ fm: {
809
+ description: "Expert 3D character artist for games — modeling, rigging, skinning, shape keys and keyframe animation in Blender, driven headlessly through Blender's Python API and the Blender MCP, verified in-engine with the Godot CLI. Executes exactly one already-scoped art PRD at a time (the dev-lead equivalent for 3D assets). Use for any change whose source of truth is a .blend file.",
810
+ tools: "Read, Grep, Glob, Bash, Edit, Write, mcp__blender__execute_blender_code_for_cli, mcp__blender__get_blendfile_summary_datablocks_for_cli, mcp__blender__get_blendfile_summary_usage_guess_for_cli, mcp__blender__get_blendfile_summary_missing_files_for_cli, mcp__blender__get_python_api_docs, mcp__blender__search_api_docs, mcp__blender__search_manual_docs, mcp__blender__render_thumbnail_to_path, mcp__blender__render_viewport_to_path, mcp__blender__execute_blender_code, mcp__blender__get_objects_summary, mcp__blender__get_object_detail_summary, mcp__blender__get_screenshot_of_area_as_image",
811
+ mcpServers: "blender",
812
+ model: "opus",
813
+ effort: "high",
814
+ tags: "art",
815
+ title: "Games — 3D Character Artist (Blender)",
816
+ executorOnly: "true",
817
+ },
818
+ },
595
819
  ],
596
820
  "competitive-researcher": [
597
821
  {
@@ -605,6 +829,18 @@ const SHIPPED_PERSONA_SEEDS = deepFreeze({
605
829
  effort: "low",
606
830
  },
607
831
  },
832
+ {
833
+ commit: "seed-v2",
834
+ bodySha256: "4c6df5cb5a6486ea507fd6f985f324c9bd2557f1aed50ebd30dd666662267fda",
835
+ fm: {
836
+ description: "The Haiku collector for the Competitor matrix — run as a subagent by competitive-analyst, it researches ONE product's official announcements, dev blogs, changelogs and docs plus what users rave about or ask for, and writes cited JSON findings to the path it is given.",
837
+ tools: "WebSearch, WebFetch, Read, Write",
838
+ title: "Research — Competitor collector",
839
+ model: "haiku",
840
+ effort: "low",
841
+ environment: "open-web",
842
+ },
843
+ },
608
844
  ],
609
845
  "competitive-analyst": [
610
846
  {
@@ -619,6 +855,33 @@ const SHIPPED_PERSONA_SEEDS = deepFreeze({
619
855
  tags: "project-home-builder",
620
856
  },
621
857
  },
858
+ {
859
+ commit: "seed-v2",
860
+ bodySha256: "8e72237e9b743bb8c26cc701d3ebd6c65212ebf777de37f9eb5f40aeaf224fae",
861
+ fm: {
862
+ description: "The Opus analyst and executor of the Competitor matrix macro — warm-starts from the saved matrix, settles 1..4 competitors, inventories this project's real features, fans out Haiku competitive-researcher subagents, then merges everything into a grouped feature matrix with sentiment and prioritized recommendations and saves it once with project_matrix_write.",
863
+ tools: "Read, Grep, Glob, Bash, Write, WebSearch, WebFetch, Agent, mcp__session-manager-scheduler__project_matrix_read, mcp__session-manager-scheduler__project_matrix_write",
864
+ mcpServers: "session-manager-scheduler",
865
+ title: "Research — Competitor analyst",
866
+ model: "opus",
867
+ effort: "high",
868
+ tags: "project-home-builder",
869
+ },
870
+ },
871
+ {
872
+ commit: "seed-v3",
873
+ bodySha256: "8e72237e9b743bb8c26cc701d3ebd6c65212ebf777de37f9eb5f40aeaf224fae",
874
+ fm: {
875
+ description: "The Opus analyst and executor of the Competitor matrix macro — warm-starts from the saved matrix, settles 1..4 competitors, inventories this project's real features, fans out Haiku competitive-researcher subagents, then merges everything into a grouped feature matrix with sentiment and prioritized recommendations and saves it once with project_matrix_write.",
876
+ tools: "Read, Grep, Glob, Bash, Write, WebSearch, WebFetch, Agent, mcp__session-manager-scheduler__project_matrix_read, mcp__session-manager-scheduler__project_matrix_write",
877
+ mcpServers: "session-manager-scheduler",
878
+ title: "Research — Competitor analyst",
879
+ model: "opus",
880
+ effort: "high",
881
+ tags: "project-home-builder",
882
+ environment: "open-web",
883
+ },
884
+ },
622
885
  ],
623
886
  });
624
887
 
@@ -0,0 +1,103 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * phaseProjection.cjs — one outside "phase" for every Epic, scheduler job and Task.
5
+ *
6
+ * Top-level in lib/ (not under epic/, scheduler/ or tasks/) because it spans
7
+ * all three domains: each has its own status vocabulary, and an outside
8
+ * reader needs ONE small answer to "is anything happening, and is it mine to
9
+ * act on?". Pure: no fs, no clock, no mutation.
10
+ *
11
+ * idle — nothing is running and nothing is asked of anyone
12
+ * running — work is in flight (or queued to run)
13
+ * rescheduling — something stopped and the scheduler's own recovery
14
+ * ladder is still working on it
15
+ * waiting_on_human — a real question is open, or the ladder gave up
16
+ * terminated — finished for good (done, skipped, cancelled, closed)
17
+ *
18
+ * Matches src/renderer/lib/needsHuman.ts: a needs_review park is the
19
+ * scheduler's job ("being fixed"), never the human's — UNTIL the ladder gives
20
+ * up. The ladder's give-up signal is the grouped review notice going out
21
+ * (reviewNotice.sentAt — sent only when the ladder fails or the hold window
22
+ * ends; lib/scheduler/reviewNotice.cjs), or a park the ladder never touches
23
+ * by design (verdict 'refire_capped', see scheduler/reviewLadder.cjs
24
+ * isRefireCapped). A run that asked a question (verdict 'needs_human') and an
25
+ * Epic chat with an open question (needs-input) are real questions.
26
+ */
27
+
28
+ const { isCancelledRow } = require('./scheduler/cancelledRow.cjs');
29
+
30
+ const PHASES = Object.freeze(['idle', 'running', 'rescheduling', 'waiting_on_human', 'terminated']);
31
+
32
+ /** Precedence when several jobs make up one Epic: the first match wins. */
33
+ const EPIC_PRECEDENCE = Object.freeze(['waiting_on_human', 'rescheduling', 'running']);
34
+
35
+ const isObj = (v) => v != null && typeof v === 'object';
36
+
37
+ /** True when a needs_review row is no longer the ladder's to fix. */
38
+ function ladderGaveUp(job) {
39
+ if (job.verifierVerdict === 'refire_capped') return true;
40
+ const n = isObj(job.reviewNotice) ? job.reviewNotice : null;
41
+ return !!(n && typeof n.sentAt === 'string' && n.sentAt);
42
+ }
43
+
44
+ /**
45
+ * @param {any} job a scheduler queue row (or any { status, ... } shape)
46
+ * @returns {'idle'|'running'|'rescheduling'|'waiting_on_human'|'terminated'}
47
+ */
48
+ function phaseOfJob(job) {
49
+ if (!isObj(job)) return 'idle';
50
+ const status = typeof job.status === 'string' ? job.status : '';
51
+ if (isCancelledRow(job)) return 'terminated';
52
+ switch (status) {
53
+ case 'pending': return 'idle';
54
+ case 'running': return 'running';
55
+ // An auto-fix investigation and a quarantine are both ladder rungs.
56
+ case 'investigating':
57
+ case 'quarantined': return 'rescheduling';
58
+ case 'failed': return ladderGaveUp(job) ? 'waiting_on_human' : 'rescheduling';
59
+ case 'needs_review':
60
+ if (job.verifierVerdict === 'needs_human') return 'waiting_on_human';
61
+ return ladderGaveUp(job) ? 'waiting_on_human' : 'rescheduling';
62
+ case 'completed':
63
+ case 'skipped': return 'terminated';
64
+ default: return 'idle';
65
+ }
66
+ }
67
+
68
+ /**
69
+ * @param {{ status?: string, needsInput?: boolean, chatBusy?: boolean, jobPhases?: string[], refuted?: number }} [args]
70
+ * status — the Epic's lifecycle status (proposed / active / completed)
71
+ * jobPhases — phaseOfJob of each of the Epic's known PRDs
72
+ * refuted — count of PRDs whose newest verdict is refuted (the Epic's
73
+ * automated turn queues their fix, so: rescheduling)
74
+ * @returns {'idle'|'running'|'rescheduling'|'waiting_on_human'|'terminated'}
75
+ */
76
+ function phaseOfEpic(args) {
77
+ const a = isObj(args) ? args : {};
78
+ if (a.status === 'completed') return 'terminated';
79
+ // A proposed Epic waits for a human to approve it.
80
+ if (a.status === 'proposed') return 'waiting_on_human';
81
+ if (a.needsInput === true && a.chatBusy !== true) return 'waiting_on_human';
82
+ const phases = Array.isArray(a.jobPhases) ? a.jobPhases : [];
83
+ if (phases.includes('waiting_on_human')) return 'waiting_on_human';
84
+ if (phases.includes('rescheduling') || (typeof a.refuted === 'number' && a.refuted > 0)) return 'rescheduling';
85
+ // A queued (idle) PRD inside an active Epic is work about to run.
86
+ if (a.chatBusy === true || phases.includes('running') || phases.includes('idle')) return 'running';
87
+ return 'idle';
88
+ }
89
+
90
+ /**
91
+ * @param {any} task a folded Task ledger row ({ status: 'running' | an end status })
92
+ * @returns {'idle'|'running'|'rescheduling'|'waiting_on_human'|'terminated'}
93
+ */
94
+ function phaseOfTask(task) {
95
+ const status = isObj(task) && typeof task.status === 'string' ? task.status : '';
96
+ if (!status) return 'idle';
97
+ if (status === 'running') return 'running';
98
+ // Every other Task status is a terminal end status (taskLedger.cjs
99
+ // TERMINAL_STATUSES); a Task is never retried by Session Manager.
100
+ return 'terminated';
101
+ }
102
+
103
+ module.exports = { PHASES, EPIC_PRECEDENCE, phaseOfJob, phaseOfEpic, phaseOfTask };
@@ -16,6 +16,8 @@
16
16
  * record and Epic ordering on top of the same bare-name rule.
17
17
  */
18
18
 
19
+ const { isCancelledRow } = require('../scheduler/cancelledRow.cjs');
20
+
19
21
  /** Strip one leading `NN-` prefix, if present. */
20
22
  function bareSlug(slug) {
21
23
  return String(slug ?? '').replace(/^\d+-/, '');
@@ -86,17 +88,6 @@ function findNearMatches(depSlug, candidateSlugs, limit = 3) {
86
88
  .map((entry) => entry.slug);
87
89
  }
88
90
 
89
- /**
90
- * Was this row cancelled by a human (admin API cancel), rather than failing on
91
- * its own? scheduler.cjs's cancel handler stamps `cancelledAt` and an error
92
- * starting 'cancelled via admin API'; either marker counts.
93
- */
94
- function isCancelledRow(row) {
95
- if (!row) return false;
96
- if (typeof row.cancelledAt === 'string' ? row.cancelledAt.length > 0 : row.cancelledAt != null) return true;
97
- return typeof row.error === 'string' && row.error.startsWith('cancelled via admin API');
98
- }
99
-
100
91
  /** The Epic a queue row belongs to: `epicId`, else its `sourcePromptId`. */
101
92
  function epicOf(job) {
102
93
  return job?.epicId ?? job?.sourcePromptId ?? null;
@@ -125,7 +116,7 @@ function isPrefixedSlug(slug) {
125
116
  * dependent's Epic → 'row'
126
117
  * 5. bare dep: a satisfied record with that bare name → 'satisfied'
127
118
  * 6. → 'unresolved'
128
- * In steps 3-4 a cancelled row (isCancelledRow) is dropped when a satisfied
119
+ * In steps 3-4 a cancelled row (isCancelledRow, lib/scheduler/cancelledRow.cjs) is dropped when a satisfied
129
120
  * record shares its bare name — a human-cancelled duplicate must never freeze
130
121
  * the dependents of the PRD that genuinely finished (Self, 2026-11-22: the
131
122
  * cancelled 1056-sm-contract-client froze 16 dependents of the completed
@@ -183,5 +174,5 @@ function makeDepResolver(projectJobs, satisfiedSlugs = new Set(), opts = {}) {
183
174
  }
184
175
 
185
176
  module.exports = {
186
- bareSlug, resolveDepSlug, findNearMatches, isSatisfiedDepRow, isCancelledRow, epicOf, makeDepResolver,
177
+ bareSlug, resolveDepSlug, findNearMatches, isSatisfiedDepRow, epicOf, makeDepResolver,
187
178
  };
@@ -8,6 +8,7 @@
8
8
 
9
9
  const { validateGate, validateFiles, renderFilesSection, renderGateSection } = require('./prdGateFiles.cjs');
10
10
  const { resolveGate, parseChain, isNoneGate } = require('../scheduler/definitionOfDone.cjs');
11
+ const { validateCriteria, renderCriteriaLines } = require('./prdCriteria.cjs');
11
12
 
12
13
  const H_AC = '# Acceptance criteria';
13
14
  const H_FILES = '# Files';
@@ -58,8 +59,11 @@ function gateSignature(body) {
58
59
 
59
60
  /**
60
61
  * @param {string} body
61
- * @param {{gate?: string[], files?: string[], acceptanceCriteria?: string[]}} patch
62
- * @returns {{ok:true, body:string, warnings:string[]}|{ok:false, error:string}}
62
+ * @param {{gate?: string[], files?: string[], acceptanceCriteria?: unknown[], previousCriteria?: unknown}} patch
63
+ * acceptanceCriteria entries are strings or structured criteria (prdCriteria.cjs);
64
+ * previousCriteria (the PRD's frontmatter `criteria`) keeps ids stable.
65
+ * @returns {{ok:true, body:string, warnings:string[], criteria?: object[]}|{ok:false, error:string}}
66
+ * `criteria` (when acceptanceCriteria was patched) is what the caller writes to frontmatter.
63
67
  */
64
68
  function applyStructuredPrdPatch(body, patch) {
65
69
  if (typeof body !== 'string') return { ok: false, error: 'body must be a string.' };
@@ -87,21 +91,12 @@ function applyStructuredPrdPatch(body, patch) {
87
91
  if (!f.ok) return { ok: false, error: f.error };
88
92
  filesList = f.files;
89
93
  }
94
+ let criteria = null;
90
95
  if (hasAc) {
91
- const ac = patch.acceptanceCriteria;
92
- if (!Array.isArray(ac) || ac.length === 0) {
93
- return { ok: false, error: 'acceptanceCriteria must be a non-empty array of strings.' };
94
- }
95
- acLines = [];
96
- for (let i = 0; i < ac.length; i++) {
97
- if (typeof ac[i] !== 'string' || ac[i].trim() === '') {
98
- return { ok: false, error: `acceptanceCriteria entry ${i + 1}: must be a non-empty string.` };
99
- }
100
- if (/[\r\n]/.test(ac[i])) {
101
- return { ok: false, error: `acceptanceCriteria entry ${i + 1}: must not contain a newline.` };
102
- }
103
- acLines.push(`- [ ] ${ac[i].trim()}`);
104
- }
96
+ const cv = validateCriteria(patch.acceptanceCriteria, { previous: patch.previousCriteria });
97
+ if (!cv.ok) return { ok: false, error: `acceptanceCriteria: ${cv.error}` };
98
+ criteria = cv.criteria;
99
+ acLines = renderCriteriaLines(criteria);
105
100
  }
106
101
 
107
102
  const lines = body.split('\n');
@@ -132,7 +127,7 @@ function applyStructuredPrdPatch(body, patch) {
132
127
  return { ok: false, error: 'The patch would change how the scheduler reads the PRD gate (stray gate fence in the new text).' };
133
128
  }
134
129
 
135
- return { ok: true, body: next, warnings };
130
+ return criteria ? { ok: true, body: next, warnings, criteria } : { ok: true, body: next, warnings };
136
131
  }
137
132
 
138
133
  module.exports = { applyStructuredPrdPatch };