Implements a feature by executing a plan phase-by-phase — writes tests first, runs them red, then implements code to make them green, then validates nothing is broken. Use when you have a plan from /draft and are ready to implement, build, develop, create, or write code for a feature using TDD.
71
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
RPI Phase 3 of 3: Research → Plan → Implement
Use this skill to execute an implementation plan using beads-driven orchestration with isolated agents for strict test-first discipline.
Executes a beads task graph created by /draft. Each beads issue is a self-contained agent task with everything needed for dispatch. The dependency graph enforces ordering; beads:ready drives execution.
Input: Beads epic with per-agent-step issues (created by /draft)
Output: Working feature with passing tests
Use this skill when:
/draftDon't use for:
Find the target epic via user input or beads:search. Verify the epic has issues with dependencies wired.
If resuming a previous session, this step is the same — beads:ready will return only unblocked, uncompleted tasks.
This is the core execution loop. It runs until all issues in the epic are closed or an unrecoverable error occurs.
Loop:
a. Run beads:ready for the epic → list of unblocked tasks
b. If no ready tasks and open tasks remain → something is blocked, escalate to user
c. If no ready tasks and no open tasks remain → all done, proceed to final verification
d. For each ready task:
- Read issue description (contains full Agent Context)
- Determine agent type from label (agent-test, agent-impl, agent-validate, no-test)
- Dispatch Task with agent prompt built from issue description
- If multiple ready tasks: dispatch in parallel (single message, multiple Task calls)
e. Wait for agent(s) to complete
f. For each completed agent:
- If gate PASSED → close the issue via beads:close → unblocks dependents
- If RED gate FAILED (tests pass immediately) → STOP, report to user
- If GREEN gate FAILED → proceed to validation anyway
- If VALIDATE found failures → create remediation issues (see Remediation)
g. Loop back to (a)See workflow-detail.md for agent prompt templates and dispatch details.
For each ready issue, build the agent prompt from the issue description:
beads:showTask tool (synchronous, subagent_type: general-purpose)When beads:ready returns multiple tasks, dispatch them all in a single message with multiple Task tool calls. This happens naturally when:
TDD phases can't parallelize internally (Implement needs Write Test's output on disk), but independent phases parallelize across each other automatically via the dependency graph.
When Agent 3 (Validate) finds failures:
beads:create with label agent-remediate:
P{N}: Remediate — {Phase Name} (attempt {M})beads:create with label agent-validate:
P{N}: Re-Validate — {Phase Name} (attempt {M})blocked status and STOP — ask the userAfter each issue closes, report status. Use beads:list to show overall progress:
**Progress Update:**
- [closed] P1: Apply Schema
- [closed] P2: Write Tests — Core Logic
- [closed] P2: Implement — Core Logic
- [open] P2: Validate — Core Logic (in progress)
- [open] P3: Repository Layer (blocked)
- [open] P4: Write Tests — Apply Discount (blocked)After all issues in the epic are closed:
CRITICAL: The three-agent pattern maintains honest separation between tests and implementation.
RED Gate failed (Agent 1's tests pass immediately before implementation):
GREEN Gate failed (Agent 2 cannot make tests pass):
Recovery is trivial: run beads:ready for the epic.
No special recovery logic needed. The beads state is the execution state.
Once all issues closed and verified:
/commit skill2a98cc1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.