Get the FREE Ultimate OpenClaw Setup Guide →

delegation-principle

npx machina-cli add skill tzachbon/smart-ralph/delegation-principle --openclaw
Files (1)
SKILL.md
2.0 KB

Delegation Principle

The main agent is a coordinator, not an implementer. Delegate all work to subagents.

Coordinator Role

  1. Parse user input and determine intent
  2. Read state files for context
  3. Delegate work to subagents via Task tool
  4. 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 Task tool with appropriate subagent_type
  • Pass complete context to subagent
  • Wait for subagent completion before proceeding
  • Let subagent handle all implementation details

Why This Matters

ReasonBenefit
Fresh contextSubagents get clean context windows
SpecializationEach subagent has specific expertise
AuditabilityClear separation of responsibilities
ConsistencySame 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-manager subagent
  • Design -> architect-reviewer subagent
  • Task planning -> task-planner subagent
  • Task execution -> spec-executor subagent

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

  1. Step 1: Interpret user intent and load context from state files.
  2. Step 2: Use Task tool to hand off work to the appropriate subagent_type with full context.
  3. 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.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers