oh-my-claude-sisyphus 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -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/index.d.ts +15 -0
- package/dist/hooks/autopilot/index.d.ts.map +1 -0
- package/dist/hooks/autopilot/index.js +20 -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/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 +2 -1
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js +13 -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/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/installer/index.d.ts +1 -1
- package/dist/installer/index.js +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,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autopilot Phase Transitions
|
|
3
|
+
*
|
|
4
|
+
* Handles transitions between phases, especially the critical Ralph → UltraQA
|
|
5
|
+
* and UltraQA → Validation transitions that must respect mutual exclusion.
|
|
6
|
+
*/
|
|
7
|
+
import { readRalphState, clearRalphState, clearLinkedUltraworkState } from '../ralph-loop/index.js';
|
|
8
|
+
import { startUltraQA, clearUltraQAState, readUltraQAState } from '../ultraqa-loop/index.js';
|
|
9
|
+
import { readAutopilotState, transitionPhase, updateExecution, updateQA } from './state.js';
|
|
10
|
+
/**
|
|
11
|
+
* Transition from Ralph (Phase 2: Execution) to UltraQA (Phase 3: QA)
|
|
12
|
+
*
|
|
13
|
+
* This handles the mutual exclusion by:
|
|
14
|
+
* 1. Saving Ralph's progress to autopilot state
|
|
15
|
+
* 2. Cleanly terminating Ralph mode (and linked Ultrawork)
|
|
16
|
+
* 3. Starting UltraQA mode
|
|
17
|
+
* 4. Preserving context for potential rollback
|
|
18
|
+
*/
|
|
19
|
+
export function transitionRalphToUltraQA(directory, sessionId) {
|
|
20
|
+
const autopilotState = readAutopilotState(directory);
|
|
21
|
+
if (!autopilotState || autopilotState.phase !== 'execution') {
|
|
22
|
+
return {
|
|
23
|
+
success: false,
|
|
24
|
+
error: 'Not in execution phase - cannot transition to QA'
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const ralphState = readRalphState(directory);
|
|
28
|
+
// Step 1: Preserve Ralph progress in autopilot state
|
|
29
|
+
const executionUpdated = updateExecution(directory, {
|
|
30
|
+
ralph_iterations: ralphState?.iteration ?? autopilotState.execution.ralph_iterations,
|
|
31
|
+
ralph_completed_at: new Date().toISOString(),
|
|
32
|
+
ultrawork_active: false
|
|
33
|
+
});
|
|
34
|
+
if (!executionUpdated) {
|
|
35
|
+
return {
|
|
36
|
+
success: false,
|
|
37
|
+
error: 'Failed to update execution state'
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
// Step 2: Cleanly terminate Ralph (and linked Ultrawork)
|
|
41
|
+
if (ralphState?.linked_ultrawork) {
|
|
42
|
+
clearLinkedUltraworkState(directory);
|
|
43
|
+
}
|
|
44
|
+
const ralphCleared = clearRalphState(directory);
|
|
45
|
+
if (!ralphCleared) {
|
|
46
|
+
return {
|
|
47
|
+
success: false,
|
|
48
|
+
error: 'Failed to clear Ralph state'
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
// Step 3: Transition to QA phase
|
|
52
|
+
const newState = transitionPhase(directory, 'qa');
|
|
53
|
+
if (!newState) {
|
|
54
|
+
return {
|
|
55
|
+
success: false,
|
|
56
|
+
error: 'Failed to transition to QA phase'
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
// Step 4: Start UltraQA
|
|
60
|
+
const qaResult = startUltraQA(directory, 'tests', sessionId, { maxCycles: 5 });
|
|
61
|
+
if (!qaResult.success) {
|
|
62
|
+
// Rollback on failure - restore execution phase
|
|
63
|
+
transitionPhase(directory, 'execution');
|
|
64
|
+
updateExecution(directory, { ralph_completed_at: undefined });
|
|
65
|
+
return {
|
|
66
|
+
success: false,
|
|
67
|
+
error: qaResult.error || 'Failed to start UltraQA'
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
success: true,
|
|
72
|
+
state: newState
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Transition from UltraQA (Phase 3: QA) to Validation (Phase 4)
|
|
77
|
+
*/
|
|
78
|
+
export function transitionUltraQAToValidation(directory) {
|
|
79
|
+
const autopilotState = readAutopilotState(directory);
|
|
80
|
+
if (!autopilotState || autopilotState.phase !== 'qa') {
|
|
81
|
+
return {
|
|
82
|
+
success: false,
|
|
83
|
+
error: 'Not in QA phase - cannot transition to validation'
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
const qaState = readUltraQAState(directory);
|
|
87
|
+
// Preserve QA progress
|
|
88
|
+
const qaUpdated = updateQA(directory, {
|
|
89
|
+
ultraqa_cycles: qaState?.cycle ?? autopilotState.qa.ultraqa_cycles,
|
|
90
|
+
qa_completed_at: new Date().toISOString()
|
|
91
|
+
});
|
|
92
|
+
if (!qaUpdated) {
|
|
93
|
+
return {
|
|
94
|
+
success: false,
|
|
95
|
+
error: 'Failed to update QA state'
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
// Terminate UltraQA
|
|
99
|
+
clearUltraQAState(directory);
|
|
100
|
+
// Transition to validation
|
|
101
|
+
const newState = transitionPhase(directory, 'validation');
|
|
102
|
+
if (!newState) {
|
|
103
|
+
return {
|
|
104
|
+
success: false,
|
|
105
|
+
error: 'Failed to transition to validation phase'
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
success: true,
|
|
110
|
+
state: newState
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Transition from Validation (Phase 4) to Complete
|
|
115
|
+
*/
|
|
116
|
+
export function transitionToComplete(directory) {
|
|
117
|
+
const state = transitionPhase(directory, 'complete');
|
|
118
|
+
if (!state) {
|
|
119
|
+
return {
|
|
120
|
+
success: false,
|
|
121
|
+
error: 'Failed to transition to complete phase'
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
return { success: true, state };
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Transition to failed state
|
|
128
|
+
*/
|
|
129
|
+
export function transitionToFailed(directory, error) {
|
|
130
|
+
const state = transitionPhase(directory, 'failed');
|
|
131
|
+
if (!state) {
|
|
132
|
+
return {
|
|
133
|
+
success: false,
|
|
134
|
+
error: 'Failed to transition to failed phase'
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
return { success: true, state };
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Get a prompt for Claude to execute the transition
|
|
141
|
+
*/
|
|
142
|
+
export function getTransitionPrompt(fromPhase, toPhase) {
|
|
143
|
+
if (fromPhase === 'execution' && toPhase === 'qa') {
|
|
144
|
+
return `## PHASE TRANSITION: Execution → QA
|
|
145
|
+
|
|
146
|
+
The execution phase is complete. Transitioning to QA phase.
|
|
147
|
+
|
|
148
|
+
**CRITICAL**: Ralph mode must be cleanly terminated before UltraQA can start.
|
|
149
|
+
|
|
150
|
+
The transition handler has:
|
|
151
|
+
1. Preserved Ralph iteration count and progress
|
|
152
|
+
2. Cleared Ralph state (and linked Ultrawork)
|
|
153
|
+
3. Started UltraQA in 'tests' mode
|
|
154
|
+
|
|
155
|
+
You are now in QA phase. Run the QA cycle:
|
|
156
|
+
1. Build: npm run build (or equivalent)
|
|
157
|
+
2. Lint: npm run lint (or equivalent)
|
|
158
|
+
3. Test: npm test (or equivalent)
|
|
159
|
+
|
|
160
|
+
Fix any failures and repeat until all pass.
|
|
161
|
+
|
|
162
|
+
Signal when QA passes: QA_COMPLETE
|
|
163
|
+
`;
|
|
164
|
+
}
|
|
165
|
+
if (fromPhase === 'qa' && toPhase === 'validation') {
|
|
166
|
+
return `## PHASE TRANSITION: QA → Validation
|
|
167
|
+
|
|
168
|
+
All QA checks have passed. Transitioning to validation phase.
|
|
169
|
+
|
|
170
|
+
The transition handler has:
|
|
171
|
+
1. Preserved UltraQA cycle count
|
|
172
|
+
2. Cleared UltraQA state
|
|
173
|
+
3. Updated phase to 'validation'
|
|
174
|
+
|
|
175
|
+
You are now in validation phase. Spawn parallel validation architects:
|
|
176
|
+
|
|
177
|
+
\`\`\`
|
|
178
|
+
// Spawn all three in parallel
|
|
179
|
+
Task(subagent_type="oh-my-claudecode:architect", model="opus",
|
|
180
|
+
prompt="FUNCTIONAL COMPLETENESS REVIEW: Verify all requirements from spec are implemented")
|
|
181
|
+
|
|
182
|
+
Task(subagent_type="oh-my-claudecode:security-reviewer", model="opus",
|
|
183
|
+
prompt="SECURITY REVIEW: Check for vulnerabilities, injection risks, auth issues")
|
|
184
|
+
|
|
185
|
+
Task(subagent_type="oh-my-claudecode:code-reviewer", model="opus",
|
|
186
|
+
prompt="CODE QUALITY REVIEW: Check patterns, maintainability, test coverage")
|
|
187
|
+
\`\`\`
|
|
188
|
+
|
|
189
|
+
Aggregate verdicts:
|
|
190
|
+
- All APPROVED → Signal: AUTOPILOT_COMPLETE
|
|
191
|
+
- Any REJECTED → Fix issues and re-validate (max 3 rounds)
|
|
192
|
+
`;
|
|
193
|
+
}
|
|
194
|
+
if (fromPhase === 'expansion' && toPhase === 'planning') {
|
|
195
|
+
return `## PHASE TRANSITION: Expansion → Planning
|
|
196
|
+
|
|
197
|
+
The idea has been expanded into a detailed specification.
|
|
198
|
+
|
|
199
|
+
Read the spec and create an implementation plan using the Architect agent (direct planning mode).
|
|
200
|
+
|
|
201
|
+
Signal when Critic approves the plan: PLANNING_COMPLETE
|
|
202
|
+
`;
|
|
203
|
+
}
|
|
204
|
+
if (fromPhase === 'planning' && toPhase === 'execution') {
|
|
205
|
+
return `## PHASE TRANSITION: Planning → Execution
|
|
206
|
+
|
|
207
|
+
The plan has been approved. Starting execution phase with Ralph + Ultrawork.
|
|
208
|
+
|
|
209
|
+
Execute tasks from the plan in parallel where possible.
|
|
210
|
+
|
|
211
|
+
Signal when all tasks complete: EXECUTION_COMPLETE
|
|
212
|
+
`;
|
|
213
|
+
}
|
|
214
|
+
return '';
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=transition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transition.js","sourceRoot":"","sources":["../../../src/hooks/autopilot/transition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,cAAc,EACd,eAAe,EACf,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,kBAAkB,EAElB,eAAe,EACf,eAAe,EACf,QAAQ,EAET,MAAM,YAAY,CAAC;AASpB;;;;;;;;GAQG;AACH,MAAM,UAAU,wBAAwB,CACtC,SAAiB,EACjB,SAAiB;IAEjB,MAAM,cAAc,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAErD,IAAI,CAAC,cAAc,IAAI,cAAc,CAAC,KAAK,KAAK,WAAW,EAAE,CAAC;QAC5D,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,kDAAkD;SAC1D,CAAC;IACJ,CAAC;I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* Type definitions for the /autopilot command - autonomous execution from idea to working code.
|
|
5
|
+
*
|
|
6
|
+
* The autopilot feature orchestrates a complete development lifecycle:
|
|
7
|
+
* 1. Expansion: Analyst + Architect expand the idea into detailed requirements
|
|
8
|
+
* 2. Planning: Architect creates comprehensive execution plan
|
|
9
|
+
* 3. Execution: Ralph + Ultrawork implement the plan
|
|
10
|
+
* 4. QA: UltraQA ensures build/lint/tests pass
|
|
11
|
+
* 5. Validation: Multiple specialized architects verify the implementation
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Represents the current phase of autopilot execution
|
|
15
|
+
*/
|
|
16
|
+
export type AutopilotPhase = 'expansion' | 'planning' | 'execution' | 'qa' | 'validation' | 'complete' | 'failed';
|
|
17
|
+
/**
|
|
18
|
+
* QA test status for build, lint, and test phases
|
|
19
|
+
*/
|
|
20
|
+
export type QAStatus = 'pending' | 'passing' | 'failing';
|
|
21
|
+
/**
|
|
22
|
+
* Type of validation performed by specialized architects
|
|
23
|
+
*/
|
|
24
|
+
export type ValidationVerdictType = 'functional' | 'security' | 'quality';
|
|
25
|
+
/**
|
|
26
|
+
* Verdict from a validation check
|
|
27
|
+
*/
|
|
28
|
+
export type ValidationVerdict = 'APPROVED' | 'REJECTED' | 'NEEDS_FIX';
|
|
29
|
+
/**
|
|
30
|
+
* Result from a single validation check
|
|
31
|
+
*/
|
|
32
|
+
export interface ValidationResult {
|
|
33
|
+
/** Type of validation performed */
|
|
34
|
+
type: ValidationVerdictType;
|
|
35
|
+
/** Verdict from the validation */
|
|
36
|
+
verdict: ValidationVerdict;
|
|
37
|
+
/** List of issues found (if any) */
|
|
38
|
+
issues?: string[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* State tracking for the expansion phase
|
|
42
|
+
*/
|
|
43
|
+
export interface AutopilotExpansion {
|
|
44
|
+
/** Whether analyst has completed requirements gathering */
|
|
45
|
+
analyst_complete: boolean;
|
|
46
|
+
/** Whether architect has completed technical design */
|
|
47
|
+
architect_complete: boolean;
|
|
48
|
+
/** Path to generated specification document */
|
|
49
|
+
spec_path: string | null;
|
|
50
|
+
/** Summary of gathered requirements */
|
|
51
|
+
requirements_summary: string;
|
|
52
|
+
/** Technology stack identified for the project */
|
|
53
|
+
tech_stack: string[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* State tracking for the planning phase
|
|
57
|
+
*/
|
|
58
|
+
export interface AutopilotPlanning {
|
|
59
|
+
/** Path to generated execution plan */
|
|
60
|
+
plan_path: string | null;
|
|
61
|
+
/** Number of architect iterations during planning */
|
|
62
|
+
architect_iterations: number;
|
|
63
|
+
/** Whether the plan has been approved */
|
|
64
|
+
approved: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* State tracking for the execution phase
|
|
68
|
+
*/
|
|
69
|
+
export interface AutopilotExecution {
|
|
70
|
+
/** Number of ralph persistence iterations */
|
|
71
|
+
ralph_iterations: number;
|
|
72
|
+
/** Whether ultrawork parallel execution is active */
|
|
73
|
+
ultrawork_active: boolean;
|
|
74
|
+
/** Number of tasks completed from the plan */
|
|
75
|
+
tasks_completed: number;
|
|
76
|
+
/** Total number of tasks in the plan */
|
|
77
|
+
tasks_total: number;
|
|
78
|
+
/** List of files created during execution */
|
|
79
|
+
files_created: string[];
|
|
80
|
+
/** List of files modified during execution */
|
|
81
|
+
files_modified: string[];
|
|
82
|
+
/** Timestamp when ralph marked execution as complete */
|
|
83
|
+
ralph_completed_at?: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* State tracking for the QA phase
|
|
87
|
+
*/
|
|
88
|
+
export interface AutopilotQA {
|
|
89
|
+
/** Number of UltraQA test-fix cycles performed */
|
|
90
|
+
ultraqa_cycles: number;
|
|
91
|
+
/** Current build status */
|
|
92
|
+
build_status: QAStatus;
|
|
93
|
+
/** Current lint status */
|
|
94
|
+
lint_status: QAStatus;
|
|
95
|
+
/** Current test status (or skipped if no tests) */
|
|
96
|
+
test_status: QAStatus | 'skipped';
|
|
97
|
+
/** Timestamp when QA phase completed */
|
|
98
|
+
qa_completed_at?: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* State tracking for the validation phase
|
|
102
|
+
*/
|
|
103
|
+
export interface AutopilotValidation {
|
|
104
|
+
/** Number of architect agents spawned for validation */
|
|
105
|
+
architects_spawned: number;
|
|
106
|
+
/** List of validation verdicts received */
|
|
107
|
+
verdicts: ValidationResult[];
|
|
108
|
+
/** Whether all validation checks approved */
|
|
109
|
+
all_approved: boolean;
|
|
110
|
+
/** Number of validation rounds performed */
|
|
111
|
+
validation_rounds: number;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Complete autopilot state
|
|
115
|
+
*/
|
|
116
|
+
export interface AutopilotState {
|
|
117
|
+
/** Whether autopilot is currently active */
|
|
118
|
+
active: boolean;
|
|
119
|
+
/** Current phase of execution */
|
|
120
|
+
phase: AutopilotPhase;
|
|
121
|
+
/** Current iteration number */
|
|
122
|
+
iteration: number;
|
|
123
|
+
/** Maximum iterations before giving up */
|
|
124
|
+
max_iterations: number;
|
|
125
|
+
/** Original user input that started autopilot */
|
|
126
|
+
originalIdea: string;
|
|
127
|
+
/** State for each phase */
|
|
128
|
+
expansion: AutopilotExpansion;
|
|
129
|
+
planning: AutopilotPlanning;
|
|
130
|
+
execution: AutopilotExecution;
|
|
131
|
+
qa: AutopilotQA;
|
|
132
|
+
validation: AutopilotValidation;
|
|
133
|
+
/** Metrics and timestamps */
|
|
134
|
+
started_at: string;
|
|
135
|
+
completed_at: string | null;
|
|
136
|
+
phase_durations: Record<string, number>;
|
|
137
|
+
total_agents_spawned: number;
|
|
138
|
+
wisdom_entries: number;
|
|
139
|
+
/** Session binding */
|
|
140
|
+
session_id?: string;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Configuration options for autopilot behavior
|
|
144
|
+
*/
|
|
145
|
+
export interface AutopilotConfig {
|
|
146
|
+
/** Maximum total iterations across all phases */
|
|
147
|
+
maxIterations?: number;
|
|
148
|
+
/** Maximum iterations during expansion phase */
|
|
149
|
+
maxExpansionIterations?: number;
|
|
150
|
+
/** Maximum iterations during planning phase */
|
|
151
|
+
maxArchitectIterations?: number;
|
|
152
|
+
/** Maximum QA test-fix cycles */
|
|
153
|
+
maxQaCycles?: number;
|
|
154
|
+
/** Maximum validation rounds before giving up */
|
|
155
|
+
maxValidationRounds?: number;
|
|
156
|
+
/** Number of parallel executors to use */
|
|
157
|
+
parallelExecutors?: number;
|
|
158
|
+
/** Pause for user confirmation after expansion */
|
|
159
|
+
pauseAfterExpansion?: boolean;
|
|
160
|
+
/** Pause for user confirmation after planning */
|
|
161
|
+
pauseAfterPlanning?: boolean;
|
|
162
|
+
/** Skip QA phase entirely */
|
|
163
|
+
skipQa?: boolean;
|
|
164
|
+
/** Skip validation phase entirely */
|
|
165
|
+
skipValidation?: boolean;
|
|
166
|
+
/** Automatically commit changes when complete */
|
|
167
|
+
autoCommit?: boolean;
|
|
168
|
+
/** Types of validation to perform */
|
|
169
|
+
validationArchitects?: ValidationVerdictType[];
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Result returned when autopilot completes or fails
|
|
173
|
+
*/
|
|
174
|
+
export interface AutopilotResult {
|
|
175
|
+
/** Whether autopilot completed successfully */
|
|
176
|
+
success: boolean;
|
|
177
|
+
/** Final phase reached */
|
|
178
|
+
phase: AutopilotPhase;
|
|
179
|
+
/** Summary of work completed */
|
|
180
|
+
summary: AutopilotSummary;
|
|
181
|
+
/** Error message if failed */
|
|
182
|
+
error?: string;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Summary of autopilot execution
|
|
186
|
+
*/
|
|
187
|
+
export interface AutopilotSummary {
|
|
188
|
+
/** Original idea provided by user */
|
|
189
|
+
originalIdea: string;
|
|
190
|
+
/** Files created during execution */
|
|
191
|
+
filesCreated: string[];
|
|
192
|
+
/** Files modified during execution */
|
|
193
|
+
filesModified: string[];
|
|
194
|
+
/** Final status of tests */
|
|
195
|
+
testsStatus: string;
|
|
196
|
+
/** Total duration in milliseconds */
|
|
197
|
+
duration: number;
|
|
198
|
+
/** Total number of agents spawned */
|
|
199
|
+
agentsSpawned: number;
|
|
200
|
+
/** Phases that were completed */
|
|
201
|
+
phasesCompleted: AutopilotPhase[];
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Signal types for phase transitions and completion
|
|
205
|
+
*/
|
|
206
|
+
export type AutopilotSignal = 'EXPANSION_COMPLETE' | 'PLANNING_COMPLETE' | 'EXECUTION_COMPLETE' | 'QA_COMPLETE' | 'VALIDATION_COMPLETE' | 'AUTOPILOT_COMPLETE' | 'TRANSITION_TO_QA' | 'TRANSITION_TO_VALIDATION';
|
|
207
|
+
/**
|
|
208
|
+
* Default configuration for autopilot
|
|
209
|
+
*/
|
|
210
|
+
export declare const DEFAULT_CONFIG: AutopilotConfig;
|
|
211
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/hooks/autopilot/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,WAAW,GACX,UAAU,GACV,WAAW,GACX,IAAI,GACJ,YAAY,GACZ,UAAU,GACV,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,UAAU,GAAG,SAAS,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mCAAmC;IACnC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,kCAAkC;IAClC,OAAO,EAAE,iBAAiB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AC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autopilot Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the /autopilot command - autonomous execution from idea to working code.
|
|
5
|
+
*
|
|
6
|
+
* The autopilot feature orchestrates a complete development lifecycle:
|
|
7
|
+
* 1. Expansion: Analyst + Architect expand the idea into detailed requirements
|
|
8
|
+
* 2. Planning: Architect creates comprehensive execution plan
|
|
9
|
+
* 3. Execution: Ralph + Ultrawork implement the plan
|
|
10
|
+
* 4. QA: UltraQA ensures build/lint/tests pass
|
|
11
|
+
* 5. Validation: Multiple specialized architects verify the implementation
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Default configuration for autopilot
|
|
15
|
+
*/
|
|
16
|
+
export const DEFAULT_CONFIG = {
|
|
17
|
+
maxIterations: 10,
|
|
18
|
+
maxExpansionIterations: 2,
|
|
19
|
+
maxArchitectIterations: 5,
|
|
20
|
+
maxQaCycles: 5,
|
|
21
|
+
maxValidationRounds: 3,
|
|
22
|
+
parallelExecutors: 5,
|
|
23
|
+
pauseAfterExpansion: false,
|
|
24
|
+
pauseAfterPlanning: false,
|
|
25
|
+
skipQa: false,
|
|
26
|
+
skipValidation: false,
|
|
27
|
+
autoCommit: false,
|
|
28
|
+
validationArchitects: ['functional', 'security', 'quality']
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/hooks/autopilot/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAsOH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAoB;IAC7C,aAAa,EAAE,EAAE;IACjB,sBAAsB,EAAE,CAAC;IACzB,sBAAsB,EAAE,CAAC;IACzB,WAAW,EAAE,CAAC;IACd,mBAAmB,EAAE,CAAC;IACtB,iBAAiB,EAAE,CAAC;IACpB,mBAAmB,EAAE,KAAK;IAC1B,kBAAkB,EAAE,KAAK;IACzB,MAAM,EAAE,KAAK;IACb,cAAc,EAAE,KAAK;IACrB,UAAU,EAAE,KAAK;IACjB,oBAAoB,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,SAAS,CAAC;CAC5D,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autopilot Validation Coordinator
|
|
3
|
+
*
|
|
4
|
+
* Coordinates parallel validation architects for Phase 4.
|
|
5
|
+
* Aggregates verdicts and determines if autopilot can complete.
|
|
6
|
+
*/
|
|
7
|
+
import type { AutopilotState, ValidationResult, ValidationVerdictType, ValidationVerdict } from './types.js';
|
|
8
|
+
export interface ValidationCoordinatorResult {
|
|
9
|
+
success: boolean;
|
|
10
|
+
allApproved: boolean;
|
|
11
|
+
verdicts: ValidationResult[];
|
|
12
|
+
round: number;
|
|
13
|
+
issues: string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Record a validation verdict from an architect
|
|
17
|
+
*/
|
|
18
|
+
export declare function recordValidationVerdict(directory: string, type: ValidationVerdictType, verdict: ValidationVerdict, issues?: string[]): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Get validation status
|
|
21
|
+
*/
|
|
22
|
+
export declare function getValidationStatus(directory: string): ValidationCoordinatorResult | null;
|
|
23
|
+
/**
|
|
24
|
+
* Start a new validation round
|
|
25
|
+
*/
|
|
26
|
+
export declare function startValidationRound(directory: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Check if validation should retry
|
|
29
|
+
*/
|
|
30
|
+
export declare function shouldRetryValidation(directory: string, maxRounds?: number): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Get issues that need fixing before retry
|
|
33
|
+
*/
|
|
34
|
+
export declare function getIssuesToFix(directory: string): string[];
|
|
35
|
+
/**
|
|
36
|
+
* Generate the validation spawn prompt
|
|
37
|
+
*/
|
|
38
|
+
export declare function getValidationSpawnPrompt(specPath: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Format validation results for display
|
|
41
|
+
*/
|
|
42
|
+
export declare function formatValidationResults(state: AutopilotState): string;
|
|
43
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/hooks/autopilot/validation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,qBAAqB,EAC3B,OAAO,EAAE,iBAAiB,EAC1B,MAAM,CAAC,EAAE,MAAM,EAAE,GAChB,OAAO,CAgCT;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,2BAA2B,GAAG,IAAI,CAoBzF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAY/D;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,GAAE,MAAU,GAAG,OAAO,CAavF;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAe1D;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA4DjE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CA2BrE"}
|