oh-my-claude-sisyphus 3.1.0 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/commands/autopilot.md +131 -0
- package/commands/cancel-autopilot.md +35 -0
- package/dist/__tests__/installer.test.js +1 -1
- package/dist/__tests__/learned-skills/config.test.d.ts +2 -0
- package/dist/__tests__/learned-skills/config.test.d.ts.map +1 -0
- package/dist/__tests__/learned-skills/config.test.js +37 -0
- package/dist/__tests__/learned-skills/config.test.js.map +1 -0
- package/dist/__tests__/learned-skills/detector.test.d.ts +2 -0
- package/dist/__tests__/learned-skills/detector.test.d.ts.map +1 -0
- package/dist/__tests__/learned-skills/detector.test.js +99 -0
- package/dist/__tests__/learned-skills/detector.test.js.map +1 -0
- package/dist/__tests__/learned-skills/finder.test.d.ts +2 -0
- package/dist/__tests__/learned-skills/finder.test.d.ts.map +1 -0
- package/dist/__tests__/learned-skills/finder.test.js +59 -0
- package/dist/__tests__/learned-skills/finder.test.js.map +1 -0
- package/dist/__tests__/learned-skills/loader.test.d.ts +2 -0
- package/dist/__tests__/learned-skills/loader.test.d.ts.map +1 -0
- package/dist/__tests__/learned-skills/loader.test.js +69 -0
- package/dist/__tests__/learned-skills/loader.test.js.map +1 -0
- package/dist/__tests__/learned-skills/parser.test.d.ts +2 -0
- package/dist/__tests__/learned-skills/parser.test.d.ts.map +1 -0
- package/dist/__tests__/learned-skills/parser.test.js +81 -0
- package/dist/__tests__/learned-skills/parser.test.js.map +1 -0
- package/dist/__tests__/learned-skills/validator.test.d.ts +2 -0
- package/dist/__tests__/learned-skills/validator.test.d.ts.map +1 -0
- package/dist/__tests__/learned-skills/validator.test.js +85 -0
- package/dist/__tests__/learned-skills/validator.test.js.map +1 -0
- package/dist/__tests__/skills.test.js +8 -4
- package/dist/__tests__/skills.test.js.map +1 -1
- package/dist/agents/definitions.d.ts +32 -0
- package/dist/agents/definitions.d.ts.map +1 -1
- package/dist/agents/definitions.js +93 -1
- package/dist/agents/definitions.js.map +1 -1
- package/dist/agents/delegation-validator.d.ts +31 -0
- package/dist/agents/delegation-validator.d.ts.map +1 -0
- package/dist/agents/delegation-validator.js +75 -0
- package/dist/agents/delegation-validator.js.map +1 -0
- package/dist/agents/document-writer.d.ts +11 -0
- package/dist/agents/document-writer.d.ts.map +1 -0
- package/dist/agents/document-writer.js +209 -0
- package/dist/agents/document-writer.js.map +1 -0
- package/dist/agents/frontend-engineer.d.ts +11 -0
- package/dist/agents/frontend-engineer.d.ts.map +1 -0
- package/dist/agents/frontend-engineer.js +115 -0
- package/dist/agents/frontend-engineer.js.map +1 -0
- package/dist/agents/librarian.d.ts +12 -0
- package/dist/agents/librarian.d.ts.map +1 -0
- package/dist/agents/librarian.js +103 -0
- package/dist/agents/librarian.js.map +1 -0
- package/dist/agents/metis.d.ts +12 -0
- package/dist/agents/metis.d.ts.map +1 -0
- package/dist/agents/metis.js +117 -0
- package/dist/agents/metis.js.map +1 -0
- package/dist/agents/momus.d.ts +12 -0
- package/dist/agents/momus.d.ts.map +1 -0
- package/dist/agents/momus.js +128 -0
- package/dist/agents/momus.js.map +1 -0
- package/dist/agents/multimodal-looker.d.ts +11 -0
- package/dist/agents/multimodal-looker.d.ts.map +1 -0
- package/dist/agents/multimodal-looker.js +70 -0
- package/dist/agents/multimodal-looker.js.map +1 -0
- package/dist/agents/oracle.d.ts +13 -0
- package/dist/agents/oracle.d.ts.map +1 -0
- package/dist/agents/oracle.js +191 -0
- package/dist/agents/oracle.js.map +1 -0
- package/dist/agents/orchestrator-sisyphus.d.ts +11 -0
- package/dist/agents/orchestrator-sisyphus.d.ts.map +1 -0
- package/dist/agents/orchestrator-sisyphus.js +115 -0
- package/dist/agents/orchestrator-sisyphus.js.map +1 -0
- package/dist/agents/prometheus.d.ts +12 -0
- package/dist/agents/prometheus.d.ts.map +1 -0
- package/dist/agents/prometheus.js +195 -0
- package/dist/agents/prometheus.js.map +1 -0
- package/dist/agents/prompt-generator.d.ts +95 -0
- package/dist/agents/prompt-generator.d.ts.map +1 -0
- package/dist/agents/prompt-generator.js +140 -0
- package/dist/agents/prompt-generator.js.map +1 -0
- package/dist/agents/prompt-sections/index.d.ts +44 -0
- package/dist/agents/prompt-sections/index.d.ts.map +1 -0
- package/dist/agents/prompt-sections/index.js +194 -0
- package/dist/agents/prompt-sections/index.js.map +1 -0
- package/dist/agents/sisyphus-junior.d.ts +12 -0
- package/dist/agents/sisyphus-junior.d.ts.map +1 -0
- package/dist/agents/sisyphus-junior.js +93 -0
- package/dist/agents/sisyphus-junior.js.map +1 -0
- package/dist/agents/types.d.ts +2 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/types.js.map +1 -1
- package/dist/cli/index.js +0 -0
- package/dist/features/background-agent/manager.d.ts +10 -1
- package/dist/features/background-agent/manager.d.ts.map +1 -1
- package/dist/features/background-agent/manager.js +79 -11
- package/dist/features/background-agent/manager.js.map +1 -1
- package/dist/features/background-agent/types.d.ts +30 -1
- package/dist/features/background-agent/types.d.ts.map +1 -1
- package/dist/features/delegation-categories/index.d.ts +116 -0
- package/dist/features/delegation-categories/index.d.ts.map +1 -0
- package/dist/features/delegation-categories/index.js +287 -0
- package/dist/features/delegation-categories/index.js.map +1 -0
- package/dist/features/delegation-categories/test-categories.d.ts +7 -0
- package/dist/features/delegation-categories/test-categories.d.ts.map +1 -0
- package/dist/features/delegation-categories/test-categories.js +88 -0
- package/dist/features/delegation-categories/test-categories.js.map +1 -0
- package/dist/features/delegation-categories/types.d.ts +51 -0
- package/dist/features/delegation-categories/types.d.ts.map +1 -0
- package/dist/features/delegation-categories/types.js +8 -0
- package/dist/features/delegation-categories/types.js.map +1 -0
- package/dist/features/index.d.ts +2 -0
- package/dist/features/index.d.ts.map +1 -1
- package/dist/features/index.js +10 -0
- package/dist/features/index.js.map +1 -1
- package/dist/features/model-routing/prompts/index.d.ts +2 -0
- package/dist/features/model-routing/prompts/index.d.ts.map +1 -1
- package/dist/features/model-routing/prompts/index.js +6 -0
- package/dist/features/model-routing/prompts/index.js.map +1 -1
- package/dist/features/notepad-wisdom/extractor.d.ts +30 -0
- package/dist/features/notepad-wisdom/extractor.d.ts.map +1 -0
- package/dist/features/notepad-wisdom/extractor.js +68 -0
- package/dist/features/notepad-wisdom/extractor.js.map +1 -0
- package/dist/features/notepad-wisdom/index.d.ts +39 -0
- package/dist/features/notepad-wisdom/index.d.ts.map +1 -0
- package/dist/features/notepad-wisdom/index.js +169 -0
- package/dist/features/notepad-wisdom/index.js.map +1 -0
- package/dist/features/notepad-wisdom/types.d.ts +18 -0
- package/dist/features/notepad-wisdom/types.d.ts.map +1 -0
- package/dist/features/notepad-wisdom/types.js +7 -0
- package/dist/features/notepad-wisdom/types.js.map +1 -0
- package/dist/hooks/autopilot/__tests__/cancel.test.d.ts +2 -0
- package/dist/hooks/autopilot/__tests__/cancel.test.d.ts.map +1 -0
- package/dist/hooks/autopilot/__tests__/cancel.test.js +397 -0
- package/dist/hooks/autopilot/__tests__/cancel.test.js.map +1 -0
- package/dist/hooks/autopilot/__tests__/prompts.test.d.ts +2 -0
- package/dist/hooks/autopilot/__tests__/prompts.test.d.ts.map +1 -0
- package/dist/hooks/autopilot/__tests__/prompts.test.js +74 -0
- package/dist/hooks/autopilot/__tests__/prompts.test.js.map +1 -0
- package/dist/hooks/autopilot/__tests__/state.test.d.ts +2 -0
- package/dist/hooks/autopilot/__tests__/state.test.d.ts.map +1 -0
- package/dist/hooks/autopilot/__tests__/state.test.js +75 -0
- package/dist/hooks/autopilot/__tests__/state.test.js.map +1 -0
- package/dist/hooks/autopilot/__tests__/summary.test.d.ts +2 -0
- package/dist/hooks/autopilot/__tests__/summary.test.d.ts.map +1 -0
- package/dist/hooks/autopilot/__tests__/summary.test.js +289 -0
- package/dist/hooks/autopilot/__tests__/summary.test.js.map +1 -0
- package/dist/hooks/autopilot/__tests__/transition.test.d.ts +2 -0
- package/dist/hooks/autopilot/__tests__/transition.test.d.ts.map +1 -0
- package/dist/hooks/autopilot/__tests__/transition.test.js +59 -0
- package/dist/hooks/autopilot/__tests__/transition.test.js.map +1 -0
- package/dist/hooks/autopilot/__tests__/validation.test.d.ts +2 -0
- package/dist/hooks/autopilot/__tests__/validation.test.d.ts.map +1 -0
- package/dist/hooks/autopilot/__tests__/validation.test.js +450 -0
- package/dist/hooks/autopilot/__tests__/validation.test.js.map +1 -0
- package/dist/hooks/autopilot/cancel.d.ts +42 -0
- package/dist/hooks/autopilot/cancel.d.ts.map +1 -0
- package/dist/hooks/autopilot/cancel.js +156 -0
- package/dist/hooks/autopilot/cancel.js.map +1 -0
- package/dist/hooks/autopilot/enforcement.d.ts +28 -0
- package/dist/hooks/autopilot/enforcement.d.ts.map +1 -0
- package/dist/hooks/autopilot/enforcement.js +147 -0
- package/dist/hooks/autopilot/enforcement.js.map +1 -0
- package/dist/hooks/autopilot/index.d.ts +17 -0
- package/dist/hooks/autopilot/index.d.ts.map +1 -0
- package/dist/hooks/autopilot/index.js +24 -0
- package/dist/hooks/autopilot/index.js.map +1 -0
- package/dist/hooks/autopilot/prompts.d.ts +37 -0
- package/dist/hooks/autopilot/prompts.d.ts.map +1 -0
- package/dist/hooks/autopilot/prompts.js +353 -0
- package/dist/hooks/autopilot/prompts.js.map +1 -0
- package/dist/hooks/autopilot/signals.d.ts +20 -0
- package/dist/hooks/autopilot/signals.d.ts.map +1 -0
- package/dist/hooks/autopilot/signals.js +75 -0
- package/dist/hooks/autopilot/signals.js.map +1 -0
- package/dist/hooks/autopilot/state.d.ts +67 -0
- package/dist/hooks/autopilot/state.d.ts.map +1 -0
- package/dist/hooks/autopilot/state.js +244 -0
- package/dist/hooks/autopilot/state.js.map +1 -0
- package/dist/hooks/autopilot/summary.d.ts +27 -0
- package/dist/hooks/autopilot/summary.d.ts.map +1 -0
- package/dist/hooks/autopilot/summary.js +160 -0
- package/dist/hooks/autopilot/summary.js.map +1 -0
- package/dist/hooks/autopilot/transition.d.ts +39 -0
- package/dist/hooks/autopilot/transition.d.ts.map +1 -0
- package/dist/hooks/autopilot/transition.js +216 -0
- package/dist/hooks/autopilot/transition.js.map +1 -0
- package/dist/hooks/autopilot/types.d.ts +211 -0
- package/dist/hooks/autopilot/types.d.ts.map +1 -0
- package/dist/hooks/autopilot/types.js +30 -0
- package/dist/hooks/autopilot/types.js.map +1 -0
- package/dist/hooks/autopilot/validation.d.ts +43 -0
- package/dist/hooks/autopilot/validation.d.ts.map +1 -0
- package/dist/hooks/autopilot/validation.js +191 -0
- package/dist/hooks/autopilot/validation.js.map +1 -0
- package/dist/hooks/bridge.d.ts +1 -1
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js +64 -3
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/keyword-detector/index.d.ts +1 -1
- package/dist/hooks/keyword-detector/index.d.ts.map +1 -1
- package/dist/hooks/keyword-detector/index.js +38 -2
- package/dist/hooks/keyword-detector/index.js.map +1 -1
- package/dist/hooks/learned-skills/config.d.ts +53 -0
- package/dist/hooks/learned-skills/config.d.ts.map +1 -0
- package/dist/hooks/learned-skills/config.js +103 -0
- package/dist/hooks/learned-skills/config.js.map +1 -0
- package/dist/hooks/learned-skills/constants.d.ts +24 -0
- package/dist/hooks/learned-skills/constants.d.ts.map +1 -0
- package/dist/hooks/learned-skills/constants.js +26 -0
- package/dist/hooks/learned-skills/constants.js.map +1 -0
- package/dist/hooks/learned-skills/detection-hook.d.ts +39 -0
- package/dist/hooks/learned-skills/detection-hook.d.ts.map +1 -0
- package/dist/hooks/learned-skills/detection-hook.js +83 -0
- package/dist/hooks/learned-skills/detection-hook.js.map +1 -0
- package/dist/hooks/learned-skills/detector.d.ts +30 -0
- package/dist/hooks/learned-skills/detector.d.ts.map +1 -0
- package/dist/hooks/learned-skills/detector.js +150 -0
- package/dist/hooks/learned-skills/detector.js.map +1 -0
- package/dist/hooks/learned-skills/finder.d.ts +21 -0
- package/dist/hooks/learned-skills/finder.d.ts.map +1 -0
- package/dist/hooks/learned-skills/finder.js +117 -0
- package/dist/hooks/learned-skills/finder.js.map +1 -0
- package/dist/hooks/learned-skills/index.d.ts +62 -0
- package/dist/hooks/learned-skills/index.d.ts.map +1 -0
- package/dist/hooks/learned-skills/index.js +137 -0
- package/dist/hooks/learned-skills/index.js.map +1 -0
- package/dist/hooks/learned-skills/loader.d.ts +20 -0
- package/dist/hooks/learned-skills/loader.d.ts.map +1 -0
- package/dist/hooks/learned-skills/loader.js +107 -0
- package/dist/hooks/learned-skills/loader.js.map +1 -0
- package/dist/hooks/learned-skills/parser.d.ts +21 -0
- package/dist/hooks/learned-skills/parser.d.ts.map +1 -0
- package/dist/hooks/learned-skills/parser.js +190 -0
- package/dist/hooks/learned-skills/parser.js.map +1 -0
- package/dist/hooks/learned-skills/promotion.d.ts +29 -0
- package/dist/hooks/learned-skills/promotion.d.ts.map +1 -0
- package/dist/hooks/learned-skills/promotion.js +87 -0
- package/dist/hooks/learned-skills/promotion.js.map +1 -0
- package/dist/hooks/learned-skills/types.d.ts +109 -0
- package/dist/hooks/learned-skills/types.d.ts.map +1 -0
- package/dist/hooks/learned-skills/types.js +8 -0
- package/dist/hooks/learned-skills/types.js.map +1 -0
- package/dist/hooks/learned-skills/validator.d.ts +15 -0
- package/dist/hooks/learned-skills/validator.d.ts.map +1 -0
- package/dist/hooks/learned-skills/validator.js +87 -0
- package/dist/hooks/learned-skills/validator.js.map +1 -0
- package/dist/hooks/learned-skills/writer.d.ts +27 -0
- package/dist/hooks/learned-skills/writer.d.ts.map +1 -0
- package/dist/hooks/learned-skills/writer.js +126 -0
- package/dist/hooks/learned-skills/writer.js.map +1 -0
- package/dist/hooks/mnemosyne/config.d.ts +53 -0
- package/dist/hooks/mnemosyne/config.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/config.js +103 -0
- package/dist/hooks/mnemosyne/config.js.map +1 -0
- package/dist/hooks/mnemosyne/constants.d.ts +24 -0
- package/dist/hooks/mnemosyne/constants.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/constants.js +26 -0
- package/dist/hooks/mnemosyne/constants.js.map +1 -0
- package/dist/hooks/mnemosyne/detection-hook.d.ts +39 -0
- package/dist/hooks/mnemosyne/detection-hook.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/detection-hook.js +83 -0
- package/dist/hooks/mnemosyne/detection-hook.js.map +1 -0
- package/dist/hooks/mnemosyne/detector.d.ts +30 -0
- package/dist/hooks/mnemosyne/detector.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/detector.js +150 -0
- package/dist/hooks/mnemosyne/detector.js.map +1 -0
- package/dist/hooks/mnemosyne/finder.d.ts +21 -0
- package/dist/hooks/mnemosyne/finder.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/finder.js +117 -0
- package/dist/hooks/mnemosyne/finder.js.map +1 -0
- package/dist/hooks/mnemosyne/index.d.ts +62 -0
- package/dist/hooks/mnemosyne/index.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/index.js +137 -0
- package/dist/hooks/mnemosyne/index.js.map +1 -0
- package/dist/hooks/mnemosyne/loader.d.ts +20 -0
- package/dist/hooks/mnemosyne/loader.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/loader.js +113 -0
- package/dist/hooks/mnemosyne/loader.js.map +1 -0
- package/dist/hooks/mnemosyne/parser.d.ts +21 -0
- package/dist/hooks/mnemosyne/parser.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/parser.js +190 -0
- package/dist/hooks/mnemosyne/parser.js.map +1 -0
- package/dist/hooks/mnemosyne/promotion.d.ts +29 -0
- package/dist/hooks/mnemosyne/promotion.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/promotion.js +87 -0
- package/dist/hooks/mnemosyne/promotion.js.map +1 -0
- package/dist/hooks/mnemosyne/types.d.ts +109 -0
- package/dist/hooks/mnemosyne/types.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/types.js +8 -0
- package/dist/hooks/mnemosyne/types.js.map +1 -0
- package/dist/hooks/mnemosyne/validator.d.ts +15 -0
- package/dist/hooks/mnemosyne/validator.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/validator.js +87 -0
- package/dist/hooks/mnemosyne/validator.js.map +1 -0
- package/dist/hooks/mnemosyne/writer.d.ts +27 -0
- package/dist/hooks/mnemosyne/writer.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/writer.js +126 -0
- package/dist/hooks/mnemosyne/writer.js.map +1 -0
- package/dist/hooks/persistent-mode/index.d.ts +6 -2
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js +33 -3
- package/dist/hooks/persistent-mode/index.js.map +1 -1
- package/dist/hooks/sisyphus-orchestrator/constants.d.ts +23 -0
- package/dist/hooks/sisyphus-orchestrator/constants.d.ts.map +1 -0
- package/dist/hooks/sisyphus-orchestrator/constants.js +142 -0
- package/dist/hooks/sisyphus-orchestrator/constants.js.map +1 -0
- package/dist/hooks/sisyphus-orchestrator/index.d.ts +113 -0
- package/dist/hooks/sisyphus-orchestrator/index.d.ts.map +1 -0
- package/dist/hooks/sisyphus-orchestrator/index.js +309 -0
- package/dist/hooks/sisyphus-orchestrator/index.js.map +1 -0
- package/dist/hooks/todo-continuation/index.d.ts +31 -1
- package/dist/hooks/todo-continuation/index.d.ts.map +1 -1
- package/dist/hooks/todo-continuation/index.js +38 -1
- package/dist/hooks/todo-continuation/index.js.map +1 -1
- package/dist/hud/elements/autopilot.d.ts +29 -0
- package/dist/hud/elements/autopilot.d.ts.map +1 -0
- package/dist/hud/elements/autopilot.js +97 -0
- package/dist/hud/elements/autopilot.js.map +1 -0
- package/dist/hud/elements/index.d.ts +1 -0
- package/dist/hud/elements/index.d.ts.map +1 -1
- package/dist/hud/elements/index.js +1 -0
- package/dist/hud/elements/index.js.map +1 -1
- package/dist/hud/index.js +7 -5
- package/dist/hud/index.js.map +1 -1
- package/dist/hud/omc-state.d.ts +7 -0
- package/dist/hud/omc-state.d.ts.map +1 -1
- package/dist/hud/omc-state.js +39 -1
- package/dist/hud/omc-state.js.map +1 -1
- package/dist/hud/render.d.ts.map +1 -1
- package/dist/hud/render.js +7 -0
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/sisyphus-state.d.ts +31 -0
- package/dist/hud/sisyphus-state.d.ts.map +1 -0
- package/dist/hud/sisyphus-state.js +163 -0
- package/dist/hud/sisyphus-state.js.map +1 -0
- package/dist/hud/types.d.ts +5 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js +6 -0
- package/dist/hud/types.js.map +1 -1
- package/dist/installer/index.d.ts +1 -1
- package/dist/installer/index.js +3 -3
- package/dist/installer/index.js.map +1 -1
- package/dist/tools/diagnostics/index.d.ts +29 -0
- package/dist/tools/diagnostics/index.d.ts.map +1 -0
- package/dist/tools/diagnostics/index.js +118 -0
- package/dist/tools/diagnostics/index.js.map +1 -0
- package/dist/tools/diagnostics/lsp-aggregator.d.ts +26 -0
- package/dist/tools/diagnostics/lsp-aggregator.d.ts.map +1 -0
- package/dist/tools/diagnostics/lsp-aggregator.js +99 -0
- package/dist/tools/diagnostics/lsp-aggregator.js.map +1 -0
- package/dist/tools/diagnostics/tsc-runner.d.ts +26 -0
- package/dist/tools/diagnostics/tsc-runner.d.ts.map +1 -0
- package/dist/tools/diagnostics/tsc-runner.js +70 -0
- package/dist/tools/diagnostics/tsc-runner.js.map +1 -0
- package/dist/tools/lsp-tools.d.ts +10 -0
- package/dist/tools/lsp-tools.d.ts.map +1 -1
- package/dist/tools/lsp-tools.js +43 -1
- package/dist/tools/lsp-tools.js.map +1 -1
- package/dist/tools/resume-session.d.ts +63 -0
- package/dist/tools/resume-session.d.ts.map +1 -0
- package/dist/tools/resume-session.js +106 -0
- package/dist/tools/resume-session.js.map +1 -0
- package/dist/utils/__tests__/paths.test.d.ts +2 -0
- package/dist/utils/__tests__/paths.test.d.ts.map +1 -0
- package/dist/utils/__tests__/paths.test.js +88 -0
- package/dist/utils/__tests__/paths.test.js.map +1 -0
- package/dist/utils/paths.d.ts +32 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +55 -0
- package/dist/utils/paths.js.map +1 -0
- package/docs/ARCHITECTURE.md +80 -1
- package/docs/CLAUDE.md +85 -3
- package/docs/FEATURES.md +2167 -0
- package/docs/FULL-README.md +69 -1
- package/package.json +1 -1
- package/skills/autopilot/SKILL.md +168 -0
- package/skills/cancel-autopilot/SKILL.md +53 -0
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autopilot Prompt Generation
|
|
3
|
+
*
|
|
4
|
+
* Generates phase-specific prompts that include Task tool invocations
|
|
5
|
+
* for Claude to execute. This is the core of the agent invocation mechanism.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Generate the expansion phase prompt (Phase 0)
|
|
9
|
+
* Analyst extracts requirements, Architect creates technical spec
|
|
10
|
+
*/
|
|
11
|
+
export function getExpansionPrompt(idea) {
|
|
12
|
+
return `## AUTOPILOT PHASE 0: IDEA EXPANSION
|
|
13
|
+
|
|
14
|
+
Your task: Expand this product idea into detailed requirements and technical spec.
|
|
15
|
+
|
|
16
|
+
**Original Idea:** "${idea}"
|
|
17
|
+
|
|
18
|
+
### Step 1: Spawn Analyst for Requirements
|
|
19
|
+
|
|
20
|
+
\`\`\`
|
|
21
|
+
Task(
|
|
22
|
+
subagent_type="oh-my-claudecode:analyst",
|
|
23
|
+
model="opus",
|
|
24
|
+
prompt="REQUIREMENTS ANALYSIS for: ${escapeForPrompt(idea)}
|
|
25
|
+
|
|
26
|
+
Extract and document:
|
|
27
|
+
1. Functional requirements (what it must do)
|
|
28
|
+
2. Non-functional requirements (performance, UX, etc.)
|
|
29
|
+
3. Implicit requirements (things user didn't say but needs)
|
|
30
|
+
4. Out of scope items
|
|
31
|
+
|
|
32
|
+
Output as structured markdown with clear sections."
|
|
33
|
+
)
|
|
34
|
+
\`\`\`
|
|
35
|
+
|
|
36
|
+
WAIT for Analyst to complete before proceeding.
|
|
37
|
+
|
|
38
|
+
### Step 2: Spawn Architect for Technical Spec
|
|
39
|
+
|
|
40
|
+
After Analyst completes, spawn Architect:
|
|
41
|
+
|
|
42
|
+
\`\`\`
|
|
43
|
+
Task(
|
|
44
|
+
subagent_type="oh-my-claudecode:architect",
|
|
45
|
+
model="opus",
|
|
46
|
+
prompt="TECHNICAL SPECIFICATION for: ${escapeForPrompt(idea)}
|
|
47
|
+
|
|
48
|
+
Based on the requirements analysis above, create:
|
|
49
|
+
1. Tech stack decisions with rationale
|
|
50
|
+
2. Architecture overview (patterns, layers)
|
|
51
|
+
3. File structure (directory tree)
|
|
52
|
+
4. Dependencies list (packages)
|
|
53
|
+
5. API/interface definitions
|
|
54
|
+
|
|
55
|
+
Output as structured markdown."
|
|
56
|
+
)
|
|
57
|
+
\`\`\`
|
|
58
|
+
|
|
59
|
+
### Step 3: Save Combined Spec
|
|
60
|
+
|
|
61
|
+
Combine Analyst requirements + Architect technical spec into a single document.
|
|
62
|
+
Save to: \`.omc/autopilot/spec.md\`
|
|
63
|
+
|
|
64
|
+
### Step 4: Signal Completion
|
|
65
|
+
|
|
66
|
+
When the spec is saved, signal: EXPANSION_COMPLETE
|
|
67
|
+
`;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Generate the direct planning prompt (Phase 1)
|
|
71
|
+
* Uses Architect instead of Planner to create plan directly from spec
|
|
72
|
+
*/
|
|
73
|
+
export function getDirectPlanningPrompt(specPath) {
|
|
74
|
+
return `## AUTOPILOT PHASE 1: DIRECT PLANNING
|
|
75
|
+
|
|
76
|
+
The spec is complete from Phase 0. Create implementation plan directly (no interview needed).
|
|
77
|
+
|
|
78
|
+
### Step 1: Read Spec
|
|
79
|
+
|
|
80
|
+
Read the specification at: ${specPath}
|
|
81
|
+
|
|
82
|
+
### Step 2: Create Plan via Architect
|
|
83
|
+
|
|
84
|
+
Spawn Architect to create the implementation plan:
|
|
85
|
+
|
|
86
|
+
\`\`\`
|
|
87
|
+
Task(
|
|
88
|
+
subagent_type="oh-my-claudecode:architect",
|
|
89
|
+
model="opus",
|
|
90
|
+
prompt="CREATE IMPLEMENTATION PLAN
|
|
91
|
+
|
|
92
|
+
Read the specification at: ${specPath}
|
|
93
|
+
|
|
94
|
+
Generate a comprehensive implementation plan with:
|
|
95
|
+
|
|
96
|
+
1. **Task Breakdown**
|
|
97
|
+
- Each task must be atomic (one clear deliverable)
|
|
98
|
+
- Include file paths for each task
|
|
99
|
+
- Estimate complexity (simple/medium/complex)
|
|
100
|
+
|
|
101
|
+
2. **Dependency Graph**
|
|
102
|
+
- Which tasks depend on others
|
|
103
|
+
- Optimal execution order
|
|
104
|
+
- Tasks that can run in parallel
|
|
105
|
+
|
|
106
|
+
3. **Acceptance Criteria**
|
|
107
|
+
- Testable criteria for each task
|
|
108
|
+
- Definition of done
|
|
109
|
+
|
|
110
|
+
4. **Risk Register**
|
|
111
|
+
- Identified risks
|
|
112
|
+
- Mitigation strategies
|
|
113
|
+
|
|
114
|
+
Save to: .omc/plans/autopilot-impl.md
|
|
115
|
+
|
|
116
|
+
Signal completion with: PLAN_CREATED"
|
|
117
|
+
)
|
|
118
|
+
\`\`\`
|
|
119
|
+
|
|
120
|
+
### Step 3: Validate Plan via Critic
|
|
121
|
+
|
|
122
|
+
After Architect creates the plan:
|
|
123
|
+
|
|
124
|
+
\`\`\`
|
|
125
|
+
Task(
|
|
126
|
+
subagent_type="oh-my-claudecode:critic",
|
|
127
|
+
model="opus",
|
|
128
|
+
prompt="REVIEW IMPLEMENTATION PLAN
|
|
129
|
+
|
|
130
|
+
Plan file: .omc/plans/autopilot-impl.md
|
|
131
|
+
Original spec: ${specPath}
|
|
132
|
+
|
|
133
|
+
Verify:
|
|
134
|
+
1. All requirements from spec have corresponding tasks
|
|
135
|
+
2. No ambiguous task descriptions
|
|
136
|
+
3. Acceptance criteria are testable
|
|
137
|
+
4. Dependencies are correctly identified
|
|
138
|
+
5. Risks are addressed
|
|
139
|
+
|
|
140
|
+
Verdict: OKAY or REJECT with specific issues"
|
|
141
|
+
)
|
|
142
|
+
\`\`\`
|
|
143
|
+
|
|
144
|
+
### Iteration Loop
|
|
145
|
+
|
|
146
|
+
If Critic rejects, feed feedback back to Architect and retry (max 5 iterations).
|
|
147
|
+
|
|
148
|
+
When Critic approves: PLANNING_COMPLETE
|
|
149
|
+
`;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Generate the execution phase prompt (Phase 2)
|
|
153
|
+
*/
|
|
154
|
+
export function getExecutionPrompt(planPath) {
|
|
155
|
+
return `## AUTOPILOT PHASE 2: EXECUTION
|
|
156
|
+
|
|
157
|
+
Execute the plan at ${planPath} using Ralph+Ultrawork mode.
|
|
158
|
+
|
|
159
|
+
### Activation
|
|
160
|
+
|
|
161
|
+
Ralph and Ultrawork are now active. Execute tasks in parallel where possible.
|
|
162
|
+
|
|
163
|
+
### Execution Rules
|
|
164
|
+
|
|
165
|
+
- Read the plan from ${planPath}
|
|
166
|
+
- Identify independent tasks that can run in parallel
|
|
167
|
+
- Spawn multiple executor agents for parallel work
|
|
168
|
+
- Track progress in the TODO list
|
|
169
|
+
- Use appropriate agent tiers based on task complexity
|
|
170
|
+
|
|
171
|
+
### Agent Spawning Pattern
|
|
172
|
+
|
|
173
|
+
\`\`\`
|
|
174
|
+
// For simple tasks (single file, straightforward logic)
|
|
175
|
+
Task(subagent_type="oh-my-claudecode:executor-low", model="haiku", prompt="...")
|
|
176
|
+
|
|
177
|
+
// For standard implementation (feature, multiple methods)
|
|
178
|
+
Task(subagent_type="oh-my-claudecode:executor", model="sonnet", prompt="...")
|
|
179
|
+
|
|
180
|
+
// For complex work (architecture, debugging, refactoring)
|
|
181
|
+
Task(subagent_type="oh-my-claudecode:executor-high", model="opus", prompt="...")
|
|
182
|
+
\`\`\`
|
|
183
|
+
|
|
184
|
+
### Progress Tracking
|
|
185
|
+
|
|
186
|
+
Update TODO list as tasks complete:
|
|
187
|
+
- Mark task in_progress when starting
|
|
188
|
+
- Mark task completed when done
|
|
189
|
+
- Add new tasks if discovered during implementation
|
|
190
|
+
|
|
191
|
+
### Completion
|
|
192
|
+
|
|
193
|
+
When all tasks from the plan are complete: EXECUTION_COMPLETE
|
|
194
|
+
`;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Generate the QA phase prompt (Phase 3)
|
|
198
|
+
*/
|
|
199
|
+
export function getQAPrompt() {
|
|
200
|
+
return `## AUTOPILOT PHASE 3: QUALITY ASSURANCE
|
|
201
|
+
|
|
202
|
+
Run UltraQA cycles until build/lint/tests pass.
|
|
203
|
+
|
|
204
|
+
### QA Sequence
|
|
205
|
+
|
|
206
|
+
1. **Build**: npm run build (or equivalent for the project type)
|
|
207
|
+
2. **Lint**: npm run lint (or equivalent)
|
|
208
|
+
3. **Test**: npm test (or equivalent)
|
|
209
|
+
|
|
210
|
+
### Fix Cycle
|
|
211
|
+
|
|
212
|
+
For each failure:
|
|
213
|
+
|
|
214
|
+
1. **Diagnose** - Understand the error
|
|
215
|
+
\`\`\`
|
|
216
|
+
Task(
|
|
217
|
+
subagent_type="oh-my-claudecode:architect-low",
|
|
218
|
+
model="haiku",
|
|
219
|
+
prompt="Diagnose this error and suggest fix: [ERROR]"
|
|
220
|
+
)
|
|
221
|
+
\`\`\`
|
|
222
|
+
|
|
223
|
+
2. **Fix** - Apply the fix
|
|
224
|
+
\`\`\`
|
|
225
|
+
Task(
|
|
226
|
+
subagent_type="oh-my-claudecode:build-fixer",
|
|
227
|
+
model="sonnet",
|
|
228
|
+
prompt="Fix this error with minimal changes: [ERROR]"
|
|
229
|
+
)
|
|
230
|
+
\`\`\`
|
|
231
|
+
|
|
232
|
+
3. **Re-run** - Verify the fix worked
|
|
233
|
+
4. **Repeat** - Until pass or max cycles (5)
|
|
234
|
+
|
|
235
|
+
### Exit Conditions
|
|
236
|
+
|
|
237
|
+
- All checks pass → QA_COMPLETE
|
|
238
|
+
- Max cycles reached → Report failures
|
|
239
|
+
- Same error 3 times → Escalate to user
|
|
240
|
+
|
|
241
|
+
When all checks pass: QA_COMPLETE
|
|
242
|
+
`;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Generate the validation phase prompt (Phase 4)
|
|
246
|
+
*/
|
|
247
|
+
export function getValidationPrompt(specPath) {
|
|
248
|
+
return `## AUTOPILOT PHASE 4: VALIDATION
|
|
249
|
+
|
|
250
|
+
Spawn parallel validation architects for comprehensive review.
|
|
251
|
+
|
|
252
|
+
### Parallel Validation Spawns
|
|
253
|
+
|
|
254
|
+
Spawn all three architects in parallel:
|
|
255
|
+
|
|
256
|
+
\`\`\`
|
|
257
|
+
// Functional Completeness Review
|
|
258
|
+
Task(
|
|
259
|
+
subagent_type="oh-my-claudecode:architect",
|
|
260
|
+
model="opus",
|
|
261
|
+
prompt="FUNCTIONAL COMPLETENESS REVIEW
|
|
262
|
+
|
|
263
|
+
Read the original spec at: ${specPath}
|
|
264
|
+
|
|
265
|
+
Verify:
|
|
266
|
+
1. All functional requirements are implemented
|
|
267
|
+
2. All non-functional requirements are addressed
|
|
268
|
+
3. All acceptance criteria from the plan are met
|
|
269
|
+
4. No missing features or incomplete implementations
|
|
270
|
+
|
|
271
|
+
Verdict: APPROVED (all requirements met) or REJECTED (with specific gaps)"
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
// Security Review
|
|
275
|
+
Task(
|
|
276
|
+
subagent_type="oh-my-claudecode:security-reviewer",
|
|
277
|
+
model="opus",
|
|
278
|
+
prompt="SECURITY REVIEW
|
|
279
|
+
|
|
280
|
+
Check the implementation for:
|
|
281
|
+
1. OWASP Top 10 vulnerabilities
|
|
282
|
+
2. Input validation and sanitization
|
|
283
|
+
3. Authentication/authorization issues
|
|
284
|
+
4. Sensitive data exposure
|
|
285
|
+
5. Injection vulnerabilities (SQL, command, XSS)
|
|
286
|
+
6. Hardcoded secrets or credentials
|
|
287
|
+
|
|
288
|
+
Verdict: APPROVED (no vulnerabilities) or REJECTED (with specific issues)"
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
// Code Quality Review
|
|
292
|
+
Task(
|
|
293
|
+
subagent_type="oh-my-claudecode:code-reviewer",
|
|
294
|
+
model="opus",
|
|
295
|
+
prompt="CODE QUALITY REVIEW
|
|
296
|
+
|
|
297
|
+
Review the implementation for:
|
|
298
|
+
1. Code organization and structure
|
|
299
|
+
2. Design patterns and best practices
|
|
300
|
+
3. Error handling completeness
|
|
301
|
+
4. Test coverage adequacy
|
|
302
|
+
5. Documentation and comments
|
|
303
|
+
6. Maintainability and readability
|
|
304
|
+
|
|
305
|
+
Verdict: APPROVED (high quality) or REJECTED (with specific issues)"
|
|
306
|
+
)
|
|
307
|
+
\`\`\`
|
|
308
|
+
|
|
309
|
+
### Verdict Aggregation
|
|
310
|
+
|
|
311
|
+
- **All APPROVED** → AUTOPILOT_COMPLETE
|
|
312
|
+
- **Any REJECTED** → Fix the issues and re-validate (max 3 rounds)
|
|
313
|
+
|
|
314
|
+
### Fix and Retry
|
|
315
|
+
|
|
316
|
+
If any reviewer rejects:
|
|
317
|
+
1. Collect all rejection reasons
|
|
318
|
+
2. Fix each issue identified
|
|
319
|
+
3. Re-run validation
|
|
320
|
+
|
|
321
|
+
When all approve: AUTOPILOT_COMPLETE
|
|
322
|
+
`;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Escape special characters for embedding in prompts
|
|
326
|
+
*/
|
|
327
|
+
function escapeForPrompt(text) {
|
|
328
|
+
return text
|
|
329
|
+
.replace(/\\/g, '\\\\')
|
|
330
|
+
.replace(/"/g, '\\"')
|
|
331
|
+
.replace(/`/g, '\\`')
|
|
332
|
+
.replace(/\$/g, '\\$');
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Get the prompt for the current phase
|
|
336
|
+
*/
|
|
337
|
+
export function getPhasePrompt(phase, context) {
|
|
338
|
+
switch (phase) {
|
|
339
|
+
case 'expansion':
|
|
340
|
+
return getExpansionPrompt(context.idea || '');
|
|
341
|
+
case 'planning':
|
|
342
|
+
return getDirectPlanningPrompt(context.specPath || '.omc/autopilot/spec.md');
|
|
343
|
+
case 'execution':
|
|
344
|
+
return getExecutionPrompt(context.planPath || '.omc/plans/autopilot-impl.md');
|
|
345
|
+
case 'qa':
|
|
346
|
+
return getQAPrompt();
|
|
347
|
+
case 'validation':
|
|
348
|
+
return getValidationPrompt(context.specPath || '.omc/autopilot/spec.md');
|
|
349
|
+
default:
|
|
350
|
+
return '';
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/hooks/autopilot/prompts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO;;;;sBAIa,IAAI;;;;;;;;uCAQa,eAAe,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;yCAsBnB,eAAe,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;CAqB7D,CAAC;AACF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,QAAgB;IACtD,OAAO;;;;;;6BAMoB,QAAQ;;;;;;;;;;;;6BAYR,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuCpB,QAAQ;;;;;;;;;;;;;;;;;;CAkBxB,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAAgB;IACjD,OAAO;;sBAEa,QAAQ;;;;;;;;uBAQP,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B9B,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CR,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAAgB;IAClD,OAAO;;;;;;;;;;;;;;;6BAeoB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DpC,CAAC;AACF,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,IAAY;IACnC,OAAO,IAAI;SACR,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,KAAa,EACb,OAIC;IAED,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,WAAW;YACd,OAAO,kBAAkB,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;QAChD,KAAK,UAAU;YACb,OAAO,uBAAuB,CAAC,OAAO,CAAC,QAAQ,IAAI,wBAAwB,CAAC,CAAC;QAC/E,KAAK,WAAW;YACd,OAAO,kBAAkB,CAAC,OAAO,CAAC,QAAQ,IAAI,8BAA8B,CAAC,CAAC;QAChF,KAAK,IAAI;YACP,OAAO,WAAW,EAAE,CAAC;QACvB,KAAK,YAAY;YACf,OAAO,mBAAmB,CAAC,OAAO,CAAC,QAAQ,IAAI,wBAAwB,CAAC,CAAC;QAC3E;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autopilot Signal Detection
|
|
3
|
+
*
|
|
4
|
+
* Detects phase completion signals in the session transcript,
|
|
5
|
+
* similar to how ralph-loop/index.ts detects completion promises.
|
|
6
|
+
*/
|
|
7
|
+
import type { AutopilotSignal } from './types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Detect a specific signal in the session transcript
|
|
10
|
+
*/
|
|
11
|
+
export declare function detectSignal(sessionId: string, signal: AutopilotSignal): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Get the expected signal for the current phase
|
|
14
|
+
*/
|
|
15
|
+
export declare function getExpectedSignalForPhase(phase: string): AutopilotSignal | null;
|
|
16
|
+
/**
|
|
17
|
+
* Detect any autopilot signal in transcript (for phase advancement)
|
|
18
|
+
*/
|
|
19
|
+
export declare function detectAnySignal(sessionId: string): AutopilotSignal | null;
|
|
20
|
+
//# sourceMappingURL=signals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../../src/hooks/autopilot/signals.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAgBlD;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,OAAO,CAwBhF;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAS/E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAOzE"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autopilot Signal Detection
|
|
3
|
+
*
|
|
4
|
+
* Detects phase completion signals in the session transcript,
|
|
5
|
+
* similar to how ralph-loop/index.ts detects completion promises.
|
|
6
|
+
*/
|
|
7
|
+
import { existsSync, readFileSync } from 'fs';
|
|
8
|
+
import { join } from 'path';
|
|
9
|
+
import { homedir } from 'os';
|
|
10
|
+
/**
|
|
11
|
+
* Signal patterns - each signal can appear in transcript
|
|
12
|
+
*/
|
|
13
|
+
const SIGNAL_PATTERNS = {
|
|
14
|
+
'EXPANSION_COMPLETE': /EXPANSION_COMPLETE/i,
|
|
15
|
+
'PLANNING_COMPLETE': /PLANNING_COMPLETE/i,
|
|
16
|
+
'EXECUTION_COMPLETE': /EXECUTION_COMPLETE/i,
|
|
17
|
+
'QA_COMPLETE': /QA_COMPLETE/i,
|
|
18
|
+
'VALIDATION_COMPLETE': /VALIDATION_COMPLETE/i,
|
|
19
|
+
'AUTOPILOT_COMPLETE': /AUTOPILOT_COMPLETE/i,
|
|
20
|
+
'TRANSITION_TO_QA': /TRANSITION_TO_QA/i,
|
|
21
|
+
'TRANSITION_TO_VALIDATION': /TRANSITION_TO_VALIDATION/i,
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Detect a specific signal in the session transcript
|
|
25
|
+
*/
|
|
26
|
+
export function detectSignal(sessionId, signal) {
|
|
27
|
+
const claudeDir = join(homedir(), '.claude');
|
|
28
|
+
const possiblePaths = [
|
|
29
|
+
join(claudeDir, 'sessions', sessionId, 'transcript.md'),
|
|
30
|
+
join(claudeDir, 'sessions', sessionId, 'messages.json'),
|
|
31
|
+
join(claudeDir, 'transcripts', `${sessionId}.md`)
|
|
32
|
+
];
|
|
33
|
+
const pattern = SIGNAL_PATTERNS[signal];
|
|
34
|
+
if (!pattern)
|
|
35
|
+
return false;
|
|
36
|
+
for (const transcriptPath of possiblePaths) {
|
|
37
|
+
if (existsSync(transcriptPath)) {
|
|
38
|
+
try {
|
|
39
|
+
const content = readFileSync(transcriptPath, 'utf-8');
|
|
40
|
+
if (pattern.test(content)) {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Get the expected signal for the current phase
|
|
53
|
+
*/
|
|
54
|
+
export function getExpectedSignalForPhase(phase) {
|
|
55
|
+
switch (phase) {
|
|
56
|
+
case 'expansion': return 'EXPANSION_COMPLETE';
|
|
57
|
+
case 'planning': return 'PLANNING_COMPLETE';
|
|
58
|
+
case 'execution': return 'EXECUTION_COMPLETE';
|
|
59
|
+
case 'qa': return 'QA_COMPLETE';
|
|
60
|
+
case 'validation': return 'VALIDATION_COMPLETE';
|
|
61
|
+
default: return null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Detect any autopilot signal in transcript (for phase advancement)
|
|
66
|
+
*/
|
|
67
|
+
export function detectAnySignal(sessionId) {
|
|
68
|
+
for (const signal of Object.keys(SIGNAL_PATTERNS)) {
|
|
69
|
+
if (detectSignal(sessionId, signal)) {
|
|
70
|
+
return signal;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=signals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signals.js","sourceRoot":"","sources":["../../../src/hooks/autopilot/signals.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAG7B;;GAEG;AACH,MAAM,eAAe,GAAoC;IACvD,oBAAoB,EAAE,qBAAqB;IAC3C,mBAAmB,EAAE,oBAAoB;IACzC,oBAAoB,EAAE,qBAAqB;IAC3C,aAAa,EAAE,cAAc;IAC7B,qBAAqB,EAAE,sBAAsB;IAC7C,oBAAoB,EAAE,qBAAqB;IAC3C,kBAAkB,EAAE,mBAAmB;IACvC,0BAA0B,EAAE,2BAA2B;CACxD,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,SAAiB,EAAE,MAAuB;IACrE,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;IAC7C,MAAM,aAAa,GAAG;QACpB,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,CAAC;QACvD,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,CAAC;QACvD,IAAI,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,SAAS,KAAK,CAAC;KAClD,CAAC;IAEF,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IACxC,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAE3B,KAAK,MAAM,cAAc,IAAI,aAAa,EAAE,CAAC;QAC3C,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;YAC/B,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,YAAY,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;gBACtD,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;oBAC1B,OAAO,IAAI,CAAC;gBACd,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,SAAS;YACX,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,KAAa;IACrD,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,WAAW,CAAC,CAAC,OAAO,oBAAoB,CAAC;QAC9C,KAAK,UAAU,CAAC,CAAC,OAAO,mBAAmB,CAAC;QAC5C,KAAK,WAAW,CAAC,CAAC,OAAO,oBAAoB,CAAC;QAC9C,KAAK,IAAI,CAAC,CAAC,OAAO,aAAa,CAAC;QAChC,KAAK,YAAY,CAAC,CAAC,OAAO,qBAAqB,CAAC;QAChD,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC;IACvB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,SAAiB;IAC/C,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAsB,EAAE,CAAC;QACvE,IAAI,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,CAAC;YACpC,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autopilot State Management
|
|
3
|
+
*
|
|
4
|
+
* Persistent state for the autopilot workflow across phases.
|
|
5
|
+
*/
|
|
6
|
+
import type { AutopilotState, AutopilotPhase, AutopilotConfig } from './types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Ensure the autopilot directory exists
|
|
9
|
+
*/
|
|
10
|
+
export declare function ensureAutopilotDir(directory: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Read autopilot state from disk
|
|
13
|
+
*/
|
|
14
|
+
export declare function readAutopilotState(directory: string): AutopilotState | null;
|
|
15
|
+
/**
|
|
16
|
+
* Write autopilot state to disk
|
|
17
|
+
*/
|
|
18
|
+
export declare function writeAutopilotState(directory: string, state: AutopilotState): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Clear autopilot state
|
|
21
|
+
*/
|
|
22
|
+
export declare function clearAutopilotState(directory: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Check if autopilot is active
|
|
25
|
+
*/
|
|
26
|
+
export declare function isAutopilotActive(directory: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Initialize a new autopilot session
|
|
29
|
+
*/
|
|
30
|
+
export declare function initAutopilot(directory: string, idea: string, sessionId?: string, config?: Partial<AutopilotConfig>): AutopilotState;
|
|
31
|
+
/**
|
|
32
|
+
* Transition to a new phase
|
|
33
|
+
*/
|
|
34
|
+
export declare function transitionPhase(directory: string, newPhase: AutopilotPhase): AutopilotState | null;
|
|
35
|
+
/**
|
|
36
|
+
* Increment the agent spawn counter
|
|
37
|
+
*/
|
|
38
|
+
export declare function incrementAgentCount(directory: string, count?: number): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Update expansion phase data
|
|
41
|
+
*/
|
|
42
|
+
export declare function updateExpansion(directory: string, updates: Partial<AutopilotState['expansion']>): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Update planning phase data
|
|
45
|
+
*/
|
|
46
|
+
export declare function updatePlanning(directory: string, updates: Partial<AutopilotState['planning']>): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Update execution phase data
|
|
49
|
+
*/
|
|
50
|
+
export declare function updateExecution(directory: string, updates: Partial<AutopilotState['execution']>): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Update QA phase data
|
|
53
|
+
*/
|
|
54
|
+
export declare function updateQA(directory: string, updates: Partial<AutopilotState['qa']>): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Update validation phase data
|
|
57
|
+
*/
|
|
58
|
+
export declare function updateValidation(directory: string, updates: Partial<AutopilotState['validation']>): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Get the spec file path
|
|
61
|
+
*/
|
|
62
|
+
export declare function getSpecPath(directory: string): string;
|
|
63
|
+
/**
|
|
64
|
+
* Get the plan file path
|
|
65
|
+
*/
|
|
66
|
+
export declare function getPlanPath(directory: string): string;
|
|
67
|
+
//# sourceMappingURL=state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/hooks/autopilot/state.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAwBlF;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAO5D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAa3E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO,CASrF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAa9D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAG5D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAChC,cAAc,CA4DhB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,cAAc,GACvB,cAAc,GAAG,IAAI,CA4BvB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,GAAE,MAAU,GAAG,OAAO,CAMjF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,GAC5C,OAAO,CAMT;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,GAC3C,OAAO,CAMT;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,GAC5C,OAAO,CAMT;AAED;;GAEG;AACH,wBAAgB,QAAQ,CACtB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,GACrC,OAAO,CAMT;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,GAC7C,OAAO,CAMT;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAErD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAErD"}
|