@staff0rd/assist 0.384.2 → 0.385.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -64,6 +64,7 @@ After installation, the `assist` command will be available globally. You can als
64
64
  - `/subtask <text>` - Add a sub-task to the backlog item this session is working on (errors if there is no current item) by calling `assist backlog add-subtask`
65
65
  - `/strip-comments` - Enforce self-documenting code: declare the comment policy in CLAUDE.md if absent, then strip redundant comments, commented-out code, and section banners from tracked source files (functional directives and genuine workaround comments are preserved); edits are left unstaged
66
66
  - `/sync` - Sync commands and settings to ~/.claude
67
+ - `/design <prompt>` - Adopt the vendored design system prompt (`~/.claude/system-prompt.md`) and its design skills (`~/.claude/skills/`, both installed by `assist sync`) as context, then apply that design guidance to `<prompt>`
67
68
  - `/test-cover` - Incrementally increase test coverage by identifying and testing uncovered files
68
69
  - `/test-review` - Review existing tests for quality, coverage gaps, and adherence to conventions
69
70
  - `/inspect` - Run .NET code inspections on changed files
@@ -90,7 +91,7 @@ After installation, the `assist` command will be available globally. You can als
90
91
  - `assist init` - Initialize project with VS Code and verify configurations
91
92
  - `assist new vite` - Initialize a new Vite React TypeScript project
92
93
  - `assist new cli` - Initialize a new tsup CLI project
93
- - `assist sync` - Copy command files to `~/.claude/commands`
94
+ - `assist sync` - Copy command files to `~/.claude/commands`, sync `settings.json` and `CLAUDE.md`, and install the design assets — `claude/system-prompt.md` to `~/.claude/system-prompt.md` and `claude/skills/*` into `~/.claude/skills` (existing files in that directory are preserved)
94
95
  - `assist commit status` - Show git status and diff
95
96
  - `assist commit <message>` - Commit staged changes with validation
96
97
  - `assist commit <message> [files...]` - Stage files and create a git commit with validation
