# Customer Discovery

> Orchestrator — detect pre-product vs product-exists mode, bootstrap ICP candidates, recommend customer-discovery frameworks, synthesize outputs into unified ICP research

- Skill: `georgeqle/customer-discovery` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add georgeqle/customer-discovery`
- Raw SKILL.md: https://api.skillmd.com/api/skills/georgeqle/customer-discovery/raw
- Safety review: pending (external: skill-scanner PASS, skillspector FAIL)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Product & Planning
- Author: GeorgeQLe (https://skillmd.com/u/georgeqle)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/georgeqle/customer-discovery

---


## Pack Availability Guard

Before telling the user to run a skill from another project-local pack, check `.agents/project.json.enabled_packs`. If the target pack is not enabled, recommend `npx skillpacks install <pack>` from the project shell, instead of the target skill. After install, tell Codex users to start a fresh Codex CLI session if the `$` skill list remains stale. Only the currently running skill and skills verified available in the active session or project-local install state are directly recommendable. For unavailable pack skills, recommend `npx skillpacks install <pack-or-skill>`; for unavailable base skills, recommend `npx skillpacks init` before the skill.

# Customer Discovery — Orchestrator

Invoke as `$customer-discovery`.

This is an **orchestrator skill** using the parent router delegation pattern. It detects context, bootstraps ICP candidates, recommends applicable customer-discovery frameworks, and synthesizes their outputs into unified ICP research. Individual frameworks live as child skills under `frameworks/`.

Available frameworks:

| Framework | Slug | Creator | Lens |
|-----------|------|---------|------|
| W3 Hypothesis | `w3-hypothesis` | Schwartzfarb | WHO/WHAT/WHY hypothesis generation + disproval |
| JTBD Needs Analysis | `jtbd-needs` | Ulwick / Christensen | Needs-based segmentation via jobs and outcomes |
| Four Forces | `four-forces` | Moesta | Push/Pull/Anxiety/Habit switching moment analysis |
| Five Rings of Buying Insight | `five-rings` | Revella | Decision psychology and buyer journey |
| Seven Dimensions | `seven-dimensions` | Lincoln Murphy | Ready/Willing/Able/Success/Acquisition/Ascension/Advocacy scoring |
| PMF Engine | `pmf-engine` | Vohra / Supan | Empirical ICP from existing user data (Sean Ellis test + HXC) |

## Report-First Approval Gate

Default to scope-first approval: before synthesized research, inspect only enough repository, user, and source context to propose research scope, source plan, assumptions, output paths, and approval questions in a `review` alignment page plus a concise conversation summary.

Do not perform synthesized research, rank candidates, make recommendations, or write working packets or canonical deliverables until final compiled YAML approves the research scope. Minimal pre-approval discovery may identify available files, source categories, and open questions; label it as scope evidence, not findings.

After approved research-scope YAML, perform the research and write only the non-canonical working packet defined in the staged workflow. Then update the `review` alignment page with findings and stop again for feedback-only YAML or final compiled YAML artifact approval before creating or updating canonical research, spec, or task files.

Do not include `Recommended next skill`, `Recommended next command`, or downstream routing language while a scope, framework findings, or synthesis approval is pending. The approval request itself is the next action: tell the user to review the page, compile responses, clear context, and paste the compiled YAML into a fresh session. The compiled YAML carries the parent command in `command` and `agent_routing.command`, such as `$customer-discovery` plus the same product/research path argument when present. Parent-loop continuation is not downstream routing: after framework completion, hand control back to `$customer-discovery`, never an execution-loop command or a path-shaped child framework invocation. Only emit downstream next-skill routing after the synthesized `icp.md` artifact has been approved and written.

## Staged Research Workflow

Use this staged workflow for synthesized research or report outputs that would create or update canonical research, spec, or task files.

1. **Stage 1 - Scope discovery and approval.** Inspect only enough repository, user, and source context to propose research scope, source plan, assumptions, output paths, and approval questions. Build the `review` HTML alignment page before synthesized research. The page must render the proposed scope, available source categories, known context, assumptions/confidence, proposed working-packet and canonical output paths, and research-scope approval gates. Stop for final compiled YAML approval of the research scope. Do not perform synthesized research, rank candidates, make recommendations, or write working packets, canonical research, spec, or task files in Stage 1.
2. **Stage 2 - Research and artifact review.** Only after approved research-scope YAML with no unresolved `needs-clarification`, unresolved `down` feedback, or other unresolved negative feedback, perform the synthesized research, run required source/code checks, and write only a non-canonical working packet: flat mode uses `research/_working/preliminary-<skill>-research.md`; product-path mode uses `research/{slug}/_working/preliminary-<skill>-research.md`. Replace `<skill>` with this skill's `name` value. Raw evidence or search logs may remain as supporting evidence where this skill already requires them, but synthesized deliverables stay in the working packet. Update the `review` HTML alignment page so it renders the complete working-packet substance as structured HTML review UI: purpose-built sections, tables, matrices, gates, cards, and tier-appropriate charts or diagrams that preserve every packet section, finding, caveat, and decision detail without summary loss. Raw Markdown packet text may appear only as a supplemental source view after the rendered review UI; do not make a `Full Preliminary Packet` or `Full Working Packet` raw Markdown dump, giant `<pre><code>` block, link-only view, or source-only view the primary review surface. Include the evidence matrix, assumptions/confidence register, source coverage gaps, proposed canonical file changes, and artifact approval gates. Stop for either feedback-only YAML or final compiled YAML. Feedback-only YAML revises the working packet and page, then remains in Stage 2.
3. **Stage 3 - Finalize approved artifacts.** Consume final compiled YAML for artifact approval only when it has no unresolved `needs-clarification`, unresolved `down` feedback, or other unresolved negative feedback. Apply approved edits first, archive the working packet to `docs/history/archive/YYYY-MM-DD/HHMMSS/<original-working-path>`, remove the active working packet, write the approved canonical artifacts to the unchanged output paths below, and convert the alignment page to `confirmed` with the approval record preserved. As part of confirming, reconcile each displayed gate decision against the final compiled YAML and the written canonical artifact, render any `other`/freeform choice as the read-only decision and drop superseded options, and run the post-confirmation self-check from the alignment-page contract before handoff.

Canonical output paths remain unchanged. Search logs and other supporting evidence remain allowed only where this skill's output contract already requires them.

**How this maps onto the Research Session Loop.** This orchestrator runs as a self-advancing loop (see Execution Model below and `docs/research-session-loop-convention.md`): each approval stop above is a **session boundary** — the agent stops, the user reviews and compiles YAML, then starts a fresh Codex session and re-invokes `$customer-discovery` to continue. The multi-select framework page is the single scope-and-candidate approval gate (Stage 1) for the whole selected set; synthesis has its own `review` page. When the loop runs a framework subskill inline (state C), that multi-select approval already satisfies the framework's Stage-1 scope gate, so the framework **enters at its research stage (Stage 2)** and produces exactly one findings `review` page — one approval gate per framework. Standalone (non-loop) invocation of a framework subskill still runs its full two-stage workflow.

## Evidence And Feedback Handling

Treat user feedback as input to evaluate, not as automatic ground truth.

- For factual, evidentiary, technical, or source-backed claims: verify against available evidence. If the user appears to misunderstand the evidence or states something factually incorrect, push back clearly and cite the evidence. Do not rewrite findings merely to agree.
- For taste, brand, positioning preference, risk appetite, prioritization, or other subjective judgment calls: weigh user feedback heavily and adapt the recommendation unless it conflicts with verified evidence.
- When feedback mixes facts and preference, separate them explicitly: correct the factual part, then incorporate the preference where it is a legitimate judgment call.
- When uncertain, say what is known, what is inferred, and what would change the conclusion.

## Prerequisites

- **Hard**: None — this is the first research skill in the AFPS chain.
- **Soft**: Read these if they exist:
  - `research/idea-brief.md` (or `research/{slug}/idea-brief.md`) — concept, hypotheses, ICP readiness notes
  - Specs, README/CLAUDE, and relevant source files for product context
  - `research/customer-feedback.md` — real customer evidence (triggers product-exists mode)

## Execution Model — Research Session Loop

This is a **self-advancing Pattern A research orchestrator** (see `docs/research-session-loop-convention.md`). Each invocation starts cold, resolves its state from **pasted YAML + filesystem**, runs **exactly one heavy phase**, emits the next gate, and stops. The user advances the loop by starting a fresh Codex session and re-invoking `$customer-discovery`. The user never invokes a framework subskill directly — the orchestrator follows each selected framework's subskill inline.

When a framework is pending, the only user-facing continuation route is re-invoking `$customer-discovery` with the same product/research path argument when present, for example `$customer-discovery research/afps-tracker`. Never tell the user to run a path-shaped child framework command; the parent resolves the pending framework from the run manifest and filesystem.


### Terminal Handoff Contract

Every terminal response for this Research Session Loop must end with `## Next Work`. While a `review` page is waiting for compiled YAML, `## Next Work` is the final section and tells the user to review the page, compile responses, clear context, and paste the compiled YAML into a fresh session. Use `## Recommended Next Command` only after approved YAML has been consumed and the approved artifact has been written or updated. Do not put any other section after the applicable final section.

