원클릭으로
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when you have a spec or requirements for a multi-step task, before touching code
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
Use when you need to research a domain, market, or technical area before planning
Use when starting any conversation — establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions
Audit frontend and backend implementation against every PRD file, one by one, using parallel subagents. Produces a full status table (done / partial / not-started), identifies critical-path blockers, and recommends next sprints. Use when you need to know where you stand against your PRDs.
First-time project setup for Mighty Powers. Creates config file, artifact directories, offers to generate CLAUDE.md, and explains available workflows.
Push the LLM to reconsider, refine, and improve its recent output. Use when user asks for deeper critique or mentions a known deeper critique method, e.g. socratic, first principles, pre-mortem, red team.
| name | writing-plans |
| description | Use when you have a spec or requirements for a multi-step task, before touching code |
Write comprehensive plans for skilled engineers unfamiliar with your codebase and domain. Every detail explicit — no placeholders, no "TBD". Bite-sized tasks with exact file paths, code, and test code. DRY. YAGNI. TDD. Frequent commits.
Announce at start: "I'm using the writing-plans skill to create the implementation plan."
Context: This should be run in a dedicated worktree (created by brainstorming skill).
Save plans to: docs/plans/<feature-slug>/ (see Output Structure below)
Before doing anything else, assess plan complexity:
Simple — all of the following are true:
Complex — anything else.
If Simple: Skip wave folders, skip status.yaml, skip plan review subagent, skip cost estimation. Output a single flat plan.md with tasks as numbered sections. Still do the architecture artifact, TDD mode decision, and spec alignment check — those pay off at any scale.
If Complex: Full structure — wave folders, task files, status.yaml, plan review subagent.
Record the assessment in the plan header: **Complexity:** Simple | Complex
If the spec covers multiple independent subsystems, it should have been broken into sub-project specs during brainstorming. If it wasn't, suggest breaking this into separate plans — one per subsystem. Each plan should produce working, testable software on its own.
Before defining tasks, establish the testing discipline for this plan. Ask the user:
"Do you want strict TDD (tests written before implementation, RED confirmed before GREEN per task), or should I decide based on task type?"
If the user says decide: Apply this heuristic per task:
| Task type | Default mode | Reason |
|---|---|---|
| API routes, business logic, data access | Strict TDD | Clear inputs/outputs; RED phase catches wrong assumptions before code is written |
| UI components with user interaction | Strict TDD | Ctrl+Enter, form submit, dialog confirm — all testable and benefit from spec-first |
| Pure UI layout / styling | Test-after | No meaningful unit test to write first; visual output isn't testable this way |
| Scaffolding, config, migrations | Test-after | Setup code with no inputs/outputs to specify upfront |
| One-off scripts | Test-after | Friction without benefit |
Record the decision in the plan header:
**TDD Mode:** Strict (all tasks) | Mixed (strict for API/logic, test-after for UI layout) | Test-after (all tasks)
Tasks using strict TDD must include the RED step (write failing test, run it, confirm FAIL) before the GREEN step (implement, run, confirm PASS). Tasks using test-after write tests after implementation and verify PASS only.
Why this matters: Strict TDD takes longer wall-clock time but catches design errors before implementation. Test-after is faster but tests are written to match existing behavior, not to specify intended behavior. Make the trade-off explicit so the executing agent applies it consistently rather than guessing per task.
Map all files to create/modify. Design units with clear boundaries, one responsibility per file. Files that change together live together. Follow existing codebase patterns.
This structure informs the wave decomposition. Tasks that touch the same files CANNOT be in the same wave.
Before defining any waves or tasks, write a short architecture note. This is not a design document — it's a decision lock that prevents schema drift and API surface mismatches during implementation.
Save it to: docs/plans/<feature-slug>/architecture.md
Required sections (keep it short — the goal is precision, not length):
# Architecture: <Feature Name>
## DB Schema
<!-- Exact table/column names, types, constraints. Copy from spec if provided. -->
## API Surface
<!-- Exact method, path, request shape, response shape for every endpoint. -->
## Component Tree
<!-- List every file to be created: page, layout, component, lib, API route. -->
<!-- One line per file: `src/app/api/complete/route.ts` — streaming AI completion, enforces usage limit -->
## Data Flow (per feature)
<!-- One bullet per feature: "F3: Ctrl+Enter → POST /api/complete → streamText → usage_logs insert → stream response" -->
## Dependency Mock Plan
<!-- For each external dependency: "Clerk auth → mock via vi.mock('@clerk/nextjs/server')" -->
<!-- See TDD skill for the full mock strategy. -->
## Library Integration Notes
<!-- One line per known quirk. Record BEFORE coding to avoid mid-build surprises. -->
Why this matters: Architecture notes prevent schema drift and API mismatches during implementation. Write this before any task definitions. If it surfaces design questions, resolve them here — not during implementation.
Turn efficiency tip: Combine architecture + test skeleton (file paths, mock setup, describe/it names) in one turn under a "Test Skeleton" section in architecture.md.
One-pass check before writing tasks — flag and resolve discrepancies now (mid-implementation corrections cost 2–3 turns):
Not every wave has parallel tasks. A wave with a single task is perfectly normal. A plan that is entirely sequential (5 waves of 1 task each) is also fine. The wave structure provides checkpoints and clear dependency ordering regardless of parallelism.
For each wave, mark whether it's parallel, sequential, or mixed:
| Wave Pattern | When | Execution |
|---|---|---|
| All independent | Tasks touch different files, no shared state | Dispatch all as parallel subagents |
| All sequential | Tasks touch the same files or must run in order | Execute one at a time |
| Mixed | Some independent, some dependent | Dispatch independent ones in parallel, then run dependent ones after |
| Single task | Only one task in the wave | Just run it |
Choose the output format based on plan complexity:
Create a folder with a wave subfolder per wave. Each wave folder always has an index file (wave.md). Whether tasks get separate files depends on how many tasks the wave contains:
wave.md index file.task-N.M.md) alongside wave.md.docs/plans/<feature-slug>/
├── plan.md # Overview: goal, architecture, wave summary, dependency graph
├── status.yaml # Execution state — THE resume file (see mp:resume)
├── wave-1/ # 3 tasks → inline in wave.md
│ └── wave.md # Wave overview + entry/checkpoint criteria + all task definitions
├── wave-2/ # 7 tasks → separate task files
│ ├── wave.md # Wave overview + entry/checkpoint criteria + task index (names + links)
│ ├── task-2.1.md
│ ├── task-2.2.md
│ ├── task-2.3.md
│ ├── task-2.4.md
│ ├── task-2.5.md
│ ├── task-2.6.md
│ └── task-2.7.md
└── wave-3/ # 1 task → inline in wave.md
└── wave.md
The wave index always starts with the wave header:
# Wave 2: Core Logic
**Depends on:** Wave 1 (all tasks must be completed)
**Tasks:** 2.1, 2.2, 2.3
**Execution:** Parallel (tasks are independent — different files, no shared state)
**Entry criteria:** Wave 1 checkpoint passed (all tests green)
**Checkpoint criteria:** Run `npm test` — all tests must pass
When tasks are inline (≤ 5 tasks): the wave index continues with full task definitions directly after the header, using the same Task Structure format documented below. Each task uses an ### Task N.M: heading.
When tasks are in separate files (> 5 tasks): the wave index adds a task index table after the header:
| Task | Name | Status | Files |
|------|------|--------|-------|
| 2.1 | [Retry Queue](task-2.1.md) | pending | `src/services/retry-queue.ts` |
| 2.2 | [Dead Letter Store](task-2.2.md) | pending | `src/services/dead-letter.ts` |
...
Each task file is self-contained — a subagent reading ONLY that file has everything it needs:
---
task: "2.2"
wave: 2
status: pending
depends_on: ["1.1", "1.3"]
files_to_create:
- src/services/retry-queue.ts
- tests/retry-queue.test.ts
files_to_read:
- src/services/webhook.ts
- src/types/webhook.ts
---
# Task 2.2: Implement Retry Queue
## Context
Goal: [from plan.md]
Architecture: [from plan.md]
This task implements the retry queue that uses the webhook types (Wave 1, Task 1.1)
and the config schema (Wave 1, Task 1.3).
## Steps
[Full task steps with code, file paths, verification commands]
Everything in one plan file + a status.yaml:
docs/plans/<feature-slug>/
├── plan.md # Full plan with waves as sections, tasks inline
└── status.yaml # Execution state
Create status.yaml alongside plan.md. It enables /resume to pick up where execution stopped. See mp:resume for the full YAML format.
Initialize with: feature, created, plan_file, plan_type (small|medium), current_wave: 0, status: pending, and a waves map with every task set to { status: pending }.
Every plan.md starts with this header:
# [Feature Name] Implementation Plan
> **For agentic workers:** Execute wave-by-wave using mp:subagent-driven-development.
> **MANDATORY:** Update `status.yaml` IMMEDIATELY after every task completes.
**Goal:** [One sentence]
**Architecture:** [2-3 sentences]
**Tech Stack:** [Key technologies/libraries]
**Complexity:** Simple | Complex
**TDD Mode:** Strict | Mixed | Test-after
**Wave Summary:**
| Wave | Tasks | Focus | Execution |
|------|-------|-------|-----------|
| 1 | 1.1, 1.2, 1.3 | Foundation | Parallel |
| 2 | 2.1, 2.2 | Core logic | Sequential |
Then wave sections with tasks (using the Task Structure format below), each ending with: **Wave N checkpoint:** Run full test suite. All tests must pass.
Each step is one action (2-5 minutes): write test → verify fail → implement → verify pass → commit.
### Task N.M: [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
Every step must contain the actual content an engineer needs. These are plan failures — never write them:
Skip if Simple plan (see Complexity Gate).
Dispatch a review subagent for a second opinion:
Agent tool:
description: "Plan review"
model: sonnet
prompt: |
[Include content of ./plan-document-reviewer-prompt.md]
Review the implementation plan at: {PLAN_PATH}
The original spec/design is at: {SPEC_PATH}
Check for: spec coverage gaps, placeholder/vague tasks, wave integrity
(no shared files within a wave), dependency ordering, missing verification
steps, parallelism opportunities missed.
If the reviewer finds issues, fix them before presenting execution options.
After saving, announce: "Plan saved to docs/plans/<slug>/. N waves, M tasks." Then offer:
mp:subagent-driven-developmentmp:executing-plans