From workflows
This skill should be used when the user asks to 'design the approach', 'propose architecture', or 'choose between approaches'.
npx claudepluginhub edwinhu/workflows --plugin workflowsThis skill uses the workspace's default tool permissions.
**Announce:** "Using dev-design (Phase 4) to propose implementation approaches and obtain user approval."
Implements Playwright E2E testing patterns: Page Object Model, test organization, configuration, reporters, artifacts, and CI/CD integration for stable suites.
Guides Next.js 16+ Turbopack for faster dev via incremental bundling, FS caching, and HMR; covers webpack comparison, bundle analysis, and production builds.
Discovers and evaluates Laravel packages via LaraPlugins.io MCP. Searches by keyword/feature, filters by health score, Laravel/PHP compatibility; fetches details, metrics, and version history.
Announce: "Using dev-design (Phase 4) to propose implementation approaches and obtain user approval."
Propose implementation approaches, explain trade-offs, get user approval. Prerequisites: SPEC.md finalized, exploration complete, clarifications resolved.
dev-design REQUIRES dev-clarify to be complete. This is not optional.
Before writing PLAN.md, verify these clarify gates passed:
If ANY gate is unchecked → DO NOT START DESIGN. Return to dev-clarify.
## The Iron Law of DesignYOU MUST GET USER APPROVAL BEFORE IMPLEMENTATION. This is not negotiable.
After presenting approaches:
Implementation CANNOT start without user saying "Yes" or choosing an approach.
STOP - you're about to implement without user approval.
Proposing an architecture without reading the codebase is NOT HELPFUL — the user trusts your proposal reflects reality, and you're wasting their approval on fiction.
Design without exploration is not "efficiency" — it is fabricating an approach from imagination. The user trusts your proposal reflects the actual codebase. If it doesn't, you wasted their approval on fiction.
| DO | DON'T |
|---|---|
| Propose 2-3 approaches | Implement anything |
| Explain trade-offs clearly | Make the choice for user |
| Lead with recommendation | Present without opinion |
| Get explicit approval | Assume approval |
| Write PLAN.md | Skip the user gate |
Design answers: HOW to build it and WHY this approach Implement executes: the approved approach (next phase, after gate)
Before designing, ensure the following exist:
.planning/SPEC.md - final requirementsEach approach should address the same requirements differently:
Approach A: Minimal Changes
Approach B: Clean Architecture
Approach C: Pragmatic Balance
Use the AskUserQuestion tool to present approaches:
# AskUserQuestion: Present 2-3 architecture approaches with trade-offs for user selection
AskUserQuestion(questions=[{
"question": "Which architecture approach should we use?",
"header": "Architecture",
"options": [
{
"label": "Pragmatic Balance (Recommended)",
"description": "Extend existing AuthService with new method. ~150 lines changed. Balances reuse with clean separation."
},
{
"label": "Minimal Changes",
"description": "Add logic to existing endpoint. ~50 lines changed. Fast but increases coupling."
},
{
"label": "Clean Architecture",
"description": "New service with full abstraction. ~300 lines. Most maintainable but longest to build."
}
],
"multiSelect": false
}])
Key principles:
CRITICAL: Before writing PLAN.md, check if this is actually multiple features.
Review the scope and ask:
# AskUserQuestion: Determine if feature should be split into independent tasks
AskUserQuestion(questions=[{
"question": "Is this one cohesive feature or multiple independent features?",
"header": "Scope",
"options": [
{
"label": "One feature",
"description": "Implement everything together in one branch/worktree"
},
{
"label": "Multiple features",
"description": "Break into separate features, each with own branch/worktree/PR"
}
],
"multiSelect": false
}])
If "Multiple features":
List the independent features identified from SPEC.md:
Based on the requirements, this breaks into:
1. Theme infrastructure (color system, theme provider)
2. Settings UI (theme selector component)
3. Component updates (update 20+ components to use theme)
4. Persistence layer (save user preference)
Each can be implemented and PR'd independently.
Ask which to tackle first:
# AskUserQuestion: Prioritize which feature to implement first
AskUserQuestion(questions=[{
"question": "Which feature should we implement first?",
"header": "Priority",
"options": [
{"label": "Theme infrastructure (Recommended)", "description": "Foundation that others depend on"},
{"label": "Settings UI", "description": "UI for theme selection"},
{"label": "Component updates", "description": "Apply themes to components"},
{"label": "Persistence layer", "description": "Save user preference"}
],
"multiSelect": false
}])
Write PLAN.md for ONLY the chosen feature
Document remaining features in .planning/BACKLOG.md:
# Feature Backlog
## Dark Mode Implementation
### Completed
- [ ] None yet
### Next Up
- [ ] Theme infrastructure
- [ ] Settings UI
- [ ] Component updates
- [ ] Persistence layer
**Current Focus:** Theme infrastructure
If "One feature":
Proceed to write PLAN.md for the entire scope (step 5 below).
Why this matters:
Before writing PLAN.md, scan ALL sections of SPEC.md for behavioral statements that lack CATEGORY-NN IDs.
Check these sections specifically:
Any prose that describes an implementable feature, user-facing behavior, protocol handling, or UI element MUST have a corresponding CATEGORY-NN ID in the Requirements table.
If any implementable feature lacks an ID → STOP. Add it to the Requirements table before writing PLAN.md.
Un-ID'd requirements in prose are invisible to PLAN.md task mapping, VALIDATION.md coverage, and dev-verify tracing. They will be silently dropped from the entire implementation.
After user chooses approach AND confirms scope, write .planning/PLAN.md:
Use the template from references/plan-template.md for the PLAN.md structure. Load it before writing the plan:
Read ${CLAUDE_SKILL_DIR}/../../skills/dev-design/references/plan-template.md and follow its instructions.
Checkpoint type: decision (user chooses architecture — cannot auto-advance)
After writing PLAN.md, get explicit approval:
AskUserQuestion(questions=[{
"question": "Ready to start implementation?",
"header": "Approval",
"options": [
{"label": "Yes, proceed", "description": "Start implementation with TDD"},
{"label": "No, discuss changes", "description": "Modify the plan first"}
],
"multiSelect": false
}])
If "No": Wait for user feedback, modify plan, ask again.
If "Yes": Proceed to workspace setup question in Step 7 below.
Checkpoint type: decision (user chooses workspace setup — cannot auto-advance)
After user approves implementation, ask about worktree isolation:
AskUserQuestion(questions=[{
"question": "Create isolated worktree for this feature?",
"header": "Workspace",
"options": [
{"label": "Yes (Recommended)", "description": "Work in isolated .worktrees/ directory - keeps main workspace clean"},
{"label": "No", "description": "Work in current directory"}
],
"multiSelect": false
}])
If "Yes (Recommended)":
Invoke the dev-worktree skill:
# dev-worktree: Create isolated git worktree for feature development
Skill(skill="workflows:dev-worktree")
Then after worktree is created, invoke dev-implement.
If "No":
Directly invoke dev-implement in current directory without worktree isolation.
| Category | When to Use | Trade-off |
|---|---|---|
| Minimal | Bug fixes, small features | Speed vs cleanliness |
| Clean | New systems, core features | Quality vs time |
| Pragmatic | Most features | Balance |
Required sections:
implements column mapping tasks to requirement IDs from SPEC.mdComplete all steps before starting implementation:
1. REVIEW → Read SPEC.md and exploration findings
2. VERIFY TESTING → Check SPEC.md has automated testing strategy
└─ If missing → STOP. Go back to clarify phase.
3. PROPOSE → Present 2-3 approaches with trade-offs
4. ASK → Use AskUserQuestion with clear options
5. DECOMPOSE → Ask "One feature or multiple?" (CRITICAL)
└─ If multiple → List features, ask which first, write BACKLOG.md
6. WAIT → Do NOT proceed until user responds
6b. PROSE AUDIT → Scan ALL SPEC.md prose sections for un-ID'd behavioral requirements (MANDATORY)
└─ If found → STOP. Add CATEGORY-NN IDs to Requirements table before proceeding.
7. DOCUMENT → Write PLAN.md with Testing Strategy section FILLED
8. VERIFY PLAN → Check PLAN.md Testing Strategy table has all boxes checked
└─ If any unchecked → STOP. Fill them before proceeding.
9. CONFIRM → Ask "Ready to proceed?"
10. WORKSPACE → Ask "Create worktree?" (Yes recommended / No)
11. SETUP → If worktree Yes, invoke dev-worktree
12. GATE → Only start /dev-implement after all approvals
Mandatory steps (NEVER skip): VERIFY TESTING, DECOMPOSE, PROSE AUDIT, VERIFY PLAN, WAIT, WORKSPACE, and GATE.
Before proceeding past step 2, verify SPEC.md contains:
[ ] Testing approach (unit/integration/E2E)
[ ] Test framework (pytest/jest/playwright)
[ ] Test command (how to run)
[ ] Testing skill specified (dev-test-electron/playwright/etc.)
Before proceeding past step 8, verify PLAN.md Testing Strategy table:
[ ] Framework filled
[ ] Test Command filled
[ ] First Failing Test described
[ ] Test File Location specified
[ ] Testing Skill specified
If any box is unchecked → STOP. Do not proceed.
Before proceeding past step 8, verify PLAN.md REAL Test Criteria table:
[ ] User workflow documented (exact steps user takes)
[ ] Protocol matches production (WebSocket/HTTP/IPC/etc.)
[ ] UI elements identified (what user interacts with)
[ ] User-visible output documented (what user sees)
[ ] Code path specified (same path as production)
If any box is unchecked → You WILL write fake tests. Fix now.
Ask yourself before proceeding:
If ANY answer is "no" → STOP. Fix the REAL Test Criteria section.
Recognize these thoughts as red flags—they signal attempts to bypass the user gate:
| Thought | Reality |
|---|---|
| "User will approve this" | Your assumption ≠ approval. Ask and wait. |
| "It's the obvious choice" | User decides what's obvious. Present options. |
| "Let me just start" | NO. Gate exists for a reason. Wait. |
| "User said they trust me" | Trust doesn't mean skip approval. Ask. |
| "Time pressure" | You'll waste more time with the wrong approach. Wait for approval. |
| "Only one viable option" | Present it anyway. User may see alternatives. |
| "Ask forgiveness later" | No. Ask permission now. |
| Your Drive | Why You Skip | What Actually Happens | The Drive You Failed |
|---|---|---|---|
| Helpfulness | "I'll pick the best approach for them" | User had context you lacked — your choice was wrong | Anti-helpful |
| Competence | "Only one viable option, no need to ask" | User sees alternatives you missed — your confidence was arrogance | Incompetent |
| Efficiency | "Skip user approval to move faster" | Wrong approach means full rework | Inefficient |
The protocol is not overhead you pay. It is the service you provide.
| Action | Why It's Wrong | Do Instead |
|---|---|---|
| Present only one approach | You're removing user choice | Always show 2-3 options |
| Skip trade-offs | You're making decision for user | Explain pros/cons clearly |
| Start implementing | You don't have approval yet | Wait for explicit "Yes" |
| Assume recommendation accepted | You're guessing at user preference | Ask and wait for answer |
| Write PLAN.md without checking SPEC.md prose sections for un-ID'd requirements | Behavioral features in Design Decisions, Discovered Protocol, or Clarified Requirements will be silently dropped from the entire traceability chain | Run Prose Section Audit (step 4b) first |
Design complete when:
.planning/PLAN.md written with chosen approachPhase summary (append to LEARNINGS.md):
## Phase: Design
---
phase: design
status: completed
requires: [SPEC.md, clarified-requirements]
provides: [PLAN.md, PLAN_REVIEWED.md, architecture-decision]
chosen-approach: [one-liner describing selected approach]
---
After user approves ("Yes, proceed"):
Plan Review Gate (MANDATORY — produces .planning/PLAN_REVIEWED.md):
Discover and read the plan reviewer skill:Read ${CLAUDE_SKILL_DIR}/../../skills/dev-plan-reviewer/SKILL.md and follow its instructions.
Follow the plan reviewer's instructions:
.planning/PLAN_REVIEWED.md (per dev-plan-reviewer instructions) → proceed to worktree questionAsk about worktree (Step 7 above)
If worktree chosen:
Skill(skill="workflows:dev-worktree")skills/dev-implement/SKILL.md via cache lookup, then invoke with Read()If no worktree:
skills/dev-implement/SKILL.md via cache lookup, then invoke with Read()Required before proceeding:
.planning/PLAN_REVIEWED.md exists with status: APPROVEDAfter this feature is implemented and PR'd:
If multiple features were identified in step 4, check .planning/BACKLOG.md for remaining features:
/dev again to tackle the next featureThis enables incremental development: one feature → PR → merge → next feature.