### Self-Routing Continuation Payload

Every `review` alignment page this parent creates must include `agent_routing` in the bottom compiled YAML. The mapping routes a fresh agent back to this parent orchestrator; it does not authorize direct framework invocation or replace parent-owned state resolution. Use this shape, preserving the current product/research path argument when present:

```yaml
agent_routing:
  workflow: pattern-a-research-loop
  parent_skill: customer-discovery
  command: "$customer-discovery research/{slug}"
  product_path: research/{slug}        # omit in flat mode
  gate_owner: parent-orchestrator
  gate_type: framework-findings        # or framework-selection, shortcut-selection, synthesis
  framework_slug: <framework-slug>     # only for framework-findings gates
  framework_mode: inline-subskill      # only for framework-findings gates
  run_manifest: research/{slug}/_working/customer-discovery-run.yaml
  next_resolution: parent-resolves-from-yaml-and-filesystem
```

For framework selection, shortcut, and synthesis gates, omit `framework_slug` and `framework_mode`; `gate_type` must name the actual gate. The `command` field must carry the parent command the user would otherwise have copied separately. The parent consumes the YAML, writes or amends the artifact, archives consumed sources, derives progress from the run manifest plus canonical-intermediate files, and decides whether to load a framework subskill inline.

For review-pending framework, selection, shortcut, or synthesis pages, `## Next Work` tells the user to review the alignment page, compile YAML, clear context, and paste the compiled YAML into a fresh session. The compiled YAML carries the parent command, including `$customer-discovery` with the same product/research path argument when present. For post-write pending-framework states, `## Next Work` reports progress as "k of N frameworks complete" and says the next run executes the next pending framework; `## Recommended Next Command` names `$customer-discovery`.

