From swd
Plan a non-trivial code change rigorously — understand the problem, form a hypothesis, validate assumptions through real experiments and doc/code reads, and cross-check the proposed solution against product specs, architecture, and the existing codebase before writing any plan. Use when the user says "/blueprint", "blueprint this", "plan this thoroughly", "deep plan", "I want to be sure before we build this", or for any change where a wrong direction would burn meaningful time, tokens, or compute. Heavier and more deliberate than `/plan`; the goal is the global optimum, not a local one.
How this skill is triggered — by the user, by Claude, or both
Slash command
/swd:blueprintThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The point of this skill is **not** to produce a longer plan. It is to refuse to commit to a plan until the assumptions underneath it have been tested against reality. A plan built on unverified assumptions is just a confident-looking bug report from the future.
The point of this skill is not to produce a longer plan. It is to refuse to commit to a plan until the assumptions underneath it have been tested against reality. A plan built on unverified assumptions is just a confident-looking bug report from the future.
/plan says "here's how I'd build it." /blueprint says "here's how I'd build it, here's why each load-bearing assumption holds, and here's the evidence."
agent/, portal/, marketing/, infra/)Do not invoke for: typo fixes, single-file edits with obvious scope, mechanical rename/move tasks, or anything /plan (or no plan at all) handles fine. This skill is expensive on purpose; reserve it.
HEAD, not from memory. Memory of a codebase decays; APIs change; specs evolve. Verify now.Restate the problem in your own words. Identify:
If any of these are ambiguous or contradictory, ask the user. One clarifying question now beats a wasted plan later. Do not invent answers to plug holes.
Propose a concrete candidate solution given current knowledge. It should be specific enough to be wrong:
If you cannot articulate a hypothesis at all, the problem is not yet understood — go back to step 1.
If multiple candidate approaches are plausible, note them and pick one to validate first based on simplicity, risk, or fit. The others are fallbacks if validation kills the primary.
Then write down what would prove the hypothesis itself wrong — not its individual assumptions (those come in step 3), but the shape of the solution. Examples:
A hypothesis you can't even imagine disproving isn't a hypothesis — it's a vibe with file paths. If you can't write the falsifier, the hypothesis isn't specific enough; sharpen it. Carry the falsifier into step 4 and test it alongside the assumptions.
Write them down explicitly. An assumption is load-bearing if the plan stops working when the assumption is false. Examples:
customers table has column phone_e164 and it is unique per org"For each assumption, classify:
Risky and plausible assumptions go into step 4. Verified ones get a citation (file:line or doc reference) and move on.
For each unverified assumption, pick the cheapest validation that produces real evidence:
| Assumption type | Validation |
|---|---|
| API behavior | Write a 10-30 line script, run it, capture the output. Or read the library source. |
| Library capability | Read the library docs and the code; docs lie, code does not |
| Internal code behavior | grep / Read the actual implementation on HEAD; do not trust memory |
| Schema / data shape | Query the dev DB (read-only) or read the migration files |
| System / infra behavior | Read the relevant config, IaC, or runtime docs; if cheap, run a probe |
| Performance / scale | Back-of-envelope first; only benchmark if the math is too close to call |
| External service | Read the vendor docs and check if there's already an integration in-repo to crib from |
Record each result as confirmed, refuted, or partial. For refuted assumptions, return to step 2 with new information — do not patch around the refutation.
For batched investigation (multiple parallel reads, broad searches), delegate to an Explore agent rather than draining the main context.
Locate the specs touched by this change (e.g. docs/product-spec/*.md, plus any invariants doc the project maintains). For each:
If a violation is found, the plan is not yet ready. Either change the plan or — if the spec is wrong — flag it explicitly to the user as a spec change that needs review before code work begins.
Two failure modes this step catches: a plan that fights the architecture, and a plan that uses defaults from your training data instead of the project's actual conventions ("pnpm" when the repo uses yarn, "localhost:3000" when the API is on :9100, "param-style DI" when the codebase uses vi.mock). The second is by far the more common — and the more embarrassing, because it requires zero new thinking, just reading.
6a. Architecture. Check the proposed change against:
6b. Project conventions — read, enumerate, cite, and link to plan lines. This is a discipline check, not a judgment call. You must produce evidence that you read the project's conventions docs on HEAD, not relied on memory or sensible defaults.
For each row below, name the file/section you consulted and the convention you found. If a row doesn't apply (e.g. the project has no schema migrations), say so explicitly — silent omission is the failure mode. Categories are universal; the paths are project-specific and must be discovered from the repo, not assumed.
| What to check | Where it lives (varies by project) | What to record |
|---|---|---|
| Root project conventions | AGENTS.md / CLAUDE.md / README.md at the repo root | One-line summary + the rules the plan touches |
| Per-component conventions | <component>/AGENTS.md (or equivalent) for every component the plan modifies | Local commands, code style, allowed/forbidden patterns |
| Package manager | Conventions doc, package.json, lockfile (or Cargo.lock / uv.lock / …) | yarn / pnpm / npm / cargo / uv — verify against the lockfile; do not default |
| Build / test / run entry points | The project's task runner — justfile, Makefile, package scripts, cargo aliases, etc. | The recipes the conventions doc names as canonical (do not infer from package.json scripts unless that is the documented convention) |
| Test framework + mocking policy | Conventions doc, sibling tests, framework config | Framework name, file-location convention (co-located vs __tests__), mocking style (module mocks vs param DI), coverage threshold |
| Lint / format | Conventions doc, tool config files | Tool name (biome / eslint / ruff / rustfmt / …), per-language rules |
| Migration / schema-change tooling (only if the plan touches schema) | Conventions doc, migrations/ or equivalent | The exact command to scaffold a migration |
| Ports, URLs, environment | Root conventions doc | Local dev ports/URLs — don't guess at defaults |
| Long-running / async machinery (only if the plan touches it) | Conventions doc | Which platform handles retryable work; boundary rules |
| Existing patterns to reuse | Sibling files in the same directory | If a pattern already exists, reuse beats invention |
| Anything else the conventions doc flags | The conventions doc itself | Catch-all for project-specific rules not covered above |
The output of this step is a bullet list inside the plan under "Project conventions to follow." Each bullet has two parts, in this exact shape:
- [
file:line] Convention: what the doc says. → Reflected in plan: which plan step(s) follow it, and how.
If a convention doesn't constrain this particular plan, the right-hand side reads Doesn't constrain this plan plus a one-line reason. "Doesn't constrain" is a claim — defend it briefly. Silent omission is the failure mode the format exists to prevent.
If the proposal conflicts with any of these, prefer adjusting the proposal over arguing with the convention. If you genuinely think the convention is wrong here, say so — but as a separate conversation, not a silent deviation.
Specs and architecture clearing the proposal doesn't mean the codebase will. File-existence and signature checks for files the plan touches belong in step 3 as load-bearing assumptions (e.g. "apps/web/src/foo.ts exports bar(x: X): Y") and get validated in step 4. This step is for systemic surprises that wouldn't naturally appear as bullet assumptions:
git log it. Someone else may already be doing this, or just blocked it.This step catches the surprises that aren't part of any single assumption but invalidate the plan in aggregate.
After steps 4–7, one of three things is true:
Looping is normal and expected. The skill exists because first hypotheses are often wrong. A clean plan on the second or third iteration beats a brittle plan on the first.
Cap iterations at ~3 before pulling the user in. If after 3 rounds no hypothesis survives, the problem itself likely needs reframing — surface that.
Close the loop between the goal (step 1) and the plan about to be written. For each success criterion stated in step 1, name the plan step(s) that satisfy it. Land on one of:
A plan whose own success criteria don't all map to plan steps is a list of activities, not a plan.
Structure (inverted pyramid):
Keep the plan as long as it needs to be and no longer. A plan that nobody reads is worse than one that's slightly too short.
Show the plan. If there are open questions, ask them explicitly and wait. If the plan involves an architectural deviation, a spec change, or a risky migration, do not start implementing in auto mode — get explicit user approval first.
If the plan is approved, implementation continues under normal rules (lint, test, commit hygiene, /submit for PRs).
When tempted to skip or shortcut a step, check whether your reasoning appears below. If it does, the answer is: do the step.
| Rationalization | Why it fails here |
|---|---|
| "I already know how this library/API works." | Memory of third-party APIs decays; versions drift. Cost to confirm: minutes. Cost of being wrong: hours. Verify on the version actually in use. |
| "This change is small enough to skip validation." | If it were that small, the user would have invoked /plan, not /blueprint. The invocation itself is the signal that validation is required. |
| "The user is waiting — just commit to the hypothesis." | A wrong plan costs more wall-clock than a slow one. The whole reason this skill exists is to front-load the failure. |
| "I'll validate the risky assumption while implementing." | Validation discovered mid-implementation means rework, lost commits, and (worse) silent papering-over. Validate first. |
| "Reading the source is overkill — the docs say X." | Docs lie, code does not. For any load-bearing assumption, read the implementation. |
| "Three iterations is taking too long, let me just ship plan v3." | Three failed iterations means the problem needs reframing, not that the plan is ready. Surface to the user. |
| "There's no spec for this area, so cross-validation doesn't apply." | Absence of a spec is itself a signal — either propose one or flag that this work creates undocumented behavior. Don't silently skip. |
| "The proposed approach matches an existing pattern, so it must be fine." | Patterns get cargo-culted. Confirm the pattern still applies to this problem before reusing it. |
| "I'll just batch the validations in my head as I write the plan." | If they're not written down with evidence, they're not validated — they're just asserted in a more confident tone. |
"TS monorepos usually use pnpm / Node servers usually run on :3000 / projects usually mock with jest.mock." | Defaults from training data are the most dangerous failure mode in convention-checking, because they feel right and require no work to invoke. Verify on the repo, not on the population. Pull the actual command, port, framework name from AGENTS.md or the relevant docs/ file. |
The skill is complete when all of these are true. Each item should be answerable with evidence, not a vibe.
file:line citation, a quoted doc passage, a script's output, or a query result. No bare [plausible] or [unverified] tags survive into the final plan.file:line citations inside the plan, and each bullet links to the plan step it shapes (or is marked Doesn't constrain this plan with a reason). No defaults from training data — yours or the population's — sneaking in.If a checkbox cannot be ticked honestly, the skill is not done — return to the step that produces it.
/plan — lighter; use when assumptions are mostly known and the change is straightforwardfeedback_plan_validation_passes — the three-pass validation discipline (assumption / spec+arch / edge-case) is roughly steps 4–7 here, applied at the end of any plan/submit — for landing the change once the plan executesProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub korya/swd-skills --plugin swd