{"id":"discover","name":"discover","summary":"prd-taskmasterパイプラインのフェーズ1:ブレインストーミングによる発見。超能力への代表者:インタラクティブモードでブレインストーミング(一度に一つの適応的な質問)や、ユーザーがいない自律モードでの自己ブレインストーミング。","body":"# Phase 1: Discover\n\nDeclarative phase skill. Invoked by the prd-taskmaster orchestrator when\n`current_phase` is `DISCOVER`. Never called directly by a user.\n\nThe one rule: **invoke `superpowers:brainstorming` for discovery, intercept\nbefore it chains to `writing-plans` — we control the exit, not the brainstorm\nskill.**\n\n## Entry gate\n\n1. Call `mcp__plugin_prd_go__check_gate(phase=\"DISCOVER\", evidence={})` for diagnostics.\n\n   `check_gate` is an EXIT gate: it verifies the evidence to *advance*, not to *enter*.\n   On first DISCOVER entry you have no evidence yet (the User Approval / Self-Approval\n   Gate below produces `user_approved=true` OR `auto_classification=CLEAR with\n   assumptions_documented`), so a `gate_passed: false` here is EXPECTED — the state\n   machine's legal transitions already guarantee only legal entry.\n\n   - **First entry** (no evidence yet): note the result and continue with the Procedure.\n   - **Re-entry**: if the gate reports violations, report them and stop — it protects\n     against re-running a completed phase or skipping ahead from SETUP.\n2. Detect execution context. If any of the following signals are present,\n   switch to Autonomous Mode:\n   - `.claude/ralph-loop.local.md` exists in the project root\n   - An `auto-enter` / `auto-approve` daemon is running against this session\n   - The skill was invoked with an explicit `--autonomous` flag\n   - Parent orchestrator is a cron, `/pentest-wtf`, or `/ralph-loop`\n   Otherwise proceed in Interactive Mode (default).\n\n## Discovery checklist\n\nCopy into your response before running the procedure:\n\n```\nDISCOVERY CHECKLIST:\n- [ ] Mode detected (Interactive vs Autonomous)\n- [ ] Goal captured from skill args or soul purpose\n- [ ] Adaptive questions completed (one at a time)\n- [ ] Constraints extracted and listed\n- [ ] Scale classified (Solo / Team / Enterprise)\n- [ ] Discovery summary captured for GENERATE phase\n- [ ] User approved (Interactive) or summary committed (Autonomous)\n```\n\n## Interactive Mode (default — user present)\n\n1. Take the user's goal / description from the skill invocation args.\n2. Invoke `superpowers:brainstorming` with the goal as input.\n3. Brainstorming runs its adaptive question flow — one domain-agnostic question\n   at a time. Let it drive the Q&A rhythm.\n4. **INTERCEPT POINT**: when brainstorming signals readiness to chain to\n   `writing-plans`, STOP. Do NOT let it invoke `writing-plans`. Capture the\n   brainstorm output (design, requirements, decisions) into local state\n   instead. The prd-taskmaster orchestrator owns the handoff — not\n   `superpowers:brainstorming`.\n5. Present the summary to the user for approval via `AskUserQuestion` (see\n   User Approval Gate below).\n\n## Autonomous Mode (no user present)\n\n**Do NOT invoke `superpowers:brainstorming`** — it blocks on user input and\nwill stall an unattended session. Instead, self-brainstorm using this\ntemplate:\n\n1. Read the goal statement from skill args or\n   `session-context/CLAUDE-soul-purpose.md`.\n2. Read `session-context/CLAUDE-activeContext.md` for project context.\n3. Write discovery notes directly to\n   `session-context/discovery-{timestamp}.md` answering every question the\n   interactive flow would ask:\n   - Who is this for?\n   - What problem does it solve?\n   - What are the success metrics?\n   - What are the constraints (tech stack, timeline, team, budget,\n     integrations, regulatory)?\n   - What's explicitly out of scope?\n   - What's the scale (Solo / Team / Enterprise)?\n4. Self-approve: the skill acts as both interrogator and approver. Document\n   assumptions explicitly so the user can audit them on wake-up.\n5. Commit the discovery file. The git history becomes the audit trail — if\n   the user later disagrees, they can reset to that commit and re-run.\n\n**Autonomous mode is first-class, not degraded.** A well-run autonomous\ndiscovery produces a spec the user reads on wake-up and says \"yes, that's\nwhat I meant\" without edits. If you find yourself needing to ask more than\ntwo questions the user didn't anticipate, the discovery is under-specified —\nstop and write a handoff note instead of proceeding.\n\n## User Approval Gate (Interactive Mode)\n\nAfter brainstorming completes, present via `AskUserQuestion`:\n\n```\nDiscovery Complete:\n  Goal: [one sentence]\n  Audience: [who it's for]\n  Approach: [proposed solution]\n  Key decisions: [list]\n  Constraints: [known limitations]\n  Scale: [Solo | Team | Enterprise]\n\nProceed to generate spec? (or refine further)\n```\n\n- If user says \"refine\" → ask what to change, update the summary, re-present.\n- If user approves → capture as the discovery output and proceed to exit gate.\n\n## Self-Approval Gate (Autonomous Mode)\n\nWrite the discovery summary to `session-context/discovery-{timestamp}.md` and\ncommit it. No interactive approval is required, but assumptions MUST be\nexplicit in the written summary so the user can audit on wake-up.\n\n## Smart Defaults\n\nIf brainstorming (or self-brainstorming) produces thin answers, fill gaps\nwith reasonable assumptions instead of forcing extra questions:\n\n- Target audience: small team (< 10 users) unless specified otherwise.\n- Timeline: MVP in 4–6 weeks.\n- Tech stack: inferred from requirements — do not pick arbitrarily.\n- Scale: moderate (hundreds of users, not millions).\n\nDocument every assumption in the discovery summary so GENERATE can surface\nthem in the spec.\n\n## Constraint Extraction (MANDATORY before advancing)\n\nBefore moving to GENERATE, explicitly extract and list all constraints\nmentioned during discovery. Emit this block:\n\n```\nCONSTRAINTS CAPTURED:\n- Tech stack: [e.g., \"must use Python\", \"React frontend\", \"no new dependencies\"]\n- Timeline: [e.g., \"MVP in 2 weeks\", \"no deadline\"]\n- Team: [e.g., \"solo developer\", \"3-person team\"]\n- Budget: [e.g., \"free tier only\", \"$500/month max\"]\n- Integration: [e.g., \"must work with existing Postgres DB\", \"connects to Stripe\"]\n- Regulatory: [e.g., \"HIPAA compliant\", \"GDPR\", \"none specified\"]\n- Domain-specific: [e.g., \"authorized pentest scope: 10.0.0.0/24 only\",\n  \"learning goal: intermediate level\"]\n```\n\nPresent this list alongside the discovery summary. These constraints MUST be\npassed to GENERATE — they inform spec content, task decomposition depth, and\nacceptance criteria. If a constraint is mentioned in discovery but missing\nfrom the spec, that's a bug.\n\n## Scope Calibration\n\nInfer project scale from discovery answers and set decomposition guidance:\n\n| Scale      | Signal                                          | Task Cap    | Subtask Depth    |\n|------------|-------------------------------------------------|-------------|------------------|\n| Solo       | \"just me\", \"side project\", \"learning\"           | 8–12 tasks  | 2–3 subtasks each |\n| Team       | \"small team\", \"MVP\", \"product\", \"startup\"       | 12–20 tasks | 3–5 subtasks each |\n| Enterprise | \"compliance\", \"multiple teams\", \"platform\"      | 20–30 tasks | 5–8 subtasks each |\n\nPass the scale classification to GENERATE so task count is calibrated, not\narbitrary.\n\n## Exit gate\n\nAfter approval (Interactive) or commit (Autonomous), constraints captured,\nand scale classified:\n\n1. Call `mcp__plugin_prd_go__advance_phase(expected_current=\"DISCOVER\", target=\"GENERATE\", evidence={\"user_approved\": True, \"constraints_captured\": True, \"scale\": \"<Solo|Team|Enterprise>\", \"assumptions_documented\": True})`.\n   The call atomically transitions `pipeline.json` from DISCOVER to GENERATE.\n   The `expected_current` field is the compare-and-swap guard;\n   `evidence` is stored under `phase_evidence[GENERATE]` for audit.\n2. Return control to the orchestrator (`prd-taskmaster` skill). Do NOT invoke\n   GENERATE directly — the orchestrator re-reads `current_phase` and routes.\n\n## Red flags (stop and report, do not paper over)\n\n- \"Brainstorming wants to call writing-plans — I'll let it\" → NO. Intercept.\n  The prd-taskmaster pipeline owns the exit, not `superpowers:brainstorming`.\n- \"User hasn't answered, I'll pick for them in Interactive Mode\" → NO. If\n  stalled, ask one more targeted question or write a handoff note — don't\n  silently self-approve in Interactive Mode.\n- \"Autonomous mode — I'll invoke superpowers:brainstorming anyway\" → NO.\n  It blocks on user input and will stall the session. Self-brainstorm with\n  the template above.\n- \"Constraints are obvious, I'll skip the CONSTRAINTS CAPTURED block\" → NO.\n  GENERATE reads this block — missing constraints become missing spec\n  sections downstream.\n- \"I can call advance_phase without check_gate\" → NO. Gate first, always.\n\n## Non-exits\n\nThis skill does not use explicit process termination. A hard block reports\nthe reason and returns control to the orchestrator; the orchestrator decides\nwhether to surface to the user.","author":"@anombyte93","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/anombyte93/prd-taskmaster/tree/main/skills/discover","license":"MIT","category":"writing","lang":"en","tokens":2066,"stars":0,"calls30d":1,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[],"requires":{"mcp":["plugin_prd_go"],"tools":["Read","Skill","AskUserQuestion","Write","ToolSearch","mcp__atlas-engine","mcp__plugin_prd_go","mcp__plugin_prd-taskmaster_go","mcp__plugin_atlas-go_go"]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":[]}}