$npx -y skills add tobihagemann/turbo --skill draft-planProduce an implementation plan at .turbo/plans/<slug>.md. Use when the user asks to \"draft a plan\", \"draft the plan\", \"write an implementation plan\", \"plan this change\", \"create an implementation plan\", or needs a first-draft plan file before refinement.
| 1 | # Draft Plan |
| 2 | |
| 3 | Produce an implementation plan at `.turbo/plans/<slug>.md`. Capture the task, survey patterns, escalate decisions, discuss, and draft. |
| 4 | |
| 5 | ## Task Tracking |
| 6 | |
| 7 | Use `TaskCreate` to create a task for each step: |
| 8 | |
| 9 | 1. Capture the task and pick a slug |
| 10 | 2. Run `/survey-patterns` skill |
| 11 | 3. Consult task-specific skills and docs |
| 12 | 4. Escalate product decisions |
| 13 | 5. Deep-dive discussion |
| 14 | 6. Draft and write the plan file |
| 15 | 7. Present summary and finalize |
| 16 | |
| 17 | ## Step 1: Capture the Task and Pick a Slug |
| 18 | |
| 19 | Absorb the user's request without interrupting. Restate the goal in one or two sentences and confirm. |
| 20 | |
| 21 | Generate a slug for the plan file from the task title: |
| 22 | |
| 23 | - Lowercase |
| 24 | - Replace non-alphanumeric characters with hyphens |
| 25 | - Collapse consecutive hyphens |
| 26 | - Trim leading and trailing hyphens |
| 27 | - Truncate to 40 characters at a word boundary |
| 28 | |
| 29 | Example: "Add a caching layer to the image pipeline" → `add-a-caching-layer-to-the-image-pipeline`. |
| 30 | |
| 31 | If `.turbo/plans/<slug>.md` already exists, append `-2`, `-3`, etc. until the path is free. Do not overwrite. |
| 32 | |
| 33 | The user may pass an explicit slug or path in their request (e.g., "draft plan as `auth-rewrite`"). If so, honor it. If `.turbo/plans/<slug>.md` exists in that case, use `AskUserQuestion` to ask whether to overwrite, append a numeric suffix, or pick a different slug. |
| 34 | |
| 35 | State the chosen slug and the resulting plan path before continuing. |
| 36 | |
| 37 | ### Spec-Derived Input |
| 38 | |
| 39 | If the task references an existing spec at `.turbo/specs/<slug>.md` (when a spec path is passed as input), treat the spec as the source of truth for product decisions and discussion areas. Read the spec, then: |
| 40 | |
| 41 | - In Step 4, skip escalation for any product decision the spec resolves. Only escalate questions the spec did not answer. |
| 42 | - In Step 5, skip deep-dive areas the spec covers. Only discuss areas the spec did not address. |
| 43 | - Forward the spec's slug as the plan slug so the plan and spec share a slug. If `.turbo/plans/<spec-slug>.md` already exists, do not auto-suffix (that would break the shared-slug invariant). Use `AskUserQuestion` to ask whether to overwrite or pick a different slug, mirroring Step 1's explicit-slug collision handling. |
| 44 | |
| 45 | A question is resolved by the spec only when the spec makes a definitive statement that answers it. Mentions without a chosen direction, open questions in the spec, and deferred decisions do not count as resolved; escalate those normally. |
| 46 | |
| 47 | Step 2 (pattern survey) and Step 3 (consult skills and docs) still run in full. The spec describes what; `/draft-plan` still surveys how. |
| 48 | |
| 49 | ## Step 2: Run `/survey-patterns` Skill |
| 50 | |
| 51 | Run the `/survey-patterns` skill with the confirmed task description. Keep the returned findings in conversation context for use in Steps 5 and 6. |
| 52 | |
| 53 | ## Step 3: Consult Task-Specific Skills and Docs |
| 54 | |
| 55 | Ground library and framework choices in current reality before escalating decisions. |
| 56 | |
| 57 | 1. **Scan for matching skills.** Compare the task description against available skill trigger descriptions. For each unambiguous match, run the skill via the Skill tool. This loads decision-level guidance (idiomatic patterns, known pitfalls, version constraints) before product decisions are made. If unsure, do not load. |
| 58 | 2. **Look up library docs.** For libraries or frameworks the task clearly depends on, query documentation MCP tools (or WebSearch as a fallback) when the decision hinges on current library state such as whether a feature exists, which versions support it, or whether an API has been deprecated. |
| 59 | |
| 60 | Keep findings at the decision level: what a library can do, which approach is idiomatic, which version to target. Do not embed specific API signatures or code snippets into the plan. Those belong at execution time, where the same skills are re-loaded. |
| 61 | |
| 62 | ## Step 4: Escalate Product Decisions |
| 63 | |
| 64 | Identify product or design decisions the user's request did not resolve. Escalate these via `AskUserQuestion` before drafting steps. |
| 65 | |
| 66 | **Escalate when:** |
| 67 | |
| 68 | - A plan step requires choosing between user-facing behaviors the request did not specify (opt-in vs opt-out, strict vs lenient, sync vs async) |
| 69 | - The plan assumes product requirements that were not stated |
| 70 | - Design trade-offs affect UX or product direction rather than technical implementation |
| 71 | - Multiple valid approaches exist and the choice is a matter of product preference, not technical merit |
| 72 | - The plan would introduce a pattern not yet established in this codebase, or follow one sourced from outside it |
| 73 | |
| 74 | **Do not escalate** technical decisions the agent can make autonomously: which data structure, which existing pattern to follow, internal implementation approach. The boundary is product intent. |
| 75 | |
| 76 | Present each decision as a concise trade-off with options. Mark |