After every framework write, recalculate pending frameworks from the run manifest and canonical-intermediate files before writing this handoff. If no selected frameworks remain and canonical `icp.md` is missing, `## Next Work` says the next run builds the unified synthesis review page, and `## Recommended Next Command` names `$customer-discovery --synthesize` with the same product/research path argument when present. After approved synthesis writes canonical `icp.md`, the final command section names only the first downstream command selected by the Next Steps decision tree.


State lives in two places only:

- **Run manifest** — `research/_working/customer-discovery-run.yaml` (flat) or `research/{slug}/_working/customer-discovery-run.yaml` (product-path). Records the selected framework set and each framework's intermediate path. Written when the multi-select YAML is approved. Shape:

  ```yaml
  orchestrator: customer-discovery
  slug: skills-showcase            # omit in flat mode
  selected_frameworks:
    - slug: w3-hypothesis
      intermediate: research/skills-showcase/customer-discovery-w3-hypothesis.md
    - slug: jtbd-needs
      intermediate: research/skills-showcase/customer-discovery-jtbd-needs.md
  ```

- **Canonical-intermediate existence** — a selected framework is *done* when `research/customer-discovery-{framework}.md` (or `research/{slug}/customer-discovery-{framework}.md`) exists, *pending* otherwise. `pending = selected − existing-intermediates`. The manifest stores selection only, not per-framework status.

`research/.progress.yaml` stays coarse — its `pipeline_stage` is a pointer, not per-framework status.

### State resolution (resolve the first match; YAML first, then most-progressed A→G)

On each invocation, after Product-Path Scope Resolution (step 0), resolve state:

