/design-flow:variants <brief> [--variants N] [e.g. pricing page --variants 3]from design-flow
Generate N brand-conformant compositions of one brief plus a dev-only switcher route — so an aesthetic decision is made by comparing real screens, not by approving a single output.
Ships in design-flow. Installing the plugin adds it to Claude Code.
Generate N genuinely different compositions of one brief (default 3) and a switcher to compare them live in the real app. Delegate composition to the adapter's composer agent (Phase 1), one dispatch per variant; delegate the brand verdict to brand-guardian.
Exploring before you pay N × the real implementation? That is /design-flow:canvas — it writes a Claude Design
prompt carrying this project's own role tokens, its real component catalog and the band sequence for
the surface, and /design-flow:port brings the chosen artboard back into the app. Use this command when
you want the options as running screens to compare in the app; use the canvas when you want them
as pictures first. The pen.dev tier that used to sit here was retired in #766.
One-shot generation is the right shape when there is a correct answer — a catalog component, a
CRUD screen, a form. Use /design-flow:component for those.
It is the wrong shape when the brief has many defensible solutions: a marketing hero, a pricing page, a landing section, a dashboard's first screen. There the useful question is not "is this acceptable?" — which tends to become yes — but "which of these three is best, and why?". Variants make the human a chooser rather than an approver.
/design-flow:setup is deliberately not a variant command. It scaffolds the token
architecture and the base components: exactly one of those may exist, and N of them would be N
brands. Variants vary within a pack, never across.
Every variant is fully brand-conformant. They differ in composition only — layout structure, section order, emphasis, density, motion presence. Same role tokens, same components, same component API.
This is not a style menu (minimalist / brutalist / high-end). We declined that
deliberately and the reasoning holds: one system with per-brand knobs, not a buffet. A variant
that reaches for its own colours, its own CSS, or a bespoke component has stopped being a
variant and become a fork of the design system — the same failure brand.md describes for a
pack that rewrites spacing.
The constraint is asserted, not trusted — see Phase 3.
Parse $ARGUMENTS: everything before --variants is the brief; --variants N sets the count,
default 3. Refuse N < 2 (a set of one is an approval) and push back above 5 — three is a
decision, ten is a chore, and the switcher stops being comparable.
Resolve and lint the brand pack exactly as /design-flow:setup does — a pack missing a role
renders a stock Tailwind colour rather than failing, and it would do so in all N variants at
once:
if [ -d "brands/<pack>" ]; then PACK="brands/<pack>"
else PACK="${CLAUDE_PLUGIN_ROOT}/brands/<pack>"; fi
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/brand_pack_lint.py" "$PACK"
Non-zero exit: stop and report the missing roles. Do not generate against a broken pack.
Read the doctrine once, compose N times. Follow /design-flow:component's order of
operations in full for each variant — the catalog, page-anatomies.md for anything at screen
scale, and for a marketing surface the three mandatory references (marketing-copy.md,
visual-assets.md, motion.md). Variant mode changes how many outputs there are, not what
the doctrine is.
Resolve the UI adapter once (python3 "${CLAUDE_PLUGIN_ROOT}/scripts/ui_adapter.py"; exit 2 means it cannot say: quote its message and stop, never fall back to another stack), then dispatch the design-flow:<agents.composer> agent it names once per variant, in parallel, each with the same brief and the same
pack, plus an explicit composition axis to move along so the set does not collapse into
three renderings of one idea:
section_rhythm within the pack's knob; how much per screenful.motion.md, or none at all.Each variant gets a one-line rationale written at generation time — "denser, prioritises the pricing table" — not reverse-engineered afterwards. Criterion: a rationale a human can choose against. "Modern and clean" is not one.
Three artefacts, and all three are temporary: the manifest (variants.json: brief, brand, one entry per variant with its id,
file and one-line rationale), the variants themselves (partials, so the winner can be moved unchanged) and a switcher that renders
one at a time. Write them where the discard step can find them. Where, and in which template language, is the adapter's:
read <dir>/variants.md (the directory ui_adapter.py printed; see Phase 1).
The route is development-only. A switcher route renders every rejected variant, so leaving it reachable in production ships three landing pages nobody approved. Guard it, and constrain the slug so a path segment cannot walk out of the directory. The adapter file carries the working code; the guard is the rule, and Phase 3 asserts it.
The toggle swaps a frame, not the page, so the page, the scroll position and the viewport are left alone, which is the whole point:
the comparison happens at real viewports in the actual app, not in a description of three options. Style the switcher chrome with
role tokens like anything else, and keep it minimal — it is a comparison harness, not a screen. min-h-touch still applies; you will
be tapping it on a phone.
Run it. "They look consistent" is not a verdict — the whole reason the constraint is mechanical is that three plausible screens are exactly the input a human review waves through.
# the exact command, with the adapter's paths, is in <dir>/variants.md
Exit 0 clean · 1 findings · 2 unusable. It runs the #157 LLM-tell detector against every
variant file and adds the invariants that detector cannot have — a variant that brings its own
CSS or custom properties, a variant naming a pack-private primitive instead of a role token,
two variants with an identical composition signature (a set that offers fewer real options than
it claims), a missing rationale, and an unguarded switcher route. --list-rules prints all ten
with what each enforces.
brand_pack_lint.py is not run per variant, and asking for that was the one thing #160 got
wrong: it validates a brand pack, which is one object shared by every variant. Running it N
times proves one thing N times and nothing at all about the variants. It runs once, in Phase 0.
Then hand the set to brand-guardian for the judgement half — lockup, endorsement, mark usage, and whether a variant has drifted from the pack's personality knobs rather than merely composed differently.
Findings: regenerate the offending variant or drop it. Never present a caveated option.
Present the set as a choice: the switcher URL, the N rationales, and the one question worth asking — which, and why? Do not recommend one unless asked; a recommendation converts the chooser back into an approver.
Once chosen:
# the adapter's variants.md names the command: variant_conformance.py --verify-discard
The chosen variant still goes through /design-flow:audit. Variants are a way of making a
choice, not a substitute for the consistency gate — comparing three screens tells you which is
best, never whether the best one is correct. design-auditor runs on the winner in its real
home, after the scaffolding is gone.
/design-flow:critique is the rubric for which is best. This command produces N conformant
variants and then asks a human to choose — with nothing to choose on beyond preference. The critic
supplies that: it names each variant's surface class and focal point, ranks them on brief-fit
first, craft second, and says which single change would most improve the winner. "They are all
fine" is not a ranking.
Note the division. Point 4 sends the winner to the consistency gate; this sends all N to the taste lens, and it happens before the choice rather than after. Conformance cannot rank — every variant here is conformant by construction, which is exactly why a second question is needed.
This command generated N compositions, asked a human to choose, and let the answer evaporate. The winner moved to its real home, the losers were deleted, and nothing recorded which won, on what axis, or why the others lost — so the same three variants get re-proposed next quarter and re-discarded on taste.
After the choice, record every variant:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/prompt_library.py" \
--record-surface marketing-hero \
--rationale "screenshot-led hero, claim demoted to a lede" \
--axis "focal point" --verdict accept --why "the product carries it" \
--built <winner-path>
Record the losers too. A library of keepers cannot answer "did we already try this and reject it?", so the next run re-proposes the discarded one — the composition-side version of paying twice. That is the same argument the asset half of the library already makes for rejected prompts.
A composition costs nothing and names no model: the agent authored it from the doctrine, so the
library records model: null with a note saying not applicable rather than pretending a gap.
The switcher URL, one line per variant (id · rationale · the axis it moved along), the
variant_conformance.py verdict, and the choice question. After a choice: the winner's new path,
the discard verification, and one library row per variant — the winner accepted, the rest
rejected with their reasons.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
13 commands in this plugin
/assets`/design-flow:assets`Set up and drive the curated asset library — scaffold config, read the brief, plan what the product needs, generate what is outstanding, and keep the plan honest as the product grows./audit/design-flow:audit — $ARGUMENTSAudit UI against the design system — flag drift (raw/brand colors in components, brittle selectors, breakpoint misuse where an intrinsic primitive fits, missing focus ring/ARIA, non-min-h-touch targets, hand-rolled layout CSS) and propose fixes. Optional browser mode measures conformance on the RENDERED page (literal colours after the cascade, numbered-step bindings, `dark:` count, focus rings, tap targets, radius language) instead of only reading source./canvas/design-flow:canvasnpx claudepluginhub fmanimashaun/claude-skills --plugin design-flow