oh-my-claude-sisyphus 2.6.1 → 3.0.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 +59 -785
- package/agents/analyst.md +85 -0
- package/agents/architect-low.md +88 -0
- package/agents/architect-medium.md +108 -0
- package/agents/architect.md +77 -0
- package/agents/critic.md +97 -0
- package/agents/designer-high.md +113 -0
- package/agents/designer-low.md +89 -0
- package/agents/designer.md +80 -0
- package/agents/executor-high.md +116 -0
- package/agents/executor-low.md +94 -0
- package/agents/executor.md +62 -0
- package/agents/explore-medium.md +113 -0
- package/agents/explore.md +86 -0
- package/agents/planner.md +164 -0
- package/agents/qa-tester.md +109 -0
- package/agents/researcher-low.md +84 -0
- package/agents/researcher.md +70 -0
- package/agents/vision.md +39 -0
- package/agents/writer.md +152 -0
- package/commands/.gitkeep +0 -0
- package/dist/__tests__/hooks.test.js +22 -22
- package/dist/__tests__/hooks.test.js.map +1 -1
- package/dist/__tests__/hud-agents.test.d.ts +7 -0
- package/dist/__tests__/hud-agents.test.d.ts.map +1 -0
- package/dist/__tests__/hud-agents.test.js +363 -0
- package/dist/__tests__/hud-agents.test.js.map +1 -0
- package/dist/__tests__/installer.test.js +184 -116
- package/dist/__tests__/installer.test.js.map +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__/mnemosyne/config.test.d.ts +2 -0
- package/dist/__tests__/mnemosyne/config.test.d.ts.map +1 -0
- package/dist/__tests__/mnemosyne/config.test.js +37 -0
- package/dist/__tests__/mnemosyne/config.test.js.map +1 -0
- package/dist/__tests__/mnemosyne/detector.test.d.ts +2 -0
- package/dist/__tests__/mnemosyne/detector.test.d.ts.map +1 -0
- package/dist/__tests__/mnemosyne/detector.test.js +99 -0
- package/dist/__tests__/mnemosyne/detector.test.js.map +1 -0
- package/dist/__tests__/mnemosyne/finder.test.d.ts +2 -0
- package/dist/__tests__/mnemosyne/finder.test.d.ts.map +1 -0
- package/dist/__tests__/mnemosyne/finder.test.js +61 -0
- package/dist/__tests__/mnemosyne/finder.test.js.map +1 -0
- package/dist/__tests__/mnemosyne/loader.test.d.ts +2 -0
- package/dist/__tests__/mnemosyne/loader.test.d.ts.map +1 -0
- package/dist/__tests__/mnemosyne/loader.test.js +73 -0
- package/dist/__tests__/mnemosyne/loader.test.js.map +1 -0
- package/dist/__tests__/mnemosyne/parser.test.d.ts +2 -0
- package/dist/__tests__/mnemosyne/parser.test.d.ts.map +1 -0
- package/dist/__tests__/mnemosyne/parser.test.js +81 -0
- package/dist/__tests__/mnemosyne/parser.test.js.map +1 -0
- package/dist/__tests__/mnemosyne/validator.test.d.ts +2 -0
- package/dist/__tests__/mnemosyne/validator.test.d.ts.map +1 -0
- package/dist/__tests__/mnemosyne/validator.test.js +85 -0
- package/dist/__tests__/mnemosyne/validator.test.js.map +1 -0
- package/dist/__tests__/model-routing.test.js +34 -34
- package/dist/__tests__/model-routing.test.js.map +1 -1
- package/dist/__tests__/notepad.test.js +7 -7
- package/dist/__tests__/notepad.test.js.map +1 -1
- package/dist/__tests__/ralph-prd.test.js +12 -12
- package/dist/__tests__/ralph-prd.test.js.map +1 -1
- package/dist/__tests__/ralph-progress.test.js +12 -12
- package/dist/__tests__/ralph-progress.test.js.map +1 -1
- package/dist/__tests__/skills.test.js +50 -17
- package/dist/__tests__/skills.test.js.map +1 -1
- package/dist/__tests__/types.test.js +5 -5
- package/dist/__tests__/types.test.js.map +1 -1
- package/dist/agents/analyst.d.ts +11 -0
- package/dist/agents/analyst.d.ts.map +1 -0
- package/dist/agents/analyst.js +115 -0
- package/dist/agents/analyst.js.map +1 -0
- package/dist/agents/architect.d.ts +12 -0
- package/dist/agents/architect.d.ts.map +1 -0
- package/dist/agents/architect.js +189 -0
- package/dist/agents/architect.js.map +1 -0
- package/dist/agents/coordinator.d.ts +11 -0
- package/dist/agents/coordinator.d.ts.map +1 -0
- package/dist/agents/coordinator.js +115 -0
- package/dist/agents/coordinator.js.map +1 -0
- package/dist/agents/critic.d.ts +11 -0
- package/dist/agents/critic.d.ts.map +1 -0
- package/dist/agents/critic.js +127 -0
- package/dist/agents/critic.js.map +1 -0
- package/dist/agents/definitions.d.ts +33 -70
- package/dist/agents/definitions.d.ts.map +1 -1
- package/dist/agents/definitions.js +140 -1268
- package/dist/agents/definitions.js.map +1 -1
- package/dist/agents/designer.d.ts +11 -0
- package/dist/agents/designer.d.ts.map +1 -0
- package/dist/agents/designer.js +115 -0
- package/dist/agents/designer.js.map +1 -0
- package/dist/agents/executor.d.ts +12 -0
- package/dist/agents/executor.d.ts.map +1 -0
- package/dist/agents/executor.js +93 -0
- package/dist/agents/executor.js.map +1 -0
- package/dist/agents/explore.js +4 -4
- package/dist/agents/explore.js.map +1 -1
- package/dist/agents/index.d.ts +12 -11
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +15 -16
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/planner.d.ts +11 -0
- package/dist/agents/planner.d.ts.map +1 -0
- package/dist/agents/planner.js +194 -0
- package/dist/agents/planner.js.map +1 -0
- package/dist/agents/qa-tester.js +16 -16
- package/dist/agents/qa-tester.js.map +1 -1
- package/dist/agents/researcher.d.ts +12 -0
- package/dist/agents/researcher.d.ts.map +1 -0
- package/dist/agents/researcher.js +103 -0
- package/dist/agents/researcher.js.map +1 -0
- package/dist/agents/vision.d.ts +11 -0
- package/dist/agents/vision.d.ts.map +1 -0
- package/dist/agents/vision.js +70 -0
- package/dist/agents/vision.js.map +1 -0
- package/dist/agents/writer.d.ts +11 -0
- package/dist/agents/writer.d.ts.map +1 -0
- package/dist/agents/writer.js +209 -0
- package/dist/agents/writer.js.map +1 -0
- package/dist/cli/index.js +32 -32
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/index.d.ts +4 -4
- package/dist/commands/index.js +4 -4
- package/dist/config/loader.js +25 -25
- package/dist/config/loader.js.map +1 -1
- package/dist/features/auto-update.d.ts +5 -5
- package/dist/features/auto-update.d.ts.map +1 -1
- package/dist/features/auto-update.js +17 -17
- package/dist/features/auto-update.js.map +1 -1
- package/dist/features/background-agent/manager.js +1 -1
- package/dist/features/background-agent/manager.js.map +1 -1
- package/dist/features/boulder-state/constants.d.ts +5 -5
- package/dist/features/boulder-state/constants.d.ts.map +1 -1
- package/dist/features/boulder-state/constants.js +3 -3
- package/dist/features/boulder-state/constants.js.map +1 -1
- package/dist/features/boulder-state/index.d.ts +2 -2
- package/dist/features/boulder-state/index.d.ts.map +1 -1
- package/dist/features/boulder-state/index.js +2 -2
- package/dist/features/boulder-state/index.js.map +1 -1
- package/dist/features/boulder-state/storage.d.ts +3 -3
- package/dist/features/boulder-state/storage.d.ts.map +1 -1
- package/dist/features/boulder-state/storage.js +6 -6
- package/dist/features/boulder-state/storage.js.map +1 -1
- package/dist/features/builtin-skills/skills.d.ts +15 -1
- package/dist/features/builtin-skills/skills.d.ts.map +1 -1
- package/dist/features/builtin-skills/skills.js +100 -1110
- package/dist/features/builtin-skills/skills.js.map +1 -1
- package/dist/features/context-injector/types.d.ts +1 -1
- package/dist/features/context-injector/types.d.ts.map +1 -1
- package/dist/features/index.d.ts +1 -1
- package/dist/features/index.d.ts.map +1 -1
- package/dist/features/index.js +2 -2
- package/dist/features/index.js.map +1 -1
- package/dist/features/magic-keywords.js +14 -14
- package/dist/features/magic-keywords.js.map +1 -1
- package/dist/features/model-routing/prompts/opus.d.ts +1 -1
- package/dist/features/model-routing/prompts/opus.d.ts.map +1 -1
- package/dist/features/model-routing/prompts/opus.js +1 -1
- package/dist/features/model-routing/router.d.ts +1 -1
- package/dist/features/model-routing/router.js +14 -14
- package/dist/features/model-routing/router.js.map +1 -1
- package/dist/features/model-routing/rules.js +31 -31
- package/dist/features/model-routing/rules.js.map +1 -1
- package/dist/features/model-routing/types.js +1 -1
- package/dist/features/model-routing/types.js.map +1 -1
- package/dist/hooks/agent-usage-reminder/constants.d.ts +2 -2
- package/dist/hooks/agent-usage-reminder/constants.d.ts.map +1 -1
- package/dist/hooks/agent-usage-reminder/constants.js +5 -5
- package/dist/hooks/agent-usage-reminder/constants.js.map +1 -1
- package/dist/hooks/auto-slash-command/constants.d.ts +1 -1
- package/dist/hooks/auto-slash-command/constants.d.ts.map +1 -1
- package/dist/hooks/auto-slash-command/constants.js +9 -2
- package/dist/hooks/auto-slash-command/constants.js.map +1 -1
- package/dist/hooks/bridge.d.ts +2 -2
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js +50 -18
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/directory-readme-injector/constants.d.ts +1 -1
- package/dist/hooks/directory-readme-injector/constants.d.ts.map +1 -1
- package/dist/hooks/directory-readme-injector/constants.js +2 -2
- package/dist/hooks/directory-readme-injector/constants.js.map +1 -1
- package/dist/hooks/index.d.ts +3 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +9 -4
- package/dist/hooks/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/learner/config.d.ts +53 -0
- package/dist/hooks/learner/config.d.ts.map +1 -0
- package/dist/hooks/learner/config.js +103 -0
- package/dist/hooks/learner/config.js.map +1 -0
- package/dist/hooks/learner/constants.d.ts +24 -0
- package/dist/hooks/learner/constants.d.ts.map +1 -0
- package/dist/hooks/learner/constants.js +26 -0
- package/dist/hooks/learner/constants.js.map +1 -0
- package/dist/hooks/learner/detection-hook.d.ts +39 -0
- package/dist/hooks/learner/detection-hook.d.ts.map +1 -0
- package/dist/hooks/learner/detection-hook.js +83 -0
- package/dist/hooks/learner/detection-hook.js.map +1 -0
- package/dist/hooks/learner/detector.d.ts +30 -0
- package/dist/hooks/learner/detector.d.ts.map +1 -0
- package/dist/hooks/learner/detector.js +150 -0
- package/dist/hooks/learner/detector.js.map +1 -0
- package/dist/hooks/learner/finder.d.ts +21 -0
- package/dist/hooks/learner/finder.d.ts.map +1 -0
- package/dist/hooks/learner/finder.js +117 -0
- package/dist/hooks/learner/finder.js.map +1 -0
- package/dist/hooks/learner/index.d.ts +62 -0
- package/dist/hooks/learner/index.d.ts.map +1 -0
- package/dist/hooks/learner/index.js +137 -0
- package/dist/hooks/learner/index.js.map +1 -0
- package/dist/hooks/learner/loader.d.ts +20 -0
- package/dist/hooks/learner/loader.d.ts.map +1 -0
- package/dist/hooks/learner/loader.js +113 -0
- package/dist/hooks/learner/loader.js.map +1 -0
- package/dist/hooks/learner/parser.d.ts +21 -0
- package/dist/hooks/learner/parser.d.ts.map +1 -0
- package/dist/hooks/learner/parser.js +190 -0
- package/dist/hooks/learner/parser.js.map +1 -0
- package/dist/hooks/learner/promotion.d.ts +29 -0
- package/dist/hooks/learner/promotion.d.ts.map +1 -0
- package/dist/hooks/learner/promotion.js +87 -0
- package/dist/hooks/learner/promotion.js.map +1 -0
- package/dist/hooks/learner/types.d.ts +109 -0
- package/dist/hooks/learner/types.d.ts.map +1 -0
- package/dist/hooks/learner/types.js +8 -0
- package/dist/hooks/learner/types.js.map +1 -0
- package/dist/hooks/learner/validator.d.ts +15 -0
- package/dist/hooks/learner/validator.d.ts.map +1 -0
- package/dist/hooks/learner/validator.js +87 -0
- package/dist/hooks/learner/validator.js.map +1 -0
- package/dist/hooks/learner/writer.d.ts +27 -0
- package/dist/hooks/learner/writer.d.ts.map +1 -0
- package/dist/hooks/learner/writer.js +126 -0
- package/dist/hooks/learner/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/notepad/index.d.ts +2 -2
- package/dist/hooks/notepad/index.js +7 -7
- package/dist/hooks/notepad/index.js.map +1 -1
- package/dist/hooks/omc-orchestrator/constants.d.ts +23 -0
- package/dist/hooks/omc-orchestrator/constants.d.ts.map +1 -0
- package/dist/hooks/omc-orchestrator/constants.js +142 -0
- package/dist/hooks/omc-orchestrator/constants.js.map +1 -0
- package/dist/hooks/omc-orchestrator/index.d.ts +113 -0
- package/dist/hooks/omc-orchestrator/index.d.ts.map +1 -0
- package/dist/hooks/omc-orchestrator/index.js +309 -0
- package/dist/hooks/omc-orchestrator/index.js.map +1 -0
- package/dist/hooks/persistent-mode/index.d.ts +4 -4
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js +37 -37
- package/dist/hooks/persistent-mode/index.js.map +1 -1
- package/dist/hooks/ralph-loop/index.d.ts +33 -5
- package/dist/hooks/ralph-loop/index.d.ts.map +1 -1
- package/dist/hooks/ralph-loop/index.js +91 -17
- package/dist/hooks/ralph-loop/index.js.map +1 -1
- package/dist/hooks/ralph-prd/index.d.ts +4 -4
- package/dist/hooks/ralph-prd/index.d.ts.map +1 -1
- package/dist/hooks/ralph-prd/index.js +13 -13
- package/dist/hooks/ralph-prd/index.js.map +1 -1
- package/dist/hooks/ralph-progress/index.d.ts +5 -5
- package/dist/hooks/ralph-progress/index.d.ts.map +1 -1
- package/dist/hooks/ralph-progress/index.js +14 -14
- package/dist/hooks/ralph-progress/index.js.map +1 -1
- package/dist/hooks/ralph-verifier/index.d.ts +23 -23
- package/dist/hooks/ralph-verifier/index.d.ts.map +1 -1
- package/dist/hooks/ralph-verifier/index.js +41 -41
- package/dist/hooks/ralph-verifier/index.js.map +1 -1
- package/dist/hooks/rules-injector/constants.d.ts +1 -1
- package/dist/hooks/rules-injector/constants.d.ts.map +1 -1
- package/dist/hooks/rules-injector/constants.js +2 -2
- package/dist/hooks/rules-injector/constants.js.map +1 -1
- package/dist/hooks/todo-continuation/index.js +1 -1
- package/dist/hooks/todo-continuation/index.js.map +1 -1
- package/dist/hooks/ultraqa-loop/index.d.ts +1 -1
- package/dist/hooks/ultraqa-loop/index.js +8 -8
- package/dist/hooks/ultraqa-loop/index.js.map +1 -1
- package/dist/hooks/ultrawork-state/index.js +7 -7
- package/dist/hooks/ultrawork-state/index.js.map +1 -1
- package/dist/hud/background-tasks.d.ts +26 -0
- package/dist/hud/background-tasks.d.ts.map +1 -0
- package/dist/hud/background-tasks.js +116 -0
- package/dist/hud/background-tasks.js.map +1 -0
- package/dist/hud/colors.d.ts +54 -0
- package/dist/hud/colors.d.ts.map +1 -0
- package/dist/hud/colors.js +156 -0
- package/dist/hud/colors.js.map +1 -0
- package/dist/hud/elements/agents.d.ts +73 -0
- package/dist/hud/elements/agents.d.ts.map +1 -0
- package/dist/hud/elements/agents.js +405 -0
- package/dist/hud/elements/agents.js.map +1 -0
- package/dist/hud/elements/background.d.ts +20 -0
- package/dist/hud/elements/background.d.ts.map +1 -0
- package/dist/hud/elements/background.js +70 -0
- package/dist/hud/elements/background.js.map +1 -0
- package/dist/hud/elements/context.d.ts +19 -0
- package/dist/hud/elements/context.d.ts.map +1 -0
- package/dist/hud/elements/context.js +58 -0
- package/dist/hud/elements/context.js.map +1 -0
- package/dist/hud/elements/index.d.ts +17 -0
- package/dist/hud/elements/index.d.ts.map +1 -0
- package/dist/hud/elements/index.js +17 -0
- package/dist/hud/elements/index.js.map +1 -0
- package/dist/hud/elements/limits.d.ts +19 -0
- package/dist/hud/elements/limits.d.ts.map +1 -0
- package/dist/hud/elements/limits.js +54 -0
- package/dist/hud/elements/limits.js.map +1 -0
- package/dist/hud/elements/permission.d.ts +13 -0
- package/dist/hud/elements/permission.d.ts.map +1 -0
- package/dist/hud/elements/permission.js +20 -0
- package/dist/hud/elements/permission.js.map +1 -0
- package/dist/hud/elements/prd.d.ts +20 -0
- package/dist/hud/elements/prd.d.ts.map +1 -0
- package/dist/hud/elements/prd.js +52 -0
- package/dist/hud/elements/prd.js.map +1 -0
- package/dist/hud/elements/ralph.d.ts +14 -0
- package/dist/hud/elements/ralph.d.ts.map +1 -0
- package/dist/hud/elements/ralph.js +36 -0
- package/dist/hud/elements/ralph.js.map +1 -0
- package/dist/hud/elements/session.d.ts +13 -0
- package/dist/hud/elements/session.d.ts.map +1 -0
- package/dist/hud/elements/session.js +24 -0
- package/dist/hud/elements/session.js.map +1 -0
- package/dist/hud/elements/skills.d.ts +24 -0
- package/dist/hud/elements/skills.d.ts.map +1 -0
- package/dist/hud/elements/skills.js +81 -0
- package/dist/hud/elements/skills.js.map +1 -0
- package/dist/hud/elements/thinking.d.ts +13 -0
- package/dist/hud/elements/thinking.d.ts.map +1 -0
- package/dist/hud/elements/thinking.js +19 -0
- package/dist/hud/elements/thinking.js.map +1 -0
- package/dist/hud/elements/todos.d.ts +20 -0
- package/dist/hud/elements/todos.d.ts.map +1 -0
- package/dist/hud/elements/todos.js +70 -0
- package/dist/hud/elements/todos.js.map +1 -0
- package/dist/hud/index.d.ts +9 -0
- package/dist/hud/index.d.ts.map +1 -0
- package/dist/hud/index.js +89 -0
- package/dist/hud/index.js.map +1 -0
- package/dist/hud/omc-state.d.ts +31 -0
- package/dist/hud/omc-state.d.ts.map +1 -0
- package/dist/hud/omc-state.js +163 -0
- package/dist/hud/omc-state.js.map +1 -0
- package/dist/hud/render.d.ts +11 -0
- package/dist/hud/render.d.ts.map +1 -0
- package/dist/hud/render.js +121 -0
- package/dist/hud/render.js.map +1 -0
- 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/state.d.ts +43 -0
- package/dist/hud/state.d.ts.map +1 -0
- package/dist/hud/state.js +201 -0
- package/dist/hud/state.js.map +1 -0
- package/dist/hud/stdin.d.ts +22 -0
- package/dist/hud/stdin.d.ts.map +1 -0
- package/dist/hud/stdin.js +65 -0
- package/dist/hud/stdin.js.map +1 -0
- package/dist/hud/transcript.d.ts +32 -0
- package/dist/hud/transcript.d.ts.map +1 -0
- package/dist/hud/transcript.js +364 -0
- package/dist/hud/transcript.js.map +1 -0
- package/dist/hud/types.d.ts +178 -0
- package/dist/hud/types.d.ts.map +1 -0
- package/dist/hud/types.js +119 -0
- package/dist/hud/types.js.map +1 -0
- package/dist/hud/usage-api.d.ts +24 -0
- package/dist/hud/usage-api.d.ts.map +1 -0
- package/dist/hud/usage-api.js +234 -0
- package/dist/hud/usage-api.js.map +1 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -12
- package/dist/index.js.map +1 -1
- package/dist/installer/hooks.d.ts +36 -64
- package/dist/installer/hooks.d.ts.map +1 -1
- package/dist/installer/hooks.js +91 -1298
- package/dist/installer/hooks.js.map +1 -1
- package/dist/installer/index.d.ts +23 -22
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +307 -2575
- package/dist/installer/index.js.map +1 -1
- package/dist/shared/types.d.ts +6 -6
- package/dist/shared/types.d.ts.map +1 -1
- package/docs/ARCHITECTURE.md +386 -0
- package/docs/CLAUDE.md +281 -0
- package/docs/FULL-README.md +822 -0
- package/docs/LOCAL_PLUGIN_INSTALL.md +94 -0
- package/docs/MIGRATION-v3.md +186 -0
- package/docs/MIGRATION.md +460 -0
- package/docs/TIERED_AGENTS_V2.md +322 -0
- package/hooks/hooks.json +70 -0
- package/hooks/keyword-detector.sh +102 -0
- package/hooks/persistent-mode.sh +172 -0
- package/hooks/session-start.sh +62 -0
- package/hooks/stop-continuation.sh +40 -0
- package/package.json +14 -8
- package/scripts/install.sh +90 -72
- package/scripts/keyword-detector.mjs +1 -1
- package/scripts/persistent-mode.mjs +9 -9
- package/scripts/persistent-mode.sh +21 -10
- package/scripts/plugin-setup.mjs +109 -0
- package/scripts/pre-tool-enforcer.mjs +1 -1
- package/scripts/pre-tool-enforcer.sh +1 -1
- package/scripts/session-start.mjs +38 -3
- package/scripts/skill-injector.mjs +231 -0
- package/scripts/uninstall.sh +8 -8
- package/skills/analyze/SKILL.md +47 -0
- package/skills/cancel-ralph/SKILL.md +43 -0
- package/skills/cancel-ultraqa/SKILL.md +29 -0
- package/skills/cancel-ultrawork/SKILL.md +42 -0
- package/skills/deepinit/SKILL.md +321 -0
- package/skills/deepsearch/SKILL.md +39 -0
- package/skills/doctor/SKILL.md +192 -0
- package/skills/frontend-ui-ux/SKILL.md +53 -0
- package/skills/git-master/SKILL.md +58 -0
- package/skills/help/SKILL.md +66 -0
- package/skills/hud/SKILL.md +142 -0
- package/skills/learner/SKILL.md +136 -0
- package/skills/note/SKILL.md +63 -0
- package/skills/omc-default/SKILL.md +78 -0
- package/skills/omc-default-global/SKILL.md +75 -0
- package/skills/omc-setup/SKILL.md +144 -0
- package/skills/orchestrate/SKILL.md +409 -0
- package/skills/plan/SKILL.md +37 -0
- package/skills/planner/SKILL.md +43 -0
- package/skills/ralph/SKILL.md +101 -0
- package/skills/ralph-init/SKILL.md +61 -0
- package/skills/ralplan/SKILL.md +219 -0
- package/skills/release/SKILL.md +84 -0
- package/skills/review/SKILL.md +37 -0
- package/skills/ultraqa/SKILL.md +123 -0
- package/skills/ultrawork/SKILL.md +89 -0
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
# Tiered Agents v2 Architecture Design
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This document describes an improved tiered agent architecture that addresses current gaps and implements sophisticated patterns for model routing, capability inheritance, and dynamic escalation.
|
|
6
|
+
|
|
7
|
+
## Current Issues Identified
|
|
8
|
+
|
|
9
|
+
1. **Incomplete Inheritance**: Tiered agents don't inherit core behavioral patterns from base agents
|
|
10
|
+
2. **Inconsistent Tool Restrictions**: Tool restrictions vary without clear rationale
|
|
11
|
+
3. **Missing Escalation Signals**: No mechanism for agents to request escalation when overloaded
|
|
12
|
+
4. **Minimal Behavioral Instructions**: Tiered variants have too few instructions
|
|
13
|
+
5. **No Dynamic Routing in Markdown**: TypeScript router exists but markdown agents don't leverage it
|
|
14
|
+
|
|
15
|
+
## Design Principles
|
|
16
|
+
|
|
17
|
+
### 1. Template-Based Inheritance
|
|
18
|
+
|
|
19
|
+
Each tiered agent should inherit from a base template that provides:
|
|
20
|
+
- Core identity and role
|
|
21
|
+
- Fundamental constraints (read-only, no delegation, etc.)
|
|
22
|
+
- Output format requirements
|
|
23
|
+
- Quality standards
|
|
24
|
+
|
|
25
|
+
Tier-specific overrides then customize:
|
|
26
|
+
- Task complexity boundaries
|
|
27
|
+
- Tool restrictions
|
|
28
|
+
- Response depth/breadth
|
|
29
|
+
- Escalation thresholds
|
|
30
|
+
|
|
31
|
+
### 2. Explicit Capability Boundaries
|
|
32
|
+
|
|
33
|
+
Each tier has clear boundaries:
|
|
34
|
+
|
|
35
|
+
| Tier | Complexity | Response Depth | Self-Assessment |
|
|
36
|
+
|------|------------|----------------|-----------------|
|
|
37
|
+
| LOW (Haiku) | Simple, single-focus | Concise, direct | "Is this within my scope?" |
|
|
38
|
+
| MEDIUM (Sonnet) | Moderate, multi-step | Thorough, structured | "Can I handle this fully?" |
|
|
39
|
+
| HIGH (Opus) | Complex, system-wide | Comprehensive, nuanced | "What are the trade-offs?" |
|
|
40
|
+
|
|
41
|
+
### 3. Escalation Signals
|
|
42
|
+
|
|
43
|
+
Agents should recognize when to recommend escalation:
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
<Escalation_Signals>
|
|
47
|
+
## When to Recommend Higher Tier
|
|
48
|
+
|
|
49
|
+
Escalate when you detect:
|
|
50
|
+
- Task exceeds your complexity boundary
|
|
51
|
+
- Multiple failed attempts (>2)
|
|
52
|
+
- Cross-system dependencies you can't trace
|
|
53
|
+
- Security-sensitive changes
|
|
54
|
+
- Irreversible operations
|
|
55
|
+
|
|
56
|
+
Output escalation recommendation:
|
|
57
|
+
**ESCALATION RECOMMENDED**: [reason] → Use [higher-tier-agent]
|
|
58
|
+
</Escalation_Signals>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 4. Tool Capability Tiers
|
|
62
|
+
|
|
63
|
+
| Tool | LOW | MEDIUM | HIGH |
|
|
64
|
+
|------|-----|--------|------|
|
|
65
|
+
| Read | ✅ | ✅ | ✅ |
|
|
66
|
+
| Glob | ✅ | ✅ | ✅ |
|
|
67
|
+
| Grep | ✅ | ✅ | ✅ |
|
|
68
|
+
| Edit | ✅ (simple) | ✅ | ✅ |
|
|
69
|
+
| Write | ✅ (simple) | ✅ | ✅ |
|
|
70
|
+
| Bash | Limited | ✅ | ✅ |
|
|
71
|
+
| WebSearch | ❌ | ✅ | ✅ |
|
|
72
|
+
| WebFetch | ❌ | ✅ | ✅ |
|
|
73
|
+
| Task | ❌ | ❌ | Varies |
|
|
74
|
+
| TodoWrite | ✅ | ✅ | ✅ |
|
|
75
|
+
|
|
76
|
+
## Agent Family Templates
|
|
77
|
+
|
|
78
|
+
### Oracle Family (Analysis)
|
|
79
|
+
|
|
80
|
+
**Base Identity**: Strategic advisor, READ-ONLY consultant, diagnoses not implements
|
|
81
|
+
|
|
82
|
+
| Variant | Model | Tools | Focus |
|
|
83
|
+
|---------|-------|-------|-------|
|
|
84
|
+
| oracle-low | Haiku | Read, Glob, Grep | Quick lookups, single-file analysis |
|
|
85
|
+
| oracle-medium | Sonnet | + WebSearch, WebFetch | Standard analysis, dependency tracing |
|
|
86
|
+
| oracle | Opus | Full read access | Deep architecture analysis, system-wide patterns |
|
|
87
|
+
|
|
88
|
+
**Shared Constraints**:
|
|
89
|
+
- NO Write/Edit tools
|
|
90
|
+
- NO implementation
|
|
91
|
+
- MUST cite file:line references
|
|
92
|
+
- MUST provide actionable recommendations
|
|
93
|
+
|
|
94
|
+
**Tier-Specific Behaviors**:
|
|
95
|
+
|
|
96
|
+
```markdown
|
|
97
|
+
## oracle-low
|
|
98
|
+
- Answer direct questions quickly
|
|
99
|
+
- Single-file focus
|
|
100
|
+
- Output: Answer + Location + Context (3 lines max)
|
|
101
|
+
- Escalate if: cross-file dependencies, architecture questions
|
|
102
|
+
|
|
103
|
+
## oracle-medium
|
|
104
|
+
- Standard analysis workflow
|
|
105
|
+
- Multi-file tracing allowed
|
|
106
|
+
- Output: Summary + Findings + Diagnosis + Recommendations
|
|
107
|
+
- Escalate if: system-wide impact, security concerns, irreversible changes
|
|
108
|
+
|
|
109
|
+
## oracle (high)
|
|
110
|
+
- Deep architectural analysis
|
|
111
|
+
- System-wide pattern recognition
|
|
112
|
+
- Output: Full structured analysis with trade-offs
|
|
113
|
+
- No escalation needed (highest tier)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Sisyphus-Junior Family (Execution)
|
|
117
|
+
|
|
118
|
+
**Base Identity**: Focused executor, works ALONE, no delegation, TODO obsessed
|
|
119
|
+
|
|
120
|
+
| Variant | Model | Tools | Focus |
|
|
121
|
+
|---------|-------|-------|-------|
|
|
122
|
+
| sisyphus-junior-low | Haiku | Read, Glob, Grep, Edit, Write, Bash, TodoWrite | Single-file, trivial changes |
|
|
123
|
+
| sisyphus-junior | Sonnet | Same | Multi-step, moderate complexity |
|
|
124
|
+
| sisyphus-junior-high | Opus | Same | Multi-file, complex refactoring |
|
|
125
|
+
|
|
126
|
+
**Shared Constraints**:
|
|
127
|
+
- Task tool BLOCKED (no delegation)
|
|
128
|
+
- MUST use TodoWrite for 2+ step tasks
|
|
129
|
+
- MUST verify after changes
|
|
130
|
+
- Works ALONE
|
|
131
|
+
|
|
132
|
+
**Tier-Specific Behaviors**:
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
## sisyphus-junior-low
|
|
136
|
+
- Single-file edits only
|
|
137
|
+
- Trivial changes (typos, simple additions)
|
|
138
|
+
- Skip TodoWrite for <2 step tasks
|
|
139
|
+
- Escalate if: multi-file changes, complex logic, architectural decisions
|
|
140
|
+
|
|
141
|
+
## sisyphus-junior (medium)
|
|
142
|
+
- Multi-step tasks within a module
|
|
143
|
+
- Standard complexity
|
|
144
|
+
- Always use TodoWrite
|
|
145
|
+
- Escalate if: system-wide changes, cross-module dependencies
|
|
146
|
+
|
|
147
|
+
## sisyphus-junior-high
|
|
148
|
+
- Multi-file refactoring
|
|
149
|
+
- Complex architectural changes
|
|
150
|
+
- Deep analysis before changes
|
|
151
|
+
- No escalation needed (use oracle for consultation)
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Frontend-Engineer Family (UI/UX)
|
|
155
|
+
|
|
156
|
+
**Base Identity**: Designer-developer hybrid, sees what pure devs miss, creates memorable interfaces
|
|
157
|
+
|
|
158
|
+
| Variant | Model | Tools | Focus |
|
|
159
|
+
|---------|-------|-------|-------|
|
|
160
|
+
| frontend-engineer-low | Haiku | Read, Glob, Grep, Edit, Write, Bash | Simple styling, minor tweaks |
|
|
161
|
+
| frontend-engineer | Sonnet | Same | Standard UI work, components |
|
|
162
|
+
| frontend-engineer-high | Opus | Same | Design systems, complex architecture |
|
|
163
|
+
|
|
164
|
+
**Shared Constraints**:
|
|
165
|
+
- NEVER use generic fonts (Inter, Roboto, Arial)
|
|
166
|
+
- NEVER use cliched patterns (purple gradients)
|
|
167
|
+
- Match existing code patterns
|
|
168
|
+
- Production-quality output
|
|
169
|
+
|
|
170
|
+
**Tier-Specific Behaviors**:
|
|
171
|
+
|
|
172
|
+
```markdown
|
|
173
|
+
## frontend-engineer-low
|
|
174
|
+
- Simple CSS changes (colors, spacing, fonts)
|
|
175
|
+
- Minor component tweaks
|
|
176
|
+
- Match existing patterns exactly
|
|
177
|
+
- Escalate if: new component design, design system changes
|
|
178
|
+
|
|
179
|
+
## frontend-engineer (medium)
|
|
180
|
+
- Standard component work
|
|
181
|
+
- Apply design philosophy
|
|
182
|
+
- Make intentional aesthetic choices
|
|
183
|
+
- Escalate if: design system creation, complex state management
|
|
184
|
+
|
|
185
|
+
## frontend-engineer-high
|
|
186
|
+
- Design system architecture
|
|
187
|
+
- Complex component hierarchies
|
|
188
|
+
- Deep aesthetic reasoning
|
|
189
|
+
- Full creative latitude
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Librarian Family (Research)
|
|
193
|
+
|
|
194
|
+
**Base Identity**: External documentation researcher, searches EXTERNAL resources
|
|
195
|
+
|
|
196
|
+
| Variant | Model | Tools | Focus |
|
|
197
|
+
|---------|-------|-------|-------|
|
|
198
|
+
| librarian-low | Haiku | Read, Glob, Grep, WebSearch, WebFetch | Quick lookups |
|
|
199
|
+
| librarian | Sonnet | Same | Comprehensive research |
|
|
200
|
+
|
|
201
|
+
**Shared Constraints**:
|
|
202
|
+
- ALWAYS cite sources with URLs
|
|
203
|
+
- Prefer official docs
|
|
204
|
+
- Note version compatibility
|
|
205
|
+
- Flag outdated information
|
|
206
|
+
|
|
207
|
+
**Tier-Specific Behaviors**:
|
|
208
|
+
|
|
209
|
+
```markdown
|
|
210
|
+
## librarian-low
|
|
211
|
+
- Quick API lookups
|
|
212
|
+
- Find specific references
|
|
213
|
+
- Output: Answer + Source + Example (if applicable)
|
|
214
|
+
- Escalate if: comprehensive research needed, multiple sources required
|
|
215
|
+
|
|
216
|
+
## librarian (medium)
|
|
217
|
+
- Comprehensive research
|
|
218
|
+
- Multiple source synthesis
|
|
219
|
+
- Full structured output format
|
|
220
|
+
- No escalation needed for research tasks
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Explore Family (Search)
|
|
224
|
+
|
|
225
|
+
**Base Identity**: Codebase search specialist, finds files and code patterns
|
|
226
|
+
|
|
227
|
+
| Variant | Model | Tools | Focus |
|
|
228
|
+
|---------|-------|-------|-------|
|
|
229
|
+
| explore | Haiku | Read, Glob, Grep | Quick searches |
|
|
230
|
+
| explore-medium | Sonnet | Same | Thorough analysis |
|
|
231
|
+
|
|
232
|
+
**Shared Constraints**:
|
|
233
|
+
- READ-ONLY
|
|
234
|
+
- Always use absolute paths
|
|
235
|
+
- Return structured results
|
|
236
|
+
- Address underlying need, not just literal request
|
|
237
|
+
|
|
238
|
+
**Tier-Specific Behaviors**:
|
|
239
|
+
|
|
240
|
+
```markdown
|
|
241
|
+
## explore (low)
|
|
242
|
+
- Quick pattern matching
|
|
243
|
+
- File location
|
|
244
|
+
- Parallel tool calls (3+)
|
|
245
|
+
- Escalate if: architecture understanding needed, cross-module analysis
|
|
246
|
+
|
|
247
|
+
## explore-medium
|
|
248
|
+
- Thorough analysis
|
|
249
|
+
- Cross-reference findings
|
|
250
|
+
- Explain relationships
|
|
251
|
+
- No escalation needed
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## Implementation Changes Required
|
|
255
|
+
|
|
256
|
+
### 1. Update Markdown Agent Files
|
|
257
|
+
|
|
258
|
+
Each tiered agent file should include:
|
|
259
|
+
|
|
260
|
+
```markdown
|
|
261
|
+
---
|
|
262
|
+
name: [agent]-[tier]
|
|
263
|
+
description: [tier-specific description]
|
|
264
|
+
tools: [restricted tool list]
|
|
265
|
+
model: [haiku|sonnet|opus]
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
<Inherits_From>
|
|
269
|
+
Base: [base-agent].md
|
|
270
|
+
</Inherits_From>
|
|
271
|
+
|
|
272
|
+
<Tier_Identity>
|
|
273
|
+
[Tier-specific role and focus]
|
|
274
|
+
</Tier_Identity>
|
|
275
|
+
|
|
276
|
+
<Complexity_Boundary>
|
|
277
|
+
You handle: [specific types of tasks]
|
|
278
|
+
Escalate when: [specific conditions]
|
|
279
|
+
</Complexity_Boundary>
|
|
280
|
+
|
|
281
|
+
[Tier-specific instructions...]
|
|
282
|
+
|
|
283
|
+
<Escalation_Protocol>
|
|
284
|
+
When you detect tasks beyond your scope, output:
|
|
285
|
+
**ESCALATION RECOMMENDED**: [reason] → Use oh-my-claude-sisyphus:[higher-tier]
|
|
286
|
+
</Escalation_Protocol>
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### 2. Update TypeScript Router
|
|
290
|
+
|
|
291
|
+
The router should:
|
|
292
|
+
- Parse agent capabilities from markdown
|
|
293
|
+
- Match task signals to tier boundaries
|
|
294
|
+
- Provide escalation recommendations in output
|
|
295
|
+
|
|
296
|
+
### 3. Add Escalation Detection
|
|
297
|
+
|
|
298
|
+
The orchestrator should:
|
|
299
|
+
- Detect "ESCALATION RECOMMENDED" in agent output
|
|
300
|
+
- Automatically retry with recommended higher tier
|
|
301
|
+
- Log escalation patterns for optimization
|
|
302
|
+
|
|
303
|
+
## Cost Impact Analysis
|
|
304
|
+
|
|
305
|
+
Based on current pricing (Haiku $1/$5, Sonnet $3/$15, Opus $5/$25 per million tokens):
|
|
306
|
+
|
|
307
|
+
| Scenario | Before (all Sonnet) | After (Tiered) | Savings |
|
|
308
|
+
|----------|---------------------|----------------|---------|
|
|
309
|
+
| Simple lookups (70%) | $3/$15 | $1/$5 (Haiku) | ~67% |
|
|
310
|
+
| Standard work (25%) | $3/$15 | $3/$15 (Sonnet) | 0% |
|
|
311
|
+
| Complex work (5%) | $3/$15 | $5/$25 (Opus) | -67% |
|
|
312
|
+
| **Weighted Average** | $3/$15 | ~$1.60/$8 | **~47%** |
|
|
313
|
+
|
|
314
|
+
Intelligent routing can reduce costs by ~47% while improving quality for complex tasks.
|
|
315
|
+
|
|
316
|
+
## Next Steps
|
|
317
|
+
|
|
318
|
+
1. Create updated markdown files for all tiered agents
|
|
319
|
+
2. Add escalation detection to hooks
|
|
320
|
+
3. Update router to use agent capability parsing
|
|
321
|
+
4. Add telemetry for tier usage optimization
|
|
322
|
+
5. Create tests for escalation scenarios
|
package/hooks/hooks.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Sisyphus orchestration hooks for keyword detection, tool enforcement, session restoration, and continuation persistence",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"UserPromptSubmit": [
|
|
5
|
+
{
|
|
6
|
+
"matcher": "*",
|
|
7
|
+
"hooks": [
|
|
8
|
+
{
|
|
9
|
+
"type": "command",
|
|
10
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/keyword-detector.mjs\"",
|
|
11
|
+
"timeout": 5
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "command",
|
|
15
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/skill-injector.mjs\"",
|
|
16
|
+
"timeout": 3
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"SessionStart": [
|
|
22
|
+
{
|
|
23
|
+
"matcher": "*",
|
|
24
|
+
"hooks": [
|
|
25
|
+
{
|
|
26
|
+
"type": "command",
|
|
27
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/session-start.mjs\"",
|
|
28
|
+
"timeout": 5
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"PreToolUse": [
|
|
34
|
+
{
|
|
35
|
+
"matcher": "*",
|
|
36
|
+
"hooks": [
|
|
37
|
+
{
|
|
38
|
+
"type": "command",
|
|
39
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/pre-tool-enforcer.mjs\"",
|
|
40
|
+
"timeout": 3
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"PostToolUse": [
|
|
46
|
+
{
|
|
47
|
+
"matcher": "*",
|
|
48
|
+
"hooks": [
|
|
49
|
+
{
|
|
50
|
+
"type": "command",
|
|
51
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/post-tool-verifier.mjs\"",
|
|
52
|
+
"timeout": 3
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"Stop": [
|
|
58
|
+
{
|
|
59
|
+
"matcher": "*",
|
|
60
|
+
"hooks": [
|
|
61
|
+
{
|
|
62
|
+
"type": "command",
|
|
63
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/persistent-mode.mjs\"",
|
|
64
|
+
"timeout": 5
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Sisyphus Keyword Detector Hook
|
|
3
|
+
# Detects ultrawork/ultrathink/search/analyze keywords and injects enhanced mode messages
|
|
4
|
+
# Also activates persistent ultrawork state when ultrawork keyword is detected
|
|
5
|
+
|
|
6
|
+
# Read stdin (JSON input from Claude Code)
|
|
7
|
+
INPUT=$(cat)
|
|
8
|
+
|
|
9
|
+
# Extract directory from input
|
|
10
|
+
DIRECTORY=""
|
|
11
|
+
if command -v jq &> /dev/null; then
|
|
12
|
+
DIRECTORY=$(echo "$INPUT" | jq -r '.directory // ""' 2>/dev/null)
|
|
13
|
+
fi
|
|
14
|
+
if [ -z "$DIRECTORY" ] || [ "$DIRECTORY" = "null" ]; then
|
|
15
|
+
DIRECTORY=$(pwd)
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
# Extract the prompt text - try multiple JSON paths
|
|
19
|
+
PROMPT=""
|
|
20
|
+
if command -v jq &> /dev/null; then
|
|
21
|
+
# Try to extract from various possible JSON structures
|
|
22
|
+
PROMPT=$(echo "$INPUT" | jq -r '
|
|
23
|
+
if .prompt then .prompt
|
|
24
|
+
elif .message.content then .message.content
|
|
25
|
+
elif .parts then ([.parts[] | select(.type == "text") | .text] | join(" "))
|
|
26
|
+
else ""
|
|
27
|
+
end
|
|
28
|
+
' 2>/dev/null)
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# Fallback: simple grep extraction if jq fails
|
|
32
|
+
if [ -z "$PROMPT" ] || [ "$PROMPT" = "null" ]; then
|
|
33
|
+
PROMPT=$(echo "$INPUT" | grep -oP '"(prompt|content|text)"\s*:\s*"\K[^"]+' | head -1)
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
# Exit if no prompt found
|
|
37
|
+
if [ -z "$PROMPT" ]; then
|
|
38
|
+
echo '{"continue": true}'
|
|
39
|
+
exit 0
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
# Remove code blocks before checking keywords (prevents false positives)
|
|
43
|
+
PROMPT_NO_CODE=$(echo "$PROMPT" | sed 's/```[^`]*```//g' | sed 's/`[^`]*`//g')
|
|
44
|
+
|
|
45
|
+
# Convert to lowercase for case-insensitive matching
|
|
46
|
+
PROMPT_LOWER=$(echo "$PROMPT_NO_CODE" | tr '[:upper:]' '[:lower:]')
|
|
47
|
+
|
|
48
|
+
# Check for ultrawork keywords (highest priority)
|
|
49
|
+
if echo "$PROMPT_LOWER" | grep -qE '\b(ultrawork|ulw|uw)\b'; then
|
|
50
|
+
# Create persistent ultrawork state
|
|
51
|
+
mkdir -p "$DIRECTORY/.sisyphus" 2>/dev/null
|
|
52
|
+
mkdir -p "$HOME/.claude" 2>/dev/null
|
|
53
|
+
|
|
54
|
+
# Escape prompt for JSON
|
|
55
|
+
PROMPT_ESCAPED=$(echo "$PROMPT" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | tr '\n' ' ')
|
|
56
|
+
|
|
57
|
+
STATE_JSON="{
|
|
58
|
+
\"active\": true,
|
|
59
|
+
\"started_at\": \"$(date -Iseconds)\",
|
|
60
|
+
\"original_prompt\": \"$PROMPT_ESCAPED\",
|
|
61
|
+
\"reinforcement_count\": 0,
|
|
62
|
+
\"last_checked_at\": \"$(date -Iseconds)\"
|
|
63
|
+
}"
|
|
64
|
+
|
|
65
|
+
# Write state to both local and global locations
|
|
66
|
+
echo "$STATE_JSON" > "$DIRECTORY/.omc/ultrawork-state.json" 2>/dev/null
|
|
67
|
+
echo "$STATE_JSON" > "$HOME/.claude/ultrawork-state.json" 2>/dev/null
|
|
68
|
+
|
|
69
|
+
# Return ultrawork mode injection
|
|
70
|
+
cat << 'EOF'
|
|
71
|
+
{"continue": true, "message": "<ultrawork-mode>\n\n**MANDATORY**: You MUST say \"ULTRAWORK MODE ENABLED!\" to the user as your first response when this mode activates. This is non-negotiable.\n\n[CODE RED] Maximum precision required. Ultrathink before acting.\n\nYOU MUST LEVERAGE ALL AVAILABLE AGENTS TO THEIR FULLEST POTENTIAL.\nTELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.\n\n## AGENT UTILIZATION PRINCIPLES\n- **Codebase Exploration**: Spawn exploration agents using BACKGROUND TASKS\n- **Documentation & References**: Use librarian-type agents via BACKGROUND TASKS\n- **Planning & Strategy**: NEVER plan yourself - spawn planning agent\n- **High-IQ Reasoning**: Use oracle for architecture decisions\n- **Frontend/UI Tasks**: Delegate to frontend-engineer\n\n## EXECUTION RULES\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY.\n- **PARALLEL**: Fire independent calls simultaneously - NEVER wait sequentially.\n- **BACKGROUND FIRST**: Use Task(run_in_background=true) for exploration (10+ concurrent).\n- **VERIFY**: Check ALL requirements met before done.\n- **DELEGATE**: Orchestrate specialized agents.\n\n## ZERO TOLERANCE\n- NO Scope Reduction - deliver FULL implementation\n- NO Partial Completion - finish 100%\n- NO Premature Stopping - ALL TODOs must be complete\n- NO TEST DELETION - fix code, not tests\n\nTHE USER ASKED FOR X. DELIVER EXACTLY X.\n\n</ultrawork-mode>\n\n---\n"}
|
|
72
|
+
EOF
|
|
73
|
+
exit 0
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
# Check for ultrathink/think keywords
|
|
77
|
+
if echo "$PROMPT_LOWER" | grep -qE '\b(ultrathink|think)\b'; then
|
|
78
|
+
cat << 'EOF'
|
|
79
|
+
{"continue": true, "message": "<think-mode>\n\n**ULTRATHINK MODE ENABLED** - Extended reasoning activated.\n\nYou are now in deep thinking mode. Take your time to:\n1. Thoroughly analyze the problem from multiple angles\n2. Consider edge cases and potential issues\n3. Think through the implications of each approach\n4. Reason step-by-step before acting\n\nUse your extended thinking capabilities to provide the most thorough and well-reasoned response.\n\n</think-mode>\n\n---\n"}
|
|
80
|
+
EOF
|
|
81
|
+
exit 0
|
|
82
|
+
fi
|
|
83
|
+
|
|
84
|
+
# Check for search keywords (EN + multilingual)
|
|
85
|
+
if echo "$PROMPT_LOWER" | grep -qE '\b(search|find|locate|lookup|explore|discover|scan|grep|query|browse|detect|trace|seek|track|pinpoint|hunt)\b|where\s+is|show\s+me|list\s+all'; then
|
|
86
|
+
cat << 'EOF'
|
|
87
|
+
{"continue": true, "message": "<search-mode>\nMAXIMIZE SEARCH EFFORT. Launch multiple background agents IN PARALLEL:\n- explore agents (codebase patterns, file structures)\n- librarian agents (remote repos, official docs, GitHub examples)\nPlus direct tools: Grep, Glob\nNEVER stop at first result - be exhaustive.\n</search-mode>\n\n---\n"}
|
|
88
|
+
EOF
|
|
89
|
+
exit 0
|
|
90
|
+
fi
|
|
91
|
+
|
|
92
|
+
# Check for analyze keywords
|
|
93
|
+
if echo "$PROMPT_LOWER" | grep -qE '\b(analyze|analyse|investigate|examine|research|study|deep.?dive|inspect|audit|evaluate|assess|review|diagnose|scrutinize|dissect|debug|comprehend|interpret|breakdown|understand)\b|why\s+is|how\s+does|how\s+to'; then
|
|
94
|
+
cat << 'EOF'
|
|
95
|
+
{"continue": true, "message": "<analyze-mode>\nANALYSIS MODE. Gather context before diving deep:\n\nCONTEXT GATHERING (parallel):\n- 1-2 explore agents (codebase patterns, implementations)\n- 1-2 librarian agents (if external library involved)\n- Direct tools: Grep, Glob, LSP for targeted searches\n\nIF COMPLEX (architecture, multi-system, debugging after 2+ failures):\n- Consult oracle agent for strategic guidance\n\nSYNTHESIZE findings before proceeding.\n</analyze-mode>\n\n---\n"}
|
|
96
|
+
EOF
|
|
97
|
+
exit 0
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
# No keywords detected - continue without modification
|
|
101
|
+
echo '{"continue": true}'
|
|
102
|
+
exit 0
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Sisyphus Persistent Mode Hook
|
|
3
|
+
# Unified handler for ultrawork, ralph-loop, and todo continuation
|
|
4
|
+
# Prevents stopping when work remains incomplete
|
|
5
|
+
|
|
6
|
+
# Read stdin
|
|
7
|
+
INPUT=$(cat)
|
|
8
|
+
|
|
9
|
+
# Get session ID and directory
|
|
10
|
+
SESSION_ID=""
|
|
11
|
+
DIRECTORY=""
|
|
12
|
+
if command -v jq &> /dev/null; then
|
|
13
|
+
SESSION_ID=$(echo "$INPUT" | jq -r '.sessionId // .session_id // ""' 2>/dev/null)
|
|
14
|
+
DIRECTORY=$(echo "$INPUT" | jq -r '.directory // ""' 2>/dev/null)
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
# Default to current directory
|
|
18
|
+
if [ -z "$DIRECTORY" ]; then
|
|
19
|
+
DIRECTORY=$(pwd)
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
# Check for active ultrawork state
|
|
23
|
+
ULTRAWORK_STATE=""
|
|
24
|
+
if [ -f "$DIRECTORY/.omc/ultrawork-state.json" ]; then
|
|
25
|
+
ULTRAWORK_STATE=$(cat "$DIRECTORY/.omc/ultrawork-state.json" 2>/dev/null)
|
|
26
|
+
elif [ -f "$HOME/.claude/ultrawork-state.json" ]; then
|
|
27
|
+
ULTRAWORK_STATE=$(cat "$HOME/.claude/ultrawork-state.json" 2>/dev/null)
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# Check for active ralph loop
|
|
31
|
+
RALPH_STATE=""
|
|
32
|
+
if [ -f "$DIRECTORY/.omc/ralph-state.json" ]; then
|
|
33
|
+
RALPH_STATE=$(cat "$DIRECTORY/.omc/ralph-state.json" 2>/dev/null)
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
# Check for verification state (oracle verification)
|
|
37
|
+
VERIFICATION_STATE=""
|
|
38
|
+
if [ -f "$DIRECTORY/.omc/ralph-verification.json" ]; then
|
|
39
|
+
VERIFICATION_STATE=$(cat "$DIRECTORY/.omc/ralph-verification.json" 2>/dev/null)
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
# Check for incomplete todos
|
|
43
|
+
INCOMPLETE_COUNT=0
|
|
44
|
+
TODOS_DIR="$HOME/.claude/todos"
|
|
45
|
+
if [ -d "$TODOS_DIR" ]; then
|
|
46
|
+
for todo_file in "$TODOS_DIR"/*.json; do
|
|
47
|
+
if [ -f "$todo_file" ]; then
|
|
48
|
+
if command -v jq &> /dev/null; then
|
|
49
|
+
COUNT=$(jq '[.[] | select(.status != "completed" and .status != "cancelled")] | length' "$todo_file" 2>/dev/null || echo "0")
|
|
50
|
+
INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))
|
|
51
|
+
else
|
|
52
|
+
# Fallback: count "pending" or "in_progress" occurrences
|
|
53
|
+
COUNT=$(grep -c '"status"[[:space:]]*:[[:space:]]*"pending\|in_progress"' "$todo_file" 2>/dev/null) || COUNT=0
|
|
54
|
+
INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))
|
|
55
|
+
fi
|
|
56
|
+
fi
|
|
57
|
+
done
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
# Check project todos as well
|
|
61
|
+
for todo_path in "$DIRECTORY/.omc/todos.json" "$DIRECTORY/.claude/todos.json"; do
|
|
62
|
+
if [ -f "$todo_path" ]; then
|
|
63
|
+
if command -v jq &> /dev/null; then
|
|
64
|
+
COUNT=$(jq 'if type == "array" then [.[] | select(.status != "completed" and .status != "cancelled")] | length else 0 end' "$todo_path" 2>/dev/null || echo "0")
|
|
65
|
+
INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))
|
|
66
|
+
else
|
|
67
|
+
# Fallback: count "pending" or "in_progress" occurrences
|
|
68
|
+
COUNT=$(grep -c '"status"[[:space:]]*:[[:space:]]*"pending\|in_progress"' "$todo_path" 2>/dev/null) || COUNT=0
|
|
69
|
+
INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))
|
|
70
|
+
fi
|
|
71
|
+
fi
|
|
72
|
+
done
|
|
73
|
+
|
|
74
|
+
# Priority 1: Ralph Loop with Oracle Verification
|
|
75
|
+
if [ -n "$RALPH_STATE" ]; then
|
|
76
|
+
IS_ACTIVE=$(echo "$RALPH_STATE" | jq -r '.active // false' 2>/dev/null)
|
|
77
|
+
if [ "$IS_ACTIVE" = "true" ]; then
|
|
78
|
+
ITERATION=$(echo "$RALPH_STATE" | jq -r '.iteration // 1' 2>/dev/null)
|
|
79
|
+
MAX_ITER=$(echo "$RALPH_STATE" | jq -r '.max_iterations // 10' 2>/dev/null)
|
|
80
|
+
PROMISE=$(echo "$RALPH_STATE" | jq -r '.completion_promise // "TASK_COMPLETE"' 2>/dev/null)
|
|
81
|
+
PROMPT=$(echo "$RALPH_STATE" | jq -r '.prompt // ""' 2>/dev/null)
|
|
82
|
+
|
|
83
|
+
# Check if oracle verification is pending
|
|
84
|
+
if [ -n "$VERIFICATION_STATE" ]; then
|
|
85
|
+
IS_PENDING=$(echo "$VERIFICATION_STATE" | jq -r '.pending // false' 2>/dev/null)
|
|
86
|
+
if [ "$IS_PENDING" = "true" ]; then
|
|
87
|
+
ATTEMPT=$(echo "$VERIFICATION_STATE" | jq -r '.verification_attempts // 0' 2>/dev/null)
|
|
88
|
+
MAX_ATTEMPTS=$(echo "$VERIFICATION_STATE" | jq -r '.max_verification_attempts // 3' 2>/dev/null)
|
|
89
|
+
ORIGINAL_TASK=$(echo "$VERIFICATION_STATE" | jq -r '.original_task // ""' 2>/dev/null)
|
|
90
|
+
COMPLETION_CLAIM=$(echo "$VERIFICATION_STATE" | jq -r '.completion_claim // ""' 2>/dev/null)
|
|
91
|
+
ORACLE_FEEDBACK=$(echo "$VERIFICATION_STATE" | jq -r '.oracle_feedback // ""' 2>/dev/null)
|
|
92
|
+
NEXT_ATTEMPT=$((ATTEMPT + 1))
|
|
93
|
+
|
|
94
|
+
FEEDBACK_SECTION=""
|
|
95
|
+
if [ -n "$ORACLE_FEEDBACK" ] && [ "$ORACLE_FEEDBACK" != "null" ]; then
|
|
96
|
+
FEEDBACK_SECTION="\n**Previous Oracle Feedback (rejected):**\n$ORACLE_FEEDBACK\n"
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
cat << EOF
|
|
100
|
+
{"continue": false, "reason": "<ralph-verification>\n\n[ORACLE VERIFICATION REQUIRED - Attempt $NEXT_ATTEMPT/$MAX_ATTEMPTS]\n\nThe agent claims the task is complete. Before accepting, YOU MUST verify with Oracle.\n\n**Original Task:**\n$ORIGINAL_TASK\n\n**Completion Claim:**\n$COMPLETION_CLAIM\n$FEEDBACK_SECTION\n## MANDATORY VERIFICATION STEPS\n\n1. **Spawn Oracle Agent** for verification:\n \`\`\`\n Task(subagent_type=\"oracle\", prompt=\"Verify this task completion claim...\")\n \`\`\`\n\n2. **Oracle must check:**\n - Are ALL requirements from the original task met?\n - Is the implementation complete, not partial?\n - Are there any obvious bugs or issues?\n - Does the code compile/run without errors?\n - Are tests passing (if applicable)?\n\n3. **Based on Oracle's response:**\n - If APPROVED: Output \`<oracle-approved>VERIFIED_COMPLETE</oracle-approved>\`\n - If REJECTED: Continue working on the identified issues\n\nDO NOT output the completion promise again until Oracle approves.\n\n</ralph-verification>\n\n---\n"}
|
|
101
|
+
EOF
|
|
102
|
+
exit 0
|
|
103
|
+
fi
|
|
104
|
+
fi
|
|
105
|
+
|
|
106
|
+
if [ "$ITERATION" -lt "$MAX_ITER" ]; then
|
|
107
|
+
# Increment iteration
|
|
108
|
+
NEW_ITER=$((ITERATION + 1))
|
|
109
|
+
echo "$RALPH_STATE" | jq ".iteration = $NEW_ITER" > "$DIRECTORY/.omc/ralph-state.json" 2>/dev/null
|
|
110
|
+
|
|
111
|
+
cat << EOF
|
|
112
|
+
{"continue": false, "reason": "<ralph-loop-continuation>\n\n[RALPH LOOP - ITERATION $NEW_ITER/$MAX_ITER]\n\nYour previous attempt did not output the completion promise. The work is NOT done yet.\n\nCRITICAL INSTRUCTIONS:\n1. Review your progress and the original task\n2. Check your todo list - are ALL items marked complete?\n3. Continue from where you left off\n4. When FULLY complete, output: <promise>$PROMISE</promise>\n5. Do NOT stop until the task is truly done\n\nOriginal task: $PROMPT\n\n</ralph-loop-continuation>\n\n---\n"}
|
|
113
|
+
EOF
|
|
114
|
+
exit 0
|
|
115
|
+
fi
|
|
116
|
+
fi
|
|
117
|
+
fi
|
|
118
|
+
|
|
119
|
+
# Priority 2: Ultrawork Mode with incomplete todos
|
|
120
|
+
if [ -n "$ULTRAWORK_STATE" ] && [ "$INCOMPLETE_COUNT" -gt 0 ]; then
|
|
121
|
+
# Check if active (with jq fallback)
|
|
122
|
+
IS_ACTIVE=""
|
|
123
|
+
if command -v jq &> /dev/null; then
|
|
124
|
+
IS_ACTIVE=$(echo "$ULTRAWORK_STATE" | jq -r '.active // false' 2>/dev/null)
|
|
125
|
+
else
|
|
126
|
+
# Fallback: grep for "active": true
|
|
127
|
+
if echo "$ULTRAWORK_STATE" | grep -q '"active"[[:space:]]*:[[:space:]]*true'; then
|
|
128
|
+
IS_ACTIVE="true"
|
|
129
|
+
fi
|
|
130
|
+
fi
|
|
131
|
+
|
|
132
|
+
if [ "$IS_ACTIVE" = "true" ]; then
|
|
133
|
+
# Get reinforcement count (with fallback)
|
|
134
|
+
REINFORCE_COUNT=0
|
|
135
|
+
if command -v jq &> /dev/null; then
|
|
136
|
+
REINFORCE_COUNT=$(echo "$ULTRAWORK_STATE" | jq -r '.reinforcement_count // 0' 2>/dev/null)
|
|
137
|
+
else
|
|
138
|
+
REINFORCE_COUNT=$(echo "$ULTRAWORK_STATE" | grep -oP '"reinforcement_count"[[:space:]]*:[[:space:]]*\K[0-9]+' 2>/dev/null) || REINFORCE_COUNT=0
|
|
139
|
+
fi
|
|
140
|
+
NEW_COUNT=$((REINFORCE_COUNT + 1))
|
|
141
|
+
|
|
142
|
+
# Get original prompt (with fallback)
|
|
143
|
+
ORIGINAL_PROMPT=""
|
|
144
|
+
if command -v jq &> /dev/null; then
|
|
145
|
+
ORIGINAL_PROMPT=$(echo "$ULTRAWORK_STATE" | jq -r '.original_prompt // ""' 2>/dev/null)
|
|
146
|
+
else
|
|
147
|
+
ORIGINAL_PROMPT=$(echo "$ULTRAWORK_STATE" | grep -oP '"original_prompt"[[:space:]]*:[[:space:]]*"\K[^"]+' 2>/dev/null) || ORIGINAL_PROMPT=""
|
|
148
|
+
fi
|
|
149
|
+
|
|
150
|
+
# Update state file (best effort)
|
|
151
|
+
if command -v jq &> /dev/null; then
|
|
152
|
+
echo "$ULTRAWORK_STATE" | jq ".reinforcement_count = $NEW_COUNT | .last_checked_at = \"$(date -Iseconds)\"" > "$DIRECTORY/.omc/ultrawork-state.json" 2>/dev/null
|
|
153
|
+
fi
|
|
154
|
+
|
|
155
|
+
cat << EOF
|
|
156
|
+
{"continue": false, "reason": "<ultrawork-persistence>\n\n[ULTRAWORK MODE STILL ACTIVE - Reinforcement #$NEW_COUNT]\n\nYour ultrawork session is NOT complete. $INCOMPLETE_COUNT incomplete todos remain.\n\nREMEMBER THE ULTRAWORK RULES:\n- **PARALLEL**: Fire independent calls simultaneously - NEVER wait sequentially\n- **BACKGROUND FIRST**: Use Task(run_in_background=true) for exploration (10+ concurrent)\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY after each\n- **VERIFY**: Check ALL requirements met before done\n- **NO Premature Stopping**: ALL TODOs must be complete\n\nContinue working on the next pending task. DO NOT STOP until all tasks are marked complete.\n\nOriginal task: $ORIGINAL_PROMPT\n\n</ultrawork-persistence>\n\n---\n"}
|
|
157
|
+
EOF
|
|
158
|
+
exit 0
|
|
159
|
+
fi
|
|
160
|
+
fi
|
|
161
|
+
|
|
162
|
+
# Priority 3: Todo Continuation (baseline)
|
|
163
|
+
if [ "$INCOMPLETE_COUNT" -gt 0 ]; then
|
|
164
|
+
cat << EOF
|
|
165
|
+
{"continue": false, "reason": "<todo-continuation>\n\n[SYSTEM REMINDER - TODO CONTINUATION]\n\nIncomplete tasks remain in your todo list ($INCOMPLETE_COUNT remaining). Continue working on the next pending task.\n\n- Proceed without asking for permission\n- Mark each task complete when finished\n- Do not stop until all tasks are done\n\n</todo-continuation>\n\n---\n"}
|
|
166
|
+
EOF
|
|
167
|
+
exit 0
|
|
168
|
+
fi
|
|
169
|
+
|
|
170
|
+
# No blocking needed
|
|
171
|
+
echo '{"continue": true}'
|
|
172
|
+
exit 0
|