| State | Detected when | Heavy phase this session | Emits / stops with |
|---|---|---|---|
| **0 — pasted YAML** | a compiled alignment or interrogation YAML is pasted | branch on `approval_status`/`round_status`: an approved alignment YAML applies the approval for the gate it answers (light: write manifest and/or prior framework intermediate, archive consumed source), then falls through to the next pending state below; an interrogation round YAML writes the round's answer sidecar, runs the confidence gate, and emits the next round or the completion handoff; `not-approved` → amend the named page (refinement session) and stop | amended page, next round, completion handoff, or proceeds ↓ |
| **A — done** | canonical `research/icp.md` (or `research/{slug}/icp.md`) exists | — | done; emit next-skill route (step 9) |
| **B — synthesize** | run manifest exists, all selected intermediates exist, no canonical `icp.md` (also forced by `--synthesize`) | **synthesis** (step 6) | synthesis `review` page |
| **C — run framework** | run manifest exists, ≥1 selected framework pending | **run next pending framework inline at its research stage** (step 5b) | that framework's findings `review` page |
| **E — build selection** | preliminary interview handoff exists, no run manifest, no multi-select page | mode detect → candidate bootstrap → build multi-select page (steps 1–5a) | multi-select `review` page |
| **F — interview** | interrogation completion handoff exists, no preliminary interview handoff | consume the elicited answers into the preliminary interview handoff (light — folds into the head of state E when cheap) | preliminary interview handoff, or proceeds ↓ |
| **G — interrogate** | nothing yet (no handoff, no manifest, no interrogation rounds) | **run one stage-zero interrogation round** (see **State G — Stage-Zero Interrogation Loop** below) | an `interrogation/customer-discovery-r{N}-{branch}.html` round page; on confidence-gate pass, the interrogation completion handoff |

**State G handoff.** The full interrogation procedure is in **State G — Stage-Zero Interrogation Loop (run before any handoff)** below. The handoff to `research/_working/preliminary-customer-discovery-interview.md` (or `research/{slug}/_working/preliminary-customer-discovery-interview.md`) may be written **only after the confidence gate passes** at the coverage checkpoint; writing it before completing at least one interrogation round and the coverage checkpoint is a contract violation. Do not bootstrap candidates or build the multi-select page in the interrogation session.

