From dw
Use when deep-work Phase 4 structure outline is complete. Expands the outline into a detailed implementation plan with exact file paths, code patterns, tests, and validation commands.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dw:dw-05-planThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Expand the structure outline into a fully detailed implementation plan. Every
Expand the structure outline into a fully detailed implementation plan. Every task has exact file paths, function signatures, code patterns, test cases, and validation commands. The implementing agent executes mechanically — no architectural decisions remain.
Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste. Document everything they need to know: which files to touch for each task, code, testing, docs they might need to check, how to test it. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
Announce at start: "Starting deep-work Phase 5: Plan."
"$SKILL_BASE_DIR/setup.sh" "$ARGUMENTS" and parse stdout for REPO, TOPIC_SLUG, ARTIFACT_DIR. $SKILL_BASE_DIR is the "Base directory for this skill" path shown at the top of this prompt.
MISSING_SLUG on stderr), ask user via AskUserQuestion for the topic slug, then re-run with the slug.00-ticket.md exists → if not: "Ticket not found. Complete Phases 1-4 first." Stop.02-research.md exists → if not: "Research not found. Complete Phases 1-4 first." Stop.03-design-discussion.md exists → if not: "Design decisions not found. Complete Phases 1-4 first." Stop.04-structure-outline.md exists → if not: "Outline not found. Complete Phases 1-4 first." Stop.00-ticket.md — initial prompt and context on the changes we're making03-design-discussion.md — the primary source for:
02-research.md — file:line references and detailed code context
(supplement patterns from design artifact, don't override them)04-structure-outline.md — phase structure and file mapFor each phase in the outline, create tasks covering ONE file change (or tightly coupled pair).
Every task MUST include:
pkg/handlers/user.go:30-55 pattern from Q2")Task granularity: 2-5 minutes each. Pattern: write failing test → run (expect fail) → implement → run (expect pass) → commit.
Ideallly each task in a phase of the plan should be independent enough to execute in its own context window. Try to create discrete small tasks that can be chained together.
You MUST follow the outline
### Task N: [Component Name]
**Files:**
- Create: `exact/path/to/file.py`
- Modify: `exact/path/to/existing.py:123-145`
- Test: `tests/exact/path/to/test.py`
**Step 1: Write the failing test**
```python
def test_specific_behavior():
result = function(input)
assert result == expected
```
**Step 2: Run test to verify it fails**
Run: `pytest tests/path/test.py::test_name -v`
Expected: FAIL with "function not defined"
**Step 3: Write minimal implementation**
```python
def function(input):
return expected
```
**Step 4: Run test to verify it passes**
Run: `pytest tests/path/test.py::test_name -v`
Expected: PASS
**Step 5: Commit**
```bash
git add tests/path/test.py src/path/file.py
git commit -m "feat: add specific feature"
```
Per phase: automated criteria (commands that must pass) + manual criteria.
Per phase: "This phase does NOT include [X]" and "Do NOT modify [file] in this phase."
Include specific task or checkpoint for each risk from the outline's register.
Write 05-plan.md to the artifact directory. Include plan header:
# <Topic> Implementation Plan
**Goal:** <from outline>
**Architecture:** <key decisions>
**Tech Stack:** <relevant tech>
Followed by an Execution Progress section (before the phase details), then full phase/task detail in standard plan format.
Insert an ## Execution Progress section between the plan header and Phase 1. This
enables independent phase execution — an implementing agent in a fresh conversation
reads this section first to know exactly where to resume. Include three subsections:
### Phase Progress
| # | Phase | Status | Validation Command | Result |
|---|-------|--------|--------------------|--------|
| 1 | <phase name> | `[ ] NOT STARTED` | `<exact validation command from phase>` | — |
| ... | ... | ... | ... | ... |
**Status legend:** `[ ] NOT STARTED` | `[~] IN PROGRESS` | `[x] DONE` | `[!] BLOCKED`
```
One row per phase. The validation command is the same command from the phase's success
criteria. The `Result` column is updated with PASS/FAIL + timestamp when validation runs.
#### 7b: Task Completion table
````markdown
### Task Completion
| Task | Description | Status | Committed | Deviations |
|------|-------------|--------|-----------|------------|
| **Phase 1** | | | | |
| 1.1 | <short description> | `[ ]` | — | |
| ... | ... | ... | ... | ... |
**Task status legend:** `[ ]` pending | `[~]` in progress | `[x]` done | `[!]` blocked | `[-]` skipped
One row per task, grouped under phase header rows. Description is a terse summary
(e.g., "ApiDateCriteriaView record"). Committed column gets the short SHA when
committed. Deviations column notes any changes from the plan.
### Deviation Log
> Record any deviations from the plan here. Include: task ID, what changed, why, and
> impact on downstream tasks. This is critical for maintaining plan integrity across
> sessions.
_No deviations recorded._
This is a free-form section. The implementing agent appends entries here when a task
requires changes from the plan. Format: **Task X.Y:** <what changed> — <why> — <downstream impact>.
End the artifact with the YAML frontmatter block:
---
phase: plan
date: <today>
topic: <topic-slug>
repo: <repo>
git_sha: <HEAD>
input_artifacts: [00-ticket.md, 02-research.md, 03-design-discussion.md, 04-structure-outline.md]
total_phases: <N>
total_tasks: <N>
status: complete
---
After writing the plan artifact, dispatch an Opus subagent to perform an adversarial
review. This replaces the former standalone /dw-05b-plan-review skill.
plan-review-prompt.md from this skill's directory (same directory as this SKILL.md)model: "opus"description: "Adversarial plan review"prompt: the contents of plan-review-prompt.md, prepended with:
ARTIFACT_DIR=<the artifact directory from setup>
TOPIC_SLUG=<topic slug>
REPO=<repo>
05b-plan-review.md it wrote to the artifact directory.state.json with current_phase: 5, completed_phases: [1, 2, 3, 4, 5, "plan_review"]/dw-06-implement <topic-slug> in a fresh conversation."05-plan.md, then proceed to implementation."05-plan.md before proceeding. Re-run /dw-05-plan <topic-slug> after revisions."Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub ronsanzone/context-engineering-workflows --plugin dw