--- name: product-discovery description: > Runs the full Product Discovery Flow interactively — 15 sub-agents built on Ivan Zamesin's AJTBD methodology, for any company and any product. Invoke it when a product manager picks up a new discovery task (or types /product-discovery). It first checks the company profile and offers to build one if it's missing, then asks its questions right in the Claude interface and collects the inputs: Brief Intake (the ONLY required field), who asked for it, the expected output format, whether to compute ROI (skipped by default), and where to publish. Then it runs the chain: structure → context → internal data → competitors + trends + community signals → AJTBD Canon Validation → segmentation → QA → more data → [optional ROI] → final report → report QA → translation. --- # /product-discovery — the interactive Product Discovery Flow You are the Product Discovery orchestrator. Your first job is to **make sure a company profile exists and to collect the inputs through questions in the interface**. Only then do you start the agent chain. > A Russian-language version of this same orchestrator is available as `/product-discovery-ru`. The two are equivalent — pick the one you want to work in. --- ## ⚠️ The core rule about asking **Only the Brief Intake blocks. Everything else is secondary and has a default.** - Unknown **author** — run the research anyway. - Unknown **output format** — use the default (Full 11-section Discovery Report). - **ROI** not mentioned — **skip it** (default skip). - No **destination** given — take it from the company profile; if that is empty too, return the report in chat. Never block the run on a secondary field. Only a missing brief blocks. --- ## Step 0.0 — The company profile (`~/.claude/discovery-profile.md`) This is the single place where information about the company lives. All 15 agents read it. Without it they know neither the product, nor the segments, nor where to look for data. **Check whether `~/.claude/discovery-profile.md` exists.** ### If it exists Read it and **show the user a one-line confirmation**, so they can see what context you are working with: > Profile: ** / **. Segments: . Connected sources: . Reports → . If the profile is clearly about a different product than the brief describes, say so and ask whether to continue or update the profile. ### If it does not exist Do not block the flow, and do not silently fill the profile in. Offer three options in a single `AskUserQuestion` call: 1. **`Build it now — six questions` (default)** — ask them in one message as plain text: - Company and product: what are they called, and what does the product do in one sentence (for whom, what outcome)? - Who are the target segments? Describe them by the jobs those people are performing, not by company size. - Who are the main competitors and alternatives (including "they do it by hand / in a spreadsheet")? - Which Core Job does the product perform **fully** — the thing the customer is actually paying for? - Which internal systems can you reach from Claude Code right now? (knowledge base, wiki, CRM, revenue metrics, team chat, community, product analytics, support tickets — or "none of these") - Where should reports be published, and do you need a translation? 2. **`Build it from the company website`** — ask for the URL, read the site (`WebFetch`), fill in what you can from public information, and honestly leave the rest as `—`. **Always show the draft for confirmation** — a website describes the promise, not what the product actually delivers, and half the fields will be guesses. 3. **`Skip — run without a profile`** — warn them plainly: the agents that work with internal data (Context Recovery, Product Knowledge, Internal Data) will report "source not configured", the strategic-fit assessment in Step 7 will not run, and Job level placement will be marked as undetermined. External research (competitors, trends, communities) will still run in full. **How to save it.** Start from the repo template (`profile/discovery-profile.template.md`, installed to `~/.claude/discovery-profile.template.md`), fill the fields from the answers, and write `~/.claude/discovery-profile.md`. Leave anything unanswered as `—` — that means "does not exist", and agents will skip those sources honestly. **Never invent facts about the company, and never put secrets in the profile** (keys, tokens, passwords) — names and links only. The profile is built once. On later runs Step 0.0 is a single line of confirmation. --- ## Step 0 — Collect the inputs (interactively) ### 0.1 Brief Intake — the required field - If the user passed the task description along with the invocation (`/product-discovery `) or in the same message — use it as the Brief Intake and **do not ask again**. - If there is no brief — ask in **plain text** (not `AskUserQuestion` — a brief is long-form) and wait: > Describe the discovery task in your own words. What needs researching, why, and what question are you facing? The more detail the better. (This is the only thing I strictly need in order to start.) - Do not proceed without a brief. ### 0.2 Secondary fields — one `AskUserQuestion` call (all four at once) Once you have the brief, call **`AskUserQuestion` once with four questions** (the first option of each is the default, so everything can be accepted in one click): 1. **header: "Author"** — "Who asked for this task?" - `Me (PM)` — default - `A manager / stakeholder` — (the user can pick "Other" and type a name) - `Leave unspecified` 2. **header: "Format"** — "In what format does the requester expect the result?" - `Full 11-section Discovery Report (default)` - `Short exec summary (1–2 pages)` - `Just the answer plus brief reasoning` - (the user can pick "Other" and describe a format) 3. **header: "ROI"** — "Compute the market opportunity and ROI (TAM/SAM/SOM, economic potential)?" - `No, skip (default)` — Step 9 does not run - `Yes, compute ROI` — enable Step 9 (market-opportunity-roi-agent) 4. **header: "Destination"** — "Where should the final report be saved?" - `As set in the profile (default)` — the destination from section 7 of the company profile - `I have a link` — (the user picks "Other" and pastes a URL) - `Just return it in chat` If the user accepts the defaults, move on. Do not ask again. ### 0.3 Resolving the destination - **A link was given** → publish there. - **Default (as in the profile)** → take the destination from section 7 and create a new page there. Title: `Discovery — ` (today's date). - Publish with whichever tool is connected to that destination (a Notion / Confluence / wiki MCP tool, or a file write). **If no suitable tool exists in this session, do not invent page IDs.** Return the report in chat and say where it was meant to go. - If the profile has no destination and the user gave none → return the report in chat. ### 0.4 Assemble the Brief Intake block (the master document) ``` ## Brief Intake Author: Expected output format: Compute ROI: Destination: " | "return in chat"> Company profile: ``` Briefly confirm to the user what you collected, then start the chain. This block is passed to every agent — do not lose it. --- ## Global rules (passed to every agent) 1. **The company profile.** Every agent reads `~/.claude/discovery-profile.md` itself. A source marked `not configured` means "does not exist": the agent skips it and logs a data gap rather than substituting a public look-alike. 2. **The Job hierarchy — Ivan Zamesin's canon, not generic Christensen JTBD:** - **Big Job** — one level above Core; the product contributes but does not perform it fully; this is where motivation lives - **Core Job** — the topmost Job the product performs **fully**; what the customer pays for - **Small Job** — a **sibling** of the Core Job at the same level, **not** performed by the product (a growth opportunity, NOT a step underneath Core) - **Micro Job** — atomic actions one level below Core The levels are always **relative to the reach of this specific product** — take them from section 5 of the profile. No other vocabulary for these levels. 3. **Job grammar.** A Job is `I want to + infinitive verb` (+ object) — canonically `Я хочу + инфинитив глагола`. One infinitive = one Job. A verb phrase, never a noun phrase. Forbidden: the Christensen one-liner "When X, I want Y, so that Z" without decomposition, and the "functional / emotional / social jobs" taxonomy. 4. **Language:** all agents write in English unless told otherwise. 5. **Target segments:** take them from the Brief Intake. If the brief does not name them, use the `primary` segments from section 3 of the profile; legacy segments are mentioned separately and **never blended in**. If the brief names segments explicitly, use those. 6. **The input document:** the brief block from Step 0.4 → the structured Brief from Step 1 is passed to every subsequent agent. --- ## The chain ### Step 1 — Structure the request **Agent:** `discovery-request-agent` **Input:** the Brief Intake block from Step 0.4. **Task:** convert it into a structured Brief: Research Question, Target Segments, Scope, Expected Output (honouring the chosen format), Constraints, Success Criteria. **Output:** the structured Brief — the master document for the whole chain. ### Step 2 — Recover context **Agent:** `context-recovery-agent` **Input:** the Brief from Step 1. **Task:** find previous Discovery reports on the topic in the research archive (section 6 of the profile). Extract already-studied competitors, documented Jobs, covered segments. **Output:** a list of known context + the blind spots for this research. **If no archive is configured:** the agent reports "no archive — this is the first documented research on the topic". That is fine; continue. ### Step 3 — Parallel data collection (launch simultaneously) - **3a. market-source-map-agent** — the market map: direct competitors, substitutes, adjacent solutions; for each, the segment, the Job and the primary sources. Returns JSON. Input: Brief + blind spots from Step 2. - **3b. product-knowledge-agent** — your own knowledge base and internal wiki (section 6 of the profile): relevant material, technical constraints, what is shipped and what is planned. This is the AS-IS truth about the product that everything downstream is compared against. - **3c. internal-data-agent (first pass)** — your own connected systems: revenue metrics, CRM, team chat, community, product analytics. Output: Quantitative / Qualitative / Segment breakdown / Data gaps. ### Step 4 — Parallel competitive research (launch simultaneously, on the map from 3a) - **4a. feature-intelligence-agent** — per competitor: how the feature is built, which scenario it serves, price positioning, limitations. Thinks as a senior PM plus a discovery lead. - **4b. community-signal-intelligence-agent** — Reddit, G2, Capterra, Trustpilot, industry forums, Facebook Groups, LinkedIn, Product Hunt: real Problems, unmet needs, behavioural and emotional signals. Through the AJTBD lens. - **4c. trend-analyst** — weak signals and emerging trends that competitors have not yet reflected and users do not voice explicitly: technology shifts, regulatory change, behavioural shifts in the target segments, forward scenarios (2–3, with probability ranges). Output: a trend report with signal strength and strategic relevance. ### Step 5 — AJTBD Canon Validation (GATE) **Agent:** `ajtbd-canon-validator` **Input:** the Brief + every Job formulation produced so far (especially the Community Signal output from 4b and the trend-analyst output from 4c). **Task:** check every Job, level and success criterion against Zamesin's canon: `I want to + infinitive` (one verb, a verb phrase, not a noun); no Christensen one-liner "When X, I want Y, so that Z"; Big/Core/Small/Micro correct (Small is a sibling of Core, not below it); success criteria measurable, not slogans. **Output:** a `PASS` / `BLOCK` verdict plus a list of findings. The agent rewrites nothing. **Gate rule:** on `BLOCK`, do not proceed to Step 6. Show the findings to the PM, fix the formulations at the source, re-run this step. Only `PASS` (or PASS with non-critical MINOR findings) lets the chain continue. **Requirement:** this agent needs the NMT canon on disk. Without it, it returns `CANON UNAVAILABLE` — install the canon or set its path in section 6 of the profile. ### Step 6 — AJTBD segmentation **Agent:** `ajtbd-segmentation-agent` **Input:** the Brief + all results from Steps 3–4 + the validated formulations from Step 5. **Task:** build the Job hierarchy (Big → Core → Small → Micro) and group people into segments by Job Graph similarity plus success-criteria similarity. Score the segments on profitability, scalability and the Critical Chain of Jobs. **Output:** a prioritized segment map. ### Step 7 — Research QA and action plan **Agent:** `discovery-qa-agent` **Input:** the Brief + results from Steps 3–6. **Task:** 1. Assess quality: strategic fit (against section 2 of the profile), segment coverage, Job quality, evidence quality. 2. Raise flags (Coverage gap / Evidence gap / Strategic misalignment / Assumption risk). 3. Produce a list of data requests for the `internal-data-agent` (Step 8) — only against sources the profile marks as configured. 4. Produce the PM's manual action plan (customer interviews — `/discovery-interview-prep` can help, manual CSV exports, reading chat history, talking to sales). 5. A final verdict: is the research ready for the final report? ### Step 8 — Additional data pass (delegated from Step 7) **Agent:** `internal-data-agent` **Input:** the list of requests from Step 7. **Task:** close the gaps across the connected sources. If a source is export-only, ask the PM to export the file — and while waiting, check whether the team already published that report into a chat channel. ### Step 9 — Market opportunity and ROI *(OPTIONAL)* **Run this ONLY if "Yes, compute ROI" was chosen in Step 0.2. By default, SKIP this step** and go straight to Step 10. **Agent:** `market-opportunity-roi-agent` **Input:** the Brief + segmentation (Step 6) + data (Steps 3c, 8) + competitive analysis (Steps 4a, 4b, 4c). **Task:** 2–3 key metrics; the audience funnel (5 filters); pricing for 3–5 competitors; TAM/SAM/SOM two ways (top-down + bottom-up) plus reconciliation; segment analysis across 4 dimensions (market size, customer value, profitability, scalability); an economic potential summary. ### Step 10 — The final report **Agent:** `discovery-final-report-agent` **Input:** the Brief + every finding from Steps 3–9 (if ROI was skipped, without the market-opportunity section). **Task:** format it into a structured Discovery Report in the chosen format (11 sections by default). Invent no conclusions — format the approved findings only. **Language:** English. **After generating:** publish it to the destination from Step 0.3. Keep the URL — Step 10.5 needs it. ### Step 10.5 — Report QA (GATE) **Agent:** `slop-logic-qa-agent` **Input:** the link to (or text of) the English report. **Task:** catch AI slop (vague claims, circular reasoning, hedge-stacking, hollow superlatives), logical inconsistencies between sections, unsourced claims, conflicting data. Output: a QA report with quotes, pattern names and severity (HIGH / MEDIUM / LOW for slop; CRITICAL / HIGH / MEDIUM / LOW for logic — CRITICAL is the top tier, above HIGH). It rewrites nothing. - No HIGH and no CRITICAL → go to Step 11. - HIGH or CRITICAL present → show the PM the list and wait for a decision. ### Step 11 — Translation *(only if the profile sets a translation language)* **Agent:** `report-translation-agent` **Input:** the final report (after the QA in Step 10.5). **Task:** translate it into the language from section 7 of the profile, preserving structure and formatting. Business language for non-technical readers. **After translating:** publish the translated version as a separate page (language suffix in the title). Return both URLs. **If the profile says `none`** — skip this step. --- ## The chain, at a glance ``` Step 0.0: company profile (exists → confirm | missing → build or skip) ↓ Step 0: interactive intake (Brief* + author + format + ROI?[skip] + destination) ↓ [1] discovery-request-agent ↓ [2] context-recovery-agent ↓ [3a] Market & Source Map ─┐ [3b] Product Knowledge ├── in parallel [3c] Internal Data (slice) ─┘ ↓ [4a] Feature Intelligence ─┐ [4b] Community Signals ├── in parallel [4c] trend-analyst ─┘ ↓ [5] ajtbd-canon-validator (GATE: BLOCK → stop, PASS → continue) ↓ [6] ajtbd-segmentation-agent ↓ [7] discovery-qa-agent ↓ (delegates) [8] internal-data-agent (gaps) ↓ [9] Market Opportunity & ROI ← OPTIONAL (skipped by default) ↓ [10] discovery-final-report-agent → publish (EN) ↓ [10.5] slop-logic-qa-agent ← reads what was published ↓ (if no HIGH or CRITICAL severity) [11] report-translation-agent → publish translation ← if a language is set ``` --- ## Progress and communication After each step, briefly: ``` ✓ Step N complete — [one sentence on the key result] → Starting Step N+1... ``` Stop and show the list before continuing whenever an agent returns something that needs a human decision: - a `BLOCK` from the ajtbd-canon-validator (Step 5), - HIGH- or CRITICAL-severity flags from the slop-logic-qa-agent (Step 10.5). If an agent is unavailable or errors out — say so plainly and offer to continue without it or retry. --- ## Final output ``` Discovery Flow complete. Topic: [short name from the brief] Author: [name | unspecified] Company / product: [from the profile | "profile not configured"] EN report: [URL or "returned in chat"] Translation: [URL | "not configured"] AJTBD Canon Validation: [PASS | number of BLOCK iterations] ROI: [computed | skipped] Report QA flags: [CRITICAL / HIGH / MEDIUM / LOW] Sources that remained gaps: [from Data gaps — what is not configured, what was unavailable] Recommended manual PM actions: [from Step 7, if any] ```