一键导入
codex-delegation
How to delegate implementation tasks to workers via Codex MCP or Task sub-agents. Use when executing tasks that require code implementation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
How to delegate implementation tasks to workers via Codex MCP or Task sub-agents. Use when executing tasks that require code implementation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Output rules for all agents - concise, scannable, actionable. Based on Matt Pocock's planning principles.
Core principle that the main agent is a coordinator, not an implementer. All work must be delegated to subagents.
Detect fix vs add goals, diagnose failures before work, verify fixes after. Ensures "fix X" specs actually fix X.
Spec-driven development workflow for building features with research, requirements, design, and task phases
Criteria for reviewing Codex worker outputs across 5 dimensions. Use when reviewing code submitted by workers before approval.
4-layer verification system for task completion. Use when verifying that a task has been fully completed before marking it done.
| name | codex-delegation |
| description | How to delegate implementation tasks to workers via Codex MCP or Task sub-agents. Use when executing tasks that require code implementation. |
This skill defines how the CEO (Claude) delegates tasks to workers. Workers can be either Codex MCP (GPT) or Claude Task sub-agents.
The executor is determined by priority:
--executor argument (explicit override)./specs/.ralph-executor.json (saved config from /ceo-ralph:setup)mcp__codex__codex tool existsauto (try Codex, fall back to Task)mcp__codex__codexTask with subagent_type: "general-purpose"Delegate to workers when:
Do NOT delegate when:
{
"taskId": "1.1",
"task": {
"title": "Task title",
"do": "What to do",
"doneWhen": "Completion criteria",
"acceptance": ["Criterion 1", "Criterion 2"]
}
}
{
"taskId": "1.1",
"task": {
"title": "Implement user login form",
"do": "Create login form component at src/components/Login.tsx",
"doneWhen": "Form renders with email/password fields and validation",
"acceptance": [
"Form has email input with validation",
"Form has password input with masking",
"Submit button triggers onSubmit handler",
"Shows validation errors"
]
},
"files": {
"src/components/Form.tsx": {
"path": "src/components/Form.tsx",
"content": "// Existing form component for reference...",
"language": "typescript",
"relevantSections": [
{ "startLine": 10, "endLine": 50, "description": "Form pattern" }
]
}
},
"design": {
"architecture": "React functional component with hooks",
"patterns": ["controlled inputs", "form validation", "error display"]
},
"constraints": [
"Follow existing Form component pattern",
"Use project's validation library (zod)",
"Match existing styling approach"
],
"workingDirectory": "/path/to/project",
"commitPrefix": "feat(auth)"
}
If context is too large:
I am preparing to delegate Task {id} to a worker.
**Task**: {title}
**Executor**: {codex|task-agent}
**Files to include**: {list}
**Constraints**: {list}
Codex MCP:
mcp__codex__codex({
prompt: "<spec-executor instructions>\n\nTask: <task block>\n\nContext: <files>",
sandbox: "workspace-write"
})
Task sub-agent:
Task({
subagent_type: "general-purpose",
model: "sonnet",
prompt: "<spec-executor instructions>\n\nTask: <task block>\n\nContext: <files>\n\nIMPORTANT: Output TASK_COMPLETE when done."
})
[<executor>] Task {id} delegated.
Status: {pending|running|completed|failed}
Received result from worker.
Signal: {TASK_COMPLETE|TASK_BLOCKED|NO_SIGNAL}
Files modified: {count}
When retrying:
{
"previousAttempts": [
{
"attempt": 1,
"executor": "codex",
"feedback": "Missing validation on email field",
"issues": [
"Email input lacks validation",
"Error messages not displayed"
]
}
]
}
Good feedback:
Bad feedback:
Every worker dispatch is logged to ./specs/$spec/.ralph-delegation.json. See schemas/delegation.schema.json for the full schema.
Each worker entry tracks:
Aggregate stats are updated after each worker completes.