PRD to SPEC Generator
User-facing entry point for the PRD → SPEC pipeline. The user runs
/prd-to-spec and this skill dispatches to the companion babysitter
process via /babysitter:call (interactive, with breakpoints) or
/babysitter:yolo (non-interactive, auto-approve).
Usage
/prd-to-spec <PRD-path-or-inline-text>
Examples:
/prd-to-spec docs/active/feature-X-PRD.md
/prd-to-spec "Build a notification dashboard with real-time alerts"
Companion process
- Library path:
library/specializations/product-management/prd-to-spec.js
- Locally installed:
~/.a5c/processes/prd-to-spec.js
The process file is the source of truth for the pipeline. This skill
intentionally stays thin so users only need to remember /prd-to-spec.
What this skill does when invoked
Parse input — resolve the PRD path or capture the inline text.
Infer featureBranch — read the current git branch via
git branch --show-current. If it is main / develop / dev,
ask the user for a feature-branch name.
Detect optional inputs from the project context:
contextDoc — project conventions doc (default CLAUDE.md)
archiveDir — past SPEC archive directory (default empty)
failureLogPath — project-local failure-log.md (default empty)
secondaryReviewer — hint like codex, gemini, peer (default empty)
Ask the user to pick the run mode:
Run mode for the babysitter prd-to-spec process:
- Interactive (
/babysitter:call) — recommended. Pauses at
every breakpoint (discovery review, SPEC approval, etc.) for
explicit user confirmation.
- Auto / yolo (
/babysitter:yolo) — non-interactive. Skips
all breakpoints; auto-approves every gate. Use only when the
pipeline is well-tested and the inputs are trusted.
Default to option 1 if the user does not respond.
Dispatch by invoking the chosen babysitter command via the Skill tool:
For interactive:
Skill('babysitter:call', 'Run the product-management/prd-to-spec process with inputs: prdPath=<resolved>, featureBranch=<resolved>, contextDoc=<resolved>, archiveDir=<resolved>, failureLogPath=<resolved>, secondaryReviewer=<resolved>')
For auto / yolo:
Skill('babysitter:yolo', '<same instruction as above>')
Return the SPEC path and the execution prompt produced by the
process to the user.
Fallback (no babysitter runtime)
If neither /babysitter:call nor /babysitter:yolo is available:
- Read the process source at the location above.
- Execute each task's agent prompt manually, in phase order.
- Pause at every
ctx.breakpoint(...) for explicit user approval
(interactive equivalent) or skip every breakpoint (yolo equivalent),
matching the mode the user picked in step 4.
- Return the same outputs the process would have returned.
Optional Integration Hooks
All flow through the process inputs (none required):
- Tracker integration —
trackerHint input. Examples: jira
(/jira or acli jira workitem update), linear (CLI / MCP),
gh-issues (gh issue edit).
- Secondary reviewer —
secondaryReviewer input. Examples: codex
(/codex:review), gemini (/gemini-review), deep-verify-plan
(/deep-verify-plan), peer (notify a teammate).
- Pipeline framework for Phase 3 verification — examples: Dagster,
Airflow, dbt, Prefect, K8s preview.
- UI framework for Phase 3 verification — examples: Vite, Next,
Storybook.
The process works end-to-end without any of them.
Failure Log Mechanism
The process reads a project-local failure-log.md in Phase 1 to
internalize lessons from prior failed runs. Setup:
- Cross-project lessons:
~/.claude/skills/<your-namespace>/failure-log.md
- Project-specific lessons:
<repo-root>/.claude/failure-log.md
Each entry follows:
### [YYYY-MM-DD] <short-pattern-name>
**Context:** <what we tried to do>
**What went wrong:** <the failure mode in 1-2 sentences>
**Constraint going forward:** <the binding rule for future runs>
If the file doesn't exist, the process notes "no prior failures recorded"
and continues.
Pre-Push Personal Docs Check
The process executes this gate as part of Phase 7 (Deliver) of the
generated SPEC. Procedure:
- List candidates:
git diff --name-only origin/<base-branch>...HEAD
- Classify each file:
legitimate / personal-doc / ambiguous
- Block by default for:
SPEC*.md, PRD*.md, HANDOFF*.md,
SUMMARY*.md, *-NOTES.md, anything under docs/plans/, ai_docs/,
.claude/scratch/, tmp/, investigation-*, analysis-*,
playbook-*, AI-generated plans/specs not explicitly approved.
- Block-and-ask gate: per-file decision of
unstage / keep /
gitignore. Do NOT skip even if rushed.
- Proceed with push only after all blocked files are resolved.
Rules
- The skill itself does not produce the SPEC. It only sets up inputs
and dispatches to the process via
/babysitter:call or /babysitter:yolo.
- Default to
/babysitter:call (interactive) when in doubt.
- Never bypass user-approval breakpoints in interactive mode — they
are first-class in the process.
- The SPEC must be proportional to the task (the process honors this).
1---
2name: prd-to-spec
3description: "Convert an approved PRD into a phase-gated implementation SPEC. User-facing entry point that dispatches to the prd-to-spec babysitter process via /babysitter:call (interactive) or /babysitter:yolo (auto). Stack-agnostic."
4author: Yehuda Yungstein
5graph:
6 domains: [domain:software-engineering]
7 specializations: [specialization:product-management]
8 skillAreas: [skill-area:product-discovery, skill-area:roadmap-planning]
9 roles: [role:product-manager, role:product-analyst]
10 workflows: [workflow:product-discovery, workflow:competitive-analysis]
11metadata:
12 source: https://skillmd.com/skills/a5c-ai/prd-to-spec
13---
14
15# PRD to SPEC Generator
16
17User-facing entry point for the PRD → SPEC pipeline. The user runs
18`/prd-to-spec` and this skill dispatches to the companion babysitter
19process via `/babysitter:call` (interactive, with breakpoints) or
20`/babysitter:yolo` (non-interactive, auto-approve).
21
22## Usage
23
24```
25/prd-to-spec <PRD-path-or-inline-text>
26```
27
28Examples:
29- `/prd-to-spec docs/active/feature-X-PRD.md`
30- `/prd-to-spec "Build a notification dashboard with real-time alerts"`
31
32## Companion process
33
34- Library path: `library/specializations/product-management/prd-to-spec.js`
35- Locally installed: `~/.a5c/processes/prd-to-spec.js`
36
37The process file is the source of truth for the pipeline. This skill
38intentionally stays thin so users only need to remember `/prd-to-spec`.
39
40## What this skill does when invoked
41
421. **Parse input** — resolve the PRD path or capture the inline text.
432. **Infer `featureBranch`** — read the current git branch via
44 `git branch --show-current`. If it is `main` / `develop` / `dev`,
45 ask the user for a feature-branch name.
463. **Detect optional inputs** from the project context:
47 - `contextDoc` — project conventions doc (default `CLAUDE.md`)
48 - `archiveDir` — past SPEC archive directory (default empty)
49 - `failureLogPath` — project-local `failure-log.md` (default empty)
50 - `secondaryReviewer` — hint like `codex`, `gemini`, `peer` (default empty)
514. **Ask the user to pick the run mode:**
52
53 > Run mode for the babysitter `prd-to-spec` process:
54 >
55 > 1. **Interactive (`/babysitter:call`)** — recommended. Pauses at
56 > every breakpoint (discovery review, SPEC approval, etc.) for
57 > explicit user confirmation.
58 > 2. **Auto / yolo (`/babysitter:yolo`)** — non-interactive. Skips
59 > all breakpoints; auto-approves every gate. Use only when the
60 > pipeline is well-tested and the inputs are trusted.
61
62 Default to option 1 if the user does not respond.
63
645. **Dispatch** by invoking the chosen babysitter command via the Skill tool:
65
66 For interactive:
67 ```
68 Skill('babysitter:call', 'Run the product-management/prd-to-spec process with inputs: prdPath=<resolved>, featureBranch=<resolved>, contextDoc=<resolved>, archiveDir=<resolved>, failureLogPath=<resolved>, secondaryReviewer=<resolved>')
69 ```
70
71 For auto / yolo:
72 ```
73 Skill('babysitter:yolo', '<same instruction as above>')
74 ```
75
766. **Return** the SPEC path and the execution prompt produced by the
77 process to the user.
78
79## Fallback (no babysitter runtime)
80
81If neither `/babysitter:call` nor `/babysitter:yolo` is available:
82
831. Read the process source at the location above.
842. Execute each task's agent prompt manually, in phase order.
853. Pause at every `ctx.breakpoint(...)` for explicit user approval
86 (interactive equivalent) or skip every breakpoint (yolo equivalent),
87 matching the mode the user picked in step 4.
884. Return the same outputs the process would have returned.
89
90## Optional Integration Hooks
91
92All flow through the process inputs (none required):
93
94- **Tracker integration** — `trackerHint` input. Examples: `jira`
95 (`/jira` or `acli jira workitem update`), `linear` (CLI / MCP),
96 `gh-issues` (`gh issue edit`).
97- **Secondary reviewer** — `secondaryReviewer` input. Examples: `codex`
98 (`/codex:review`), `gemini` (`/gemini-review`), `deep-verify-plan`
99 (`/deep-verify-plan`), `peer` (notify a teammate).
100- **Pipeline framework** for Phase 3 verification — examples: Dagster,
101 Airflow, dbt, Prefect, K8s preview.
102- **UI framework** for Phase 3 verification — examples: Vite, Next,
103 Storybook.
104
105The process works end-to-end without any of them.
106
107## Failure Log Mechanism
108
109The process reads a project-local `failure-log.md` in Phase 1 to
110internalize lessons from prior failed runs. Setup:
111
112- Cross-project lessons: `~/.claude/skills/<your-namespace>/failure-log.md`
113- Project-specific lessons: `<repo-root>/.claude/failure-log.md`
114
115Each entry follows:
116
117```markdown
118### [YYYY-MM-DD] <short-pattern-name>
119
120**Context:** <what we tried to do>
121**What went wrong:** <the failure mode in 1-2 sentences>
122**Constraint going forward:** <the binding rule for future runs>
123```
124
125If the file doesn't exist, the process notes "no prior failures recorded"
126and continues.
127
128## Pre-Push Personal Docs Check
129
130The process executes this gate as part of Phase 7 (Deliver) of the
131generated SPEC. Procedure:
132
1331. List candidates: `git diff --name-only origin/<base-branch>...HEAD`
1342. Classify each file: `legitimate` / `personal-doc` / `ambiguous`
1353. Block by default for: `SPEC*.md`, `PRD*.md`, `HANDOFF*.md`,
136 `SUMMARY*.md`, `*-NOTES.md`, anything under `docs/plans/`, `ai_docs/`,
137 `.claude/scratch/`, `tmp/`, `investigation-*`, `analysis-*`,
138 `playbook-*`, AI-generated plans/specs not explicitly approved.
1394. Block-and-ask gate: per-file decision of `unstage` / `keep` /
140 `gitignore`. Do NOT skip even if rushed.
1415. Proceed with push only after all blocked files are resolved.
142
143## Rules
144
145- The skill itself does not produce the SPEC. It only sets up inputs
146 and dispatches to the process via `/babysitter:call` or `/babysitter:yolo`.
147- Default to `/babysitter:call` (interactive) when in doubt.
148- Never bypass user-approval breakpoints in interactive mode — they
149 are first-class in the process.
150- The SPEC must be proportional to the task (the process honors this).