[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JK46GDF7Y17ZV0MKHEX94X":3,"skill-same:01M6JK46GDF7Y17ZV0MKHEX94X":150},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":64,"commitSha":65,"skillDirectory":66,"forksCount":67,"repositoryHtmlUrl":68,"repositoryHomepageUrl":6,"ownerHtmlUrl":69,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":70,"install":71,"resources":83},"01M6JK46GDF7Y17ZV0MKHEX94X","cook-pizzas",null,"Cook the pre-made pies before the shop opens, transforming a PRD into an ordered roadmap of vertical-slice features, grouped into Pies of usually 3 to 8 slices (a small app gets few pies, of 1 or 2 slices when that is all it holds; the 20 to 30 feature-slice band is a ceiling, never a target). Each Pie is a coherent chapter that bakes autonomously; each Slice is one vertical deliverable. Adds `--repie` to convert a flat v4 checklist into Pies on explicit opt-in.","steve-piece\u002Fbytheslice","steve-piece","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F190656564?v=4","01M6JK3M1VYSHFKN1PW540DV5H","Steven Light","01M6JK3MDHEWS5WHC4H0RNKTD9",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"cook","cook pizzas","feature","opt","when","slice","features","break","prep","true","re","make","app","development","coherent","checklist","decompose","roadmap","never","shop","convert","plan","create","2026-11-10 10:12:30",false,"---\nname: cook-pizzas\ndescription: \"Cook the pre-made pies before the shop opens, transforming a PRD into an ordered roadmap of vertical-slice features, grouped into Pies of usually 3 to 8 slices (a small app gets few pies, of 1 or 2 slices when that is all it holds; the 20 to 30 feature-slice band is a ceiling, never a target). Each Pie is a coherent chapter that bakes autonomously; each Slice is one vertical deliverable. Adds `--repie` to convert a flat v4 checklist into Pies on explicit opt-in.\"\nuser-invocable: true\ntriggers: [\"\u002Fbytheslice:cook-pizzas\", \"\u002Fcook-pizzas\", \"cook the pizzas\", \"make the pies\", \"prep the pies\", \"\u002Fbytheslice:plan-phases\", \"\u002Fplan-phases\", \"plan phases\", \"break into phases\", \"phased plan\", \"create a development plan\", \"decompose the prd\", \"repie\", \"re-pie\", \"convert flat checklist to pies\"]\n---\n\n\u003C!-- skills\u002Fcook-pizzas\u002FSKILL.md -->\n\u003C!-- Pizza-shop framing: cook every pre-made pie that will sit in the display case. v5 two-level decomposition: PRD → Pies (coherent chapters of usually 3 to 8 slices; a small app's pie may hold 1 or 2) → Slices (vertical deliverables), right-sized to the PRD, never padded. Parallel slice writers run as a schema-validated Workflow; --repie converts a flat v4 checklist on explicit opt-in. -->\n\n# Cook the Pizzas: PRD to Pie\u002FSlice Roadmap\n\nTransform a finalized PRD into a complete, ordered roadmap of **Pies** (coherent chapters of usually 3 to 8 slices) and **Slices** (vertical deliverables), plus a project rules file. A pie is the unit of `\u002Fsell-pie` autonomy, the HITL checkpoint, the PR, the context-refresh, and the worktree; a slice is today's \"stage\", one vertical thing, capped at ~6 tasks \u002F ~15 files. The roadmap is right-sized to the PRD: a small brief gets few pies, a small app's pie may hold 1 or 2 slices, and the 20 to 30 feature-slice band is a ceiling for large apps, never a target (an operator-set `stages.targetFeatureStages` still overrides).\n\n## Mode detection\n\n`\u002Fcook-pizzas` runs in one of three modes. It is **always the source of the master checklist**: there is no upstream checklist for it to coordinate with; this skill produces the checklist.\n\n| Mode | Trigger | Behavior |\n|---|---|---|\n| **fresh** (default) | `\u002Fcook-pizzas` with no master checklist present | Full PRD → Pie\u002FSlice decomposition. Writes `docs\u002Fplans\u002F00_master_checklist.md` (nested `## Pie N` \u002F `### Slice N.M`, `review:` per pie) + the feature slice plan files + the project rules file. |\n| **refuse** | `\u002Fcook-pizzas` (no `--repie`) when `docs\u002Fplans\u002F00_master_checklist.md` already exists | Refuses to overwrite. Points the user at `\u002Fspecial-order` (add features mid-flight), or, if the existing checklist is flat v4, at `--repie` to convert it. Writes nothing. |\n| **repie** | `\u002Fcook-pizzas --repie` when a **flat v4** checklist exists | Explicit, opt-in conversion of a flat `## Stage N` checklist into nested `## Pie N` \u002F `### Slice N.M` (see Phase R). Never runs silently; never triggered without the `--repie` flag. |\n\n> A flat v4 checklist (`## Stage N` headings, frontmatter without `pie`\u002F`slice`\u002F`review`) stays contract-valid forever: `\u002Fsell-slice` runs on it as-is. Only `\u002Fsell-pie` refuses flat checklists, and the remedy is the explicit `--repie` conversion. Plan files are **never silently rewritten** (see [`references\u002Fstage-frontmatter-contract.md`](references\u002Fstage-frontmatter-contract.md) → \"Dual-read\").\n\n## Subagent Roster\n\nThe two-level decomposition routes structured artifacts between singular-goal subagents. Phase 3's per-slice writers run as a `Workflow` (see Phase 3); the synthesizer consumes their **structured returns**, not re-read disk.\n\n| Agent | Singular goal | Dispatched in | Returns |\n|---|---|---|---|\n| [`agents\u002Fstage-decomposer.md`](agents\u002Fstage-decomposer.md) | identify Pies, then Slices within each Pie; propose the roadmap for approval | Phase 2 (single, readonly) | proposed pie\u002Fslice tree + band compliance (no writes) |\n| [`agents\u002Frules-assembler.md`](agents\u002Frules-assembler.md) | assemble the project rules file from elicitation answers | Phase 1.5 (single) | rules-file path + layering summary |\n| [`agents\u002Fdb-schema-stage-writer.md`](agents\u002Fdb-schema-stage-writer.md) | write the canned db-schema slice (Slice 1.4) | Phase 3 Workflow (conditional, Q3 = Yes) | slice file path + structured frontmatter return |\n| [`agents\u002Fphased-plan-writer.md`](agents\u002Fphased-plan-writer.md) | write **one** feature slice plan file | Phase 3 Workflow (`parallel()`, one per feature slice) | slice file path + `pie`\u002F`slice`\u002F`type`\u002F`depends_on`\u002F`tasks_count` + frontmatter return |\n| [`agents\u002Fmaster-checklist-synthesizer.md`](agents\u002Fmaster-checklist-synthesizer.md) | aggregate the writers' structured returns into the nested master checklist | Phase 4 (single, after the Workflow barrier) | `00_master_checklist.md` path |\n\n> Foundations Pie slices 1.1 to 1.3 (design-system, CI\u002FCD, env-setup) are not written here; they are delivered by the run-once standalone skills `\u002Fset-display-case`, `\u002Ffinal-quality-check`, `\u002Fopen-the-shop`, with their slice definitions in [`references\u002Fcanned-stages\u002F`](references\u002Fcanned-stages\u002F). Only Slice 1.4 (db-schema) gets a generated plan file (`db-schema-stage-writer`). cook-pizzas dispatches no foundation *writers*; the three legacy foundation-stage writers were removed in v5.\n\n## Inputs \u002F Preconditions\n\n> **Inline preconditions.** This skill checks its own preconditions inline at the start, via tools (no existing checklist in fresh mode; git tree state; the `--repie` opt-in). If one fails, raise the problem to the operator as a question with a recommended next step, never a refusal. No ByTheSlice hook blocks a prompt or a tool call, and plan writes from this skill draw no warning (the Pass mod exempts `cook-pizzas`). The dual-read parser in `hooks\u002Flib\u002Fchecklist.sh` recognizes both `## Stage N` and `## Pie N` \u002F `### Slice N.M`.\n\n**Input:** a finalized PRD file (output of `\u002Fcreate-menu` or equivalent). Not specs, briefs, questionnaires, or API docs; those feed `\u002Fcreate-menu`.\n\n**Output (fresh mode):**\n- `docs\u002Fplans\u002F00_master_checklist.md`: **Pie 1, Foundations** tracked via the `## Prep` gate at the top (its slices 1.1 to 1.3 are the foundation skills `\u002Fset-display-case`, `\u002Ffinal-quality-check`, `\u002Fopen-the-shop` the user runs once before any feature work), then the nested **feature Pies 2+** roadmap with `review:` per pie.\n- `docs\u002Fplans\u002Fstage_4_db_schema_foundation.md` (canned, conditional on Q3 = Yes; this is **Slice 1.4** of Pie 1, Foundations; the on-disk filename is unchanged for dual-read).\n- `docs\u002Fplans\u002Fstage_\u003CN>_\u003Cfeature>.md`: the feature slices, grouped into Pies 2+.\n- `CLAUDE.md` or `AGENTS.md` (per Q12): the project rules file.\n\n> **v5 change:** the flat v4 \"stages\" (20 to 30 at most, for a large app) become a **two-level Pie\u002FSlice structure**. The four foundation stages are the early slices of **Pie 1** (the foundations pie, `review: boundary`, slices `1.1` to `1.4`); their on-disk filenames are unchanged. `\u002Fspecial-order` appends a **new Pie**. Existing flat-v4 projects keep working untouched; `--repie` converts them only on explicit opt-in.\n\n## Project Config (optional)\n\nBefore Phase 1, check for `bytheslice.config.json` at the project root. Honor these keys (see [`skills\u002Fsetup-shop\u002Freferences\u002Fbytheslice-config-schema.md`](..\u002Fsetup-shop\u002Freferences\u002Fbytheslice-config-schema.md) for the full schema):\n\n- `rules.imports`: when non-empty, **skip Q9** (external rule-file imports) and use these URLs directly\n- `stages.targetFeatureStages`: pass to `stage-decomposer` to tune the splitter. Unset (the default), the roadmap is right-sized to the PRD and the 20 to 30 feature-slice band is only a ceiling for large apps, never padding: a small brief gets few pies, and a pie of a small app may have 1 or 2 slices. Set to any other band, it overrides that sizing and the count must land in it (smaller band = larger slices); the plugin default `\"20-30\"` that a loader fills in for an unset key is read as the ceiling, not an override\n- `stages.maxTasksPerStage`: pass to the writers (default `6`; warn if user set `> 8`)\n- `mcps.*`: pre-fills Q5 (Supabase MCP) and Q7 (design MCPs) so the elicitation skips already-answered questions\n\nIf a config-supplied answer covers a question, log a one-liner (\"Q9 answered from bytheslice.config.json, skipping\") and move to the next question.\n\n## Workflow\n\n### Phase 1: Context Elicitation (interactive, stays inline)\n\nElicitation is interactive and runs in the orchestrator's own turn; it is **not** delegated to a subagent. Ask each question with `ask_user_input_v0` before writing any files. Answers build the project rules file section by section.\n\n> The \"never call `ask_user_input_v0`\" rule in Appendix D applies to **dispatched subagents** (writers, the decomposer), which surface blocking ambiguity via `needs_human` + `hitl_*` instead. The orchestrator skill itself owns all human prompts, including this elicitation.\n\n**Always provide a recommended answer in available options.**\n\n**Unattended runs (`run.unattended: true` in `bytheslice.config.json`, set by `\u002Fpizza-party`).** Ask nothing. Read the order ticket `docs\u002Fpizza-party\u002Forder.md` first and answer each question from its **Answers** where they cover it: Q3 and Q4 from **Database**, Q10 from **Auth**, Q11 from **Host**, Q8 from **Stack** (or `bootstrap.variant`), Q9 from `rules.imports`. Every question the ticket does not cover takes its recommended option, and each such pick is appended to the ticket's \"Decisions made without you\" section as one line (`- cook-pizzas · Q\u003Cn> \u003Ctopic>: \u003Coption> · \u003Cwhy, in a clause>`), never to **Answers**. Q5 and Q7 come from what is actually connected in the session (read-only), recorded the same way. Without `run.unattended`, every question is asked as written.\n\n**Q1: MVP scope**\n> \"Is this MVP-only (everything ships in Phase 1) or do you want an MVP + Phase 2 split?\"\n> single_select: [\"MVP only: all slices are Phase 1\", \"MVP + Phase 2: flag which slices are post-launch\"]\n> → sets `mvp:` on every slice frontmatter\n\n**Q2: Master checklist tracking**\n> \"Where should the master checklist live?\"\n> single_select: [\"Local markdown only\", \"Mirror to Linear (requires Linear MCP)\"]\n> → if Linear: confirm Linear MCP is connected; skill writes milestone\u002Fissue stubs at the end (one milestone per **pie**, see Phase 5)\n\n**Q3: Database in scope?**\n> Detect from PRD Section 4 (Technical Architecture). Present finding:\n> \"I see [the PRD indicates \u002F no] database usage. Is a database in scope for this project?\"\n> single_select: [\"Yes: include the db-schema-foundation slice (Slice 1.4)\", \"No: skip it\"]\n\n**Q4: Database tooling** (only if Q3 = Yes)\n> \"Which database tooling?\"\n> single_select: [\"Supabase\", \"Prisma\", \"Drizzle\", \"Other (I'll specify)\"]\n> → drives schema file format in the db-schema canned template\n\n**Q5: Supabase MCP installed?** (only if Q4 = Supabase)\n> \"Is the Supabase MCP installed in this workspace?\"\n> single_select: [\"Yes\", \"No, I'll set it up manually\"]\n> → if Yes: appends Supabase security baseline from `references\u002Farchitecture-conventions.md` to project rules file\n\n**Q7: Design MCPs**\n> \"Which design MCPs are available? (These inform the design-system slice and frontend-design skill.)\"\n> multi_select: [\"shadcn MCP\", \"Magic MCP (21st.dev)\", \"Figma MCP\", \"None\"]\n> → list is written into the project rules file and passed as context to the writers\n\n**Q8: Architecture variant**\n> \"Is this a single app or a monorepo?\"\n> single_select: [\"Single app (one deployable at the project root)\", \"Monorepo (multiple apps + shared packages)\"]\n> follow-up if monorepo: \"Which workspace tooling?\" single_select: [\"Turborepo + pnpm\", \"Turborepo + npm\", \"Nx\", \"Plain pnpm workspaces\", \"Other\"]\n> → reads from `references\u002Farchitecture-conventions.md` and injects the matching Variant A or B section into the project rules file under `## Architecture Conventions (baseline)`\n\n**Q9: Project rules to import (code style + internal organization)**\n> \"Paste any paths or URLs to external rule files you want imported (naming conventions, type-vs-interface preferences, folder organization, server-action patterns, etc.). Leave blank to skip.\"\n> text_input\n> → merged into the project rules file under `## Architecture Conventions (project-specific)` with precedence: workflow baseline > project rules > external rules\n\n**Q10: Auth provider**\n> If PRD Section 2 or 4 specifies an auth provider, use that. Otherwise ask:\n> \"Which auth provider?\"\n> single_select: [\"Clerk\", \"Auth.js \u002F NextAuth\", \"Supabase Auth\", \"Lucia\", \"None \u002F custom\", \"Other (I'll specify)\"]\n> → drives the auth feature slice scope; if auth present, `phased-plan-writer` injects the dev-mode auth helpers task, bundling localhost auto-login (opt-in via `DEV_AUTH_BYPASS`) + seeded-user switcher banner (see `references\u002Fcanned-stages\u002Fauth-dev-mode-switcher-task.md`)\n\n**Q11: Deployment target**\n> If PRD Section 4 names a host, use that. Otherwise ask:\n> \"Deployment target?\"\n> single_select: [\u003Ceach host whose CLI or MCP is authorized in this session (read-only check, alphabetical)>, \"None: localhost for now\", \"Other (I'll specify)\"]\n> No host is a default. Recommend the one PRD Section 4 or the operator already named; with none named, recommend \"None: localhost for now\". Unattended: the **Host** from the order ticket.\n\n**Q12: Rules file format**\n> \"Which project rules file format?\"\n> single_select: [\"CLAUDE.md\", \"AGENTS.md\"]\n> → writes the project rules file to the chosen path\n\n#### Layering precedence (document in project rules file header)\n\n```\nPriority 1 (highest): ByTheSlice baseline (web standards, security, framework facts)\nPriority 2: project-specific rules (imported via Q9)\nPriority 3 (lowest): external rule files\n```\n\n### Phase 1.5: Assemble the project rules file\n\nAfter all answers, dispatch `rules-assembler` to write the project rules file (CLAUDE.md or AGENTS.md per Q12) before any slice writers run. Run as a single dispatch: **Dispatch `rules-assembler`. Supply the elicitation answers, the architecture variant, and the layering precedence. Wait for the return.**\n\n### Phase 2: Pie & Slice Identification\n\nRead the PRD. **Dispatch `stage-decomposer`** (single, readonly). It produces the proposed two-level roadmap the user reviews **before** any plan files are written. Wait for the return.\n\nThe decomposer works top-down:\n\n1. **Foundations → Pie 1.** The canned foundation slices are the early slices of **Pie 1** (`review: boundary`):\n   - Slice 1.1: design-system gate\n   - Slice 1.2: CI\u002FCD scaffold\n   - Slice 1.3: env-setup gate\n   - Slice 1.4: db-schema foundation (only if Q3 = Yes)\n2. **Features → Slices.** Every PRD Section 2 feature defaults to **≥2 slices**: (a) shell slice: route, layout, empty\u002Floading\u002Ferror states; (b) data slice: queries, mutations, polish, edge cases. Tiny features (e.g. a static page) may be one slice.\n3. **Group Slices into Pies.** Bundle low-cross-coupling slices into **coherent chapters of usually 3 to 8 slices** (e.g. \"Blog Editor\" = the editor frontend slice + the server-actions slice + the publish-flow slice). Each Pie is the unit of `\u002Fsell-pie` autonomy, the PR, the worktree, and the HITL checkpoint. Foundations are Pie 1 (tracked via the `## Prep` gate); feature pies are Pie 2 onward. A small app's pie may hold 1 or 2 slices when the app has no more to give it; never pad a pie to reach 3.\n4. **Set `review:` per pie.** Default every pie to `review: boundary` (autonomous; one HITL at the pie boundary). Flag a pie `review: continuous` (forces `\u002Fsell-pie` into `\u002Fsell-slice` mode for the whole pie) when it is sensitive: **Payments, Auth, real-data migrations**, or anything the PRD marks high-risk. The decomposer proposes the `review:` value per pie; the user confirms it at approval. **Under `run.unattended: true`, every pie is `review: boundary`**, sensitive ones included: the operator chose hands-off for the whole run. Record one ticket decision line naming the pies that would otherwise have been `continuous`.\n5. **Tag each slice:** `mvp:` per Q1; `type:` (`design-system | ci-cd | env-setup | db-schema | frontend | backend | full-stack | infrastructure`); `depends_on:` with only lower-numbered slices, never forward references. Within a pie, a slice's `slice` id is `\"\u003Cpie>.\u003Cindex>\"` (e.g. `\"2.6\"`).\n6. **Band check, right-sized.** The **20 to 30 feature-slice band is a ceiling for large apps, not a target.** Size the roadmap to the PRD: a small brief (a private single-user tool, a handful of Section 2 features) gets few pies and few slices, for example 1 to 3 feature pies and well under 20 slices. Never pad to reach the band: no filler slices, no splitting a small feature into shell and data slices when one slice holds it, no pie invented to fill a count. A pie of a small app may hold fewer than 3 slices when the app has no more to give it. `stages.targetFeatureStages`, when set, still overrides this sizing. Cross-check PRD Section 7 (Out of Scope); never propose work the PRD excludes. Pass this right-sizing rule to `stage-decomposer` with the PRD.\n7. **User flow per pie (optional).** For each pie with a user-facing flow, the decomposer returns `user_flow`: 3 to 7 ordered steps, each naming the slice id in that pie that owns it. A backend-only pie has none. The flow is the source of each owning slice's one user-outcome Exit line.\n\n**Present the proposed Pie\u002FSlice tree to the user for approval before writing any files**: pies with their `review:` annotation, slices nested under each pie with type and `depends_on`. The user can re-bundle pies, re-split slices, or override any `review:` value here. Show each pie's `User flow` steps with their owning slice ids.\n\n**Under `run.unattended: true` the roadmap is auto-approved.** Show nothing and wait for nothing. Append one decision line to the order ticket (`- cook-pizzas · roadmap approved: \u003CP> pies, \u003CS> feature slices, all review: boundary · unattended run`) and one **Progress** line with the same counts, then go straight to Phase 3.\n\n**Unowned flow steps (a warning, never a block).** When any `user_flow` step has no owning slice id, or names a slice id that does not exist in the proposed tree, add one line to this same approval prompt, listing every such step: `Decomposition warning: unowned flow step(s): \"\u003Cstep>\" (Pie N). Recommended: re-bundle now, while it is free.` It is informational: the operator may approve anyway, and the synthesizer then writes the step with `- no owning slice`. It adds no new question and no new human step; when every step is owned, the line is not shown. Under `run.unattended: true`, re-bundle the step into the slice that best owns it when one clearly does; otherwise leave it unowned. Either way, record it as a decision line in the ticket.\n\n### Phase 3: Write the Slices (schema-validated Workflow)\n\nOnce the user approves the roadmap, write every slice plan file in parallel. **Run as a `Workflow` (`parallel()` of one plan-writer per slice, a barrier, then the Phase 4 synthesizer consumes the writers' structured returns, no disk re-read). If `Workflow` is unavailable, fall back per [`references\u002Floop-workflow-fallback-pattern.md`](references\u002Floop-workflow-fallback-pattern.md).**\n\n> Each plan-writer writes **exactly one** file (disjoint paths), so this fan-out needs **no** worktree isolation. Only parallel file-mutating work with overlapping paths uses `isolation:'worktree'` per [`references\u002Fgit-worktree-standard.md`](references\u002Fgit-worktree-standard.md) §1; most ByTheSlice fan-out (including these writers) is disjoint-file and needs none.\n\n| Slice | Writer | Canned? | Condition |\n|---|---|---|---|\n| 1.4 (db-schema) | `db-schema-stage-writer` | Yes | Q3 = Yes only |\n| feature slices (Pies 2+) | `phased-plan-writer` | No | one `parallel()` branch per feature slice |\n\n**Workflow shape:**\n\n1. **`parallel()` fan-out**: one branch per slice, each spawning the registered writer by type (`agent(inputs, {agentType: \"bytheslice:phased-plan-writer\"})`; the 1.4 branch uses `bytheslice:db-schema-stage-writer`). Each writer writes **exactly one** file and returns a **structured envelope** (its slice's `path`, `pie`, `slice`, `name`, `type`, `depends_on`, `tasks_count`, `hitl_required`, plus the standard `status`\u002F`needs_human`\u002F`hitl_*`). The schema is the writer's Output Contract in `agents\u002Fphased-plan-writer.md` (and `agents\u002Fdb-schema-stage-writer.md` for 1.4).\n2. **Barrier**: the Workflow waits for every branch. The orchestrator **validates each return against the writer Output Contract schema** before proceeding. Under the in-context fallback (no `Workflow`), the orchestrator performs this schema validation **manually**; enforcement is otherwise lost (see the fallback ref).\n3. **Synthesizer step** (Phase 4) receives the **collection of structured returns** as its input and aggregates them. It does **not** re-read the slice files from disk; the returns are the source of truth for the checklist rows.\n\nSupply each writer with:\n- Slice metadata: `pie`, `slice` id (`\"\u003CN.M>\"`), short name, output path, one-sentence goal, `mvp:` flag, the pie's `review:` value (inherited by every slice in the pie)\n- Scope: features\u002Fsubtasks for this slice from the approved roadmap\n- Context: PRD excerpts (or absolute path), tech stack, prior-slice dependencies\n- Elicitation answers (Q1-Q12) as context\n- Absolute path to the project rules file\n- The pie's `user_flow` from the approved roadmap, when it has one (the writer turns the step its slice owns into its one user-outcome Exit line; see `agents\u002Fphased-plan-writer.md` \"User-outcome line\")\n\n> Writers emit `pie`\u002F`slice`\u002F`review` per the frontmatter contract in [`references\u002Fstage-frontmatter-contract.md`](references\u002Fstage-frontmatter-contract.md). A writer that hits a blocking ambiguity sets `hitl_required: true` + the matching `hitl_reason` in frontmatter and returns `needs_human` with `hitl_category`\u002F`hitl_context`; it never calls `ask_user_input_v0`. The orchestrator surfaces the prompt (see HITL Handling).\n\n### Phase 4: Master Checklist (last, consumes structured returns)\n\nAfter the Workflow barrier, **dispatch `master-checklist-synthesizer`** with the **collection of writer returns** (not file paths to re-read). It:\n\n1. Writes **Pie 1, Foundations** as the `## Prep` gate at the top; the gate IS Pie 1's completion tracker, with one checkbox per foundation slice 1.1 to 1.4 (always in this order):\n   ```\n   ## Prep (Pie 1 Foundations, run once before any feature work)\n   - [ ] Slice 1.1, Display case built       : run \u002Fset-display-case\n   - [ ] Slice 1.2, Quality line installed   : run \u002Ffinal-quality-check\n   - [ ] Slice 1.3, Shop open                : run \u002Fopen-the-shop\n   - [ ] Slice 1.4, DB schema foundation     : run \u002Fsell-slice on Slice 1.4 (handled internally; only if backend in scope)\n   ```\n   Drop the last line if Q3 = No (no DB). The heading MUST keep `## Prep` as its first word so `hooks\u002Flib\u002Fchecklist.sh` `bts_prep_counts` matches it.\n2. Builds the **feature Pies 2+** roadmap from the structured returns: `## Pie N: \u003Cname>` (with the `\u003C!-- review: boundary|continuous -->` annotation mirroring each pie's `review`), the pie's `**User flow:**` block when it has a `user_flow` (numbered `N. \u003Cstep> - Slice N.M` items, never headings), then `### Slice N.M: \u003Cname>` blocks with completion criteria + the per-slice Exit-criteria contract.\n3. Writes the rest of `docs\u002Fplans\u002F00_master_checklist.md`.\n4. Uses GitHub task-list checkboxes: `- [ ]`, one criterion per line. A bare `[ ]` with no list marker is plain text to every Markdown renderer, so consecutive criteria collapse into one paragraph and read as a horizontal blob on GitHub.\n\nSee [`references\u002Ftemplates.md`](references\u002Ftemplates.md) for the exact nested checklist template, including the `## Prep` gate (Pie 1, Foundations) and the `review:` annotation.\n\n### Phase 5: Linear stubs (if Q2 = Linear)\n\nIf the user chose Linear mirroring:\n1. Create one Linear milestone **per Pie** using the Linear MCP (the pie is the PR unit, so it maps to a milestone).\n2. Write milestone IDs back into each slice file's `linear_milestone:` frontmatter field (every slice in a pie shares the pie's milestone).\n\n### Phase R: `--repie`, convert a flat v4 checklist to Pies (explicit opt-in only)\n\nRuns **only** when invoked as `\u002Fcook-pizzas --repie` against an existing **flat v4** checklist. This is the sole path that mutates existing plan files, and it is never silent or automatic.\n\n1. **Confirm the conversion explicitly.** State plainly what will change: flat `## Stage N` headings → nested `## Pie N` \u002F `### Slice N.M`; frontmatter gains `pie`, `slice: \"\u003CN.M>\"`, `review:`. Show the proposed pie groupings (which stages bundle into which pie, and each pie's `review:` value) and the file-by-file diff plan. **Wait for the user to approve** before writing anything.\n2. **Group the existing stages into Pies.** Apply the same bundling heuristic as Phase 2 step 3: coherent chapters of usually 3 to 8 slices, low cross-coupling (a small project's pie may hold 1 or 2; never pad). Foundation stages 1 to 4 become Pie 1's slices 1.1 to 1.4. Renumber the rest into pies, preserving each stage's original `stage:` integer (kept for back-compat + stable sort) and original on-disk filename.\n3. **Set `review:` per pie.** Default `boundary`; flag Payments \u002F Auth \u002F real-data-migration pies `continuous`. The user confirms each at step 1.\n4. **Rewrite frontmatter + headings in place.** For each plan file, add `pie`, `slice`, `review` (do **not** remove `stage:`; dual-read keeps it). Update the master checklist headings to the nested shape. Preserve every existing Exit-criteria block verbatim; each slice keeps its own.\n5. **Verify dual-read.** After the rewrite, confirm both the flat (`stage`) and nested (`pie`\u002F`slice`) keys are present and consistent (a slice's `slice` leading number equals its `pie`). Report the conversion summary.\n\n> If no flat checklist exists, or one already nested (carries `pie`\u002F`slice`), `--repie` is a no-op: report that nothing needs converting. `--repie` never creates new slices or features; it only re-groups what is already there. For *adding* features, point the user at `\u002Fspecial-order`.\n\n## HITL Handling\n\nThe orchestrator owns every human prompt; subagents never call `ask_user_input_v0`.\n\n- **Interactive elicitation (Phase 1)** and the **roadmap approval (Phase 2)** \u002F **`--repie` confirmation (Phase R)** are first-class orchestrator prompts via `ask_user_input_v0`.\n- **Subagent-surfaced HITL.** When `stage-decomposer` or a Phase 3 writer returns `needs_human: true`, halt that branch and surface the agent's `hitl_question` to the user with its `hitl_category` (`prd_ambiguity` | `external_credentials` | `destructive_operation` | `creative_direction`) and `hitl_context`. Resolve, then re-dispatch only the affected branch.\n- A writer that hits the 6-task \u002F ~15-file slice cap returns `hitl_required: true` \u002F `hitl_reason: prd_ambiguity` proposing a split; surface it and re-bundle into the pie before continuing.\n- **Under `run.unattended: true`, nothing here waits on a human.** A writer's proposed split is applied as proposed and re-dispatched; any other writer or decomposer `needs_human` takes the option it recommends (or, with none, the one most consistent with the PRD and the ticket's **Answers**). Each resolution is one decision line in the order ticket. The return is never `needs_human`.\n\n## Progress Report Format\n\nLead with the verdict, then the structure:\n\n- **Phase 1 to 1.5:** \"Elicitation complete (12 Qs); project rules file written to `\u003Cpath>`.\"\n- **Phase 2:** \"Proposed roadmap: `\u003CP>` pies \u002F `\u003CS>` feature slices. Pies needing your eyes: `\u003Ccontinuous pies>`. Approve to write?\" (with the unowned-flow-step warning line above it only when a step has no owning slice)\n- **Phase 3 (Workflow):** \"Writing `\u003CS>` slices in parallel via Workflow… barrier reached; `\u003Cn>` returns schema-valid, `\u003Cm>` flagged HITL.\"\n- **Phase 4:** \"Master checklist written to `docs\u002Fplans\u002F00_master_checklist.md`, `\u003CP>` pies; Pie 1, Foundations as the `## Prep` gate at top, feature Pies 2+ below.\"\n- **`--repie`:** \"Converted `\u003Cn>` flat stages → `\u003CP>` pies. Dual-read verified.\"\n\n## Architecture conventions reference\n\nThis skill's `references\u002Farchitecture-conventions.md` is the **opinion-free baseline** injected into every project's rules file (universal web standards, performance facts, stack-conditional security baselines, framework-version syntactic facts, and the Variant A\u002FB structural split). Opinionated rules (naming, type-vs-interface, file organization, server-action patterns) are NOT in that file; they enter via Q9 imports and design-system code patterns. Document this clearly in the project rules file header.\n\n## Output structure\n\n```\ndocs\u002F\n├── plans\u002F\n│   ├── 00_master_checklist.md             (## Prep gate = Pie 1, Foundations, then nested ## Pie N \u002F ### Slice N.M for feature Pies 2+)\n│   ├── stage_4_db_schema_foundation.md    (Slice 1.4 of Pie 1, conditional on Q3 = Yes; filename unchanged)\n│   └── stage_N_\u003Cfeature>.md               (feature slices, grouped into Pies 2+)\n└── (existing PRD)\nCLAUDE.md or AGENTS.md (per Q12)\n```\n\n> The `## Prep` gate IS Pie 1, Foundations; its slices 1.1 to 1.3 point the user at the standalone foundation skills (`\u002Fset-display-case`, `\u002Ffinal-quality-check`, `\u002Fopen-the-shop`). Those run once each before any `\u002Fsell-pie` or `\u002Fsell-slice` invocation. They are NOT plan files; they are skills the user invokes directly.\n\n## Key principles\n\n- **Two levels:** Pies are coherent chapters of usually 3 to 8 slices with low cross-coupling (the unit of autonomy, PR, worktree, HITL); Slices are vertical deliverables (UI + route + data + tests for one user-facing thing).\n- **Right-sized, never padded.** The 20 to 30 feature-slice band is a ceiling for large apps, not a target. A small brief gets few pies and few slices, and a pie of a small app may have 1 or 2 slices; no filler slice, no needless shell and data split, no pie invented to fill a count. `stages.targetFeatureStages`, when set, still overrides.\n- **Hard cap per slice:** 6 tasks, ~15 files, completable in one Claude session.\n- **Plans carry contracts, not implementations.** Code fences hold commands, schema DDL, exported signatures and type shapes, and byte-exact config; behaviors, states, edge cases, and test cases are prose. Bodies are the builder's job, written against the real tree. See `agents\u002Fphased-plan-writer.md` \"Code budget\".\n- **One PR per Pie** (not per slice) in the default `pie-pr` delivery mode: per-slice work is commit + push to the pie branch; the PR opens at the pie boundary via `\u002Fbox-it-up`. Opt-in merge-per-slice delivery (`delivery.mode`, or an explicit autonomous-delivery run instruction) opens and merges one PR per slice instead.\n- **`review:` is a pie property:** `boundary` (default, autonomous) vs `continuous` (forces `\u002Fsell-slice` mode). Sensitive pies (Payments, Auth, real-data migrations) are `continuous`, except under `run.unattended: true`, where every pie is `boundary`.\n- **No forward references:** a slice may only reference packages, tables, or components built in prior slices.\n- **Exit criteria are testable AND transcript-verifiable:** every line in a slice's `**Exit criteria:**` block must be verifiable by reading the conversation alone: a command's exit code, a subagent's `overall: pass`, a captured screenshot, a file path Claude has read. This block is lifted verbatim into the `\u002Fgoal` condition by `\u002Fsell-slice` Phase 2.5 and is what `slice-tester` derives its bespoke plan from. See [`references\u002Ftemplates.md`](references\u002Ftemplates.md) → \"Exit-criteria contract (consumed by `\u002Fgoal`)\".\n- **Exit criteria follow the gate tiers:** tier 1 while coding, tier 2 (the slice's own tests, build, DB tests when the schema changes) before each commit, tier 3 (`slice-verifier`, the full local suite) once at slice end, tier 4 (CI's full suite) at the PR. Plans never demand the full ladder per task or a CI-only check per slice. See [`references\u002Ftemplates.md`](references\u002Ftemplates.md) → \"Gate tiers\".\n- **Design HITL is front-loaded** to the design-system slice (Pie 1) so feature pies compose pre-approved components and rarely stop for design.\n- **Auth slices always get the dev-mode auth helpers task**: one combined task bundling localhost auto-login (opt-in via `DEV_AUTH_BYPASS`) + seeded-user switcher banner; both sub-bullets ship together (see `references\u002Fcanned-stages\u002Fauth-dev-mode-switcher-task.md`).\n- **Never silently rewrite plan files.** Flat v4 checklists stay valid; conversion to pies happens only via explicit `--repie`.\n\n## CC-only primitives + Cursor fallback\n\n`Workflow` (Phase 3's parallel writers + barrier) is a Claude-Code-only primitive, as is `\u002Floop` (which `\u002Fsell-pie` drives the baked pies with). When either is unavailable (running in Cursor, hooks disabled, or any other reason), follow [`references\u002Floop-workflow-fallback-pattern.md`](references\u002Floop-workflow-fallback-pattern.md): detect availability → if absent, WebFetch the canonical docs → fall back to **in-context dispatch with orchestrator-side manual schema validation** of each writer return (enforcement is otherwise lost). Do NOT silently drop the Workflow's schema validation in fallback mode.\n\n## Slice frontmatter contract\n\nEvery slice file uses the contract in [`references\u002Fstage-frontmatter-contract.md`](references\u002Fstage-frontmatter-contract.md), including the v5 `pie`, `slice`, and `review` fields and the dual-read rule. See also [`references\u002Ftemplates.md`](references\u002Ftemplates.md).\n\n## Hard Constraints\n\n- **fresh mode never overwrites** an existing master checklist; refuse and redirect (to `\u002Fspecial-order`, or to `--repie` for a flat checklist).\n- **`--repie` is the only mutating path** and runs only on explicit `--repie` + user confirmation. Never auto-convert; never create new slices.\n- **Writers write exactly one file each** and return structured envelopes; the synthesizer consumes returns, not disk.\n- **Schema-validate every writer return** at the Workflow barrier (manually in the in-context fallback).\n- **Checkboxes are GitHub task-list items** in generated files: `- [ ]` \u002F `- [x]`, one per line. Never a bare `[ ]` without the list marker (it does not render as a list).\n- **No platform-specific references**: use \"project rules file\", not \"cursor rules\" or \"claude rules\".\n- **No forward references** in any slice's `depends_on`.\n- **Subagents never call `ask_user_input_v0`**: they set `needs_human` + `hitl_*`; the orchestrator prompts.\n\n## Completion checklist\n\n- [ ] All 12 elicitation questions answered and answers written to project rules file\n- [ ] Project rules file assembled with correct layering: baseline → Q9 imports → design-system patterns\n- [ ] Pie\u002FSlice roadmap presented to user and approved (pies, `review:` per pie, slices nested with type + `depends_on`)\n- [ ] db-schema slice (Slice 1.4) plan file written if Q3 = Yes\n- [ ] All feature slice files written via the Phase 3 Workflow (`parallel()` writers, barrier)\n- [ ] Every writer return schema-validated against the Output Contract (manually if `Workflow` unavailable)\n- [ ] All slice files include valid YAML frontmatter per `references\u002Fstage-frontmatter-contract.md` (incl. `pie`\u002F`slice`\u002F`review`)\n- [ ] Master checklist synthesized from the structured returns (not disk re-read): Pie 1, Foundations as the `## Prep` gate at top, then feature Pies 2+ as nested `## Pie N` \u002F `### Slice N.M` with `review:` annotations\n- [ ] Linear stubs created if Q2 = Linear (one milestone per pie; `linear_milestone` fields populated)\n- [ ] (`--repie` only) Flat checklist converted on explicit opt-in; dual-read verified; no new slices invented\n- [ ] Every checkbox in generated files is a `- [ ]` task-list item (no bare `[ ]` lines)\n- [ ] No platform-specific references in generated files\n\n## Return contract\n\n```yaml\nstatus: complete | failed | needs_human\nsummary: \u003Cone paragraph: N pies \u002F S feature slices written, or the --repie conversion result>\nmode: fresh | refuse | repie\nartifacts:\n  - docs\u002Fplans\u002F00_master_checklist.md\n  - \u003Cslice plan file paths>\n  - \u003Cproject rules file path>\npies: \u003Cint>\nfeature_slices: \u003Cint>\nneeds_human: false | true\nhitl_category: null | \"prd_ambiguity\" | \"external_credentials\" | \"destructive_operation\" | \"creative_direction\"\nhitl_question: null | \"\u003Cplain-language question if a writer or the decomposer was blocked>\"\nhitl_context: null | \"\u003Cwhat triggered this>\"\n```\n","\u003C!-- skills\u002Fcook-pizzas\u002FSKILL.md -->\n\u003C!-- Pizza-shop framing: cook every pre-made pie that will sit in the display case. v5 two-level decomposition: PRD → Pies (coherent chapters of usually 3 to 8 slices; a small app's pie may hold 1 or 2) → Slices (vertical deliverables), right-sized to the PRD, never padded. Parallel slice writers run as a schema-validated Workflow; --repie converts a flat v4 checklist on explicit opt-in. -->\n\n# Cook the Pizzas: PRD to Pie\u002FSlice Roadmap\n\nTransform a finalized PRD into a complete, ordered roadmap of **Pies** (coherent chapters of usually 3 to 8 slices) and **Slices** (vertical deliverables), plus a project rules file. A pie is the unit of `\u002Fsell-pie` autonomy, the HITL checkpoint, the PR, the context-refresh, and the worktree; a slice is today's \"stage\", one vertical thing, capped at ~6 tasks \u002F ~15 files. The roadmap is right-sized to the PRD: a small brief gets few pies, a small app's pie may hold 1 or 2 slices, and the 20 to 30 feature-slice band is a ceiling for large apps, never a target (an operator-set `stages.targetFeatureStages` still overrides).\n\n## Mode detection\n\n`\u002Fcook-pizzas` runs in one of three modes. It is **always the source of the master checklist**: there is no upstream checklist for it to coordinate with; this skill produces the checklist.\n\n| Mode | Trigger | Behavior |\n|---|---|---|\n| **fresh** (default) | `\u002Fcook-pizzas` with no master checklist present | Full PRD → Pie\u002FSlice decomposition. Writes `docs\u002Fplans\u002F00_master_checklist.md` (nested `## Pie N` \u002F `### Slice N.M`, `review:` per pie) + the feature slice plan files + the project rules file. |\n| **refuse** | `\u002Fcook-pizzas` (no `--repie`) when `docs\u002Fplans\u002F00_master_checklist.md` already exists | Refuses to overwrite. Points the user at `\u002Fspecial-order` (add features mid-flight), or, if the existing checklist is flat v4, at `--repie` to convert it. Writes nothing. |\n| **repie** | `\u002Fcook-pizzas --repie` when a **flat v4** checklist exists | Explicit, opt-in conversion of a flat `## Stage N` checklist into nested `## Pie N` \u002F `### Slice N.M` (see Phase R). Never runs silently; never triggered without the `--repie` flag. |\n\n> A flat v4 checklist (`## Stage N` headings, frontmatter without `pie`\u002F`slice`\u002F`review`) stays contract-valid forever: `\u002Fsell-slice` runs on it as-is. Only `\u002Fsell-pie` refuses flat checklists, and the remedy is the explicit `--repie` conversion. Plan files are **never silently rewritten** (see [`references\u002Fstage-frontmatter-contract.md`](references\u002Fstage-frontmatter-contract.md) → \"Dual-read\").\n\n## Subagent Roster\n\nThe two-level decomposition routes structured artifacts between singular-goal subagents. Phase 3's per-slice writers run as a `Workflow` (see Phase 3); the synthesizer consumes their **structured returns**, not re-read disk.\n\n| Agent | Singular goal | Dispatched in | Returns |\n|---|---|---|---|\n| [`agents\u002Fstage-decomposer.md`](agents\u002Fstage-decomposer.md) | identify Pies, then Slices within each Pie; propose the roadmap for approval | Phase 2 (single, readonly) | proposed pie\u002Fslice tree + band compliance (no writes) |\n| [`agents\u002Frules-assembler.md`](agents\u002Frules-assembler.md) | assemble the project rules file from elicitation answers | Phase 1.5 (single) | rules-file path + layering summary |\n| [`agents\u002Fdb-schema-stage-writer.md`](agents\u002Fdb-schema-stage-writer.md) | write the canned db-schema slice (Slice 1.4) | Phase 3 Workflow (conditional, Q3 = Yes) | slice file path + structured frontmatter return |\n| [`agents\u002Fphased-plan-writer.md`](agents\u002Fphased-plan-writer.md) | write **one** feature slice plan file | Phase 3 Workflow (`parallel()`, one per feature slice) | slice file path + `pie`\u002F`slice`\u002F`type`\u002F`depends_on`\u002F`tasks_count` + frontmatter return |\n| [`agents\u002Fmaster-checklist-synthesizer.md`](agents\u002Fmaster-checklist-synthesizer.md) | aggregate the writers' structured returns into the nested master checklist | Phase 4 (single, after the Workflow barrier) | `00_master_checklist.md` path |\n\n> Foundations Pie slices 1.1 to 1.3 (design-system, CI\u002FCD, env-setup) are not written here; they are delivered by the run-once standalone skills `\u002Fset-display-case`, `\u002Ffinal-quality-check`, `\u002Fopen-the-shop`, with their slice definitions in [`references\u002Fcanned-stages\u002F`](references\u002Fcanned-stages\u002F). Only Slice 1.4 (db-schema) gets a generated plan file (`db-schema-stage-writer`). cook-pizzas dispatches no foundation *writers*; the three legacy foundation-stage writers were removed in v5.\n\n## Inputs \u002F Preconditions\n\n> **Inline preconditions.** This skill checks its own preconditions inline at the start, via tools (no existing checklist in fresh mode; git tree state; the `--repie` opt-in). If one fails, raise the problem to the operator as a question with a recommended next step, never a refusal. No ByTheSlice hook blocks a prompt or a tool call, and plan writes from this skill draw no warning (the Pass mod exempts `cook-pizzas`). The dual-read parser in `hooks\u002Flib\u002Fchecklist.sh` recognizes both `## Stage N` and `## Pie N` \u002F `### Slice N.M`.\n\n**Input:** a finalized PRD file (output of `\u002Fcreate-menu` or equivalent). Not specs, briefs, questionnaires, or API docs; those feed `\u002Fcreate-menu`.\n\n**Output (fresh mode):**\n- `docs\u002Fplans\u002F00_master_checklist.md`: **Pie 1, Foundations** tracked via the `## Prep` gate at the top (its slices 1.1 to 1.3 are the foundation skills `\u002Fset-display-case`, `\u002Ffinal-quality-check`, `\u002Fopen-the-shop` the user runs once before any feature work), then the nested **feature Pies 2+** roadmap with `review:` per pie.\n- `docs\u002Fplans\u002Fstage_4_db_schema_foundation.md` (canned, conditional on Q3 = Yes; this is **Slice 1.4** of Pie 1, Foundations; the on-disk filename is unchanged for dual-read).\n- `docs\u002Fplans\u002Fstage_\u003CN>_\u003Cfeature>.md`: the feature slices, grouped into Pies 2+.\n- `CLAUDE.md` or `AGENTS.md` (per Q12): the project rules file.\n\n> **v5 change:** the flat v4 \"stages\" (20 to 30 at most, for a large app) become a **two-level Pie\u002FSlice structure**. The four foundation stages are the early slices of **Pie 1** (the foundations pie, `review: boundary`, slices `1.1` to `1.4`); their on-disk filenames are unchanged. `\u002Fspecial-order` appends a **new Pie**. Existing flat-v4 projects keep working untouched; `--repie` converts them only on explicit opt-in.\n\n## Project Config (optional)\n\nBefore Phase 1, check for `bytheslice.config.json` at the project root. Honor these keys (see [`skills\u002Fsetup-shop\u002Freferences\u002Fbytheslice-config-schema.md`](..\u002Fsetup-shop\u002Freferences\u002Fbytheslice-config-schema.md) for the full schema):\n\n- `rules.imports`: when non-empty, **skip Q9** (external rule-file imports) and use these URLs directly\n- `stages.targetFeatureStages`: pass to `stage-decomposer` to tune the splitter. Unset (the default), the roadmap is right-sized to the PRD and the 20 to 30 feature-slice band is only a ceiling for large apps, never padding: a small brief gets few pies, and a pie of a small app may have 1 or 2 slices. Set to any other band, it overrides that sizing and the count must land in it (smaller band = larger slices); the plugin default `\"20-30\"` that a loader fills in for an unset key is read as the ceiling, not an override\n- `stages.maxTasksPerStage`: pass to the writers (default `6`; warn if user set `> 8`)\n- `mcps.*`: pre-fills Q5 (Supabase MCP) and Q7 (design MCPs) so the elicitation skips already-answered questions\n\nIf a config-supplied answer covers a question, log a one-liner (\"Q9 answered from bytheslice.config.json, skipping\") and move to the next question.\n\n## Workflow\n\n### Phase 1: Context Elicitation (interactive, stays inline)\n\nElicitation is interactive and runs in the orchestrator's own turn; it is **not** delegated to a subagent. Ask each question with `ask_user_input_v0` before writing any files. Answers build the project rules file section by section.\n\n> The \"never call `ask_user_input_v0`\" rule in Appendix D applies to **dispatched subagents** (writers, the decomposer), which surface blocking ambiguity via `needs_human` + `hitl_*` instead. The orchestrator skill itself owns all human prompts, including this elicitation.\n\n**Always provide a recommended answer in available options.**\n\n**Unattended runs (`run.unattended: true` in `bytheslice.config.json`, set by `\u002Fpizza-party`).** Ask nothing. Read the order ticket `docs\u002Fpizza-party\u002Forder.md` first and answer each question from its **Answers** where they cover it: Q3 and Q4 from **Database**, Q10 from **Auth**, Q11 from **Host**, Q8 from **Stack** (or `bootstrap.variant`), Q9 from `rules.imports`. Every question the ticket does not cover takes its recommended option, and each such pick is appended to the ticket's \"Decisions made without you\" section as one line (`- cook-pizzas · Q\u003Cn> \u003Ctopic>: \u003Coption> · \u003Cwhy, in a clause>`), never to **Answers**. Q5 and Q7 come from what is actually connected in the session (read-only), recorded the same way. Without `run.unattended`, every question is asked as written.\n\n**Q1: MVP scope**\n> \"Is this MVP-only (everything ships in Phase 1) or do you want an MVP + Phase 2 split?\"\n> single_select: [\"MVP only: all slices are Phase 1\", \"MVP + Phase 2: flag which slices are post-launch\"]\n> → sets `mvp:` on every slice frontmatter\n\n**Q2: Master checklist tracking**\n> \"Where should the master checklist live?\"\n> single_select: [\"Local markdown only\", \"Mirror to Linear (requires Linear MCP)\"]\n> → if Linear: confirm Linear MCP is connected; skill writes milestone\u002Fissue stubs at the end (one milestone per **pie**, see Phase 5)\n\n**Q3: Database in scope?**\n> Detect from PRD Section 4 (Technical Architecture). Present finding:\n> \"I see [the PRD indicates \u002F no] database usage. Is a database in scope for this project?\"\n> single_select: [\"Yes: include the db-schema-foundation slice (Slice 1.4)\", \"No: skip it\"]\n\n**Q4: Database tooling** (only if Q3 = Yes)\n> \"Which database tooling?\"\n> single_select: [\"Supabase\", \"Prisma\", \"Drizzle\", \"Other (I'll specify)\"]\n> → drives schema file format in the db-schema canned template\n\n**Q5: Supabase MCP installed?** (only if Q4 = Supabase)\n> \"Is the Supabase MCP installed in this workspace?\"\n> single_select: [\"Yes\", \"No, I'll set it up manually\"]\n> → if Yes: appends Supabase security baseline from `references\u002Farchitecture-conventions.md` to project rules file\n\n**Q7: Design MCPs**\n> \"Which design MCPs are available? (These inform the design-system slice and frontend-design skill.)\"\n> multi_select: [\"shadcn MCP\", \"Magic MCP (21st.dev)\", \"Figma MCP\", \"None\"]\n> → list is written into the project rules file and passed as context to the writers\n\n**Q8: Architecture variant**\n> \"Is this a single app or a monorepo?\"\n> single_select: [\"Single app (one deployable at the project root)\", \"Monorepo (multiple apps + shared packages)\"]\n> follow-up if monorepo: \"Which workspace tooling?\" single_select: [\"Turborepo + pnpm\", \"Turborepo + npm\", \"Nx\", \"Plain pnpm workspaces\", \"Other\"]\n> → reads from `references\u002Farchitecture-conventions.md` and injects the matching Variant A or B section into the project rules file under `## Architecture Conventions (baseline)`\n\n**Q9: Project rules to import (code style + internal organization)**\n> \"Paste any paths or URLs to external rule files you want imported (naming conventions, type-vs-interface preferences, folder organization, server-action patterns, etc.). Leave blank to skip.\"\n> text_input\n> → merged into the project rules file under `## Architecture Conventions (project-specific)` with precedence: workflow baseline > project rules > external rules\n\n**Q10: Auth provider**\n> If PRD Section 2 or 4 specifies an auth provider, use that. Otherwise ask:\n> \"Which auth provider?\"\n> single_select: [\"Clerk\", \"Auth.js \u002F NextAuth\", \"Supabase Auth\", \"Lucia\", \"None \u002F custom\", \"Other (I'll specify)\"]\n> → drives the auth feature slice scope; if auth present, `phased-plan-writer` injects the dev-mode auth helpers task, bundling localhost auto-login (opt-in via `DEV_AUTH_BYPASS`) + seeded-user switcher banner (see `references\u002Fcanned-stages\u002Fauth-dev-mode-switcher-task.md`)\n\n**Q11: Deployment target**\n> If PRD Section 4 names a host, use that. Otherwise ask:\n> \"Deployment target?\"\n> single_select: [\u003Ceach host whose CLI or MCP is authorized in this session (read-only check, alphabetical)>, \"None: localhost for now\", \"Other (I'll specify)\"]\n> No host is a default. Recommend the one PRD Section 4 or the operator already named; with none named, recommend \"None: localhost for now\". Unattended: the **Host** from the order ticket.\n\n**Q12: Rules file format**\n> \"Which project rules file format?\"\n> single_select: [\"CLAUDE.md\", \"AGENTS.md\"]\n> → writes the project rules file to the chosen path\n\n#### Layering precedence (document in project rules file header)\n\n```\nPriority 1 (highest): ByTheSlice baseline (web standards, security, framework facts)\nPriority 2: project-specific rules (imported via Q9)\nPriority 3 (lowest): external rule files\n```\n\n### Phase 1.5: Assemble the project rules file\n\nAfter all answers, dispatch `rules-assembler` to write the project rules file (CLAUDE.md or AGENTS.md per Q12) before any slice writers run. Run as a single dispatch: **Dispatch `rules-assembler`. Supply the elicitation answers, the architecture variant, and the layering precedence. Wait for the return.**\n\n### Phase 2: Pie & Slice Identification\n\nRead the PRD. **Dispatch `stage-decomposer`** (single, readonly). It produces the proposed two-level roadmap the user reviews **before** any plan files are written. Wait for the return.\n\nThe decomposer works top-down:\n\n1. **Foundations → Pie 1.** The canned foundation slices are the early slices of **Pie 1** (`review: boundary`):\n   - Slice 1.1: design-system gate\n   - Slice 1.2: CI\u002FCD scaffold\n   - Slice 1.3: env-setup gate\n   - Slice 1.4: db-schema foundation (only if Q3 = Yes)\n2. **Features → Slices.** Every PRD Section 2 feature defaults to **≥2 slices**: (a) shell slice: route, layout, empty\u002Floading\u002Ferror states; (b) data slice: queries, mutations, polish, edge cases. Tiny features (e.g. a static page) may be one slice.\n3. **Group Slices into Pies.** Bundle low-cross-coupling slices into **coherent chapters of usually 3 to 8 slices** (e.g. \"Blog Editor\" = the editor frontend slice + the server-actions slice + the publish-flow slice). Each Pie is the unit of `\u002Fsell-pie` autonomy, the PR, the worktree, and the HITL checkpoint. Foundations are Pie 1 (tracked via the `## Prep` gate); feature pies are Pie 2 onward. A small app's pie may hold 1 or 2 slices when the app has no more to give it; never pad a pie to reach 3.\n4. **Set `review:` per pie.** Default every pie to `review: boundary` (autonomous; one HITL at the pie boundary). Flag a pie `review: continuous` (forces `\u002Fsell-pie` into `\u002Fsell-slice` mode for the whole pie) when it is sensitive: **Payments, Auth, real-data migrations**, or anything the PRD marks high-risk. The decomposer proposes the `review:` value per pie; the user confirms it at approval. **Under `run.unattended: true`, every pie is `review: boundary`**, sensitive ones included: the operator chose hands-off for the whole run. Record one ticket decision line naming the pies that would otherwise have been `continuous`.\n5. **Tag each slice:** `mvp:` per Q1; `type:` (`design-system | ci-cd | env-setup | db-schema | frontend | backend | full-stack | infrastructure`); `depends_on:` with only lower-numbered slices, never forward references. Within a pie, a slice's `slice` id is `\"\u003Cpie>.\u003Cindex>\"` (e.g. `\"2.6\"`).\n6. **Band check, right-sized.** The **20 to 30 feature-slice band is a ceiling for large apps, not a target.** Size the roadmap to the PRD: a small brief (a private single-user tool, a handful of Section 2 features) gets few pies and few slices, for example 1 to 3 feature pies and well under 20 slices. Never pad to reach the band: no filler slices, no splitting a small feature into shell and data slices when one slice holds it, no pie invented to fill a count. A pie of a small app may hold fewer than 3 slices when the app has no more to give it. `stages.targetFeatureStages`, when set, still overrides this sizing. Cross-check PRD Section 7 (Out of Scope); never propose work the PRD excludes. Pass this right-sizing rule to `stage-decomposer` with the PRD.\n7. **User flow per pie (optional).** For each pie with a user-facing flow, the decomposer returns `user_flow`: 3 to 7 ordered steps, each naming the slice id in that pie that owns it. A backend-only pie has none. The flow is the source of each owning slice's one user-outcome Exit line.\n\n**Present the proposed Pie\u002FSlice tree to the user for approval before writing any files**: pies with their `review:` annotation, slices nested under each pie with type and `depends_on`. The user can re-bundle pies, re-split slices, or override any `review:` value here. Show each pie's `User flow` steps with their owning slice ids.\n\n**Under `run.unattended: true` the roadmap is auto-approved.** Show nothing and wait for nothing. Append one decision line to the order ticket (`- cook-pizzas · roadmap approved: \u003CP> pies, \u003CS> feature slices, all review: boundary · unattended run`) and one **Progress** line with the same counts, then go straight to Phase 3.\n\n**Unowned flow steps (a warning, never a block).** When any `user_flow` step has no owning slice id, or names a slice id that does not exist in the proposed tree, add one line to this same approval prompt, listing every such step: `Decomposition warning: unowned flow step(s): \"\u003Cstep>\" (Pie N). Recommended: re-bundle now, while it is free.` It is informational: the operator may approve anyway, and the synthesizer then writes the step with `- no owning slice`. It adds no new question and no new human step; when every step is owned, the line is not shown. Under `run.unattended: true`, re-bundle the step into the slice that best owns it when one clearly does; otherwise leave it unowned. Either way, record it as a decision line in the ticket.\n\n### Phase 3: Write the Slices (schema-validated Workflow)\n\nOnce the user approves the roadmap, write every slice plan file in parallel. **Run as a `Workflow` (`parallel()` of one plan-writer per slice, a barrier, then the Phase 4 synthesizer consumes the writers' structured returns, no disk re-read). If `Workflow` is unavailable, fall back per [`references\u002Floop-workflow-fallback-pattern.md`](references\u002Floop-workflow-fallback-pattern.md).**\n\n> Each plan-writer writes **exactly one** file (disjoint paths), so this fan-out needs **no** worktree isolation. Only parallel file-mutating work with overlapping paths uses `isolation:'worktree'` per [`references\u002Fgit-worktree-standard.md`](references\u002Fgit-worktree-standard.md) §1; most ByTheSlice fan-out (including these writers) is disjoint-file and needs none.\n\n| Slice | Writer | Canned? | Condition |\n|---|---|---|---|\n| 1.4 (db-schema) | `db-schema-stage-writer` | Yes | Q3 = Yes only |\n| feature slices (Pies 2+) | `phased-plan-writer` | No | one `parallel()` branch per feature slice |\n\n**Workflow shape:**\n\n1. **`parallel()` fan-out**: one branch per slice, each spawning the registered writer by type (`agent(inputs, {agentType: \"bytheslice:phased-plan-writer\"})`; the 1.4 branch uses `bytheslice:db-schema-stage-writer`). Each writer writes **exactly one** file and returns a **structured envelope** (its slice's `path`, `pie`, `slice`, `name`, `type`, `depends_on`, `tasks_count`, `hitl_required`, plus the standard `status`\u002F`needs_human`\u002F`hitl_*`). The schema is the writer's Output Contract in `agents\u002Fphased-plan-writer.md` (and `agents\u002Fdb-schema-stage-writer.md` for 1.4).\n2. **Barrier**: the Workflow waits for every branch. The orchestrator **validates each return against the writer Output Contract schema** before proceeding. Under the in-context fallback (no `Workflow`), the orchestrator performs this schema validation **manually**; enforcement is otherwise lost (see the fallback ref).\n3. **Synthesizer step** (Phase 4) receives the **collection of structured returns** as its input and aggregates them. It does **not** re-read the slice files from disk; the returns are the source of truth for the checklist rows.\n\nSupply each writer with:\n- Slice metadata: `pie`, `slice` id (`\"\u003CN.M>\"`), short name, output path, one-sentence goal, `mvp:` flag, the pie's `review:` value (inherited by every slice in the pie)\n- Scope: features\u002Fsubtasks for this slice from the approved roadmap\n- Context: PRD excerpts (or absolute path), tech stack, prior-slice dependencies\n- Elicitation answers (Q1-Q12) as context\n- Absolute path to the project rules file\n- The pie's `user_flow` from the approved roadmap, when it has one (the writer turns the step its slice owns into its one user-outcome Exit line; see `agents\u002Fphased-plan-writer.md` \"User-outcome line\")\n\n> Writers emit `pie`\u002F`slice`\u002F`review` per the frontmatter contract in [`references\u002Fstage-frontmatter-contract.md`](references\u002Fstage-frontmatter-contract.md). A writer that hits a blocking ambiguity sets `hitl_required: true` + the matching `hitl_reason` in frontmatter and returns `needs_human` with `hitl_category`\u002F`hitl_context`; it never calls `ask_user_input_v0`. The orchestrator surfaces the prompt (see HITL Handling).\n\n### Phase 4: Master Checklist (last, consumes structured returns)\n\nAfter the Workflow barrier, **dispatch `master-checklist-synthesizer`** with the **collection of writer returns** (not file paths to re-read). It:\n\n1. Writes **Pie 1, Foundations** as the `## Prep` gate at the top; the gate IS Pie 1's completion tracker, with one checkbox per foundation slice 1.1 to 1.4 (always in this order):\n   ```\n   ## Prep (Pie 1 Foundations, run once before any feature work)\n   - [ ] Slice 1.1, Display case built       : run \u002Fset-display-case\n   - [ ] Slice 1.2, Quality line installed   : run \u002Ffinal-quality-check\n   - [ ] Slice 1.3, Shop open                : run \u002Fopen-the-shop\n   - [ ] Slice 1.4, DB schema foundation     : run \u002Fsell-slice on Slice 1.4 (handled internally; only if backend in scope)\n   ```\n   Drop the last line if Q3 = No (no DB). The heading MUST keep `## Prep` as its first word so `hooks\u002Flib\u002Fchecklist.sh` `bts_prep_counts` matches it.\n2. Builds the **feature Pies 2+** roadmap from the structured returns: `## Pie N: \u003Cname>` (with the `\u003C!-- review: boundary|continuous -->` annotation mirroring each pie's `review`), the pie's `**User flow:**` block when it has a `user_flow` (numbered `N. \u003Cstep> - Slice N.M` items, never headings), then `### Slice N.M: \u003Cname>` blocks with completion criteria + the per-slice Exit-criteria contract.\n3. Writes the rest of `docs\u002Fplans\u002F00_master_checklist.md`.\n4. Uses GitHub task-list checkboxes: `- [ ]`, one criterion per line. A bare `[ ]` with no list marker is plain text to every Markdown renderer, so consecutive criteria collapse into one paragraph and read as a horizontal blob on GitHub.\n\nSee [`references\u002Ftemplates.md`](references\u002Ftemplates.md) for the exact nested checklist template, including the `## Prep` gate (Pie 1, Foundations) and the `review:` annotation.\n\n### Phase 5: Linear stubs (if Q2 = Linear)\n\nIf the user chose Linear mirroring:\n1. Create one Linear milestone **per Pie** using the Linear MCP (the pie is the PR unit, so it maps to a milestone).\n2. Write milestone IDs back into each slice file's `linear_milestone:` frontmatter field (every slice in a pie shares the pie's milestone).\n\n### Phase R: `--repie`, convert a flat v4 checklist to Pies (explicit opt-in only)\n\nRuns **only** when invoked as `\u002Fcook-pizzas --repie` against an existing **flat v4** checklist. This is the sole path that mutates existing plan files, and it is never silent or automatic.\n\n1. **Confirm the conversion explicitly.** State plainly what will change: flat `## Stage N` headings → nested `## Pie N` \u002F `### Slice N.M`; frontmatter gains `pie`, `slice: \"\u003CN.M>\"`, `review:`. Show the proposed pie groupings (which stages bundle into which pie, and each pie's `review:` value) and the file-by-file diff plan. **Wait for the user to approve** before writing anything.\n2. **Group the existing stages into Pies.** Apply the same bundling heuristic as Phase 2 step 3: coherent chapters of usually 3 to 8 slices, low cross-coupling (a small project's pie may hold 1 or 2; never pad). Foundation stages 1 to 4 become Pie 1's slices 1.1 to 1.4. Renumber the rest into pies, preserving each stage's original `stage:` integer (kept for back-compat + stable sort) and original on-disk filename.\n3. **Set `review:` per pie.** Default `boundary`; flag Payments \u002F Auth \u002F real-data-migration pies `continuous`. The user confirms each at step 1.\n4. **Rewrite frontmatter + headings in place.** For each plan file, add `pie`, `slice`, `review` (do **not** remove `stage:`; dual-read keeps it). Update the master checklist headings to the nested shape. Preserve every existing Exit-criteria block verbatim; each slice keeps its own.\n5. **Verify dual-read.** After the rewrite, confirm both the flat (`stage`) and nested (`pie`\u002F`slice`) keys are present and consistent (a slice's `slice` leading number equals its `pie`). Report the conversion summary.\n\n> If no flat checklist exists, or one already nested (carries `pie`\u002F`slice`), `--repie` is a no-op: report that nothing needs converting. `--repie` never creates new slices or features; it only re-groups what is already there. For *adding* features, point the user at `\u002Fspecial-order`.\n\n## HITL Handling\n\nThe orchestrator owns every human prompt; subagents never call `ask_user_input_v0`.\n\n- **Interactive elicitation (Phase 1)** and the **roadmap approval (Phase 2)** \u002F **`--repie` confirmation (Phase R)** are first-class orchestrator prompts via `ask_user_input_v0`.\n- **Subagent-surfaced HITL.** When `stage-decomposer` or a Phase 3 writer returns `needs_human: true`, halt that branch and surface the agent's `hitl_question` to the user with its `hitl_category` (`prd_ambiguity` | `external_credentials` | `destructive_operation` | `creative_direction`) and `hitl_context`. Resolve, then re-dispatch only the affected branch.\n- A writer that hits the 6-task \u002F ~15-file slice cap returns `hitl_required: true` \u002F `hitl_reason: prd_ambiguity` proposing a split; surface it and re-bundle into the pie before continuing.\n- **Under `run.unattended: true`, nothing here waits on a human.** A writer's proposed split is applied as proposed and re-dispatched; any other writer or decomposer `needs_human` takes the option it recommends (or, with none, the one most consistent with the PRD and the ticket's **Answers**). Each resolution is one decision line in the order ticket. The return is never `needs_human`.\n\n## Progress Report Format\n\nLead with the verdict, then the structure:\n\n- **Phase 1 to 1.5:** \"Elicitation complete (12 Qs); project rules file written to `\u003Cpath>`.\"\n- **Phase 2:** \"Proposed roadmap: `\u003CP>` pies \u002F `\u003CS>` feature slices. Pies needing your eyes: `\u003Ccontinuous pies>`. Approve to write?\" (with the unowned-flow-step warning line above it only when a step has no owning slice)\n- **Phase 3 (Workflow):** \"Writing `\u003CS>` slices in parallel via Workflow… barrier reached; `\u003Cn>` returns schema-valid, `\u003Cm>` flagged HITL.\"\n- **Phase 4:** \"Master checklist written to `docs\u002Fplans\u002F00_master_checklist.md`, `\u003CP>` pies; Pie 1, Foundations as the `## Prep` gate at top, feature Pies 2+ below.\"\n- **`--repie`:** \"Converted `\u003Cn>` flat stages → `\u003CP>` pies. Dual-read verified.\"\n\n## Architecture conventions reference\n\nThis skill's `references\u002Farchitecture-conventions.md` is the **opinion-free baseline** injected into every project's rules file (universal web standards, performance facts, stack-conditional security baselines, framework-version syntactic facts, and the Variant A\u002FB structural split). Opinionated rules (naming, type-vs-interface, file organization, server-action patterns) are NOT in that file; they enter via Q9 imports and design-system code patterns. Document this clearly in the project rules file header.\n\n## Output structure\n\n```\ndocs\u002F\n├── plans\u002F\n│   ├── 00_master_checklist.md             (## Prep gate = Pie 1, Foundations, then nested ## Pie N \u002F ### Slice N.M for feature Pies 2+)\n│   ├── stage_4_db_schema_foundation.md    (Slice 1.4 of Pie 1, conditional on Q3 = Yes; filename unchanged)\n│   └── stage_N_\u003Cfeature>.md               (feature slices, grouped into Pies 2+)\n└── (existing PRD)\nCLAUDE.md or AGENTS.md (per Q12)\n```\n\n> The `## Prep` gate IS Pie 1, Foundations; its slices 1.1 to 1.3 point the user at the standalone foundation skills (`\u002Fset-display-case`, `\u002Ffinal-quality-check`, `\u002Fopen-the-shop`). Those run once each before any `\u002Fsell-pie` or `\u002Fsell-slice` invocation. They are NOT plan files; they are skills the user invokes directly.\n\n## Key principles\n\n- **Two levels:** Pies are coherent chapters of usually 3 to 8 slices with low cross-coupling (the unit of autonomy, PR, worktree, HITL); Slices are vertical deliverables (UI + route + data + tests for one user-facing thing).\n- **Right-sized, never padded.** The 20 to 30 feature-slice band is a ceiling for large apps, not a target. A small brief gets few pies and few slices, and a pie of a small app may have 1 or 2 slices; no filler slice, no needless shell and data split, no pie invented to fill a count. `stages.targetFeatureStages`, when set, still overrides.\n- **Hard cap per slice:** 6 tasks, ~15 files, completable in one Claude session.\n- **Plans carry contracts, not implementations.** Code fences hold commands, schema DDL, exported signatures and type shapes, and byte-exact config; behaviors, states, edge cases, and test cases are prose. Bodies are the builder's job, written against the real tree. See `agents\u002Fphased-plan-writer.md` \"Code budget\".\n- **One PR per Pie** (not per slice) in the default `pie-pr` delivery mode: per-slice work is commit + push to the pie branch; the PR opens at the pie boundary via `\u002Fbox-it-up`. Opt-in merge-per-slice delivery (`delivery.mode`, or an explicit autonomous-delivery run instruction) opens and merges one PR per slice instead.\n- **`review:` is a pie property:** `boundary` (default, autonomous) vs `continuous` (forces `\u002Fsell-slice` mode). Sensitive pies (Payments, Auth, real-data migrations) are `continuous`, except under `run.unattended: true`, where every pie is `boundary`.\n- **No forward references:** a slice may only reference packages, tables, or components built in prior slices.\n- **Exit criteria are testable AND transcript-verifiable:** every line in a slice's `**Exit criteria:**` block must be verifiable by reading the conversation alone: a command's exit code, a subagent's `overall: pass`, a captured screenshot, a file path Claude has read. This block is lifted verbatim into the `\u002Fgoal` condition by `\u002Fsell-slice` Phase 2.5 and is what `slice-tester` derives its bespoke plan from. See [`references\u002Ftemplates.md`](references\u002Ftemplates.md) → \"Exit-criteria contract (consumed by `\u002Fgoal`)\".\n- **Exit criteria follow the gate tiers:** tier 1 while coding, tier 2 (the slice's own tests, build, DB tests when the schema changes) before each commit, tier 3 (`slice-verifier`, the full local suite) once at slice end, tier 4 (CI's full suite) at the PR. Plans never demand the full ladder per task or a CI-only check per slice. See [`references\u002Ftemplates.md`](references\u002Ftemplates.md) → \"Gate tiers\".\n- **Design HITL is front-loaded** to the design-system slice (Pie 1) so feature pies compose pre-approved components and rarely stop for design.\n- **Auth slices always get the dev-mode auth helpers task**: one combined task bundling localhost auto-login (opt-in via `DEV_AUTH_BYPASS`) + seeded-user switcher banner; both sub-bullets ship together (see `references\u002Fcanned-stages\u002Fauth-dev-mode-switcher-task.md`).\n- **Never silently rewrite plan files.** Flat v4 checklists stay valid; conversion to pies happens only via explicit `--repie`.\n\n## CC-only primitives + Cursor fallback\n\n`Workflow` (Phase 3's parallel writers + barrier) is a Claude-Code-only primitive, as is `\u002Floop` (which `\u002Fsell-pie` drives the baked pies with). When either is unavailable (running in Cursor, hooks disabled, or any other reason), follow [`references\u002Floop-workflow-fallback-pattern.md`](references\u002Floop-workflow-fallback-pattern.md): detect availability → if absent, WebFetch the canonical docs → fall back to **in-context dispatch with orchestrator-side manual schema validation** of each writer return (enforcement is otherwise lost). Do NOT silently drop the Workflow's schema validation in fallback mode.\n\n## Slice frontmatter contract\n\nEvery slice file uses the contract in [`references\u002Fstage-frontmatter-contract.md`](references\u002Fstage-frontmatter-contract.md), including the v5 `pie`, `slice`, and `review` fields and the dual-read rule. See also [`references\u002Ftemplates.md`](references\u002Ftemplates.md).\n\n## Hard Constraints\n\n- **fresh mode never overwrites** an existing master checklist; refuse and redirect (to `\u002Fspecial-order`, or to `--repie` for a flat checklist).\n- **`--repie` is the only mutating path** and runs only on explicit `--repie` + user confirmation. Never auto-convert; never create new slices.\n- **Writers write exactly one file each** and return structured envelopes; the synthesizer consumes returns, not disk.\n- **Schema-validate every writer return** at the Workflow barrier (manually in the in-context fallback).\n- **Checkboxes are GitHub task-list items** in generated files: `- [ ]` \u002F `- [x]`, one per line. Never a bare `[ ]` without the list marker (it does not render as a list).\n- **No platform-specific references**: use \"project rules file\", not \"cursor rules\" or \"claude rules\".\n- **No forward references** in any slice's `depends_on`.\n- **Subagents never call `ask_user_input_v0`**: they set `needs_human` + `hitl_*`; the orchestrator prompts.\n\n## Completion checklist\n\n- [ ] All 12 elicitation questions answered and answers written to project rules file\n- [ ] Project rules file assembled with correct layering: baseline → Q9 imports → design-system patterns\n- [ ] Pie\u002FSlice roadmap presented to user and approved (pies, `review:` per pie, slices nested with type + `depends_on`)\n- [ ] db-schema slice (Slice 1.4) plan file written if Q3 = Yes\n- [ ] All feature slice files written via the Phase 3 Workflow (`parallel()` writers, barrier)\n- [ ] Every writer return schema-validated against the Output Contract (manually if `Workflow` unavailable)\n- [ ] All slice files include valid YAML frontmatter per `references\u002Fstage-frontmatter-contract.md` (incl. `pie`\u002F`slice`\u002F`review`)\n- [ ] Master checklist synthesized from the structured returns (not disk re-read): Pie 1, Foundations as the `## Prep` gate at top, then feature Pies 2+ as nested `## Pie N` \u002F `### Slice N.M` with `review:` annotations\n- [ ] Linear stubs created if Q2 = Linear (one milestone per pie; `linear_milestone` fields populated)\n- [ ] (`--repie` only) Flat checklist converted on explicit opt-in; dual-read verified; no new slices invented\n- [ ] Every checkbox in generated files is a `- [ ]` task-list item (no bare `[ ]` lines)\n- [ ] No platform-specific references in generated files\n\n## Return contract\n\n```yaml\nstatus: complete | failed | needs_human\nsummary: \u003Cone paragraph: N pies \u002F S feature slices written, or the --repie conversion result>\nmode: fresh | refuse | repie\nartifacts:\n  - docs\u002Fplans\u002F00_master_checklist.md\n  - \u003Cslice plan file paths>\n  - \u003Cproject rules file path>\npies: \u003Cint>\nfeature_slices: \u003Cint>\nneeds_human: false | true\nhitl_category: null | \"prd_ambiguity\" | \"external_credentials\" | \"destructive_operation\" | \"creative_direction\"\nhitl_question: null | \"\u003Cplain-language question if a writer or the decomposer was blocked>\"\nhitl_context: null | \"\u003Cwhat triggered this>\"\n```\n",{"name":5,"triggers":47,"description":7,"user-invocable":63},[48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],"\u002Fbytheslice:cook-pizzas","\u002Fcook-pizzas","cook the pizzas","make the pies","prep the pies","\u002Fbytheslice:plan-phases","\u002Fplan-phases","plan phases","break into phases","phased plan","create a development plan","decompose the prd","repie","re-pie","convert flat checklist to pies",true,"main","fed8bedadf83cf55669447e6c532d4e20a9aaf65","skills\u002Fcook-pizzas",1,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice","https:\u002F\u002Fgithub.com\u002Fsteve-piece","2026-11-14 08:45:19",{"source":8,"skillName":5,"commands":72,"prompt":82,"zipAvailable":63},[73,76,79],{"tool":74,"command":75},"npx","npx skills add steve-piece\u002Fbytheslice --skill cook-pizzas",{"tool":77,"command":78},"bunx","bunx skills add steve-piece\u002Fbytheslice --skill cook-pizzas",{"tool":80,"command":81},"pnpm","pnpm dlx skills add steve-piece\u002Fbytheslice --skill cook-pizzas","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002FSKILL.md",[84,90,94,98,102,106,110,114,118,122,126,130,134,138,142,146],{"path":85,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":88,"sourceHtmlUrl":89},"agents\u002Fdb-schema-stage-writer.md","REFERENCE","参考文档",5029,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Fagents\u002Fdb-schema-stage-writer.md",{"path":91,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":92,"sourceHtmlUrl":93},"agents\u002Fmaster-checklist-synthesizer.md",10135,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Fagents\u002Fmaster-checklist-synthesizer.md",{"path":95,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":96,"sourceHtmlUrl":97},"agents\u002Fphased-plan-writer.md",16975,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Fagents\u002Fphased-plan-writer.md",{"path":99,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":100,"sourceHtmlUrl":101},"agents\u002Frules-assembler.md",5826,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Fagents\u002Frules-assembler.md",{"path":103,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":104,"sourceHtmlUrl":105},"agents\u002Fstage-decomposer.md",6926,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Fagents\u002Fstage-decomposer.md",{"path":107,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":108,"sourceHtmlUrl":109},"references\u002Farchitecture-conventions.md",5789,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Freferences\u002Farchitecture-conventions.md",{"path":111,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":112,"sourceHtmlUrl":113},"references\u002Fcanned-stages\u002Fauth-dev-mode-switcher-task.md",6966,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Freferences\u002Fcanned-stages\u002Fauth-dev-mode-switcher-task.md",{"path":115,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":116,"sourceHtmlUrl":117},"references\u002Fcanned-stages\u002Fstage-1-design-system-gate.md",4482,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Freferences\u002Fcanned-stages\u002Fstage-1-design-system-gate.md",{"path":119,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":120,"sourceHtmlUrl":121},"references\u002Fcanned-stages\u002Fstage-2-ci-cd-scaffold.md",4727,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Freferences\u002Fcanned-stages\u002Fstage-2-ci-cd-scaffold.md",{"path":123,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":124,"sourceHtmlUrl":125},"references\u002Fcanned-stages\u002Fstage-3-env-setup-gate.md",6136,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Freferences\u002Fcanned-stages\u002Fstage-3-env-setup-gate.md",{"path":127,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":128,"sourceHtmlUrl":129},"references\u002Fcanned-stages\u002Fstage-4-db-schema-foundation.md",4429,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Freferences\u002Fcanned-stages\u002Fstage-4-db-schema-foundation.md",{"path":131,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":132,"sourceHtmlUrl":133},"references\u002Fgit-worktree-standard.md",14400,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Freferences\u002Fgit-worktree-standard.md",{"path":135,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":136,"sourceHtmlUrl":137},"references\u002Fgoal-fallback-pattern.md",7070,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Freferences\u002Fgoal-fallback-pattern.md",{"path":139,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":140,"sourceHtmlUrl":141},"references\u002Floop-workflow-fallback-pattern.md",24174,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Freferences\u002Floop-workflow-fallback-pattern.md",{"path":143,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":144,"sourceHtmlUrl":145},"references\u002Fstage-frontmatter-contract.md",11849,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Freferences\u002Fstage-frontmatter-contract.md",{"path":147,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":148,"sourceHtmlUrl":149},"references\u002Ftemplates.md",17289,"https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fcook-pizzas\u002Freferences\u002Ftemplates.md",[151,159,185,206,228,250],{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":158},"01M7DTP42MXMVB51NHQGGWV6P6","dashboard","Open the project's approved 3D kitchen in the native Browser pane with a verified localhost state connection, or with --lobby the machine-level lobby of every ByTheSlice project.","https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fdashboard\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":42},"01M6JK6TG7HJ54TN5XYD8N3QE8","special-order","Cook a slice with the customer's specifications on the spot: add new features mid-flight to an existing project. Auto-detects project type and extends the master checklist with new stages.","https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fspecial-order\u002FSKILL.md",[],[166,31,167,168,169,170,25,171,172,173,21,174,28,175,176,177,178,179,180,181,182,183,184,24],"special order","project","auto","bolt","customer","master","add","opus","custom","Existing","type","with","high","spot","specifications","about","new","request","extend",{"skillNo":186,"name":187,"nameZh":6,"description":188,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":189,"categories":190,"keywords":191,"publishedAt":42},"01M6JK6K6SH4N8Q597D3ABRRMR","setup-shop","Start the oven, check ingredients, prep the shop. Bootstrap a new project or configure ByTheSlice in an existing one. First-time install, system-wide config, or per-project setup.","https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-shop\u002FSKILL.md",[],[38,192,193,194,31,195,167,196,197,198,199,41,200,201,202,173,203,204,205,28,182],"setup shop","setup","SET","monorepo","time","up","open","configure","config","install","start","new project","for","system",{"skillNo":207,"name":208,"nameZh":6,"description":209,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":210,"categories":211,"keywords":212,"publishedAt":42},"01M6JK6CX6DNV9EE9VH6H3YRD0","set-display-case","Build the display case the pies will sit in, bootstrap your design system: tokens, Tailwind config, design rules, and the operator-only \u002Flibrary preview route. Run once before \u002Fsell-slice; also invocable standalone on any project.","https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fset-display-case\u002FSKILL.md",[],[194,213,214,215,216,167,217,197,218,219,220,221,222,223,200,201,224,225,226,227],"display","case","set display case","standalone","Tailwind","init","design","only","preview","route","run","operator","design-system","library","design system",{"skillNo":229,"name":230,"nameZh":6,"description":231,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":232,"categories":233,"keywords":234,"publishedAt":42},"01M6JK629AYG2B1NSSDYQAPWP2","sell-slice","Sell a customer their slice - the high-touch single-slice delivery loop. Execute one slice from your master checklist as an interactive spine (prep gate · recon · build-plan auth · \u002Fgoal · branch) + Workflow A (produce) + library gate + Workflow B (verify-once). Run me repeatedly, one fresh chat per slice. For autonomous whole-pie baking use \u002Fsell-pie.","https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fsell-slice\u002FSKILL.md",[],[235,236,24,237,238,239,40,240,223,171,226,241,242,204,243,244,245,246,178,247,34,248,249],"sell slice","sell","branch","loop","fresh","spine","ship","as","touch","use","interactive","chat","build","deliver","baking",{"skillNo":251,"name":252,"nameZh":6,"description":253,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":254,"categories":255,"keywords":256,"publishedAt":42},"01M6JK5RGMT1ZDVNG9CEHQF61Q","sell-pie","Bake a whole Pie autonomously - the v5 forefront delivery loop. A \u002Floop-driven baker that drives ONE Pie (a coherent chapter, usually 3 to 8 slices) to \"ready for review\" without per-slice prompting; each slice runs the context-separated build→test→verify→fix Workflow, commits + pushes (no PR), and advances; when every slice is [x] it stops at the pie boundary and opens one PR via \u002Fbox-it-up. Refuses flat v4 checklists (points you at \u002Fcook-pizzas --repie). For a continuous-review pie (review=continuous) it runs in high-touch \u002Fsell-slice mode. Opt-in merge-per-slice delivery (delivery.mode, or an explicit autonomous-delivery run instruction) instead gives each slice its own branch, PR and green-CI merge; opt-in ship-once delivery (delivery.mode, set by \u002Fpizza-party) merges each pie into one local ship branch on local gates only and ships one PR at the end. The four blocking HITL categories halt the loop instead of rescheduling (an unattended ship-once run defers the slice instead). Use when the user runs \u002Fsell-pie, says \"sell a pie\", \"bake the pie\", \"run the next pie\", \"loop the pie\", or wants one whole chapter delivered hands-off. For a single careful slice use \u002Fsell-slice; for the whole app end to end use \u002Fpizza-party.","https:\u002F\u002Fgithub.com\u002Fsteve-piece\u002Fbytheslice\u002Fblob\u002Fmain\u002Fskills\u002Fsell-pie\u002FSKILL.md",[],[257,236,194,258,31,259,237,260,261,262,197,263,264,265,220,266,238,267,268,269,248,223,270,33,241,271,272,273],"sell pie","categories","ready","green","mode","end","fix","ci","local","autonomous","workflow","you","review","at","context","prompting","commits"]