delegation-principle
npx machina-cli add skill tzachbon/smart-ralph/delegation-principle --openclawDelegation Principle
The main agent is a coordinator, not an implementer. Delegate all work to subagents.
Coordinator Role
- Parse user input and determine intent
- Read state files for context
- Delegate work to subagents via Task tool
- Report results to user
Do Not
- Write code, create files, or modify source directly
- Run implementation commands (npm, git commit, file edits)
- Perform research, analysis, or design directly
- Execute task steps from tasks.md
- "Help out" by doing small parts directly
Do
- Use
Tasktool with appropriatesubagent_type - Pass complete context to subagent
- Wait for subagent completion before proceeding
- Let subagent handle all implementation details
Why This Matters
| Reason | Benefit |
|---|---|
| Fresh context | Subagents get clean context windows |
| Specialization | Each subagent has specific expertise |
| Auditability | Clear separation of responsibilities |
| Consistency | Same behavior regardless of mode |
Quick Mode
Quick mode still requires delegation — it uses the same agents as normal mode:
- Research -> Research Team (parallel teammates)
- Requirements ->
product-managersubagent - Design ->
architect-reviewersubagent - Task planning ->
task-plannersubagent - Task execution ->
spec-executorsubagent
Quick mode skips interactive phases (interviews, walkthroughs, approval pauses). Delegation requirement remains unchanged.
Karpathy Alignment
Surgical Changes reinforces the coordinator principle:
- Coordinator touches only state files and delegation. Never source code.
- Subagents touch only files listed in their task. Never adjacent code.
- Every changed line traces to the user's request — at both coordination and execution layers.
Source
git clone https://github.com/tzachbon/smart-ralph/blob/main/plugins/ralph-specum/skills/delegation-principle/SKILL.mdView on GitHub Overview
Delegation Principle enforces that the primary agent acts as a coordinator rather than an implementer. It delegates all work to subagents using the Task tool, passing full context and awaiting results. This pattern improves context freshness, specialization, auditability, and consistent behavior across Ralph workflows.
How This Skill Works
The coordinator parses user intent and reads relevant state files to build context. It delegates the actual work to subagents via the Task tool, specifying the appropriate subagent_type and passing complete context. After subagents complete, the coordinator aggregates results and reports back to the user, keeping implementation details out of scope.
When to Use It
- When the user asks about the coordinator role or delegation strategy in Ralph workflows.
- When you need to delegate work to a subagent using the Task tool.
- When you must avoid implementing directly (no code or file changes).
- When you want clean context windows and improved auditability via subagents.
- When aligning actions with Ralph/Karpathy patterns and delegation workflows.
Quick Start
- Step 1: Interpret user intent and load context from state files.
- Step 2: Use Task tool to hand off work to the appropriate subagent_type with full context.
- Step 3: Wait for subagent completion and present the results to the user.
Best Practices
- Use Task tool with the correct subagent_type.
- Pass complete, user-focused context to the subagent.
- Wait for subagent completion before proceeding.
- Keep all implementation details to subagents; the coordinator should not touch code.
- Document decisions and maintain clear state-file updates for auditability.
Example Use Cases
- Coordinating a feature request by delegating planning to the task-planner subagent and reporting results via the spec-executor.
- Design tasks delegated to architect-reviewer subagent for rapid prototyping.
- Research tasks delegated to the Research Team subagent in Quick Mode.
- Requirements gathered and refined by the product-manager subagent.
- End-to-end task execution delegated to spec-executor with full user context.