claude-code-session-manager 0.97.0 → 0.100.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.
- package/README.md +3 -3
- package/bin/cli.cjs +16 -4
- package/bin/node-floor.cjs +41 -0
- package/dist/assets/{DataModel-D93FoaOm.js → DataModel-HdR0AxFq.js} +1 -1
- package/dist/assets/{History-CXxxqNP1.js → History-Dr4Jr_5z.js} +2 -2
- package/dist/assets/{Hooks-CzeYFQjq.js → Hooks-NhrvH3JP.js} +3 -3
- package/dist/assets/{Library-D2zPkwOC.js → Library-Dv_EtIMr.js} +1 -1
- package/dist/assets/{MarkdownEditor-DbinP78A.js → MarkdownEditor-DTKDWV_n.js} +1 -1
- package/dist/assets/{McpServers-Bu_sVGLr.js → McpServers-M034G9B3.js} +2 -2
- package/dist/assets/{Memory-BgiI6LZ_.js → Memory-DzF1B4gx.js} +6 -6
- package/dist/assets/{Permissions-C1MMzZRm.js → Permissions-DrgbSGWl.js} +3 -3
- package/dist/assets/{Plugins-Dhu6wAZi.js → Plugins-Bd3ef35w.js} +2 -2
- package/dist/assets/{ProvenanceBadge-C3AcWKMG.js → ProvenanceBadge-DcBHT1Iy.js} +1 -1
- package/dist/assets/{SaveBar-plwYm0iO.js → SaveBar-rimJem-Y.js} +1 -1
- package/dist/assets/Scheduler-DjgFJl2w.js +16 -0
- package/dist/assets/{ScopeSwitcher-DFy0vv_o.js → ScopeSwitcher-CnAzTBrl.js} +1 -1
- package/dist/assets/Settings-Dc1F_sSg.js +3 -0
- package/dist/assets/{SkillReferenceGraph-DsI7hRPB.js → SkillReferenceGraph-B9aZDecM.js} +1 -1
- package/dist/assets/{Skills-3E748UfB.js → Skills-DRXd18gu.js} +2 -2
- package/dist/assets/{SystemPrompt-BqmfUJOd.js → SystemPrompt-ahy5-Fwe.js} +1 -1
- package/dist/assets/{TagLibrary-CPz6fO8Q.js → TagLibrary-C_tToDeL.js} +1 -1
- package/dist/assets/{TiptapBody-D9EoBQ1P.js → TiptapBody-DvdefS6K.js} +1 -1
- package/dist/assets/{Toggle-BHAmZNDn.js → Toggle-6Jl5Njc6.js} +1 -1
- package/dist/assets/{index-CKH5Uxik.css → index-Bta-hwud.css} +1 -1
- package/dist/assets/{index-tn5JIVPj.js → index-vx8O73l8.js} +497 -502
- package/dist/assets/{settingsSchema-Crqy_aNz.js → settingsSchema-D6iRguNV.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +26 -29
- package/plugins/CLAUDE.md +6 -6
- package/plugins/session-manager-dev/skills/builder/4-manual/SKILL.md +23 -19
- package/plugins/session-manager-dev/skills/builder/SKILL.md +3 -3
- package/plugins/session-manager-dev/skills/develop/SKILL.md +254 -510
- package/plugins/session-manager-dev/skills/develop/standards.md +17 -22
- package/scripts/README.md +3 -11
- package/scripts/audit-ops-hygiene.cjs +3 -3
- package/scripts/hooks/lib/guard-prd-writes-policy.cjs +1 -1
- package/scripts/hooks/lib/guard-self-schedule-policy.cjs +1 -1
- package/scripts/mint-epic.cjs +2 -3
- package/scripts/scheduler-mcp-server.cjs +36 -7
- package/src/main/agentLibrary.cjs +22 -2
- package/src/main/build-info.json +4 -4
- package/src/main/config.cjs +41 -38
- package/src/main/docEdit.cjs +4 -1
- package/src/main/files.cjs +2 -5
- package/src/main/health.cjs +1 -1
- package/src/main/index.cjs +23 -10
- package/src/main/ipcSchemas.cjs +28 -35
- package/src/main/lib/agentPersonaSchema.cjs +13 -2
- package/src/main/lib/atomicFs.cjs +116 -0
- package/src/main/lib/branchSweep.cjs +13 -12
- package/src/main/lib/buildTarget.cjs +3 -3
- package/src/main/lib/claudeCliCaps.cjs +129 -0
- package/src/main/lib/credentials.cjs +2 -4
- package/src/main/lib/crossProjectFeedback.cjs +3 -3
- package/src/main/lib/cwdClassify.cjs +15 -3
- package/src/main/lib/definitionOfDone.cjs +207 -125
- package/src/main/lib/dodDrainHook.cjs +11 -5
- package/src/main/lib/epicMint.cjs +2 -4
- package/src/main/lib/epicStatusMirror.cjs +8 -10
- package/src/main/lib/epicWorktreeProjectConfig.cjs +2 -4
- package/src/main/lib/gateAuthority.cjs +96 -0
- package/src/main/lib/gitExec.cjs +69 -0
- package/src/main/lib/gitWorktree.cjs +656 -92
- package/src/main/lib/instanceLock.cjs +5 -8
- package/src/main/lib/launchFailure.cjs +2 -3
- package/src/main/lib/macroLibrary.cjs +386 -0
- package/src/main/lib/mcpToolCatalog.cjs +26 -17
- package/src/main/lib/needsReviewLedger.cjs +1 -1
- package/src/main/lib/opsErrorLog.cjs +11 -1
- package/src/main/lib/opsOwnership.cjs +0 -5
- package/src/main/lib/pidAlive.cjs +32 -0
- package/src/main/lib/prdCreate.cjs +153 -19
- package/src/main/lib/prdDisposition.cjs +2 -2
- package/src/main/lib/prdGateFiles.cjs +284 -0
- package/src/main/lib/prdLocations.cjs +61 -0
- package/src/main/lib/prdMigration.cjs +2 -3
- package/src/main/lib/prdSizing.cjs +2 -1
- package/src/main/lib/promptSessionSchema.cjs +10 -2
- package/src/main/lib/rcaReport.cjs +4 -6
- package/src/main/lib/reaperHelpers.cjs +8 -1
- package/src/main/lib/reservationExpiry.cjs +6 -1
- package/src/main/lib/reviewNotice.cjs +263 -0
- package/src/main/lib/runClaudeP.cjs +4 -1
- package/src/main/lib/schedulerPaths.cjs +22 -2
- package/src/main/lib/sessionSlots.cjs +2 -4
- package/src/main/lib/shippedPersonaSeeds.cjs +179 -0
- package/src/main/lib/timeoutShim.cjs +123 -0
- package/src/main/lib/timeoutShimScript.cjs +275 -0
- package/src/main/lib/upgradeDrain.cjs +4 -10
- package/src/main/lib/watchdogHelpers.cjs +33 -30
- package/src/main/lib/workTypeLibrary.cjs +7 -1
- package/src/main/promptSessionEvents.cjs +37 -13
- package/src/main/queueOps.cjs +17 -6
- package/src/main/scheduler.cjs +975 -203
- package/src/main/seedAgentPersonas.cjs +278 -23
- package/src/main/supervisor.cjs +4 -1
- package/src/main/templates/PRD_AUTHORING.md +126 -406
- package/src/preload/__tests__/preload-surface.test.cjs +68 -0
- package/src/preload/api.d.ts +41 -94
- package/src/preload/index.cjs +14 -9
- package/src/seed/agents/architect.md +1 -0
- package/src/seed/agents/dev-lead.md +17 -18
- package/src/seed/agents/project-home-builder.md +1 -0
- package/src/seed/agents/validator.md +10 -4
- package/dist/assets/HostBilko-nESrTRIg.js +0 -1
- package/dist/assets/Scheduler-BVYTeh39.js +0 -16
- package/dist/assets/Settings-DIhGgdfs.js +0 -3
- package/src/main/__tests__/activeIndexMerge.test.cjs +0 -235
- package/src/main/__tests__/agentEffortResolve.test.cjs +0 -117
- package/src/main/__tests__/agentLibrary.test.cjs +0 -276
- package/src/main/__tests__/agentModelResolve.test.cjs +0 -311
- package/src/main/__tests__/agentOverlayWrite.test.cjs +0 -95
- package/src/main/__tests__/bilkoHost-deriveSlug.test.cjs +0 -26
- package/src/main/__tests__/bilkoHost-integration.test.cjs +0 -118
- package/src/main/__tests__/bilkoHostCore.test.cjs +0 -72
- package/src/main/__tests__/broadcastCoalescer.test.cjs +0 -122
- package/src/main/__tests__/chat-cancel-terminal.test.cjs +0 -120
- package/src/main/__tests__/chat-dead-channels.test.cjs +0 -63
- package/src/main/__tests__/chat-exit-close-race.test.cjs +0 -146
- package/src/main/__tests__/chat-mcp-consent-notice.test.cjs +0 -139
- package/src/main/__tests__/chat-preamble-anchors.test.cjs +0 -100
- package/src/main/__tests__/chat-queue.test.cjs +0 -97
- package/src/main/__tests__/chat-stop-signal.test.cjs +0 -89
- package/src/main/__tests__/chatRunner-epic-worktree-execcwd.test.cjs +0 -125
- package/src/main/__tests__/chatRunner-session-flag-retry.test.cjs +0 -252
- package/src/main/__tests__/classifyPromptTicket.test.cjs +0 -101
- package/src/main/__tests__/classifyTranscriptLine.test.cjs +0 -201
- package/src/main/__tests__/computeDepHistorySatisfaction.test.cjs +0 -66
- package/src/main/__tests__/config-readText-bounded.test.cjs +0 -84
- package/src/main/__tests__/configWriteBoundaryOwners.test.cjs +0 -59
- package/src/main/__tests__/crossProjectFeedback.test.cjs +0 -334
- package/src/main/__tests__/crossProjectFeedbackRoutes.test.cjs +0 -161
- package/src/main/__tests__/dep-orphan-archive-health.test.cjs +0 -77
- package/src/main/__tests__/develop-skill-failure-modes.test.cjs +0 -70
- package/src/main/__tests__/docEdit.test.cjs +0 -244
- package/src/main/__tests__/dod-batchkey.test.cjs +0 -183
- package/src/main/__tests__/dod-drain-hook.test.cjs +0 -302
- package/src/main/__tests__/dod-report.test.cjs +0 -304
- package/src/main/__tests__/dod-reverify.test.cjs +0 -285
- package/src/main/__tests__/epicContextDigest.test.cjs +0 -174
- package/src/main/__tests__/epicMint.test.cjs +0 -332
- package/src/main/__tests__/epicMintTelemetryTap.test.cjs +0 -64
- package/src/main/__tests__/epicStatusMirror.test.cjs +0 -110
- package/src/main/__tests__/epicValidationHook.test.cjs +0 -291
- package/src/main/__tests__/exchanges.test.cjs +0 -122
- package/src/main/__tests__/exchangesPromptId.test.cjs +0 -61
- package/src/main/__tests__/extractJson.test.cjs +0 -51
- package/src/main/__tests__/files-reject-credentials.test.cjs +0 -40
- package/src/main/__tests__/fixtures/1218-fo-01-move-scripts-lib-into-src-main-lib.log +0 -556
- package/src/main/__tests__/flatPrdTickSweep.test.cjs +0 -110
- package/src/main/__tests__/health-build-freshness.test.cjs +0 -39
- package/src/main/__tests__/health-claude-md-budget.test.cjs +0 -57
- package/src/main/__tests__/health-credentials.test.cjs +0 -81
- package/src/main/__tests__/health-delegation-chain.test.cjs +0 -124
- package/src/main/__tests__/health-per-project-stall.test.cjs +0 -84
- package/src/main/__tests__/health-prd-migration.test.cjs +0 -37
- package/src/main/__tests__/health-queue-dispatch.test.cjs +0 -135
- package/src/main/__tests__/health-starve-escalation.test.cjs +0 -94
- package/src/main/__tests__/health-tick-liveness.test.cjs +0 -179
- package/src/main/__tests__/health-usage-poller.test.cjs +0 -144
- package/src/main/__tests__/health-worktree-cap-blocked.test.cjs +0 -65
- package/src/main/__tests__/heapSnapshot.test.cjs +0 -121
- package/src/main/__tests__/historyAggregatorIntraday.test.cjs +0 -313
- package/src/main/__tests__/historyDashboard.test.cjs +0 -163
- package/src/main/__tests__/historyRollup.test.cjs +0 -333
- package/src/main/__tests__/intradayRefresh.test.cjs +0 -39
- package/src/main/__tests__/ipcSchemas-dependsOn.test.cjs +0 -39
- package/src/main/__tests__/kg-augment.test.cjs +0 -195
- package/src/main/__tests__/loadGateDetailTick.test.cjs +0 -31
- package/src/main/__tests__/machineProfile.test.cjs +0 -152
- package/src/main/__tests__/mcpStatus.test.cjs +0 -61
- package/src/main/__tests__/memoryAggregate.test.cjs +0 -109
- package/src/main/__tests__/memoryStale.test.cjs +0 -88
- package/src/main/__tests__/needsReviewLedger.test.cjs +0 -162
- package/src/main/__tests__/openExternalApp-spawn-error.test.cjs +0 -25
- package/src/main/__tests__/opsErrorLog.test.cjs +0 -109
- package/src/main/__tests__/opsErrorLogTelemetryTap.test.cjs +0 -173
- package/src/main/__tests__/personaMerge.test.cjs +0 -169
- package/src/main/__tests__/planValidator.test.cjs +0 -125
- package/src/main/__tests__/pollLoop-dispatch-on-failure.test.cjs +0 -176
- package/src/main/__tests__/prd-group-allocator.test.cjs +0 -119
- package/src/main/__tests__/prdAdminRouteParity.test.cjs +0 -70
- package/src/main/__tests__/prdAdminRoutes.test.cjs +0 -718
- package/src/main/__tests__/prdAgentType.test.cjs +0 -103
- package/src/main/__tests__/prdAuthoringSeed.test.cjs +0 -39
- package/src/main/__tests__/prdCreate.test.cjs +0 -979
- package/src/main/__tests__/prdCreateDisposition.test.cjs +0 -201
- package/src/main/__tests__/prdCreatePlanId.test.cjs +0 -132
- package/src/main/__tests__/prdFrontmatterAgentType.test.cjs +0 -117
- package/src/main/__tests__/prdFrontmatterDependsOn.test.cjs +0 -136
- package/src/main/__tests__/prdFrontmatterDisposition.test.cjs +0 -125
- package/src/main/__tests__/prdFrontmatterQuietMachine.test.cjs +0 -108
- package/src/main/__tests__/prdLocations.test.cjs +0 -195
- package/src/main/__tests__/prdLocationsArchived.test.cjs +0 -201
- package/src/main/__tests__/prdMigration.test.cjs +0 -349
- package/src/main/__tests__/prdMigrationLegacyAdopt.test.cjs +0 -91
- package/src/main/__tests__/prdParserHighWater.test.cjs +0 -74
- package/src/main/__tests__/prdParserSourcePromptId.test.cjs +0 -65
- package/src/main/__tests__/prdSetDisposition.test.cjs +0 -222
- package/src/main/__tests__/prdSizing.test.cjs +0 -106
- package/src/main/__tests__/prdSourcePromptIdBackfill.test.cjs +0 -118
- package/src/main/__tests__/prdUpdateDependsOn.test.cjs +0 -160
- package/src/main/__tests__/proc-role-env.test.cjs +0 -125
- package/src/main/__tests__/procname-claude-spawn-sites.test.cjs +0 -304
- package/src/main/__tests__/procname-sm-processes.test.cjs +0 -127
- package/src/main/__tests__/projectHomeAdminRoutes.test.cjs +0 -177
- package/src/main/__tests__/projectPages.test.cjs +0 -137
- package/src/main/__tests__/promptSessionEvents.test.cjs +0 -234
- package/src/main/__tests__/promptSessionSchema.test.cjs +0 -101
- package/src/main/__tests__/promptSessionTranscript.test.cjs +0 -0
- package/src/main/__tests__/promptSessionsCreateEpicHandler.test.cjs +0 -159
- package/src/main/__tests__/pty-epic-worktree-spawn-cwd.test.cjs +0 -282
- package/src/main/__tests__/pty-session-open-telemetry.test.cjs +0 -96
- package/src/main/__tests__/pty-write-result.test.cjs +0 -46
- package/src/main/__tests__/queue-health-verdict.test.cjs +0 -170
- package/src/main/__tests__/queue-starvation-dispatch-driver.test.cjs +0 -286
- package/src/main/__tests__/queue-starvation-per-project.test.cjs +0 -147
- package/src/main/__tests__/queueHistory.test.cjs +0 -355
- package/src/main/__tests__/queueOps-interactive-ac-lint.test.cjs +0 -65
- package/src/main/__tests__/queueOpsArchiveDestination.test.cjs +0 -65
- package/src/main/__tests__/queueOpsAutoArchive.test.cjs +0 -154
- package/src/main/__tests__/rateLimitPollerStreak.test.cjs +0 -128
- package/src/main/__tests__/rcaReport.test.cjs +0 -266
- package/src/main/__tests__/reconcileFlatPrdSweep.test.cjs +0 -119
- package/src/main/__tests__/reconcileTiming.test.cjs +0 -135
- package/src/main/__tests__/runLogRetention.test.cjs +0 -489
- package/src/main/__tests__/runVerify-atomic-verdicts.test.cjs +0 -26
- package/src/main/__tests__/runVerify-blocked-by-foreign-wip.test.cjs +0 -58
- package/src/main/__tests__/runVerify-landed-commit-outranks.test.cjs +0 -191
- package/src/main/__tests__/runVerify-policy-denial.test.cjs +0 -89
- package/src/main/__tests__/runVerify-transcript-commit-evidence.test.cjs +0 -225
- package/src/main/__tests__/runVerify.test.cjs +0 -1784
- package/src/main/__tests__/scheduleJobSchema.test.cjs +0 -127
- package/src/main/__tests__/scheduleJobStatusDrift.test.cjs +0 -65
- package/src/main/__tests__/scheduleJobTransitions.test.cjs +0 -277
- package/src/main/__tests__/scheduleJobTransitionsGrep.test.cjs +0 -59
- package/src/main/__tests__/scheduleJobTransitionsTelemetryTap.test.cjs +0 -72
- package/src/main/__tests__/scheduler-admin-routes.test.cjs +0 -199
- package/src/main/__tests__/scheduler-adopted-run-supervision.test.cjs +0 -143
- package/src/main/__tests__/scheduler-already-satisfied-on-main.test.cjs +0 -105
- package/src/main/__tests__/scheduler-archive-completed-prd.test.cjs +0 -102
- package/src/main/__tests__/scheduler-archived-twin-guard.test.cjs +0 -155
- package/src/main/__tests__/scheduler-autofix-outcome.test.cjs +0 -188
- package/src/main/__tests__/scheduler-autofix-select.test.cjs +0 -439
- package/src/main/__tests__/scheduler-autopromote.test.cjs +0 -51
- package/src/main/__tests__/scheduler-bash-timeout-env.test.cjs +0 -101
- package/src/main/__tests__/scheduler-blocked-by-foreign-wip.test.cjs +0 -107
- package/src/main/__tests__/scheduler-boot-orphans.test.cjs +0 -153
- package/src/main/__tests__/scheduler-broadcast-reconcile.test.cjs +0 -121
- package/src/main/__tests__/scheduler-clear-queue-history.test.cjs +0 -134
- package/src/main/__tests__/scheduler-commit-guard-noop.test.cjs +0 -244
- package/src/main/__tests__/scheduler-committed-in-window.test.cjs +0 -182
- package/src/main/__tests__/scheduler-cross-project-batch.test.cjs +0 -43
- package/src/main/__tests__/scheduler-default-eligible-heal.test.cjs +0 -168
- package/src/main/__tests__/scheduler-dispatch-loop.test.cjs +0 -58
- package/src/main/__tests__/scheduler-effective-concurrency.test.cjs +0 -81
- package/src/main/__tests__/scheduler-epic-digest.test.cjs +0 -227
- package/src/main/__tests__/scheduler-failed-autoreset.test.cjs +0 -121
- package/src/main/__tests__/scheduler-finalize-dispatch-guards.test.cjs +0 -229
- package/src/main/__tests__/scheduler-find-prd-dir.test.cjs +0 -75
- package/src/main/__tests__/scheduler-fix-plan-path.test.cjs +0 -119
- package/src/main/__tests__/scheduler-force-tick-outcome.test.cjs +0 -46
- package/src/main/__tests__/scheduler-foreign-wip-manifest.test.cjs +0 -78
- package/src/main/__tests__/scheduler-gate-shadow.test.cjs +0 -119
- package/src/main/__tests__/scheduler-guard-verdict-autoresolve.test.cjs +0 -390
- package/src/main/__tests__/scheduler-heal-refusal.test.cjs +0 -61
- package/src/main/__tests__/scheduler-heartbeat-payload.test.cjs +0 -80
- package/src/main/__tests__/scheduler-inplace-salvage.test.cjs +0 -323
- package/src/main/__tests__/scheduler-integration-failure-stamp.test.cjs +0 -41
- package/src/main/__tests__/scheduler-investigation-clean-skip.test.cjs +0 -63
- package/src/main/__tests__/scheduler-investigation-prompt.test.cjs +0 -123
- package/src/main/__tests__/scheduler-job-budget.test.cjs +0 -172
- package/src/main/__tests__/scheduler-job-overrun.test.cjs +0 -175
- package/src/main/__tests__/scheduler-launch-failure.test.cjs +0 -199
- package/src/main/__tests__/scheduler-leftover-fields.test.cjs +0 -52
- package/src/main/__tests__/scheduler-leftover-quarantine.test.cjs +0 -199
- package/src/main/__tests__/scheduler-looks-done.test.cjs +0 -537
- package/src/main/__tests__/scheduler-manual-pause.test.cjs +0 -118
- package/src/main/__tests__/scheduler-mechanical-recovery.test.cjs +0 -245
- package/src/main/__tests__/scheduler-meta-code-sha.test.cjs +0 -46
- package/src/main/__tests__/scheduler-needs-review-autoresolve.test.cjs +0 -197
- package/src/main/__tests__/scheduler-never-stop.test.cjs +0 -157
- package/src/main/__tests__/scheduler-no-dead-end-status.test.cjs +0 -152
- package/src/main/__tests__/scheduler-no-orphan-run-dir.test.cjs +0 -81
- package/src/main/__tests__/scheduler-notify-originating-tab-transcript.test.cjs +0 -87
- package/src/main/__tests__/scheduler-notify-originating-tab.test.cjs +0 -343
- package/src/main/__tests__/scheduler-periodic-reverify-guard.test.cjs +0 -217
- package/src/main/__tests__/scheduler-porcelain-rename.test.cjs +0 -164
- package/src/main/__tests__/scheduler-prd-missing-skip.test.cjs +0 -161
- package/src/main/__tests__/scheduler-prd-persona-spawn.test.cjs +0 -178
- package/src/main/__tests__/scheduler-quarantine-autoresolve.test.cjs +0 -165
- package/src/main/__tests__/scheduler-quiet-machine-lease.test.cjs +0 -257
- package/src/main/__tests__/scheduler-rate-limit-cooldown-freshness.test.cjs +0 -123
- package/src/main/__tests__/scheduler-rate-limit-pause.test.cjs +0 -152
- package/src/main/__tests__/scheduler-rate-limit-spin-guard.test.cjs +0 -156
- package/src/main/__tests__/scheduler-reap-dead-running-jobs.test.cjs +0 -754
- package/src/main/__tests__/scheduler-reaper-helpers-basics.test.cjs +0 -87
- package/src/main/__tests__/scheduler-reconcile-cwd-preserve.test.cjs +0 -100
- package/src/main/__tests__/scheduler-reconcile-history-backfill.test.cjs +0 -105
- package/src/main/__tests__/scheduler-reconcile-invalid-repair.test.cjs +0 -203
- package/src/main/__tests__/scheduler-reconcile-quarantine.test.cjs +0 -247
- package/src/main/__tests__/scheduler-reset-job-fields-guard.test.cjs +0 -77
- package/src/main/__tests__/scheduler-resume-recovery.test.cjs +0 -254
- package/src/main/__tests__/scheduler-shard-quarantine.test.cjs +0 -115
- package/src/main/__tests__/scheduler-shared-tree-guard.test.cjs +0 -380
- package/src/main/__tests__/scheduler-sigterm-commit.test.cjs +0 -43
- package/src/main/__tests__/scheduler-stall-per-project.test.cjs +0 -126
- package/src/main/__tests__/scheduler-starve-escalation.test.cjs +0 -154
- package/src/main/__tests__/scheduler-stranded-autofix-park.test.cjs +0 -252
- package/src/main/__tests__/scheduler-stranded-investigation.test.cjs +0 -185
- package/src/main/__tests__/scheduler-stuck-failed-escalation.test.cjs +0 -136
- package/src/main/__tests__/scheduler-supervisor-record.test.cjs +0 -81
- package/src/main/__tests__/scheduler-tick-cancel-token.test.cjs +0 -54
- package/src/main/__tests__/scheduler-tick-wedge.test.cjs +0 -172
- package/src/main/__tests__/scheduler-transient-failure.test.cjs +0 -141
- package/src/main/__tests__/scheduler-unreadable-queue-guard.test.cjs +0 -62
- package/src/main/__tests__/scheduler-utilization-hold.test.cjs +0 -89
- package/src/main/__tests__/scheduler-verify-prd-path.test.cjs +0 -109
- package/src/main/__tests__/scheduler-worktree-cap-defer.test.cjs +0 -234
- package/src/main/__tests__/scheduler-worktree-exec-cwd.test.cjs +0 -120
- package/src/main/__tests__/scheduler-writeprd-epic-rollback.test.cjs +0 -105
- package/src/main/__tests__/schedulerBatchRootBlocker.test.cjs +0 -117
- package/src/main/__tests__/schedulerStateSidecarRestore.test.cjs +0 -110
- package/src/main/__tests__/seedAgentPersonas.test.cjs +0 -184
- package/src/main/__tests__/seedSchedulerMcp.test.cjs +0 -211
- package/src/main/__tests__/seedStatus.test.cjs +0 -100
- package/src/main/__tests__/seedValidatorPersona.test.cjs +0 -116
- package/src/main/__tests__/stop-signal-anchor.test.cjs +0 -75
- package/src/main/__tests__/telemetryClient.test.cjs +0 -1055
- package/src/main/__tests__/telemetryContract.test.cjs +0 -930
- package/src/main/__tests__/telemetrySettings.test.cjs +0 -210
- package/src/main/__tests__/transcripts-batch-flush.test.cjs +0 -249
- package/src/main/__tests__/transcripts-doFlush-array.test.cjs +0 -124
- package/src/main/__tests__/transcripts-paged-reads.test.cjs +0 -241
- package/src/main/__tests__/transcripts-worktree-epic-path.test.cjs +0 -154
- package/src/main/__tests__/transcriptsUsageFor.test.cjs +0 -206
- package/src/main/__tests__/uniquePrdNumbers.test.cjs +0 -153
- package/src/main/__tests__/usageSingleFlight.test.cjs +0 -169
- package/src/main/__tests__/validationSentinels.test.cjs +0 -84
- package/src/main/__tests__/workTypeLibrary.test.cjs +0 -89
- package/src/main/bilkoHost.cjs +0 -314
- package/src/main/bilkoHostCore.cjs +0 -89
- package/src/main/lib/__tests__/active-sessions.test.cjs +0 -251
- package/src/main/lib/__tests__/activeIndexRebuild.test.cjs +0 -179
- package/src/main/lib/__tests__/agentPersonaSchema.test.cjs +0 -67
- package/src/main/lib/__tests__/auditLog.test.cjs +0 -38
- package/src/main/lib/__tests__/bootSelfHeal.test.cjs +0 -107
- package/src/main/lib/__tests__/branchSweep.test.cjs +0 -164
- package/src/main/lib/__tests__/buildIdentity.test.cjs +0 -121
- package/src/main/lib/__tests__/buildTarget.test.cjs +0 -52
- package/src/main/lib/__tests__/childWithLog.test.cjs +0 -321
- package/src/main/lib/__tests__/coldBootPromptSessionsWrite.test.cjs +0 -87
- package/src/main/lib/__tests__/crashTelemetry.test.cjs +0 -103
- package/src/main/lib/__tests__/credentials-futile-refresh.test.cjs +0 -115
- package/src/main/lib/__tests__/cwdClassify.test.cjs +0 -111
- package/src/main/lib/__tests__/definitionOfDoneSequence.test.cjs +0 -95
- package/src/main/lib/__tests__/delegationReadiness.test.cjs +0 -1175
- package/src/main/lib/__tests__/dispatchLoop.test.cjs +0 -63
- package/src/main/lib/__tests__/effectiveModelInfo.test.cjs +0 -244
- package/src/main/lib/__tests__/ephemeralCwd.test.cjs +0 -91
- package/src/main/lib/__tests__/epicDelegationStats.test.cjs +0 -137
- package/src/main/lib/__tests__/epicSpawnCwd.test.cjs +0 -283
- package/src/main/lib/__tests__/epicSpawnPlan.test.cjs +0 -196
- package/src/main/lib/__tests__/epicTranscriptPath.test.cjs +0 -163
- package/src/main/lib/__tests__/epicWorktreeBoot.test.cjs +0 -136
- package/src/main/lib/__tests__/epicWorktreeMerge.test.cjs +0 -130
- package/src/main/lib/__tests__/epicWorktreeMint.test.cjs +0 -117
- package/src/main/lib/__tests__/epicWorktreeProjectConfig.test.cjs +0 -137
- package/src/main/lib/__tests__/fixChainDepth.test.cjs +0 -40
- package/src/main/lib/__tests__/fixtures/204-mercury-steam-horse.log.txt +0 -13
- package/src/main/lib/__tests__/fixtures/scheduler-machine.json.corrupt-1789147548 +0 -34
- package/src/main/lib/__tests__/gateFixtures.json +0 -20
- package/src/main/lib/__tests__/gitCacheBound.test.cjs +0 -69
- package/src/main/lib/__tests__/gitWorktree.test.cjs +0 -1478
- package/src/main/lib/__tests__/gitWorktreeSalvage.test.cjs +0 -107
- package/src/main/lib/__tests__/gitWorktreeSalvageDelta.test.cjs +0 -153
- package/src/main/lib/__tests__/guardShims.test.cjs +0 -158
- package/src/main/lib/__tests__/importReferences.spec.cjs +0 -56
- package/src/main/lib/__tests__/instanceLock.test.cjs +0 -173
- package/src/main/lib/__tests__/jobSupervisorRecord.test.cjs +0 -78
- package/src/main/lib/__tests__/jobWorktree.test.cjs +0 -199
- package/src/main/lib/__tests__/jobWorktreeBootLive.test.cjs +0 -82
- package/src/main/lib/__tests__/landedSinceRun.test.cjs +0 -133
- package/src/main/lib/__tests__/launchFailure.test.cjs +0 -220
- package/src/main/lib/__tests__/loadGate.test.cjs +0 -303
- package/src/main/lib/__tests__/localAdminHttp.test.cjs +0 -214
- package/src/main/lib/__tests__/loopDelay.test.cjs +0 -68
- package/src/main/lib/__tests__/mcpToolCatalog.test.cjs +0 -107
- package/src/main/lib/__tests__/modelCatalog.test.cjs +0 -202
- package/src/main/lib/__tests__/opsOwnership.test.cjs +0 -113
- package/src/main/lib/__tests__/opsRootAbsoluteCwd.test.cjs +0 -328
- package/src/main/lib/__tests__/opsRootNestedWrite.test.cjs +0 -51
- package/src/main/lib/__tests__/opsRootResolve.test.cjs +0 -149
- package/src/main/lib/__tests__/prdDeclaredPaths.test.cjs +0 -82
- package/src/main/lib/__tests__/prdDisposition.test.cjs +0 -224
- package/src/main/lib/__tests__/procIdentity.test.cjs +0 -119
- package/src/main/lib/__tests__/procName.test.cjs +0 -92
- package/src/main/lib/__tests__/projectBriefCore.test.cjs +0 -216
- package/src/main/lib/__tests__/projectRootResolve.test.cjs +0 -148
- package/src/main/lib/__tests__/queueHealth.test.cjs +0 -58
- package/src/main/lib/__tests__/queueStoreAtomicWrite.test.cjs +0 -88
- package/src/main/lib/__tests__/queueStoreMachineStateRecovery.test.cjs +0 -190
- package/src/main/lib/__tests__/quietMachineLease.test.cjs +0 -39
- package/src/main/lib/__tests__/rateLimitWindow.test.cjs +0 -88
- package/src/main/lib/__tests__/reaperHelpers.test.cjs +0 -577
- package/src/main/lib/__tests__/schedulerBatchDepends.test.cjs +0 -312
- package/src/main/lib/__tests__/schedulerBatchFairness.test.cjs +0 -213
- package/src/main/lib/__tests__/schedulerBatchLaunchHold.test.cjs +0 -125
- package/src/main/lib/__tests__/schedulerBatchProjectCap.test.cjs +0 -127
- package/src/main/lib/__tests__/schedulerBatchQuietMachine.test.cjs +0 -109
- package/src/main/lib/__tests__/schedulerMcpServerHeadlessRefusal.test.cjs +0 -71
- package/src/main/lib/__tests__/schedulerMcpServerHelp.test.cjs +0 -216
- package/src/main/lib/__tests__/schedulerMcpServerProjectHome.test.cjs +0 -183
- package/src/main/lib/__tests__/schedulerPaths.test.cjs +0 -226
- package/src/main/lib/__tests__/schedulerPathsWorktree.test.cjs +0 -133
- package/src/main/lib/__tests__/schedulerRuntimeState.test.cjs +0 -56
- package/src/main/lib/__tests__/sessionSlots.test.cjs +0 -144
- package/src/main/lib/__tests__/telemetryBacklog.test.cjs +0 -626
- package/src/main/lib/__tests__/telemetryBoot.test.cjs +0 -134
- package/src/main/lib/__tests__/telemetryConsent.test.cjs +0 -136
- package/src/main/lib/__tests__/telemetryCounters.test.cjs +0 -57
- package/src/main/lib/__tests__/telemetryCountersMetadataColumn.test.cjs +0 -98
- package/src/main/lib/__tests__/terminalRunOutcome.test.cjs +0 -200
- package/src/main/lib/__tests__/toolUseClassify.test.cjs +0 -53
- package/src/main/lib/__tests__/updateCheck.test.cjs +0 -63
- package/src/main/lib/__tests__/upgradeDrain.test.cjs +0 -130
- package/src/main/lib/__tests__/usageCircuit.test.cjs +0 -354
- package/src/main/lib/__tests__/watchdog-helpers.test.cjs +0 -375
- package/src/main/lib/__tests__/watchdog-relaunch.test.cjs +0 -266
- package/src/main/lib/kgExchangePairing.cjs +0 -75
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
'use strict';
|
|
15
15
|
|
|
16
16
|
const { z } = require('zod');
|
|
17
|
-
const { WorkTypeSchema } = require('./workTypeLibrary.cjs');
|
|
17
|
+
const { WorkTypeSchema, LEGACY_WORK_TYPES } = require('./workTypeLibrary.cjs');
|
|
18
18
|
|
|
19
19
|
// Mirrors EpicTag (src/renderer/lib/tagLibrary.ts:10) — the Epic-level
|
|
20
20
|
// mission tag. Epic tag and PRD tag (ipcSchemas.cjs's scheduleRetagPrd `tag`
|
|
@@ -23,6 +23,14 @@ const { WorkTypeSchema } = require('./workTypeLibrary.cjs');
|
|
|
23
23
|
// own enum literal.
|
|
24
24
|
const EpicTagSchema = WorkTypeSchema;
|
|
25
25
|
|
|
26
|
+
// A legacy tag value (e.g. the retired 'bilko-host-publisher') must keep
|
|
27
|
+
// loading on an old on-disk Epic — dropped silently (treated as absent),
|
|
28
|
+
// never thrown. Any other unknown value still fails via EpicTagSchema.
|
|
29
|
+
const LegacyAwareEpicTagSchema = z.preprocess(
|
|
30
|
+
(v) => (typeof v === 'string' && LEGACY_WORK_TYPES.includes(v) ? undefined : v),
|
|
31
|
+
EpicTagSchema.optional(),
|
|
32
|
+
);
|
|
33
|
+
|
|
26
34
|
// Mirrors EpicSource (src/renderer/state/promptSessions.ts:22-27).
|
|
27
35
|
const EpicSourceSchema = z.object({
|
|
28
36
|
producer: z.enum(['new-epic-ui', 'scheduler-dispatch', 'cross-project-feedback']),
|
|
@@ -69,7 +77,7 @@ const PromptSessionSchema = z.object({
|
|
|
69
77
|
createdAt: z.string(),
|
|
70
78
|
completedAt: z.string().nullable(),
|
|
71
79
|
resumedFromId: z.string().nullable().optional(),
|
|
72
|
-
tag:
|
|
80
|
+
tag: LegacyAwareEpicTagSchema,
|
|
73
81
|
openingPrompt: z.string().nullable().optional(),
|
|
74
82
|
source: EpicSourceSchema.optional(),
|
|
75
83
|
agentType: z.string().optional(),
|
|
@@ -35,6 +35,7 @@ const path = require('node:path');
|
|
|
35
35
|
const { splitFrontmatter } = require('./prdFrontmatter.cjs');
|
|
36
36
|
const { readTail } = require('./fileTail.cjs');
|
|
37
37
|
const { resolvePrdWriteDir } = require('./prdLocations.cjs');
|
|
38
|
+
const atomicFs = require('./atomicFs.cjs');
|
|
38
39
|
|
|
39
40
|
// ─── VERDICT_LABELS — deliberate duplicate ──────────────────────────────────
|
|
40
41
|
// Mirrors src/renderer/components/tabs/scheduler/sched-primitives.tsx:123-131.
|
|
@@ -396,15 +397,12 @@ async function writeRcaReport({ job, runDir, verdict, annotations, investigation
|
|
|
396
397
|
job, verdict, meta, logTail, acText, failureClass, investigationText, annotations,
|
|
397
398
|
});
|
|
398
399
|
|
|
399
|
-
//
|
|
400
|
-
// of this lib uses it: the run directory lives under
|
|
400
|
+
// atomicFs.cjs (not config.cjs's writeTextAtomic) for the same reason the
|
|
401
|
+
// rest of this lib uses it: the run directory lives under
|
|
401
402
|
// ~/.claude/session-manager/scheduled-plans/runs/, which is Session-Manager
|
|
402
403
|
// runtime state, not an OWNERS namespace under a project's operations root.
|
|
403
404
|
const reportPath = path.join(runDir, `root-cause-${job.slug}.md`);
|
|
404
|
-
|
|
405
|
-
const tmp = `${reportPath}.tmp-${process.pid}`;
|
|
406
|
-
fs.writeFileSync(tmp, markdown);
|
|
407
|
-
fs.renameSync(tmp, reportPath);
|
|
405
|
+
atomicFs.writeTextAtomicSync(reportPath, markdown);
|
|
408
406
|
|
|
409
407
|
const summary = rcaSummaryLine(job, verdict);
|
|
410
408
|
const recoveryAction = recoveryActionFor(failureClass);
|
|
@@ -11,6 +11,7 @@ const fs = require('node:fs');
|
|
|
11
11
|
const path = require('node:path');
|
|
12
12
|
const { readTail } = require('./fileTail.cjs');
|
|
13
13
|
const { detectRateLimitInLog } = require('./rateLimitDetect.cjs');
|
|
14
|
+
const { pidAlive } = require('./pidAlive.cjs');
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Return true if pid is alive AND its cmdline looks like a claude process.
|
|
@@ -20,12 +21,18 @@ const { detectRateLimitInLog } = require('./rateLimitDetect.cjs');
|
|
|
20
21
|
* cmdline, so we conservatively return true — never false-reap a live PID
|
|
21
22
|
* just because we can't verify its identity.
|
|
22
23
|
*
|
|
24
|
+
* Existence check now delegates to the shared pidAlive() (pidAlive.cjs) so
|
|
25
|
+
* EPERM (pid exists, owned by another user) counts as alive here too — the
|
|
26
|
+
* previous bare `process.kill(pid, 0)` + catch-all-false treated EPERM the
|
|
27
|
+
* same as ESRCH (no such process), silently false-reaping a live-but-
|
|
28
|
+
* unsignalable pid.
|
|
29
|
+
*
|
|
23
30
|
* Conservative by design: a false negative (live process treated as dead) is
|
|
24
31
|
* far worse than a late reap.
|
|
25
32
|
*/
|
|
26
33
|
function claudePidAlive(pid) {
|
|
27
34
|
if (!pid || typeof pid !== 'number' || pid <= 1) return false;
|
|
28
|
-
|
|
35
|
+
if (!pidAlive(pid)) return false;
|
|
29
36
|
try {
|
|
30
37
|
const cmd = fs.readFileSync(`/proc/${pid}/cmdline`, 'utf8').replace(/\0/g, ' ');
|
|
31
38
|
return /\bclaude\b/.test(cmd);
|
|
@@ -9,10 +9,15 @@
|
|
|
9
9
|
*/
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
+
const { pidAlive } = require('./pidAlive.cjs');
|
|
13
|
+
|
|
12
14
|
const DEFAULT_GRACE_MS = 10 * 60 * 1000;
|
|
13
15
|
|
|
16
|
+
// Thin alias over pidAlive.cjs's shared pidAlive() — kept as its own named
|
|
17
|
+
// export (rather than inlining the require at every call site) so existing
|
|
18
|
+
// imports of `defaultPidAlive` from this module keep working unchanged.
|
|
14
19
|
function defaultPidAlive(pid) {
|
|
15
|
-
|
|
20
|
+
return pidAlive(pid);
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
/**
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* reviewNotice.cjs — pure helpers behind the quiet, grouped needs_review
|
|
5
|
+
* notice (this PRD).
|
|
6
|
+
*
|
|
7
|
+
* Before this module, a park into `needs_review` told the authoring Epic
|
|
8
|
+
* immediately (scheduler.cjs's notifyNeedsReview), BEFORE the scheduler's own
|
|
9
|
+
* recovery ladder (mechanical re-integration, resume, quarantine, auto-fix,
|
|
10
|
+
* gate re-run, bounded auto-resolve) ever got a chance to run. Most parks
|
|
11
|
+
* heal on their own, so that immediate message was usually a false alarm.
|
|
12
|
+
*
|
|
13
|
+
* The new rule: record a notice at park time (buildReviewNotice) and send
|
|
14
|
+
* nothing yet. Send ONE message, grouped by (cwd, Epic, cause), only once the
|
|
15
|
+
* ladder gives up on a row (an auto-resolve skip) or the row has sat
|
|
16
|
+
* `needs_review` past a hold window (selectDueReviewNotices + holdMsFromEnv).
|
|
17
|
+
* scheduler.cjs's flushDueReviewNotices is the only caller that actually
|
|
18
|
+
* sends — this module stays fs/network-free so it is unit-testable without
|
|
19
|
+
* touching queue.json or the Epic event store.
|
|
20
|
+
*
|
|
21
|
+
* Each park is one episode with one hold clock. scheduler.cjs's
|
|
22
|
+
* resetJobFields deletes `job.reviewNotice` outright, so a human reset always
|
|
23
|
+
* starts the next park's clock fresh — it never inherits a stale
|
|
24
|
+
* `firstParkedAt` from days earlier. A rung-6 ladder requeue goes through
|
|
25
|
+
* `transitionJob` directly, not `resetJobFields`, so that requeue keeps the
|
|
26
|
+
* same clock on purpose (it is still the same unresolved episode).
|
|
27
|
+
*
|
|
28
|
+
* The sent message also says plainly whether the group still blocks other
|
|
29
|
+
* work: formatReviewNotice names any `pending` row whose `dependsOn` names a
|
|
30
|
+
* still-`needs_review` row in the group, instead of always claiming nothing
|
|
31
|
+
* is waiting. And a row that is not yet due on its own only joins a due
|
|
32
|
+
* group — "sweeps in" — once it has sat for SWEEP_MIN_AGE_MINUTES, so a row
|
|
33
|
+
* that parked seconds ago is never announced before the ladder's early rungs
|
|
34
|
+
* get a chance to run.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
// Default hold before an un-resolved needs_review park gets its own grouped
|
|
38
|
+
// notice, in minutes. Overridable via SM_REVIEW_NOTICE_HOLD_MINUTES.
|
|
39
|
+
const DEFAULT_HOLD_MINUTES = 240;
|
|
40
|
+
|
|
41
|
+
// Same dependsOn slug-matching rule schedulerBatch.cjs's findBlockingDep uses
|
|
42
|
+
// at run time (exact slug first, else bare-name after stripping one leading
|
|
43
|
+
// `NN-`) — reused here, not reimplemented, so formatReviewNotice's "blocks"
|
|
44
|
+
// wording can never disagree with what actually holds a dependent `pending`
|
|
45
|
+
// row in the real queue.
|
|
46
|
+
const { bareSlug } = require('./depSlugResolve.cjs');
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* buildReviewNotice({ job, report, epicId, now, prior }) → ReviewNotice
|
|
50
|
+
*
|
|
51
|
+
* Stamped onto a job row (`job.reviewNotice`) the moment it parks
|
|
52
|
+
* `needs_review`, in the SAME mutate that classifies the RCA report
|
|
53
|
+
* (scheduler.cjs's park path). `report` is rcaReport.cjs's writeRcaReport()
|
|
54
|
+
* result — `null`, or `{ filed: false, ... }` when the report was skipped
|
|
55
|
+
* (SM_RCA_DISABLE, no verdict, etc.) — in which case a deterministic fallback
|
|
56
|
+
* summary stands in for the one the RCA report would have carried.
|
|
57
|
+
*
|
|
58
|
+
* `firstParkedAt` is the anchor selectDueReviewNotices measures the hold
|
|
59
|
+
* window from. It is carried forward from `prior` (the job's existing
|
|
60
|
+
* reviewNotice, if any) as long as that prior notice is still unsent — a
|
|
61
|
+
* re-park of the SAME unresolved episode (e.g. one more ladder attempt that
|
|
62
|
+
* also fails) must not restart the hold clock. Once a notice has been sent,
|
|
63
|
+
* a later park starts a fresh clock — and so does a later park after a human
|
|
64
|
+
* reset, because resetJobFields deletes the notice outright, so `prior` is
|
|
65
|
+
* `undefined` and this falls to the same `now` default.
|
|
66
|
+
*/
|
|
67
|
+
function buildReviewNotice({ job, report, epicId, now, prior } = {}) {
|
|
68
|
+
const cause = `${job?.verifierVerdict || 'unknown'}${job?.integrationFailureKind ? `:${job.integrationFailureKind}` : ''}`;
|
|
69
|
+
const filed = Boolean(report && report.filed);
|
|
70
|
+
const summary = filed ? report.summary : `${job?.slug ?? 'unknown job'} stopped (${cause})`;
|
|
71
|
+
const reportPath = filed ? (report.path ?? null) : null;
|
|
72
|
+
const firstParkedAt = prior && !prior.sentAt && prior.firstParkedAt ? prior.firstParkedAt : now;
|
|
73
|
+
return {
|
|
74
|
+
summary,
|
|
75
|
+
reportPath,
|
|
76
|
+
cause,
|
|
77
|
+
epicId: epicId ?? null,
|
|
78
|
+
firstParkedAt,
|
|
79
|
+
sentAt: null,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// A not-yet-due row only joins a due group ("sweeps in") once it has sat
|
|
84
|
+
// `needs_review` for at least this long. Why: the self-heal ladder
|
|
85
|
+
// (scheduler-operations.md §4) needs about 30 minutes to work through its
|
|
86
|
+
// early rungs, so sweeping in a row seconds after it parked would announce
|
|
87
|
+
// it before the ladder ever got a chance to self-heal it. A row that is due
|
|
88
|
+
// ON ITS OWN (its own hold expired, or a skipped auto-resolve) is never held
|
|
89
|
+
// back by this rule — see isDue below.
|
|
90
|
+
const SWEEP_MIN_AGE_MINUTES = 30;
|
|
91
|
+
|
|
92
|
+
// Milliseconds since reviewNotice.firstParkedAt, or 0 for a missing/
|
|
93
|
+
// unparsable timestamp (fail young — never treat a bad timestamp as old
|
|
94
|
+
// enough to sweep in early).
|
|
95
|
+
function parkedAgeMs(j, now) {
|
|
96
|
+
const firstParkedAt = j.reviewNotice && j.reviewNotice.firstParkedAt;
|
|
97
|
+
if (!firstParkedAt) return 0;
|
|
98
|
+
const parkedMs = Date.parse(firstParkedAt);
|
|
99
|
+
return Number.isFinite(parkedMs) ? now - parkedMs : 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* selectDueReviewNotices(jobs, { now, holdMs }) → [{ cwd, epicId, cause, jobs }]
|
|
104
|
+
*
|
|
105
|
+
* A row is a candidate when it carries an unsent `reviewNotice` and is
|
|
106
|
+
* either `skipped` with `needsReviewAutoResolvedSkip` (the ladder gave up),
|
|
107
|
+
* or still `needs_review` with its notice's `firstParkedAt` at least
|
|
108
|
+
* `holdMs` in the past. completed/pending/running rows, and rows whose
|
|
109
|
+
* notice is already sent, are never candidates.
|
|
110
|
+
*
|
|
111
|
+
* Grouping key is (cwd, reviewNotice.epicId, reviewNotice.cause) — one
|
|
112
|
+
* message per distinct cause per Epic, not one per PRD. Once any row in a
|
|
113
|
+
* key is due, every other unsent candidate sharing that same key is swept
|
|
114
|
+
* into the SAME group even if it individually hasn't reached its own due
|
|
115
|
+
* condition yet, so a cause that affects several PRDs is reported once —
|
|
116
|
+
* except a swept-in `needs_review` row must itself be at least
|
|
117
|
+
* SWEEP_MIN_AGE_MINUTES old (parkedAgeMs); a row due on its own skips that
|
|
118
|
+
* check entirely.
|
|
119
|
+
*/
|
|
120
|
+
function selectDueReviewNotices(jobs = [], { now = Date.now(), holdMs = DEFAULT_HOLD_MINUTES * 60000 } = {}) {
|
|
121
|
+
const isCandidate = (j) => Boolean(
|
|
122
|
+
j
|
|
123
|
+
&& j.reviewNotice
|
|
124
|
+
&& !j.reviewNotice.sentAt
|
|
125
|
+
&& (j.status === 'needs_review' || (j.status === 'skipped' && j.needsReviewAutoResolvedSkip)),
|
|
126
|
+
);
|
|
127
|
+
const isDue = (j) => {
|
|
128
|
+
if (j.status === 'skipped' && j.needsReviewAutoResolvedSkip) return true;
|
|
129
|
+
if (j.status !== 'needs_review') return false;
|
|
130
|
+
const firstParkedAt = j.reviewNotice.firstParkedAt;
|
|
131
|
+
if (!firstParkedAt) return false;
|
|
132
|
+
const parkedMs = Date.parse(firstParkedAt);
|
|
133
|
+
if (!Number.isFinite(parkedMs)) return false;
|
|
134
|
+
return now - parkedMs >= holdMs;
|
|
135
|
+
};
|
|
136
|
+
const keyOf = (j) => `${j.cwd ?? ''}\u0000${j.reviewNotice.epicId ?? ''}\u0000${j.reviewNotice.cause ?? ''}`;
|
|
137
|
+
|
|
138
|
+
const list = Array.isArray(jobs) ? jobs : [];
|
|
139
|
+
const dueKeys = new Set();
|
|
140
|
+
for (const j of list) {
|
|
141
|
+
if (isCandidate(j) && isDue(j)) dueKeys.add(keyOf(j));
|
|
142
|
+
}
|
|
143
|
+
if (dueKeys.size === 0) return [];
|
|
144
|
+
|
|
145
|
+
const sweepMinAgeMs = SWEEP_MIN_AGE_MINUTES * 60000;
|
|
146
|
+
const groupsByKey = new Map();
|
|
147
|
+
for (const j of list) {
|
|
148
|
+
if (!isCandidate(j)) continue;
|
|
149
|
+
const key = keyOf(j);
|
|
150
|
+
if (!dueKeys.has(key)) continue;
|
|
151
|
+
// Not due on its own, and too young to sweep in — leave it for a later
|
|
152
|
+
// pass, once either its own hold expires or it ages past the sweep gate.
|
|
153
|
+
if (!isDue(j) && parkedAgeMs(j, now) < sweepMinAgeMs) continue;
|
|
154
|
+
if (!groupsByKey.has(key)) {
|
|
155
|
+
groupsByKey.set(key, { cwd: j.cwd ?? null, epicId: j.reviewNotice.epicId ?? null, cause: j.reviewNotice.cause ?? null, jobs: [] });
|
|
156
|
+
}
|
|
157
|
+
groupsByKey.get(key).jobs.push(j);
|
|
158
|
+
}
|
|
159
|
+
return Array.from(groupsByKey.values());
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// Plain-language stand-in for the raw verifier/integration cause string.
|
|
163
|
+
// Only causes worth explaining in human terms get an entry — formatReviewNotice
|
|
164
|
+
// falls back to the raw cause for anything not listed here.
|
|
165
|
+
const HUMAN_CAUSE = {
|
|
166
|
+
'worktree_integration_failed:stray_checkout': 'the main checkout was on a different branch, so the work could not be merged',
|
|
167
|
+
transcript_errors: "the run's transcript showed error lines, so its pass could not be trusted",
|
|
168
|
+
no_verdict_sentinel: 'the run finished without leaving a clear pass or fail signal',
|
|
169
|
+
abandoned_background_task: 'the run started a background task and then stopped watching it',
|
|
170
|
+
silent_no_op: 'the run finished clean but made no changes, so there is no evidence it did the work',
|
|
171
|
+
pass_no_commit: 'the run reported success but did not commit anything',
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
function humanCauseFor(cause) {
|
|
175
|
+
return HUMAN_CAUSE[cause] ?? cause;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// One phrase per ladder rung, in the fixed order the ladder itself runs
|
|
179
|
+
// (scheduler-operations.md §4). Checked across every row in the group — the
|
|
180
|
+
// summary is the union of what was tried for ANY of the grouped PRDs, not
|
|
181
|
+
// just one.
|
|
182
|
+
function ladderSummaryFor(jobs) {
|
|
183
|
+
const some = (pred) => jobs.some(pred);
|
|
184
|
+
const phrases = [];
|
|
185
|
+
if (some((j) => j.mechanicalRecoveryAttempted)) phrases.push('re-merged the branch');
|
|
186
|
+
if (some((j) => j.resumeRecoveryAttempted)) phrases.push('resumed the session');
|
|
187
|
+
if (some((j) => (j.quarantineResolveAttempts ?? 0) > 0)) phrases.push('set aside stray files');
|
|
188
|
+
if (some((j) => j.autoFixAttempted)) phrases.push('ran an auto-fix job');
|
|
189
|
+
if (some((j) => j.gateShadow)) phrases.push('re-ran the gate');
|
|
190
|
+
if (some((j) => (j.exhaustedResolveAttempts ?? 0) > 0)) phrases.push('re-queued the job');
|
|
191
|
+
if (some((j) => j.needsReviewAutoResolvedSkip)) phrases.push('gave up and skipped the job');
|
|
192
|
+
return phrases.length ? phrases.join(', ') : 'nothing yet';
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// The pending rows (from the FULL job list, not just this group) that a
|
|
196
|
+
// still-`needs_review` row in the group blocks. A dep slug "names" a group
|
|
197
|
+
// row when it matches that row's slug exactly, or by bare name (same rule as
|
|
198
|
+
// findBlockingDep). Only rows in the group's own cwd are considered — a
|
|
199
|
+
// dependsOn chain never crosses projects. Returns a sorted, de-duplicated
|
|
200
|
+
// list of the blocked rows' slugs.
|
|
201
|
+
function blockedDependents(group, jobs) {
|
|
202
|
+
const blockingSlugs = (group.jobs ?? [])
|
|
203
|
+
.filter((j) => j.status === 'needs_review')
|
|
204
|
+
.map((j) => j.slug)
|
|
205
|
+
.filter(Boolean);
|
|
206
|
+
if (!blockingSlugs.length) return [];
|
|
207
|
+
const namesABlockingSlug = (depSlug) => blockingSlugs.some(
|
|
208
|
+
(slug) => depSlug === slug || bareSlug(depSlug) === bareSlug(slug),
|
|
209
|
+
);
|
|
210
|
+
const blocked = new Set();
|
|
211
|
+
for (const p of jobs ?? []) {
|
|
212
|
+
if (p.status !== 'pending' || p.cwd !== group.cwd) continue;
|
|
213
|
+
if ((p.dependsOn ?? []).some(namesABlockingSlug)) blocked.add(p.slug);
|
|
214
|
+
}
|
|
215
|
+
return [...blocked].sort();
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* formatReviewNotice(group, { jobs }) → plain-text message body for the
|
|
220
|
+
* authoring Epic's event chain. `group` is one entry from
|
|
221
|
+
* selectDueReviewNotices(). `jobs` is the FULL live job list (every status,
|
|
222
|
+
* every project) — needed to find any `pending` row this group still blocks;
|
|
223
|
+
* omit it (or pass `[]`) to always get the "nothing is waiting" wording,
|
|
224
|
+
* e.g. from a caller that only has the group itself.
|
|
225
|
+
*/
|
|
226
|
+
function formatReviewNotice(group, { jobs = [] } = {}) {
|
|
227
|
+
const groupJobs = group.jobs ?? [];
|
|
228
|
+
const slugs = groupJobs.map((j) => j.slug).filter(Boolean);
|
|
229
|
+
const reportPaths = groupJobs.map((j) => j.reviewNotice?.reportPath).filter(Boolean);
|
|
230
|
+
const blocked = blockedDependents(group, jobs);
|
|
231
|
+
const waitingLine = blocked.length
|
|
232
|
+
? `These PRDs block ${blocked.length} other PRD(s) until they are fixed, reset or archived: ${blocked.join(', ')}.`
|
|
233
|
+
: 'The rest of the plan keeps running. Nothing is waiting on you unless you want to act.';
|
|
234
|
+
const lines = [
|
|
235
|
+
`${groupJobs.length} PRD(s) stopped for the same reason: ${humanCauseFor(group.cause)}.`,
|
|
236
|
+
`The scheduler already tried to fix this on its own: ${ladderSummaryFor(groupJobs)}.`,
|
|
237
|
+
waitingLine,
|
|
238
|
+
`PRDs: ${slugs.join(', ')}`,
|
|
239
|
+
];
|
|
240
|
+
if (reportPaths.length) lines.push(`Reports: ${reportPaths.join(', ')}`);
|
|
241
|
+
return lines.join('\n');
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* holdMsFromEnv(env) → milliseconds a needs_review park waits, with no
|
|
246
|
+
* ladder resolution, before it gets a grouped notice on its own (case b in
|
|
247
|
+
* selectDueReviewNotices). SM_REVIEW_NOTICE_HOLD_MINUTES must be a positive
|
|
248
|
+
* number; anything else (unset, zero, negative, NaN) falls back to the
|
|
249
|
+
* DEFAULT_HOLD_MINUTES default.
|
|
250
|
+
*/
|
|
251
|
+
function holdMsFromEnv(env = process.env) {
|
|
252
|
+
const raw = Number(env.SM_REVIEW_NOTICE_HOLD_MINUTES);
|
|
253
|
+
const minutes = Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_HOLD_MINUTES;
|
|
254
|
+
return minutes * 60000;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
module.exports = {
|
|
258
|
+
DEFAULT_HOLD_MINUTES,
|
|
259
|
+
buildReviewNotice,
|
|
260
|
+
selectDueReviewNotices,
|
|
261
|
+
formatReviewNotice,
|
|
262
|
+
holdMsFromEnv,
|
|
263
|
+
};
|
|
@@ -16,12 +16,14 @@
|
|
|
16
16
|
|
|
17
17
|
const { spawn } = require('node:child_process');
|
|
18
18
|
const { resolveClaudeBin, claudeSpawnTarget } = require('./claudeBin.cjs');
|
|
19
|
+
const { headlessPermissionArgs, ensureCliCapsProbed } = require('./claudeCliCaps.cjs');
|
|
19
20
|
const { withProcRole } = require('./cleanEnv.cjs');
|
|
20
21
|
|
|
21
22
|
const MAX_OUT_BYTES = 8 * 1024 * 1024;
|
|
22
23
|
|
|
23
24
|
/** Spawn `claude -p`, capture stdout. Resolves {ok, out, error} — never throws. */
|
|
24
|
-
function runClaudeP(prompt, { model = 'sonnet', timeoutMs = 180_000, systemPrompt = null } = {}) {
|
|
25
|
+
async function runClaudeP(prompt, { model = 'sonnet', timeoutMs = 180_000, systemPrompt = null } = {}) {
|
|
26
|
+
await ensureCliCapsProbed();
|
|
25
27
|
return new Promise((resolve) => {
|
|
26
28
|
let bin;
|
|
27
29
|
try { bin = resolveClaudeBin(); } catch (e) { resolve({ ok: false, error: `claude not found: ${e?.message}` }); return; }
|
|
@@ -29,6 +31,7 @@ function runClaudeP(prompt, { model = 'sonnet', timeoutMs = 180_000, systemPromp
|
|
|
29
31
|
'-p', prompt,
|
|
30
32
|
'--model', model,
|
|
31
33
|
'--dangerously-skip-permissions',
|
|
34
|
+
...headlessPermissionArgs(),
|
|
32
35
|
'--output-format', 'text',
|
|
33
36
|
];
|
|
34
37
|
if (systemPrompt) args.push('--append-system-prompt', systemPrompt);
|
|
@@ -23,8 +23,28 @@ const os = require('node:os');
|
|
|
23
23
|
const path = require('node:path');
|
|
24
24
|
|
|
25
25
|
function isUnder(child, parent) {
|
|
26
|
-
const
|
|
27
|
-
|
|
26
|
+
const within = (c, p) => {
|
|
27
|
+
const rel = path.relative(p, c);
|
|
28
|
+
return rel === '' || (!rel.startsWith('..') && !path.isAbsolute(rel));
|
|
29
|
+
};
|
|
30
|
+
const c = path.resolve(child);
|
|
31
|
+
const p = path.resolve(parent);
|
|
32
|
+
if (within(c, p)) return true;
|
|
33
|
+
// Symlinked roots (macOS os.tmpdir() /var -> /private/var): also compare canonical spellings.
|
|
34
|
+
return within(realpathDeepest(c), realpathDeepest(p));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** realpath of the deepest existing ancestor + the not-yet-existing tail. Never throws. */
|
|
38
|
+
function realpathDeepest(abs) {
|
|
39
|
+
let head = abs;
|
|
40
|
+
const tail = [];
|
|
41
|
+
for (;;) {
|
|
42
|
+
try { return path.join(fs.realpathSync(head), ...tail.reverse()); } catch { /* walk up */ }
|
|
43
|
+
const up = path.dirname(head);
|
|
44
|
+
if (up === head) return abs;
|
|
45
|
+
tail.push(path.basename(head));
|
|
46
|
+
head = up;
|
|
47
|
+
}
|
|
28
48
|
}
|
|
29
49
|
|
|
30
50
|
/**
|
|
@@ -28,6 +28,7 @@ const fs = require('node:fs');
|
|
|
28
28
|
const path = require('node:path');
|
|
29
29
|
const { sessionSlotsConfigPath } = require('./schedulerPaths.cjs');
|
|
30
30
|
const { appendAuditEvent } = require('./auditLog.cjs');
|
|
31
|
+
const atomicFs = require('./atomicFs.cjs');
|
|
31
32
|
const { isProvablyDead, DEFAULT_GRACE_MS } = require('./reservationExpiry.cjs');
|
|
32
33
|
|
|
33
34
|
const MIN_SLOTS = 0;
|
|
@@ -57,10 +58,7 @@ function setCap(cap) {
|
|
|
57
58
|
throw new Error(`sessionSlots.setCap: cap must be an integer in [${MIN_SLOTS}, ${MAX_SLOTS}]`);
|
|
58
59
|
}
|
|
59
60
|
const configPath = sessionSlotsConfigPath();
|
|
60
|
-
|
|
61
|
-
const tmp = `${configPath}.${process.pid}.${Date.now()}.tmp`;
|
|
62
|
-
fs.writeFileSync(tmp, JSON.stringify({ cap: n }, null, 2));
|
|
63
|
-
fs.renameSync(tmp, configPath);
|
|
61
|
+
atomicFs.writeJsonAtomicSync(configPath, { cap: n });
|
|
64
62
|
for (const fn of listeners) {
|
|
65
63
|
try { fn(); } catch { /* a consumer's pump error is its own problem */ }
|
|
66
64
|
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* SHIPPED_PERSONA_SEEDS — every distinct version this app has ever bundled
|
|
5
|
+
* for the four seed personas (`src/main/seedAgentPersonas.cjs`'s `PERSONAS`),
|
|
6
|
+
* keyed by persona name. One entry per version actually shipped in
|
|
7
|
+
* `src/seed/agents/<name>.md`'s git history; exact duplicates (same body
|
|
8
|
+
* hash and same `fm`) are dropped.
|
|
9
|
+
*
|
|
10
|
+
* `seedAgentPersonas.cjs`'s upgrade pass only replaces an installed persona
|
|
11
|
+
* file when its body hash matches one of the `bodySha256` values below — a
|
|
12
|
+
* body that never shipped from this app (hand-written, or hand-edited after
|
|
13
|
+
* install) is left alone, never overwritten. `fm` holds every frontmatter
|
|
14
|
+
* key that version had, except `name` and `seedVersion` — those two are
|
|
15
|
+
* never diffed against this list.
|
|
16
|
+
*
|
|
17
|
+
* When you change a bundled persona, add its new version here. The test in
|
|
18
|
+
* seedAgentPersonas.test.cjs prints the entry to paste.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
function deepFreeze(value) {
|
|
22
|
+
if (value && typeof value === 'object' && !Object.isFrozen(value)) {
|
|
23
|
+
Object.freeze(value);
|
|
24
|
+
for (const key of Object.keys(value)) deepFreeze(value[key]);
|
|
25
|
+
}
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const SHIPPED_PERSONA_SEEDS = deepFreeze({
|
|
30
|
+
"architect": [
|
|
31
|
+
{
|
|
32
|
+
commit: "dba99697",
|
|
33
|
+
bodySha256: "40a4d41445e7fdb128f4f1d8d3eef88b857ca466726b3719b36cb69933f09168",
|
|
34
|
+
fm: {
|
|
35
|
+
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.",
|
|
36
|
+
model: "opus",
|
|
37
|
+
tags: "feature, bug, discussion",
|
|
38
|
+
title: "Engineering — Architect",
|
|
39
|
+
tools: "Read, Grep, Glob, Bash, Edit, Write",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
"dev-lead": [
|
|
44
|
+
{
|
|
45
|
+
commit: "dba99697",
|
|
46
|
+
bodySha256: "7821f5bf3f1617fb4c9ea80c81fc37680bfc4c61346e59f58da456c69ef74a90",
|
|
47
|
+
fm: {
|
|
48
|
+
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. Not currently wired to run automatically; a PRD must name this persona explicitly (e.g. in its Implementation notes) for an executor to adopt it.",
|
|
49
|
+
model: "fable",
|
|
50
|
+
title: "Engineering — Software Engineer",
|
|
51
|
+
tools: "Read, Grep, Glob, Bash, Edit, Write",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
commit: "07b73fac",
|
|
56
|
+
bodySha256: "21284b34473fd4a9b727e8fa2a0702379751d3af0985392a9814f91a4fdc8551",
|
|
57
|
+
fm: {
|
|
58
|
+
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`.",
|
|
59
|
+
model: "sonnet",
|
|
60
|
+
title: "Engineering — Software Engineer",
|
|
61
|
+
tools: "Read, Grep, Glob, Bash, Edit, Write",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
commit: "2751c9f5",
|
|
66
|
+
bodySha256: "375b46dd6f1edc7b7e304e0be5bf32a4e61ca4adf329bc73d65ba2224e3c7b8a",
|
|
67
|
+
fm: {
|
|
68
|
+
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`.",
|
|
69
|
+
model: "sonnet",
|
|
70
|
+
title: "Engineering — Software Engineer",
|
|
71
|
+
tools: "Read, Grep, Glob, Bash, Edit, Write",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
commit: "9f8286d7",
|
|
76
|
+
bodySha256: "86e5d8a679c3be879b162140d403f905a1ef9edbcc54b3bf4b3a278425dea841",
|
|
77
|
+
fm: {
|
|
78
|
+
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`.",
|
|
79
|
+
model: "sonnet",
|
|
80
|
+
title: "Engineering — Software Engineer",
|
|
81
|
+
tools: "Read, Grep, Glob, Bash, Edit, Write",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
commit: "ab4be752",
|
|
86
|
+
bodySha256: "dbd5500968b75cbbe6549e612dc3df5de8d1569fa902cac173705542ea095225",
|
|
87
|
+
fm: {
|
|
88
|
+
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`.",
|
|
89
|
+
model: "sonnet",
|
|
90
|
+
title: "Engineering — Software Engineer",
|
|
91
|
+
tools: "Read, Grep, Glob, Bash, Edit, Write",
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
commit: "535b04f8",
|
|
96
|
+
bodySha256: "91232cfd7ce5fb1dc608ff639a07dcb1c5c13c22502ae4790f51707f498ec917",
|
|
97
|
+
fm: {
|
|
98
|
+
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`.",
|
|
99
|
+
model: "sonnet",
|
|
100
|
+
title: "Engineering — Software Engineer",
|
|
101
|
+
tools: "Read, Grep, Glob, Bash, Edit, Write",
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
"project-home-builder": [
|
|
106
|
+
{
|
|
107
|
+
commit: "e9f2f540",
|
|
108
|
+
bodySha256: "e1c80f465179f814f1e9ea95529434309e5238facdc8c6664cb8f44f8302e148",
|
|
109
|
+
fm: {
|
|
110
|
+
description: "Generates a project's 5 static Project Page HTML files (Home / Marketing Landing / Feature Description / Architecture Overview / Brief) by following the session-manager app's own MCP contract for the pipeline — portable to any machine with the app installed, no source-repo paths required.",
|
|
111
|
+
title: "Project Pages — Builder",
|
|
112
|
+
tools: "Read, Grep, Glob, Bash, Write, Edit",
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
commit: "5cc32fa4",
|
|
117
|
+
bodySha256: "7ad61d9b9dbe7f35727baf83f94c3c244deb25133eebb78c9295c9841237dd1c",
|
|
118
|
+
fm: {
|
|
119
|
+
description: "Reads a project and writes ONE self-contained overview page (home.html) for its Project Home tab, then saves it with a single project_home_write call.",
|
|
120
|
+
title: "Project Home — Builder",
|
|
121
|
+
tools: "Read, Grep, Glob, Bash, Write, Edit",
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
"validator": [
|
|
126
|
+
{
|
|
127
|
+
commit: "41c28597",
|
|
128
|
+
bodySha256: "4791f25651b4fc3b7cfa3a26148e6dd1cceec05f057b882516fafcdcc04f71e7",
|
|
129
|
+
fm: {
|
|
130
|
+
description: "Validates a finished PLAN (the PRDs that share one planId) 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 via sentinel lines. Runs headless as a scheduled PRD (agentType: validator); never edits product code and never queues work.",
|
|
131
|
+
model: "sonnet",
|
|
132
|
+
title: "Engineering — Plan Validator",
|
|
133
|
+
tools: "Read, Grep, Glob, Bash",
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
commit: "7ed8dd1d",
|
|
138
|
+
bodySha256: "80d19294bc8a0e654f242a6177ae14ebdb116c899614c6b6bed503774624a0b8",
|
|
139
|
+
fm: {
|
|
140
|
+
description: "Validates a finished PLAN (the PRDs that share one planId) 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 via sentinel lines. Runs headless as a scheduled PRD (agentType: validator); never edits product code and never queues work.",
|
|
141
|
+
model: "sonnet",
|
|
142
|
+
title: "Engineering — Plan Validator",
|
|
143
|
+
tools: "Read, Grep, Glob, Bash",
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
commit: "9f8286d7",
|
|
148
|
+
bodySha256: "8e95bfe06f70e7f9ae7f22de829b6f40727714e7f66364d166756b269ad7d50f",
|
|
149
|
+
fm: {
|
|
150
|
+
description: "Validates a finished PLAN (the PRDs that share one planId) 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 via sentinel lines. Runs headless as a scheduled PRD (agentType: validator); never edits product code and never queues work.",
|
|
151
|
+
model: "sonnet",
|
|
152
|
+
title: "Engineering — Plan Validator",
|
|
153
|
+
tools: "Read, Grep, Glob, Bash",
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
commit: "ab4be752",
|
|
158
|
+
bodySha256: "512ec61490f6b652268bedc2aebd07fb4aafe8df53cfed38bb728348a29f29cc",
|
|
159
|
+
fm: {
|
|
160
|
+
description: "Validates a finished PLAN (the PRDs that share one planId) 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 via sentinel lines. Runs headless as a scheduled PRD (agentType: validator); never edits product code and never queues work.",
|
|
161
|
+
model: "sonnet",
|
|
162
|
+
title: "Engineering — Plan Validator",
|
|
163
|
+
tools: "Read, Grep, Glob, Bash",
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
commit: "535b04f8",
|
|
168
|
+
bodySha256: "5aeaf796a30ac98bdce440a6fcd088e1c776ae762f2778327439ab8d75a2de94",
|
|
169
|
+
fm: {
|
|
170
|
+
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 via sentinel lines. Runs headless as a scheduled PRD (agentType: validator); never edits product code and never queues work.",
|
|
171
|
+
model: "sonnet",
|
|
172
|
+
title: "Engineering — Plan Validator",
|
|
173
|
+
tools: "Read, Grep, Glob, Bash",
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
module.exports = { SHIPPED_PERSONA_SEEDS };
|