--- name: ds-plan description: Generate phased implementation plans for design system components with adaptive scope, design decisions, and risk assessment --- # `/ds-plan` — Design System Component Planning Skill Generate structured, phased implementation plans for design system components. The skill interviews you about component scope, detects the architecture type, proposes design decisions grounded in your design system patterns, surfaces conflicts with evidence-based suggestions, and creates a ready-to-implement plan. Use /grill-with-docs to interview the user to have a complete understanding of the component requirements. ## Quick Start ```bash /ds-plan Create a new navbar component with mobile menu /ds-plan Add a size variant to the button component /ds-plan Build a card component with slots for header, content, and footer ``` ## Behavior Overview 1. **Parse user input** — Extract component name, purpose, and initial context 2. **Adaptive interview** — Ask critical questions (purpose, API, scope) then contextual ones (responsive, accessibility, SEO) 3. **Auto-detect type** — Determine if web-component-only, CSS-only, or hybrid based on context 4. **Propose decisions** — Ground design decisions in ARCHITECTURE.md, CONTEXT.md, STYLE_GUIDE.md patterns 5. **Surface conflicts** — Identify trade-offs (AA + Shadow DOM, SEO + encapsulation) with recommendations 6. **Generate plan** — Adaptive phases, sections, and task granularity 7. **Review + save** — Output to console, get user approval, write to `docs/plan/NNN-kebab-case.md` ## Interview Stages ### Stage 1: Parse & Clarify Extract component name, purpose, and scope (new/update). ### Stage 2: Critical Core (Always) Ask: API, Slots & Parts, Dependencies, Out-of-scope. ### Stage 3: Contextual (If Relevant) Ask about: Responsive behavior, Accessibility, SEO crawling, Browser support (only if relevant to component type). ### Stage 4: Auto-Detect & Propose - Detect component type (web-component, CSS-only, hybrid) - Propose design decisions from design system patterns - Surface conflicts with evidence-based suggestions - Recommend ADRs for hard-to-reverse decisions ### Stage 5: Generate Plan - Determine phase count (4–10+ based on complexity) - Select relevant sections (adapt to component type) - Define phases with adaptive task granularity - Include concrete acceptance criteria - Reference downstream skills ### Stage 6: Review & Approve - Output full plan to console - Ask for approval with suggested filename - Allow refinement iterations - On approval: auto-write to `docs/plan/NNN-kebab-case.md` ## Key Principles ### Mobile-First Styling Always propose mobile-first SCSS per STYLE_GUIDE.md. Define base styles for 320px+, use `@include media()` for enhancements, never hardcode breakpoints. ### Light DOM for Content Place critical content in light DOM (slots), Shadow DOM for layout/styling only. Enables both AA compliance and SEO crawling. ### Design Tokens Only All colors, spacing, typography use `--ds-*` tokens from `packages/tokens`. Never hardcode values. ### Semantic HTML Use native elements: `