claude-code-session-manager 0.111.0 → 0.113.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-wvrcLGGS.js} +2 -2
- package/dist/assets/{Button-DsEYRZg0.js → Button-B6h0F0XT.js} +1 -1
- package/dist/assets/{DataModel-D8sbvvBC.js → DataModel-C5pW9E3u.js} +1 -1
- package/dist/assets/{History-BEHLtxia.js → History-BV4e8YOM.js} +2 -2
- package/dist/assets/{Hooks-CKpvlXrg.js → Hooks-CrFSv4x1.js} +3 -3
- package/dist/assets/{Library-CeF4qh9d.js → Library-D-GIt3EY.js} +5 -5
- package/dist/assets/{ListDetail-DcfmxPFk.js → ListDetail-Bco_wfs6.js} +1 -1
- package/dist/assets/{MarkdownEditor-CvK1pyto.js → MarkdownEditor-C-yHSXNV.js} +1 -1
- package/dist/assets/{McpServers-D-h2ihzJ.js → McpServers-CfDekadG.js} +2 -2
- package/dist/assets/{Memory-BnF89x8v.js → Memory-CGGLexkR.js} +4 -4
- package/dist/assets/{Panel-CQY5zano.js → Panel-DGMEuYYG.js} +1 -1
- package/dist/assets/{Permissions-DLukmmsz.js → Permissions-Cx2zjtYZ.js} +3 -3
- package/dist/assets/{Plugins-0Pf0OZ4l.js → Plugins-Bc_W3IyR.js} +2 -2
- package/dist/assets/ProvenanceBadge-DiKAUR1u.js +1 -0
- package/dist/assets/RemoteMachines-8_77-WPD.js +3 -0
- package/dist/assets/{SaveBar-DjijiUb0.js → SaveBar-Blpzdq1R.js} +1 -1
- package/dist/assets/{Scheduler-Cm3EXZvE.js → Scheduler-Bd70AM4X.js} +9 -9
- package/dist/assets/{ScopeSwitcher-B-P-kSfq.js → ScopeSwitcher-wxN0h4YW.js} +1 -1
- package/dist/assets/Settings-CQ7DA3zW.js +4 -0
- package/dist/assets/{SkillReferenceGraph-Epv2GJmj.js → SkillReferenceGraph-DH1NLOiS.js} +1 -1
- package/dist/assets/Skills-CmyRyu4_.js +2 -0
- package/dist/assets/SystemPrompt-KAc3UMCd.js +1 -0
- package/dist/assets/TagLibrary-C8EvHnpg.js +1 -0
- package/dist/assets/{TiptapBody-DAMO3DhO.js → TiptapBody-d423mH6D.js} +1 -1
- package/dist/assets/{Toggle-Ba_f7q_m.js → Toggle-D1wsGE9S.js} +1 -1
- package/dist/assets/{ViewTabs-CGX6MAhc.js → ViewTabs-CjHw3kGY.js} +1 -1
- package/dist/assets/{historyTotals-vgfk8EOL.js → historyTotals-DFHzqLt7.js} +1 -1
- package/dist/assets/{index-CPieAFsl.js → index-Ci1u018F.js} +266 -266
- package/dist/assets/{settingsSchema-D0FxNrTy.js → settingsSchema-Ctf3pZVI.js} +1 -1
- package/dist/assets/{useAgentsDirWatch-DCu6BNYN.js → useAgentsDirWatch-B1NBmOAe.js} +1 -1
- package/dist/assets/{useRemotePeers-D4cdJDyh.js → useRemotePeers-BHjSJs9D.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/plugins/session-manager-dev/skills/send-feedback/SKILL.md +13 -0
- 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 +27 -9
- 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 +30 -13
- package/src/main/config.cjs +20 -3
- 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 +50 -132
- package/src/main/ipcSchemas.cjs +13 -10
- package/src/main/lib/CLAUDE.md +48 -0
- package/src/main/lib/activeSessions.cjs +14 -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/claude/rateLimitDetect.cjs +54 -0
- package/src/main/lib/{rateLimitWindow.cjs → claude/rateLimitWindow.cjs} +24 -12
- package/src/main/lib/{runClaudeP.cjs → claude/runClaudeP.cjs} +1 -1
- package/src/main/lib/credentials.cjs +18 -92
- 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} +114 -16
- 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/feedback-remote/humanPromptLedger.cjs +93 -0
- 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/mcpToolCatalog.cjs +9 -3
- 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/{depSlugResolve.cjs → prd/depSlugResolve.cjs} +16 -1
- 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/scheduler/finalizeReason.cjs +30 -0
- package/src/main/lib/{fixChainDepth.cjs → scheduler/fixChainDepth.cjs} +1 -1
- package/src/main/lib/scheduler/flatSweepThrottle.cjs +17 -0
- 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/{runLogRetention.cjs → scheduler/runLogRetention.cjs} +34 -13
- package/src/main/lib/{scheduleJobTransitions.cjs → scheduler/scheduleJobTransitions.cjs} +3 -3
- package/src/main/lib/{schedulerBatch.cjs → scheduler/schedulerBatch.cjs} +9 -13
- 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} +12 -8
- package/src/main/lib/{telemetrySettings.cjs → telemetry/telemetrySettings.cjs} +1 -1
- package/src/main/lib/{atomicFs.cjs → util/atomicFs.cjs} +42 -0
- package/src/main/lib/{loopDelay.cjs → util/loopDelay.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 +6 -3
- 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 +331 -3320
- 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 +50 -27
- 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 +22 -7
- package/src/preload/api.d.ts +14 -8
- package/src/preload/index.cjs +9 -3
- package/dist/assets/ProvenanceBadge-vC7Tj-JP.js +0 -1
- package/dist/assets/RemoteMachines-CWnKbFHc.js +0 -3
- package/dist/assets/Settings-DYDlp2m_.js +0 -4
- package/dist/assets/Skills-DHO0N0C2.js +0 -2
- package/dist/assets/SystemPrompt-DxeNofL9.js +0 -1
- package/dist/assets/TagLibrary-QOAs7ISO.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/rateLimitDetect.cjs +0 -35
- /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/{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/{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/{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/{lruCache.cjs → util/lruCache.cjs} +0 -0
- /package/src/main/lib/{withTimeout.cjs → util/withTimeout.cjs} +0 -0
|
@@ -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.
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pr-review-sweep
|
|
3
|
-
description: Sweep one or more of the current project's PRs' unresolved review comments end-to-end — fetch (paginated), classify by disposition AND bug-vs-feature type, check-if-already-fixed, queue a scheduler PRD per (PR, type), then land-and-resolve once it completes. Orchestrates 5 nested sub-skills (pr-review-sweep:fetch, :classify, :check-fixed, :queue, :land-and-resolve). Never fixes inline, never contacts reviewers. Use when a PR has open review feedback that needs triaging and landing.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# pr-review-sweep (orchestrator)
|
|
7
|
-
|
|
8
|
-
Global, project-agnostic PR-review-clearing pipeline — works against whatever repo the
|
|
9
|
-
current project's `gh` remote points to. Run this per-PR whenever `/project-status` (or a
|
|
10
|
-
manual check) surfaces unresolved review threads. Codified from the process used to clear
|
|
11
|
-
review rounds on `midt-bg/sigma` PRs; a project's own `AGENTS.md`/`CLAUDE.local.md` may add
|
|
12
|
-
repo-specific policy notes (e.g. which threads are auto-accept vs. needs-decision, house
|
|
13
|
-
style for reply text) that this skill should read and respect if present.
|
|
14
|
-
|
|
15
|
-
**Naming convention (see a project's own `AGENTS.md` if it documents one; otherwise this
|
|
16
|
-
convention still applies as the plugin's own standard):** sub-skill directories are prefixed
|
|
17
|
-
`0-`, `1-`, ... in execution order, so a plain directory listing sorts in DAG order without
|
|
18
|
-
opening any file. The invocable `name:` field stays a clean colon-scoped identifier
|
|
19
|
-
(`pr-review-sweep:fetch`) without the numeric prefix.
|
|
20
|
-
|
|
21
|
-
**Always via the scheduler.** Every genuinely-unfixed thread is fixed by a `/develop` PRD,
|
|
22
|
-
never inline in this session — no "fast path" for small mechanical fixes. The scheduler is
|
|
23
|
-
the one place real code changes happen (global CLAUDE.md model-economics rule: interactive
|
|
24
|
-
sessions run an expensive planner-tier model; execution belongs on the cheap executor
|
|
25
|
-
tier). If a fast lane for small review fixes turns out to be worth having, that's a
|
|
26
|
-
scheduler-level feature (a priority/fast queue lane) to build later — not a reason for this
|
|
27
|
-
skill to bypass the scheduler now.
|
|
28
|
-
|
|
29
|
-
## Pipeline DAG
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
PR number(s)
|
|
33
|
-
│
|
|
34
|
-
▼
|
|
35
|
-
┌───────────────────────────┐
|
|
36
|
-
│ 0. pr-review-sweep:fetch │ paginated GraphQL, reviewThreads.isResolved ground truth
|
|
37
|
-
└───────────────────────────┘
|
|
38
|
-
│ every unresolved thread, full text + location
|
|
39
|
-
▼
|
|
40
|
-
┌───────────────────────────┐
|
|
41
|
-
│ 1. pr-review-sweep:classify │ disposition (accept/policy-override/needs-decision)
|
|
42
|
-
└───────────────────────────┘ × type (bug/feature) — two independent axes
|
|
43
|
-
│ per thread: {disposition, type}, needs-decision threads set aside
|
|
44
|
-
▼
|
|
45
|
-
┌───────────────────────────┐
|
|
46
|
-
│ 2. pr-review-sweep:check-fixed │ MANDATORY for every survivor — triage into 3 outcomes
|
|
47
|
-
└───────────────────────────┘ before queuing or replying to anything
|
|
48
|
-
│ │ │
|
|
49
|
-
│ already-fixed│ reply-only │ survives (genuinely needs new code)
|
|
50
|
-
▼ ▼ ▼
|
|
51
|
-
└──────┬───────┘ ┌───────────────────────────┐
|
|
52
|
-
│ │ 3. pr-review-sweep:queue │ one /develop PRD per
|
|
53
|
-
│ └───────────────────────────┘ (PR, type) bundle,
|
|
54
|
-
│ │ queued PRD id, or duplicate-guarded
|
|
55
|
-
│ │ "already queued"
|
|
56
|
-
│ ▼
|
|
57
|
-
│ ... async, on scheduler ...
|
|
58
|
-
│ │
|
|
59
|
-
▼ ▼
|
|
60
|
-
┌───────────────────────────────────┐
|
|
61
|
-
│ 4. pr-review-sweep:land-and-resolve │ cite SHA (already-fixed/PRD) or
|
|
62
|
-
└───────────────────────────────────┘ reasoning (reply-only); reply; resolve
|
|
63
|
-
│
|
|
64
|
-
▼
|
|
65
|
-
thread resolved, or reported stuck (failed/needs_review PRD)
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
| Step | Input | Output | On failure/empty |
|
|
69
|
-
|---|---|---|---|
|
|
70
|
-
| 0. `pr-review-sweep:fetch` | one or more PR numbers | every unresolved review thread, verified-complete (paginated) | n/a — loops its own fetch until `totalCount` matches nodes paged |
|
|
71
|
-
| 1. `pr-review-sweep:classify` | unresolved threads | each thread tagged `{disposition, type}` | needs-decision threads are set aside, surfaced to the user, never guessed |
|
|
72
|
-
| 2. `pr-review-sweep:check-fixed` | accept/policy-override threads — **every one, no shortcuts** | `already-fixed` (w/ commit) + `reply-only` (w/ reasoning) + `survives` | never skip this because a thread's disposition "obviously" needs no code check — see the incident documented in that step's own file |
|
|
73
|
-
| 3. `pr-review-sweep:queue` | `survives` only, grouped by (PR, type) | one queued `/develop` PRD id per bundle | if a PRD for that (PR, type) is already queued/in-flight, skip and report its id — never double-queue |
|
|
74
|
-
| 4. `pr-review-sweep:land-and-resolve` | already-fixed / reply-only (immediate) or a PRD reported `completed` by the scheduler | thread replied (SHA or reasoning) + resolved | `failed`/`needs_review`/stuck PRDs are reported, never silently retried |
|
|
75
|
-
|
|
76
|
-
## Why two independent classification axes (step 1)
|
|
77
|
-
|
|
78
|
-
**Disposition** (accept-as-is / policy-override / needs-my-decision) answers "should this
|
|
79
|
-
be done at all, and does it need a human." **Type** (bug / feature) answers "what shape of
|
|
80
|
-
change is this, once we've decided to do it" — and drives which PRD template/acceptance
|
|
81
|
-
criteria `pr-review-sweep:queue` writes:
|
|
82
|
-
|
|
83
|
-
- **Bug** — the reviewer flagged something objectively broken (wrong output, crash,
|
|
84
|
-
security issue, off-by-one, missed edge case). The PRD's ACs require: a reproduction of
|
|
85
|
-
the defect, a regression test that fails before the fix and passes after, then the fix
|
|
86
|
-
itself.
|
|
87
|
-
- **Feature** — the reviewer asked for additional behavior, a refactor, or a
|
|
88
|
-
consistency/style improvement that isn't fixing broken behavior. The PRD's ACs require
|
|
89
|
-
scoping tightly to exactly what was asked (no piggybacked scope creep) and consistency
|
|
90
|
-
with existing patterns in the touched file; a regression test is only required if the ask
|
|
91
|
-
itself adds testable behavior.
|
|
92
|
-
|
|
93
|
-
Splitting by type — rather than one undifferentiated "fix it" PRD per PR — is what lets each
|
|
94
|
-
bundle get acceptance criteria actually suited to the kind of work it is, and is the reason
|
|
95
|
-
this classification exists as its own step rather than being folded into disposition.
|
|
96
|
-
|
|
97
|
-
## Hard constants across all five steps
|
|
98
|
-
|
|
99
|
-
- **Ground truth for "unresolved" is GraphQL `reviewThreads.isResolved`**, fully paginated
|
|
100
|
-
(`first: 100` — smaller page sizes have silently truncated on real PRs; always compare
|
|
101
|
-
`totalCount` to nodes actually paged through). Never a last-reply/last-push heuristic.
|
|
102
|
-
- **Never contact a reviewer** — no request, re-request, or nudge, at any point in this
|
|
103
|
-
process. Reviewer contact is `pr-signal`'s job alone, gated behind the user's explicit,
|
|
104
|
-
per-PR, freshly-given approval every time. A prior approval never carries forward.
|
|
105
|
-
- **Never fix inline.** Every genuinely-unfixed thread goes through `/develop`, no
|
|
106
|
-
exceptions — see the scheduler note above.
|
|
107
|
-
- **Idempotent re-runs.** One queued/in-flight PRD per (PR, type) bundle; replies aren't
|
|
108
|
-
re-posted; resolving an already-resolved thread is a no-op.
|
|
109
|
-
|
|
110
|
-
## Why nested skills instead of one inline sequence
|
|
111
|
-
|
|
112
|
-
Each step is its own file so it shows up as its own invocation in whatever surface tracks
|
|
113
|
-
skill/tool calls, and so a step can be changed (a new PRD template for a third `type`
|
|
114
|
-
bucket, a different fetch page size) without touching the others. `classify` is the step
|
|
115
|
-
most likely to grow — if a third type axis value earns its own PRD template later (e.g.
|
|
116
|
-
`docs`, `perf`), or `queue` needs different bundling logic per type, decompose that step
|
|
117
|
-
further the same way `issue-address:select` was, rather than growing this file.
|
|
118
|
-
|
|
119
|
-
## What this skill is not
|
|
120
|
-
|
|
121
|
-
- Not for GitHub issues — that's `issue-address` (a different data source: issues, not
|
|
122
|
-
open-PR review threads).
|
|
123
|
-
- Not a decision on whether to contact a reviewer — that's `pr-signal`, invoked separately
|
|
124
|
-
and rarely.
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pr-signal
|
|
3
|
-
description: >-
|
|
4
|
-
Request or re-request a reviewer on one PR on the current project's repo — the ONLY
|
|
5
|
-
step in the PR flow that contacts a person. Deliberately separate from pr-review-sweep
|
|
6
|
-
and meant to be invoked rarely — most projects don't tag reviewers often. Requires the
|
|
7
|
-
user's explicit, fresh, per-PR approval every time — a prior approval never carries
|
|
8
|
-
forward, and CI must be green at the moment of signaling, not just when approval was
|
|
9
|
-
given. Use only when the user explicitly names a PR number and says to
|
|
10
|
-
request/ping/notify the reviewer, or approves signaling in response to a
|
|
11
|
-
pr-review-sweep report.
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# pr-signal — the one step that contacts a reviewer (rare, gated)
|
|
15
|
-
|
|
16
|
-
Global, project-agnostic — works against whatever repo the current project's `gh` remote
|
|
17
|
-
points to. Input: a PR whose queued PRDs have all landed and whose threads
|
|
18
|
-
`pr-review-sweep:land-and-resolve` has replied to and resolved (CI green) — plus the user's
|
|
19
|
-
explicit approval for this specific PR number, given in this conversation, not inherited
|
|
20
|
-
from an earlier one. If the project has its own reviewer-contact policy doc (e.g. sigma's
|
|
21
|
-
`docs/pr-review-workflow.local.md`), read it for repo-specific nuance — reviewer identity,
|
|
22
|
-
cadence norms — but the approval-per-PR and CI-green-at-signal-time gates below are hard
|
|
23
|
-
constants regardless of what a project's doc says.
|
|
24
|
-
|
|
25
|
-
**This skill runs far less often than the rest of the flow.** Most PRs on this repo don't need
|
|
26
|
-
an explicit re-request — a push alone re-triggers review for an already-requested reviewer, and
|
|
27
|
-
this team doesn't like being tagged unnecessarily. Only invoke this when the user actually asks
|
|
28
|
-
for it, by PR number.
|
|
29
|
-
|
|
30
|
-
## Steps
|
|
31
|
-
|
|
32
|
-
1. **Verify the gate, don't assume it from a report given earlier in the conversation:**
|
|
33
|
-
- The PR is still open (`gh pr view <n> --json state,mergedAt`) — a merged/closed PR gets
|
|
34
|
-
no signal; report the state change instead.
|
|
35
|
-
- Every review thread is resolved (re-check now via GraphQL `reviewThreads.isResolved` — a
|
|
36
|
-
`pr-review-sweep:land-and-resolve` report from even a few minutes ago can be stale if
|
|
37
|
-
anything else touched the PR, and a new comment that arrived since means the PR goes back
|
|
38
|
-
through `pr-review-sweep:classify`, not to a signal).
|
|
39
|
-
- CI is green **right now** — re-run `gh pr checks <n> --repo "$(gh repo view --json nameWithOwner -q .nameWithOwner)"` immediately
|
|
40
|
-
before acting. An approval given while CI was green does not survive CI going red in
|
|
41
|
-
between (a later push, a flaky rerun). If CI is red at signal-time, stop and report it —
|
|
42
|
-
never signal on a stale approval, and never solicit approval on a PR that's currently
|
|
43
|
-
CI-red in the first place.
|
|
44
|
-
- No review is already outstanding (requested, not yet dismissed by a later push) — if one
|
|
45
|
-
is, the push itself was already the signal; do not re-request
|
|
46
|
-
([[no-reviewer-ping-without-approval]] / [[reviewers-dont-spam]]).
|
|
47
|
-
- The user's approval is for **this PR number, in this conversation** — a blanket "yes,
|
|
48
|
-
signal when ready" said about a different PR, or said before this session, does not count.
|
|
49
|
-
|
|
50
|
-
2. **If any gate check fails**, stop and report exactly which one — don't ask "should I signal
|
|
51
|
-
now?" as a throwaway line and proceed anyway.
|
|
52
|
-
|
|
53
|
-
3. **If every gate check passes**, request the reviewer:
|
|
54
|
-
```bash
|
|
55
|
-
gh pr edit <number> --repo "$(gh repo view --json nameWithOwner -q .nameWithOwner)" --add-reviewer <reviewer>
|
|
56
|
-
```
|
|
57
|
-
If `gh pr edit` fails with the known "Projects (classic)" GraphQL deprecation error on this
|
|
58
|
-
repo, fall back to
|
|
59
|
-
`gh api repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/pulls/<n>/requested_reviewers -f "reviewers[]=<reviewer>"` —
|
|
60
|
-
and send it exactly once; verify via `gh pr view <n> --json reviewRequests` rather than
|
|
61
|
-
retrying blind (a retry after an ambiguous failure is how a double-ping happens).
|
|
62
|
-
Do not add a "ready for re-review" comment or @-mention on top of the request — the request
|
|
63
|
-
itself is the signal; a comment on top of it is the over-notification this skill exists to
|
|
64
|
-
avoid.
|
|
65
|
-
|
|
66
|
-
4. **Report** the PR as signaled, and loop back to `project-status-local` to pick up the new
|
|
67
|
-
state on its next run.
|