**Light vs heavy.** Recording the approved selection into the run manifest (state 0→C head), writing an already-reviewed framework intermediate, consuming interrogation answers into the completion handoff, and archiving a consumed source are *light* — they fold into the head of the next heavy session and do not get their own round-trip. The heavy phase (one interrogation round, one framework's research, synthesis) is the only thing isolated per session.

**Shortcuts.** `$customer-discovery discovery` and `$customer-discovery validate` short-circuit states E→C: they write a fixed framework set straight into the run manifest after the user approves the shortcut plan, then enter state C (steps 7–8).

### State G — Stage-Zero Interrogation Loop (run before any handoff)

State G is the deep-intake heavy phase (`context_intake: deep`), and it runs **in HTML, not the terminal**, as the stage-zero interrogation loop defined in `INTERROGATION-PAGE.md` / `docs/interrogation-page-convention.md`. The interrogation is the gate: **the preliminary interview handoff may be written only after the confidence gate passes** at the coverage checkpoint. Reading SKILL.md, `.progress.yaml`, the idea brief, and prior notes and then writing the handoff directly is the failure mode this section exists to prevent — if you ran zero interrogation rounds, the interview did not happen and the handoff must not be written. This skill **cannot advance to stage one (state E) until** the confidence gate passes with at least one completed round and every interview area covered or waived.

**Phase 1 — Gather context.** Read `.agents/project.json`, README, CLAUDE.md, existing research and specs, git history, `research/idea-brief.md` (or `research/{slug}/idea-brief.md`) and any notes, plus argument-provided context. Build an internal evidence base. Do **not** write the handoff at this point — Phase 1 is preparation for round 1, not a substitute for it.

**Round 1 — Assumptions manifest (interrogation page).** Build `interrogation/customer-discovery-r1-{branch}.html` rendering 3–7 source-tagged assumptions (`[from prompt]`, `[from repo]`, `[from research]`, `[inferred]`) as confirm/correct/flag controls, plus the first batch of genuinely open questions (each marked `data-open-input`) only where no assumption is derivable. Set `data-interrogation-round="1"` and `data-interrogation-gate="continue"`, name the answer sidecar `research/_working/interrogation-customer-discovery-r1.yaml` (or product-path equivalent), open the page, and **stop** for the compiled round YAML.

**Rounds 2..N — Adaptive follow-ups (interrogation pages).** A fresh session reads the prior round's compiled YAML, writes its answer sidecar, and runs the confidence gate. If areas that shape candidate generation and framework selection remain uncovered, build the next round seeded by the prior answers (drill into corrections, resolve contradictions; recommend-and-override over bare open prompts) and stop.

**Coverage checkpoint — Confidence-gate exit.** When every area is covered or waived, build the exit round with `data-interrogation-gate="coverage-checkpoint"` summarizing everything established and asking the user to confirm completeness or flag gaps. On confirmation, write the preliminary interview handoff to `research/_working/preliminary-customer-discovery-interview.md` (or `research/{slug}/_working/preliminary-customer-discovery-interview.md`) and **stop** — do not bootstrap candidates or build the multi-select page in this session. Flagging a gap raises the round number and continues the loop.

The handoff is a complete context transfer for the next cold session (state E): provisional mode signal (pre-product vs product-exists, with the evidence seen so far), context summary, recommended framework subset with rationale, and all elicited answers that shape candidate generation and framework selection. The next `$customer-discovery` run reads only this file to perform authoritative mode detection, candidate bootstrap, and build the multi-select page.

**Terminal fallback.** Only when an HTML interrogation page genuinely cannot be opened, fall back to terminal questioning (1–3 questions per turn, assumptions manifest and coverage checkpoint as terminal gates per the Manifest Visibility Rule). The fallback is degraded, not co-equal; build the HTML page by default. Each interrogation round ends the terminal message with `## Next Work` only: tell the user to clear context and paste the compiled YAML into a fresh session. The compiled YAML names `$customer-discovery`, per the loop-continuation contract.

---

## Process

### 0. Product-Path Scope Resolution

Resolve research scope by product path before using code or app structure as a hint:

1. If `$ARGUMENTS` names a non-archived `research/{slug}/` directory or a product-path ID whose `scope_path` points there, use that path. Treat `{slug}` as the product/app name, not the ICP, audience, or segment label.
2. If `$ARGUMENTS` names only `research/_archive/{slug}/` or a manifest entry with `status: archived` or legacy `status: abandoned`, stop and warn that the path is archived; do not write or update scoped outputs there.
3. Read `research/.progress.yaml` when present. Normalize legacy `active_path` to `active_paths` on read and write back `active_paths` on manifest updates. Treat legacy `abandoned` as `archived`; exclude `archived`, `abandoned`, `deferred`, `revisit_candidate`, `promoted`, and any `scope_path` under `research/_archive/` from active target selection.
4. If active product paths exist in the manifest, use those paths. If multiple active paths exist, ask which one to target unless this skill explicitly supports cross-path output.
5. If no active manifest target exists, list non-archived product directories under `research/`, excluding `research/_archive/` and dot directories. Auto-select only when exactly one exists; ask when multiple exist.
6. If no product directories exist, use flat `research/` single-product mode.
7. Detect monorepo/app/package structure only as a secondary hint.

When product path `{slug}` is active, read and write research under `research/{slug}/`, specs under `specs/{slug}/`. Product paths are research scopes, not git branches or parallel implementation lanes; preserve secondary `product_paths[]` without treating them as git branches.

0b. **Product-path manifest**: Read `research/.progress.yaml` when present. Normalize `active_path` (singular legacy) to `active_paths` (plural list) when reading; treat legacy `abandoned` as `archived` and exclude archived/deferred/revisit/promoted paths plus `research/_archive/` scopes from active target selection.

### 1. Mode Detection

Runs in **state E** (the build-selection session, after reading the interview handoff). Detect **pre-product mode** (default) or **product-exists mode**:

**Pre-product mode** activates when:
- No production codebase with live users detected, AND
- No `research/customer-feedback.md` with post-launch customer evidence, AND
- `$ARGUMENTS` does not contain "product" or "validate"

Available frameworks in pre-product mode:
- `w3-hypothesis` (default) — Schwartzfarb WHO/WHAT/WHY hypothesis generation + disproval
- `jtbd-needs` (default) — Ulwick/Christensen needs-based segmentation via jobs and outcomes
- `four-forces` (default) — Moesta Push/Pull/Anxiety/Habit switching moment analysis
- `five-rings` (optional) — Revella decision psychology and buyer journey. Pre-check when idea brief indicates B2B model.
- `seven-dimensions` (optional) — Lincoln Murphy ICP scoring with post-sale dimensions
- `pmf-engine` (unavailable) — requires real user data; grayed out with explanation

**Product-exists mode** activates when:
- Production code or deployment exists, OR
- `research/customer-feedback.md` exists with real customer data, OR
- `$ARGUMENTS` contains "product" or "validate"

Available frameworks in product-exists mode:
- `pmf-engine` (default) — Vohra/Supan empirical ICP from existing user data
- `seven-dimensions` (default) — Lincoln Murphy structured scoring with post-sale dimensions
- `four-forces` (optional) — switching analysis grounded in real churn/adoption data
- `five-rings` (optional) — buying insight refresh with real buyer evidence
- `jtbd-needs` (optional) — job validation against actual usage
- `w3-hypothesis` (unavailable) — superseded by empirical data; grayed out with explanation

### 2. Load Context

- Read `$ARGUMENTS`: if file path, read it; if text, treat as concept; if empty, check for idea brief
- Read `research/{slug}/idea-brief.md` or `research/idea-brief.md` — treat as starting hypotheses, not settled truth
- Read CLAUDE.md, README for product context
- Read codebase (if it exists): package config, key source files, routes, data models
- Read existing `research/icp.md` if it exists (prior run — ask user if they want to refine or start fresh)
- Read any existing `research/customer-discovery-*.md` intermediate artifacts (from prior framework runs)

**Provisional product-path evidence.** When a referenced product path is not present in `research/.progress.yaml`, do not treat it as a canonical active path. Require an explicit provisional-path evidence reference before using it as source context. If no such evidence exists, ask the user whether to proceed or to run `$idea-scope-brief` first.

### 3. Marketplace Side Preflight

Before identifying ICP candidates, resolve market-structure side coverage:

- Read any `Market Structure Handoff` or marketplace/platform/B2B2C/multi-sided notes from the idea brief, especially `## ICP Readiness`. Treat side names and value exchange as hypotheses, not validated ICPs.
- If no idea brief exists, infer likely sides from `$ARGUMENTS`, README, specs, codebase context, or product description when the concept suggests a marketplace/platform/B2B2C/multi-sided model.
- During broad market research, validate or refute the classification with evidence.
- Before candidate generation, write a side-coverage note in the working packet.
- Candidate generation must cover each material side or explicitly explain why a side is excluded.

### 4. Candidate Bootstrapping

This step runs in **state E** only (skipped when `research/icp.md` already exists and user chooses to refine).

**Broad market research** using web search with **8–12 diverse query strategies** (direct persona, pain point, market segment, trend, competitor user, forum/community, job posting, industry report, switching trigger, adjacent market, geographic/regulatory, business model, WTP signal, named account searches).

**Classify the business model** into one or more of: B2B SaaS (PLG), B2B SaaS (SLG), B2C, B2C subscription, marketplace/platform, B2B2C, D2C, open-source/open-core, API/developer-first.

**Identify 2–5 ICP candidates.** For each, note: who they are, pain evidence, accessibility, value delivery potential, WTP signal strength.

Write candidates to `research/_working/preliminary-customer-discovery-research.md`.

**Checkpoint — Present candidates to the user.** Show ICP candidates with evidence. Ask for corrections and missing segments. Incorporate feedback before framework selection.

### 5a. State E — Build Framework Multi-Select Page

Build the framework multi-select `review` alignment page with mode explanation, ICP candidates summary, available evidence, multi-select framework section (with mode-appropriate defaults pre-checked), a loop explanation (the selected set is the scope-and-candidate approval gate; each selected framework is then run inline, one findings page per framework, and the run advances by re-invoking `$customer-discovery`), and the approval gate.

This multi-select approval **is** the Stage-1 scope approval for the whole selected set. Stop for compiled YAML. Do **not** write the run manifest or run any framework in this session — that is state C.

### 5b. State C — Run Next Pending Framework (inline)

This session consumes the approved multi-select YAML (state 0→C) or advances after a prior framework's approval. At the **head** of the session, do the light bookkeeping first:

1. **Write/append the run manifest** if it does not yet exist: `research/_working/customer-discovery-run.yaml` (flat) or `research/{slug}/_working/customer-discovery-run.yaml` (product-path), recording `selected_frameworks` with each framework's `slug` and canonical `intermediate` path. Include only frameworks the user selected.
2. **Archive the preliminary interview handoff** at this selection-commit point (move it under `docs/history/archive/YYYY-MM-DD/HHMMSS/<original-working-path>`). A rejected multi-select page must still rebuild from the handoff, so do not archive it earlier.
3. **If a prior framework's reviewed content was just approved** by the pasted YAML, write its canonical intermediate `research/customer-discovery-{fw}.md` (or `research/{slug}/customer-discovery-{fw}.md`) from the already-reviewed working packet, and archive that framework's working packet and superseded review page.

Then run the **one heavy phase**: determine the next pending framework (first selected framework whose canonical intermediate does not yet exist), then **load and follow that framework subskill's `SKILL.md` inline, entering at its research stage (Stage 2)** — the multi-select approval already satisfied the framework's Stage-1 scope gate, so perform the research, write its working packet, and build a single findings `review` page. Stop for that framework's compiled YAML.

**Advance the loop by self-re-invocation.** When a framework findings page is in `review`, end the terminal message with `## Next Work` telling the user to review the page, compile YAML, clear context, and paste the compiled YAML into a fresh session; do not add a separate command section. The compiled YAML names `$customer-discovery` with the same product/research path argument when present. After a framework's compiled YAML is approved and its canonical intermediate is written, recalculate pending frameworks from the manifest and filesystem before writing the handoff. If pending frameworks remain, end with `## Next Work` reporting progress as "k of N frameworks complete" and saying the next run executes the next pending framework, followed by `## Recommended Next Command` naming `$customer-discovery`. If no pending frameworks remain and canonical `icp.md` is missing, end with `## Next Work` saying the next run builds the unified synthesis review page, followed by `## Recommended Next Command` naming `$customer-discovery --synthesize` with the same product/research path argument when present. Do not emit cross-skill routing here — that happens only after synthesis.


### 6. State B — Synthesis (auto-detected; also `$customer-discovery --synthesize`)

Enter synthesis when the run manifest exists, **all** selected framework intermediates exist, and no canonical `research/icp.md` yet exists. An explicit `$customer-discovery --synthesize` also forces this state. Read all intermediate framework outputs (`research/customer-discovery-{slug}.md`). At least one must exist.

**Synthesis mapping** — how framework outputs merge into the canonical 9+1 section format:

| Canonical Section | Primary Source | Secondary Sources |
|---|---|---|
| Customer Profile | w3-hypothesis (WHO), pmf-engine (HXC) | seven-dimensions (Ready/Willing/Able) |
| User Profile(s) | w3-hypothesis (WHO detail), pmf-engine (daily users) | jtbd-needs (job performers) |
| Trigger Events | four-forces (Push), five-rings (Priority Initiative) | jtbd-needs (unmet outcomes) |
| Current State Journey | jtbd-needs (current job map) | four-forces (Habit) |
| Pain Map | jtbd-needs (underserved outcomes) | four-forces (Push intensity) |
| Current Alternatives | four-forces (Habit, current solution language) | five-rings (Decision Criteria) |
| Market Sizing | Aggregated across frameworks | seven-dimensions (Acquisition Efficiency) |
| Stated Value Drivers | w3-hypothesis (WHAT/WHY), jtbd-needs (desired outcomes) | five-rings (Success Factors), pmf-engine |
| Customer ↔ User Dynamics | seven-dimensions (post-sale dimensions) | five-rings (Buyer's Journey) |
| Discovery & Evaluation | five-rings (all 5 rings) | four-forces (Active Looking) |

**Cross-ICP handling**: Merge per-candidate evidence across frameworks, select primary ICP using seven-dimensions scoring (or value × accessibility matrix), populate Additional ICPs and Cross-ICP Analysis sections.

Build alignment page for synthesis approval. After approval: write `research/icp.md` and `research/icp-search-log.md`, then on this canonical write **archive the run manifest** (`customer-discovery-run.yaml`) and synthesis working packet under `docs/history/archive/YYYY-MM-DD/HHMMSS/<original-working-path>`, **update `research/.progress.yaml`** `pipeline_stage` to `customer-discovery`, and emit the downstream next-step routing (step 9).

### 7. State C via Discovery Shortcut (`$customer-discovery discovery`)

Pre-product shortcut — short-circuits states E→C with a fixed framework set (`w3-hypothesis`, `jtbd-needs`, `four-forces`). Build a `review` alignment page for the shortcut plan and require final compiled YAML approval. After approval, write the fixed framework set straight into the run manifest (`research/_working/customer-discovery-run.yaml` or the product-path equivalent), then enter **state C** and run framework 1 inline per step 5b. The loop advances by re-invoking `$customer-discovery`.

### 8. State C via Validation Shortcut (`$customer-discovery validate`)

Product-exists shortcut — short-circuits states E→C with a fixed framework set (`pmf-engine`, `seven-dimensions`). Build a `review` alignment page for the shortcut plan and require final compiled YAML approval. After approval, write the fixed framework set straight into the run manifest, then enter **state C** and run framework 1 inline per step 5b. The loop advances by re-invoking `$customer-discovery`.

### 9. Next Steps (after synthesis only)

Recommend the first matching condition as **Recommended**, remaining as **Other options**:

- ALWAYS: `$competitive-analysis` — Research competitors and market gaps for this ICP
- IF no `specs/`: `$competitive-analysis` — Map the competitive landscape
- IF `specs/` exist but no `research/journey-map.md`: check pack availability for `customer-lifecycle`, recommend `$journey-map` if enabled, or `npx skillpacks install customer-lifecycle` from the project shell if not enabled
- IF codebase exists: check pack availability for `business-ops`, recommend `$mvp-gap` if enabled, or `npx skillpacks install business-ops` from the project shell if not enabled
- IF `research/competitive-analysis.md` exists: check pack availability for `product-design`, recommend `$brainstorm` if enabled, or `npx skillpacks install product-design` from the project shell if not enabled

### 10. Downstream Impact Check

After writing, check existing downstream documents for conflicts. Classify as None/Minor/Major. For Major, recommend `$reconcile-research`.

## Output

### State E output: framework multi-select `review` page + working packet

The run manifest `research/_working/customer-discovery-run.yaml` is written at the head of the first state-C session (on multi-select approval), not in state E.

### State C output: per-framework findings `review` page + `research/customer-discovery-{framework}.md`

### State B output (synthesis): `research/icp.md` (or `research/{slug}/icp.md`)

Canonical 9+1 section format preserved for downstream compatibility. See claude mirror for full template.

### `research/icp-search-log.md`

Raw research log with all queries, findings, evidence, and data gaps.

### `research/.progress.yaml`

Product-path manifest updated when secondary ICPs create parked or promotable paths.

## Task Classification

- Immediately actionable → `tasks/todo.md`
- Human-only external actions → `tasks/manual-todo.md`
- Condition-gated records → `tasks/record-todo.md`
- Cadence-based reviews → `tasks/recurring-todo.md`

## Constraints

- **Parent self-advances one phase per invocation** and follows the next pending framework's subskill inline (entering at its research stage). It bootstraps candidates, builds the multi-select selection, runs each selected framework inline, and synthesizes. The run manifest records the selected framework set; progress is the existence of canonical intermediates. The loop advances by re-invoking `$customer-discovery` (fresh Codex session between sessions).
- **Synthesis requires at least one framework output.**
- **Mode detection is evidence-based.**
- **Stay in problem space.** No features, architecture, UI, or technical solutions.
- **Evidence-based.** Every claim must trace back to research evidence.
- **Primary ICP must use the canonical 9 top-level `##` sections** for downstream compatibility.
- **Section 10 captures behavioural signals only.**
- **WTP is evidence, not pricing strategy.** Route raw signals to `$monetization`.
- **Do not overwrite existing `research/icp.md`** without asking.
- **Minimum 8 web search queries** before identifying ICP candidates.
- **Present before writing.**

## Interrogation Page

Follow the shared interrogation-page convention via the packaged convention resolver; output path is `interrogation/customer-discovery-r{N}-{branch}.html`. Before producing research, run the stage-zero interrogation loop, starting with the assumptions manifest as round 1, and loop until the confidence gate passes. This skill **cannot advance to stage one until** the confidence gate passes with at least one completed interrogation round and every interview area covered or waived. Each round page must contain at least one genuinely open input (`data-open-input`).

## Alignment Page

Follow the shared alignment-page convention via the packaged convention resolver; output path is `alignment/customer-discovery-{topic}.html`.

## Default Shipping Contract

Follow the shared shipping contract convention in CLAUDE.md.

