Consolidate Variations
Invoke as /consolidate-variations.
Use this skill after the user has built and evaluated multiple UI layout variations (typically generated via /ux-variations --layout-mode, built via /exec, and evaluated via /uat --variant-evaluation (check .agents/project.json.enabled_packs for product-testing — if product-testing is not enabled, recommend /pack install product-testing first)). This skill compares the variations, interviews the user on what works and what doesn't in each one, cherry-picks the best elements, resolves conflicts where preferred choices are incompatible, and produces a single consolidated implementation-ready UI specification.
Users with manually built variations (not from the /ux-variations pipeline) can also use this skill directly, but consolidation should not happen before the user has reviewed the variants and captured evidence.
Workflow
0. Product-Path Scope Resolution
Resolve research scope by product path before using code or app structure as a hint:
- 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.
- 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.
- 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.
- 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.
- 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.
- If no product directories exist, use flat
research/ single-product mode.
- Detect monorepo/app/package structure only as a secondary hint. Suggest creating a missing
research/{slug}/ product path when code clearly exposes an app, but do not require code or monorepo detection before using research/{slug}/.
When product path {slug} is active, read and write research under research/{slug}/, specs under specs/{slug}/, and treat top-level research/*.md files as flat-mode documents or cross-path summaries.
Resolve context
- Read
.agents/project.json if it exists.
- Read
README.md, AGENTS.md, CLAUDE.md, relevant docs/, specs/, research/, route files, component directories, and design artifacts when present.
- Locate the variation spec:
specs/ui-layout-variations-[topic].md or specs/ux-variations-[topic].md.
- Locate the content requirements:
specs/ui-requirements-[topic].md or equivalent content contract.
- Locate variant evaluation evidence:
research/uat-variant-evaluation-[topic].md, research/uat-plan.md result logs, screenshots, notes, recordings, or explicit user-provided review notes.
- Locate built implementations: scan route files, component directories, and any variation-specific directories or branches.
- If the variation spec or implementations cannot be found, ask the user to point to them.
Evidence gate
- If no evaluation evidence exists and the user has not explicitly said they already reviewed the variants and is ready to converge, stop and recommend
/uat --variant-evaluation (check .agents/project.json.enabled_packs for product-testing — if product-testing is not enabled, recommend /pack install product-testing first).
- Do not infer a winner from specs alone. Built variants need hands-on review or explicit user readiness before consolidation.
- If some variants are unreviewed, ask whether to exclude them, evaluate them first via
/uat --variant-evaluation (check .agents/project.json.enabled_packs for product-testing — if product-testing is not enabled, recommend /pack install product-testing first), or include them as spec-only references.
Present variation inventory
- List each variation with a one-line summary of its approach.
- Note build status for each: built and reviewed, built but unreviewed, partially built, spec-only.
- Note evidence status for each: result log present, user notes present, no evidence.
- Use AskUserQuestion to confirm which variations the user has reviewed and wants to evaluate. Skip unreviewed or unbuilt variations unless the user wants to include them from spec alone.
Interview per variation
- For each reviewed variation, ask using AskUserQuestion (1–3 questions per turn):
- What works well in this variation? Name specific elements, regions, or interactions.
- What doesn't work? What feels wrong, cluttered, sparse, or confusing?
- Any specific component, region, or interaction you want to keep in the final design?
- Anything to explicitly reject — never use this approach?
- Record responses as structured annotations per variation:
- Keep: elements the user wants in the final design (with source variation)
- Reject: elements the user never wants (with source variation)
- Neutral: elements the user has no strong opinion on
Cross-variation synthesis
- Present a Consolidation Matrix showing each design dimension and which variation's approach the user preferred:
| Design Element |
Variation A |
Variation B |
Variation C |
Winner |
| Container pattern |
card grid |
data table |
list+detail |
? |
| Detail view |
modal |
sidebar |
full-page |
? |
| Navigation |
top-nav |
side-nav |
tabs |
? |
| ... |
... |
... |
... |
... |
- Fill in winners based on the interview. Mark conflicts where preferred choices from different dimensions are incompatible (e.g., user wants sidebar detail from Variation B but also wants the full-width card grid from Variation A — these compete for horizontal space).
- For each conflict:
- Present the tension clearly
- Offer 2–3 resolution options with tradeoffs
- State a recommendation
- Use AskUserQuestion to resolve
- Continue until every row in the matrix has a winner and all conflicts are resolved.
Build consolidated prototype
- Merge the best elements from variation prototypes into a single runnable artifact at
prototypes/{topic}/consolidated/.
- The consolidated prototype must reflect:
- Layout skeleton (regions, proportions, scroll behavior)
- Primary content pattern (how items are displayed)
- Detail view pattern (how full item details are accessed)
- Navigation pattern and placement
- Action placement (create, edit, delete, bulk, contextual)
- Density and spacing approach
- Responsive behavior at mobile, tablet, and desktop breakpoints
- States rendering (empty, loading, error, partial, offline)
- Use AskUserQuestion to confirm the consolidated design before building the prototype.
Coverage checkpoint
- Verify every content requirement from
specs/ui-requirements-[topic].md has a UI home in the consolidated spec.
- Verify every user action has a placement (button, menu item, keyboard shortcut, or gesture).
- Verify all states (empty, loading, error, partial, full, offline, permission-denied) are accounted for.
- Flag any gaps and resolve via AskUserQuestion before writing.
Deliverables
- Write the consolidated prototype to
prototypes/{topic}/consolidated/.
- Write the consolidation interview log to
consolidate-variations-[topic]-interview.md.
Alignment Page
Build and attempt to open alignment/consolidate-variations-{topic}.html before writing or replacing consolidated prototype files, the consolidation interview log, or any final UI specification.
Alignment gates. Treat gates as explicit review sections inside the HTML page. Include evidence coverage, assumptions/confidence, scope/non-goals, candidate/verdict decisions, artifact destination, proposed file changes, coverage checkpoint, and approval gates. Render the variation inventory, UAT evidence, keep/reject/neutral annotations, consolidation matrix, conflict resolutions, coverage checkpoint, and every proposed deliverable section with no context loss from source evidence or interview notes.
Required inline questions. Ask whether the evidence is sufficient for consolidation, whether any assumptions or confidence levels are wrong, whether the selected winners and rejected alternatives are acceptable, whether the proposed canonical file changes are approved, and whether any downstream route should remain blocked.
Section feedback controls. Add lightweight section-feedback controls to every major section of the page: approve as-is, reject or flag a concern, and clarification needed. Selecting a control reveals an optional notes textarea. These controls are optional for final approval and do not replace required gate questions. They also power the separate feedback-only YAML path so the user can send concerns or clarification requests before answering every required gate question.
Feedback-only YAML contract. Include a "Compile Feedback" or "Compile Feedback YAML" button separate from the final "Compile Answers" button. Enable it as soon as at least one section-feedback control is set, even if required inline gate questions are unanswered. It generates YAML with feedback_status: revision-request, approval_status: not-approved, unanswered_required_questions, and a section_feedback list containing one entry per section-feedback control that the user actually set. Each feedback entry uses section, feedback (up, down, or needs-clarification), optional notes, and requested_agent_action (accept-as-is, investigate-and-revise, or clarify-before-approval). For down and needs-clarification feedback, the YAML must tell the agent to evaluate the feedback, investigate further when needed, and contextually amend the HTML alignment page before asking again for final approval answers. Copy and display this feedback YAML with the same clipboard retry and textarea fallback behavior as final gate YAML.
Gate YAML contract. Compile final approval answers into YAML with approval_status: ready-for-agent-review, section, gate_type, status, decision, notes, and approved_file_changes fields. The final approval button remains disabled until every required question has a selection. The final YAML may also include any section feedback the user set, using the feedback-only YAML section_feedback shape. The page must automatically attempt to copy the YAML to the clipboard, provide an explicit "Copy YAML" button, and fall back to selecting the textarea contents.
Pre-approval stop. Before user approval, the next action is review of the HTML alignment page. Ask the user to review the page and provide either feedback-only YAML for concerns/clarification or final compiled YAML answers when ready. Do not require the user to answer every gate before sending negative feedback or clarification needs. When feedback-only YAML is provided, treat it as a revision request: evaluate the feedback, investigate further when needed, archive and amend the HTML page contextually, highlight the changes, and ask again for review. Do not include Recommended next skill, Recommended next command, or downstream routing language until after final compiled YAML has been provided and the approved artifacts have been written or updated.
Constraints
- Do not proceed without evaluation evidence unless the user explicitly says they have reviewed the variants and is ready to converge.
- Do not pick winners without user input. Present the matrix and let the user decide.
- Do not ignore conflicts. If two preferred choices are spatially or functionally incompatible, surface the tension and resolve it explicitly.
- The consolidated spec must be at least as detailed as a
/ui-interview output — implementation-ready, not a summary.
- Do not lose content requirements. Every data field, action, and state from the requirements spec must appear in the final design.
- Do not bias toward the first or last variation reviewed. Present them neutrally and let the user's feedback drive the outcome.
- When recommending a skill from another pack, verify the pack is installed via
.agents/project.json enabled_packs. If not installed, prepend /pack install <pack-name> to the recommendation.
Archive-First Replacement Policy
- Before replacing or substantively rewriting an existing canonical research/spec document (
research/**/*.md, specs/**/*.md, or docs/specifications/**/*.md), copy the current file to docs/history/archive/YYYY-MM-DD/HHMMSS/<original-relative-path>.
- Preserve the archived snapshot exactly as it existed before the change; do not edit the archived copy after creating it.
- After the archive snapshot exists, write the updated document to the original canonical path.
- Report both the archive path and the updated canonical path in the final output.
- New files do not need archive snapshots. Append-only updates do not need archive snapshots unless an existing section is regenerated or rewritten.
Default Shipping Contract
Follow the shared shipping contract convention in CLAUDE.md.
1---2name: consolidate-variations-153description: Compare multiple built UI variations, interview the user on what works and what doesn't, cherry-pick best elements, resolve conflicts, and produce a final consolidated implementation-ready UI specification4---5
6# Consolidate Variations
7
8Invoke as `/consolidate-variations`.
9
10Use this skill after the user has built and evaluated multiple UI layout variations (typically generated via `/ux-variations --layout-mode`, built via `/exec`, and evaluated via `/uat --variant-evaluation` (check `.agents/project.json.enabled_packs` for `product-testing` — if `product-testing` is not enabled, recommend `/pack install product-testing` first)). This skill compares the variations, interviews the user on what works and what doesn't in each one, cherry-picks the best elements, resolves conflicts where preferred choices are incompatible, and produces a single consolidated implementation-ready UI specification.
11
12Users with manually built variations (not from the `/ux-variations` pipeline) can also use this skill directly, but consolidation should not happen before the user has reviewed the variants and captured evidence.
13
14## Workflow
15
16### 0. Product-Path Scope Resolution
17
18Resolve research scope by product path before using code or app structure as a hint:
19
201. 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.
212. 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.
223. 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.
234. 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.
245. 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.
256. If no product directories exist, use flat `research/` single-product mode.
267. Detect monorepo/app/package structure only as a secondary hint. Suggest creating a missing `research/{slug}/` product path when code clearly exposes an app, but do not require code or monorepo detection before using `research/{slug}/`.
27
28When product path `{slug}` is active, read and write research under `research/{slug}/`, specs under `specs/{slug}/`, and treat top-level `research/*.md` files as flat-mode documents or cross-path summaries.
29
301. **Resolve context**
31 - Read `.agents/project.json` if it exists.
32 - Read `README.md`, `AGENTS.md`, `CLAUDE.md`, relevant `docs/`, `specs/`, `research/`, route files, component directories, and design artifacts when present.
33 - Locate the variation spec: `specs/ui-layout-variations-[topic].md` or `specs/ux-variations-[topic].md`.
34 - Locate the content requirements: `specs/ui-requirements-[topic].md` or equivalent content contract.
35 - Locate variant evaluation evidence: `research/uat-variant-evaluation-[topic].md`, `research/uat-plan.md` result logs, screenshots, notes, recordings, or explicit user-provided review notes.
36 - Locate built implementations: scan route files, component directories, and any variation-specific directories or branches.
37 - If the variation spec or implementations cannot be found, ask the user to point to them.
38
392. **Evidence gate**
40 - If no evaluation evidence exists and the user has not explicitly said they already reviewed the variants and is ready to converge, stop and recommend `/uat --variant-evaluation` (check `.agents/project.json.enabled_packs` for `product-testing` — if `product-testing` is not enabled, recommend `/pack install product-testing` first).
41 - Do not infer a winner from specs alone. Built variants need hands-on review or explicit user readiness before consolidation.
42 - If some variants are unreviewed, ask whether to exclude them, evaluate them first via `/uat --variant-evaluation` (check `.agents/project.json.enabled_packs` for `product-testing` — if `product-testing` is not enabled, recommend `/pack install product-testing` first), or include them as spec-only references.
43
443. **Present variation inventory**
45 - List each variation with a one-line summary of its approach.
46 - Note build status for each: built and reviewed, built but unreviewed, partially built, spec-only.
47 - Note evidence status for each: result log present, user notes present, no evidence.
48 - Use AskUserQuestion to confirm which variations the user has reviewed and wants to evaluate. Skip unreviewed or unbuilt variations unless the user wants to include them from spec alone.
49
504. **Interview per variation**
51 - For each reviewed variation, ask using AskUserQuestion (1–3 questions per turn):
52 - What works well in this variation? Name specific elements, regions, or interactions.
53 - What doesn't work? What feels wrong, cluttered, sparse, or confusing?
54 - Any specific component, region, or interaction you want to keep in the final design?
55 - Anything to explicitly reject — never use this approach?
56 - Record responses as structured annotations per variation:
57 - **Keep**: elements the user wants in the final design (with source variation)
58 - **Reject**: elements the user never wants (with source variation)
59 - **Neutral**: elements the user has no strong opinion on
60
615. **Cross-variation synthesis**
62 - Present a **Consolidation Matrix** showing each design dimension and which variation's approach the user preferred:
63
64 | Design Element | Variation A | Variation B | Variation C | Winner |
65 |---|---|---|---|---|
66 | Container pattern | card grid | data table | list+detail | ? |
67 | Detail view | modal | sidebar | full-page | ? |
68 | Navigation | top-nav | side-nav | tabs | ? |
69 | ... | ... | ... | ... | ... |
70
71 - Fill in winners based on the interview. Mark conflicts where preferred choices from different dimensions are incompatible (e.g., user wants sidebar detail from Variation B but also wants the full-width card grid from Variation A — these compete for horizontal space).
72 - For each conflict:
73 - Present the tension clearly
74 - Offer 2–3 resolution options with tradeoffs
75 - State a recommendation
76 - Use AskUserQuestion to resolve
77 - Continue until every row in the matrix has a winner and all conflicts are resolved.
78
796. **Build consolidated prototype**
80 - Merge the best elements from variation prototypes into a single runnable artifact at `prototypes/{topic}/consolidated/`.
81 - The consolidated prototype must reflect:
82 - Layout skeleton (regions, proportions, scroll behavior)
83 - Primary content pattern (how items are displayed)
84 - Detail view pattern (how full item details are accessed)
85 - Navigation pattern and placement
86 - Action placement (create, edit, delete, bulk, contextual)
87 - Density and spacing approach
88 - Responsive behavior at mobile, tablet, and desktop breakpoints
89 - States rendering (empty, loading, error, partial, offline)
90 - Use AskUserQuestion to confirm the consolidated design before building the prototype.
91
927. **Coverage checkpoint**
93 - Verify every content requirement from `specs/ui-requirements-[topic].md` has a UI home in the consolidated spec.
94 - Verify every user action has a placement (button, menu item, keyboard shortcut, or gesture).
95 - Verify all states (empty, loading, error, partial, full, offline, permission-denied) are accounted for.
96 - Flag any gaps and resolve via AskUserQuestion before writing.
97
98## Deliverables
99
100- Write the consolidated prototype to `prototypes/{topic}/consolidated/`.
101- Write the consolidation interview log to `consolidate-variations-[topic]-interview.md`.
102
103### Alignment Page
104
105Build and attempt to open `alignment/consolidate-variations-{topic}.html` before writing or replacing consolidated prototype files, the consolidation interview log, or any final UI specification.
106
107**Alignment gates.** Treat gates as explicit review sections inside the HTML page. Include evidence coverage, assumptions/confidence, scope/non-goals, candidate/verdict decisions, artifact destination, proposed file changes, coverage checkpoint, and approval gates. Render the variation inventory, UAT evidence, keep/reject/neutral annotations, consolidation matrix, conflict resolutions, coverage checkpoint, and every proposed deliverable section with no context loss from source evidence or interview notes.
108
109**Required inline questions.** Ask whether the evidence is sufficient for consolidation, whether any assumptions or confidence levels are wrong, whether the selected winners and rejected alternatives are acceptable, whether the proposed canonical file changes are approved, and whether any downstream route should remain blocked.
110
111**Section feedback controls.** Add lightweight section-feedback controls to every major section of the page: approve as-is, reject or flag a concern, and clarification needed. Selecting a control reveals an optional notes textarea. These controls are optional for final approval and do not replace required gate questions. They also power the separate feedback-only YAML path so the user can send concerns or clarification requests before answering every required gate question.
112
113**Feedback-only YAML contract.** Include a "Compile Feedback" or "Compile Feedback YAML" button separate from the final "Compile Answers" button. Enable it as soon as at least one section-feedback control is set, even if required inline gate questions are unanswered. It generates YAML with `feedback_status: revision-request`, `approval_status: not-approved`, `unanswered_required_questions`, and a `section_feedback` list containing one entry per section-feedback control that the user actually set. Each feedback entry uses `section`, `feedback` (`up`, `down`, or `needs-clarification`), optional `notes`, and `requested_agent_action` (`accept-as-is`, `investigate-and-revise`, or `clarify-before-approval`). For `down` and `needs-clarification` feedback, the YAML must tell the agent to evaluate the feedback, investigate further when needed, and contextually amend the HTML alignment page before asking again for final approval answers. Copy and display this feedback YAML with the same clipboard retry and textarea fallback behavior as final gate YAML.
114
115**Gate YAML contract.** Compile final approval answers into YAML with `approval_status: ready-for-agent-review`, `section`, `gate_type`, `status`, `decision`, `notes`, and `approved_file_changes` fields. The final approval button remains disabled until every required question has a selection. The final YAML may also include any section feedback the user set, using the feedback-only YAML `section_feedback` shape. The page must automatically attempt to copy the YAML to the clipboard, provide an explicit "Copy YAML" button, and fall back to selecting the textarea contents.
116
117**Pre-approval stop.** Before user approval, the next action is review of the HTML alignment page. Ask the user to review the page and provide either feedback-only YAML for concerns/clarification or final compiled YAML answers when ready. Do not require the user to answer every gate before sending negative feedback or clarification needs. When feedback-only YAML is provided, treat it as a revision request: evaluate the feedback, investigate further when needed, archive and amend the HTML page contextually, highlight the changes, and ask again for review. Do not include `Recommended next skill`, `Recommended next command`, or downstream routing language until after final compiled YAML has been provided and the approved artifacts have been written or updated.
118
119## Constraints
120
121- Do not proceed without evaluation evidence unless the user explicitly says they have reviewed the variants and is ready to converge.
122- Do not pick winners without user input. Present the matrix and let the user decide.
123- Do not ignore conflicts. If two preferred choices are spatially or functionally incompatible, surface the tension and resolve it explicitly.
124- The consolidated spec must be at least as detailed as a `/ui-interview` output — implementation-ready, not a summary.
125- Do not lose content requirements. Every data field, action, and state from the requirements spec must appear in the final design.
126- Do not bias toward the first or last variation reviewed. Present them neutrally and let the user's feedback drive the outcome.
127- When recommending a skill from another pack, verify the pack is installed via `.agents/project.json` `enabled_packs`. If not installed, prepend `/pack install <pack-name>` to the recommendation.
128
129## Archive-First Replacement Policy
130
131- Before replacing or substantively rewriting an existing canonical research/spec document (`research/**/*.md`, `specs/**/*.md`, or `docs/specifications/**/*.md`), copy the current file to `docs/history/archive/YYYY-MM-DD/HHMMSS/<original-relative-path>`.
132- Preserve the archived snapshot exactly as it existed before the change; do not edit the archived copy after creating it.
133- After the archive snapshot exists, write the updated document to the original canonical path.
134- Report both the archive path and the updated canonical path in the final output.
135- New files do not need archive snapshots. Append-only updates do not need archive snapshots unless an existing section is regenerated or rewritten.
136
137## Default Shipping Contract
138
139Follow the shared shipping contract convention in CLAUDE.md.