home / skills / shotaiuchi / dotclaude / wf3-plan

wf3-plan skill

/dotclaude/skills/wf3-plan

This skill helps create or update the Implementation Plan document, guiding step division, dependency order, and state updates for wf3-plan.

npx playbooks add skill shotaiuchi/dotclaude --skill wf3-plan

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.9 KB
---
name: wf3-plan
description: 実装計画(Plan)ドキュメントを作成
argument-hint: "[update | step <n>]"
context: fork
agent: Plan
---

**Always respond in Japanese.**

# /wf3-plan

Create or update the Implementation Plan document.

## Usage

```
/wf3-plan [subcommand]
```

## Subcommands

- `(none)`: Create new Plan
- `update`: Update existing Plan
- `step <n>`: Display details of a specific step

## Processing

### 1. Check Prerequisites

Get active work. Require `02_SPEC.md` exists.

### 2. Load and Analyze Spec

Extract: Affected Components, Detailed Changes, Test Strategy.

### 3. Codebase Investigation

1. Identify target files (modify, create, test)
2. Analyze dependencies between files, determine change order
3. Assess risks (complex changes, side effects)

### 4. Step Division Principles

- **1 Step = 1 `/wf5-implement` execution** (committable unit)
- Size: ~50-200 lines changed, 1-5 files, single logical change
- Foundational changes first; tests with or immediately after implementation
- Split complex changes for easy rollback

### 5. Create Plan

Load template `~/.claude/templates/03_PLAN.md`. Divide into ~5-10 steps. Fill Progress table rows for each step.

### 6. User Confirmation

Confirm: step count validity, dependency order, parallel execution opportunities, risk assessment.

### 7. Update state.json

Set `current: "wf3-plan"`, `next: "wf4-review"`. Add `plan: { total_steps: <n>, current_step: 0, steps: {} }`.

### 8. Commit

`docs(wf): create plan <work-id>` (or `update plan`). Include step count and work-id.

### 9. Completion Message

Show file path, step list with sizes, total count, next step (`/wf4-review` or `/wf5-implement`).

## step Subcommand

Display specific step details: Title, Purpose, Target Files, Tasks, Completion Criteria, Estimate, Dependencies.

## Notes

- Do not exceed Spec scope
- Strictly respect dependency order
- Each step should be independently testable

Overview

This skill creates or updates an implementation Plan document that divides a spec into discrete, testable development steps. It validates prerequisites, analyzes the spec and codebase, and generates a step-by-step execution plan with risk assessments and dependencies. The output is a committed plan file and updated workflow state ready for review or implementation.

How this skill works

The skill checks prerequisites (active work and presence of 02_SPEC.md), loads the spec, and extracts affected components, detailed changes, and a test strategy. It inspects the codebase to identify target files, dependency order, and risks, then divides the work into 5–10 committable steps (each mapped to one /wf5-implement run). It fills the PLAN template, updates state.json with plan metadata, commits the plan, and presents a completion summary.

When to use it

  • Starting implementation after a specification (02_SPEC.md) is finalized
  • Splitting a large change into independent, testable units
  • Preparing handoff for parallel work or code review
  • When you need an explicit dependency and risk breakdown before coding
  • Before running /wf5-implement to ensure safe, ordered execution

Best practices

  • Keep each step small and committable: ~50–200 lines, 1–5 files, single logical change
  • Place foundation and interface changes before dependent work
  • Include tests with the implementation or immediately after in the same step
  • Respect strict dependency order; do not introduce out-of-scope changes
  • Document completion criteria and estimated effort for every step

Example use cases

  • Create a plan for adding a new feature that touches backend, API, and tests
  • Break a refactor into safe, reversible steps with clear rollback points
  • Prepare parallelizable tasks for multiple contributors while listing dependencies
  • Update an existing plan when the spec or codebase changes
  • Generate a step detail view (step <n>) to communicate tasks to an implementer

FAQ

What prerequisites are required to run this skill?

Active work must be selected and 02_SPEC.md must exist in the repository.

How large should each step be?

Aim for ~50–200 lines changed, 1–5 files, and a single logical change that can be committed and tested independently.