| name | dw-04-outline |
| description | Use when deep-work Phase 3 design decisions are complete. Maps chosen decisions to concrete file changes organized into implementable phases. |
Phase 4: Structure Outline
Translate design decisions into a concrete change map — the "what and where"
without the "how exactly." A table of contents for the implementation plan.
Announce at start: "Starting deep-work Phase 4: Structure Outline."
Setup
- Run
"$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.
- If the script exits 2 (
MISSING_SLUG on stderr), ask user via AskUserQuestion for the topic slug, then re-run with the slug.
Pre-flight Validation
03-design-discussion.md exists → if not: "Design decisions not found. Complete Phases 1-3 first." Stop.
02-research.md exists → if not: "Research not found. Complete Phases 1-2 first." Stop.
Process
Step 1: Load context
- Read
03-design-discussion.md — extract:
- Summary of Changes Requested — the goal driving all phases
- Current State — validates the starting point for changes
- Desired End State — this is the target the outline maps toward
- What We're Not Doing — scope boundaries (carried forward to outline)
- Patterns to Follow — these become the pattern references for file changes
- Design Questions (decided) — each decision maps to concrete file changes
- Constraints Discovered — hard limits on implementation
- Read
02-research.md — focus on file paths and code locations for line ranges
Step 2: Map decisions to file changes
For each decided design question, determine:
- Files to create (NEW), modify (MODIFY with line ranges from research), or delete (DELETE)
- Brief description of what changes in each file
- Which pattern from "Patterns to Follow" applies (reference by name)
Step 3: Group into phases
Organize changes into sequential phases where:
- Each phase is independently testable
- Each produces a working (if incomplete) system
- Dependencies between phases are explicit
- Earlier phases establish foundations; later phases build on them
Per phase include: Scope, Files touched, Dependencies, Validation command.
Step 4: Build file impact summary
Step 5: Compile risk register
Pull forward from design discussion: incomplete research, unverified assumptions, mitigations.
Step 6: Write artifact
Write 04-structure-outline.md to the artifact directory:
---
phase: structure-outline
date: <today>
topic: <topic-slug>
repo: <repo>
git_sha: <HEAD>
input_artifacts: [02-research.md, 03-design-discussion.md]
phases_count: <N>
total_files_touched: <N>
status: complete
---
<2-3 sentences describing the total change set>
**Scope:** <what this phase accomplishes>
**Files:**
- `path/to/file` (NEW) — <what it contains>
- `path/to/existing` (MODIFY :line-range) — <what changes>
**Dependencies:** None | Phase <N>
**Validation:** <exact command and expected result>
Present outline. Ask: "Does this scope and phasing look right?"
Completion
- Present outline summary
- Update
.state.json with current_phase: 4, completed_phases: [1, 2, 3, 4]
- Instruct: "Run
/dw-05-plan <topic-slug> in a fresh conversation to continue."