ndisisnd/msg / .claude/skills/plan-pm
plan-pm
VerifiedPrincipal PM skill — the autonomous PRD writer. Consumes a graded, fleshed-out row from the INTAKE.md backlog (idea, goal, type, grade) and drafts the full PRD solo — feature/acceptance table, edge cases, error handling — saved to features/planned/prd-[n]-[feature-slug]/. The requirements interview lives in /intake now, not here. Treats the row as settled and picks its own few follow-up questions (refs/principles.md); pauses ONLY for that one batch and for breaking/critical touches. --update edits an existing PRD's content and syncs its intake row; --migrate converts old PRDs to the current template. --review [on|off] runs plan-review at the end (this run, or saved per project). Refuses requests that would skip the PRD stage entirely.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 12.3 KB |
| refs/error-checklist.md | markdown | 2.8 KB |
| refs/principles.md | markdown | 2.4 KB |
| refs/protocol-migrate.md | markdown | 8.1 KB |
| refs/protocol-pm.md | markdown | 17.4 KB |
| refs/protocol-sub.md | markdown | 6.7 KB |
| refs/protocol-update.md | markdown | 6.9 KB |
| refs/template-prd.md | markdown | 11.8 KB |
refs/protocol-sub.md
View on GitHub---
name: Sub-PRD Protocol
description: The --sub mode deltas for plan-pm — parent resolution, idea pre-seed, numbering/placement, and frontmatter, layered over the standard five-step autonomous protocol
type: reference
---
# Sub-PRD mode (`--sub`)
A sub-PRD is a numbered follow-up (`prd-<n>.<m>`) that captures additional changes or fixes to an existing parent PRD without opening a new top-level feature or cutting a new branch. It runs the **identical** five-step autonomous protocol in `refs/protocol-pm.md` — same autonomous drafting, same population, same tune/eng handoffs — with exactly four deltas, all resolved before Step 1 emits. The intake-only rule holds here too: a sub-PRD gets its own ledger row (D2), it just comes from the parent rather than the backlog picker.
**D1 — Resolve the parent PRD (priority order).** Determine the parent before anything else. Try each in turn; stop at the first that resolves:
1. **Explicit** — a PRD path or number passed with `--sub` (e.g. `/plan-pm --sub 2` or `/plan-pm --sub features/planned/prd-2-habit-tracking/prd-2-habit-tracking.md`). Resolve it lane-agnostically to the matching PRD directory — search `features/{planned,wip,done}/prd-<parent-n>-*/` then the legacy flat `features/prd-<parent-n>-*/`, first hit wins. If an explicit value is given but matches no such directory in any lane → hard-refuse: `Hard failure: --sub parent '<value>' does not match any PRD under features/.` and stop.
2. **Infer from branch** — run `git branch --show-current`; if it matches `feat/prd-<n>-<slug>`, that PRD is the parent (the user is typically already on the parent's branch when asking for follow-up work). Confirm the PRD directory exists in some lane (`features/{planned,wip,done}/prd-<n>-<slug>/` or legacy flat `features/prd-<n>-<slug>/`).
3. **Pick from a list** — otherwise, `AskUserQuestion` listing open PRDs (glob all lanes `features/{planned,wip,done}/prd-*/prd-*.md` plus legacy flat `features/prd-*/prd-*.md`, deduped by id, and exclude any that are themselves sub-PRDs — i.e. whose id contains a `.`). The user selects the parent. If no top-level PRDs exist at all, hard-refuse: `Hard failure: no parent PRD found for --sub — run /plan-pm to create a top-level PRD first.` and stop.
Store the resolved parent as `parent_id` = `prd-<parent-n>-<parent-slug>` and `parent_dir` = its resolved directory (whatever lane — `planned/`, `wip/`, `done/`, or the legacy flat path — it currently sits in; the resolver locates it lane-agnostically), and read its frontmatter (`feature`) — needed for D3/D4.
**D2 — Number the sub-PRD, seed the idea from the parent, then capture its own intake row (Step 1).** The sub-PRD and its row share one number, `<parent-n>.<m>` — PRD number = row number holds for sub-PRDs too. Resolve the minor first:
```bash
S=.claude/scripts/script-prd-number; [ -f "$S" ] || S="$HOME/.claude/scripts/script-prd-number"; bash "$S" sub <parent-n>
```
Store the output as `m`. It counts both existing sub-PRD folders and existing `#<parent-n>.<m>` ledger rows, so it never hands out a minor that is already taken.
The parent supplies the idea and goal, not the backlog picker. Compose the working idea as `Sub-PRD of prd-<parent-n>-<parent-slug>: <the user's stated follow-up scope>` (parent `feature` from its frontmatter for context) — then **capture it as an `INTAKE.md` row of its own** at the dotted id, through intake's capture mode:
```
Skill("intake", "--sub-row <parent-n>.<m> Sub-PRD of prd-<parent-n>-<parent-slug>: <follow-up scope>")
```
Every PRD in the repo has an intake ancestor, sub-PRDs included — that is what keeps `plan-review` check 3 (intent fidelity) from ever being silently skipped. Three points on the row:
- **Its id is `<parent-n>.<m>`, and its `parent` cell is `PRD-<parent-n>`.** Intake writes both (its `protocol-intake.md` § Sub-PRD rows). `status` keeps tracking backlog / in-progress / completed; the relationship lives in `parent`, never in `status`.
- **It is marked for humans too.** The `idea` cell leads with `Sub-PRD of prd-<n>-<slug>:`; the `prd` cell stamped at Step 5 carries the dotted id `prd-<n>.<m>-<slug>` (D1 step 3 keys off the same dot).
- **The grade is re-derived, never inherited.** `intake` grades the row against its own rubric like any other. A follow-up's complexity is its own — inheriting a large parent's `C:` band would misrepresent a small fix. `type` stays `feature`/`bug` per the nature of the work; it is not overloaded with the structural relationship.
Hold the row's `#` (`<parent-n>.<m>`) for the Step 5 stamp, then drop into Step 2.
**D3 — Place the sub-PRD (Step 3 Part 1 + 2).** Skip the top-level `script-prd-number prd` call: the number is `<parent-n>.<m>` from D2. Derive `sub_slug` (kebab-case, ≤6 words) from the follow-up scope. Create the sub-PRD **nested inside the parent's existing folder — whatever lane (`planned/`, `wip/`, `done/`, or the legacy flat path) that folder currently occupies**. A sub-PRD gets **no lane slot of its own**: it rides the parent's lane and only ever relocates when the parent folder is moved. Use the full `refs/template-prd.md` structure (not a delta doc), writing `<parent_dir>` for the parent directory resolved in D1:
```
<parent_dir>/prd-<parent-n>.<m>-<sub_slug>/prd-<parent-n>.<m>-<sub_slug>.md
```
**D4 — Frontmatter (Step 3 Part 2).** Same fields as a top-level PRD, with:
- `name`: `prd-<parent-n>.<m>-<sub_slug>`
- `parent`: `prd-<parent-n>-<parent-slug>` — **new field, sub-PRD only.** This is the field `plan-em`/`eng --build` read to resolve the shared branch (a sub-PRD never gets its own branch).
- `summary`: authored fresh for the sub-PRD's own follow-up scope (2–3 single-line sentences), exactly as a top-level PRD — do not inherit the parent's.
- `intake`: `#<parent-n>.<m>` — the sub-PRD's own dotted row from D2, never the parent's row.
- All other fields (`status: backlog`, `reviewed: no`, `created`, `deps`) exactly as a top-level PRD. `parent` is the only field a sub-PRD has that a top-level PRD does not; there is nothing to inherit from the parent beyond it, because v5.4 removed the `module` and `platform` fields that used to be inherited.
**Lifecycle:** unchanged. A sub-PRD runs the full pipeline with no stage skipped — `plan-pm --sub` (Steps 1–5) → `plan-review` → `plan-em` → `eng --build`. Step 5 stamps the D2 row (`status: in-progress`, `prd: prd-<parent-n>.<m>-<sub_slug>`) and terminates exactly as for a top-level PRD, using the nested sub-PRD path.
Everywhere the steps in `refs/protocol-pm.md` write the drafted PRD's own path `features/planned/prd-[n]-[feature_slug]/prd-[n]-[feature_slug].md`, substitute the nested sub-PRD path from D3 when in `--sub` mode — it lands inside the parent's existing folder in whatever lane the parent occupies, not in `planned/`.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 469k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |