From vibekit
Converts an approved spec into a TDD-structured implementation plan with exact file paths, full code snippets, and explicit commit boundaries. Invoke after the user approves a spec and before any implementation begins.
How this skill is triggered — by the user, by Claude, or both
Slash command
/vibekit:plan-writeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Write a comprehensive implementation plan assuming the executing engineer has zero context for the codebase and questionable taste. Document everything they need to know: which files to touch for each task, the actual code, tests, docs to check, exact commands. Break the work into bite-sized tasks of 2–5 minutes each. DRY. YAGNI. TDD. Frequent commits.
Write a comprehensive implementation plan assuming the executing engineer has zero context for the codebase and questionable taste. Document everything they need to know: which files to touch for each task, the actual code, tests, docs to check, exact commands. Break the work into bite-sized tasks of 2–5 minutes each. DRY. YAGNI. TDD. Frequent commits.
Assume a skilled developer who knows almost nothing about the toolset, the problem domain, or good test design.
Announce at start: "Writing the implementation plan."
Only after a spec has been written, self-reviewed, and explicitly approved by the user (the output of brainstorm-lean). Never before.
docs/specs/YYYY-MM-DD-<topic>-design.md or a user-specified path.If any prerequisite is missing, stop and redirect: either run brainstorm-lean first or ask the user to confirm the spec path.
docs/plans/YYYY-MM-DD-<feature-name>.md
User preferences for plan location override this default.
The plan doc is not compressed. Downstream execution agents read this file verbatim and make edits based on what it says. Every path, every code block, every command must be exact. Compressing prose to save tokens here causes silent bugs later.
The announcement to the user ("Writing the implementation plan.") is compressed; the plan itself is normal prose.
If the spec covers multiple independent subsystems, it should have been broken into sub-project specs during brainstorming. If it was not, stop and suggest breaking this into separate plans — one per subsystem. Each plan should produce working, testable software on its own.
Do not write a mega-plan that spans unrelated subsystems.
Before listing tasks, map out every file that will be created or modified and what each one is responsible for. This is where decomposition decisions get locked in.
Present the file structure as a short list before the first task. Example:
## File structure
New:
- src/components/ThemeToggle/ThemeToggle.tsx — the toggle component
- src/components/ThemeToggle/ThemeToggle.test.tsx — component tests
- src/components/ThemeToggle/index.ts — public export
Modified:
- src/App.tsx:12-40 — mount the toggle in the header
- src/theme/tokens.ts:12-48 — add `colorScheme` token
Each step is one action taking 2–5 minutes. Examples of steps:
A task is a small group of steps that together produce a working, committable change.
Every plan starts with this header, exactly:
# [Feature Name] Implementation Plan
> **For executing agents:** implement this plan task-by-task. Each step uses checkbox (`- [ ]`) syntax. Do not skip steps. Do not batch commits across tasks.
**Goal:** [One sentence describing what this builds]
**Architecture:** [2–3 sentences about approach]
**Tech stack:** [key technologies and libraries]
---
After the header, every plan doc includes a ## Premortem section in this exact shape (filled in during the premortem step, not at header-writing time):
## Premortem
**Hidden assumptions:**
- [risk] — [mitigation], or `none — <specific reason>`
**Irreversible / risky steps:**
- [risk] — [mitigation], or `none — <specific reason>`
**Spec-misalignment:**
- [risk] — [mitigation], or `none — <specific reason>`
**Verify-clause weakness:**
- [risk] — [mitigation], or `none — <specific reason>`
Every task follows this shape exactly. The → verify: clause on the task header is mandatory — it names the checkable success criterion for the whole task. exec-dispatch will reject any task missing it.
### Task N: [Component Name] → verify: [observable success criterion]
**Files:**
- Create: `exact/path/to/file.ts`
- Modify: `exact/path/to/existing.ts:123-145`
- Test: `tests/exact/path/to/file.test.ts`
- [ ] **Step 1: Write the failing test**
```ts
test('specific behavior', () => {
const result = fn(input);
expect(result).toBe(expected);
});
```
- [ ] **Step 2: Run test to verify it fails**
Run: `npm test -- path/to/file.test.ts -t "specific behavior"`
Expected: FAIL with "fn is not defined"
- [ ] **Step 3: Write minimal implementation**
```ts
export function fn(input: Input): Output {
return expected;
}
```
- [ ] **Step 4: Run test to verify it passes**
Run: `npm test -- path/to/file.test.ts -t "specific behavior"`
Expected: PASS
- [ ] **Step 5: Commit**
```bash
git add tests/path/to/file.test.ts src/path/to/file.ts
git commit -m "feat: add specific behavior"
```
Sequential is the default. When and only when a contiguous block of tasks is genuinely independent — disjoint "Files" sections, no ordering dependencies, no shared package-manifest edits — the plan author MAY wrap them in a parallel-group:
<!-- parallel-group: <kebab-case-name>
rationale: <one-line justification — why these tasks are independent> -->
### Task K: ... → verify: ...
**Files:** ...
- [ ] Step 1: ...
...
### Task K+1: ... → verify: ...
**Files:** ...
- [ ] Step 1: ...
...
<!-- /parallel-group -->
Constraints on every parallel-group:
exec-dispatch re-checks this and rejects the group otherwise.→ verify: clauses (already globally mandatory).The opening marker's rationale: line is non-optional — the plan author justifies independence in writing so reviewers (and future you) can see why these specific tasks were considered safe to fan out. Empty or vague rationales ("they look independent") are caught in self-review.
Default is sequential. Reach for parallel-group only when the wall-clock saving justifies the analysis cost; for plans of <5 tasks, almost always skip it.
→ verify: clauseEvery task header ends with → verify: <observable success criterion>. The criterion must be checkable without judgment — a passing test name, a command exit code, a file existing, an HTTP status. "It works" is not a verify clause.
Examples:
### Task 3: ThemeToggle component → verify: ThemeToggle.test.tsx passes; clicking toggle flips data-theme on <html>### Task 5: /healthz endpoint → verify: curl localhost:8080/healthz returns 200 with body {"ok":true}If a task cannot be expressed with a verify clause, it is not bite-sized — split it.
Every step must contain the actual content an engineer needs. These are plan failures — never write them:
Look at the spec with fresh eyes and check the plan against it. This is a checklist — not a subagent dispatch.
clearLayers() in Task 3 but clearFullLayers() in Task 7 is a bug.git invocations) must actually work in the target repo's toolchain as written. If the command's expected output is a behavior of the runtime (not just the code under test), dry-run the command once before finalizing the plan.### Task N header ends with → verify: <criterion>. Missing or vague clause = fix it now; exec-dispatch will refuse to dispatch otherwise.
7a. Parallel-group integrity. For every <!-- parallel-group: ... --> block: rationale present and concrete; wrapped tasks' "Files" sections fully disjoint (do the union, look for collisions); no wrapped task references another's output in CONTEXT; no wrapped task touches package manifests. If any check fails, either fix the plan or unwrap the group. exec-dispatch will re-check and halt on any violation.Items 6 and 8 together: do not specify output the plan author has not observed or cannot derive with certainty. Ambiguity and guessing here cascade directly into failed dispatches.
Fix issues inline. No re-review — just fix and move on. If a spec requirement has no task, add the task.
After self-review fixes are applied, run the premortem (next section).
After self-review fixes are applied, run an adversarial four-category sweep against the plan. The premortem is a distinct cognitive mode from self-review: self-review catches tactical defects (placeholders, type consistency, command runnability); the premortem catches strategic flaws (hidden assumptions, irreversibility, spec-misinterpretation, weak verify clauses). Run both, in order.
Append a ## Premortem section to the plan doc, immediately after the plan-document header and before ## File structure. The section uses bulleted per-category format. For each category, write either one or more risk bullets in the form <risk> — <mitigation>, or a single none — <specific reason> bullet. No category is skipped.
1. Hidden assumptions — Does this plan trust something it shouldn't?
The plan assumes some file, function, API, library behavior, environment variable, runtime invariant, or data shape exists or behaves a certain way. List each load-bearing assumption the plan does not verify itself. For each, state how the plan handles the assumption being wrong (a verify clause that catches it, an early task that confirms it, or "we accept the risk because ").
none — <reason> valid when: the plan only touches code created within the plan, OR every external dependency has been read by the author and the relevant assumption verified inline.
2. Irreversible / risky steps — What's expensive to undo?
Migrations, deletions, schema changes, mass renames, edits to files outside the feature area, package-manifest changes, lockfile updates, anything production-affecting, anything touching shared state across tasks. For each, state the rollback path (a revert commit, a down-migration, a backup) and whether the plan exercises it before the destructive step.
none — <reason> valid when: every task can be reverted by git revert <commit> without follow-up work.
3. Spec-misalignment — Where could the user say "that's not what I asked for"?
For each spec requirement that has more than one reasonable interpretation, state which interpretation the plan picked and surface it. Verify clauses that lock in the interpretation count as mitigation. Cases where the plan's interpretation diverges from the most-literal reading of the spec are BLOCKING RISK candidates.
none — <reason> valid when: every spec requirement has exactly one reasonable interpretation, AND every task's verify clause matches that interpretation observably.
4. Verify-clause weakness — Where does success and failure look the same?
For each task, ask: could broken code pass this verify clause? Could correct code fail it? Examples of weak clauses: "test file passes" (passes on empty file), "no errors in console" (passes if the feature didn't load), "endpoint returns 200" (passes on a stub). For each weak clause, tighten it inline before the user-review gate.
none — <reason> valid when: every verify clause names a specific assertion, exit code, file content, or HTTP response that distinguishes correct from broken.
## Premortem
**Hidden assumptions:**
- <risk> — <mitigation>
- <or> none — <specific reason>
**Irreversible / risky steps:**
- <risk> — <mitigation>
- <or> none — <specific reason>
**Spec-misalignment:**
- <risk> — <mitigation>
- <or> none — <specific reason>
**Verify-clause weakness:**
- <risk> — <mitigation>
- <or> none — <specific reason>
If any category surfaces a risk the author cannot mitigate inline by editing the plan (typically a category-3 spec-misalignment that goes deep, or a category-2 irreversibility with no rollback), the bullet is prefixed **BLOCKING RISK:** and the mitigation field reads requires user decision — recommend revising spec or accepting risk.
The premortem itself never halts the skill. It produces the section and proceeds to the user-review gate. The user reads the labeled bullet there and decides whether to approve, revise the spec, or bounce back to brainstorm.
none — N/A or none — no risks for every category. If the categorical sweep produces four none lines, the author did not actually do the sweep. none reasons must be specific (e.g., none — only touches new files in src/components/ThemeToggle/, not none — N/A).<risk> — <mitigation>. Risks without mitigations are either BLOCKING RISKs (label them) or unfinished work.BLOCKING RISK: label to make the plan look approvable. The label is for the user, not for the author's comfort.After the plan is saved and self-reviewed, present the user with the execution choice:
Plan saved to
docs/plans/<filename>.md. Two execution options:1. Subagent-driven (recommended) — one fresh agent per task, review between tasks. 2. Inline execution — run tasks in this session, batched with checkpoints.
Which approach?
Wait for the user's choice. Then invoke the corresponding execution skill. Do not pick unilaterally.
docs/plans/YYYY-MM-DD-<feature-name>.md.No structured return value — this skill is file-producing and user-facing.
npx claudepluginhub rizukirr/vibekit --plugin vibekitGenerates detailed implementation plans from specs for multi-step tasks before coding, mapping file structures and breaking into bite-sized TDD steps with standardized headers.
Creates detailed implementation plans from specs for multi-step tasks before coding, with file structure mapping, bite-sized TDD steps, architecture overview, and tech stack.
Writes implementation plans from specs for multi-step tasks, mapping files and breaking into TDD bite-sized steps before coding.