---
name: plan-a-feature
description: Turn a messy idea into a locked, fingerprinted plan that forgetful sessions can build from for weeks without drifting - brain dump, why first, one question at a time, PASS/FAIL stories, a grill for what the plan doesn't say, and a human lock. Use when the user wants to plan a feature, "grill the plan", or lock a plan before building.
---

# Plan a feature

A plan is the last place where being wrong is cheap. This skill keeps you planning with the
human until the finished feature is clear, then freezes the plan so every session that builds
from it can prove it read the same version.

From "How we build Capisso", Part 2. Free to use and change.

Files: `docs/plans/<feature>/plan.md` (the plan), `docs/decisions.md` (numbered decisions with
reasons, shared by every session). Create them if missing.

## 1. Take the brain dump

Ask the human to empty their head: what exists today, what annoys them, what customers say,
notes from meetings. Garbled voice notes are fine. Read it back as a short list of intents and
ask what you missed. Do not propose features of your own yet.

## 2. Why before what

Before any design, pin down:
- the launch paragraph, PR-FAQ style: what a customer can now do, in two or three sentences;
- the number this feature should move, which way, by how much, and within how many days.

Nothing moves until the human confirms both. Write them at the top of `plan.md`.

## 3. One question per message

Ask one question at a time, each with two or three approaches and your pick. Reach past the
feature: other user flows, regressions, how it is announced. When the human answers, append a
numbered entry to `docs/decisions.md`: the decision in their words, the reason, and
"replaces #N" if it changes an earlier one. Before asking anything, check that file: if a
decision already answers it, apply it and say which.

If the discussion stalls, restate the problem and come at it from another angle.

## 4. Stories say what happens, never how

Write stories as something a person does and sees, smallest useful slice first, so the first one
built is already worth having. Give each story acceptance cases: scenario, steps, and a PASS/FAIL
line anyone can tick without reading code. Leave the how to the session that reads the code.

## 5. Grill the plan

A finished-looking plan is at its riskiest. Hunt for cracks: places where two good builders could
read the plan two ways.
- Surfaces: every screen, email, message or API the feature touches, including other doors in.
- Siblings: features that already do something similar; the new one should behave the same.
- Today vs proposed: describe the current screen next to each proposed one.

Ask the human about each crack one at a time, with two readings and your pick. Never fill a
crack yourself: a guess looks exactly like a decision. Then have a fresh subagent that did not
write the plan read every story against the code and report what doesn't fit.

## 6. The human locks it

Ask the human to approve. Only they can lock; you may ask, never declare it. On approval:
- record the story count as the baseline;
- fingerprint the plan: `shasum -a 256 docs/plans/<feature>/plan.md | cut -c1-16`
  (keep `-a 256`: plain `shasum` is SHA-1);
- write the 16 characters at the top of `plan.md` as `locked: <fingerprint>`.

Every session that builds from the plan quotes the fingerprint back before it starts. Any change
means a new lock and a new fingerprint.

## 7. After the lock, gaps come back up

No plan is perfect. A gap found during the build goes up to the session holding the plan, and on
to the human if it needs them: this release, or a later one? It is never filled where it was
found. A new idea joins only if the feature can't ship without it, and only the human adds it.
