draft-plan
The draft-plan skill generates a structured implementation plan document at `.turbo/plans/<slug>.md` by capturing the user's task, surveying codebase patterns, consulting relevant documentation and skills, escalating product decisions, and producing a written plan file. Use it when asked to draft a plan, write an implementation plan, plan a change, or create a first-draft plan document that requires subsequent refinement.
git clone --depth 1 https://github.com/tobihagemann/turbo /tmp/draft-plan && cp -r /tmp/draft-plan/claude/skills/draft-plan ~/.claude/skills/draft-planSKILL.md
# Draft Plan Produce an implementation plan at `.turbo/plans/<slug>.md`. Capture the task, survey patterns, escalate decisions, discuss, and draft. ## Task Tracking Use `TaskCreate` to create a task for each step: 1. Capture the task and pick a slug 2. Run `/survey-patterns` skill 3. Consult task-specific skills and docs 4. Escalate product decisions 5. Deep-dive discussion 6. Draft and write the plan file 7. Present summary and finalize ## Step 1: Capture the Task and Pick a Slug Absorb the user's request without interrupting. Restate the goal in one or two sentences and confirm. Generate a slug for the plan file from the task title: - Lowercase - Replace non-alphanumeric characters with hyphens - Collapse consecutive hyphens - Trim leading and trailing hyphens - Truncate to 40 characters at a word boundary Example: "Add a caching layer to the image pipeline" → `add-a-caching-layer-to-the-image-pipeline`. If `.turbo/plans/<slug>.md` already exists, append `-2`, `-3`, etc. until the path is free. Do not overwrite. 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. State the chosen slug and the resulting plan path before continuing. ### Spec-Derived Input 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: - In Step 4, skip escalation for any product decision the spec resolves. Only escalate questions the spec did not answer. - In Step 5, skip deep-dive areas the spec covers. Only discuss areas the spec did not address. - 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. 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. Step 2 (pattern survey) and Step 3 (consult skills and docs) still run in full. The spec describes what; `/draft-plan` still surveys how. ## Step 2: Run `/survey-patterns` Skill Run the `/survey-patterns` skill with the confirmed task description. Keep the returned findings in conversation context for use in Steps 5 and 6. ## Step 3: Consult Task-Specific Skills and Docs Ground library and framework choices in current reality before escalating decisions. 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. 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. 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. ## Step 4: Escalate Product Decisions Identify product or design decisions the user's request did not resolve. Escalate these via `AskUserQuestion` before drafting steps. **Escalate when:** - 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) - The plan assumes product requirements that were not stated - Design trade-offs affect UX or product direction rather than technical implementation - Multiple valid approaches exist and the choice is a matter of product preference, not technical merit - The plan would introduce a pattern not yet established in this codebase, or follow one sourced from outside it **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. Present each decision as a concise trade-off with options. Mark the strongest option "(Recommended)" and place it first. Draft plan steps that depend on these decisions only after the user responds. ## Step 5: Deep-Dive Discussion Interview the user relentlessly about every aspect of the implementation shape until you reach shared understanding. Use `AskUserQuestion`, one question at a time. Use the pattern survey findings to frame choices. Cover whichever of these matter for the task. Do not present a rigid checklist: | Area | What to explore | |---|---| | **Reuse vs new** | Which survey findings should the new work build on? Which should it deliberately not follow, and why? | | **File placement** | Where do new files live? Which existing files are modified? | | **Data flow** | How does data move through the change? Any new boundaries or contracts? | | **Edge cases** | Partial failure, empty states, backward compatibility, concurrency | | **Tests** | Which existing test patterns apply? Where do new tests live? | | **Scope cut** | Anything to explicitly defer? | ### Discussion Guidelines - If a question can be answered by exploring the codebase, explore the codebase instead. - Make recommendations with reasoning, not just questions. Be a collaborator, not an interviewer. - Walk down each branch of the design tree, resolving dependencies betwe
For each reviewer question on a PR, recall implementation reasoning and compose a raw answer. Use when the user asks to \"answer reviewer questions\", \"draft answers to PR questions\", or \"explain reviewer questions\".
Apply findings by making the suggested code changes. Applies accepted verdicts, escalates ambiguous findings to the user, and offers to note genuine improvements for later. Use when the user asks to \"apply findings\", \"apply fixes\", \"apply suggestions\", \"apply accepted findings\", \"fix the findings\", or \"apply the review results\".
Project-wide health audit pipeline that fans out to all analysis skills in parallel, evaluates findings, and produces a unified report at .turbo/audit.md. Use when the user asks to \"audit the project\", \"run a full audit\", \"project health check\", \"audit my code\", \"codebase audit\", or \"comprehensive review\".
Shared changelog conventions and formatting rules referenced by $create-changelog and $update-changelog. Not typically invoked directly.
Enforce mirror, reuse, and symmetry principles to keep new code consistent with surrounding code. Use when writing new code in an existing codebase, adding new features, refactoring, or making any code changes.
Run autonomous task execution using the codex CLI. Use when the user asks to \"codex exec\", \"run codex exec\", \"execute a task with codex\", or \"delegate to codex\".
Run AI-powered code review using the codex CLI. Use when the user asks to \"codex review\", \"run codex review\", or \"review a commit with codex\".
Shared commit message rules and technical constraints referenced by $stage-commit and $commit-staged. Not typically invoked directly.