claude-code-session-manager 0.111.0 → 0.112.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/.claude-plugin/marketplace.json +2 -2
- package/dist/assets/{AgentLibrary-rBO1daqM.js → AgentLibrary-RwPvEgqm.js} +2 -2
- package/dist/assets/{Button-DsEYRZg0.js → Button-36j3PzYv.js} +1 -1
- package/dist/assets/{DataModel-D8sbvvBC.js → DataModel-DUhANo4l.js} +1 -1
- package/dist/assets/{History-BEHLtxia.js → History-BeZzNjmv.js} +2 -2
- package/dist/assets/{Hooks-CKpvlXrg.js → Hooks-iQ8845Hp.js} +3 -3
- package/dist/assets/{Library-CeF4qh9d.js → Library-DPE1h-1L.js} +6 -6
- package/dist/assets/{ListDetail-DcfmxPFk.js → ListDetail-PStOuQAo.js} +1 -1
- package/dist/assets/{MarkdownEditor-CvK1pyto.js → MarkdownEditor-DPw-N2-m.js} +1 -1
- package/dist/assets/{McpServers-D-h2ihzJ.js → McpServers-CUyRTNep.js} +2 -2
- package/dist/assets/{Memory-BnF89x8v.js → Memory-bZ2xjBGy.js} +3 -3
- package/dist/assets/{Panel-CQY5zano.js → Panel-_VZ_uXNg.js} +1 -1
- package/dist/assets/{Permissions-DLukmmsz.js → Permissions-PPRmfNbK.js} +3 -3
- package/dist/assets/{Plugins-0Pf0OZ4l.js → Plugins-BFcvfvlx.js} +2 -2
- package/dist/assets/{ProvenanceBadge-vC7Tj-JP.js → ProvenanceBadge-B1WUknak.js} +1 -1
- package/dist/assets/RemoteMachines-D5V0lzgW.js +3 -0
- package/dist/assets/{SaveBar-DjijiUb0.js → SaveBar-Dw64FVdM.js} +1 -1
- package/dist/assets/{Scheduler-Cm3EXZvE.js → Scheduler-C8s_pJ3I.js} +9 -9
- package/dist/assets/{ScopeSwitcher-B-P-kSfq.js → ScopeSwitcher-D-nKDMAE.js} +1 -1
- package/dist/assets/{Settings-DYDlp2m_.js → Settings-CQSrR4mO.js} +4 -4
- package/dist/assets/{SkillReferenceGraph-Epv2GJmj.js → SkillReferenceGraph-BbZFMHim.js} +1 -1
- package/dist/assets/{Skills-DHO0N0C2.js → Skills-Bzyrh6EQ.js} +1 -1
- package/dist/assets/SystemPrompt-DP6i3Dx0.js +1 -0
- package/dist/assets/TagLibrary-iip0C6Bl.js +1 -0
- package/dist/assets/{TiptapBody-DAMO3DhO.js → TiptapBody-Cr-hxX8L.js} +1 -1
- package/dist/assets/Toggle-7WpPzcZH.js +1 -0
- package/dist/assets/{ViewTabs-CGX6MAhc.js → ViewTabs-9lQCRwWJ.js} +1 -1
- package/dist/assets/{historyTotals-vgfk8EOL.js → historyTotals-BrFxw5J1.js} +1 -1
- package/dist/assets/{index-CPieAFsl.js → index-CTBpf-26.js} +250 -250
- package/dist/assets/{settingsSchema-D0FxNrTy.js → settingsSchema-Dh5Kl7VO.js} +1 -1
- package/dist/assets/{useAgentsDirWatch-DCu6BNYN.js → useAgentsDirWatch-CMpx0d04.js} +1 -1
- package/dist/assets/{useRemotePeers-D4cdJDyh.js → useRemotePeers-CI2axd-L.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +3 -2
- package/plugins/CLAUDE.md +5 -8
- package/plugins/session-manager-dev/.claude-plugin/plugin.json +3 -6
- package/plugins/session-manager-dev/skills/builder/1-classify-and-bump/SKILL.md +2 -2
- package/plugins/session-manager-dev/skills/builder/SKILL.md +2 -3
- package/plugins/session-manager-dev/skills/develop/SKILL.md +1 -1
- package/plugins/session-manager-dev/skills/develop/standards.md +3 -3
- package/scripts/README.md +3 -3
- package/scripts/audit-ops-hygiene.cjs +4 -4
- package/scripts/hooks/guard-destructive-git.cjs +4 -4
- package/scripts/hooks/guard-inline-implementation.cjs +1 -1
- package/scripts/hooks/guard-prd-writes.cjs +2 -2
- package/scripts/hooks/lib/guard-destructive-git-policy.cjs +1 -1
- package/scripts/mint-epic.cjs +2 -2
- package/scripts/scheduler-mcp-server.cjs +4 -4
- package/src/main/agentLibrary.cjs +5 -5
- package/src/main/agentsIpc.cjs +76 -0
- package/src/main/build-info.json +4 -4
- package/src/main/chatRunner.cjs +12 -12
- package/src/main/config.cjs +2 -2
- package/src/main/crashDiagnostics.cjs +2 -2
- package/src/main/docEdit.cjs +5 -5
- package/src/main/files.cjs +2 -2
- package/src/main/git.cjs +1 -1
- package/src/main/health.cjs +20 -18
- package/src/main/heapSnapshot.cjs +1 -1
- package/src/main/historyAggregator.cjs +2 -2
- package/src/main/index.cjs +44 -132
- package/src/main/ipcSchemas.cjs +10 -10
- package/src/main/lib/CLAUDE.md +48 -0
- package/src/main/lib/activeSessions.cjs +1 -1
- package/src/main/lib/classifyPromptTicket.cjs +2 -2
- package/src/main/lib/{agentModelResolve.cjs → claude/agentModelResolve.cjs} +7 -7
- package/src/main/lib/{claudeBin.cjs → claude/claudeBin.cjs} +4 -4
- package/src/main/lib/{effectiveModelInfo.cjs → claude/effectiveModelInfo.cjs} +9 -9
- package/src/main/lib/{modelCatalog.cjs → claude/modelCatalog.cjs} +3 -3
- package/src/main/lib/{rateLimitDetect.cjs → claude/rateLimitDetect.cjs} +1 -1
- package/src/main/lib/{rateLimitWindow.cjs → claude/rateLimitWindow.cjs} +1 -1
- package/src/main/lib/{runClaudeP.cjs → claude/runClaudeP.cjs} +1 -1
- package/src/main/lib/credentials.cjs +3 -3
- package/src/main/lib/cwdClassify.cjs +1 -1
- package/src/main/lib/{activeIndexMerge.cjs → epic/activeIndexMerge.cjs} +3 -3
- package/src/main/lib/{activeIndexRebuild.cjs → epic/activeIndexRebuild.cjs} +1 -1
- package/src/main/lib/{delegationReadiness.cjs → epic/delegationReadiness.cjs} +21 -29
- package/src/main/lib/{epicContextDigest.cjs → epic/epicContextDigest.cjs} +1 -1
- package/src/main/lib/{epicDelegationStats.cjs → epic/epicDelegationStats.cjs} +2 -2
- package/src/main/lib/{epicMint.cjs → epic/epicMint.cjs} +11 -11
- package/src/main/lib/{epicSpawnPlan.cjs → epic/epicSpawnPlan.cjs} +3 -3
- package/src/main/lib/{epicStatusMirror.cjs → epic/epicStatusMirror.cjs} +2 -2
- package/src/main/lib/{epicTranscriptDiagnostic.cjs → epic/epicTranscriptDiagnostic.cjs} +2 -2
- package/src/main/lib/{epicTranscriptPath.cjs → epic/epicTranscriptPath.cjs} +2 -2
- package/src/main/lib/{epicValidationHook.cjs → epic/epicValidationHook.cjs} +3 -3
- package/src/main/lib/{epicWorktreeBoot.cjs → epic/epicWorktreeBoot.cjs} +1 -1
- package/src/main/lib/{epicWorktreeMerge.cjs → epic/epicWorktreeMerge.cjs} +3 -3
- package/src/main/lib/{epicWorktreeMint.cjs → epic/epicWorktreeMint.cjs} +3 -3
- package/src/main/lib/{epicWorktreeProjectConfig.cjs → epic/epicWorktreeProjectConfig.cjs} +4 -4
- package/src/main/lib/{promptSessionsCreateEpic.cjs → epic/promptSessionsCreateEpic.cjs} +4 -4
- package/src/main/lib/{crossProjectFeedback.cjs → feedback-remote/crossProjectFeedback.cjs} +7 -7
- package/src/main/lib/{customerFeedbackClient.cjs → feedback-remote/customerFeedbackClient.cjs} +3 -3
- package/src/main/lib/{customerFeedbackInbox.cjs → feedback-remote/customerFeedbackInbox.cjs} +2 -2
- package/src/main/lib/{customerFeedbackIpc.cjs → feedback-remote/customerFeedbackIpc.cjs} +1 -1
- package/src/main/lib/{localAdminHttp.cjs → feedback-remote/localAdminHttp.cjs} +2 -2
- package/src/main/lib/{macroAdminRoutes.cjs → feedback-remote/macroAdminRoutes.cjs} +1 -1
- package/src/main/lib/{projectHomeAdminRoutes.cjs → feedback-remote/projectHomeAdminRoutes.cjs} +4 -4
- package/src/main/lib/{relayClientAuth.cjs → feedback-remote/relayClientAuth.cjs} +2 -2
- package/src/main/lib/{remoteClientSessions.cjs → feedback-remote/remoteClientSessions.cjs} +1 -1
- package/src/main/lib/{gitWorktree.cjs → git/gitWorktree.cjs} +7 -7
- package/src/main/lib/historyRollup.cjs +1 -1
- package/src/main/lib/importReferences.cjs +1 -1
- package/src/main/lib/machineProfile.cjs +1 -1
- package/src/main/lib/openExternalApp.cjs +1 -1
- package/src/main/lib/opsOwnership.cjs +3 -3
- package/src/main/lib/{agentPersonaSchema.cjs → persona-macro/agentPersonaSchema.cjs} +2 -2
- package/src/main/lib/{macroLibrary.cjs → persona-macro/macroLibrary.cjs} +5 -5
- package/src/main/lib/{personaMerge.cjs → persona-macro/personaMerge.cjs} +4 -4
- package/src/main/lib/{prdAdminRoutes.cjs → prd/prdAdminRoutes.cjs} +7 -7
- package/src/main/lib/{prdAgentType.cjs → prd/prdAgentType.cjs} +3 -3
- package/src/main/lib/{prdCreate.cjs → prd/prdCreate.cjs} +12 -12
- package/src/main/lib/{prdDeclaredPaths.cjs → prd/prdDeclaredPaths.cjs} +1 -1
- package/src/main/lib/{prdGateFiles.cjs → prd/prdGateFiles.cjs} +1 -1
- package/src/main/lib/{prdLocations.cjs → prd/prdLocations.cjs} +2 -2
- package/src/main/lib/{prdMigration.cjs → prd/prdMigration.cjs} +3 -3
- package/src/main/lib/prereqs.cjs +2 -2
- package/src/main/lib/{instanceLock.cjs → process/instanceLock.cjs} +4 -11
- package/src/main/lib/{pidAlive.cjs → process/pidAlive.cjs} +1 -1
- package/src/main/lib/{procName.cjs → process/procName.cjs} +2 -2
- package/src/main/lib/{timeoutShim.cjs → process/timeoutShim.cjs} +1 -1
- package/src/main/lib/projectRootResolve.cjs +1 -1
- package/src/main/lib/promptSessionSchema.cjs +1 -1
- package/src/main/lib/{definitionOfDone.cjs → scheduler/definitionOfDone.cjs} +6 -12
- package/src/main/lib/{fixChainDepth.cjs → scheduler/fixChainDepth.cjs} +1 -1
- package/src/main/lib/{jobDirtFilter.cjs → scheduler/jobDirtFilter.cjs} +1 -1
- package/src/main/lib/{jobSupervisorRecord.cjs → scheduler/jobSupervisorRecord.cjs} +1 -1
- package/src/main/lib/{launchFailure.cjs → scheduler/launchFailure.cjs} +2 -2
- package/src/main/lib/{queueStore.cjs → scheduler/queueStore.cjs} +6 -6
- package/src/main/lib/{quietMachineLease.cjs → scheduler/quietMachineLease.cjs} +1 -1
- package/src/main/lib/{rcaReport.cjs → scheduler/rcaReport.cjs} +4 -4
- package/src/main/lib/{reaperHelpers.cjs → scheduler/reaperHelpers.cjs} +3 -3
- package/src/main/lib/{reservationExpiry.cjs → scheduler/reservationExpiry.cjs} +4 -11
- package/src/main/lib/{reviewNotice.cjs → scheduler/reviewNotice.cjs} +1 -1
- package/src/main/lib/{scheduleJobTransitions.cjs → scheduler/scheduleJobTransitions.cjs} +3 -3
- package/src/main/lib/{schedulerBatch.cjs → scheduler/schedulerBatch.cjs} +2 -2
- package/src/main/lib/{schedulerConfig.cjs → scheduler/schedulerConfig.cjs} +1 -1
- package/src/main/lib/{schedulerRuntimeState.cjs → scheduler/schedulerRuntimeState.cjs} +1 -1
- package/src/main/lib/{sessionSlots.cjs → scheduler/sessionSlots.cjs} +2 -2
- package/src/main/lib/{upgradeDrain.cjs → scheduler/upgradeDrain.cjs} +8 -11
- package/src/main/lib/{watchdogHelpers.cjs → scheduler/watchdogHelpers.cjs} +5 -19
- package/src/main/lib/{auditLog.cjs → telemetry/auditLog.cjs} +1 -1
- package/src/main/lib/{opsErrorLog.cjs → telemetry/opsErrorLog.cjs} +4 -4
- package/src/main/lib/{telemetryBacklog.cjs → telemetry/telemetryBacklog.cjs} +4 -4
- package/src/main/lib/{telemetryBoot.cjs → telemetry/telemetryBoot.cjs} +1 -1
- package/src/main/lib/{telemetryClient.cjs → telemetry/telemetryClient.cjs} +4 -4
- package/src/main/lib/{telemetrySettings.cjs → telemetry/telemetrySettings.cjs} +1 -1
- package/src/main/logs.cjs +1 -1
- package/src/main/mcpStatus.cjs +2 -2
- package/src/main/memoryAggregate.cjs +3 -3
- package/src/main/memoryTool.cjs +1 -1
- package/src/main/otel.cjs +2 -2
- package/src/main/pluginInstall.cjs +29 -3
- package/src/main/projectBrief.cjs +6 -6
- package/src/main/projectPages.cjs +1 -1
- package/src/main/promptSessionEvents.cjs +2 -2
- package/src/main/pty.cjs +7 -7
- package/src/main/queueOps.cjs +6 -6
- package/src/main/remoteClient.cjs +4 -4
- package/src/main/remoteClientIpc.cjs +1 -1
- package/src/main/runVerify.cjs +1 -1
- package/src/main/scheduler/CLAUDE.md +26 -0
- package/src/main/scheduler/budget.cjs +576 -0
- package/src/main/scheduler/gitTreeGuard.cjs +672 -0
- package/src/main/scheduler/prdParser.cjs +4 -4
- package/src/main/scheduler/prdPaths.cjs +487 -0
- package/src/main/scheduler/reviewLadder.cjs +1011 -0
- package/src/main/scheduler/starvation.cjs +390 -0
- package/src/main/scheduler.cjs +289 -3311
- package/src/main/seedAgentPersonas.cjs +5 -5
- package/src/main/seedDevPlugin.cjs +70 -3
- package/src/main/seedSchedulerMcp.cjs +2 -2
- package/src/main/supervisor.cjs +5 -5
- package/src/main/telemetryIpc.cjs +51 -0
- package/src/main/transcripts.cjs +3 -3
- package/src/main/updaterIpc.cjs +1 -1
- package/src/main/usage.cjs +1 -1
- package/src/main/watchers.cjs +1 -1
- package/src/main/webRemote.cjs +7 -7
- package/src/preload/api.d.ts +8 -8
- package/src/preload/index.cjs +3 -3
- package/dist/assets/RemoteMachines-CWnKbFHc.js +0 -3
- package/dist/assets/SystemPrompt-DxeNofL9.js +0 -1
- package/dist/assets/TagLibrary-QOAs7ISO.js +0 -1
- package/dist/assets/Toggle-Ba_f7q_m.js +0 -1
- package/plugins/session-manager-dev/skills/blog-for-project-feature/0-select/SKILL.md +0 -39
- package/plugins/session-manager-dev/skills/blog-for-project-feature/1-research/SKILL.md +0 -37
- package/plugins/session-manager-dev/skills/blog-for-project-feature/2-storyboard/SKILL.md +0 -64
- package/plugins/session-manager-dev/skills/blog-for-project-feature/3-capture/SKILL.md +0 -52
- package/plugins/session-manager-dev/skills/blog-for-project-feature/4-draft-copy/SKILL.md +0 -37
- package/plugins/session-manager-dev/skills/blog-for-project-feature/5-illustrate/SKILL.md +0 -50
- package/plugins/session-manager-dev/skills/blog-for-project-feature/6-compose/SKILL.md +0 -51
- package/plugins/session-manager-dev/skills/blog-for-project-feature/7-review/SKILL.md +0 -54
- package/plugins/session-manager-dev/skills/blog-for-project-feature/SKILL.md +0 -144
- package/plugins/session-manager-dev/skills/blog-for-project-feature/feature.config.yaml +0 -90
- package/plugins/session-manager-dev/skills/discover-features/SKILL.md +0 -95
- package/plugins/session-manager-dev/skills/explain-to-me/SKILL.md +0 -205
- package/plugins/session-manager-dev/skills/explain-to-me/assets/style-reference.html +0 -163
- package/plugins/session-manager-dev/skills/find-opportunity/SKILL.md +0 -83
- package/plugins/session-manager-dev/skills/issue-address/0-select/0-fetch-pool/SKILL.md +0 -38
- package/plugins/session-manager-dev/skills/issue-address/0-select/1-reject-fixed/SKILL.md +0 -64
- package/plugins/session-manager-dev/skills/issue-address/0-select/2-reject-claimed/SKILL.md +0 -71
- package/plugins/session-manager-dev/skills/issue-address/0-select/3-rank-impact/SKILL.md +0 -39
- package/plugins/session-manager-dev/skills/issue-address/0-select/SKILL.md +0 -75
- package/plugins/session-manager-dev/skills/issue-address/1-confirm-open/SKILL.md +0 -39
- package/plugins/session-manager-dev/skills/issue-address/2-claim/SKILL.md +0 -57
- package/plugins/session-manager-dev/skills/issue-address/3-reproduce/SKILL.md +0 -40
- package/plugins/session-manager-dev/skills/issue-address/4-fix/SKILL.md +0 -33
- package/plugins/session-manager-dev/skills/issue-address/5-verify/SKILL.md +0 -40
- package/plugins/session-manager-dev/skills/issue-address/SKILL.md +0 -120
- package/plugins/session-manager-dev/skills/local-project-health/SKILL.md +0 -58
- package/plugins/session-manager-dev/skills/memory-sanitation/SKILL.md +0 -147
- package/plugins/session-manager-dev/skills/ops-sweep/SKILL.md +0 -137
- package/plugins/session-manager-dev/skills/pr-review-sweep/0-fetch/SKILL.md +0 -41
- package/plugins/session-manager-dev/skills/pr-review-sweep/1-classify/SKILL.md +0 -56
- package/plugins/session-manager-dev/skills/pr-review-sweep/2-check-fixed/SKILL.md +0 -49
- package/plugins/session-manager-dev/skills/pr-review-sweep/3-queue/SKILL.md +0 -57
- package/plugins/session-manager-dev/skills/pr-review-sweep/4-land-and-resolve/SKILL.md +0 -60
- package/plugins/session-manager-dev/skills/pr-review-sweep/SKILL.md +0 -124
- package/plugins/session-manager-dev/skills/pr-signal/SKILL.md +0 -67
- package/plugins/session-manager-dev/skills/project-status/SKILL.md +0 -243
- package/plugins/session-manager-dev/skills/requesting-code-review/SKILL.md +0 -98
- package/plugins/session-manager-dev/skills/requesting-code-review/code-reviewer.md +0 -146
- /package/src/main/lib/{agentEffortResolve.cjs → claude/agentEffortResolve.cjs} +0 -0
- /package/src/main/lib/{claudeCliCaps.cjs → claude/claudeCliCaps.cjs} +0 -0
- /package/src/main/lib/{usageCircuit.cjs → claude/usageCircuit.cjs} +0 -0
- /package/src/main/lib/{epicSpawnCwd.cjs → epic/epicSpawnCwd.cjs} +0 -0
- /package/src/main/lib/{customerFeedbackAdminRoutes.cjs → feedback-remote/customerFeedbackAdminRoutes.cjs} +0 -0
- /package/src/main/lib/{remoteE2eCrypto.cjs → feedback-remote/remoteE2eCrypto.cjs} +0 -0
- /package/src/main/lib/{branchSweep.cjs → git/branchSweep.cjs} +0 -0
- /package/src/main/lib/{gitExec.cjs → git/gitExec.cjs} +0 -0
- /package/src/main/lib/{jobWorktree.cjs → git/jobWorktree.cjs} +0 -0
- /package/src/main/lib/{jobWorktreeBootLive.cjs → git/jobWorktreeBootLive.cjs} +0 -0
- /package/src/main/lib/{jobWorktreeTerminalOrphanLive.cjs → git/jobWorktreeTerminalOrphanLive.cjs} +0 -0
- /package/src/main/lib/{builtinMacros.cjs → persona-macro/builtinMacros.cjs} +0 -0
- /package/src/main/lib/{personaImportHealth.cjs → persona-macro/personaImportHealth.cjs} +0 -0
- /package/src/main/lib/{shippedPersonaSeeds.cjs → persona-macro/shippedPersonaSeeds.cjs} +0 -0
- /package/src/main/lib/{depSlugResolve.cjs → prd/depSlugResolve.cjs} +0 -0
- /package/src/main/lib/{planValidator.cjs → prd/planValidator.cjs} +0 -0
- /package/src/main/lib/{prdAuthoringSeed.cjs → prd/prdAuthoringSeed.cjs} +0 -0
- /package/src/main/lib/{prdDisposition.cjs → prd/prdDisposition.cjs} +0 -0
- /package/src/main/lib/{prdFrontmatter.cjs → prd/prdFrontmatter.cjs} +0 -0
- /package/src/main/lib/{prdSizing.cjs → prd/prdSizing.cjs} +0 -0
- /package/src/main/lib/{workTypeLibrary.cjs → prd/workTypeLibrary.cjs} +0 -0
- /package/src/main/lib/{childWithLog.cjs → process/childWithLog.cjs} +0 -0
- /package/src/main/lib/{cleanEnv.cjs → process/cleanEnv.cjs} +0 -0
- /package/src/main/lib/{defaultShell.cjs → process/defaultShell.cjs} +0 -0
- /package/src/main/lib/{killTree.cjs → process/killTree.cjs} +0 -0
- /package/src/main/lib/{loginShellPath.cjs → process/loginShellPath.cjs} +0 -0
- /package/src/main/lib/{procIdentity.cjs → process/procIdentity.cjs} +0 -0
- /package/src/main/lib/{singleInstanceGuard.cjs → process/singleInstanceGuard.cjs} +0 -0
- /package/src/main/lib/{smProcNames.cjs → process/smProcNames.cjs} +0 -0
- /package/src/main/lib/{timeoutShimScript.cjs → process/timeoutShimScript.cjs} +0 -0
- /package/src/main/lib/{winSpawn.cjs → process/winSpawn.cjs} +0 -0
- /package/src/main/lib/{adoptedRunSupervisor.cjs → scheduler/adoptedRunSupervisor.cjs} +0 -0
- /package/src/main/lib/{dispatchLoop.cjs → scheduler/dispatchLoop.cjs} +0 -0
- /package/src/main/lib/{dodDrainHook.cjs → scheduler/dodDrainHook.cjs} +0 -0
- /package/src/main/lib/{fixPlanSlug.cjs → scheduler/fixPlanSlug.cjs} +0 -0
- /package/src/main/lib/{gateAuthority.cjs → scheduler/gateAuthority.cjs} +0 -0
- /package/src/main/lib/{landedSinceRun.cjs → scheduler/landedSinceRun.cjs} +0 -0
- /package/src/main/lib/{loadGate.cjs → scheduler/loadGate.cjs} +0 -0
- /package/src/main/lib/{needsReviewLedger.cjs → scheduler/needsReviewLedger.cjs} +0 -0
- /package/src/main/lib/{queueHealth.cjs → scheduler/queueHealth.cjs} +0 -0
- /package/src/main/lib/{queueHistory.cjs → scheduler/queueHistory.cjs} +0 -0
- /package/src/main/lib/{runLogRetention.cjs → scheduler/runLogRetention.cjs} +0 -0
- /package/src/main/lib/{scheduleJobSchema.cjs → scheduler/scheduleJobSchema.cjs} +0 -0
- /package/src/main/lib/{schedulerPaths.cjs → scheduler/schedulerPaths.cjs} +0 -0
- /package/src/main/lib/{terminalRunOutcome.cjs → scheduler/terminalRunOutcome.cjs} +0 -0
- /package/src/main/lib/{validationSentinels.cjs → scheduler/validationSentinels.cjs} +0 -0
- /package/src/main/lib/{crashTelemetry.cjs → telemetry/crashTelemetry.cjs} +0 -0
- /package/src/main/lib/{otlpTraceExporter.cjs → telemetry/otlpTraceExporter.cjs} +0 -0
- /package/src/main/lib/{telemetryConsent.cjs → telemetry/telemetryConsent.cjs} +0 -0
- /package/src/main/lib/{telemetryCounters.cjs → telemetry/telemetryCounters.cjs} +0 -0
- /package/src/main/lib/{atomicFs.cjs → util/atomicFs.cjs} +0 -0
- /package/src/main/lib/{encodeCwd.cjs → util/encodeCwd.cjs} +0 -0
- /package/src/main/lib/{expandHome.cjs → util/expandHome.cjs} +0 -0
- /package/src/main/lib/{extractJson.cjs → util/extractJson.cjs} +0 -0
- /package/src/main/lib/{fileTail.cjs → util/fileTail.cjs} +0 -0
- /package/src/main/lib/{headTailBuffer.cjs → util/headTailBuffer.cjs} +0 -0
- /package/src/main/lib/{kebabCase.cjs → util/kebabCase.cjs} +0 -0
- /package/src/main/lib/{loopDelay.cjs → util/loopDelay.cjs} +0 -0
- /package/src/main/lib/{lruCache.cjs → util/lruCache.cjs} +0 -0
- /package/src/main/lib/{withTimeout.cjs → util/withTimeout.cjs} +0 -0
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memory-sanitation
|
|
3
|
-
description: >-
|
|
4
|
-
Audit every memory in the current project's auto-memory store, fold anything now
|
|
5
|
-
duplicated in an always-loaded instruction file (global CLAUDE.md, project CLAUDE.md,
|
|
6
|
-
or a plugin skill's SKILL.md) into that file and delete the memory, verify and delete
|
|
7
|
-
memories whose tracked PRD/incident has since landed or expired, trim memories that are
|
|
8
|
-
part-stale, and leave genuinely current non-duplicated memories alone. Ends with a
|
|
9
|
-
structured summary (counts + per-memory outcome) suitable for display in a UI. Use
|
|
10
|
-
whenever the user says "/memory-sanitation", "clean up memory", "sanitize memory",
|
|
11
|
-
"audit my memories", "combine and remove memories", or asks what should move from
|
|
12
|
-
memory into system instructions. Keywords: memory, sanitation, sanitize, cleanup, audit,
|
|
13
|
-
dedupe, prune, CLAUDE.md, instructions, stale memory.
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
# /memory-sanitation — audit → fold/delete/trim/keep → report
|
|
17
|
-
|
|
18
|
-
**Role:** a periodic hygiene pass over `<memory-dir>/*.md` (the auto-memory store described
|
|
19
|
-
in the top-level system instructions — one file per memory, indexed by `MEMORY.md`). Memory
|
|
20
|
-
exists to recall things NOT already guaranteed to reach the assistant another way. Once a
|
|
21
|
-
memory's content is baked into something always-loaded (CLAUDE.md, a skill's SKILL.md) or the
|
|
22
|
-
event it tracked has resolved (a PRD landed, an incident closed, a pause expired), it is dead
|
|
23
|
-
weight: it costs retrieval relevance and maintenance, and duplicated content risks drifting out
|
|
24
|
-
of sync with the authoritative copy.
|
|
25
|
-
|
|
26
|
-
**Never** delete a memory just because it's old — staleness is about resolution, not age. A
|
|
27
|
-
memory describing a standing architecture fact that's still true and still nowhere else stays,
|
|
28
|
-
no matter how old.
|
|
29
|
-
|
|
30
|
-
## Procedure
|
|
31
|
-
|
|
32
|
-
1. **Locate the memory dir** — the path in the system instructions'
|
|
33
|
-
`auto memory` section (`~/.claude/projects/<encoded-cwd>/memory/`). List every `*.md` file
|
|
34
|
-
except `MEMORY.md` itself.
|
|
35
|
-
|
|
36
|
-
2. **Read every memory file in full**, plus `MEMORY.md`'s index, plus the project's own
|
|
37
|
-
`CLAUDE.md` (and the global `~/.claude/CLAUDE.md`) and the skill files under
|
|
38
|
-
`plugins/*/skills/*/SKILL.md` if the project ships a dev-skill plugin. You need all of
|
|
39
|
-
these loaded to judge duplication.
|
|
40
|
-
|
|
41
|
-
3. **Classify each memory** into exactly one bucket:
|
|
42
|
-
- **DELETE — baked in.** The memory's content (a process rule, a behavioral preference, a
|
|
43
|
-
standing architecture fact) is now verbatim or near-verbatim present in an always-loaded
|
|
44
|
-
instruction file. Confirm with a direct text comparison, not a vibe check, before deleting.
|
|
45
|
-
- **DELETE — resolved/expired.** The memory tracks a PRD, incident, or temporary state
|
|
46
|
-
(a dev pause, a "queued as PRD NN" note, a "bug found, not yet fixed" note) whose tracked
|
|
47
|
-
event has since concluded. Verify before deleting — don't assume from the memory's own
|
|
48
|
-
text that something landed:
|
|
49
|
-
- PRD status: check `~/.claude/session-manager/scheduled-plans/queue.json` (or the
|
|
50
|
-
project's own scheduler queue file) for the PRD slug's `status` field, or
|
|
51
|
-
`prds-archived/` for a withdrawn/archived one.
|
|
52
|
-
- Code claims: `grep`/`ls` the file(s) and line(s) the memory cites — confirm the
|
|
53
|
-
described function/constant/behavior still exists as described (or confirm it's gone,
|
|
54
|
-
which is its own signal the memory is obsolete).
|
|
55
|
-
- Git history: `git log --oneline --all | grep <PRD-or-feature-slug>` when queue.json
|
|
56
|
-
doesn't resolve it.
|
|
57
|
-
- **FOLD then DELETE.** The memory is a durable, project-wide rule that belongs in an
|
|
58
|
-
instruction file but isn't there yet (a cross-project rule → global `~/.claude/CLAUDE.md`;
|
|
59
|
-
a this-project convention → project `CLAUDE.md`'s `## Conventions`/`## Avoid`; a
|
|
60
|
-
process/routing rule for a specific skill → that skill's `SKILL.md`). Write it into the
|
|
61
|
-
target file first, in that file's own voice and section, then delete the memory. Two
|
|
62
|
-
overlapping memories covering the same territory fold into ONE rule, not two.
|
|
63
|
-
|
|
64
|
-
**FOLD MUST NOT GROW AN ALWAYS-LOADED FILE.** A `CLAUDE.md` is read on every turn of every
|
|
65
|
-
session; this skill is the only process that routinely writes *into* one, which makes it a
|
|
66
|
-
one-way ratchet — memory gets a sanitation pass, `CLAUDE.md` becomes its landfill, and nothing
|
|
67
|
-
ever evicts from the landfill. So:
|
|
68
|
-
- If the target `CLAUDE.md` declares a **size budget**, honour it. Check `wc -c` first. If the
|
|
69
|
-
fold would breach it, fold the *rule* into `CLAUDE.md` as one line and its rationale into
|
|
70
|
-
whichever linked reference doc that file points at — never append the full memory body.
|
|
71
|
-
- Prefer the **narrowest** always-loaded target: a specific `SKILL.md` over project
|
|
72
|
-
`CLAUDE.md`, and project over global. Only a genuinely cross-project rule earns the global file.
|
|
73
|
-
- A fold that adds more than ~2 lines to a `CLAUDE.md` is a signal you're moving narrative, not
|
|
74
|
-
a law. Compress to the imperative rule and drop the history.
|
|
75
|
-
- Report the net char delta per instruction file you touched in the step-7 summary, so a run
|
|
76
|
-
that quietly added 3k to an always-loaded file is visible rather than counted as "cleanup".
|
|
77
|
-
- **TRIM.** The memory mixes durable facts with dated, closed narrative (a deploy log, a
|
|
78
|
-
PRD-tracking blow-by-blow, "verified live" status updates). Keep only what's still true
|
|
79
|
-
and not written down elsewhere; cut the rest. Re-verify any code claim you keep (grep it).
|
|
80
|
-
- **KEEP.** Genuinely current, non-duplicated, still load-bearing. Leave it — don't rewrite
|
|
81
|
-
for style.
|
|
82
|
-
|
|
83
|
-
4. **Fix cross-references.** Any memory you delete or fold may be `[[wikilinked]]` from a
|
|
84
|
-
surviving memory. Grep `<memory-dir>/*.md` for the deleted memory's `name:` slug and update
|
|
85
|
-
the reference — point it at the new location (an instruction-file section) or drop the link
|
|
86
|
-
if nothing replaces it. A dangling `[[link]]` to a file that no longer exists is a bug.
|
|
87
|
-
|
|
88
|
-
5. **Rewrite `MEMORY.md`'s index** to match exactly what's on disk after steps 3–4. Re-read the
|
|
89
|
-
directory listing immediately before writing — another session or a background job may have
|
|
90
|
-
added a memory mid-run (this has happened in practice); never clobber a concurrent addition
|
|
91
|
-
with a stale full-file overwrite. Prefer `Edit` for point changes; only rewrite the whole
|
|
92
|
-
index when you've just re-confirmed the current file list.
|
|
93
|
-
|
|
94
|
-
6. **Collision safety for instruction-file edits.** Before editing `CLAUDE.md` or any
|
|
95
|
-
`SKILL.md`, `git status --short` that specific file. If it's already dirty from unrelated
|
|
96
|
-
concurrent work, use small targeted `Edit`s (never a full-file `Write`) so you can't discard
|
|
97
|
-
someone else's in-flight change.
|
|
98
|
-
|
|
99
|
-
7. **Report a structured summary**, both as your end-of-turn text and in a form a UI can render
|
|
100
|
-
directly (a JSON object is fine when invoked programmatically — see Output shape below):
|
|
101
|
-
counts per bucket, and for each memory: its name, the bucket, and a one-line reason. If
|
|
102
|
-
invoked from a UI trigger (see `## UI trigger` below), keep the summary tight enough to
|
|
103
|
-
render in a side panel — lead with the counts, then a short list, not full memory bodies.
|
|
104
|
-
|
|
105
|
-
## Output shape (for programmatic/UI invocations)
|
|
106
|
-
|
|
107
|
-
When this skill is invoked non-interactively (e.g. from the Memory tab's Sanitize button), end
|
|
108
|
-
the run by printing a single fenced JSON block as the last thing in the transcript, so the
|
|
109
|
-
caller can parse it without scraping prose:
|
|
110
|
-
|
|
111
|
-
```json
|
|
112
|
-
{
|
|
113
|
-
"totalBefore": 26,
|
|
114
|
-
"totalAfter": 9,
|
|
115
|
-
"deleted": [{ "name": "feedback_fix_dont_ask", "reason": "baked into CLAUDE.md + develop/SKILL.md" }],
|
|
116
|
-
"folded": [{ "name": "feedback_nav_microservices", "into": "CLAUDE.md ## Avoid", "reason": "merged with feedback_extend_dont_add_tabs" }],
|
|
117
|
-
"trimmed": [{ "name": "web_remote_v2_mobile", "reason": "PRDs landed; cut deploy-log narrative" }],
|
|
118
|
-
"kept": [{ "name": "no_schedule_self_e2e", "reason": "active, tracks open PRD" }],
|
|
119
|
-
"instructionFileDelta": [{ "file": "CLAUDE.md", "charsBefore": 11576, "charsAfter": 11702, "delta": 126, "withinBudget": true }]
|
|
120
|
-
}
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
`instructionFileDelta` is required whenever the run wrote to any always-loaded instruction file
|
|
124
|
-
(`CLAUDE.md`, a `SKILL.md`). It is what makes a FOLD-heavy run that grew an always-loaded file by
|
|
125
|
-
3k visible instead of counted as "cleanup" — see the FOLD rule above. Set `withinBudget: false`
|
|
126
|
-
(and say so in the prose summary) if the file declares a size budget and the run breached it.
|
|
127
|
-
|
|
128
|
-
Still print the normal human-readable summary too — the JSON block is additive, not a
|
|
129
|
-
replacement.
|
|
130
|
-
|
|
131
|
-
## UI trigger
|
|
132
|
-
|
|
133
|
-
The Memory tab (`src/renderer/components/tabs/Memory.tsx`) has (or will have, per the queued
|
|
134
|
-
PRD) a "Sanitize memory" button that fires this skill as a headless run and renders the JSON
|
|
135
|
-
summary above. When authoring or reviewing that wiring, this skill is the contract: the button
|
|
136
|
-
sends a prompt that invokes `/memory-sanitation`, and the tab parses the trailing JSON block
|
|
137
|
-
from the run's final message. Don't hand-roll a second summary shape in the renderer — parse
|
|
138
|
-
this skill's own output shape.
|
|
139
|
-
|
|
140
|
-
## Notes
|
|
141
|
-
|
|
142
|
-
- This is a hygiene pass, not a content-authoring pass — don't use it to write NEW memories,
|
|
143
|
-
only to reconcile existing ones against instruction files and resolved state.
|
|
144
|
-
- Don't delete a memory solely because it's short, or solely because it's old. Staleness is
|
|
145
|
-
"the thing it tracked resolved" or "it's now duplicated elsewhere" — not age or length.
|
|
146
|
-
- Don't run this against another project's memory store without being asked — memory dirs are
|
|
147
|
-
per-project (`~/.claude/projects/<encoded-cwd>/memory/`); stay scoped to the current cwd.
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ops-sweep
|
|
3
|
-
description: >-
|
|
4
|
-
Run the operations-folder maintenance protocol (see
|
|
5
|
-
session-manager-operations/architecture/ops-maintenance-protocol.md) against
|
|
6
|
-
ANY project's session-manager-operations/ folder — including a project with
|
|
7
|
-
a different OWNERS vocabulary than session-manager's own, or no CLAUDE.md at
|
|
8
|
-
all. Diffs declared-vs-actual namespace ownership, flags doc contradictions
|
|
9
|
-
(one doc says retired, another says still owned), and flags archived content
|
|
10
|
-
with no stated retention policy. Never deletes or migrates anything itself —
|
|
11
|
-
findings are reported to the human, or queued as PRDs in the current session
|
|
12
|
-
when the user asks for that. Use whenever the user says "/ops-sweep", "sweep the
|
|
13
|
-
ops folder", "audit operations hygiene", "check for ops drift", or wants the
|
|
14
|
-
maintenance protocol run against a project (this one or another). Keywords:
|
|
15
|
-
ops sweep, operations hygiene, namespace drift, OWNERS audit, retention
|
|
16
|
-
policy, doc contradiction.
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
# ops-sweep
|
|
20
|
-
|
|
21
|
-
**Role:** the automated, portable version of
|
|
22
|
-
`session-manager-operations/architecture/ops-maintenance-protocol.md`'s Pattern F —
|
|
23
|
-
a *finder*, never an *actor*. It reports drift between a project's declared
|
|
24
|
-
architecture and what's actually on disk; a human (via a proposed Epic)
|
|
25
|
-
decides what to do about it.
|
|
26
|
-
|
|
27
|
-
Read the protocol doc in full before running this the first time, especially
|
|
28
|
-
Pattern F ("generalizing to other projects") — this skill is that
|
|
29
|
-
generalization.
|
|
30
|
-
|
|
31
|
-
## What it does NOT assume
|
|
32
|
-
|
|
33
|
-
Unlike this project's own `scripts/audit-ops-hygiene.cjs` (which hardcodes
|
|
34
|
-
session-manager's OWNERS vocabulary — `feedback`, `scheduler`, `prompt-sessions`,
|
|
35
|
-
etc.), this skill makes **no assumption about the target project's namespace
|
|
36
|
-
names, its OWNERS table shape, or whether it has a CLAUDE.md at all**. It
|
|
37
|
-
re-derives the source-of-truth hierarchy from what that specific project has:
|
|
38
|
-
|
|
39
|
-
**Hand-authored-PRD detection stays out of this generic script on purpose.**
|
|
40
|
-
`audit-ops-hygiene.cjs`'s Pattern E (cross-referencing a live PRD `.md` file
|
|
41
|
-
against the machine-wide `prd_create` audit log to flag a PRD that bypassed
|
|
42
|
-
`scheduler_create_prd`) requires session-manager's own scheduler/PRD/audit-log
|
|
43
|
-
concepts, which a swept project may not even have — adding it here would break
|
|
44
|
-
the "no assumption about vocabulary" guarantee above. When sweeping
|
|
45
|
-
session-manager's own repo, run `node scripts/audit-ops-hygiene.cjs` alongside
|
|
46
|
-
this skill and fold its Pattern C/D/E findings into the same report; when
|
|
47
|
-
sweeping a different project, Pattern E simply doesn't apply.
|
|
48
|
-
|
|
49
|
-
1. That project's own `CLAUDE.md` (if present) — the declared architecture.
|
|
50
|
-
2. Each namespace's own `README.md` under its `session-manager-operations/<namespace>/`.
|
|
51
|
-
3. On-disk content — folder names, and archived/processed subfolders.
|
|
52
|
-
|
|
53
|
-
A project with no `CLAUDE.md` still gets a useful sweep: every namespace is
|
|
54
|
-
reported `mentionedInClaudeMd: false` (nothing to compare against), so
|
|
55
|
-
`MISSING_README` and `NO_RETENTION_POLICY` findings still fire; contradiction
|
|
56
|
-
detection is simply skipped since there's no second doc layer to disagree.
|
|
57
|
-
|
|
58
|
-
## How to run it
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
node "$SM_ROOT/scripts/ops-sweep.cjs" <target-project-cwd>
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
`$SM_ROOT` is `.` when you're already working inside the session-manager repo,
|
|
65
|
-
otherwise four directories up from this file's own path (the installed package
|
|
66
|
-
root).
|
|
67
|
-
|
|
68
|
-
`<target-project-cwd>` is the project to sweep — it does **not** need to be
|
|
69
|
-
the project you're currently working in. Sweeping session-manager's own repo
|
|
70
|
-
(`.`) is a valid, common case (that's how the maintenance protocol doc itself
|
|
71
|
-
was written), but so is sweeping a different project this machine has opened
|
|
72
|
-
a TAB on.
|
|
73
|
-
|
|
74
|
-
The script prints a JSON report to stdout:
|
|
75
|
-
|
|
76
|
-
```jsonc
|
|
77
|
-
{
|
|
78
|
-
"targetCwd": "...",
|
|
79
|
-
"opsRoot": "<cwd>/session-manager-operations",
|
|
80
|
-
"hasClaudeMd": true,
|
|
81
|
-
"namespaceCount": 12,
|
|
82
|
-
"namespaces": [ { "name": "...", "findings": [ { "type": "...", "detail": "..." } ] }, ... ],
|
|
83
|
-
"findings": [ { "namespace": "...", "type": "...", "detail": "..." }, ... ]
|
|
84
|
-
}
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Finding `type`s:
|
|
88
|
-
- **MISSING_README** — namespace dir has no `README.md`.
|
|
89
|
-
- **UNDOCUMENTED** — namespace name never appears anywhere in the target's
|
|
90
|
-
`CLAUDE.md` (no declared ownership, no explicit non-owned mention either).
|
|
91
|
-
- **CONTRADICTION** — either (a) the same clause of `CLAUDE.md` uses both
|
|
92
|
-
"retired/gone" language and "owner/owns" language about this namespace, or
|
|
93
|
-
(b) the namespace's own README and `CLAUDE.md` disagree on whether it's
|
|
94
|
-
retired.
|
|
95
|
-
- **NO_RETENTION_POLICY** — namespace has files under an archived/processed
|
|
96
|
-
subfolder but its README says nothing about how long they're kept or who
|
|
97
|
-
prunes them.
|
|
98
|
-
|
|
99
|
-
## Text-heuristic findings need a sanity check before filing
|
|
100
|
-
|
|
101
|
-
Detecting "the same clause talks about both retirement and ownership" is a
|
|
102
|
-
regex heuristic over prose, not a parser — it can flag a namespace whose
|
|
103
|
-
CLAUDE.md text legitimately describes a partial retirement (e.g. "the old
|
|
104
|
-
flat layout under this namespace is retired" while the namespace itself is
|
|
105
|
-
still owned) as a false-positive CONTRADICTION. Before filing each finding,
|
|
106
|
-
read the actual CLAUDE.md clause and README the script points at and confirm
|
|
107
|
-
the drift is real. Don't file findings you can see are heuristic noise.
|
|
108
|
-
|
|
109
|
-
## Routing findings — never act directly
|
|
110
|
-
|
|
111
|
-
This skill (and the script it runs) never deletes, moves, or archives
|
|
112
|
-
anything. Once you've sanity-checked the findings:
|
|
113
|
-
|
|
114
|
-
- **Default**: report the findings to the human, grouped by namespace (one
|
|
115
|
-
block per namespace, not one per finding line — mirrors how Pattern A in the
|
|
116
|
-
protocol doc was resolved as a single unit). State the namespace, the doc
|
|
117
|
-
locations that disagree, and what decision needs to be made. Do NOT open an
|
|
118
|
-
Epic anywhere: an Epic is created only by a human pressing New Epic, and that
|
|
119
|
-
is doubly true across a project boundary.
|
|
120
|
-
- **If the user asks for PRDs in this session** (e.g. "just queue it here",
|
|
121
|
-
"PRDs on this session" — the mode used when this protocol doc's own findings
|
|
122
|
-
were resolved) — queue the work as PRDs in the *current* Epic's scheduler via
|
|
123
|
-
`/develop`. Only when the sweep target IS the current project; never author
|
|
124
|
-
PRDs into another project.
|
|
125
|
-
|
|
126
|
-
Report back: namespace count swept, finding count by type, and the Epic
|
|
127
|
-
id(s) or PRD(s) filed.
|
|
128
|
-
|
|
129
|
-
## When NOT to use this
|
|
130
|
-
|
|
131
|
-
- The user wants a one-off answer about a single namespace they already named
|
|
132
|
-
→ just read that namespace's README and the relevant CLAUDE.md section
|
|
133
|
-
directly; don't run the full sweep for a question with a known answer.
|
|
134
|
-
- Cron/scheduled sweeping across every active project cwd is an explicit
|
|
135
|
-
stretch goal, not implemented here — this skill is manual, single-project,
|
|
136
|
-
invoked per run. `src/main/lib/watchdogHelpers.cjs`'s `activeProjectCwds()`
|
|
137
|
-
is the reusable piece if that's ever built.
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pr-review-sweep:fetch
|
|
3
|
-
description: Step 0 of pr-review-sweep — fetch every unresolved review thread on one or more of the current project's PRs, fully paginated. Never trust file names, a prior status report, or a reply's own claim about what's outstanding.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# pr-review-sweep:fetch
|
|
7
|
-
|
|
8
|
-
Query GitHub's GraphQL API directly for each PR. Resolve `$owner`/`$name` from the current
|
|
9
|
-
project's own remote — `gh repo view --json owner,name -q '.owner.login,.name'` — never
|
|
10
|
-
hardcode a repo.
|
|
11
|
-
|
|
12
|
-
```graphql
|
|
13
|
-
query($owner: String!, $name: String!, $n: Int!) {
|
|
14
|
-
repository(owner: $owner, name: $name) {
|
|
15
|
-
pullRequest(number: $n) {
|
|
16
|
-
reviewThreads(first: 100) {
|
|
17
|
-
totalCount
|
|
18
|
-
nodes {
|
|
19
|
-
isResolved
|
|
20
|
-
path
|
|
21
|
-
line
|
|
22
|
-
comments(first: 3) { nodes { author { login } body createdAt } }
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Filter to `isResolved: false`. **`first: 100` is load-bearing** — `first: 50` silently
|
|
31
|
-
truncates on any PR that has grown past 50 threads (two real PRs hit this: one had 64
|
|
32
|
-
threads, another had 55; the truncated queries under-reported unresolved counts and caused
|
|
33
|
-
genuinely-missed comments). Always compare `totalCount` to how many nodes you actually
|
|
34
|
-
paged through, and keep paginating (`after:` cursor) until they match — never report a
|
|
35
|
-
count you haven't verified is complete.
|
|
36
|
-
|
|
37
|
-
## Output
|
|
38
|
-
|
|
39
|
-
One unresolved-thread list per PR, each entry carrying: the PR number, thread id, file
|
|
40
|
-
path + line, and full comment text/author/timestamp — everything `pr-review-sweep:classify`
|
|
41
|
-
needs to decide disposition and type without a second round-trip to GitHub.
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pr-review-sweep:classify
|
|
3
|
-
description: Step 1 of pr-review-sweep — classify each unresolved review thread on two independent axes — disposition (accept-as-is / policy-override / needs-my-decision) and type (bug / feature) — so downstream steps can route and template correctly.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# pr-review-sweep:classify
|
|
7
|
-
|
|
8
|
-
Decided per-thread, never per-PR — a single PR routinely mixes threads that need very
|
|
9
|
-
different handling.
|
|
10
|
-
|
|
11
|
-
## Axis 1 — disposition
|
|
12
|
-
|
|
13
|
-
- **Accept-as-is** — the reviewer's ask is valid, no repo-policy reason not to do it. The
|
|
14
|
-
default bucket.
|
|
15
|
-
- **Policy-override** — the comment conflicts with something the repo's own `AGENTS.md` /
|
|
16
|
-
`CLAUDE.local.md` already decided (a staged-rollout convention, an intentional
|
|
17
|
-
trade-off). Policy wins silently — no need to escalate to the user — but still reply
|
|
18
|
-
explaining why, so the reviewer isn't left wondering. Verify the policy text actually
|
|
19
|
-
says what you think it says before invoking this bucket; don't assume.
|
|
20
|
-
- **Needs-my-decision** — a genuine judgment call with no clear answer from repo policy
|
|
21
|
-
alone. Stop, surface the question verbatim to the user, never guess. This bucket blocks
|
|
22
|
-
only that one thread — every other thread on the PR keeps moving. A needs-my-decision
|
|
23
|
-
thread never gets a type tag (axis 2 is moot until it's decided to do the work at all).
|
|
24
|
-
|
|
25
|
-
## Axis 2 — type (accept-as-is and policy-override threads only)
|
|
26
|
-
|
|
27
|
-
- **Bug** — the reviewer flagged something objectively broken: wrong output, a crash, a
|
|
28
|
-
security issue, an off-by-one, a missed edge case. Anything where "what should happen
|
|
29
|
-
instead" is unambiguous from the current code being wrong.
|
|
30
|
-
- **Feature** — the reviewer asked for additional behavior, a refactor, or a
|
|
31
|
-
consistency/style improvement that isn't fixing broken behavior. If the current code does
|
|
32
|
-
what it currently does *on purpose* and the ask is to make it do something more or
|
|
33
|
-
different, it's a feature, not a bug — even when phrased urgently.
|
|
34
|
-
|
|
35
|
-
When genuinely ambiguous between the two (e.g. "this should also handle nulls" — is null
|
|
36
|
-
input a bug the code should already handle, or new scope?), default to **bug** only if
|
|
37
|
-
there's a concrete failing case (a real input that breaks today); otherwise **feature**.
|
|
38
|
-
Record the reasoning either way — `pr-review-sweep:queue` uses it to pick the PRD template,
|
|
39
|
-
and a future reader should be able to see why a borderline call went the way it did.
|
|
40
|
-
|
|
41
|
-
## Known-pattern check (if the project curates one)
|
|
42
|
-
|
|
43
|
-
Before finalizing type/reasoning, check whether the thread matches an already-documented
|
|
44
|
-
recurring pattern. Some projects keep a curated, evolving corpus of past review findings
|
|
45
|
-
(commonly `docs/review-*.md`, indexed from `docs/README.md`, fed by a project-local
|
|
46
|
-
`project-status-local` mining step — sigma is the reference example). If such docs exist in
|
|
47
|
-
this repo and the thread matches a named pattern there, say so in the reasoning and cite the
|
|
48
|
-
doc/section — it strengthens the bug-vs-feature call (a documented recurring bug is bug,
|
|
49
|
-
full stop) and carries forward to `:queue`. If no such docs exist, or the thread doesn't
|
|
50
|
-
match anything in them, this is a no-op — don't go hunting for docs a project doesn't have.
|
|
51
|
-
|
|
52
|
-
## Output
|
|
53
|
-
|
|
54
|
-
Per thread: `{disposition, type | null, reasoning}`. Needs-my-decision threads carry the
|
|
55
|
-
open question verbatim, collected for the final report rather than blocking the other
|
|
56
|
-
threads.
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pr-review-sweep:check-fixed
|
|
3
|
-
description: Step 2 of pr-review-sweep — before queuing anything, triage every accept-as-is / policy-override thread into already-fixed, reply-only (no code change needed), or genuinely-open. Mandatory for every survivor, including policy-override threads — skipping it on the assumption "policy-override never needs a code check" is what caused a real wrong reply (see below).
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# pr-review-sweep:check-fixed
|
|
7
|
-
|
|
8
|
-
Read the current file content at the cited location, and check recent git log/commits on
|
|
9
|
-
the PR's actual branch, for **every** accept-as-is/policy-override thread — no exceptions
|
|
10
|
-
for threads that look like a pure confirmation ask. **This step is mandatory before posting
|
|
11
|
-
any reply, not optional for policy-override threads.**
|
|
12
|
-
|
|
13
|
-
**Incident that made this mandatory:** on sigma PR #206, a policy-override thread (empty-
|
|
14
|
-
string EIK display) was replied to with "leaving as-is, test locks in current behavior"
|
|
15
|
-
without re-checking the code first — but the thread had *already been fixed* two commits
|
|
16
|
-
earlier by a different session. The wrong reply had to be corrected with a follow-up
|
|
17
|
-
comment. The cause wasn't a broken tool, it was skipping this step because the thread's
|
|
18
|
-
disposition (policy-override) felt like it obviously needed no verification. It didn't
|
|
19
|
-
obviously need verification — but it needed it anyway, and every thread does.
|
|
20
|
-
|
|
21
|
-
## Triage into three outcomes, not two
|
|
22
|
-
|
|
23
|
-
1. **Already-fixed** — the code (or a recent commit on the PR's branch) already does what
|
|
24
|
-
the thread asks. Routes straight to `pr-review-sweep:land-and-resolve`, citing the
|
|
25
|
-
fixing commit SHA. Skips `:queue` entirely.
|
|
26
|
-
2. **Reply-only, no code change needed** — the thread is fully answered by information
|
|
27
|
-
that already exists (a repo convention, an intentional design documented elsewhere, a
|
|
28
|
-
fact about the code the reviewer didn't have) and genuinely requires zero code change to
|
|
29
|
-
resolve — not "a trivial one-line fix," but literally nothing to write. Common for
|
|
30
|
-
policy-override threads whose reviewer ask was really a question ("confirm X is
|
|
31
|
-
intentional") rather than a change request. Routes straight to
|
|
32
|
-
`pr-review-sweep:land-and-resolve`, citing the evidence/reasoning instead of a SHA.
|
|
33
|
-
**Do not send these to `:queue`** — queuing a PRD to "fix" a thread that needs no fix
|
|
34
|
-
wastes a scheduler run and produces a PRD with no real acceptance criteria to execute.
|
|
35
|
-
3. **Genuinely open** — needs an actual code change that doesn't exist yet. Goes to
|
|
36
|
-
`pr-review-sweep:queue` as before, carrying its `{disposition, type}` tags.
|
|
37
|
-
|
|
38
|
-
The dividing line between outcomes 2 and 3: if you can point to the exact existing
|
|
39
|
-
line/paragraph that answers the reviewer's ask, it's outcome 2. If satisfying the ask
|
|
40
|
-
requires writing or changing any code, however small, it's outcome 3 — don't downgrade a
|
|
41
|
-
real fix to "reply-only" just because it's tiny; that's what `:queue`'s bug/feature
|
|
42
|
-
templates are for, sized appropriately.
|
|
43
|
-
|
|
44
|
-
## Output
|
|
45
|
-
|
|
46
|
-
Three lists per PR:
|
|
47
|
-
- **already-fixed** (thread id + the commit/line that fixed it) → `:land-and-resolve`
|
|
48
|
-
- **reply-only** (thread id + the evidence/reasoning to cite) → `:land-and-resolve`
|
|
49
|
-
- **survives** (thread id, disposition, type) → `:queue`
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pr-review-sweep:queue
|
|
3
|
-
description: Step 3 of pr-review-sweep — bundle surviving accept-as-is/policy-override threads by (PR, type) and queue one /develop PRD per bundle. Never fixes inline; the scheduler is the only place code changes happen.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# pr-review-sweep:queue
|
|
7
|
-
|
|
8
|
-
Only ever receives the **survives** list from `pr-review-sweep:check-fixed` — threads that
|
|
9
|
-
genuinely need a code change that doesn't exist yet. `check-fixed` has already routed
|
|
10
|
-
already-fixed and reply-only threads straight to `land-and-resolve`, so if you're looking
|
|
11
|
-
at a thread here, it needs real code written; don't second-guess that by trying to answer
|
|
12
|
-
it with a reply instead of a PRD.
|
|
13
|
-
|
|
14
|
-
Group `survives` threads by **(PR number, type)** — up to two bundles per PR, one `bug` and
|
|
15
|
-
one `feature`. Queue each bundle as its own `/develop` PRD. Never write the fix in this
|
|
16
|
-
session; this step's own actions are read-only except for the act of queuing.
|
|
17
|
-
|
|
18
|
-
## Duplicate-PRD guard (idempotency)
|
|
19
|
-
|
|
20
|
-
Before queuing a bundle, check the scheduler queue for an existing queued/in-flight PRD for
|
|
21
|
-
that same (PR, type). If one exists, skip queuing and report the existing PRD id instead —
|
|
22
|
-
re-running `pr-review-sweep` must never double-queue the same bundle. If a thread newly
|
|
23
|
-
qualifies for a bundle that already has an in-flight PRD (e.g. a fresh review comment
|
|
24
|
-
landed after the PRD was queued but before it completed), do not silently fold it in —
|
|
25
|
-
queue a follow-up PRD once the first completes, so each PRD's diff stays traceable to a
|
|
26
|
-
known snapshot of threads.
|
|
27
|
-
|
|
28
|
-
## PRD acceptance criteria, by type
|
|
29
|
-
|
|
30
|
-
Every PRD, regardless of type, ends with: commit + push to the fork branch that owns the
|
|
31
|
-
PR (never `origin`, never force-push, never a new PR to carry a review fix — land on the
|
|
32
|
-
existing PR's branch), and the standard two independent verification passes before commit.
|
|
33
|
-
|
|
34
|
-
- **`bug` bundle** — additionally require: reproduce each defect described in the bundled
|
|
35
|
-
threads, write a regression test per defect that fails before the fix and passes after,
|
|
36
|
-
then fix. The PRD body should quote the reviewer's exact wording per thread so the
|
|
37
|
-
executor root-causes the actual reported defect, not a guessed one. If `:classify` flagged
|
|
38
|
-
a thread as matching a known documented pattern (see its "Known-pattern check"), the PRD
|
|
39
|
-
must say so explicitly and instruct the executor to **grep the rest of the codebase for
|
|
40
|
-
the same pattern, not just fix the one flagged instance** — several of sigma's own
|
|
41
|
-
documented patterns (e.g. an SSR-unsafe `useLayoutEffect`, an un-deduped array into a D1
|
|
42
|
-
`IN (...)`) turned out to be the exact same bug copy-pasted across 5+ sibling files, each
|
|
43
|
-
caught as a separate review comment on a separate PR because the first fix never swept the
|
|
44
|
-
rest. One PRD closing all occurrences beats N PRDs closing them one review cycle at a time.
|
|
45
|
-
- **`feature` bundle** — additionally require: scope the change to exactly what each
|
|
46
|
-
bundled thread asked for (no piggybacked scope creep across threads even though they're
|
|
47
|
-
bundled together), match existing patterns/conventions in the touched files, and add a
|
|
48
|
-
test only if the ask itself introduces new testable behavior.
|
|
49
|
-
|
|
50
|
-
Neither template authorizes a description edit or a reviewer request — those stay
|
|
51
|
-
`pr-review-sweep:land-and-resolve`'s and `pr-signal`'s jobs respectively, so a PR's
|
|
52
|
-
description reflects the *final* landed state, not a snapshot mid-fix.
|
|
53
|
-
|
|
54
|
-
## Output
|
|
55
|
-
|
|
56
|
-
Per (PR, type) bundle: a queued PRD id (new or pre-existing), or — if `survives` was empty
|
|
57
|
-
for that PR — nothing to queue, reported as such rather than silently skipped.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pr-review-sweep:land-and-resolve
|
|
3
|
-
description: Step 4 of pr-review-sweep — reply on the GitHub thread and resolve it, via one of three entry points from check-fixed/queue (already-fixed, reply-only, or a completed PRD). Runs async relative to steps 0-3 for the PRD path, typically triggered by a later project-status-local pass noticing a completed PRD.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# pr-review-sweep:land-and-resolve
|
|
7
|
-
|
|
8
|
-
Three entry points:
|
|
9
|
-
|
|
10
|
-
1. **Already-fixed threads** from `pr-review-sweep:check-fixed` — no PRD to wait on, act
|
|
11
|
-
immediately, citing the commit that step already identified.
|
|
12
|
-
2. **Reply-only threads** from `pr-review-sweep:check-fixed` — no PRD, no commit; act
|
|
13
|
-
immediately, citing the evidence/reasoning `check-fixed` already worked out (a repo
|
|
14
|
-
convention, an intentional-design confirmation, a fact about the code the reviewer
|
|
15
|
-
didn't have). **Re-verify that reasoning is still accurate right now, not just at
|
|
16
|
-
classify time** — code moves between when a thread was classified and when you're about
|
|
17
|
-
to reply; don't post a stale "confirmed" against code that's since changed.
|
|
18
|
-
3. **Queued PRDs** from `pr-review-sweep:queue` that the scheduler now reports
|
|
19
|
-
`completed` — this is where this step actually waits on external state; a fresh
|
|
20
|
-
`/project-status` (or manual) run is what notices the PRD finished and re-enters here.
|
|
21
|
-
|
|
22
|
-
## Steps
|
|
23
|
-
|
|
24
|
-
1. **For the PRD entry point only:** confirm the PRD actually ran its required
|
|
25
|
-
verification — both independent passes, and (for a `bug` bundle) that the regression
|
|
26
|
-
test genuinely exists and is green, not just claimed in the PRD's own summary. A PRD
|
|
27
|
-
marked `completed` without evidence of the ACs having run is `needs_review`, not landed —
|
|
28
|
-
report it as stuck, don't proceed to reply/resolve. (Already-fixed and reply-only
|
|
29
|
-
entries have no PRD to verify — skip to step 2.)
|
|
30
|
-
2. **Confirm CI is green** on the PR (for the PRD entry point, after the PRD's commit
|
|
31
|
-
landed; for already-fixed/reply-only, CI state is whatever it already is).
|
|
32
|
-
3. **Reply** on each thread — naming the specific fixing commit SHA for already-fixed/PRD
|
|
33
|
-
entries, or the evidence/reasoning for reply-only entries — so the reviewer can verify
|
|
34
|
-
without re-reading the whole diff or re-asking the question.
|
|
35
|
-
4. **Resolve** the thread via GraphQL `resolveReviewThread`. Order matters: reply first,
|
|
36
|
-
resolve second, so there's a paper trail explaining why a thread closed before it drops
|
|
37
|
-
off the unresolved list.
|
|
38
|
-
|
|
39
|
-
Needs-my-decision threads (set aside back in `pr-review-sweep:classify`), and any
|
|
40
|
-
policy-override thread where convention says the reviewer should be the one to close it,
|
|
41
|
-
are deliberately left unresolved after the reply — that is correct behavior, not an
|
|
42
|
-
oversight.
|
|
43
|
-
|
|
44
|
-
## Stuck PRDs
|
|
45
|
-
|
|
46
|
-
A `failed` or `needs_review` PRD is reported to the user as a stuck bundle, never silently
|
|
47
|
-
retried and never silently downgraded to an inline fix — re-queuing or fixing it directly
|
|
48
|
-
both require the user's decision, since either implies the original PRD's scope or ACs
|
|
49
|
-
were wrong.
|
|
50
|
-
|
|
51
|
-
## Hard constant
|
|
52
|
-
|
|
53
|
-
**Never contact a reviewer** at any point in this step — replying to a thread and
|
|
54
|
-
resolving it are not reviewer contact; requesting/re-requesting one is `pr-signal`'s job
|
|
55
|
-
alone, gated separately.
|
|
56
|
-
|
|
57
|
-
## Output
|
|
58
|
-
|
|
59
|
-
Per thread: resolved (+ the SHA it was resolved against), or reported as blocked (PRD
|
|
60
|
-
still in flight, or stuck) — loops back to `project-status-local`'s rollup either way.
|