subagent-driven-development-codex
Execute an implementation plan by dispatching Codex-backed implementer and reviewer agents while Claude keeps spec-compliance control. Codex-backed variant.
- License 许可
- MIT
- 最近更新
- 2026-05-01
- Stars
- ★ 7
- Forks
- 2
01 前言 Front Matter
- name
- subagent-driven-development-codex
- description
- Execute an implementation plan by dispatching Codex-backed implementer and reviewer agents while Claude keeps spec-compliance control. Codex-backed variant.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档prompts/fix-task.md158 B
- 参考文档prompts/implement-task.md3.2 KB
- 参考文档spec-review-template.md1.2 KB
03 SKILL.md 正文
<!-- Upstream source: obra/superpowers skills/subagent-driven-development/SKILL.md Last synced: 2026-04-03 Divergence: Codex-backed implementer/reviewer agents replace Claude subagents; adapter-managed resume flow -->
Subagent-Driven Development
Execute plan by calling codex_implement per task via the MCP tool, with two-stage review after each: Claude-side spec compliance first, then codex_review for code quality.
Core principle: Codex implementer per task + two-stage review (spec then quality) = high quality, fast iteration
<HARD-GATE> You MUST dispatch codex_implement for every plan task (Step 3). You cannot implement code yourself, even for simple tasks. Spec review requires seeing EXTERNAL implementation. No dispatch = no task completion. </HARD-GATE>
Checklist
You MUST create a task for each plan task and complete them in order.
Setup:
- Read plan — read the plan file once, extract all tasks with full text and context
- Create TodoWrite — one entry per plan task
Per task:
- Capture task base — before dispatching the implementer, record the current revision:
TASK_BASE_SHA="$(git rev-parse HEAD)"
Substitute the captured TASK_BASE_SHA value as the structured review base for this task, so the reviewer inspects only the task's delta rather than all prior tasks.
- Dispatch implementer — call the
codex_implementMCP tool. Pass the task description as theprompt:
{
"tool": "codex_implement",
"arguments": {
"taskId": "task-17",
"prompt": "Implement Task 3 from docs/superpowers/plans/2026-04-03-agent-forwarding.md. Keep the work scoped to agents/codex-implementer.md and tests/prompt-contracts/execution-workflows.test.mjs.",
"workspaceRoot": "/absolute/path/to/your/repo"
}
}
- Handle status — see Status Handling below
- Spec compliance review — Claude reads the actual code and verifies against spec using
spec-review-template.md; if issues remain, resume the same implementer thread withcodex_resume:
{
"tool": "codex_resume",
"arguments": {
"taskId": "task-17",
"sessionId": "019d4f82-58b8-72d3-9212-2e3d3fc69bcb",
"prompt": "Fix these issues:\n- The agent still lacks tools: Bash.\n- The prompt-file override is ignored in the TDD path.",
"workspaceRoot": "/absolute/path/to/your/repo"
}
}
- Code quality review — call
codex_reviewonly after spec compliance passes:
{
"tool": "codex_review",
"arguments": {
"taskId": "task-17-review",
"reviewStyle": "structured",
"scope": { "kind": "base", "base": "<captured TASK_BASE_SHA value>" },
"prompt": "Review the implementation of Task 4 from docs/superpowers/plans/2026-04-03-agent-forwarding.md. Focus on regressions, incorrect routing, and missing test coverage.",
"workspaceRoot": "/absolute/path/to/your/repo"
}
}
- Mark complete — only after both gates pass
After all tasks:
- Final review — call
codex_reviewfor the entire implementation with a new task ID and the final base SHA. - Finish branch — wrap up the development branch
Status Handling
Handle the implementer's reported status:
| Status | Action |
|---|---|
| DONE | Proceed to spec compliance review |
| DONE_WITH_CONCERNS | Read concerns; if correctness/scope — address before review; if observations — note and proceed |
| NEEDS_CONTEXT | Provide the missing context and re-dispatch |
| BLOCKED | Assess: context problem → re-dispatch with more context; too hard → escalate approach; too large → break down; plan wrong → escalate to human |
Never ignore an escalation or force the same agent to retry without changes.
Red Flags
Never:
- Skip reviews (spec compliance OR code quality)
- Proceed with unfixed issues
- Dispatch multiple implementer agents in parallel (conflicts)
- Make the Codex agent read the plan file (provide full text instead)
- Start code quality review before spec compliance passes (wrong order)
- Move to next task while either review has open issues
If reviewer finds issues: resume the implementer thread to fix, reviewer reviews again, repeat until approved.
Integration
- superpowers-cc-to-codex:writing-plans-codex — creates the plan this skill executes
- superpowers-cc-to-codex:requesting-code-review-codex — code review via the
codex_reviewMCP tool
04 同仓库更多 Skills
writing-plans
Upstream fixture
subagent-driven-development
Upstream fixture
requesting-code-review
Upstream fixture
brainstorming
Upstream fixture
writing-plans-codex
Use when you have a spec or requirements for a multi-step task, before touching code. Codex-backed variant.
verification-before-completion-codex
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always