home / skills / shotaiuchi / dotclaude / wf5-implement
This skill implements a single step from the Plan for wf5-implement, executing defined tasks in the repository and validating outcomes.
npx playbooks add skill shotaiuchi/dotclaude --skill wf5-implementReview the files below or copy the command above to add this skill to your agents.
---
name: wf5-implement
description: Planの1ステップを実装
argument-hint: "[step_number]"
context: fork
agent: general-purpose
---
**Always respond in Japanese.**
# /wf5-implement
Implement one step of the Plan document.
## Usage
```
/wf5-implement [step_number]
```
## Arguments
- `step_number`: Step to implement (optional). Auto-selects next incomplete step if omitted.
## Constraints
- **No Off-Plan Changes**: Only implement what is documented in the Plan.
- **One Execution = One Step**: Only one step per execution.
## Processing
### 1. Check Prerequisites
Get active work. Require `03_PLAN.md` exists.
### 2. Determine Target Step
If no argument: `current_step + 1` from state.json. Check dependent steps are completed.
### 3. Extract Step Info from Plan
Title, Purpose, Target Files, Tasks, Completion Criteria, Dependencies.
### 4. Implementation
1. Load and analyze target files
2. Make code changes following Plan tasks — **no off-plan changes**
3. Run related tests; fix failures if directly related to this step's changes
### 5. Record Implementation Log
Append to `05_IMPLEMENT_LOG.md` using template `~/.claude/templates/05_IMPLEMENT_LOG.md`.
### 6. Update state.json
Set step status to `"completed"` with timestamp. Update `current_step`. Set `current: "wf5-implement"`. If all steps done, set `next: "wf6-verify"`.
### 7. Verify Completion Criteria
Check each criterion is satisfied.
### 8. Commit
Auto-detect commit type from step content:
- `bug`/`fix`/`repair` → `fix`
- `refactor` → `refactor`
- `test` → `test`
- `doc`/`documentation` → `docs`
- otherwise → `feat`
Override with `commit.type_detection`/`commit.default_type` from config.json.
Message: `<type>(<scope>): <description>` with step info and work-id in body.
### 9. Completion Message
Show changed files with diff stats, completion criteria results, progress (n/total), next step suggestion.
## Off-Plan Changes
- **Minor** (typos, imports): Record in Notes section, continue
- **Significant** (design changes): Interrupt, suggest `/wf3-plan update`
This skill implements a single step from a Plan document. It automates loading the Plan, locating the target step, applying only the planned changes to project files, running related tests, recording an implementation log, updating state, and committing the result.
The skill checks for active work and the presence of the Plan file, determines the target step (argument or next incomplete step), extracts the step metadata (title, tasks, targets, dependencies, completion criteria), and applies the changes to the specified files without making off-plan edits. It runs tests affected by the change, writes an implementation entry to the implementation log template, updates state.json to mark the step completed, and creates a validated commit with an auto-detected type.
What if I omit the step number?
The skill auto-selects the next incomplete step based on state.json and validates dependencies before proceeding.
Are off-plan changes allowed?
Only trivial fixes (typos, imports) are allowed and must be noted; any significant design change must stop and prompt a Plan update.
How is the commit type chosen?
The step content drives type detection (fix/refactor/test/docs/feat) and can be overridden by commit settings in config.json.