$npx -y skills add anombyte93/prd-taskmaster --skill generatePhase 2 of the prd-taskmaster pipeline: spec generation and task parsing. Loads a template (comprehensive|minimal), fills it with DISCOVER-phase constraints and answers, validates the spec (placeholders_found, grade thresholds), parses the PRD into tasks via task-master, runs Tas
| 1 | # Phase 2: Generate |
| 2 | |
| 3 | Declarative phase skill. Invoked by the prd-taskmaster orchestrator when |
| 4 | `current_phase` is `GENERATE`. Never called directly by a user. |
| 5 | |
| 6 | The one rule: **generate the spec, validate it catches placeholders, parse it |
| 7 | into tasks, expand every task into subtasks. Quality over speed.** |
| 8 | |
| 9 | ## Entry gate |
| 10 | |
| 11 | 1. Call `mcp__plugin_prd_go__check_gate(phase="GENERATE", evidence={})` for diagnostics. |
| 12 | |
| 13 | `check_gate` is an EXIT gate: it checks `task_count > 0`, `subtask_coverage >= 1.0`, |
| 14 | and `validation_grade in (EXCELLENT, GOOD)` — all of which are GENERATE's OWN OUTPUTS, |
| 15 | i.e. evidence to *advance*, not preconditions to *enter*. On first entry none exist |
| 16 | yet, so a `gate_passed: false` here is EXPECTED — the state machine's legal |
| 17 | transitions already guarantee only legal entry. |
| 18 | |
| 19 | - **First entry** (no evidence yet): note the result and continue with the Procedure. |
| 20 | - **Re-entry**: if the gate reports violations, report them and stop — it protects |
| 21 | against re-running a completed phase or skipping ahead from DISCOVER. |
| 22 | 2. Read the DISCOVER output (discovery summary + `CONSTRAINTS CAPTURED` block |
| 23 | + scale classification). If any of these are missing, report and stop — the |
| 24 | gate should have caught this, but belt-and-braces. |
| 25 | |
| 26 | ## Generate checklist |
| 27 | |
| 28 | Copy into your response before running the procedure: |
| 29 | |
| 30 | ``` |
| 31 | GENERATE CHECKLIST: |
| 32 | - [ ] Template loaded (comprehensive|minimal) |
| 33 | - [ ] Spec written with discovery answers (no bare placeholders remaining) |
| 34 | - [ ] CONSTRAINT CHECK: every DISCOVER constraint appears in the spec |
| 35 | - [ ] SCOPE CHECK: task count matches scale (Solo 8-12, Team 12-20, Enterprise 20-30) |
| 36 | - [ ] Validation score: ___ / ___ (grade: ___) |
| 37 | - [ ] placeholders_found: ___ (bare placeholders = 0 required) |
| 38 | - [ ] Warnings addressed or acknowledged |
| 39 | - [ ] Tasks parsed: ___ tasks created |
| 40 | - [ ] Complexity analyzed via TaskMaster: Y/N |
| 41 | - [ ] All tasks expanded into subtasks: Y/N |
| 42 | ``` |
| 43 | |
| 44 | ## Step 1: Choose and load template |
| 45 | |
| 46 | Decide based on discovery depth: |
| 47 | |
| 48 | - **Comprehensive**: 4+ detailed answers, complex project, Team / Enterprise scale |
| 49 | - **Minimal**: thin answers, user wants speed, Solo scale |
| 50 | |
| 51 | **MCP (preferred)**: `mcp__plugin_prd_go__load_template(type="comprehensive")` |
| 52 | |
| 53 | **CLI fallback**: `python3 script.py load-template --type comprehensive` |
| 54 | |
| 55 | The template is the canonical shape — do not invent your own. If the template |
| 56 | load fails, report and stop. Do not paper over with a home-rolled skeleton. |
| 57 | |
| 58 | ## Step 2: Generate spec at `.taskmaster/docs/prd.md` |
| 59 | |
| 60 | Fill the template with discovery answers. AI judgment required: |
| 61 | |
| 62 | - Replace ALL placeholders with actual content pulled from DISCOVER. |
| 63 | - Expand with project-specific details — do not leave template prose verbatim. |
| 64 | - Add technical depth proportional to what the user provided in discovery. |
| 65 | - Generate domain-appropriate sections (pentest = threat model, app = user |
| 66 | stories, business = success metrics, learning = assessment criteria). |
| 67 | - Document assumptions where discovery was thin — explicitly, not silently. |
| 68 | |
| 69 | ### CONSTRAINT CHECK (MANDATORY) |
| 70 | |
| 71 | Verify EVERY constraint from the DISCOVER phase `CONSTRAINTS CAPTURED` block |
| 72 | appears in the spec. If "must use Python" was a constraint, the spec MUST |
| 73 | reference Python. Missing constraints = spec bug. |
| 74 | |
| 75 | Emit the check explicitly: |
| 76 | |
| 77 | ``` |
| 78 | CONSTRAINT CHECK: |
| 79 | - Tech stack (Python): FOUND in spec section "Technical Stack" |
| 80 | - Timeline (MVP in 2 weeks): FOUND in spec section "Milestones" |
| 81 | - ... |
| 82 | ``` |
| 83 | |
| 84 | Every constraint must be marked FOUND. If any are MISSING, loop back and |
| 85 | fix the spec before proceeding. |
| 86 | |
| 87 | ### SCOPE CHECK (MANDATORY) |
| 88 | |
| 89 | Use the scale classification from DISCOVER to set task count range: |
| 90 | |
| 91 | | Scale | Task Count | Subtask Depth | |
| 92 | |------------|-----------|------------------| |
| 93 | | Solo | 8–12 | 2–3 subtasks each | |
| 94 | | Team | 12–20 | 3–5 subtasks each | |
| 95 | | Enterprise | 20–30 | 5–8 subtasks each | |
| 96 | |
| 97 | If DISCOVER classified the project as Team but the spec implies 30 tasks, |
| 98 | that's a scope bug — narrow the spec or re-classify explicitly. |
| 99 | |
| 100 | ### Domain-neutral vocabulary |
| 101 | |
| 102 | When the domain is unclear, default to neutral terms: |
| 103 | |
| 104 | | Software term | Neutral equivalent | When to use neutral | |
| 105 | |---------------|-------------------|---------------------| |
| 106 | | tests | verification criteria | pentest, business, learning | |
| 107 | | code |