discovery

An open-source harness for experience discovery.
Point it at a checkout, a storefront or any web app. It reads the data, browses like your
real shoppers, and hands you segment-targeted, sized, falsifiable hypotheses — ready for a
test, a human, or another agent.
discovery -t www.your-store.com -p commerce
Methodology · Architecture · Profiles · Data model · Claude Code plugin · ADRs

A real 37-minute run (Claude Haiku 5.5 through Claude Code, $0.70) replayed at 10×:
discovery replay examples/reports/demo-shop-haiku --speed 10.
Status: alpha
discovery 0.1 is an alpha. It runs end to end, but it is early:
- Things will change: the
report.json schema (versioned by SCHEMA_VERSION;
discovery schema report prints the current one), CLI flags, the profile and knowledge-pack
formats, and defaults such as which phases run.
- The analysis can be wrong. Treat hypotheses as leads that need human review, not as
findings. Mark them with
discovery review (would_test / already_known / too_small / wrong):
the marks are stored with the run, and they help us calibrate the harness.
discovery --version, discovery doctor, the TUI header and the report.md footer all carry
the label.
Why
Most conversion advice is one-size-fits-all ("simplify your checkout"). Real wins come from
small changes aimed at specific segments — returning mobile shoppers hitting a login wall,
pickup-only buyers who can't find the pickup option, promo hunters whose coupon error wipes the
payment form — sized in conversions per month and tested fast.
discovery encodes the loop practitioners actually run, so an agent can do the heavy lifting:
context check → measurement ruler → gap = N missing conversions → bugs first
→ segment contributions → mechanism (data + synthetic shoppers) → sized hypotheses
→ independent critic → prototype / draft preview → one recommendation
What you get
A run produces report.json (a versioned contract — discovery schema report) and a
readable report.md:
- Measurement ruler — numerator / denominator / unit / window per KPI, plus trap checks.
No ruler, no verdict.
- Gap account — the gap as N missing conversions per month, decomposed into bugs and
segment contributions. "No cause" is a valid residual.
- Segments — dimension tree (device → visitor type → browser → step → payment, ticket band…),
personas and flow types as candidate generators, data-driven clusters.
- Hypotheses, each with:
kind: bug · measurement · loss · experience · strategy · lever (bugs are fixes, not experiments)
- If we … then … because …, a falsifier, the target segments
- size: low / central / high conversions per month, labelled measured · estimate · ceiling · transferred, with the arithmetic
- cost (S/M/L) shown next to impact — never dividing it
- a validation plan written before cutting data (prediction, primary KPI, guardrails, placebo, sample size)
- an independent judge verdict, and optionally a prototype and a before/after draft preview
- Coverage ledger — what was checked and how it ended, so "not found" ≠ "not looked".
See a real one: examples/reports/demo-shop-haiku/report.md
(the cheapest Claude model, through Claude Code, on the bundled demo shop).
Quick start
# build
cargo install --path crates/discovery-cli # installs the `discovery` binary
# check your setup (LLM, browser, node)
discovery doctor
# offline demo: synthetic data + the bundled demo shop + a deterministic demo model
python3 -m http.server 8080 -d examples/demo-shop &
discovery -t http://localhost:8080 -p files --data examples/datasets/demo-shop -m mock/demo
# real run with your own key
export ANTHROPIC_API_KEY=... # or OPENAI_API_KEY, OPENROUTER_API_KEY, …
discovery -t https://www.example-store.com -p commerce -g "why do mobile users drop at payment?"
No API key but you use Claude Code? -m claude-code/claude-opus-5-5 runs the agents through
your local claude login (or CLAUDE_CODE_OAUTH_TOKEN from claude setup-token).
How it works