--- name: product-planner description: "Plans out a product, product feature, or set of related features and produces a rich HTML planning document. Use when the user wants to plan a new feature, explore implementation options, design a product flow, or create a visual spec before generating phase plans. Output is a self-contained HTML file saved to docs/ and presented as a viewable artifact. The HTML includes: overview, data flow diagram, options considered, UI mockups, technical decisions, and open questions. Feeds design-planner when the plan has UI, then phase-planner for phase plan generation. Trigger phrases: 'plan this feature', 'help me think through', 'create a product plan', 'plan out', 'I want to build', 'design the flow for', 'what are my options for', 'spec this out'." --- # Product Planner Produces a rich, self-contained **HTML planning document** from a product or feature description. This document serves as the primary reference for implementation agents. When it has UI Mockups it feeds `design-planner` first, then `phase-planner` for phase plan generation; with no UI surface it goes straight to `phase-planner`. The output is NOT markdown. It is a single navigable HTML file with visual sections, SVG diagrams, and mockups — something you'll actually open and read. The file in `docs/` is the plan. In a session that can publish artifacts, the same file is also published as a hosted page with a shareable link (Step 4). That page is a copy for reading and sharing; nothing downstream reads it. --- ## Step 1 — Gather Context Before writing anything, get the information needed to produce a useful plan. Two paths: ### Path A — User has an existing plan doc If the user pastes a plan or references an existing file (e.g. `docs/BuildPlan.md` or similar), read it. Extract: - Feature/product name and one-line description - Key goals and success criteria - Any architecture, stack, or constraints already decided - Any data flow or sequence already described - Open questions still unresolved Use the existing doc as the **source of truth** — don't re-interview on things already answered. Only ask for what's genuinely missing. ### Path B — Starting from scratch Ask the user the following (combine into one message, not one question at a time): ``` To build the plan, I need a few things: 1. **What are we building?** — feature name and one-line description 2. **What problem does it solve?** — user need or workflow it replaces 3. **Scope** — single feature, multiple related features, or full product? 4. **Stack constraints** — existing tech stack or greenfield? 5. **Any options already on the table?** — approaches you're considering or have ruled out 6. **Anything already decided?** — architectural choices, APIs, data models locked in 7. **What's the biggest unknown?** — what you most need this plan to help figure out ``` Don't proceed to Step 2 until you have enough to write a substantive plan. If the user gives a one-liner, probe for the minimum viable context before writing. --- ## Step 2 — Read Project Context Before writing the plan, read the project's existing codebase context to ground the plan in reality: 1. Read `CLAUDE.md` in the project folder (if present) for stack and conventions 2. Scan `docs/` for any existing phase plans, architecture docs, or prior specs 3. If the project has a repo, do a quick scan of key structural files (e.g. the stack manifest, schema files, main route files) to understand the current state 4. Note what already exists vs. what's net-new This context informs the data flow diagram, option feasibility, and technical decision sections. --- ## Step 3 — Generate the HTML Plan Write a single self-contained HTML file, starting from the HTML in [template.md](template.md) in this skill's folder. Follow the structure below precisely. All CSS and JS stay inline; the only outside request is the template's Google Fonts link, and the page must read correctly without it. The file must open correctly in a browser with no server. ### File naming ``` docs/Plan-{FeatureName}-{YYYY-MM-DD}.html ``` e.g. `docs/Plan-NotificationsRework-2026-05-22.html` Save to the project's `docs/` folder (the top-level coordination folder, NOT inside the app subfolder). ### Required HTML structure The document has a **top bar**, a **left sidebar** of numbered section links, and **anchor-linked sections** in one column. All sections are visible on the page — no tabs. The template's only script marks the sidebar link for the section in view. #### Mandatory sections (in order): **1. Header** - Top bar: the feature name, then "Product plan" and the status badge (Draft / In Review / Approved) at the right - Page header: the feature name (large), the one-line description, and the date - Nothing else in the header: no project line, no author, no "Product plan" eyebrow above the name **2. Overview** - What we're building (2–4 sentences) - Why we're building it — user need or problem being solved - What success looks like — measurable outcomes or acceptance criteria - Scope: what's in, what's explicitly out **3. Data Flow** - SVG diagram showing system components, data movement, and key decision points - Label every node and arrow clearly - Use color to distinguish, with the template's node classes: user actions (gold, `n-user`), system components (gray, `n-sys`), external APIs (cyan, `n-ext`), data stores (green, `n-store`), and the matching legend - Include a brief narrative below the diagram explaining the flow in plain English **4. Options Considered** - For each approach considered (minimum 2, maximum 5): - Option name + one-line description - For (green-bulleted list) - Against (red-bulleted list) - Verdict: Selected / Rejected / Deferred (with reason). Selected gets the green badge and green edge; Rejected and Deferred get quiet grey tags - If only one option was considered, say so and explain why no alternatives were evaluated **5. UI Mockups** *(omit only if purely backend/infra with zero UI surface)* - HTML wireframes — structural layout, not visual polish — drawn with the **wireframe kit** (below), never the plan's own design - Label every interactive element (buttons, inputs, dropdowns) with a blue `note` - Include at minimum: the primary user-facing screen and any key state changes (empty state, loading, error, success) - Use simple bordered boxes and placeholder text — this is a wireframe, not a design **6. Technical Decisions** - Locked-in architectural and implementation choices - Format each as: - **Decision:** What was decided - **Rationale:** Why - **Constraints:** What this rules out going forward - Include only genuinely decided things — not aspirations **7. Open Questions / Risks** - Unresolved decisions that will affect implementation - Format each as: - **Question:** What needs to be answered - **Impact:** What depends on this answer - **Owner:** Who needs to answer it (user, external team, research) - Include real risks (technical, scope, dependency) with likelihood and impact notes **8. Implementation Handoff** - **The next step**, which depends on section 5: - **The plan has UI Mockups:** the next step is the design pass. The wireframes here fix layout and flow only; design-planner locks the visual system and the screen specs that phase-planner and phase-builder build from. Say so in one line, then give a "Run Design Pass" prompt the user can copy-paste to design-planner: ``` Use this plan as input: [path to this HTML file] Run the design pass for [feature name]. ``` - **UI Mockups omitted (no UI surface):** say so in one line ("No UI surface, so no design pass is needed.") and go straight to the phase-planner prompt below - A crisp summary for phase-planner: what this plan produces, what the first sprint should accomplish, key constraints the implementation agent needs to know - Suggested phase structure (rough, non-binding): e.g. "Phase 1: API integration → Phase 2: UI → Phase 3: Polish" - A "Generate Phase Plan" prompt the user can copy-paste to phase-planner. When the plan has UI Mockups, label it as the step after the design pass: ``` Use this plan as input: [path to this HTML file] Generate a phase plan for [feature name]. Stack: [stack]. First phase goal: [first phase goal]. ``` The path is always the file in `docs/`, never an artifact link. ### HTML design guidelines The plan's look is fixed by [template.md](template.md): it matches phase-viewer, so a plan and the build dashboard read as one tool. Copy the template's `
`, `