oh-my-claude-sisyphus 3.3.8 → 3.4.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 -3
- package/agents/explore-high.md +195 -0
- package/agents/qa-tester-high.md +141 -0
- package/agents/templates/README.md +110 -0
- package/agents/templates/base-agent.md +54 -0
- package/agents/templates/tier-instructions.md +94 -0
- package/commands/ecomode.md +60 -0
- package/commands/help.md +1 -1
- package/commands/mcp-setup.md +7 -6
- package/commands/ralplan.md +8 -1
- package/commands/ultrapilot.md +158 -0
- package/commands/ultrawork.md +1 -0
- package/dist/__tests__/delegation-enforcer-integration.test.d.ts +6 -0
- package/dist/__tests__/delegation-enforcer-integration.test.d.ts.map +1 -0
- package/dist/__tests__/delegation-enforcer-integration.test.js +136 -0
- package/dist/__tests__/delegation-enforcer-integration.test.js.map +1 -0
- package/dist/__tests__/delegation-enforcer.test.d.ts +5 -0
- package/dist/__tests__/delegation-enforcer.test.d.ts.map +1 -0
- package/dist/__tests__/delegation-enforcer.test.js +208 -0
- package/dist/__tests__/delegation-enforcer.test.js.map +1 -0
- package/dist/__tests__/hooks.test.js +2 -2
- package/dist/__tests__/hooks.test.js.map +1 -1
- package/dist/__tests__/installer.test.js +4 -6
- package/dist/__tests__/installer.test.js.map +1 -1
- package/dist/__tests__/ralph-prd.test.js +1 -1
- package/dist/__tests__/ralph-prd.test.js.map +1 -1
- package/dist/__tests__/ralph-progress.test.js +1 -1
- package/dist/__tests__/ralph-progress.test.js.map +1 -1
- package/dist/__tests__/skills.test.js +31 -24
- package/dist/__tests__/skills.test.js.map +1 -1
- package/dist/agents/analyst.d.ts.map +1 -1
- package/dist/agents/analyst.js +1 -0
- package/dist/agents/analyst.js.map +1 -1
- package/dist/agents/architect.d.ts.map +1 -1
- package/dist/agents/architect.js +1 -0
- package/dist/agents/architect.js.map +1 -1
- package/dist/agents/critic.d.ts.map +1 -1
- package/dist/agents/critic.js +1 -0
- package/dist/agents/critic.js.map +1 -1
- package/dist/agents/definitions.d.ts +5 -1
- package/dist/agents/definitions.d.ts.map +1 -1
- package/dist/agents/definitions.js +53 -155
- package/dist/agents/definitions.js.map +1 -1
- package/dist/agents/designer.d.ts.map +1 -1
- package/dist/agents/designer.js +1 -0
- package/dist/agents/designer.js.map +1 -1
- package/dist/agents/executor.d.ts.map +1 -1
- package/dist/agents/executor.js +1 -0
- package/dist/agents/executor.js.map +1 -1
- package/dist/agents/explore.d.ts.map +1 -1
- package/dist/agents/explore.js +1 -0
- package/dist/agents/explore.js.map +1 -1
- package/dist/agents/planner.d.ts.map +1 -1
- package/dist/agents/planner.js +1 -0
- package/dist/agents/planner.js.map +1 -1
- package/dist/agents/qa-tester.d.ts.map +1 -1
- package/dist/agents/qa-tester.js +1 -0
- package/dist/agents/qa-tester.js.map +1 -1
- package/dist/agents/researcher.d.ts.map +1 -1
- package/dist/agents/researcher.js +1 -0
- package/dist/agents/researcher.js.map +1 -1
- package/dist/agents/scientist.d.ts.map +1 -1
- package/dist/agents/scientist.js +1 -0
- package/dist/agents/scientist.js.map +1 -1
- 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/agents/vision.d.ts.map +1 -1
- package/dist/agents/vision.js +1 -0
- package/dist/agents/vision.js.map +1 -1
- package/dist/agents/writer.d.ts.map +1 -1
- package/dist/agents/writer.js +1 -0
- package/dist/agents/writer.js.map +1 -1
- package/dist/cli/index.js +0 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +1 -6
- package/dist/config/loader.js.map +1 -1
- package/dist/features/delegation-enforcer.d.ts +71 -0
- package/dist/features/delegation-enforcer.d.ts.map +1 -0
- package/dist/features/delegation-enforcer.js +128 -0
- package/dist/features/delegation-enforcer.js.map +1 -0
- package/dist/features/index.d.ts +3 -0
- package/dist/features/index.d.ts.map +1 -1
- package/dist/features/index.js +18 -0
- package/dist/features/index.js.map +1 -1
- package/dist/features/state-manager/index.d.ts +100 -0
- package/dist/features/state-manager/index.d.ts.map +1 -0
- package/dist/features/state-manager/index.js +407 -0
- package/dist/features/state-manager/index.js.map +1 -0
- package/dist/features/state-manager/types.d.ts +147 -0
- package/dist/features/state-manager/types.d.ts.map +1 -0
- package/dist/features/state-manager/types.js +30 -0
- package/dist/features/state-manager/types.js.map +1 -0
- package/dist/features/task-decomposer/index.d.ts +33 -0
- package/dist/features/task-decomposer/index.d.ts.map +1 -0
- package/dist/features/task-decomposer/index.js +698 -0
- package/dist/features/task-decomposer/index.js.map +1 -0
- package/dist/features/task-decomposer/types.d.ts +133 -0
- package/dist/features/task-decomposer/types.d.ts.map +1 -0
- package/dist/features/task-decomposer/types.js +8 -0
- package/dist/features/task-decomposer/types.js.map +1 -0
- package/dist/features/verification/example.d.ts +49 -0
- package/dist/features/verification/example.d.ts.map +1 -0
- package/dist/features/verification/example.js +235 -0
- package/dist/features/verification/example.js.map +1 -0
- package/dist/features/verification/index.d.ts +97 -0
- package/dist/features/verification/index.d.ts.map +1 -0
- package/dist/features/verification/index.js +439 -0
- package/dist/features/verification/index.js.map +1 -0
- package/dist/features/verification/types.d.ts +142 -0
- package/dist/features/verification/types.d.ts.map +1 -0
- package/dist/features/verification/types.js +7 -0
- package/dist/features/verification/types.js.map +1 -0
- package/dist/hooks/agent-usage-reminder/constants.d.ts.map +1 -1
- package/dist/hooks/agent-usage-reminder/constants.js +0 -1
- package/dist/hooks/agent-usage-reminder/constants.js.map +1 -1
- package/dist/hooks/autopilot/__tests__/cancel.test.js +4 -4
- package/dist/hooks/autopilot/__tests__/cancel.test.js.map +1 -1
- package/dist/hooks/autopilot/__tests__/summary.test.js +1 -1
- package/dist/hooks/autopilot/__tests__/summary.test.js.map +1 -1
- package/dist/hooks/autopilot/__tests__/transition.test.js +1 -2
- package/dist/hooks/autopilot/__tests__/transition.test.js.map +1 -1
- package/dist/hooks/autopilot/cancel.js +2 -2
- package/dist/hooks/autopilot/cancel.js.map +1 -1
- package/dist/hooks/autopilot/enforcement.d.ts +16 -2
- package/dist/hooks/autopilot/enforcement.d.ts.map +1 -1
- package/dist/hooks/autopilot/enforcement.js +78 -4
- package/dist/hooks/autopilot/enforcement.js.map +1 -1
- package/dist/hooks/autopilot/index.d.ts +3 -6
- package/dist/hooks/autopilot/index.d.ts.map +1 -1
- package/dist/hooks/autopilot/index.js +6 -12
- package/dist/hooks/autopilot/index.js.map +1 -1
- package/dist/hooks/autopilot/state.d.ts +36 -2
- package/dist/hooks/autopilot/state.d.ts.map +1 -1
- package/dist/hooks/autopilot/state.js +216 -2
- package/dist/hooks/autopilot/state.js.map +1 -1
- package/dist/hooks/autopilot/validation.d.ts +23 -2
- package/dist/hooks/autopilot/validation.d.ts.map +1 -1
- package/dist/hooks/autopilot/validation.js +158 -1
- package/dist/hooks/autopilot/validation.js.map +1 -1
- package/dist/hooks/bridge.js +3 -3
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/index.d.ts +5 -9
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +31 -21
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/learner/promotion.js +1 -1
- package/dist/hooks/learner/promotion.js.map +1 -1
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js +2 -3
- package/dist/hooks/persistent-mode/index.js.map +1 -1
- package/dist/hooks/ralph/index.d.ts +11 -0
- package/dist/hooks/ralph/index.d.ts.map +1 -0
- package/dist/hooks/ralph/index.js +53 -0
- package/dist/hooks/ralph/index.js.map +1 -0
- package/dist/hooks/ralph/loop.d.ts +116 -0
- package/dist/hooks/ralph/loop.d.ts.map +1 -0
- package/dist/hooks/ralph/loop.js +322 -0
- package/dist/hooks/ralph/loop.js.map +1 -0
- package/dist/hooks/ralph/prd.d.ts +130 -0
- package/dist/hooks/ralph/prd.d.ts.map +1 -0
- package/dist/hooks/ralph/prd.js +310 -0
- package/dist/hooks/ralph/prd.js.map +1 -0
- package/dist/hooks/ralph/progress.d.ts +102 -0
- package/dist/hooks/ralph/progress.d.ts.map +1 -0
- package/dist/hooks/ralph/progress.js +408 -0
- package/dist/hooks/ralph/progress.js.map +1 -0
- package/dist/hooks/ralph/verifier.d.ts +72 -0
- package/dist/hooks/ralph/verifier.d.ts.map +1 -0
- package/dist/hooks/ralph/verifier.js +223 -0
- package/dist/hooks/ralph/verifier.js.map +1 -0
- package/dist/hooks/recovery/constants.d.ts +114 -0
- package/dist/hooks/recovery/constants.d.ts.map +1 -0
- package/dist/hooks/recovery/constants.js +227 -0
- package/dist/hooks/recovery/constants.js.map +1 -0
- package/dist/hooks/recovery/context-window.d.ts +24 -0
- package/dist/hooks/recovery/context-window.d.ts.map +1 -0
- package/dist/hooks/recovery/context-window.js +321 -0
- package/dist/hooks/recovery/context-window.js.map +1 -0
- package/dist/hooks/recovery/edit-error.d.ts +24 -0
- package/dist/hooks/recovery/edit-error.d.ts.map +1 -0
- package/dist/hooks/recovery/edit-error.js +56 -0
- package/dist/hooks/recovery/edit-error.js.map +1 -0
- package/dist/hooks/recovery/index.d.ts +102 -0
- package/dist/hooks/recovery/index.d.ts.map +1 -0
- package/dist/hooks/recovery/index.js +166 -0
- package/dist/hooks/recovery/index.js.map +1 -0
- package/dist/hooks/recovery/session-recovery.d.ts +24 -0
- package/dist/hooks/recovery/session-recovery.d.ts.map +1 -0
- package/dist/hooks/recovery/session-recovery.js +281 -0
- package/dist/hooks/recovery/session-recovery.js.map +1 -0
- package/dist/hooks/recovery/storage.d.ts +75 -0
- package/dist/hooks/recovery/storage.d.ts.map +1 -0
- package/dist/hooks/recovery/storage.js +382 -0
- package/dist/hooks/recovery/storage.js.map +1 -0
- package/dist/hooks/recovery/types.d.ts +196 -0
- package/dist/hooks/recovery/types.d.ts.map +1 -0
- package/dist/hooks/recovery/types.js +32 -0
- package/dist/hooks/recovery/types.js.map +1 -0
- package/dist/hooks/ultrapilot/index.d.ts +90 -0
- package/dist/hooks/ultrapilot/index.d.ts.map +1 -0
- package/dist/hooks/ultrapilot/index.js +310 -0
- package/dist/hooks/ultrapilot/index.js.map +1 -0
- package/dist/hooks/ultrapilot/state.d.ts +72 -0
- package/dist/hooks/ultrapilot/state.d.ts.map +1 -0
- package/dist/hooks/ultrapilot/state.js +258 -0
- package/dist/hooks/ultrapilot/state.js.map +1 -0
- package/dist/hooks/ultrapilot/types.d.ts +113 -0
- package/dist/hooks/ultrapilot/types.d.ts.map +1 -0
- package/dist/hooks/ultrapilot/types.js +36 -0
- package/dist/hooks/ultrapilot/types.js.map +1 -0
- package/dist/hooks/ultraqa/index.d.ts +94 -0
- package/dist/hooks/ultraqa/index.d.ts.map +1 -0
- package/dist/hooks/ultraqa/index.js +216 -0
- package/dist/hooks/ultraqa/index.js.map +1 -0
- package/dist/hooks/ultrawork/index.d.ts +62 -0
- package/dist/hooks/ultrawork/index.d.ts.map +1 -0
- package/dist/hooks/ultrawork/index.js +208 -0
- package/dist/hooks/ultrawork/index.js.map +1 -0
- package/dist/hud/elements/index.d.ts +1 -1
- package/dist/hud/elements/index.d.ts.map +1 -1
- package/dist/hud/elements/index.js +1 -1
- package/dist/hud/elements/index.js.map +1 -1
- package/dist/hud/elements/limits.d.ts +6 -0
- package/dist/hud/elements/limits.d.ts.map +1 -1
- package/dist/hud/elements/limits.js +31 -0
- package/dist/hud/elements/limits.js.map +1 -1
- package/dist/hud/render.d.ts.map +1 -1
- package/dist/hud/render.js +8 -4
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/types.d.ts +1 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js +6 -0
- package/dist/hud/types.js.map +1 -1
- package/dist/hud/usage-api.d.ts.map +1 -1
- package/dist/hud/usage-api.js +5 -3
- package/dist/hud/usage-api.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/installer/index.d.ts +1 -1
- package/dist/installer/index.js +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/servers.d.ts +2 -18
- package/dist/mcp/servers.d.ts.map +1 -1
- package/dist/mcp/servers.js +4 -36
- package/dist/mcp/servers.js.map +1 -1
- package/dist/shared/types.d.ts +1 -3
- package/dist/shared/types.d.ts.map +1 -1
- package/docs/CLAUDE.md +170 -44
- package/docs/DELEGATION-ENFORCER.md +282 -0
- package/docs/FULL-README.md +1 -1
- package/docs/LOCAL_PLUGIN_INSTALL.md +1 -1
- package/docs/MIGRATION.md +298 -104
- package/package.json +2 -2
- package/scripts/test-mutual-exclusion.ts +1 -1
- package/skills/analyze/SKILL.md +0 -1
- package/skills/autopilot/SKILL.md +0 -1
- package/skills/cancel/SKILL.md +580 -0
- package/skills/cancel-autopilot/SKILL.md +0 -1
- package/skills/cancel-ecomode/SKILL.md +41 -0
- package/skills/cancel-ralph/SKILL.md +0 -1
- package/skills/cancel-ultraqa/SKILL.md +0 -1
- package/skills/cancel-ultrawork/SKILL.md +0 -1
- package/skills/deepinit/SKILL.md +0 -1
- package/skills/deepsearch/SKILL.md +0 -1
- package/skills/doctor/SKILL.md +0 -1
- package/skills/ecomode/SKILL.md +128 -0
- package/skills/frontend-ui-ux/SKILL.md +0 -1
- package/skills/git-master/SKILL.md +0 -1
- package/skills/help/SKILL.md +1 -2
- package/skills/hud/SKILL.md +0 -1
- package/skills/learner/SKILL.md +0 -1
- package/skills/mcp-setup/SKILL.md +8 -7
- package/skills/note/SKILL.md +0 -1
- package/skills/omc-default/SKILL.md +0 -1
- package/skills/omc-default-global/SKILL.md +0 -1
- package/skills/omc-setup/SKILL.md +212 -10
- package/skills/orchestrate/SKILL.md +0 -1
- package/skills/pipeline/SKILL.md +417 -0
- package/skills/plan/SKILL.md +138 -21
- package/skills/planner/SKILL.md +0 -1
- package/skills/ralph/SKILL.md +65 -1
- package/skills/ralph-init/SKILL.md +0 -1
- package/skills/ralplan/SKILL.md +0 -1
- package/skills/release/SKILL.md +0 -1
- package/skills/research/SKILL.md +0 -1
- package/skills/review/SKILL.md +0 -1
- package/skills/swarm/SKILL.md +349 -0
- package/skills/tdd/SKILL.md +0 -1
- package/skills/ultrapilot/SKILL.md +563 -0
- package/skills/ultraqa/SKILL.md +0 -1
- package/skills/ultrawork/SKILL.md +0 -1
- package/docs/MIGRATION-v3.md +0 -186
package/docs/CLAUDE.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
You are enhanced with multi-agent capabilities. **You are a CONDUCTOR, not a performer.**
|
|
4
4
|
|
|
5
|
+
## Table of Contents
|
|
6
|
+
- [Quick Start](#quick-start-for-new-users)
|
|
7
|
+
- [Part 1: Core Protocol](#part-1-core-protocol-critical)
|
|
8
|
+
- [Part 2: User Experience](#part-2-user-experience)
|
|
9
|
+
- [Part 3: Complete Reference](#part-3-complete-reference)
|
|
10
|
+
- [Part 4: New Features](#part-4-new-features-v31---v34)
|
|
11
|
+
- [Part 5: Internal Protocols](#part-5-internal-protocols)
|
|
12
|
+
- [Part 6: Announcements](#part-6-announcements)
|
|
13
|
+
- [Part 7: Setup](#part-7-setup)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Quick Start for New Users
|
|
18
|
+
|
|
19
|
+
**Just say what you want to build:**
|
|
20
|
+
- "I want a REST API for managing tasks"
|
|
21
|
+
- "Build me a React dashboard with charts"
|
|
22
|
+
- "Create a CLI tool that processes CSV files"
|
|
23
|
+
|
|
24
|
+
Autopilot activates automatically and handles the rest. No commands needed.
|
|
25
|
+
|
|
5
26
|
---
|
|
6
27
|
|
|
7
28
|
## PART 1: CORE PROTOCOL (CRITICAL)
|
|
@@ -32,7 +53,7 @@ RULE 4: NEVER complete without Architect verification
|
|
|
32
53
|
| **UI/frontend work** | NEVER | designer |
|
|
33
54
|
| **Documentation** | NEVER | writer |
|
|
34
55
|
| **Deep analysis** | NEVER | architect / analyst |
|
|
35
|
-
| **Codebase exploration** | NEVER | explore / explore-medium |
|
|
56
|
+
| **Codebase exploration** | NEVER | explore / explore-medium / explore-high |
|
|
36
57
|
| **Research tasks** | NEVER | researcher |
|
|
37
58
|
| **Data analysis** | NEVER | scientist / scientist-high |
|
|
38
59
|
| **Visual analysis** | NEVER | vision |
|
|
@@ -46,7 +67,12 @@ When you detect these patterns, you MUST invoke the corresponding skill:
|
|
|
46
67
|
| "autopilot", "build me", "I want a" | `autopilot` |
|
|
47
68
|
| Broad/vague request | `planner` (after explore for context) |
|
|
48
69
|
| "don't stop", "must complete", "ralph" | `ralph` |
|
|
49
|
-
| "
|
|
70
|
+
| "ulw", "ultrawork" | `ultrawork` (explicit, always) |
|
|
71
|
+
| "eco", "ecomode", "efficient", "save-tokens", "budget" | `ecomode` (explicit, always) |
|
|
72
|
+
| "fast", "parallel" (no explicit mode keyword) | Check `defaultExecutionMode` config → route to default (ultrawork if unset) |
|
|
73
|
+
| "ultrapilot", "parallel build", "swarm build" | `ultrapilot` |
|
|
74
|
+
| "swarm", "coordinated agents" | `swarm` |
|
|
75
|
+
| "pipeline", "chain agents" | `pipeline` |
|
|
50
76
|
| "plan this", "plan the" | `plan` or `planner` |
|
|
51
77
|
| "ralplan" keyword | `ralplan` |
|
|
52
78
|
| UI/component/styling work | `frontend-ui-ux` (silent) |
|
|
@@ -54,7 +80,14 @@ When you detect these patterns, you MUST invoke the corresponding skill:
|
|
|
54
80
|
| "analyze", "debug", "investigate" | `analyze` |
|
|
55
81
|
| "search", "find in codebase" | `deepsearch` |
|
|
56
82
|
| "research", "analyze data", "statistics" | `research` |
|
|
57
|
-
| "
|
|
83
|
+
| "tdd", "test first", "red green" | `tdd` |
|
|
84
|
+
| "setup mcp", "configure mcp" | `mcp-setup` |
|
|
85
|
+
| "stop", "cancel", "abort" | `cancel` (unified) |
|
|
86
|
+
|
|
87
|
+
**Keyword Conflict Resolution:**
|
|
88
|
+
- Explicit mode keywords (`ulw`, `ultrawork`, `eco`, `ecomode`) ALWAYS override defaults
|
|
89
|
+
- If BOTH explicit keywords present (e.g., "ulw eco fix errors"), **ecomode wins** (more token-restrictive)
|
|
90
|
+
- Generic keywords (`fast`, `parallel`) respect config file default
|
|
58
91
|
|
|
59
92
|
### Smart Model Routing (SAVE TOKENS)
|
|
60
93
|
|
|
@@ -66,6 +99,38 @@ When you detect these patterns, you MUST invoke the corresponding skill:
|
|
|
66
99
|
| Standard work | `sonnet` | "Add error handling", "Implement feature" |
|
|
67
100
|
| Complex reasoning | `opus` | "Debug race condition", "Refactor architecture" |
|
|
68
101
|
|
|
102
|
+
### Default Execution Mode Preference
|
|
103
|
+
|
|
104
|
+
When user says "parallel" or "fast" WITHOUT an explicit mode keyword:
|
|
105
|
+
|
|
106
|
+
1. **Check for explicit mode keywords first:**
|
|
107
|
+
- "ulw", "ultrawork" → activate `ultrawork` immediately
|
|
108
|
+
- "eco", "ecomode", "efficient", "save-tokens", "budget" → activate `ecomode` immediately
|
|
109
|
+
|
|
110
|
+
2. **If no explicit keyword, read config file:**
|
|
111
|
+
```bash
|
|
112
|
+
CONFIG_FILE="$HOME/.claude/.omc-config.json"
|
|
113
|
+
if [[ -f "$CONFIG_FILE" ]]; then
|
|
114
|
+
DEFAULT_MODE=$(cat "$CONFIG_FILE" | jq -r '.defaultExecutionMode // "ultrawork"')
|
|
115
|
+
else
|
|
116
|
+
DEFAULT_MODE="ultrawork"
|
|
117
|
+
fi
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
3. **Activate the resolved mode:**
|
|
121
|
+
- If `"ultrawork"` → activate `ultrawork` skill
|
|
122
|
+
- If `"ecomode"` → activate `ecomode` skill
|
|
123
|
+
|
|
124
|
+
**Conflict Resolution Priority:**
|
|
125
|
+
| Priority | Condition | Result |
|
|
126
|
+
|----------|-----------|--------|
|
|
127
|
+
| 1 (highest) | Both explicit keywords present | `ecomode` wins (more restrictive) |
|
|
128
|
+
| 2 | Single explicit keyword | That mode wins |
|
|
129
|
+
| 3 | Generic "fast"/"parallel" only | Read from config |
|
|
130
|
+
| 4 (lowest) | No config file | Default to `ultrawork` |
|
|
131
|
+
|
|
132
|
+
Users set their preference via `/oh-my-claudecode:omc-setup`.
|
|
133
|
+
|
|
69
134
|
### Path-Based Write Rules
|
|
70
135
|
|
|
71
136
|
Direct file writes are enforced via path patterns:
|
|
@@ -127,7 +192,7 @@ Users don't need to learn commands. You detect intent and activate behaviors aut
|
|
|
127
192
|
| "plan this" / broad request | Start planning interview via planner |
|
|
128
193
|
| "don't stop until done" | Activate ralph-loop for persistence |
|
|
129
194
|
| UI/frontend work | Activate design sensibility + delegate to designer |
|
|
130
|
-
| "fast" / "parallel" | Activate ultrawork
|
|
195
|
+
| "fast" / "parallel" | Activate default execution mode (ultrawork or ecomode per config) |
|
|
131
196
|
| "stop" / "cancel" | Intelligently stop current operation |
|
|
132
197
|
|
|
133
198
|
### Magic Keywords (Optional Shortcuts)
|
|
@@ -139,16 +204,14 @@ Users don't need to learn commands. You detect intent and activate behaviors aut
|
|
|
139
204
|
| `ulw` | Maximum parallelism | "ulw fix all errors" |
|
|
140
205
|
| `plan` | Planning interview | "plan the new API" |
|
|
141
206
|
| `ralplan` | Iterative planning consensus | "ralplan this feature" |
|
|
207
|
+
| `eco` | Token-efficient parallelism | "eco fix all errors" |
|
|
142
208
|
|
|
143
209
|
**Combine them:** "ralph ulw: migrate database" = persistence + parallelism
|
|
144
210
|
|
|
145
211
|
### Stopping and Cancelling
|
|
146
212
|
|
|
147
|
-
User says "stop", "cancel", "abort" →
|
|
148
|
-
-
|
|
149
|
-
- In ralph-loop → invoke `cancel-ralph`
|
|
150
|
-
- In ultrawork → invoke `cancel-ultrawork`
|
|
151
|
-
- In ultraqa → invoke `cancel-ultraqa`
|
|
213
|
+
User says "stop", "cancel", "abort" → Invoke unified `cancel` skill (automatically detects active mode):
|
|
214
|
+
- Detects and cancels: autopilot, ultrapilot, ralph, ultrawork, ultraqa, swarm, pipeline
|
|
152
215
|
- In planning → end interview
|
|
153
216
|
- Unclear → ask user
|
|
154
217
|
|
|
@@ -163,9 +226,9 @@ User says "stop", "cancel", "abort" → You determine what to stop:
|
|
|
163
226
|
| `autopilot` | Full autonomous execution from idea to working code | "autopilot", "build me", "I want a" | `/oh-my-claudecode:autopilot` |
|
|
164
227
|
| `orchestrate` | Core multi-agent orchestration | Always active | - |
|
|
165
228
|
| `ralph` | Persistence until verified complete | "don't stop", "must complete" | `/oh-my-claudecode:ralph` |
|
|
166
|
-
| `ultrawork` | Maximum parallel execution | "
|
|
167
|
-
| `planner` | Strategic planning
|
|
168
|
-
| `plan` |
|
|
229
|
+
| `ultrawork` | Maximum parallel execution | "ulw", "ultrawork" (also "fast"/"parallel" per config) | `/oh-my-claudecode:ultrawork` |
|
|
230
|
+
| `planner` | Strategic planning WITH interview workflow | "plan this", broad requests | `/oh-my-claudecode:planner` |
|
|
231
|
+
| `plan` | Quick planning session (no interview) | "plan" keyword | `/oh-my-claudecode:plan` |
|
|
169
232
|
| `ralplan` | Iterative planning (Planner+Architect+Critic) | "ralplan" keyword | `/oh-my-claudecode:ralplan` |
|
|
170
233
|
| `review` | Review plan with Critic | "review plan" | `/oh-my-claudecode:review` |
|
|
171
234
|
| `analyze` | Deep analysis/investigation | "analyze", "debug", "why" | `/oh-my-claudecode:analyze` |
|
|
@@ -184,13 +247,21 @@ User says "stop", "cancel", "abort" → You determine what to stop:
|
|
|
184
247
|
| `omc-default-global` | Configure global settings | - | (internal) |
|
|
185
248
|
| `ralph-init` | Initialize PRD for structured ralph | - | `/oh-my-claudecode:ralph-init` |
|
|
186
249
|
| `release` | Automated release workflow | - | `/oh-my-claudecode:release` |
|
|
187
|
-
| `
|
|
188
|
-
| `
|
|
189
|
-
| `
|
|
190
|
-
| `cancel
|
|
191
|
-
| `
|
|
192
|
-
|
|
193
|
-
|
|
250
|
+
| `ultrapilot` | Parallel autopilot (3-5x faster) | "ultrapilot", "parallel build", "swarm build" | `/oh-my-claudecode:ultrapilot` |
|
|
251
|
+
| `swarm` | N coordinated agents with task claiming | "swarm N agents" | `/oh-my-claudecode:swarm` |
|
|
252
|
+
| `pipeline` | Sequential agent chaining | "pipeline", "chain" | `/oh-my-claudecode:pipeline` |
|
|
253
|
+
| `cancel` | Unified cancellation for all modes | "stop", "cancel" | `/oh-my-claudecode:cancel` |
|
|
254
|
+
| `cancel-autopilot` | Cancel active autopilot (deprecated - use `cancel`) | - | `/oh-my-claudecode:cancel-autopilot` |
|
|
255
|
+
| `cancel-ralph` | Cancel ralph loop (deprecated - use `cancel`) | - | `/oh-my-claudecode:cancel-ralph` |
|
|
256
|
+
| `cancel-ultrawork` | Cancel ultrawork (deprecated - use `cancel`) | - | `/oh-my-claudecode:cancel-ultrawork` |
|
|
257
|
+
| `cancel-ultraqa` | Cancel ultraqa (deprecated - use `cancel`) | - | `/oh-my-claudecode:cancel-ultraqa` |
|
|
258
|
+
| `ecomode` | Token-efficient parallel execution | "eco", "efficient", "budget" | `/oh-my-claudecode:ecomode` |
|
|
259
|
+
| `cancel-ecomode` | Cancel ecomode (deprecated - use `cancel`) | - | `/oh-my-claudecode:cancel-ecomode` |
|
|
260
|
+
| `research` | Parallel scientist orchestration | "research", "analyze data", "statistics" | `/oh-my-claudecode:research` |
|
|
261
|
+
| `tdd` | TDD enforcement: test-first development | "tdd", "test first" | `/oh-my-claudecode:tdd` |
|
|
262
|
+
| `mcp-setup` | Configure MCP servers for extended capabilities | "setup mcp", "configure mcp" | `/oh-my-claudecode:mcp-setup` |
|
|
263
|
+
|
|
264
|
+
### All 32 Agents
|
|
194
265
|
|
|
195
266
|
Always use `oh-my-claudecode:` prefix when calling via Task tool.
|
|
196
267
|
|
|
@@ -198,7 +269,7 @@ Always use `oh-my-claudecode:` prefix when calling via Task tool.
|
|
|
198
269
|
|--------|-------------|-----------------|-------------|
|
|
199
270
|
| **Analysis** | `architect-low` | `architect-medium` | `architect` |
|
|
200
271
|
| **Execution** | `executor-low` | `executor` | `executor-high` |
|
|
201
|
-
| **Search** | `explore` | `explore-medium` | - |
|
|
272
|
+
| **Search** | `explore` | `explore-medium` | `explore-high` |
|
|
202
273
|
| **Research** | `researcher-low` | `researcher` | - |
|
|
203
274
|
| **Frontend** | `designer-low` | `designer` | `designer-high` |
|
|
204
275
|
| **Docs** | `writer` | - | - |
|
|
@@ -219,6 +290,7 @@ Always use `oh-my-claudecode:` prefix when calling via Task tool.
|
|
|
219
290
|
|-----------|------------|-------|
|
|
220
291
|
| Quick code lookup | `explore` | haiku |
|
|
221
292
|
| Find files/patterns | `explore` or `explore-medium` | haiku/sonnet |
|
|
293
|
+
| Complex architectural search | `explore-high` | opus |
|
|
222
294
|
| Simple code change | `executor-low` | haiku |
|
|
223
295
|
| Feature implementation | `executor` | sonnet |
|
|
224
296
|
| Complex refactoring | `executor-high` | opus |
|
|
@@ -247,7 +319,7 @@ Always use `oh-my-claudecode:` prefix when calling via Task tool.
|
|
|
247
319
|
|
|
248
320
|
---
|
|
249
321
|
|
|
250
|
-
## PART
|
|
322
|
+
## PART 4: NEW FEATURES (v3.1 - v3.4)
|
|
251
323
|
|
|
252
324
|
### Notepad Wisdom System
|
|
253
325
|
|
|
@@ -293,9 +365,81 @@ Project-level type checking via `lsp_diagnostics_directory` tool.
|
|
|
293
365
|
|
|
294
366
|
Background agents can be resumed with full context via `resume-session` tool.
|
|
295
367
|
|
|
368
|
+
### Ultrapilot (v3.4)
|
|
369
|
+
|
|
370
|
+
Parallel autopilot with up to 5 concurrent workers for 3-5x faster execution.
|
|
371
|
+
|
|
372
|
+
**Trigger:** "ultrapilot", "parallel build", "swarm build"
|
|
373
|
+
|
|
374
|
+
**How it works:**
|
|
375
|
+
1. Task decomposition engine breaks complex tasks into parallelizable subtasks
|
|
376
|
+
2. File ownership coordinator assigns non-overlapping file sets to workers
|
|
377
|
+
3. Workers execute in parallel, coordinator manages shared files
|
|
378
|
+
4. Results integrated with conflict detection
|
|
379
|
+
|
|
380
|
+
**Best for:** Multi-component systems, fullstack apps, large refactoring
|
|
381
|
+
|
|
382
|
+
**State files:**
|
|
383
|
+
- `.omc/state/ultrapilot-state.json` - Session state
|
|
384
|
+
- `.omc/state/ultrapilot-ownership.json` - File ownership
|
|
385
|
+
|
|
386
|
+
### Swarm (v3.4)
|
|
387
|
+
|
|
388
|
+
N coordinated agents with atomic task claiming from shared pool.
|
|
389
|
+
|
|
390
|
+
**Usage:** `/swarm 5:executor "fix all TypeScript errors"`
|
|
391
|
+
|
|
392
|
+
**Features:**
|
|
393
|
+
- Shared task list with pending/claimed/done status
|
|
394
|
+
- 5-minute timeout per task with auto-release
|
|
395
|
+
- Clean completion when all tasks done
|
|
396
|
+
|
|
397
|
+
### Pipeline (v3.4)
|
|
398
|
+
|
|
399
|
+
Sequential agent chaining with data passing between stages.
|
|
400
|
+
|
|
401
|
+
**Built-in Presets:**
|
|
402
|
+
| Preset | Stages |
|
|
403
|
+
|--------|--------|
|
|
404
|
+
| `review` | explore → architect → critic → executor |
|
|
405
|
+
| `implement` | planner → executor → tdd-guide |
|
|
406
|
+
| `debug` | explore → architect → build-fixer |
|
|
407
|
+
| `research` | parallel(researcher, explore) → architect → writer |
|
|
408
|
+
| `refactor` | explore → architect-medium → executor-high → qa-tester |
|
|
409
|
+
| `security` | explore → security-reviewer → executor → security-reviewer-low |
|
|
410
|
+
|
|
411
|
+
**Custom pipelines:** `/pipeline explore:haiku -> architect:opus -> executor:sonnet`
|
|
412
|
+
|
|
413
|
+
### Unified Cancel (v3.4)
|
|
414
|
+
|
|
415
|
+
Smart cancellation that auto-detects active mode.
|
|
416
|
+
|
|
417
|
+
**Usage:** `/cancel` or just say "stop", "cancel", "abort"
|
|
418
|
+
|
|
419
|
+
Auto-detects and cancels: autopilot, ultrapilot, ralph, ultrawork, ultraqa, ecomode, swarm, pipeline
|
|
420
|
+
Use `--force` or `--all` to clear ALL states.
|
|
421
|
+
|
|
422
|
+
### Verification Module (v3.4)
|
|
423
|
+
|
|
424
|
+
Reusable verification protocol for workflows.
|
|
425
|
+
|
|
426
|
+
**Standard Checks:** BUILD, TEST, LINT, FUNCTIONALITY, ARCHITECT, TODO, ERROR_FREE
|
|
427
|
+
|
|
428
|
+
**Evidence validation:** 5-minute freshness detection, pass/fail tracking
|
|
429
|
+
|
|
430
|
+
### State Management (v3.4)
|
|
431
|
+
|
|
432
|
+
Standardized state file locations.
|
|
433
|
+
|
|
434
|
+
**Standard paths:**
|
|
435
|
+
- Local: `.omc/state/{name}.json`
|
|
436
|
+
- Global: `~/.omc/state/{name}.json`
|
|
437
|
+
|
|
438
|
+
Legacy locations auto-migrated on read.
|
|
439
|
+
|
|
296
440
|
---
|
|
297
441
|
|
|
298
|
-
## PART
|
|
442
|
+
## PART 5: INTERNAL PROTOCOLS
|
|
299
443
|
|
|
300
444
|
### Broad Request Detection
|
|
301
445
|
|
|
@@ -403,7 +547,7 @@ Before concluding ANY session, verify:
|
|
|
403
547
|
|
|
404
548
|
---
|
|
405
549
|
|
|
406
|
-
## PART
|
|
550
|
+
## PART 6: ANNOUNCEMENTS
|
|
407
551
|
|
|
408
552
|
When you activate a major behavior, announce it:
|
|
409
553
|
|
|
@@ -421,7 +565,7 @@ This keeps users informed without requiring them to request features.
|
|
|
421
565
|
|
|
422
566
|
---
|
|
423
567
|
|
|
424
|
-
## PART
|
|
568
|
+
## PART 7: SETUP
|
|
425
569
|
|
|
426
570
|
### First Time Setup
|
|
427
571
|
|
|
@@ -434,24 +578,6 @@ Say "setup omc" or run `/oh-my-claudecode:omc-setup` to configure. After that, e
|
|
|
434
578
|
|
|
435
579
|
---
|
|
436
580
|
|
|
437
|
-
##
|
|
438
|
-
|
|
439
|
-
**Just say what you want to build:**
|
|
440
|
-
- "I want a REST API for managing tasks"
|
|
441
|
-
- "Build me a React dashboard with charts"
|
|
442
|
-
- "Create a CLI tool that processes CSV files"
|
|
443
|
-
|
|
444
|
-
Autopilot activates automatically and handles the rest. No commands needed.
|
|
445
|
-
|
|
446
|
-
---
|
|
447
|
-
|
|
448
|
-
## Migration from 2.x
|
|
449
|
-
|
|
450
|
-
All old commands still work:
|
|
451
|
-
- `/oh-my-claudecode:ralph "task"` → Still works (or just say "don't stop until done")
|
|
452
|
-
- `/oh-my-claudecode:ultrawork "task"` → Still works (or just say "fast" or use `ulw`)
|
|
453
|
-
- `/oh-my-claudecode:planner "task"` → Still works (or just say "plan this")
|
|
454
|
-
|
|
455
|
-
The difference? You don't NEED them anymore. Everything auto-activates.
|
|
581
|
+
## Migration
|
|
456
582
|
|
|
457
|
-
|
|
583
|
+
For migration guides from earlier versions, see [MIGRATION.md](./MIGRATION.md).
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
# Delegation Enforcer
|
|
2
|
+
|
|
3
|
+
**Automatic model parameter injection for Task/Agent calls**
|
|
4
|
+
|
|
5
|
+
## Problem
|
|
6
|
+
|
|
7
|
+
Claude Code does NOT automatically apply model parameters from agent definitions. When you invoke the `Task` tool (or `Agent` tool), you must manually specify the `model` parameter every time, even though each agent has a default model defined in its configuration.
|
|
8
|
+
|
|
9
|
+
This leads to:
|
|
10
|
+
- Verbose delegation code
|
|
11
|
+
- Forgotten model parameters defaulting to parent model
|
|
12
|
+
- Inconsistent model usage across codebase
|
|
13
|
+
|
|
14
|
+
## Solution
|
|
15
|
+
|
|
16
|
+
The **Delegation Enforcer** is middleware that automatically injects the model parameter based on agent definitions when not explicitly specified.
|
|
17
|
+
|
|
18
|
+
## How It Works
|
|
19
|
+
|
|
20
|
+
### 1. Pre-Tool-Use Hook
|
|
21
|
+
|
|
22
|
+
The enforcer runs as a pre-tool-use hook that intercepts `Task` and `Agent` tool calls:
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
// Before enforcement
|
|
26
|
+
Task(
|
|
27
|
+
subagent_type="oh-my-claudecode:executor",
|
|
28
|
+
prompt="Implement feature X"
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
// After enforcement (automatic)
|
|
32
|
+
Task(
|
|
33
|
+
subagent_type="oh-my-claudecode:executor",
|
|
34
|
+
model="sonnet", // ← Automatically injected
|
|
35
|
+
prompt="Implement feature X"
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 2. Agent Definition Lookup
|
|
40
|
+
|
|
41
|
+
Each agent has a default model in its definition:
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
export const executorAgent: AgentConfig = {
|
|
45
|
+
name: 'executor',
|
|
46
|
+
description: '...',
|
|
47
|
+
prompt: '...',
|
|
48
|
+
tools: [...],
|
|
49
|
+
model: 'sonnet' // ← Default model
|
|
50
|
+
};
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The enforcer reads this definition and injects the model when not specified.
|
|
54
|
+
|
|
55
|
+
### 3. Explicit Models Preserved
|
|
56
|
+
|
|
57
|
+
If you explicitly specify a model, it's always preserved:
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
// Explicit model is never overridden
|
|
61
|
+
Task(
|
|
62
|
+
subagent_type="oh-my-claudecode:executor",
|
|
63
|
+
model="haiku", // ← Explicitly using haiku instead of default sonnet
|
|
64
|
+
prompt="Quick lookup"
|
|
65
|
+
)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## API
|
|
69
|
+
|
|
70
|
+
### Core Functions
|
|
71
|
+
|
|
72
|
+
#### `enforceModel(agentInput: AgentInput): EnforcementResult`
|
|
73
|
+
|
|
74
|
+
Enforces model parameter for a single agent delegation call.
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
import { enforceModel } from 'oh-my-claude-sisyphus';
|
|
78
|
+
|
|
79
|
+
const input = {
|
|
80
|
+
description: 'Implement feature',
|
|
81
|
+
prompt: 'Add validation',
|
|
82
|
+
subagent_type: 'executor'
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const result = enforceModel(input);
|
|
86
|
+
console.log(result.modifiedInput.model); // 'sonnet'
|
|
87
|
+
console.log(result.injected); // true
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### `getModelForAgent(agentType: string): ModelType`
|
|
91
|
+
|
|
92
|
+
Get the default model for an agent type.
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
import { getModelForAgent } from 'oh-my-claude-sisyphus';
|
|
96
|
+
|
|
97
|
+
getModelForAgent('executor'); // 'sonnet'
|
|
98
|
+
getModelForAgent('executor-low'); // 'haiku'
|
|
99
|
+
getModelForAgent('executor-high'); // 'opus'
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
#### `isAgentCall(toolName: string, toolInput: unknown): boolean`
|
|
103
|
+
|
|
104
|
+
Check if a tool invocation is an agent delegation call.
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
import { isAgentCall } from 'oh-my-claude-sisyphus';
|
|
108
|
+
|
|
109
|
+
isAgentCall('Task', { subagent_type: 'executor', ... }); // true
|
|
110
|
+
isAgentCall('Bash', { command: 'ls' }); // false
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Hook Integration
|
|
114
|
+
|
|
115
|
+
The enforcer automatically integrates with the pre-tool-use hook:
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
import { processHook } from 'oh-my-claude-sisyphus';
|
|
119
|
+
|
|
120
|
+
const hookInput = {
|
|
121
|
+
toolName: 'Task',
|
|
122
|
+
toolInput: {
|
|
123
|
+
description: 'Test',
|
|
124
|
+
prompt: 'Test',
|
|
125
|
+
subagent_type: 'executor'
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const result = await processHook('pre-tool-use', hookInput);
|
|
130
|
+
console.log(result.modifiedInput.model); // 'sonnet'
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Agent Model Mapping
|
|
134
|
+
|
|
135
|
+
| Agent Type | Default Model | Use Case |
|
|
136
|
+
|------------|---------------|----------|
|
|
137
|
+
| `architect` | opus | Complex analysis, debugging |
|
|
138
|
+
| `architect-medium` | sonnet | Standard analysis |
|
|
139
|
+
| `architect-low` | haiku | Quick questions |
|
|
140
|
+
| `executor` | sonnet | Standard implementation |
|
|
141
|
+
| `executor-high` | opus | Complex refactoring |
|
|
142
|
+
| `executor-low` | haiku | Simple changes |
|
|
143
|
+
| `explore` | haiku | Fast code search |
|
|
144
|
+
| `explore-medium` | sonnet | Thorough search |
|
|
145
|
+
| `designer` | sonnet | UI implementation |
|
|
146
|
+
| `designer-high` | opus | Complex UI architecture |
|
|
147
|
+
| `designer-low` | haiku | Simple styling |
|
|
148
|
+
| `researcher` | sonnet | Documentation lookup |
|
|
149
|
+
| `researcher-low` | haiku | Quick docs |
|
|
150
|
+
| `writer` | haiku | Documentation writing |
|
|
151
|
+
| `vision` | sonnet | Image analysis |
|
|
152
|
+
| `planner` | opus | Strategic planning |
|
|
153
|
+
| `critic` | opus | Plan review |
|
|
154
|
+
| `analyst` | opus | Pre-planning analysis |
|
|
155
|
+
| `qa-tester` | sonnet | CLI testing |
|
|
156
|
+
| `qa-tester-high` | opus | Comprehensive QA |
|
|
157
|
+
| `scientist` | sonnet | Data analysis |
|
|
158
|
+
| `scientist-low` | haiku | Quick inspection |
|
|
159
|
+
| `scientist-high` | opus | Complex research |
|
|
160
|
+
|
|
161
|
+
## Debug Mode
|
|
162
|
+
|
|
163
|
+
Enable debug logging to see when models are auto-injected:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
export OMC_DEBUG=true
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
When enabled, you'll see warnings like:
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
[OMC] Auto-injecting model: sonnet for executor
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Important:** Warnings are ONLY shown when `OMC_DEBUG=true`. Without this flag, enforcement happens silently.
|
|
176
|
+
|
|
177
|
+
## Usage Examples
|
|
178
|
+
|
|
179
|
+
### Before (Manual)
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
// Every delegation needs explicit model
|
|
183
|
+
Task(
|
|
184
|
+
subagent_type="oh-my-claudecode:executor",
|
|
185
|
+
model="sonnet",
|
|
186
|
+
prompt="Implement X"
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
Task(
|
|
190
|
+
subagent_type="oh-my-claudecode:executor-low",
|
|
191
|
+
model="haiku",
|
|
192
|
+
prompt="Quick lookup"
|
|
193
|
+
)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### After (Automatic)
|
|
197
|
+
|
|
198
|
+
```typescript
|
|
199
|
+
// Model automatically injected from definition
|
|
200
|
+
Task(
|
|
201
|
+
subagent_type="oh-my-claudecode:executor",
|
|
202
|
+
prompt="Implement X"
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
Task(
|
|
206
|
+
subagent_type="oh-my-claudecode:executor-low",
|
|
207
|
+
prompt="Quick lookup"
|
|
208
|
+
)
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Override When Needed
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
// Use haiku for a simple executor task
|
|
215
|
+
Task(
|
|
216
|
+
subagent_type="oh-my-claudecode:executor",
|
|
217
|
+
model="haiku", // Override default sonnet
|
|
218
|
+
prompt="Find definition of X"
|
|
219
|
+
)
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Implementation Details
|
|
223
|
+
|
|
224
|
+
### Hook Integration
|
|
225
|
+
|
|
226
|
+
The enforcer runs in the `pre-tool-use` hook:
|
|
227
|
+
|
|
228
|
+
1. Hook receives tool invocation
|
|
229
|
+
2. Checks if tool is `Task` or `Agent`
|
|
230
|
+
3. Checks if `model` parameter is missing
|
|
231
|
+
4. Looks up agent definition
|
|
232
|
+
5. Injects default model
|
|
233
|
+
6. Returns modified input
|
|
234
|
+
|
|
235
|
+
### Error Handling
|
|
236
|
+
|
|
237
|
+
- Unknown agent types throw errors
|
|
238
|
+
- Agents without default models throw errors
|
|
239
|
+
- Invalid input structures are passed through unchanged
|
|
240
|
+
- Non-agent tools are ignored
|
|
241
|
+
|
|
242
|
+
### Performance
|
|
243
|
+
|
|
244
|
+
- O(1) lookup: Direct hash map lookup for agent definitions
|
|
245
|
+
- No async operations: Synchronous enforcement
|
|
246
|
+
- Minimal overhead: Only applies to Task/Agent calls
|
|
247
|
+
|
|
248
|
+
## Testing
|
|
249
|
+
|
|
250
|
+
Run tests:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
npm test -- delegation-enforcer
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Run demo:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
npx tsx examples/delegation-enforcer-demo.ts
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## Benefits
|
|
263
|
+
|
|
264
|
+
1. **Cleaner Code**: No need to manually specify model every time
|
|
265
|
+
2. **Consistency**: Always uses correct model tier for each agent
|
|
266
|
+
3. **Safety**: Explicit models always preserved
|
|
267
|
+
4. **Transparency**: Debug mode shows when models are injected
|
|
268
|
+
5. **Zero Config**: Works automatically with existing agent definitions
|
|
269
|
+
|
|
270
|
+
## Migration
|
|
271
|
+
|
|
272
|
+
No migration needed! The enforcer is backward compatible:
|
|
273
|
+
|
|
274
|
+
- Existing code with explicit models continues working
|
|
275
|
+
- New code can omit model parameter
|
|
276
|
+
- No breaking changes
|
|
277
|
+
|
|
278
|
+
## Related
|
|
279
|
+
|
|
280
|
+
- [Model Routing](./MODEL-ROUTING.md) - Intelligent task complexity analysis
|
|
281
|
+
- [Agent Definitions](./AGENTS.md) - Complete agent reference
|
|
282
|
+
- [Delegation Categories](./DELEGATION-CATEGORIES.md) - Semantic task grouping
|
package/docs/FULL-README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
# oh-my-claudecode
|
|
12
12
|
|
|
13
|
-
[](https://github.com/Yeachan-Heo/oh-my-claudecode)
|
|
14
14
|
[](https://www.npmjs.com/package/oh-my-claudecode)
|
|
15
15
|
[](https://opensource.org/licenses/MIT)
|
|
16
16
|
[](https://nodejs.org/)
|
|
@@ -43,7 +43,7 @@ The plugin requires a `plugin.json` manifest:
|
|
|
43
43
|
```json
|
|
44
44
|
{
|
|
45
45
|
"name": "oh-my-claudecode",
|
|
46
|
-
"version": "3.0
|
|
46
|
+
"version": "3.4.0",
|
|
47
47
|
"description": "Multi-agent orchestration system for Claude Code",
|
|
48
48
|
"hooks": {
|
|
49
49
|
"PreToolUse": ["scripts/pre-tool-enforcer.mjs"],
|