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,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: issue-address:reproduce
|
|
3
|
-
description: Step 2 of issue-address — reproduce a confirmed-open issue locally with a failing test (red), using hypothesis-driven debugging. Stops and reports if the issue doesn't actually reproduce.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# issue-address:reproduce
|
|
7
|
-
|
|
8
|
-
Called after `issue-address:confirm-open` returns GO, with the issue's title/body/repro
|
|
9
|
-
steps in hand. Leans on `systematic-debugging` and `test-driven-development`.
|
|
10
|
-
|
|
11
|
-
## Steps
|
|
12
|
-
|
|
13
|
-
1. **Form an explicit hypothesis** for what's actually broken, grounded in the issue's
|
|
14
|
-
description — name the file/function you expect is at fault and why, before touching
|
|
15
|
-
anything.
|
|
16
|
-
|
|
17
|
-
2. **Locate the relevant code path** — search for the function/route/query the issue
|
|
18
|
-
describes; read it fully before writing a test against it.
|
|
19
|
-
|
|
20
|
-
3. **Write a test that captures the reported bug.** It must exercise the exact scenario
|
|
21
|
-
the issue describes (same inputs, same expected-vs-actual mismatch), using this repo's
|
|
22
|
-
existing test patterns/helpers for that area (reuse fixtures, don't invent parallel
|
|
23
|
-
ones).
|
|
24
|
-
|
|
25
|
-
4. **Run it and confirm it fails (red)** — this is the proof the bug is real, not just
|
|
26
|
-
assumed from the issue text. Capture the actual failure output.
|
|
27
|
-
|
|
28
|
-
5. **If it does NOT fail** (test passes immediately): the issue may already be fixed,
|
|
29
|
-
stale, or a misunderstanding. **Stop and report this** rather than fabricating a fix for
|
|
30
|
-
a bug that doesn't reproduce — this is a valid, useful outcome, not a failure of the
|
|
31
|
-
skill.
|
|
32
|
-
|
|
33
|
-
6. **If reproduction is hard**, bisect rather than guess repeatedly: halve the input or
|
|
34
|
-
code path, or check `git log` on the relevant files for a recent change that lines up
|
|
35
|
-
with when the bug was reported. Record each bisection step.
|
|
36
|
-
|
|
37
|
-
## Output
|
|
38
|
-
|
|
39
|
-
Hand off to `issue-address:fix`: the failing test (file:line), the confirmed root-cause
|
|
40
|
-
hypothesis, and the actual red-phase failure output as evidence.
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: issue-address:fix
|
|
3
|
-
description: Step 3 of issue-address — root-cause and implement the fix for a reproduced issue, given the failing test from issue-address-reproduce. Does not run the broader verification pass — that's issue-address-verify.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# issue-address:fix
|
|
7
|
-
|
|
8
|
-
Called after `issue-address:reproduce` hands off a failing test + root-cause hypothesis.
|
|
9
|
-
|
|
10
|
-
## Steps
|
|
11
|
-
|
|
12
|
-
1. **Confirm the root cause**, not just the symptom the test exercises — read the
|
|
13
|
-
surrounding code for the actual invariant being violated. A fix that makes the specific
|
|
14
|
-
test pass without addressing the underlying cause will resurface as a different bug
|
|
15
|
-
later.
|
|
16
|
-
|
|
17
|
-
2. **Check for an existing helper/pattern before writing new logic** (API-reuse standard):
|
|
18
|
-
search the codebase for a similar computation/validation/formatting already
|
|
19
|
-
implemented elsewhere. Extend or reuse it rather than forking a parallel
|
|
20
|
-
implementation.
|
|
21
|
-
|
|
22
|
-
3. **Implement the fix** — the smallest correct change that addresses the root cause, in
|
|
23
|
-
the style/conventions of the surrounding code.
|
|
24
|
-
|
|
25
|
-
4. **Run the reproduction test from step 2 only** (not the full suite yet — that's the
|
|
26
|
-
next skill) to confirm it now passes. If it still fails, iterate on the fix, not the
|
|
27
|
-
test.
|
|
28
|
-
|
|
29
|
-
## Output
|
|
30
|
-
|
|
31
|
-
Hand off to `issue-address:verify`: the diff, the now-passing reproduction test, and a
|
|
32
|
-
one-line statement of the actual root cause fixed (for the eventual commit message and
|
|
33
|
-
review).
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: issue-address:verify
|
|
3
|
-
description: Step 4 of issue-address — prove the new reproduction test passes AND the full existing test suite/typecheck still pass (no regressions), given a fix from issue-address-fix. The gate before requesting-code-review.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# issue-address:verify
|
|
7
|
-
|
|
8
|
-
Called after `issue-address:fix` lands a fix and confirms the single reproduction test is
|
|
9
|
-
green. This step's job is the broader safety net.
|
|
10
|
-
|
|
11
|
-
## Steps
|
|
12
|
-
|
|
13
|
-
1. **Re-run the reproduction test** on its own once more — confirm green (belt-and-braces,
|
|
14
|
-
in case an intervening change touched it).
|
|
15
|
-
|
|
16
|
-
2. **Run the project's full relevant test suite** — not a hand-picked subset:
|
|
17
|
-
```bash
|
|
18
|
-
pnpm --filter <affected-package> test
|
|
19
|
-
```
|
|
20
|
-
and if the fix touches more than one workspace package, run each affected package's
|
|
21
|
-
suite. Report the actual pass count (e.g. "419/419 passed"), not just "tests pass."
|
|
22
|
-
|
|
23
|
-
3. **Run typecheck**:
|
|
24
|
-
```bash
|
|
25
|
-
pnpm --filter <affected-package> typecheck
|
|
26
|
-
```
|
|
27
|
-
A green test suite with a broken typecheck is not done.
|
|
28
|
-
|
|
29
|
-
4. **If anything besides the target reproduction test is red**, fix it before proceeding —
|
|
30
|
-
never report this step as passed on a partially red suite. Identify whether the new
|
|
31
|
-
failure is a genuine regression from this fix or a pre-existing flake (check if it
|
|
32
|
-
fails on the base branch too, via stash/checkout if needed) before deciding how to
|
|
33
|
-
handle it.
|
|
34
|
-
|
|
35
|
-
## Output
|
|
36
|
-
|
|
37
|
-
A clean verification report (suite name → pass count, typecheck status) to hand to
|
|
38
|
-
`requesting-code-review` (existing skill, not nested here) for the independent review
|
|
39
|
-
pass — call that skill synchronously and read its result before considering the issue
|
|
40
|
-
resolved.
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: issue-address
|
|
3
|
-
description: Take ONE GitHub issue on the current project's repo from selection (or a named issue number) to a verified, reviewed fix — orchestrates 6 nested sub-skills (issue-address:select, :confirm-open, :claim, :reproduce, :fix, :verify) plus the existing requesting-code-review skill, so each step is independently invokable and monitorable. Use when the user wants a real issue picked and actually resolved, not just triaged.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# issue-address (orchestrator)
|
|
7
|
-
|
|
8
|
-
Global, project-agnostic issue-to-fix pipeline — works against whatever repo the current
|
|
9
|
-
project's `gh` remote points to. Fires exactly one issue through a fixed sequence of nested
|
|
10
|
-
skills — each a real, independently-invokable `SKILL.md`, not just a section header, so the
|
|
11
|
-
sequence's progress can be watched step by step instead of as one opaque pass. Codified from
|
|
12
|
-
`midt-bg/sigma`'s workflow; a project's own `AGENTS.md`/`CLAUDE.local.md` may add repo-specific
|
|
13
|
-
conventions (branch naming, claim-comment language, commit style) that this skill should read
|
|
14
|
-
and respect if present.
|
|
15
|
-
|
|
16
|
-
**Naming convention (see a project's own `AGENTS.md` if it documents one; otherwise this
|
|
17
|
-
convention still applies as the plugin's own standard):** sub-skill directories are prefixed
|
|
18
|
-
`0-`, `1-`, `2-`... in execution order, so a plain directory listing sorts in DAG order
|
|
19
|
-
without needing to open any file. Never rely on prose order alone — a reader (or an
|
|
20
|
-
alphabetically-sorted file browser) should see the sequence from the folder names
|
|
21
|
-
themselves. The invocable `name:` field stays a clean colon-scoped identifier
|
|
22
|
-
(`issue-address:select`) without the numeric prefix — the prefix is a filesystem/ordering
|
|
23
|
-
aid, not part of the skill's name.
|
|
24
|
-
|
|
25
|
-
## Pipeline DAG
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
┌─────────────────────┐
|
|
29
|
-
no issue # ──────▶ 0. issue-address:select │──▶ issue number
|
|
30
|
-
└─────────────────────┘ │
|
|
31
|
-
issue # given ─────────────────────────────────────┘
|
|
32
|
-
▼
|
|
33
|
-
┌───────────────────────────┐
|
|
34
|
-
│ 1. issue-address:confirm-open │
|
|
35
|
-
└───────────────────────────┘
|
|
36
|
-
GO │ │ NO-GO
|
|
37
|
-
▼ ▼
|
|
38
|
-
┌─────────────────────┐ STOP — report why
|
|
39
|
-
│ 2. issue-address:claim │
|
|
40
|
-
└─────────────────────┘
|
|
41
|
-
claimed │ │ claim failed to land
|
|
42
|
-
▼ ▼
|
|
43
|
-
┌─────────────────────┐ STOP — report (don't proceed
|
|
44
|
-
│ 3. issue-address:reproduce│ unclaimed)
|
|
45
|
-
└─────────────────────┘
|
|
46
|
-
reproduces │ │ doesn't reproduce
|
|
47
|
-
▼ ▼
|
|
48
|
-
┌─────────────────┐ STOP — report (valid outcome,
|
|
49
|
-
│ 4. issue-address:fix │ not a failure)
|
|
50
|
-
└─────────────────┘
|
|
51
|
-
│
|
|
52
|
-
▼
|
|
53
|
-
┌────────────────────┐
|
|
54
|
-
│ 5. issue-address:verify│──── red ────┐
|
|
55
|
-
└────────────────────┘ │
|
|
56
|
-
│ green │
|
|
57
|
-
▼ │
|
|
58
|
-
┌────────────────────┐ │
|
|
59
|
-
│ 6. requesting-code-review│ │
|
|
60
|
-
└────────────────────┘ │
|
|
61
|
-
│ │
|
|
62
|
-
▼ ▼
|
|
63
|
-
land per conventions loop back to step 4
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
| Step | Input | Output | On failure |
|
|
67
|
-
|---|---|---|---|
|
|
68
|
-
| 0. `issue-address:select` | open-issue pool (implicit — repo-wide) | one issue number + justification | n/a (always produces one, or explicitly reports the pool is empty) |
|
|
69
|
-
| 1. `issue-address:confirm-open` | one issue number | GO (+ title/body/repro steps) or NO-GO (+ reason) | **STOP** — do not proceed |
|
|
70
|
-
| 2. `issue-address:claim` | one confirmed-open issue number | self-assignment + claim comment, re-confirmed as landed | **STOP** — report if the claim didn't actually post; don't proceed unclaimed |
|
|
71
|
-
| 3. `issue-address:reproduce` | issue title/body/repro steps | failing test (file:line) + root-cause hypothesis + red-phase output | **STOP** — report "does not reproduce" (valid, not a failure) |
|
|
72
|
-
| 4. `issue-address:fix` | failing test + root-cause hypothesis | diff + the one test now green | loops internally until its one test is green |
|
|
73
|
-
| 5. `issue-address:verify` | diff + green reproduction test | full-suite pass counts + typecheck result | **loop back to step 4** — do not proceed to review on red |
|
|
74
|
-
| 6. `requesting-code-review` | the verified diff | Critical/Important findings addressed | fix findings, do not mark resolved until clean |
|
|
75
|
-
|
|
76
|
-
Called either with **no issue number** (enters at step 0) or with **one specific issue
|
|
77
|
-
number already named** (enters at step 1, skipping step 0 entirely).
|
|
78
|
-
|
|
79
|
-
**Why claim is its own step, not folded into confirm-open:** confirming an issue is
|
|
80
|
-
open/unclaimed and actually claiming it are two different moments in time — a gap where a
|
|
81
|
-
second concurrent run (or a human) could pick the same issue between the two. `select`'s
|
|
82
|
-
`reject-claimed` check only catches claims that already exist (an assignee, a "working on
|
|
83
|
-
this" comment); nothing marks the issue claimed *for this run* until `claim` actually
|
|
84
|
-
posts one. No dedicated GitHub/issue-tracking MCP server is connected in this environment
|
|
85
|
-
— `claim` uses the `gh` CLI directly (self-assign + comment), same as every other GitHub
|
|
86
|
-
interaction in this skill chain.
|
|
87
|
-
|
|
88
|
-
## After the sequence completes clean
|
|
89
|
-
|
|
90
|
-
- Commit with a conventional-commit message (`fix(scope): subject`, no trailing period, no
|
|
91
|
-
`Co-Authored-By` trailer unless the project's own convention says otherwise), on a branch
|
|
92
|
-
following the project's own `<type>/<slug>` convention if it documents one.
|
|
93
|
-
- **Only push / open a PR when explicitly asked** — per the project's own `AGENTS.md` PR
|
|
94
|
-
section if it has one, don't do it unprompted. Report the sequence as complete and ready,
|
|
95
|
-
and wait.
|
|
96
|
-
- If a PR does get opened (once asked), post a short comment on the originating issue
|
|
97
|
-
linking it — closes the loop from report to fix.
|
|
98
|
-
- Never contact a reviewer (no request/re-request/nudge) without the user's fresh,
|
|
99
|
-
explicit, per-instance approval — same hard constant as everywhere else in this workflow.
|
|
100
|
-
|
|
101
|
-
## Why nested skills instead of one inline sequence
|
|
102
|
-
|
|
103
|
-
Each step is its own file so it shows up as its own invocation in whatever surface tracks
|
|
104
|
-
skill/tool calls — you can see "select ran, chose #N over 4 rejected candidates" and
|
|
105
|
-
"confirm-open ran, returned GO" as distinct, inspectable events before "reproduce" even
|
|
106
|
-
starts, rather than one long undifferentiated pass. If a step needs to change (e.g. the
|
|
107
|
-
verify step's test-runner command, or select's ranking weights), it's a one-file edit that
|
|
108
|
-
doesn't touch the others. When a step needs more depth or clarity, decompose it further
|
|
109
|
-
the same way `issue-address:select` was (see `0-select/SKILL.md` for its own nested DAG)
|
|
110
|
-
— continuously, wherever a single file is doing too much to inspect as one unit.
|
|
111
|
-
|
|
112
|
-
## What this skill is not
|
|
113
|
-
|
|
114
|
-
- Not a pure triage/backlog tool — that's `find-opportunity` (ranks what to work on next
|
|
115
|
-
without opening/fixing anything, and never opens/fixes on its own). `issue-address:select`
|
|
116
|
-
overlaps with it in spirit (both rank by impact and check for claims) but exists
|
|
117
|
-
specifically to feed straight into actually fixing one issue in the same run, not just
|
|
118
|
-
to produce a shortlist for a human to review.
|
|
119
|
-
- Not for PR review comments — that's a different data source entirely (see
|
|
120
|
-
`pr-review-sweep` for the unresolved-review-thread workflow on already-open PRs).
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: local-project-health
|
|
3
|
-
description: >-
|
|
4
|
-
Run the CURRENT project's own definition of "health" and report one rollup.
|
|
5
|
-
Each project defines health differently (a trading bot tracks circuit-breakers
|
|
6
|
-
+ benchmark alpha; a web app tracks uptime + error rate), so this skill runs
|
|
7
|
-
the project-supplied health entrypoint rather than imposing a generic check.
|
|
8
|
-
Use whenever the user asks "is this project healthy?", "/local-project-health",
|
|
9
|
-
"system health", "is everything running / green", or wants a one-shot status
|
|
10
|
-
rollup for the repo they're in. Keywords: health, status, healthcheck, is it
|
|
11
|
-
up, are we green, rollup, system health, project health.
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# Local project health
|
|
15
|
-
|
|
16
|
-
Report a single health verdict for the project in the current working directory
|
|
17
|
-
by running **that project's own** health definition. Health is project-specific
|
|
18
|
-
by design — do not invent generic checks.
|
|
19
|
-
|
|
20
|
-
## Procedure
|
|
21
|
-
|
|
22
|
-
1. **Find the project's health entrypoint**, checking these paths in order
|
|
23
|
-
(first hit wins):
|
|
24
|
-
- `scripts/health.sh`
|
|
25
|
-
- `.claude/health.sh`
|
|
26
|
-
- `bin/health.sh`
|
|
27
|
-
- `Makefile` / `justfile` target named `health`
|
|
28
|
-
|
|
29
|
-
2. **If an entrypoint exists**, run it from the repo root and relay its output:
|
|
30
|
-
- `bash scripts/health.sh` (or the path found / `make health` / `just health`).
|
|
31
|
-
- These scripts are designed to print a human rollup and exit 0/1/2
|
|
32
|
-
(GREEN/YELLOW-or-UNKNOWN/RED). Show the user the rollup verbatim, then add a
|
|
33
|
-
one-line plain-English verdict leading with the overall color and the worst
|
|
34
|
-
layer (e.g. "🟡 YELLOW — performance is the drag: −3 pts vs SPY").
|
|
35
|
-
- If the script persists a structured artifact (e.g.
|
|
36
|
-
`data/system_health.json`), mention where it landed.
|
|
37
|
-
- If it exits non-zero, that is expected for YELLOW/RED — it is NOT a skill
|
|
38
|
-
failure. Only treat a *crash* (missing interpreter, traceback, unbound var)
|
|
39
|
-
as a failure to debug.
|
|
40
|
-
|
|
41
|
-
3. **If NO entrypoint exists**, do not guess at health with ad-hoc commands.
|
|
42
|
-
Instead:
|
|
43
|
-
- Read `CLAUDE.md`, `README*`, and skim the repo to infer what "health" means
|
|
44
|
-
for THIS project (what it monitors, what would constitute degraded/broken).
|
|
45
|
-
- Propose a concrete `scripts/health.sh` that collapses those project-specific
|
|
46
|
-
layers into one GREEN/YELLOW/RED rollup (terminal output + a persisted
|
|
47
|
-
`*.json` artifact), reusing the project's existing CLIs/artifacts rather
|
|
48
|
-
than re-deriving thresholds.
|
|
49
|
-
- Offer to create it. Once created, it becomes the convention this skill runs
|
|
50
|
-
on every future invocation.
|
|
51
|
-
|
|
52
|
-
## Notes
|
|
53
|
-
|
|
54
|
-
- The contract is the **convention path**, not a shared implementation: every
|
|
55
|
-
project owns its own `scripts/health.sh`. This skill is just the launcher +
|
|
56
|
-
interpreter of the result.
|
|
57
|
-
- Keep the relayed summary tight: overall color first, then the offending
|
|
58
|
-
layer(s), then where the full report is. Lead with the answer.
|
|
@@ -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.
|