/ux:ux-discoverfrom ux
Runs pre-build UX intake: a 10-field discovery followed by a design-system recommender. Also supports --frame and --recommend modes.
Ships in ux. Installing the plugin adds it to Claude Code.
An existing design system is fixed input. Before any engine pick, run python3 -m engine.cli.main --no-pretty system detect --root . (over MCP, ux_system_detect). When found is true, follow commands/ux-design.md step 1a: the project's tokens win, the engine's palette and type picks are suggestions for gaps only, and nothing edits, overwrites or re-derives the system's files.
No generation without discovery.
This is the discipline gate. The intake every project goes through before /ux-design, /ux-system, or any other generation command runs. The plugin asks; you answer; the engine has constraints to work with instead of guessing.
/ux-discover has three modes. It absorbs what used to be /ux-frame and /ux-recommend; those names still work as aliases until 4.1.
| Mode | Flag | What it does | Writes |
|---|---|---|---|
| discovery (default) | none | 10-field intake, then the recommender | .ux/last-discovery.json, .ux/last-recommendation.json |
| frame | --frame | Lean four-field framing block: audience, outcome, hypothesis, success signal | .ux/last-frame.json (and .ux/last-discovery.json when the 10 fields are also filled) |
| recommend | --recommend | The 5-parallel-search recommender only, from a saved brief or from one-shot flags | .ux/last-recommendation.json |
Pick the mode from the flag. With no flag, pick from the words: "frame this", "what's the brief", "scope this" mean frame mode; "recommend a system", "what should I use", "pick a palette" mean recommend mode; everything else is discovery.
| Flag | Mode | Meaning |
|---|---|---|
--frame | frame | Run the four-field framing block instead of the 10-field intake |
--recommend | recommend | Run only the recommender |
--no-recommend | discovery | Stop after the intake; do not run the recommender |
--load-state <file> | discovery | Resume from a saved discovery JSON and ask only the missing fields |
--save <path> | discovery | Where to write the answers (default .ux/last-discovery.json) |
--brief-file <file> | recommend | Brief to recommend from (default .ux/last-discovery.json) |
--brand-file <file> | discovery, recommend | Anchor palette and type to an extracted client brand (.ux/brand.json) |
--project-type, --industry, --tone, --must-have, --forbidden, --stack, --region | recommend | One-shot brief fields when there is no saved brief. --tone, --must-have and --forbidden repeat |
--persist | discovery, recommend | Write .ux/design-system/MASTER.md after the recommendation without asking first |
/ux-design or /ux-system./ux-fix./ux-audit or /ux-lint..ux/last-discovery.json for this project and the brief hasn't changed. Run --recommend alone if you only need a fresh recommendation..ux/last-frame.json already frames the project, or the brief is a one-off component build with no framing implications.The 10 fields:
python3 -m engine.cli.main discover
The CLI walks the 10 questions interactively, then writes the answers to
.ux/last-discovery.json (or the --save path). Subsequent commands
(/ux-design in every mode, /ux-system) auto-load that file if present.
For non-interactive use, hand-edit .ux/last-discovery.json:
mkdir -p .ux
cat > .ux/last-discovery.json <<'JSON'
{
"answers": {
"project_type": "...",
"audience": "...",
"primary_goal": "...",
"tone": "...",
"must_have": "...",
"forbidden": "...",
"reference_brands": "...",
"stack": "...",
"region": "...",
"success_metric": "..."
}
}
JSON
.ux/last-discovery.json:
{
"answers": {
"project_type": "landing",
"audience": "B2C, mobile-first, MENA region",
"primary_goal": "Trial signup",
"tone": "warm, editorial, trustworthy",
"must_have": "dark-mode, rtl-arabic, a11y-AA",
"forbidden": "brutalism, purple-gradients, emoji-in-ui",
"reference_brands": "Stripe, Linear, Mercury",
"stack": "nextjs-15-app-router",
"region": "mena",
"success_metric": "Signup CR > 4%"
},
"complete": true,
"missing": []
}
ux discover --load-state .ux/last-discovery.json # answer the missing fields only
Unless --no-recommend was passed, finish discovery by running the recommender exactly as recommend mode does below, so /ux-design finds .ux/last-recommendation.json waiting.
Because the alternative, letting the LLM "infer reasonable defaults", is exactly what produces AI slop. Default Inter font, default purple gradient, default three-card hero. The 10 questions remove the guesswork. The plugin can't improvise its way past a structured input.
--frame)The job is a tight, structured framing block that every downstream command can read. No design work happens here. No critique. Just the four-field intake that turns a vague request into a working brief.
Triggers: "frame this", "what's the brief", "set up the project", "framing", "what are we actually building", "frame the work", "scope this".
Anything the user has: a Slack paste, a Figma URL, a one-line idea, a ticket, a meeting transcript, or nothing. If the input already contains the four framing fields, extract them. Do not re-ask.
Read what the user provided. If you can confidently pull audience, outcome, hypothesis, and success_signal out of the input, skip ahead to step 3.
If any field is missing, ask ONCE with a single combined question that surfaces all gaps. Example:
"Quick framing: who specifically is this for (not 'users'), what changes for them when we ship, what's your bet on why this will work, and how will we know it worked? One paragraph is fine."
Do not ask the four questions in four separate messages. That is the failure mode this mode exists to prevent.
Apply these tests before accepting any field:
If the user resists sharpening twice, accept their best answer and flag the soft field in the output.
Format the output exactly like this:
─── framing ───
Audience: <specific role/segment with qualifiers>
Outcome: <behavior change the audience makes>
Hypothesis: <if-then with causal reasoning>
Success signal: <measurable metric or observable behavior>
Soft fields: <list any fields flagged as not-sharp-enough, or "none">
Keep each field to one tight sentence. Two if needed. Never more.
Write to .ux/last-frame.json in the project root. Create the .ux/ directory if it does not exist.
{
"command": "ux-frame",
"timestamp": "<ISO8601>",
"audience": "<verbatim from output>",
"outcome": "<verbatim from output>",
"hypothesis": "<verbatim from output>",
"success_signal": "<verbatim from output>",
"soft_fields": ["<list of any field names that were accepted soft>"]
}
The command value stays ux-frame so older readers of the file keep working. Every downstream command reads this file to anchor its work.
The frame covers four of the ten discovery fields. When the user wants to build next, run the 10-field discovery (python3 -m engine.cli.main discover --save=.ux/last-discovery.json, filling audience and success metric from the frame), then the recommender:
python3 -m engine.cli.main --no-pretty recommend --brief-file=.ux/last-discovery.json > .ux/last-recommendation.json
The recommendation is what /ux-design and /ux-system read next.
The framing block from step 3, followed by the next-prompt block. Nothing else. No commentary, no congratulations, no "here is your framing." Just the block and the next move.
Surface the next move based on what the framing reveals:
/ux-audit/ux-design/ux-research/ux-next (let the conductor pick)─── next ───
Recommended: <primary next command based on framing>
Other moves: <2-3 alternatives>
/ux-next (let me decide)
.ux/last-frame.json. Downstream commands depend on it.─── rule, or filler sentences./ux-design or /ux-audit..ux/last-frame.json. Every downstream command silently degrades when this file is missing.--recommend)One call. Five parallel searches. One merged system out.
Industry, then style, palette, type, motion, components, brand exemplars and guardrails. The Python engine does the merging; you get a structured recommendation you can hand directly to /ux-design or /ux-system. The MCP tool ux_recommend runs the same engine for MCP hosts.
industries.json lookup gives style/palette/type biases for your domain.styles.json filtered by industry + brief tags.palettes.json filtered by style.compatible_palettes.type-pairs.json filtered by style.compatible_type_pairs.motion-presets.json filtered by style hints.python3 -m engine.cli.main --no-pretty recommend --brief-file=.ux/last-discovery.json > .ux/last-recommendation.json
python3 -m engine.cli.main recommend \
--project-type=landing \
--industry=fintech-neobank \
--tone=warm --tone=editorial \
--must-have=dark-mode --must-have=a11y-AA \
--forbidden=brutalism --forbidden=purple-gradients \
--stack=nextjs-15-app-router \
--region=mena
python3 -m engine.cli.main recommend --brief-file .ux/last-discovery.json --brand-file .ux/brand.json
When --brand-file points at an extracted client brand (from /ux-design Step 1.5 or references/process/brand-extraction.md), the recommendation's palette.colors.primary becomes the brand color (sampled from the logo, not the most-painted CSS), and it carries brand + type_directive blocks so the build anchors palette + type to THEM, not the engine's default pick. Without it, the recommender chooses freely from the manifests.
from engine.recommender import recommend, Brief
rec = recommend(Brief(
project_type="dashboard",
industry="saas-productivity",
tone=["precise", "calm"],
must_have=["dark-mode"],
forbidden=["playful-gradient"],
region="us"
))
print(rec.rationale) # one-line rationale per lane
print(rec.style["id"]) # picked style
print(rec.palette["colors"]) # token map
print(len(rec.guardrails)) # anti-patterns, always on
The recommendation is a JSON document with:
style: one entry from styles.json (the picked design philosophy)palette: one entry from palettes.json (the picked color system)type_pair: one entry from type-pairs.json (display + body + mono)motion: top 5 motion presets compatible with the stylecomponents: top 12 components compatible with the stylebrand_exemplars: top 5 brands in the same industry to studyguardrails: every anti-pattern rule (always on)rationale: one line per lane explaining the pickThe recommendation lands at .ux/last-recommendation.json so it chains into /ux-design (every mode), /ux-system, and /ux-lint (which verifies generated code against the guardrails).
After running, save the recommendation as a MASTER.md in your project (offer it every time; --persist saves without asking):
python3 -m engine.cli.main persist save --project-root .
This creates .ux/design-system/MASTER.md: a human-readable Markdown capture of every decision. Re-runnable, version-controllable, shareable.
/ux-design is what USES it.forbidden field is yours to wield.After discovery completes, the natural next steps:
/ux-design [extra brief]: generates frontend code grounded in the recommendation./ux-design --component <name>: generates one component aligned to the discovered constraints./ux-design --dashboard: generates a dashboard from the same brief./ux-system: generates a full design system from the recommendation.| Error condition | Recovery |
|---|---|
| User provides empty or near-empty brief | Ask one combined question for the missing fields; never one question per message |
| User answers "everyone" or "users" as audience | Push back with a specific clarifier ("Which customers? Returning, first-time, a specific tier?") up to twice, then flag as a soft field |
| User answers with a vague outcome ("make it better", "improve UX", "modernize") | Push back: "What does the audience do differently after we ship that they don't do today?" |
| Hypothesis lacks causal reasoning | Push back: "What's the bet? If we change X, then Y will happen because Z." |
| Success signal is unmeasurable ("users will love it") | Push back: "What metric, behavior, or signal would prove this worked in two weeks?" |
.ux/ directory cannot be created (permissions) | Surface the path error to the user and ask for an alternative project root |
| No data manifests found (recommend) | The engine returns an empty recommendation whose rationale says the data files are missing; run /ux-init or reinstall the package |
| Industry not found (recommend) | The engine scores all industries against the brief tags and picks the closest |
| Style and palette incompatible (recommend) | The engine picks the highest-scoring palette regardless and flags this in rationale |
For path issues: see references/process/discovery-protocol.md for state file location (.ux/ in project root). Report bugs at https://github.com/Laith0003/ux-skill/issues.
If python3 -m engine.cli.main is not on PATH, prompt for the 10 fields (or the four framing fields) in the chat and save them as JSON manually. Recommend mode has no prose fallback: say the engine is missing and point to /ux-init.
What the command file sets; muted values are Claude Code's defaults
ux-discovery, design-intake, design-system, recommender, framing
7-day visitors to each command page
npx claudepluginhub laith0003/ux-skill --plugin ux25 commands in this plugin
/ux-a11y/ux-a11yWCAG 2.1 AA accessibility audit plus common-courtesy checks beyond the spec. Produces findings grouped by WCAG criterion with severity, evidence, and fix. Triggers on "accessibility check", "WCAG audit", "is this accessible", or "a11y review". Use when WCAG 2.1 AA audit, checking accessibility on a page or component, verifying contrast / keyboard / screen reader / focus / ARIA / motion preferences / form-error patterns, pre-ship accessibility gate. Skip when the surface is not user-facing, backend or infrastructure work, work-in-progress sketches that aren't ready for an a11y audit (use ux-critique for an early taste call)./ux-audit/ux-auditFull 6-lens UX review of a surface. Outputs a structured Polaris-style report with findings, severity, evidence, and fixes. Triggers on "audit", "review the ux", "is this any good", or "what's broken". Use when auditing UX on a page or surface, running a structured UX review, the user asks "is this any good", checking against Norman / Krug / Laws of UX, producing a Polaris-style severity-tagged report. Skip when the surface doesn't exist yet (use ux-design for new builds), the user wants only one lens (use the targeted command — ux-a11y / ux-copy / ux-motion / ux-polish), backend-only work, infrastructure./ux-case-study/ux-case-studyGenerate a project case study in pure-monochrome editorial format. Triggers on "write a case study", "case study this project", "do the wrap-up doc". Use when writing a project case study, shipping a publishable monochrome editorial document, ending a project with a case-study artifact, producing the (A)–(G) section format in pure monochrome. Skip when the project lacks the data to populate (A)–(G) sections, the user wants a marketing landing not a case study (use ux-design)./ux-component/ux-component (alias)Moved to /ux-design --component. Alias kept until 4.1./ux-copy/ux-copyMicrocopy review and rewrite against the voice rubric. Produces a before/after table with severity per string and a clean rewrite block. Triggers on "review the copy", "fix the microcopy", "the error messages are bad", or "rewrite this". Use when reviewing or rewriting microcopy, fixing error messages that sound like AI, tightening empty/loading/success state copy, checking CTAs against the voice rubric, auditing forms for label / helper / error patterns. Skip when the surface has no user-facing strings (use ux-audit for the whole surface), the copy is auto-generated from data with no editorial layer, backend or infrastructure./ux-critique/ux-critiqueOpen-ended taste call on a specific surface. Not a structured audit — a designer's opinion. Returns 3 wins, 3 misses, and 1 strategic move. Triggers on "what do you think", "is this good", "critique this", or "honest take". Use when open-ended taste call, the user asks "what do you think", design review without a structured checklist, producing the 3-wins + 3-misses + 1-strategic-move format. Skip when the user explicitly wants a structured audit (use ux-audit instead), the surface is missing context for taste judgment, backend or infrastructure work.Other plugins' commands for the same job