--- name: product-boot description: Use when product or feature work starts, or a PDR-worthy decision (scope, persona, monetization) emerges — injects the PDR index (docs/adlc/memory/pdr/, legacy .adlc/memory/pdr/ fallback) as session context and pairs the decision with capture via /product-specify; invoked from team-boot's Class Boots catalog. --- # product-boot ## Overview One of the five **class boots** surfaced by `team-boot`'s Class Boots catalog. `team-boot` injects the always-relevant team context (constitution, CDR index, skills registry) at session start; this skill loads the **product decision layer** on demand — the Accepted PDR index from project memory — and pairs it with decision capture so new product choices are recorded (`/product-specify`) rather than evaporating. Reading decisions and recording decisions are one loop: existing PDRs inform the work; decisions made during the work flow back into the same record system. ## When to Use Invoke at the START of a matching task — before planning the todo list and before implementation — so the PDR context informs planning. Never defer to session end. Invoke when: - Starting product work (PRD generation, feature definition, roadmap planning, GTM decisions). - The session turns product-shaped mid-flight: feature scope, persona definition, monetization, pricing, or target-market choices emerge. - Reviewing an existing product's decision backdrop (`/product-analyze`, `/product-roadmap` benefit from the loaded index). ## Core Process ### Step 1: Locate the PDR Index From the current working directory (do NOT walk up parent directories): 1. Primary: `docs/adlc/memory/pdr/pdr.md` (generated by `/product-implement`; rows start with `| PDR`) 2. Fallback: `.adlc/memory/pdr/pdr.md` (legacy layout, pre-ADR-401) If neither exists but `docs/adlc/memory/pdr/PDR-*.md` or legacy `.adlc/memory/pdr/PDR-*.md` files do, synthesize a lean table from each file (ID from filename; Feature-Area/Status/Title from frontmatter or first heading). If the directory is empty or absent, report `0 PDRs` — never fabricate rows. When no local memory index exists in the current working directory and the directory sits inside a workspace (detected via a `.gitmodules` marker in an ancestor), read the workspace root's `docs/adlc/memory/` index instead (ADR-401 dual-read order applies: `docs/adlc/memory` first, legacy `.adlc/memory` fallback). ### Step 1b: Read the PDR Drafts Index Check `.adlc/drafts/pdr/` for `PDR-*.md` files with `status: proposed` in frontmatter. These are draft PDRs pending clarification. Collect ID / Title / Type / Status / Date from each file. If the directory is empty or absent, report `0 pending drafts`. ## Absent Context If `team-boot` injected no team context this session (no Team Context & Decisions section in the first user message — unconfigured project or hook failure): say so in one line, emit the section heading with a `0 PDRs matched (no team context injected — run /team-setup)` source line, and continue the task on the directly-read PDR index. Never treat a missing injection as an empty record set. Recovery: run `/team-diagnose`. ### Step 2: Inject PDR Context (Output Contract) Emit before the task answer: ```markdown ## PDR Context | ID | Feature-Area | Status | Title | |--|--|--|--| | PDR-048 | triage | Accepted | AI triage scoring | _Searched N PDRs, K matched._ ## Drafts Pending Review | ID | Title | Type | Status | Date | |----|-------|------|--------|------| | (from .adlc/drafts/pdr/) | _N pending drafts — run /product-clarify to review._ ``` - Render ID / Feature-Area / Status / Title from the index (the full index also carries Category, Date, Owner — read the individual `PDR-*.md` when a task matches a row). - `N` = total index rows; `K` = rows relevant to the current task. **K MUST equal the table rows shown.** 0 rows matched → emit the section heading + the `_Searched N PDRs, K matched._` line only — no table. A 0-row table header collapses into unrendered single-line markdown; never emit one. Emit the section as markdown blocks — heading, table rows, and counts line each on their own lines. ### Step 3: Capture Product Decisions | Trigger | Action | |---------|--------| | Feature scope change, in/out decisions | PDR → direct write to `.adlc/drafts/pdr/` | | Persona definition or revision | PDR → direct write to `.adlc/drafts/pdr/` | | Monetization, pricing, target-market choice | PDR → direct write to `.adlc/drafts/pdr/` | | PDR-class decision already in the ledger | verify capture happened; if not, re-surface | Add/refresh rows in **Team Context & Decisions** (ID | Name | Type | Rel | Status | Clarify) for every PDR-class decision detected this session — including ones from before this boot was invoked. Mirror each decision as a task-list todo (draft → `/product-clarify` at session end); after code-modifying tasks, add a trailing todo to sweep Team Context & Decisions until _Unrecorded: 0 pending · Unclarified: 0 drafts_ (a draft leaves Unclarified only via its clarify skill or an explicit user handoff to a named clarify or execute skill). At session end, deliver the clarify prompt naming each captured PDR draft in `.adlc/drafts/pdr/` (ID + skill); if the user defers clarify, mark those rows handed off. ## Failure Handling - Missing index + missing records → emit the section heading + `_Searched 0 PDRs, 0 matched._` only — no table — and continue the user's task; never block. - Unparseable index rows → skip malformed rows, note the skip count. ## Red Flags - Fabricating PDR rows or inflating K beyond the table shown. - Injecting the index but ignoring capture — the pairing is the point. - Walking up parent directories to find `.adlc/`. ## Verification - [ ] PDR Context table emitted with `_Searched N PDRs, K matched._` (K = table rows). - [ ] Detected PDR-class decisions added as Team Context & Decisions rows.