@@ -285,6 +286,8 @@ Backlog item ids are written and displayed in an `a`-prefixed form (e.g. item 55
285
286
  - `assist daemon restart` - Restart the sessions daemon, resuming previously running claude sessions
286
287
  - `assist daemon drain` - Remove all sessions from the local daemon for a clean slate (does not affect the Windows daemon)
287
288
 
289
+ The sessions topnav has a **Design** dropdown: submitting a prompt launches an interactive `claude` session with the vendored design system prompt appended via `--append-system-prompt` (so the 647-line prompt stays out of the visible conversation) and the prompt sent as the first message; submitting an empty prompt opens a design-configured session with no initial message.
290
+
288
291
  Web sessions are owned by a long-lived daemon process, not the web server: the server is a thin client that relays WebSocket traffic to the daemon over a local IPC socket (unix domain socket at `~/.assist/daemon/daemon.sock`; named pipe `\\.\pipe\assist-sessions-daemon` on Windows). Restarting the web server leaves sessions running with scrollback intact. The daemon logs to `~/.assist/daemon/daemon.log` (timestamped lines tagged with the daemon's pid, including why it spawned and which sessions it restored) and auto-exits once no sessions remain and no client has been connected for 60 seconds (it is respawned on demand by the web server). Daemon spawning is arbitrated by an `O_EXCL` lockfile so racing clients start at most one daemon; sessions are only restored after the daemon owns the IPC socket, and a daemon that loses ownership of `daemon.pid` shuts down its sessions and exits rather than running orphaned.
289
292
 
290
293
  From WSL, the selector can also surface and drive Windows-host repos (requires `assist` installed on the Windows host). Config keys:
@@ -0,0 +1,24 @@
1
+ ---
2
+ description: Adopt the vendored design system prompt and apply it to a design task
3
+ allowed_args: "<design prompt>"
4
+ ---
5
+
6
+ You are being asked to act as an expert designer for the remainder of this task. The design guidance lives in files synced to `~/.claude` by `assist sync`.
7
+
8
+ ## Step 1: Load the design system prompt
9
+
10
+ Read `~/.claude/system-prompt.md` in full. This is a 647-line design system prompt that defines your identity, workflow, and standards as a designer. Adopt it as your operating context for this task — its instructions take precedence over your default behaviour for the design work that follows.
11
+
12
+ If the file is missing, tell the user to run `assist sync` first and stop.
13
+
14
+ ## Step 2: Note the available skills
15
+
16
+ The design skills referenced by the system prompt (`discovery-questions`, `frontend-aesthetic-direction`, `wireframe`, `make-a-deck`, `make-a-prototype`, `make-tweakable`, `generate-variations`, `design-system-extract`, `component-extract`, `accessibility-audit`, `ai-slop-check`, `hierarchy-rhythm-review`, `interaction-states-pass`, `polish-pass`) are synced to `~/.claude/skills/`. Each is a phased procedure. When the task matches a skill's trigger (as described in the system prompt's "Available skills" chapter), read the relevant `~/.claude/skills/<name>.md` and follow it.
17
+
18
+ ## Step 3: Apply it to the request
19
+
20
+ Apply the adopted design guidance to the following request:
21
+
22
+ $ARGUMENTS
23
+
24
+ Follow the workflow the system prompt lays out — ask clarifying questions first when the request is new or ambiguous, acquire design context before mocking from scratch, build a skeleton early, and run `polish-pass` before delivery.
@@ -0,0 +1,51 @@
1
+ # Accessibility Audit: WCAG and Inclusive Design Review
2
+
3
+ Review the current design for accessibility issues across contrast, semantic structure, keyboard navigation, motion, and forms. Fix any issues found. **Good accessibility is good design — it benefits everyone.**
4
+
5
+ ## Phase 1: Identify the surface to audit
6
+
7
+ Audit the HTML file the user just edited or asked about; otherwise the most recently modified design file; if unclear, ask. Read it end-to-end and note the framework in use, the expected level (WCAG AA by default), and any user-stated constraints.
8
+
9
+ ## Phase 2: Launch four review agents in parallel
10
+
11
+ Use the ${AGENT_TOOL_NAME} tool to launch all four agents concurrently in a single message, each with the full file contents.
12
+
13
+ Instruct every agent explicitly: report every issue found, including borderline and low-severity ones, with a confidence and severity estimate. Coverage is the agent's job; filtering happens at aggregation (Phase 3).
14
+
15
+ ### Agent 1: Contrast and Color
16
+
17
+ 1. **Text contrast.** Normal text (under 18px) needs 4.5:1; large text (18px+ bold or 24px+) needs 3:1; UI components (buttons, icons, focus rings) need 3:1. Compute the actual ratio for any color pair you can resolve; flag every failing pair with the ratio and the required minimum.
18
+ 2. **Color-only signaling.** Flag any state communicated by color alone — green/red without an icon, links with no underline, charts with no legend or labels.
19
+ 3. **Difficult combinations.** Red+green (most common colorblindness), blue+yellow at similar lightness, light gray on white, colored text on colored backgrounds with similar brightness.
20
+ 4. **Whites and blacks.** Flag pure `#FFFFFF` on `#000000`; subtly toned (`#FAFAFA` / `#1A1A1A`) is preferred. Style recommendation, not WCAG.
21
+
22
+ ### Agent 2: Semantic HTML and Structure
23
+
24
+ 1. **Heading hierarchy.** Exactly one `<h1>`, no skipped levels; headings describe content, not visual size.
25
+ 2. **Right element for the role.** `<button>` not `<div onclick>`; `<a href>` not a styled `<div>`; `<label for>` linked to inputs; `<nav>`/`<main>`/`<article>`/`<section>`/`<aside>` landmarks.
26
+ 3. **Alt text on every meaningful image.** Decorative images get `alt=""`; meaningful images describe what they convey (`alt="Wireless headphones, side view"` not `alt="product"`).
27
+ 4. **Form labels.** Every input has an associated `<label>` (or `aria-label`). Placeholder text alone is not a label.
28
+ 5. **ARIA only when semantic HTML can't.** Flag `role="button"` on a `<div>` that could be a `<button>`.
29
+
30
+ ### Agent 3: Keyboard Navigation and Focus
31
+
32
+ 1. **Keyboard reachable.** Everything clickable is Tab-reachable — hover-only menus, mouse-only dropdowns, and keyboard-inaccessible modals fail.
33
+ 2. **Logical tab order.** Follows reading order; flag `tabindex` values greater than 0.
34
+ 3. **Interaction patterns.** Modals close on Escape; dropdowns open with Enter/Space and arrow-navigate; forms submit on Enter from a field.
35
+ 4. **Visible focus rings.** Flag `outline: none` without a visible replacement meeting 3:1 contrast against the adjacent background. Prefer `:focus-visible` over `:focus`.
36
+ 5. **Skip links.** Recommend "Skip to main content" on pages with significant repeated navigation.
37
+
38
+ ### Agent 4: Motion, Forms, and Misc
39
+
40
+ 1. **`prefers-reduced-motion` respected.** Animations beyond a couple hundred milliseconds need a `@media (prefers-reduced-motion: reduce)` block that shortens or removes them.
41
+ 2. **No flashing** more than 3 times per second (photosensitive epilepsy risk); flag and require pause controls.
42
+ 3. **Form errors** are specific ("Email address is invalid" not "Invalid"), tied to their field visually and via `aria-describedby`.
43
+ 4. **Required fields** marked with text and/or icon plus the `required` attribute, not color alone.
44
+ 5. **Input types and autocomplete.** `type="email"`, `type="tel"`, `autocomplete` attributes for autofill and mobile keyboards.
45
+ 6. **Hit targets** at least 44×44px on touch surfaces.
46
+
47
+ ## Phase 3: Aggregate and fix
48
+
49
+ Wait for all four agents to complete. Aggregate their findings into a single deduplicated list and fix each issue directly. For borderline cases (e.g., contrast at 4.4:1), apply the fix anyway — accessibility is the floor, not the ceiling. If a finding is a clear false positive or out-of-scope (e.g., the agent flagged a third-party embed you can't modify), note it and skip it.
50
+
51
+ Summarize: issues found by category (contrast / semantic / keyboard / motion-forms), issues fixed, and anything left for the user.
@@ -0,0 +1,71 @@
1
+ # AI Slop Check: Detect and Fix Generic AI Aesthetics
2
+
3
+ Review the current design for the visual tropes that signal "AI-generated template," and fix any found. These patterns read as default, not intentional — a design that looks like a hundred other AI outputs fails to look like the user's design.
4
+
5
+ Each rule is **positive-first**: the default to reach for, then the patterns to detect and replace. At write-time, bias toward the default; at review-time, scan for the detection patterns.
6
+
7
+ ## Phase 1: Identify the surface
8
+
9
+ Review the HTML/CSS file the user just edited or asked about; otherwise files modified this session; if unclear, ask. Read the file and skim referenced CSS, tokens, and component files so you can resolve actual values.
10
+
11
+ ## Phase 2: Single-pass review
12
+
13
+ Apply each rule below in a single pass — these patterns are obvious enough that parallel dispatch is overkill. Report every detection, including uncertain or low-severity ones, with a confidence and severity estimate. Coverage is the job at this stage; filtering happens in Phase 3 or in `polish-pass` aggregation.
14
+
15
+ ### 1. Gradients — flat or subtle, on-tone
16
+
17
+ **Default:** flat color from the design system, or a subtle on-tone two-stop gradient. Flat is almost always stronger.
18
+
19
+ **Detect & replace:** rainbow / 3+ color gradients; saturated purple-to-pink, orange-to-pink, or other "trendy" blends on heroes, buttons, or large surfaces; gradient overlays on imagery that don't improve legibility or hierarchy.
20
+
21
+ ### 2. Emoji — functional or brand-driven only
22
+
23
+ **Default:** no emoji, unless the brand uses them in existing materials, the emoji is functional (status indicator, category marker), or the user asked.
24
+
25
+ **Detect & remove:** emoji prepending headlines, buttons, or list items (`🚀 Get Started`); repeated emoji filler (`🎉🎉🎉`); emoji bullets without meaning. If the layout relied on the emoji's visual weight, use a real icon (Feather, Material, Phosphor, Heroicons) or better typographic hierarchy.
26
+
27
+ ### 3. Cards — shadow, thin border, or background separation
28
+
29
+ **Default:** subtle shadow, thin all-around border, or background separation. Reserve `border-left: 4px solid` for semantic emphasis (callouts, alerts, status).
30
+
31
+ **Detect & replace:** `border-radius: 12px` + `border-left: 4px solid` used as the _default_ card style — this combination reads as "default SaaS template." Keep the left border only when it carries that semantic meaning, or when it comes from an existing design system you're matching.
32
+
33
+ ### 4. Imagery — real, licensed, or honest placeholder
34
+
35
+ **Default, in order:** real photography (Unsplash, brand assets); professional illustration; honest placeholder — striped background with monospace label like `product shot (1200×800)`. A placeholder beats a bad illustration: it signals "asset needed" without pretending to be final.
36
+
37
+ **Detect & replace:** custom SVG illustrations of people, scenes, or concepts not drawn by a skilled illustrator; "AI-style" character art (giant heads, flat-color blobs, identical posing); placeholder-quality decoration presented as final.
38
+
39
+ ### 5. Type — fonts chosen with intent
40
+
41
+ **Default:** a font matched to the brand's tone or the medium. With no brand, suggest 2–3 alternatives matching the design's tone (geometric, humanist, modern, classical) and let the user pick.
42
+
43
+ **Detect & question** bare use of Inter, Roboto, Arial, Fraunces, or bare system stacks as silent defaults. Keep them only if the brand specifies them or the user confirmed. Don't silently swap one generic for another.
44
+
45
+ ### 6. Color — subtly toned whites and blacks
46
+
47
+ **Default:** whites and blacks toned to the palette — warm `#FFFAF0`/`#2D2118`, cool `#F5F7FA`/`#1F2937`, neutral `#FAFAFA`/`#1A1A1A`.
48
+
49
+ **Detect & replace:** exact `#FFFFFF` background with exact `#000000` text — harsh, cold, and unfinished.
50
+
51
+ ### 7. Color values — trace to a token or harmonious palette
52
+
53
+ **Default:** every color traces to a design token, brand variable, or `oklch()`-derived palette (use `oklch()` to keep lightness and chroma consistent when building from scratch).
54
+
55
+ **Detect & consolidate:** colors that don't trace anywhere — five slightly different blues across one file means colors were invented inline.
56
+
57
+ ### 8. Spacing — snap to a 4px or 8px scale
58
+
59
+ **Default:** spacing tokens (`--space-xs: 4px` through `--space-2xl: 64px`); multiples of 4 or 8 feel intentional.
60
+
61
+ **Detect & replace:** off-scale values (`padding: 7px 15px`, `margin: 18px`, `gap: 13px`) — they feel chaotic.
62
+
63
+ ### 9. The editorial-warm house style — deliberate or absent
64
+
65
+ **Default:** an aesthetic direction chosen for the brief (see `frontend-aesthetic-direction`). The warm-editorial look is legitimate for editorial, hospitality, and portfolio work — when it traces to a brand or an explicitly committed direction.
66
+
67
+ **Detect & question** the combination, absent a brand reason: cream / warm off-white backgrounds in the `#F4F1EA` family; serif display faces as silent defaults (Georgia, Playfair Display, Fraunces); italic word-accents in headlines; terracotta / amber accents. Any one can be deliberate. All together — especially on a dashboard, dev tool, fintech, healthcare, or enterprise surface — is the default-template look, today's equivalent of the purple gradient. Replace with the committed direction, or flag for the user if none exists.
68
+
69
+ ## Phase 3: Fix and summarize
70
+
71
+ Apply fixes directly. Where multiple options are reasonable (e.g., which non-Inter font), pick the most defensible default and note it so the user can override. Summarize: tropes found by category, fixes applied, open questions for the user.
@@ -0,0 +1,52 @@
1
+ # Component Extract: Identify Reusable Components from a Design
2
+
3
+ Walk a design and identify the reusable components hidden inside it; emit a component inventory the user can turn into a component library or design system. Use this when the user has a finished page or flow and wants to "make it a system," "build a component library," or hand off structured pieces.
4
+
5
+ **Pages are arrangements of components.** Extracting them turns a pile of one-offs into something maintainable.
6
+
7
+ ## Phase 1: Identify the surface
8
+
9
+ Determine what to walk — a single design file, a multi-page flow, or a whole project. Read all relevant files and build a mental model of the visual vocabulary in use.
10
+
11
+ ## Phase 2: Walk the design and inventory
12
+
13
+ Section by section, for each visual element ask:
14
+
15
+ 1. **Does this exact pattern appear more than once?**
16
+ 2. **Could it reasonably appear elsewhere?** (A card style, form input, or header likely repeats even if it's in one place now.)
17
+ 3. **Does it have variants?** (Button: primary/secondary/ghost. Card: with/without image.)
18
+ 4. **Does it have states?** (Hover, active, disabled, focus, loading.)
19
+
20
+ Yes to any → component candidate. Group findings into the standard categories:
21
+
22
+ - **Foundational** — color, spacing, type, radius, shadow, and motion tokens (see `design-system-extract` for token-level detail)
23
+ - **Atoms** — button, input, checkbox/radio/toggle, select, tag/chip/badge, avatar, icon (sizes + set in use), link
24
+ - **Molecules** — form field (label + input + helper + error), card, toast/alert, modal, dropdown menu, tooltip, pagination
25
+ - **Organisms** — header/nav, footer, sidebar, tab group, table, form, hero, feature grid, empty state
26
+ - **Templates** — landing, detail, list/index, empty-state page
27
+
28
+ ## Phase 3: For each component, document
29
+
30
+ - **Name** — short, conventional (e.g., `Button`, `FormField`)
31
+ - **Purpose** — one sentence on when to use it
32
+ - **Variants** and **sizes**
33
+ - **States** — default, hover, active, focus, disabled, loading (whichever apply)
34
+ - **Tokens used** — which color, spacing, type tokens it references
35
+ - **Composition** — what other components it's built from (e.g., `Card` uses `Button`)
36
+ - **Accessibility notes** — keyboard support, ARIA, contrast
37
+ - **Do / Don't** — at least one of each (e.g., "Don't stack two primary buttons in a row")
38
+
39
+ ## Phase 4: Identify the gaps
40
+
41
+ Flag these as part of the deliverable — they're the work needed to turn the design into a real system:
42
+
43
+ - **Inconsistencies** — three slightly-different button styles where one should serve; recommend a canonical version
44
+ - **Missing states** — hover without focus, no disabled state
45
+ - **Missing variants** — e.g., delete actions in the design but no destructive button
46
+ - **Off-scale values** — spacing or sizes outside the established token scale; snap them
47
+
48
+ ## Phase 5: Emit and hand off
49
+
50
+ Write the inventory to a file (e.g., `component-inventory.md`), one section per component, structured as above — a doc the user can hand to a developer. Optionally render a "component library" page showing each component with its variants and states (the `design_canvas.jsx` starter works for the grid).
51
+
52
+ Then suggest next steps: `design-system-extract` for tokens if not already done, building the library as real code, `polish-pass` on the components, or `make-tweakable` on the library. Summarize: components inventoried by category, inconsistencies and gaps flagged, output file path, recommended next step.
@@ -0,0 +1,75 @@
1
+ # Design System Extract: Pull Tokens from Sources
2
+
3
+ Extract design tokens (color, typography, spacing, radii, shadow) from a brand reference, codebase, or screenshots, and emit a structured tokens file. Use this when starting design work that should match an existing visual language. Once tokens exist, future designs reference them — keeping the system consistent without re-asking the user for values.
4
+
5
+ ## Phase 1: Identify sources
6
+
7
+ The user may provide a codebase (read theme files: `theme.ts`, `tokens.css`, `_variables.scss`, `tailwind.config.js`, design system source), a live site or screenshots, a brand guide (PDF, Figma, doc), or an existing UI kit project. If unspecified, ask — invented tokens defeat the point.
8
+
9
+ ## Phase 2: Extract by category
10
+
11
+ Capture concrete values from the source — never guess.
12
+
13
+ ### Colors
14
+
15
+ - **Brand primary and accent** (with dark/light variants where defined)
16
+ - **Semantic** — success, warning, error, info (plus their light backgrounds where defined)
17
+ - **Neutral scale** — typically 9–11 steps from near-white to near-black, consistent tone (warm / cool / neutral)
18
+ - **Surfaces** — background, foreground, card, overlay, border
19
+
20
+ For each: the hex (or oklch) value, its name in the source, and its documented usage. Flag inconsistencies — multiple slightly different blues, neutrals on different tones — as findings for the user. Don't silently merge them; the inconsistency itself is information.
21
+
22
+ ### Typography
23
+
24
+ - **Families** — sans, serif, mono, with full fallback stacks
25
+ - **Sizes** — the actual scale in use, not a generic one
26
+ - **Weights** — only those actually loaded
27
+ - **Line heights** — at minimum tight (~1.1) for headlines, normal (~1.5) for body, loose (~1.7) for long-form
28
+ - **Letter spacing** — usually only matters for all-caps labels
29
+ - **Named text styles** ("Heading 1", "Body Large", "Caption") if the source defines them
30
+
31
+ ### Spacing
32
+
33
+ The actual scale in use (common bases: 4px or 8px, typically running to 64–128px). If the source has separate scales for inset / inline / block / between-components, capture all of them.
34
+
35
+ ### Radii and shadows
36
+
37
+ Corner-radius values (typically 3–5 distinct: `0 / 4 / 8 / 12 / 9999`) and the elevation scale with full CSS values (offset, blur, spread, color, opacity).
38
+
39
+ ### Other tokens, if present
40
+
41
+ Z-index scale, animation durations and easings, breakpoints, container widths.
42
+
43
+ ## Phase 3: Emit the tokens file
44
+
45
+ Write a `tokens.css` — or match the source's format and naming convention (`tokens.ts` with typed exports, `tokens.json`, a Tailwind config extension). Group by category with clear names:
46
+
47
+ ```css
48
+ :root {
49
+ /* Brand */
50
+ --color-primary: #...;
51
+ --color-accent: #...;
52
+ /* Semantic */
53
+ --color-success: #...;
54
+ --color-error: #...;
55
+ /* Neutrals */
56
+ --color-gray-50: #...; /* … through --color-gray-900 */
57
+ /* Surfaces */
58
+ --color-bg: #...;
59
+ --color-surface: #...;
60
+ --color-border: #...;
61
+
62
+ --font-sans: "...", -apple-system, sans-serif;
63
+ --text-base: 16px; /* full size scale as found */
64
+ --weight-regular: 400; /* only loaded weights */
65
+ --leading-normal: 1.5;
66
+
67
+ --space-1: 4px; /* full spacing scale as found */
68
+ --radius-md: 8px;
69
+ --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
70
+ }
71
+ ```
72
+
73
+ ## Phase 4: Document findings
74
+
75
+ Summarize: **sources used**; **categories extracted**; **gaps** — token sets the source doesn't define (these are the user's decisions to make; don't fill them silently); **inconsistencies** — near-duplicate values or off-scale outliers worth consolidating; **recommended next steps** — typically review the file with the user, then use it in subsequent designs.
@@ -0,0 +1,60 @@
1
+ # Discovery Questions: Kickoff Question Protocol
2
+
3
+ Run a structured question round at the start of new or ambiguous design work. **Asking good questions is the single biggest lever for design quality** — bad designs come from missing context, not missing skill.
4
+
5
+ ## Phase 1: Read what's already attached
6
+
7
+ Before asking anything, read every attached resource — codebases, screenshots, brand guides, linked design systems or UI kits, the stated brief. Asking "do you have a brand guide?" when they just attached one is the fastest way to lose the user's confidence.
8
+
9
+ ## Phase 2: Decide whether to ask
10
+
11
+ **Ask when** the work is new or ambiguous; the output, audience, or fidelity is unclear; you don't know which design system, UI kit, or brand is in play; the variation count is unspecified; or the task leaves multiple non-trivial dimensions open.
12
+
13
+ **Skip when** the user gave you everything; it's a small tweak or follow-up; scope, audience, and constraints are explicit; or the task is "recreate this exact thing."
14
+
15
+ If the open question changes the design's direction (audience, format, brand, scope), ask. If it's a minor choice you can defensibly make yourself (a label, a default value, two equivalent approaches), decide, build, and note the decision in your summary instead of asking.
16
+
17
+ ## Phase 3: Build the question set
18
+
19
+ Include the following **always-ask** questions, plus the problem-specific questions the brief actually leaves open (typically 3–6):
20
+
21
+ - **Starting point** (non-negotiable — starting hi-fi work without context produces bad design). "Is there a UI kit, design system, codebase, brand guide, or screenshots I should match? If not, I'll need to commit to an aesthetic from scratch — confirm that's OK."
22
+ - **Variations.** How many of the overall design? On what axes (visual, layout, interaction, copy, tone)? Variations of specific elements ("how many heroes?")?
23
+ - **Novelty.** By-the-book, novel/creative, or a mix?
24
+ - **Tweaks.** What should be adjustable live in the final design (colors, copy, layout, components)?
25
+ - **Focus axis.** Flows, copy, or visuals — where should exploration effort go?
26
+
27
+ Problem-specific examples:
28
+
29
+ - **Deck:** audience and knowledge level; time budget / slide count; tone; speaker notes; existing source material?
30
+ - **Landing page:** desired user action; primary persona; references admired or rejected; mobile-first or desktop-first?
31
+ - **Prototype:** flow and screens; hi-fi or mid-fi; device frame; goal state; sample data?
32
+ - **Brand / aesthetic:** three adjectives; admired designs (and what specifically); off-limits; industry context?
33
+
34
+ Size the round to the ambiguity: a genuinely open brief may warrant ~10 questions; a half-specified one may need only 3–4. Never pad the round to hit a number — a question whose answer wouldn't change what you build is noise.
35
+
36
+ ## Phase 4: Format the question round
37
+
38
+ Use the `questions_v2` tool — it renders native form components the user answers in a structured way. Per question:
39
+
40
+ - **Prefer multiple choice**; always include "Explore a few options" and "Decide for me" as escape hatches, plus "Other" for open-ended fallback
41
+ - **SVG options** for visual choices (layout, icon style, color swatch, mood); **sliders** for numeric ranges (generous bounds); **file-pickers** for assets; **freeform** for genuinely open questions
42
+
43
+ Order most-important-first — the form streams in, and the user can start answering before the rest loads. Keep titles short; subtitles are optional clarifications.
44
+
45
+ ## Phase 5: End the turn, then confirm
46
+
47
+ `questions_v2` does not return an answer immediately — after calling it, **end your turn**. Don't anticipate answers and proceed. When answers come back, read all of them, then:
48
+
49
+ - Briefly recap the choices that most affect the design
50
+ - Note answers you'd push back on (gently — the user is the manager)
51
+ - Proceed to the appropriate building skill (`make-a-deck`, `make-a-prototype`, `wireframe`, etc.) and execute autonomously. This round was your chance to ask — don't come back with follow-up questions for minor decisions; make them and list them in your summary.
52
+
53
+ If you later discover an early answer was wrong (e.g., the user said "no novel ideas" but their feedback wants bolder choices), surface the contradiction and re-question rather than carrying the wrong assumption.
54
+
55
+ ## Anti-patterns
56
+
57
+ - **Don't skip asking.** "I'll just start building" produces designs that miss the brief.
58
+ - **Don't ask everything.** Cap around 10–15; bundle into one form, not one-at-a-time across turns.
59
+ - **Don't ask what you can derive.** If the attached brand guide has the primary color, don't ask for it.
60
+ - **Don't ask to be safe.** A question is justified by the design impact of its answer, not by your uncertainty.
@@ -0,0 +1,76 @@
1
+ # Frontend Aesthetic Direction: Commit to a Look When No Brand Exists
2
+
3
+ Establish an aesthetic direction (typography, color, density, mood, component style) when the user is designing without an existing brand or design system. Use this **before** hi-fi work in a greenfield context: mocking hi-fi from scratch without committing to an aesthetic is the fastest path to AI-template output. Pick a direction first, then design within it.
4
+
5
+ ## Phase 1: Confirm there's truly no existing context
6
+
7
+ Double-check: no brand guide, no existing app or product to match, no reference site the user wants to mimic, no partial design system in the codebase. If any exist, **stop and use them** — aesthetic direction is for true greenfield. If the user has a brand and forgot to attach it, ask for it before proceeding.
8
+
9
+ ## Phase 2: Discover the intent
10
+
11
+ Ask the user (or confirm if stated): **three adjectives** for the desired feel; **audience**; **industry context**; **reference designs they admire** (and what specifically — the type, spacing, color, tone, density?); **off-limits** aesthetics or tropes.
12
+
13
+ If the user is unsure, propose **4 distinct visual directions**, each specified concretely — background hex / accent hex / display + body typeface, with a one-line rationale tied to the brief — and let them pick. The directions must not share a palette family: four takes on warm-cream is one direction, not four. Make at least one deliberately off-distribution.
14
+
15
+ ## Phase 3: Commit to the system — make it concrete
16
+
17
+ Vague aesthetic statements ("modern and clean") produce generic designs. Commit on each axis:
18
+
19
+ ### Typography
20
+
21
+ Pick **specific** fonts — headline, body (often the same family), and mono if needed — with weights and a type scale. 1–2 families maximum.
22
+
23
+ Avoid the overused defaults — Inter, Roboto, Arial, bare system stacks, and the silent serif-display defaults (Fraunces, Playfair Display, Georgia-as-display). Pick with intent: a humanist sans (Söhne, Suisse), a modern serif (Tiempos, GT Sectra), an editorial classic (Tiempos Headline, Canela), a typewriter mono (JetBrains Mono, IBM Plex Mono), a geometric sans (Söhne Buch, Visby), depending on the mood. If a paid foundry may be out of reach, name the closest free alternative (e.g., Söhne for production, Albert Sans / Geist free).
24
+
25
+ ### Color
26
+
27
+ Pick a tone — warm (cream, gold, terracotta), cool (gray, slate, ice, blue), or neutral (concrete, charcoal, off-white).
28
+
29
+ **The warm-editorial combination (cream background + serif display + terracotta/amber accent) is the current default-model look.** Choose it only when the brief is genuinely editorial, hospitality, or portfolio — and say so explicitly in the direction block. If the direction drifts there without a stated reason, pick again.
30
+
31
+ Then pick: a primary brand color (with light/dark variants), at most one accent, semantic colors (success/warning/error/info), and a 5–10 step neutral scale on the chosen tone. Use `oklch()` for harmony when building from scratch (`--brand-primary: oklch(55% 0.18 250)`). Subtly tone whites and blacks — pure `#FFFFFF`/`#000000` is harsh; match the tone (e.g., `#FAFAFA` / `#1A1A1A`).
32
+
33
+ ### Density
34
+
35
+ Pick a spacing scale (4px or 8px base) and a density — tight (compact dashboards, dense data UIs), normal (typical product UI), or loose (editorial, marketing, premium, generous whitespace). Density is felt as much as seen.
36
+
37
+ ### Border radius and shadow
38
+
39
+ Sharp (0–2px — utilitarian, brutalist, editorial), soft (4–8px — typical modern product), or pill/fully-rounded (playful, friendly, consumer). Shadows likewise: sharp / soft / none. One elevation system, not a mix.
40
+
41
+ ### Component style
42
+
43
+ Filled, ghost, outlined, or elevated. Pick a default, with secondary styles for hierarchy.
44
+
45
+ ### Imagery and iconography
46
+
47
+ Real photography (Unsplash, brand, stock), professional illustration, icons from an established set (Feather, Material, Phosphor, Heroicons), or honest placeholders when assets aren't available. Avoid hand-drawn SVG illustrations.
48
+
49
+ ### Motion
50
+
51
+ Quiet (transitions on state changes only, 200ms ease), expressive (entrance animations, scroll-driven reveals), or playful (springs, micro-interactions on hover). Commit to one mode — mixed motion feels unintentional.
52
+
53
+ ## Phase 4: Document the direction
54
+
55
+ Write the direction into the file — a comment block at the top of the source AND a visible "design system summary" in the rendered output, like a junior designer showing their thinking:
56
+
57
+ ```
58
+ /* Aesthetic direction:
59
+ * Editorial / serious / spacious.
60
+ * - Type: Tiempos Headline (display) + Söhne (body). Free alt: GT Sectra → Albert Sans.
61
+ * - Color: cool-neutral. #FAFAFA bg / #1A1A1A text. Brand: oklch(55% 0.18 250) deep blue. No accent.
62
+ * - Density: loose. 8px scale, generous padding.
63
+ * - Radius: 4px. No shadow — borders only.
64
+ * - Components: ghost buttons; filled for primary CTA only.
65
+ * - Imagery: real photography, full-bleed.
66
+ * - Motion: quiet. 200ms ease, no entrance animations.
67
+ */
68
+ ```
69
+
70
+ ## Phase 5: Apply, test, and keep consistent
71
+
72
+ Build a small surface (a hero, a card, a button group) with the direction and show it to the user early. Ask: "Does this read as [the three adjectives]?" If not — or the user pushes back on an axis — revise before going broader. A direction that fails at small scale gets worse as it scales up, not better.
73
+
74
+ Every subsequent design references the direction's tokens, not new inline values. If a new design needs an undefined value, **add it to the direction first**, then use it. When the direction matures, extract it into a tokens file (`design-system-extract`).
75
+
76
+ Summarize: the three adjectives, the committed choices per axis, any axes the user should review before you go broader, and the first surface built with the direction.
@@ -0,0 +1,40 @@
1
+ # Generate Variations: Produce 3+ Design Options
2
+
3
+ Produce multiple distinct design variations of a screen, component, or flow so the user can mix and match the strongest pieces. Use this when the user asks for options, alternatives, "different takes," or "show me a few." **Variations are the cheapest path to good design** — one design is one bet; three let the user reject what they don't want and combine what they do.
4
+
5
+ ## Phase 1: Establish the baseline
6
+
7
+ Confirm: **what is being varied** (screen, component, flow, visual treatment — scope determines how many variations are useful); **existing design context** (variations should root in the UI kit / design system unless explicitly asked to break free); **number** (default 3; 5–6 is a healthy ceiling); **axis preference** (visuals, interactions, layout, or copy/tone — where does the user want exploration weighted?).
8
+
9
+ ## Phase 2: Pick the axes
10
+
11
+ Pick 2–4 dimensions to vary across: visual treatment (color tone, density, shadow, radius, type weight); layout (centered vs asymmetric, single vs multi-column, full-bleed vs inset); interaction model (single page vs multi-step, modal vs inline); information hierarchy; tone; component style. Write down which axis each variation flexes — it makes the comparison legible to the user.
12
+
13
+ ## Phase 3: Build with intent — basic to bold
14
+
15
+ Order from most by-the-book to most novel:
16
+
17
+ 1. **By the book.** Matches existing patterns and conventions — the safe option.
18
+ 2. **Refined.** Same structure, one or two dimensions pushed — bolder type, more confident layout, more expressive color. Often the user's actual pick.
19
+ 3. **Novel.** A genuinely different take — unconventional layout, strong visual metaphor, daring aesthetic. Stretches the conversation and surfaces preferences the user didn't know they had.
20
+ 4. **4–6 (if requested).** Hybrids along the spectrum, or a wildcard on a different axis.
21
+
22
+ **Cover both ends.** All-safe wastes the user's time; all-wild ignores the brief.
23
+
24
+ ## Phase 4: Vary substantively, not cosmetically
25
+
26
+ Variations should differ in layout, hierarchy, what's primary, type system, density, interaction approach, or copy strategy — not just button color, accent shade, or shadow opacity. If two are too close, drop one for a more substantive alternative. The user should be able to articulate the difference between any two variations in one sentence.
27
+
28
+ **Specify each variation concretely before building it** — distinct palette family, distinct type pairing, distinct layout skeleton, written down per variation. Variety must be designed, not hoped for: left unspecified, variations drift toward one default look (typically the warm-editorial house style). For the novel variation, deliberately pick something off-distribution and interesting.
29
+
30
+ ## Phase 5: Present in a single file
31
+
32
+ Use the `design_canvas.jsx` starter for static variations side-by-side, or **tweaks** (`make-tweakable`) if the variations share structure and differ on a few axes. For flows, build each variation as a small storyboard within the canvas. **Do not produce v1.html / v2.html / v3.html** — one file, all variations visible or toggle-able.
33
+
34
+ ## Phase 6: Annotate and recommend
35
+
36
+ Caption each variation in one or two sentences ("Variation 2 — Refined. Same structure, expressive headline type, warmer palette."). The captions are a thinking tool: if you can't write a clear one, the variation isn't distinct enough.
37
+
38
+ End with a clear recommendation — the user decides, but a designer offers an opinion ("Variation 2 is my pick — the safety of 1 with more visual confidence"). Don't hedge that all options are equally good; they aren't.
39
+
40
+ Then suggest the next step: a refinement round on the chosen direction, another variation round on a different axis, `make-a-prototype` to go interactive, or `polish-pass` if the user is ready to ship.
@@ -0,0 +1,50 @@
1
+ # Hierarchy and Rhythm Review
2
+
3
+ Review the current design for visual hierarchy and rhythm — the two qualities that most distinguish "intentional" from "AI-generated" — and fix issues found. **Hierarchy guides the eye** (what gets looked at first, second, third); **rhythm makes the design feel intentional** (repetition with strategic variation). When they're right, the design feels effortless to scan.
4
+
5
+ ## Phase 1: Identify the surface
6
+
7
+ Review the HTML/CSS file the user just edited or asked about; otherwise the most recently modified design file; if unclear, ask. Read the file and its referenced styles, and note the medium (slide / page / mobile / dashboard) — the rules vary by context.
8
+
9
+ ## Phase 2: Launch two review agents in parallel
10
+
11
+ Use the ${AGENT_TOOL_NAME} tool to launch both agents concurrently in a single message.
12
+
13
+ Instruct both agents explicitly: report every issue found, including uncertain and low-severity ones, with a confidence and severity estimate. Coverage is the agent's job; filtering happens at aggregation (Phase 3).
14
+
15
+ ### Agent 1: Hierarchy review
16
+
17
+ For every screen, slide, or major section:
18
+
19
+ 1. **Primary / secondary / tertiary.** What should be looked at first, second, third? If you can't tell, the hierarchy is broken.
20
+ 2. **Size.** Headings visibly larger than body; primary CTA larger than secondary actions. Flag similar content at very different sizes (inconsistent) and different-importance content at similar sizes (flat).
21
+ 3. **Color.** Primary actions in saturated brand color, secondary in neutral, de-emphasized in light gray. Flag everything-same-color (no signal) and unimportant-elements-brightest (wrong signal).
22
+ 4. **Weight.** Headlines bold, body regular, captions light. Flag everything-bold and everything-regular.
23
+ 5. **Position.** Eyes start top-left (in LTR); the most important content belongs in prime real estate. Flag primary elements buried bottom-right.
24
+ 6. **Density.** Loose spacing signals "pay attention," tight signals "supporting." Flag important content crammed while filler breathes — that's reversed.
25
+ 7. **The 5-second test.** A first-time user should know what to look at and what to do within 5 seconds.
26
+
27
+ ### Agent 2: Rhythm review
28
+
29
+ For the document as a whole:
30
+
31
+ 1. **Spacing scale.** All padding/margin/gap values snap to a consistent scale (multiples of 4px or 8px). List the implicitly-used scale and flag outliers (`padding: 7px`, `gap: 13px`).
32
+ 2. **Type scale.** Flag arbitrary sizes (`17px`, `23px` in a 16/20/24 design).
33
+ 3. **Repetition.** Cards in a grid, list items, feature blocks share padding, gap, sizes, structure. Flag near-duplicates that are subtly different — identical or deliberately different, nothing in between.
34
+ 4. **Strategic variation.** A long page or deck breaks its pattern occasionally (background shift, wider section, centered CTA). Flag total uniformity (monotonous) and every-section-different (chaotic).
35
+ 5. **Palette discipline.** 3–5 colors plus tints/shades. Flag 8+ distinct colors, or slightly different blues/grays in different places.
36
+ 6. **Section structure.** Sections visually distinguishable (background change, divider, padding shift) but consistently so. Flag no separation and too many separation styles.
37
+ 7. **Alignment.** Flag elements off-grid by a few pixels — inconsistent margins rather than intentional offset.
38
+
39
+ ## Phase 3: Aggregate and fix
40
+
41
+ Wait for both agents, aggregate findings, then fix directly:
42
+
43
+ - Random spacing / font sizes → snap to the file's scale (define one — 4px or 8px multiples — if missing)
44
+ - Flat hierarchy → introduce contrast (bigger headlines, more prominent primary CTA, consistently neutral body)
45
+ - Reversed hierarchy → swap the signals (mute the loud unimportant element, reposition the buried primary)
46
+ - Monotony → introduce one strategic break; chaos → consolidate to the strongest pattern
47
+
48
+ For ambiguous cases, lean toward the more aggressive hierarchy — too-strong is easier to dial back than too-weak to dial up.
49
+
50
+ Summarize: issues found and fixed per category, judgment calls the user should review, open recommendations.
@@ -0,0 +1,38 @@
1
+ # Interaction States Pass
2
+
3
+ Verify every interactive element has a complete set of states (default, hover, active, disabled, focus, loading) plus transitions and feedback; add what's missing. **Interactive elements without state feedback feel broken** — a button without hover looks like a label; a removed focus ring locks out keyboard users. This is the safety net before a design is shown to users.
4
+
5
+ ## Phase 1: Inventory interactive elements
6
+
7
+ Walk the design and list every interactive element: buttons (including `role="button"` and anything with a click handler), links, form inputs, toggles (checkboxes, radios, switches), clickable cards or rows, navigation items (tabs, sidebar links, breadcrumbs), and custom widgets (dropdowns, accordions, modals, popovers).
8
+
9
+ ## Phase 2: Per-element state verification
10
+
11
+ Check all six aspects for each element. Flag everything, including borderline cases — note a confidence level rather than silently dropping a finding you're unsure about.
12
+
13
+ 1. **Default.** Clearly interactive at rest: buttons have fill or border distinct from body text; links look like links; inputs have visible borders or fills. Flag elements that only reveal interactivity on hover — touch and keyboard users never hover.
14
+ 2. **Hover.** Visual change on cursor-over — at minimum a color shift; better, color + shadow + slight transform (`translateY(-2px)`). Don't use opacity reduction as hover; it reads as disabled.
15
+ 3. **Active / pressed.** Darker color, slight scale-down (`transform: scale(0.98)`), or return-to-baseline — confirms the click registered before the action completes.
16
+ 4. **Disabled.** Lower opacity (~0.6), no hover effect, `cursor: not-allowed`, distinct from both default and hover. If disabled pending a condition ("fill all required fields"), indicate _why_ — tooltip, inline message, or `title` attribute.
17
+ 5. **Focus.** Visible ring via `:focus-visible` (not bare `:focus`): 3:1 contrast against the adjacent background, at least 2px thick with 2px offset. `outline: none` is **never** used without a replacement.
18
+ 6. **Loading** (for elements that trigger async work). Disable on click to prevent double-submission, swap the label for a spinner or "Loading…", restore on completion. Data fetched on render gets a skeleton, spinner, or progress indicator.
19
+
20
+ ## Phase 3: Verify transitions
21
+
22
+ Every state change transitions smoothly, not snapped (`transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease`):
23
+
24
+ - **0.15–0.3s** for state changes (hover, focus, active); **0.3–0.5s** for entry/exit (modals, drawers, toasts)
25
+ - Avoid over 0.5s on micro-interactions (laggy) and 0s / no transition (broken)
26
+ - Wrap motion-heavy transitions in `@media (prefers-reduced-motion: reduce)`
27
+
28
+ ## Phase 4: Verify feedback for actions
29
+
30
+ Every action shows a visible result: submission success (toast, inline message, or redirect with confirmation), submission failure (clear error, tied to the field if field-specific), validation errors (appear on blur or submit, cleared when fixed), state changes (immediate visual update). Flag silent successes and silent failures — both feel broken.
31
+
32
+ Current state is visible too: the active page or tab, selected items, and active filters or sorts are visually distinct.
33
+
34
+ ## Phase 5: Apply fixes and summarize
35
+
36
+ Add each missing state or feedback element using the design system's tokens. Where the system doesn't define one, use: hover 10–15% darker (or `color-mix`); active another 10% or `scale(0.98)`; disabled opacity 0.6 + `cursor: not-allowed`; focus `outline: 2px solid var(--color-primary); outline-offset: 2px`; transition `0.2s ease`. Where the right state isn't obvious (e.g., a toggle button's hover-on-active), make a judgment call and note it.
37
+
38
+ Summarize: elements inventoried, states added by category, transitions added or normalized, feedback added, judgment calls the user should review.