$npx -y skills add anombyte93/prd-taskmaster --skill discoverPhase 1 of the prd-taskmaster pipeline: brainstorm-driven discovery. Delegates to superpowers:brainstorming in Interactive Mode (one adaptive question at a time), or self-brainstorms in Autonomous Mode when no user is present. Intercepts before the brainstorming chain hands off t
| 1 | # Phase 1: Discover |
| 2 | |
| 3 | Declarative phase skill. Invoked by the prd-taskmaster orchestrator when |
| 4 | `current_phase` is `DISCOVER`. Never called directly by a user. |
| 5 | |
| 6 | The one rule: **invoke `superpowers:brainstorming` for discovery, intercept |
| 7 | before it chains to `writing-plans` — we control the exit, not the brainstorm |
| 8 | skill.** |
| 9 | |
| 10 | ## Entry gate |
| 11 | |
| 12 | 1. Call `mcp__plugin_prd_go__check_gate(phase="DISCOVER", evidence={})` for diagnostics. |
| 13 | |
| 14 | `check_gate` is an EXIT gate: it verifies the evidence to *advance*, not to *enter*. |
| 15 | On first DISCOVER entry you have no evidence yet (the User Approval / Self-Approval |
| 16 | Gate below produces `user_approved=true` OR `auto_classification=CLEAR with |
| 17 | assumptions_documented`), so a `gate_passed: false` here is EXPECTED — the state |
| 18 | machine's legal transitions already guarantee only legal entry. |
| 19 | |
| 20 | - **First entry** (no evidence yet): note the result and continue with the Procedure. |
| 21 | - **Re-entry**: if the gate reports violations, report them and stop — it protects |
| 22 | against re-running a completed phase or skipping ahead from SETUP. |
| 23 | 2. Detect execution context. If any of the following signals are present, |
| 24 | switch to Autonomous Mode: |
| 25 | - `.claude/ralph-loop.local.md` exists in the project root |
| 26 | - An `auto-enter` / `auto-approve` daemon is running against this session |
| 27 | - The skill was invoked with an explicit `--autonomous` flag |
| 28 | - Parent orchestrator is a cron, `/pentest-wtf`, or `/ralph-loop` |
| 29 | Otherwise proceed in Interactive Mode (default). |
| 30 | |
| 31 | ## Discovery checklist |
| 32 | |
| 33 | Copy into your response before running the procedure: |
| 34 | |
| 35 | ``` |
| 36 | DISCOVERY CHECKLIST: |
| 37 | - [ ] Mode detected (Interactive vs Autonomous) |
| 38 | - [ ] Goal captured from skill args or soul purpose |
| 39 | - [ ] Adaptive questions completed (one at a time) |
| 40 | - [ ] Constraints extracted and listed |
| 41 | - [ ] Scale classified (Solo / Team / Enterprise) |
| 42 | - [ ] Discovery summary captured for GENERATE phase |
| 43 | - [ ] User approved (Interactive) or summary committed (Autonomous) |
| 44 | ``` |
| 45 | |
| 46 | ## Interactive Mode (default — user present) |
| 47 | |
| 48 | 1. Take the user's goal / description from the skill invocation args. |
| 49 | 2. Invoke `superpowers:brainstorming` with the goal as input. |
| 50 | 3. Brainstorming runs its adaptive question flow — one domain-agnostic question |
| 51 | at a time. Let it drive the Q&A rhythm. |
| 52 | 4. **INTERCEPT POINT**: when brainstorming signals readiness to chain to |
| 53 | `writing-plans`, STOP. Do NOT let it invoke `writing-plans`. Capture the |
| 54 | brainstorm output (design, requirements, decisions) into local state |
| 55 | instead. The prd-taskmaster orchestrator owns the handoff — not |
| 56 | `superpowers:brainstorming`. |
| 57 | 5. Present the summary to the user for approval via `AskUserQuestion` (see |
| 58 | User Approval Gate below). |
| 59 | |
| 60 | ## Autonomous Mode (no user present) |
| 61 | |
| 62 | **Do NOT invoke `superpowers:brainstorming`** — it blocks on user input and |
| 63 | will stall an unattended session. Instead, self-brainstorm using this |
| 64 | template: |
| 65 | |
| 66 | 1. Read the goal statement from skill args or |
| 67 | `session-context/CLAUDE-soul-purpose.md`. |
| 68 | 2. Read `session-context/CLAUDE-activeContext.md` for project context. |
| 69 | 3. Write discovery notes directly to |
| 70 | `session-context/discovery-{timestamp}.md` answering every question the |
| 71 | interactive flow would ask: |
| 72 | - Who is this for? |
| 73 | - What problem does it solve? |
| 74 | - What are the success metrics? |
| 75 | - What are the constraints (tech stack, timeline, team, budget, |
| 76 | integrations, regulatory)? |
| 77 | - What's explicitly out of scope? |
| 78 | - What's the scale (Solo / Team / Enterprise)? |
| 79 | 4. Self-approve: the skill acts as both interrogator and approver. Document |
| 80 | assumptions explicitly so the user can audit them on wake-up. |
| 81 | 5. Commit the discovery file. The git history becomes the audit trail — if |
| 82 | the user later disagrees, they can reset to that commit and re-run. |
| 83 | |
| 84 | **Autonomous mode is first-class, not degraded.** A well-run autonomous |
| 85 | discovery produces a spec the user reads on wake-up and says "yes, that's |
| 86 | what I meant" without edits. If you find yourself needing to ask more than |
| 87 | two questions the user didn't anticipate, the discovery is under-specified — |
| 88 | stop and write a handoff note instead of proceeding. |
| 89 | |
| 90 | ## User Approval Gate (Interactive Mode) |
| 91 | |
| 92 | After brainstorming completes, present via `AskUserQuestion`: |
| 93 | |
| 94 | ``` |
| 95 | Discovery Complete: |
| 96 | Goal: [one sentence] |
| 97 | Audience: [who it's for] |
| 98 | Approac |