PRD Orchestrator
Overview
Turn a one-line requirement or requirement document/path into a complete, ordered PRD and Plan bundle that can be executed by codex exec. This skill produces mother PRD, verify tooling PRD, ordered sub-PRDs, per-PRD plans, a runner script, and reporting schema.
How to invoke
- $prd-orchestrator
- $prd-orchestrator
- $prd-orchestrator <path/to/requirements.md>
Working agreements / Rules
- Always follow the merged instruction chain from AGENTS and rules.
- Global layer (in priority order):
- $CODEX_HOME/AGENTS.override.md (if exists and non-empty), else $CODEX_HOME/AGENTS.md
- $CODEX_HOME/rules/**
- Project layer (current repo tree):
- /AGENTS.override.md or /AGENTS.md
- Any nested AGENTS.override.md or AGENTS.md in subdirectories
- /rules/** and any nested rules/ directories
- Conflict resolution: more specific scope overrides more general (subdir > repo > global).
- If rules restrict command execution (prompt/allow/forbidden), obey strictly.
Inputs
- A single sentence requirement, or
- A requirement document text or file path.
Outputs (must exist in project root)
- prds/0--mother.md
- prds/1-verify-tooling.md
- prds/2-.md ... prds/n-.md
- plans/1-verify-tooling.md
- plans/2-.md ... plans/n-.md
- docs/ASSUMPTIONS.md (create if missing)
- PROGRESS.md (create if missing)
- schemas/milestone_report.schema.json (create if missing)
- scripts/implement_prds.sh
- output/reports/*.json (runner output)
Output stability and idempotency
- Use stable, sortable filenames with numeric prefixes and slugs.
- Create missing directories/files; update existing content without deleting user data.
- Never remove user content unless explicitly instructed.
Workflow (strict order)
0) Repo probe and rule load
- Run repo probe (rg --files or ls).
- Load project profile if present (.codex/project.profile.md).
- Load relevant rules per AGENTS router.
1) Intake and minimal questions
- Ask only blocking questions that affect direction or feasibility.
- Anything else becomes an explicit assumption recorded in docs/ASSUMPTIONS.md.
Checklist (max 1 pass):
2) Research (if web search tools are available and allowed)
- If web search is available and allowed by rules, produce:
- At least 3 competitors or similar projects.
- A comparison table (features, interaction patterns, UX, pricing/positioning if relevant).
- Borrowed ideas and deliberate trade-offs.
- If web search is not available:
- Mark competitive analysis as pending.
- List 5 most important references the user should provide.
Checklist (max 1 pass):
3) Create mother PRD (prds/0-*-mother.md)
- Use references/mother_prd_template.md.
- Fill every section; use N/A if not applicable.
- Include default tech stack and constraints even if provisional.
- If iteration exceeds 3 passes, add a top banner with Open Questions and Assumptions.
Checklist (max 3 iterations):
4) Create verify tooling PRD (prds/1-verify-tooling.md)
- Use references/verify_prd_template.md.
- Must define make verify and minimal lint/test/ci skeleton.
- Ensure acceptance criteria prove make verify passes on minimal scaffold.
- If iteration exceeds 2 passes, add a top banner with Open Questions and Assumptions.
Checklist (max 2 iterations):
5) Create ordered sub-PRDs (prds/2..n)
- Use references/sub_prd_template.md for each.
- Must be strictly ordered and non-blocking (n+1 depends only on <= n).
- Each sub-PRD must include acceptance criteria and verification steps (must include make verify).
- If iteration exceeds 2 passes, add a top banner with Open Questions and Assumptions.
Checklist (max 2 iterations):
6) Create per-PRD plans (plans/1..n)
- Use references/plan_template.md for each.
- Plans must be executable, ordered, and include commands and key files.
- If iteration exceeds 2 passes, add Open Questions and Assumptions at the top.
Checklist (max 2 iterations):
7) Create assumptions, progress, schema, and runner
- Create docs/ASSUMPTIONS.md from references/assumptions_template.md if missing.
- Create PROGRESS.md from references/progress_template.md if missing.
- Create schemas/milestone_report.schema.json from references/milestone_report_schema_template.json if missing.
- Create scripts/implement_prds.sh (see Runner Script Spec below).
Checklist (max 1 pass):
Runner Script Spec (scripts/implement_prds.sh)
- Bash script with: set -euo pipefail
- Create directories: output/reports, schemas, docs, prds, plans
- PRD list:
- find prds -maxdepth 1 -type f -name '[1-9]-.md' | sort -V
- For each PRD, call:
codex exec --full-auto --output-schema ./schemas/milestone_report.schema.json \
-o "output/reports/.json" \
""
- Strict prompt must include:
- Read
- Implement exactly what it requires
- If you make ANY assumption: update docs/ASSUMPTIONS.md
- Update PROGRESS.md with PASS/FAIL and evidence + link to output/reports/.json
- Run: make verify
- If make verify fails: fix until it passes
- Do not move to next PRD until DONE
- After each PRD:
- git add -A
- git commit -m "Implement " || true
- End with a summary message pointing to output/reports and PROGRESS.md
Assumptions and open questions
- Only ask when blocked or directionally uncertain.
- All other unknowns go to docs/ASSUMPTIONS.md with required fields:
- Assumption, Reason, Impact, To confirm, Date
Mandatory skill mapping (call when needed, then merge output)
- Backend API or service architecture: use $backend-development
- Database schema/migrations/indexes: use $database-design
- Frontend IA/UX/layout/visuals: use $frontend-design
- Testing strategy or local/E2E testing: use $webapp-testing
- Plan generation: optionally use $create-plan, but merge into plan_template format
- Code review (runner phase): optionally use $code-review and merge into PRD/Plan
- If a required skill is unavailable, proceed and mark "Skill unavailable" in the affected section.
References (load only as needed)
- references/mother_prd_template.md
- references/verify_prd_template.md
- references/sub_prd_template.md
- references/plan_template.md
- references/progress_template.md
- references/assumptions_template.md
- references/milestone_report_schema_template.json
1---2name: prd-orchestrator3description: Orchestrate a one-line requirement or requirement document into a full PRD set, sub-PRDs, per-PRD plans, and an execution runner for codex exec. Use when the user invokes $prd-orchestrator to turn requirements into ordered, executable PRDs and plans.4---5
6# PRD Orchestrator
7
8## Overview
9Turn a one-line requirement or requirement document/path into a complete, ordered PRD and Plan bundle that can be executed by codex exec. This skill produces mother PRD, verify tooling PRD, ordered sub-PRDs, per-PRD plans, a runner script, and reporting schema.
10
11## How to invoke
12- $prd-orchestrator <one-line requirement>
13- $prd-orchestrator <full requirement text>
14- $prd-orchestrator <path/to/requirements.md>
15
16## Working agreements / Rules
17- Always follow the merged instruction chain from AGENTS and rules.
18- Global layer (in priority order):
19 - $CODEX_HOME/AGENTS.override.md (if exists and non-empty), else $CODEX_HOME/AGENTS.md
20 - $CODEX_HOME/rules/**
21- Project layer (current repo tree):
22 - <repo>/AGENTS.override.md or <repo>/AGENTS.md
23 - Any nested AGENTS.override.md or AGENTS.md in subdirectories
24 - <repo>/rules/** and any nested rules/ directories
25- Conflict resolution: more specific scope overrides more general (subdir > repo > global).
26- If rules restrict command execution (prompt/allow/forbidden), obey strictly.
27
28## Inputs
29- A single sentence requirement, or
30- A requirement document text or file path.
31
32## Outputs (must exist in project root)
33- prds/0-<product-slug>-mother.md
34- prds/1-verify-tooling.md
35- prds/2-<slug>.md ... prds/n-<slug>.md
36- plans/1-verify-tooling.md
37- plans/2-<slug>.md ... plans/n-<slug>.md
38- docs/ASSUMPTIONS.md (create if missing)
39- PROGRESS.md (create if missing)
40- schemas/milestone_report.schema.json (create if missing)
41- scripts/implement_prds.sh
42- output/reports/*.json (runner output)
43
44## Output stability and idempotency
45- Use stable, sortable filenames with numeric prefixes and slugs.
46- Create missing directories/files; update existing content without deleting user data.
47- Never remove user content unless explicitly instructed.
48
49## Workflow (strict order)
50
51### 0) Repo probe and rule load
52- Run repo probe (rg --files or ls).
53- Load project profile if present (.codex/project.profile.md).
54- Load relevant rules per AGENTS router.
55
56### 1) Intake and minimal questions
57- Ask only blocking questions that affect direction or feasibility.
58- Anything else becomes an explicit assumption recorded in docs/ASSUMPTIONS.md.
59
60Checklist (max 1 pass):
61- [ ] User intent and target outcomes are clear enough to proceed.
62- [ ] Blocking unknowns asked (max 1-2 questions).
63- [ ] Non-blocking unknowns converted into assumptions.
64
65### 2) Research (if web search tools are available and allowed)
66- If web search is available and allowed by rules, produce:
67 - At least 3 competitors or similar projects.
68 - A comparison table (features, interaction patterns, UX, pricing/positioning if relevant).
69 - Borrowed ideas and deliberate trade-offs.
70- If web search is not available:
71 - Mark competitive analysis as pending.
72 - List 5 most important references the user should provide.
73
74Checklist (max 1 pass):
75- [ ] Competitive analysis present or marked pending with 5 reference asks.
76
77### 3) Create mother PRD (prds/0-*-mother.md)
78- Use references/mother_prd_template.md.
79- Fill every section; use N/A if not applicable.
80- Include default tech stack and constraints even if provisional.
81- If iteration exceeds 3 passes, add a top banner with Open Questions and Assumptions.
82
83Checklist (max 3 iterations):
84- [ ] All required sections completed.
85- [ ] Competitive analysis present or explicitly pending.
86- [ ] Default tech stack and constraints filled.
87- [ ] Risks and mitigations defined.
88
89### 4) Create verify tooling PRD (prds/1-verify-tooling.md)
90- Use references/verify_prd_template.md.
91- Must define make verify and minimal lint/test/ci skeleton.
92- Ensure acceptance criteria prove make verify passes on minimal scaffold.
93 - If iteration exceeds 2 passes, add a top banner with Open Questions and Assumptions.
94
95Checklist (max 2 iterations):
96- [ ] make verify defined and testable.
97- [ ] Lint/format/test/ci skeleton included.
98- [ ] Acceptance criteria include local reproduction steps.
99
100### 5) Create ordered sub-PRDs (prds/2..n)
101- Use references/sub_prd_template.md for each.
102- Must be strictly ordered and non-blocking (n+1 depends only on <= n).
103- Each sub-PRD must include acceptance criteria and verification steps (must include make verify).
104 - If iteration exceeds 2 passes, add a top banner with Open Questions and Assumptions.
105
106Checklist (max 2 iterations):
107- [ ] Each sub-PRD is independently implementable in order.
108- [ ] Each has >=5 acceptance criteria with negative cases.
109- [ ] Dependencies only point to earlier PRDs.
110
111### 6) Create per-PRD plans (plans/1..n)
112- Use references/plan_template.md for each.
113- Plans must be executable, ordered, and include commands and key files.
114 - If iteration exceeds 2 passes, add Open Questions and Assumptions at the top.
115
116Checklist (max 2 iterations):
117- [ ] Steps are ordered and concrete (files/dirs/commands).
118- [ ] Self-test and review checklist present.
119- [ ] Verification commands include make verify.
120
121### 7) Create assumptions, progress, schema, and runner
122- Create docs/ASSUMPTIONS.md from references/assumptions_template.md if missing.
123- Create PROGRESS.md from references/progress_template.md if missing.
124- Create schemas/milestone_report.schema.json from references/milestone_report_schema_template.json if missing.
125- Create scripts/implement_prds.sh (see Runner Script Spec below).
126
127Checklist (max 1 pass):
128- [ ] All required files created or updated without deleting user content.
129- [ ] Runner script uses sort -V and skips mother PRD.
130
131## Runner Script Spec (scripts/implement_prds.sh)
132- Bash script with: set -euo pipefail
133- Create directories: output/reports, schemas, docs, prds, plans
134- PRD list:
135 - find prds -maxdepth 1 -type f -name '[1-9]*-*.md' | sort -V
136- For each PRD, call:
137 codex exec --full-auto --output-schema ./schemas/milestone_report.schema.json \\
138 -o "output/reports/<prd_basename>.json" \\
139 "<strict prompt>"
140- Strict prompt must include:
141 - Read <prd>
142 - Implement exactly what it requires
143 - If you make ANY assumption: update docs/ASSUMPTIONS.md
144 - Update PROGRESS.md with PASS/FAIL and evidence + link to output/reports/<prd_basename>.json
145 - Run: make verify
146 - If make verify fails: fix until it passes
147 - Do not move to next PRD until DONE
148- After each PRD:
149 - git add -A
150 - git commit -m "Implement <prd_basename>" || true
151- End with a summary message pointing to output/reports and PROGRESS.md
152
153## Assumptions and open questions
154- Only ask when blocked or directionally uncertain.
155- All other unknowns go to docs/ASSUMPTIONS.md with required fields:
156 - Assumption, Reason, Impact, To confirm, Date
157
158## Mandatory skill mapping (call when needed, then merge output)
159- Backend API or service architecture: use $backend-development
160- Database schema/migrations/indexes: use $database-design
161- Frontend IA/UX/layout/visuals: use $frontend-design
162- Testing strategy or local/E2E testing: use $webapp-testing
163- Plan generation: optionally use $create-plan, but merge into plan_template format
164- Code review (runner phase): optionally use $code-review and merge into PRD/Plan
165- If a required skill is unavailable, proceed and mark "Skill unavailable" in the affected section.
166
167## References (load only as needed)
168- references/mother_prd_template.md
169- references/verify_prd_template.md
170- references/sub_prd_template.md
171- references/plan_template.md
172- references/progress_template.md
173- references/assumptions_template.md
174- references/milestone_report_schema_template.json