brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
writing-plansA discipline for writing a short, reviewed plan before any non-trivial implementation. Plans live under a configurable plans directory (default `docs/plans/`) and follow a prescribed shape — problem, approach, tradeoffs, steps, open questions. Use when the user says "write a plan", "plan this", or "let's plan".
Independent GitHub snapshot · Automated classification · Original documentation governs
docs/plans/) and follow a prescribed shape — problem, approach, tradeoffs, steps, open questions. Use when the user says "write a plan", "plan this", or "let's plan".
compatibility: Designed for Claude (claude.ai, Claude Code, or similar). Requires git for plan-directory resolution; no other runtime dependencies.
metadata:
author: gregoryfoster
version: "1.1"
triggers: write a plan, plan this, let's planA discipline for writing a short, reviewed plan before non-trivial implementation. Plans capture problem, approach, tradeoffs, steps, and open questions in a prescribed structure so reviewers can react to a concrete artifact instead of an intent.
Activation triggers: "write a plan", "plan this", "let's plan".
NO NON-TRIVIAL IMPLEMENTATION WITHOUT A WRITTEN, REVIEWED PLAN
If the work is non-trivial (see Phase 1) and there is no plan committed to the plans directory and acknowledged by the user, you cannot start implementing. Write the plan first.
| Thought | Reality |
|---|---|
| "I'll plan as I go — the structure will emerge" | Mid-stream replanning is more expensive than upfront planning, and the user can't review what isn't written. Write the plan first. |
| "The GitHub issue description is the plan" | Issues capture what and why; plans capture how, tradeoffs considered, and steps. They are not interchangeable — write the plan even when the issue is detailed. |
| "This is small enough to skip" | Phase 1 exists to make that call deliberately. If you're tempted to skip because typing the plan feels slow, you're skipping for the wrong reason. |
Trigger phrases may include the plan topic inline — e.g., write a plan for auth rotation, plan this migration, let's plan the index rebuild. Apply the appended topic as the explicit subject; skip the "what should we plan?" fallback.
The skill's scripts/ directory is not at the project root — it ships inside the skill. Resolve its script once, then substitute the printed path wherever <resolve-plans-dir.sh> appears below (#63):
N=writing-plans
for S in resolve-plans-dir.sh; do SD=
for d in scripts ".claude/skills/$N/scripts" "$HOME/.claude/skills/$N/scripts"; do
[ -f "$d/$S" ] && { SD="$d"; break; }
done
[ -n "$SD" ] || echo "$S not found in scripts/, .claude/skills/$N/scripts/, or ~/.claude/skills/$N/scripts/" >&2
echo "<$S>=${SD:?}/$S"
done
A project-local scripts/resolve-plans-dir.sh wins if one exists. <resolve-plans-dir.sh> is a placeholder for the literal path printed here, not an inherited shell variable — each Bash invocation runs in a fresh shell. The list resolves per script so that a second script cannot inherit the first one's directory (#301).
Every plan write resolves the target directory in this order (first match wins):
PLANS_DIR env var (highest priority) — explicit override for one-off invocations.skills/plans_dir file — single-line file under the repo root; project's persistent default<repo-root>/docs/plans/ — fallback when neither of the above is setInvoke bash "<resolve-plans-dir.sh>" to print the resolved directory. The plan filename is YYYY-MM-DD-<topic-slug>.md, where <topic-slug> is the topic lowercased with non-alphanumerics replaced by -.
A plan is appropriate when at least one applies:
A plan is not required for:
If none apply, stop. Just do the work. Don't write a plan because the trigger phrase fired.
Copy assets/plan-template.md to <plans-dir>/YYYY-MM-DD-<topic-slug>.md and fill in:
Keep the plan short. A reader should consume it in under 5 minutes. If it doesn't fit, split the work.
Commit the plan (don't wait for implementation), then surface it to the user with a one-line pointer (amend the commit if review demands changes; new plan only on pivot — see Phase 4):
Plan written: <plans-dir>/YYYY-MM-DD-<topic-slug>.md — review before I start.
Wait for explicit acknowledgment. "Looks good", "proceed", or directed edits all count. Silence does not.
Work through the steps in order. If a step reveals the plan is wrong:
Supersedes: <old-plan-path> line in the frontmatter. The old plan stays in the directory as a record.Never silently diverge from a plan the user reviewed. Either revise it or replace it.
Treat plan-review feedback as first-class. The plan is the artifact under review in Phase 3 — not the code that follows. Edits requested at this phase are cheap; the same edits after implementation are not.
docs/plans/), others under a tooling-vendored path. Use the resolution order; don't hardcode.Supersedes: chains let a topic's planning history be reconstructed without git archaeology. Use them on pivot, not on every minor edit. The template's frontmatter exposes this as a lowercase YAML key — set supersedes: <relative path to prior plan> on the new plan.Self-budget: held to a 6,000-token ratchet (estimate and exact) by
tests/structural/test_skill_self_budget.py — both readings must clear it, so
no choice of measurement can loosen it.