From ywc-agent-toolkit
Converts rough feature ideas into concrete implementation plans (small/medium/large) with scale assessment and routing to downstream skills. Triggered by phrases like 'make a plan' or 'plan 세워줘'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ywc-agent-toolkit:ywc-planThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Announce at start:** "I'm using the ywc-plan skill to clarify the request, assess scale, and route to the appropriate downstream path."
Announce at start: "I'm using the ywc-plan skill to clarify the request, assess scale, and route to the appropriate downstream path."
This skill converts a rough idea, vague request, or partially-formed change description into one of two artifacts: (1) a direct execution plan for Small changes that can be implemented in a single PR without task decomposition, or (2) a spec document for Medium/Large changes that will be handed off to ywc-spec-validate and then ywc-task-generator. Input: natural-language request from the user. Output: either a plan.md (Small path) or a docs/ywc-plans/<feature>.md (Medium/Large path), plus an explicit handoff instruction.
| Flag | Type | Description |
|---|---|---|
--non-interactive | flag | Skip AskUserQuestion calls in Step 1. If any anchor is missing, fill with defaults: Out of Scope = "nothing explicitly excluded", Done When = "all tasks merged and ywc-impl-review returns DONE". |
--update-spec <path> | string | Path to an existing spec file. Activates Re-plan Mode (Step 4c). Must be used with --failure-context. Mutually exclusive with normal spec generation. |
--failure-context <text> | string | The "Fix Priority" section text from ywc-impl-review. Used together with --update-spec to identify which parts of the spec need amendment. |
--output <path> | string | Explicit output path for the generated spec or plan (e.g., --output docs/ywc-plans/agentic-iteration-1.md). When omitted, defaults to ./plan.md (Small) or docs/ywc-plans/<slug>.md (Medium/Large). |
When tempted to bypass a rule, check this table first:
| Excuse | Reality |
|---|---|
| "User said 'just plan it', I'll skip the codebase investigation" | Codebase investigation is mandatory before drafting either artifact. Plans written without reading existing code, CLAUDE.md, or docs/architecture/ produce conflicts that surface during implementation. The agent always feels confident; the user still suffers the rework. |
| "Scale looks ambiguous, I'll default to Small to keep things light" | Default to Medium when ambiguous, not Small. Small path skips spec review and task decomposition — wrong scale call cascades into untracked scope creep. The cost of writing a spec for an actually-Small change is one wasted hour; the cost of skipping a spec for an actually-Medium change is rework across multiple sessions. |
| "The request has two plausible readings, I'll pick the likelier one" | When two interpretations materially change scope, data model, or the meaning of the change, present both to the user with the consequence of each — do not silently choose. The default-to-Medium rule resolves scale ambiguity only; it is not licence to resolve intent ambiguity by guessing. A silently-chosen interpretation is the most expensive rework source because it stays invisible until implementation contradicts it. |
| "DB migration is part of the change, I'll bundle it into the Small plan" | Any change touching migrations/, prisma/schema.prisma, *.sql, or equivalent is never Small. DB migration must be its own task — escalate to Medium path so ywc-task-generator can split it. Safety invariant — same rule as ywc-task-generator. |
| "User wants to start coding now, I'll skip ywc-spec-validate on the Medium spec" | The Medium/Large path must route through ywc-spec-validate before ywc-task-generator. Skipping spec review is the failure mode ywc-task-generator's requires: [ywc-spec-validate] exists to prevent. Run review even when the user is impatient. |
| "Out of Scope is obvious, I'll leave it implicit" | Always write Out of Scope explicitly — both in the Small plan.md and the Medium spec. The implicit version is the one the agent silently expands during implementation. Empty Out of Scope = guaranteed scope drift. |
| "Library introduction is small, I'll bundle it" | Any new library/framework introduction is never Small. Same Safety Invariant as DB migration — escalate to Medium path. |
| "User mentioned 'auto-execute', I'll skip the spec for Medium too" | Auto-execute via ywc-parallel-executor or ywc-sequential-executor does not remove the spec requirement — those executors consume task directories produced by ywc-task-generator, which itself requires a reviewed spec. The shortcut does not exist. |
| "The idea is clear enough, I'll write the spec directly" | For Medium/Large changes, unverified design assumptions are the most expensive rework source. Before drafting the spec, surface at least the key branching decisions: data model shape, API boundary, error handling strategy, and any third-party integration scope. Assumptions that seem obvious now become the reason the spec is rewritten during implementation. |
| "The spec-writing process is overhead — let's get to the tasks faster" | Design investment is not overhead — it IS the task. Every hour spent clarifying scope and surfacing assumptions prevents 3–5 hours of rework during implementation. Kent Beck: "Invest in the design of the system every day." The spec is today's investment. |
| "The spec says it follows existing component X, that's good enough — no need to read X" | "Follows X" is a claim, not a spec. Code Compatibility findings are the largest single category of spec-validate Critical findings, and the majority trace to a "follows X" claim where the author never opened X. Read X end-to-end and transcribe its behavior into Existing Constraints Touched with file:line citations. The reviewer cannot verify what was never written down. |
| "I grepped and found the one writer/reader, so that's the only one" | A forward grep that confirms one instance is not evidence of a closed set. Closure claims ("only / sole / 唯一 / no other / all / exhaustive") and liveness claims ("dead / @deprecated / 呼び出し元ゼロ / still active") are the single largest source of false-but-confident spec assertions: the planner confirms the instance it already had in mind and never runs the complement grep that enumerates the rest. The most expensive Critical in the LP column-drop plan was exactly this — "injectAndSaveGtmSnippet is the 唯一の generatedHtml writer", but markDone also wrote it, and dropping the column would have broken the build. Before writing any closure or liveness word, run the complement grep (grep -rn "<identifier>" <module>, classify every hit live/dead) and transcribe the full set. |
| "While I'm reading this code anyway, I'll fold in the adjacent cleanup/refactor" | Thoroughness in investigation must not become expansion of the change scope. A plan that enumerates a related site (a parameter, a sibling method, a rename opportunity) and then proposes changing it — when the request did not ask for it — adds surface that becomes new Critical findings. The measured regression: a generatedHtml-drop plan proactively proposed a composeHtml refactor and shipped a build-break Critical the narrower plan never risked. Enumerate everything; change only what the request requires; record the rest as "no change needed" under Existing Constraints Touched. |
| "AC and the API Contract probably agree, I won't cross-check" | Cross-section drift between AC, FR, Data Model, and API Contract is the #2 source of Critical findings (after Code Compatibility). Step 4b.5 is mandatory for Medium/Large precisely because authors trust their own consistency and reviewers find it broken. Run the cross-check; the cost is ~5 minutes, the cost of skipping it is one full re-plan iteration. |
| "Validation came back DONE_WITH_CONCERNS, I'll rewrite the spec from scratch and re-run" | Use Re-plan Mode (--update-spec <path> --failure-context "<findings>") instead. Re-plan appends an ## Iteration N Amendments section that addresses only the failing items, preserving the rest of the spec verbatim. Rewriting from scratch loses the validated portions and produces cosmetic diffs that reviewers must re-validate. |
Violating the letter of these rules is violating the spirit. Safety Invariants (DB migration separation, library introduction separation, mandatory spec review for Medium/Large) have no exceptions, regardless of urgency.
The skill executes five steps. Steps 1–2 are mandatory; Steps 3–5 branch on the scale assessment.
Before extracting anchors, evaluate whether the request is concrete enough for direct planning. Some requests arrive as design conversations rather than plan inputs; those must run through ywc-brainstorm first.
| Signal | Route |
|---|---|
| Request includes a concrete change description, files / surfaces touched, and an observable Done condition | Proceed to Step 1 — anchors will extract cleanly. |
| Request is conversational ("I'm thinking about X", "wouldn't it be nice if…", "let's explore Y", "어떻게 만들지", "アイディアがある") | Delegate to ywc-brainstorm — it surfaces the four anchors via Socratic dialogue and presents 2–3 approaches; resume ywc-plan from Step 1 with the brainstorm handoff as input. |
| Request describes multiple independent subsystems (e.g., "a platform with auth, chat, billing, analytics") | Delegate to ywc-brainstorm for decomposition before any anchor extraction. Each subsystem gets its own brainstorm → plan cycle. |
| Two or more of (What / Why / Out of Scope / Done When) are completely missing from the request | Delegate to ywc-brainstorm — extracting two missing anchors at once produces shallow answers; ywc-brainstorm collects them one at a time with explicit approach trade-offs. |
When delegating, surface this verbatim before transferring control:
"This request needs intent clarification before planning. Switching to
ywc-brainstormto surface the four anchors and approach choice. After the design is approved, returning toywc-planStep 1 with the brainstorm handoff as input."
When ywc-brainstorm completes, its handoff message includes the four anchors and the chosen approach. Re-enter ywc-plan Step 1 with that handoff as the effective user input — the anchors should already be filled, so Step 1 typically reduces to a one-sentence confirmation.
--non-interactive mode skips the delegation: when the flag is present, treat ambiguity as Medium scale (Step 3) and fill missing anchors with defaults rather than routing to ywc-brainstorm.
After Scale assessment in Step 2 and before any downstream handoff (ywc-spec-writer, ywc-task-generator, ywc-code-gen, executor), invoke ywc-confidence-gate with the chosen approach as input. The gate's PROCEED / REVIEW / STOP band determines whether the plan is ready for handoff; a REVIEW band surfaces alternatives to the user, a STOP band routes back here for additional investigation before re-attempting handoff. The 5-dimension score becomes part of the plan's completion summary so downstream skills inherit a comparable confidence number.
Prerequisite: If docs/ubiquitous-language.md exists, read it before asking any questions. The vocabulary defined there must frame the clarification dialogue itself — use canonical terms in your questions and note any "Synonyms to Avoid" so the user's answers are captured in the right terms from the start.
Ask focused questions to extract four anchors. Use one round of consolidated questions (not back-and-forth) unless the user's initial input already covers some anchors.
| Anchor | What to ask | Why it matters |
|---|---|---|
| What | "What concrete change are we making? Which user-facing behavior or system capability is added/changed/removed?" | Without a concrete What, scale cannot be assessed. |
| Why | "What problem does this solve? What signal motivated it (user request, bug, metric, compliance)?" | Why grounds priority and scope decisions during implementation. |
| Out of Scope | "What is explicitly not part of this change? What might look related but is being deferred?" | Out of Scope is the scope-creep guardrail. Always write it. |
| Done When | "How will we know it's complete? What observable outcome proves success?" | Done conditions become the Acceptance Criteria in the artifact. |
If the user's initial message already answers all four anchors, skip the questions and confirm understanding in one sentence.
If an anchor answer contradicts another anchor or the codebase evidence gathered in Step 2, STOP — name the contradiction explicitly and ask before proceeding. Do not silently reconcile it by picking one side.
--non-interactive mode: When this flag is present, do not call AskUserQuestion at any point in Step 1. If the user's initial message leaves any anchor unanswered, fill it with the following defaults automatically: Out of Scope = "nothing explicitly excluded", Done When = "all tasks merged and ywc-impl-review returns DONE". Proceed directly to Step 2 without waiting for user input.
Read targeted files to ground the plan in actual project state. Step 2 is organized into four parts: what to always read, what to read conditionally, what triggers a deeper read, and when to stop.
CLAUDE.md and AGENTS.md (or CODEX.md) at repo root — language policy, conventions, CI commandspackage.json, pyproject.toml, Makefile, go.mod etc. — actual lint/test/build commandssrc/, apps/, or equivalent) — module placement and existing patternstasks/ directory if present — phase numbering and dependency contextdocs/ywc-plans/, docs/architecture/, docs/product/ if the project uses the LLM development guide layoutdocs/ubiquitous-language.md (if it exists) — canonical domain terms and their "Synonyms to Avoid"; spec text and Out of Scope items must use canonical terms and never use synonym identifiersParent spec:, 親 spec:, Spec Reference:) — when the request is a follow-up or amendment to an existing plan, read the parent end-to-end. A follow-up that silently narrows the parent's explicit removal/scope list is a cross-document Consistency finding: in the LP column-drop follow-up, the parent said "delete markDone/markFailed" but the follow-up's removal list dropped markDone, which would have left a dangling write against the dropped column.Five triggers force a deeper read than the lists above. Each fires independently — if more than one applies, do all of them.
Explicit "follows existing X" claim. When the user's request — or your own draft of Scope / Functional Requirements / Data Model — uses phrases like "踏襲 / follows / based on / extends / 同じパターンで / similar to / mirrors / 参考に" and names a specific component, you must read that component end-to-end (not just its location, not just nearby patterns). The new spec inherits not only the pattern but every actual behavior — response headers, status codes, timeout values, parser limits, cascade rules. Capture each inherited behavior under Existing Constraints Touched with a file:line citation. This rule exists because Code Compatibility findings dominate spec-validate Critical counts — and the majority trace back to a "踏襲" claim whose author never opened the referenced file.
Implicit reference to existing types/models. The "follows X" rule fires on prose claims, but the more common failure is the implicit reference — the spec never says "follows X", it just uses an identifier or shape that already exists. Trigger a deep read whenever the spec:
tenantSlug, userEmail, orderId.short, submission.actor.user_id) — every such accessor is a claim that the property exists with the expected shapeUserCreated event", "returns a ConflictError") — the spec must either inline the shape with a file:line citation or explicitly reference the existing type, never invent a parallel shapeFor each implicit reference, grep the existing schema/types (grep -n "<identifier>" backend/prisma/schema.prisma, grep -rn "<TypeName>" backend/src/lib/) and either capture the verified shape under Existing Constraints Touched or declare the schema change explicitly. This rule exists because findings like "field absent on existing model" and "shape mismatch with existing type" arise from variable-name use, not from any prose claim of "踏襲".
Stack-primitive section about to be written. Before drafting Data Model, API Contract, or any section that touches DB / middleware / framework primitives, skim references/common-pitfalls.md. It enumerates the recurring traps spec-validate flags (global vs route-scoped middleware, @HttpCode vs documented status, error-handling discipline, etc.). The schema-side rules live in the shared ../references/schema/core.md — read core for the rules, then the one stack file matching the project (prisma.md, sql-ddl.md, drizzle.md, typeorm.md). Skimming both at Step 2 is cheaper than discovering each trap individually in validation.
Schema invariants summary needed. When the user needs the planner's compact checklist instead of full stack syntax, read references/schema-invariants.md before writing Data Model acceptance criteria.
Closure or liveness claim about code. The first three triggers fire on a positive identity claim ("this follows / uses X"). This one fires on the inverse — set-closure and liveness claims — which are just as failure-prone and far easier to assert from memory. When your draft asserts that a set is complete — "only / sole / 唯一 / the single / no other / all / exhaustive / 全て / 唯一の … 経路" — or that a symbol is dead or alive — "@deprecated / unused / 呼び出し元ゼロ / dead write / still active / 現に write" — you must run the complement grep: enumerate the entire candidate set, not just re-confirm the one instance already in hand. For "C is the only writer of column X", run grep -rn "X" <module> and classify every write site live/dead; for "method M is dead", grep M's callers repo-wide and transcribe the zero (or the non-zero hit you would otherwise have missed). Capture the enumerated set under Existing Constraints Touched. This rule exists because a forward grep that confirms one writer is silently mistaken for proof that no other writer exists — the failure mode behind both the largest Critical and a Warning in the LP column-drop plan (markDone was a second generatedHtml writer the "唯一の write 経路" claim never enumerated; markFailed was dead despite an "active" claim).
Two disciplines when transcribing the enumerated set:
file:line. Never fold one file's line numbers under another file's header — mixing lp.service.ts lines into an lp.repository.ts proof is itself a Consistency finding the reviewer will flag.composeHtml refactor and introduced a build break the narrower plan never risked.Stop investigating once you can confidently (a) pick a scale using Step 3's rubric, (b) name concrete files in the plan or spec, and (c) state the project's actual lint/test/build commands. Going beyond this is gstack-investigate's job — defer to that skill if the user explicitly wants deep investigation.
Pick exactly one scale using the rubric below. Default to Medium when ambiguous.
| Scale | Criteria (any one matches) | Path |
|---|---|---|
| Small | All of: ≤3 files changed, ≤300 LOC, single concern, no DB migration, no new library, no cross-module impact | Direct execution plan (plan.md) |
| Medium | 4–15 expected tasks, OR DB migration involved, OR new library introduction, OR touches 2–3 modules | Spec document → ywc-spec-validate → ywc-task-generator |
| Large | 15+ expected tasks, OR cross-cutting refactor, OR new feature with multiple phases | Spec document → split suggestion to user → ywc-spec-validate → ywc-task-generator |
Hard-disqualifiers from Small (any of these forces Medium minimum):
For the full scale-assessment heuristics including borderline-case examples, see references/scale-assessment.md.
Run this gate only when both conditions hold:
docs/architecture/ / project convention cannot resolve on its own (examples: monolith vs split, sync vs async boundary, ORM vs raw SQL, domain boundary placement, abstraction-vs-duplication trade-off for a soon-to-be-replicated pattern)If both conditions fail, skip to Step 4 directly. The gate exists to head off the failure mode where a Medium/Large plan locks in a structural choice that subsequent implementation cannot walk back without a re-plan.
Procedure:
tools/claude-code/agents/ is installed, dispatch Task(subagent_type: ywc-architect) with the bounded payload. When the runtime does not support named agents, dispatch a model: opus subagent with the same payload and the canonical persona prompt copied from tools/claude-code/agents/ywc-architect.md Mission section.docs/ywc-plans/<plan-slug>/architecture-verdict.md (or alongside the spec when the spec path is provided). The file captures: the framed decision, the trade-off table the advisor returned, the chosen direction, and the file / type / structural shape recommendation. Subsequent steps cite this file rather than re-litigating the decision.DONE_WITH_CONCERNS → cite the concerns explicitly in the spec's Constraints section so reviewers see the caveatNEEDS_CONTEXT → run the additional Read / Grep the advisor names, then re-dispatch with the enriched payloadBLOCKED → surface to the user with the advisor's blocker summary; do not proceed to Step 4 until the prerequisite is resolvedBudget: at most 1 ywc-architect dispatch per ywc-plan invocation. If a second architectural decision surfaces, defer it to ywc-confidence-gate STOP-band routing or to a follow-up plan rather than burning another Opus call inside the same plan run.
Skip the gate entirely (with a one-line note in the plan / spec) when the architectural choice is unambiguous from the spec or already adjudicated by a prior architecture-verdict.md in the same project.
When scale is Small, generate plan.md at a user-specified path (default: ./plan.md). If --output <path> is provided, write to that path instead of the default.
For the full plan.md structure and a worked example, see references/small-plan-template.md.
The plan must include: Goal, Out of Scope, Files to touch (concrete paths), Implementation Steps (checkbox list with file/function references), Verification commands (using project's actual commands from Step 2), and Risks/Rollback.
After writing the plan, surface this handoff message to the user:
"Plan ready at
<path>. To execute, you can:
- Implement directly in this session, or
- Run
/ywc-code-genwith the plan as context, or- Hand off to
/ywc-sequential-executorif you prefer Branch + PR isolation."
When scale is Medium or Large, generate a spec document under docs/ywc-plans/<feature-slug>.md (or the project's equivalent — derive from Step 2 investigation). If --output <path> is provided, write to that path instead of the derived slug path.
For the full spec structure aligned with ywc-spec-validate's evaluation dimensions, see references/spec-template.md.
The spec must include: Purpose, Scope, Out of Scope, Acceptance Criteria, Functional Requirements, Non-Functional Requirements (when applicable), Data Model / API Contract (when applicable), Edge Cases, and Open Questions (use N/A — none identified if none).
When the spec names module boundaries, key types, and interfaces, ground those design choices in the shared readable-code rubric — especially §G (structural smells) and its anti-dogma guardrails (do not specify speculative generality or premature abstraction the requirement does not yet need). See ../references/readable-code.md.
For Large scale, also surface this advisory before writing the spec:
"This change is Large (15+ expected tasks). Consider splitting into multiple smaller specs by feature boundary. Splitting now is cheaper than splitting after
ywc-task-generatorproduces 20+ task directories. Proceed with single spec, or split first?"
Activated when --update-spec <path> and --failure-context <text> are both provided. This mode is mutually exclusive with normal spec generation (Steps 4a and 4b).
Behavior:
<path>. If the file does not exist, report an error and stop — do not create a new file.## Iteration N Amendments sections in the file. The new section number is N + 1 (starting at 1 if none exist).--failure-context as the input (the "Fix Priority" section text from ywc-impl-review), draft amendment content that addresses only the failing areas.## Iteration N Amendments to the end of the existing spec file. Do NOT create a new file, do NOT rewrite any completed section's body above the new section.
4.5. Mark superseded originals (the one permitted in-place edit). When the amendment scopes out or changes an instruction that an original section still states literally — e.g., an original migration SQL block that drops a column the amendment now defers — prepend a single inline marker line at the head of that original section: > ⚠️ SUPERSEDED by Iteration N — see §<amendment-anchor>. Do not edit the section's body, only prepend the marker. Then ensure a top-of-file Operative Sections pointer names which sections ywc-task-generator should treat as authoritative. This removes the precedence-only resolution that otherwise leaves a copy-faithful implementer acting on the superseded original — the exact residual Warning in the LP column-drop re-validation, where the original §1 SQL still dropped errorMessage after the amendment deferred it.--failure-context), the amended approach, and updated Acceptance Criteria for the affected items only.ywc-spec-validate pass and forces yet another iteration. Re-running 4b.5 here is what makes Re-plan Mode actually converge.Constraints:
> ⚠️ SUPERSEDED ... marker permitted by Behavior step 4.5, which prepends (never rewrites the body of) a contradicted original section.<path>.--output is ignored in Re-plan Mode (output path is always the --update-spec path).Before printing the handoff message in Step 5, run this mechanical check on the spec you just wrote. Step 5's Validation list checks structural items (sections exist, anchors answered); Step 4b.5 catches the semantic drift the author introduces between sections — which is what dominates ywc-spec-validate Critical findings.
The check is organized into three passes, each catching a different class of drift. Run all three. For each row, scan the spec end-to-end and answer with a concrete pointer (section heading or file:line). If the answer is "I'm not sure" or "probably yes", edit the spec until the answer becomes "yes, see " before printing the handoff.
Examples below are tagged (past session, this codebase) — they are real failures observed during the LP form / publish spec work that motivated this skill, included because concrete examples teach better than abstract rules. The Rule column is the universal principle and applies to any feature family.
Catches drift between AC / FR / API Contract / Data Model of the same spec.
| Rule | Example failure (past session, this codebase) |
|---|---|
| Every Acceptance Criterion maps to ≥1 Functional Requirement; every Functional Requirement is motivated by ≥1 AC | Orphan ACs (tests for unspecified behavior); orphan FRs (unmotivated work) |
| Every HTTP status code mentioned anywhere (AC, FR, Edge Case, NFR) also appears in the API Contract — and the API Contract has no orphan codes | AC3 says 202, AC6 says 200, controller enforces @HttpCode(202) → silent contradiction |
| Every field name in API Contract request/response is either declared in Data Model or explicitly marked as "derived from X" / "server-side snapshot from Y" | consentText appears in DB columns but is missing from the request body — reviewer cannot tell whether the field is client-supplied (spoofable PII) or server-snapshotted |
Every Acceptance Criterion is in the form When <trigger>, system does <behavior>, observable as <concrete check> — not a bare behavior name | "e2e: form submission の golden path" is a section name; becomes an AC only when it specifies request shape → expected status → DB row state |
| Every new state value (enum value, status flag, lifecycle column) declared in Data Model has ≥1 Functional Requirement writing it, and Edge Cases enumerate every state combination it introduces (A→B→A, delete-then-recreate, partial-then-resume) | LandingPage.status='PUBLISHED' added to the enum without a transaction writing it; unpublish → delete LpFormConfig → republish is a 3-step path the spec never enumerates |
Every grep-based Acceptance Criterion matches the code's actual call shape — a single-line regex like update\([^)]*field does not match a multi-line .update({ … field … }), so use a broad identifier grep or pair the narrow regex with one | AC1's single-line landingPage\.update\([^)]*generatedHtml could not match markDone's multi-line .update({ … }) — the verification command shared the exact blind spot that let the Critical through, so the AC would have falsely passed |
Catches the failure mode where the spec asserts something about the world that turns out to be false at implementation time.
| Rule | Example failure (past session, this codebase) |
|---|---|
Every "踏襲 / follows / based on / extends X" claim carries a file:line citation, and the cited code's actual behavior is transcribed into Existing Constraints Touched | "LpFormCorsInterceptor follows BeaconSiteCorsInterceptor" — the cited interceptor unconditionally sets Allow-Credentials: true, contradicting AC1 |
| Every "no change to existing X" / "§Y そのまま採用" claim is verified — replace with "based on X, with diffs: A, B, C" the moment any diff exists | Data Model header says "§5 そのまま" while silently changing isActive default and adding consentText columns |
| Every Edge Case threshold (size, time, rate) is verified against the actual enforcing code, not assumed | "body > 32kb → 413" sounds observable; main.ts actually enforces 6mb globally — the spec is a wish, not an assertion, until the limit is path-scoped |
| Every function signature, shared type, prerequisite, or shared constant that crosses a sibling spec in the same feature family appears identically in both — or one spec explicitly declares "owned by spec X, referenced here" with the canonical signature inlined | injectBeaconMarkers(html, formKey) is untyped 2-arg in form spec but (html: string, formKey: string | null): string in publish spec; publish spec depends on LpFormConfig from form spec without naming the prerequisite in Dependencies |
| Every closure claim ("only / sole / 唯一 / no other / all / exhaustive") and every liveness claim ("dead / @deprecated / 呼び出し元ゼロ / still active") carries the complement-grep result enumerating the full candidate set — not a single confirming instance (Step 2 trigger #4 produced this; Pass B confirms it landed in the spec) | "injectAndSaveGtmSnippet is the 唯一の write 経路" — markDone (:404) also wrote the column → Critical; "errorMessage is active because markFailed writes it" — markFailed had zero callers → Warning |
| Every removal / scope item in a referenced parent spec is either carried into this follow-up or explicitly deferred with a stated reason — a follow-up never silently narrows the parent's declared scope | Parent plan §3 said "delete markDone/markFailed"; the follow-up's removal list dropped markDone, so the dropped column would still be referenced by a live build target |
Catches Data Model omissions that make the migration fail at prisma generate, the first delete attempt, or the first concurrent insert. The two highest-frequency Criticals are inline; the full ruleset (NOT NULL backfill, FK index, composite uniqueness, multi-tenant scope, enum domain, timestamptz) is in the shared ../references/schema/core.md Part B, with stack-specific syntax in the matching ../references/schema/<stack>.md.
| Rule | Example failure (past session, this codebase) |
|---|---|
Every new DB @relation has the reverse-relation field declared on the other model in this spec (even if the other model already exists in schema.prisma) | @relation on LpFormSubmission pointing at LandingPage without adding lpFormSubmissions LpFormSubmission[] on LandingPage → prisma generate fails |
Every onDelete rule (Restrict / Cascade / SetNull / NoAction) has its API consequence specified in the API Contract (typically 409 Conflict for Restrict, a destructive-side-effect note for Cascade) | onDelete: Restrict on submissions, but DELETE /api/lp-forms/:id lacks 409 Conflict and the operator UX for "delete submissions first" |
For the full Data Model self-check, run the ../references/schema/core.md Part C checklist.
This step is mandatory for the Medium/Large path (Step 4b), for the appended amendment in Re-plan Mode (Step 4c), and for any in-place append of implementation detail to an existing plan or spec — including a free-form 追補 / follow-up block added via Edit rather than through --update-spec. The append path is the one that silently skips this pass: it is neither a fresh Step 4b generation nor a formal Step 4c invocation, so the failure that motivated these rules (a follow-up 追補 whose "唯一の write 経路" closure claim was never complement-grepped) lands exactly there. Run at minimum Pass B and Pass C on any such append, and Pass A as well when the append introduces or changes an Acceptance Criterion. For the Small path (Step 4a), Step 5's structural checks suffice — Small plans rarely span enough sections for cross-section drift.
If any pass surfaces ≥1 issue, fix and re-run that pass. The loop terminates only when every row answers "yes, see ". This investment is what prevents ywc-spec-validate from returning DONE_WITH_CONCERNS and forcing a Re-plan iteration — the cost is paid once here instead of being amplified across the spec-validate fan-out and the re-plan amendment.
Always end with an explicit handoff instruction matching the path taken.
Small path handoff:
✅ Plan ready: <path>
Next: implement directly, or run /ywc-code-gen, or /ywc-sequential-executor
Medium/Large path handoff:
✅ Spec drafted: <path>
Next:
1. /ywc-spec-validate --spec <path>
2. (after review passes) /ywc-task-generator <path>
3. (after tasks generated) /ywc-sequential-executor or /ywc-parallel-executor
Never proceed past the handoff. The user decides which downstream skill runs next — this skill is the planner, not the executor.
Two possible artifacts. Both are markdown files at user-specified paths. The handoff message is plain text printed to the conversation.
| Path | Artifact | When |
|---|---|---|
./plan.md (or user-specified) | Small-path execution plan | Scale = Small |
docs/ywc-plans/<slug>.md (or project equivalent) | Medium/Large-path spec | Scale = Medium or Large |
For the exact templates, see references/small-plan-template.md and references/spec-template.md.
Before declaring the skill's task complete, verify:
CLAUDE.md (or equivalent) and the project's build/test command sourcefile:linefile:line citations for every inherited behavior> ⚠️ SUPERSEDED ... marker plus a top-of-file Operative Sections pointer was added<placeholder> slugs)N/A — none identified if truly none)(Procedural failure modes specific to this skill. Behavioral / rationalization failures are in the Rationalization Defense table above — do not duplicate here.)
ywc-plan assumes the technology choice is settled or out of scope for this request. If the user is asking what library to use or what architecture to adopt, route to ywc-tech-research first, then return to ywc-plan after.ywc-tech-research (when technology choice is unsettled before planning)ywc-code-gen, ywc-sequential-executorywc-spec-validate → ywc-task-generator → ywc-sequential-executor / ywc-parallel-executorywc-product-review (run before ywc-plan when business framing is unclear), ywc-project-docs (run after if docs/ set is missing)npx claudepluginhub yongwoon/ywc-agent-toolkitGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.