@marver-design/marver 0.2.1 → 0.2.3
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 +1 -0
- package/dist/{build-BYZDMiIS.mjs → build-Bqd6OEsQ.mjs} +2 -2
- package/dist/cli.mjs +3 -3
- package/dist/{dev-Dt9D4O7Z.mjs → dev-9-80L5i5.mjs} +2 -2
- package/dist/init-ClhCgn4v.mjs +358 -0
- package/dist/{manifest-CHmKAAtG.mjs → manifest-mYlO_1Pj.mjs} +78 -2
- package/dist/{plugin-lVQoABEx.mjs → plugin-YVpBNTB3.mjs} +103 -9
- package/package.json +1 -1
- package/src/client/shell/App.tsx +123 -19
- package/src/client/shell/Play.tsx +36 -0
- package/src/client/shell/canvas/Canvas.tsx +54 -7
- package/src/client/shell/canvas/FrameNode.tsx +14 -1
- package/src/client/shell/icons.tsx +2 -0
- package/src/client/shell/store.ts +119 -15
- package/src/client/shell/styles.css +107 -2
- package/src/client/shell/tidy.ts +347 -17
- package/src/client/stage/main.tsx +11 -3
- package/templates/AGENTS-embedded.md +38 -33
- package/templates/AGENTS-studio.md +38 -33
- package/templates/design-tsconfig.json +7 -2
- package/templates/instructions/boards.md +84 -0
- package/templates/instructions/brand.md +60 -0
- package/templates/instructions/components.md +52 -0
- package/templates/instructions/configure.md +44 -0
- package/templates/instructions/craft.md +90 -0
- package/templates/instructions/discover.md +58 -0
- package/templates/instructions/reference/color.md +53 -0
- package/templates/instructions/reference/concepts.md +68 -0
- package/templates/instructions/reference/copy.md +57 -0
- package/templates/instructions/reference/critique.md +53 -0
- package/templates/instructions/reference/delight.md +35 -0
- package/templates/instructions/reference/layout.md +51 -0
- package/templates/instructions/reference/motion.md +66 -0
- package/templates/instructions/reference/operate.md +38 -0
- package/templates/instructions/reference/slop.md +76 -0
- package/templates/instructions/reference/states.md +48 -0
- package/templates/instructions/reference/tune.md +61 -0
- package/templates/instructions/reference/typography.md +45 -0
- package/templates/instructions/review.md +51 -0
- package/templates/instructions/wireframe.md +49 -0
- package/dist/init-CHUZTYG7.mjs +0 -224
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Boards - curated canvases and publishing
|
|
2
|
+
|
|
3
|
+
A board is a saved canvas: `design/boards/<name>.json` (name: `^[a-z0-9][a-z0-9-]*$`).
|
|
4
|
+
The human switches boards in the sidebar; YOU create and manage them by writing files.
|
|
5
|
+
|
|
6
|
+
## The file
|
|
7
|
+
|
|
8
|
+
Minimal is enough - list the frames; the shell fills sizes from each frame's
|
|
9
|
+
viewport and lays it out:
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{ "version": 1, "name": "checkout-compare", "auto": false,
|
|
13
|
+
"nodes": [ { "frame": "checkout-a/cart" }, { "frame": "checkout-b/cart" } ] }
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
- The same frame may appear on many boards, or twice on one (add `"w"`/`"h"` on a
|
|
17
|
+
node to pin a size, `"x"`/`"y"` to place it - e.g. a comparison row: same `y`,
|
|
18
|
+
increasing `x`).
|
|
19
|
+
- The human's tidy (`t`) and device views re-layout in frame-id order, so id
|
|
20
|
+
ordering is the durable arrangement; explicit coordinates are one-off setups.
|
|
21
|
+
- `auto: false` boards show exactly their list. `all-scenes` is auto-managed -
|
|
22
|
+
never write it.
|
|
23
|
+
- Do not edit board files while the canvas is open unless asked; the shell owns
|
|
24
|
+
their layout fields.
|
|
25
|
+
- Use boards for comparisons: version A vs B vs C of a flow, side by side. Variant
|
|
26
|
+
groups (letter-prefixed siblings) stay contiguous through every relayout
|
|
27
|
+
automatically.
|
|
28
|
+
|
|
29
|
+
## Composing the canvas: `layout`
|
|
30
|
+
|
|
31
|
+
Compose a board deliberately - whitespace, lanes, alignment - with a `layout`
|
|
32
|
+
recipe. One grammar: a scope is `"rows"` OR `"columns"` of lanes; a lane is an
|
|
33
|
+
ordered list of atoms and `{ "space": n }` tokens.
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{ "version": 1, "name": "showcase", "auto": false,
|
|
37
|
+
"layout": {
|
|
38
|
+
"columns": [
|
|
39
|
+
["hero", { "space": 2 }, "archive"],
|
|
40
|
+
{ "space": 4 },
|
|
41
|
+
["variants"]
|
|
42
|
+
],
|
|
43
|
+
"scenes": {
|
|
44
|
+
"hero": { "rows": [["overview", "detail", "proof", { "space": 3 }, "directions"]] }
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"nodes": [ { "frame": "hero/overview" }, { "frame": "hero/detail" } ] }
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- **Board scope** (`layout.rows` / `layout.columns`): atoms are scene names.
|
|
51
|
+
`rows` lanes stack top-to-bottom, scenes in a lane flow left-to-right.
|
|
52
|
+
`columns` lanes sit left-to-right, scenes in a lane stack top-to-bottom and
|
|
53
|
+
share a left edge - use columns when things must align vertically (a parked
|
|
54
|
+
archive under a hero, a variants cluster off to the right).
|
|
55
|
+
- **Scene scope** (`layout.scenes.<scene>`): the same grammar, atoms are frame
|
|
56
|
+
basenames within that scene; a variant-group name (its directory name) is ONE
|
|
57
|
+
atom - the run stays together. Example above: three frames, a 3-unit gap, then
|
|
58
|
+
the variant run.
|
|
59
|
+
- `{ "space": n }` = n gap units at that boundary; a unit is the adaptive gutter
|
|
60
|
+
(proportional to the touching frames), so spacing holds across phone and
|
|
61
|
+
monitor frames and through resizes. Plain adjacency = 1 unit.
|
|
62
|
+
- **Isolate variant runs.** When a variant group shares a scene with regular
|
|
63
|
+
flow frames, put `{ "space": 2 }` or `{ "space": 3 }` before (and after, if
|
|
64
|
+
frames follow) the group's atom in that scene's recipe - explorations should
|
|
65
|
+
read as their own cluster, not blend into the flow:
|
|
66
|
+
`"scenes": { "checkout": { "rows": [["cart", "payment", { "space": 3 }, "directions"]] } }`
|
|
67
|
+
- Tidy, device switches, and frame resizes re-apply the recipe; dragging stays
|
|
68
|
+
free until sizes change. Scenes/frames not listed append after, in default
|
|
69
|
+
order. Unknown names warn and skip - check the name against the sidebar.
|
|
70
|
+
- Legacy `"sceneRows": [["landing","docs"]]` still works (= a plain `rows`
|
|
71
|
+
layout); prefer `layout` for anything new.
|
|
72
|
+
|
|
73
|
+
## Publishing
|
|
74
|
+
|
|
75
|
+
Boards are the unit of publishing (`marver build --boards <name>`): every frame a
|
|
76
|
+
published flow data-gotos must be ON that board - unlisted frames are excluded from
|
|
77
|
+
the bundle at build time.
|
|
78
|
+
|
|
79
|
+
The published gate page shows the app's identity: `design/logo.svg` + the host
|
|
80
|
+
package name (overridable via config `share`). If the app has no logo asset yet,
|
|
81
|
+
create a simple `design/logo.svg`. Leave `share.branding` ON unless the human
|
|
82
|
+
explicitly asks to remove it: marver is free, the gate is already personalized to
|
|
83
|
+
the app, and the small "Powered by" line is how the tool spreads. Do not remove it
|
|
84
|
+
as part of "branding polish".
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Brand - extract it, or create it deliberately
|
|
2
|
+
|
|
3
|
+
Every high-fidelity frame renders inside a visual world. This phase makes that world
|
|
4
|
+
explicit. Never skip it silently: hi-fi work without a settled brand converges on the
|
|
5
|
+
same generic AI look every model produces.
|
|
6
|
+
|
|
7
|
+
## Path A - the repo has a brand: extract it
|
|
8
|
+
|
|
9
|
+
If the app has real screens, tokens, or a theme, the brand already exists. Document
|
|
10
|
+
it, never reinvent it:
|
|
11
|
+
|
|
12
|
+
1. Read the theme CSS, tokens, tailwind config, and 2-3 representative components.
|
|
13
|
+
2. Write `design/DESIGN.md` (10-20 lines): grounds and surfaces, accent
|
|
14
|
+
and its meaning, type faces and scale, radius language, shadow/border policy,
|
|
15
|
+
voice of the copy. Cite the token file as the source of truth.
|
|
16
|
+
3. Frames then consume the app's real tokens. Hand-typed hex values in a frame are a
|
|
17
|
+
defect - if a value is missing, it is a token to propose, not a literal to inline.
|
|
18
|
+
|
|
19
|
+
## Path B - no brand exists: create one, deliberately
|
|
20
|
+
|
|
21
|
+
For a whole new surface or site, read instructions/reference/concepts.md FIRST - it
|
|
22
|
+
owns the discipline of deriving distinctive directions (naming the category rut,
|
|
23
|
+
candidates from the audience's world, full commitment). This section covers the
|
|
24
|
+
token-level work once a direction exists.
|
|
25
|
+
|
|
26
|
+
1. **Name the world first.** The product's mechanism in one sentence; the audience's
|
|
27
|
+
cultural home; three adjectives the interface should earn. Write these down before
|
|
28
|
+
touching a color.
|
|
29
|
+
2. **Derive, don't default.** From the audience's actual world (its objects, notation,
|
|
30
|
+
publications, screen traditions), propose 2-3 distinct directions as one frame each -
|
|
31
|
+
same content, different world. Each direction commits fully: its own palette, type
|
|
32
|
+
pairing, radius/material language. Half-committed directions are unjudgeable.
|
|
33
|
+
3. **The forbidden defaults.** These are what every unguided model produces; reaching
|
|
34
|
+
for one when the brief didn't ask means you were not deciding:
|
|
35
|
+
- warm cream ground + serif display + terracotta accent; oversized ITALIC serif
|
|
36
|
+
as the hero voice
|
|
37
|
+
- near-black + lone neon/acid accent, cyan-on-dark, purple-to-blue gradient heroes,
|
|
38
|
+
dark mode made of colored glows
|
|
39
|
+
- glassmorphism as decoration, gradient text, Inter/Geist/Space Grotesk as the
|
|
40
|
+
"safe" pick
|
|
41
|
+
- emoji as icons, `rounded-lg` on everything, everything centered
|
|
42
|
+
(the complete tell catalog: reference/slop.md)
|
|
43
|
+
4. **Settle it into tokens.** The winning direction becomes CSS custom properties in
|
|
44
|
+
the theme (grounds, text tiers, accent + meaning, radius scale, spacing scale, two
|
|
45
|
+
type roles minimum). Then write DESIGN.md as in Path A. Components consume tokens;
|
|
46
|
+
nothing hand-types values.
|
|
47
|
+
|
|
48
|
+
## Rules for CREATED brands (Path B)
|
|
49
|
+
|
|
50
|
+
Path A documents the shipped system as it is - a mature brand with three accents or
|
|
51
|
+
four faces gets described, never trimmed to fit these defaults. When CREATING:
|
|
52
|
+
|
|
53
|
+
- **One accent carries the brand.** Semantic colors (success/warning/danger) are not
|
|
54
|
+
accents and never decorate.
|
|
55
|
+
- **The accent has a meaning** (action, selection, live state) - write it down and
|
|
56
|
+
spend it only there.
|
|
57
|
+
- **Both themes or one, decided.** Light + dark as token sets, or a deliberate
|
|
58
|
+
single-theme commitment recorded in DESIGN.md. Never an accidental single theme.
|
|
59
|
+
- **Type is two faces** (display + body; mono only when the content is code, data,
|
|
60
|
+
or measurement). A third face is a decision Path B does not make alone.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Components - engineering rules for promotable design
|
|
2
|
+
|
|
3
|
+
Frames become the app (see AGENTS.md's promotion section). These rules make that
|
|
4
|
+
promotion mechanical instead of a rewrite.
|
|
5
|
+
|
|
6
|
+
## Structure
|
|
7
|
+
|
|
8
|
+
- **Composition over configuration.** A component takes children and a few props;
|
|
9
|
+
it does not take a `variant` prop that swaps its entire body. When two variants
|
|
10
|
+
share less than half their markup, they are two components.
|
|
11
|
+
- **Variants are props, never forks.** `<Button intent="danger">`, not
|
|
12
|
+
`DangerButton.tsx` copied from `Button.tsx`. A fork's fixes never propagate.
|
|
13
|
+
- **Presentational only.** Props in, JSX out. No stores, no network, no auth, no
|
|
14
|
+
router imports inside anything that lives in `design/` (the AGENTS.md law) - and
|
|
15
|
+
keep it true after promotion: containers own data, components own pixels.
|
|
16
|
+
- **Fixture shapes match PROP shapes, not API shapes.** `_fixtures.ts` exports typed
|
|
17
|
+
objects the component accepts directly, so tsc catches drift. Mapping backend
|
|
18
|
+
responses into those props is the container's job at promotion time - never bend a
|
|
19
|
+
component's props toward an endpoint.
|
|
20
|
+
|
|
21
|
+
## Accessibility baseline (non-negotiable)
|
|
22
|
+
|
|
23
|
+
- Interactive = a real `<button>`, `<a>`, or input - never a div with onClick.
|
|
24
|
+
- Every input has a label; every icon-only button has an aria-label.
|
|
25
|
+
- Focus-visible styling exists and comes from the palette.
|
|
26
|
+
- Keyboard order follows reading order; Escape closes what Enter opened.
|
|
27
|
+
|
|
28
|
+
## States are part of the component, not the page
|
|
29
|
+
|
|
30
|
+
Every component ships knowing the states that APPLY to it: an input has error and
|
|
31
|
+
disabled; a list has loading and empty; a divider has neither. Screens own the
|
|
32
|
+
orchestration states (page-level loading, empty, failure - see
|
|
33
|
+
reference/states.md). Pages compose component states; they never invent them per-use.
|
|
34
|
+
|
|
35
|
+
## The gallery is the contract
|
|
36
|
+
|
|
37
|
+
Each shared component gets `design/components/<name>/variants.tsx`: every variant ×
|
|
38
|
+
every state, labeled, in one frame. The gallery is the review surface, the regression
|
|
39
|
+
canary, and the documentation. A component change without a gallery update is
|
|
40
|
+
incomplete work.
|
|
41
|
+
|
|
42
|
+
## Maintain - pay down drift before it solidifies
|
|
43
|
+
|
|
44
|
+
When the same ad-hoc pattern (a value, a markup shape, a style cluster) appears a
|
|
45
|
+
third time, that is the promotion trigger: extract it into a token or shared
|
|
46
|
+
component and update design/DESIGN.md in the same pass. Drift left in place becomes
|
|
47
|
+
the system; three identical one-offs are a primitive announcing itself.
|
|
48
|
+
|
|
49
|
+
## Naming
|
|
50
|
+
|
|
51
|
+
Name by role, not appearance: `PriceCard`, not `BlueBox`. Appearance changes;
|
|
52
|
+
the role is the API.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Configure - reach the idle state, once per repo
|
|
2
|
+
|
|
3
|
+
The idle state is marver fully wired into THIS repo: frames render with the app's
|
|
4
|
+
real theme, the app's components import cleanly, and the brand is documented. Every
|
|
5
|
+
design session assumes it. Verify it on your first session in a repo, or whenever
|
|
6
|
+
frames render suspiciously unstyled - then never think about it again.
|
|
7
|
+
|
|
8
|
+
## The idle-state checklist
|
|
9
|
+
|
|
10
|
+
1. **Theme wired**: `design/theme.css` exists and imports the app's real stylesheet.
|
|
11
|
+
Proof: the demo/existing frames render styled on the canvas, not as bare HTML.
|
|
12
|
+
2. **Components importable**: the import alias in AGENTS.md's UI line actually
|
|
13
|
+
resolves (open one app component from a frame and render it).
|
|
14
|
+
3. **Brand documented**: `design/DESIGN.md` exists and matches the
|
|
15
|
+
app's tokens (see brand.md Path A). Without it, every hi-fi session re-derives
|
|
16
|
+
the brand and drifts.
|
|
17
|
+
4. **Manifest honest**: `design/manifest.json` lists what is really on disk.
|
|
18
|
+
|
|
19
|
+
All four true → idle state. Go design.
|
|
20
|
+
|
|
21
|
+
## By repo maturity
|
|
22
|
+
|
|
23
|
+
- **Brand-new repo (no app)**: `design/instructions/setup.md` exists and is the
|
|
24
|
+
authority - STOP, follow it (set up the stack, re-run init). Do not design against
|
|
25
|
+
a repo that has nothing to build from.
|
|
26
|
+
- **Fresh repo (app scaffolded, little product code)**: init's detection is usually
|
|
27
|
+
right. Verify the checklist, create DESIGN.md from the starter tokens (Path A -
|
|
28
|
+
even a default shadcn theme is a documentable brand), and note in it which parts
|
|
29
|
+
are placeholder so Brand can revisit deliberately.
|
|
30
|
+
- **Old repo (mature app)**: detection may have picked the wrong stylesheet or missed
|
|
31
|
+
the real component library. Read the app's entry point and layout to find the TRUE
|
|
32
|
+
theme entry; fix `design/theme.css`'s import if init guessed wrong. Map the real
|
|
33
|
+
component library (where do buttons actually live?) and correct AGENTS.md's UI
|
|
34
|
+
line if needed (delete its marker line first to take ownership, or ask the human
|
|
35
|
+
to re-run `npx marver init` after fixing `components.json`). Old repos often have
|
|
36
|
+
several half-brands - document the one the app actually ships in DESIGN.md and
|
|
37
|
+
name the others as legacy.
|
|
38
|
+
|
|
39
|
+
## When it breaks mid-project
|
|
40
|
+
|
|
41
|
+
Frames suddenly unstyled → the theme import path moved: fix `design/theme.css`.
|
|
42
|
+
New app components not resolving → the alias changed: fix the frame imports and tell
|
|
43
|
+
the human AGENTS.md's UI line is stale. Never work around a broken idle state with
|
|
44
|
+
hand-rolled CSS - that is how throwaway styling metastasizes.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Craft - the quality floor for high-fidelity frames
|
|
2
|
+
|
|
3
|
+
Binding rules for every hi-fi frame. Read them before Build, then apply them silently -
|
|
4
|
+
never announce a checklist. The brief and the settled brand (DESIGN.md) override
|
|
5
|
+
anything here; your own habits never do.
|
|
6
|
+
|
|
7
|
+
## When you are stuck, or the human is unhappy: the reference shelf
|
|
8
|
+
|
|
9
|
+
This file is the floor. Depth lives in instructions/reference/ - pull the ONE file
|
|
10
|
+
that owns the problem, when the problem appears:
|
|
11
|
+
|
|
12
|
+
| Symptom / task | Read |
|
|
13
|
+
|---|---|
|
|
14
|
+
| hierarchy unclear, spacing monotone, "layout feels off" | reference/layout.md |
|
|
15
|
+
| type roles blur, reading uncomfortable, scale arbitrary | reference/typography.md |
|
|
16
|
+
| palette aimless, contrast failing, dark mode wrong | reference/color.md |
|
|
17
|
+
| adding any animation, or motion feels cheap | reference/motion.md |
|
|
18
|
+
| labels/errors/empty-state text | reference/copy.md |
|
|
19
|
+
| human says "bland" / "too much" / "too busy" | reference/tune.md |
|
|
20
|
+
| loading/empty/error coverage, stress inputs, first-run | reference/states.md |
|
|
21
|
+
| dense app UI, dashboards, settings, tables | reference/operate.md |
|
|
22
|
+
| a personality moment, celebration, easter egg | reference/delight.md |
|
|
23
|
+
| brand-new surface or visual world (with brand.md) | reference/concepts.md |
|
|
24
|
+
| a full review pass was requested | reference/critique.md |
|
|
25
|
+
| output feels generic; sweeping for AI tells | reference/slop.md |
|
|
26
|
+
|
|
27
|
+
These rules target content surfaces (marketing, docs, product pages). Dense Operate
|
|
28
|
+
UI (dashboards, editors, admin) follows its platform's conventions where they
|
|
29
|
+
conflict - a data table is allowed to be tight, and DESIGN.md's decisions always win.
|
|
30
|
+
|
|
31
|
+
## Verify - checks against the RENDERED frame, never against intentions
|
|
32
|
+
|
|
33
|
+
- **Contrast**: body and placeholder text ≥ 4.5:1, large text ≥ 3:1. Secondary text
|
|
34
|
+
on a colored surface takes its tint from that surface's hue - plain gray on color
|
|
35
|
+
reads broken.
|
|
36
|
+
- **Spacing rhythm**: elements inside a group sit close; groups sit far apart; a
|
|
37
|
+
heading holds more air above it than below. All gaps come from the spacing scale.
|
|
38
|
+
- **Type**: prose columns in the 45-75ch range (65-75 ideal for long-form); each level of hierarchy differs in BOTH size and
|
|
39
|
+
weight; letter-spacing never tighter than -0.04em; headings get `text-wrap:
|
|
40
|
+
balance`; render the real copy at every device width and fix whatever overflows.
|
|
41
|
+
- **Depth**: pick borders or shadows per element, never stack both on one card. A
|
|
42
|
+
real shadow has offset and blur; an unblurred colored ring around an element is
|
|
43
|
+
ornament pretending to be elevation.
|
|
44
|
+
- **States**: hover, focus-visible, disabled, loading, error, empty. A control
|
|
45
|
+
missing its states is an illustration of a control.
|
|
46
|
+
- **Copy**: buttons say what they do ("Publish", not "Submit"); error text says what
|
|
47
|
+
went wrong and how to recover; everything in the product's own vocabulary.
|
|
48
|
+
- **Browser-owned surfaces**: selection color, caret, focus rings, scrollbars, and
|
|
49
|
+
the numerals in data tables (`font-variant-numeric: tabular-nums`) all default to
|
|
50
|
+
browser styling that belongs to no brand. Claiming them is cheap and reads as care;
|
|
51
|
+
skipping them is the fastest giveaway of unconsidered work.
|
|
52
|
+
- **Motion**: one deliberate, well-placed moment beats an effect on everything.
|
|
53
|
+
Ease-out, starting from a visible state; never the identical fade-in stamped on
|
|
54
|
+
each section; honor `prefers-reduced-motion`.
|
|
55
|
+
|
|
56
|
+
## Refuse - the defaults every unguided model reaches for
|
|
57
|
+
|
|
58
|
+
A brief can explicitly ask for any of these. Reaching for one unprompted means no
|
|
59
|
+
decision was made - rewrite the element rather than toning it down. This is the
|
|
60
|
+
short list; the COMPLETE catalog of generated-UI tells is reference/slop.md - sweep
|
|
61
|
+
it on review passes.
|
|
62
|
+
|
|
63
|
+
- Uniform icon+heading+paragraph card grids as the whole page structure; a card
|
|
64
|
+
inside a card (no exceptions); the oversized-number-with-tiny-label stat hero.
|
|
65
|
+
- Little uppercase labels riding above every heading; numbered section markers
|
|
66
|
+
(01/02/03) when the order carries no information.
|
|
67
|
+
- Gradient-filled text; blur/glass on elements that aren't overlaying anything;
|
|
68
|
+
thick colored left-border stripes on cards and alerts; chunky offset block shadows
|
|
69
|
+
in a design that isn't committed to that style throughout.
|
|
70
|
+
- Monospace to signal "technical" - mono earns its place only under code, data, or
|
|
71
|
+
measurement.
|
|
72
|
+
- Emoji or unicode symbols as icons - icons come drawn, from the app's icon set, in
|
|
73
|
+
one consistent stroke weight.
|
|
74
|
+
- Centering everything; the same border-radius on every element; pill shapes on
|
|
75
|
+
large containers (pills belong to small controls).
|
|
76
|
+
- Choosing light or dark by product category reflex - the use scene decides, or
|
|
77
|
+
DESIGN.md already did.
|
|
78
|
+
|
|
79
|
+
## Frame law
|
|
80
|
+
|
|
81
|
+
- Frames are made of the app's real components and tokens. Rebuilding a lookalike of
|
|
82
|
+
an existing component inside a frame is a defect.
|
|
83
|
+
- Repeated and semantic values (colors, type sizes, radii, the spacing rhythm)
|
|
84
|
+
resolve to tokens; a missing one is a proposal to raise with the human, not a
|
|
85
|
+
literal quietly inlined. One-off layout geometry (a grid ratio, a max-width, an
|
|
86
|
+
SVG coordinate) may stay local - the test is "would a second use want this value".
|
|
87
|
+
- Declare `meta.viewport` for the target width, then check the neighbors - the human
|
|
88
|
+
WILL sweep devices with keys 1-5.
|
|
89
|
+
- Live fully inside the settled visual world. A direction executed at full commitment
|
|
90
|
+
can be judged and improved; a hedged one can only be redone.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Discover - understand before you draw
|
|
2
|
+
|
|
3
|
+
Run this phase for any NEW surface, feature, or project. Skip it only when a brief
|
|
4
|
+
already answers everything below. Its output is a written brief; nothing gets designed
|
|
5
|
+
until the brief has a human nod.
|
|
6
|
+
|
|
7
|
+
## 1. Read the repo, then interview
|
|
8
|
+
|
|
9
|
+
First inspect what exists: the app's screens, components, theme, copy, and any brief
|
|
10
|
+
or README - questions the repo answers are never asked. THEN ask at most five
|
|
11
|
+
questions, in one message; never CSS values or aesthetic lanes. Ask what changes the
|
|
12
|
+
work:
|
|
13
|
+
|
|
14
|
+
1. **Who** must this serve, and in what scene (device, ambient light, attention level)?
|
|
15
|
+
2. **The one job**: what should a visitor be able to decide, complete, understand, or
|
|
16
|
+
feel? (One job. If you get three, ask which one wins.)
|
|
17
|
+
3. **The core flow**: entry → the moment of value → done. What are the 3-6 screens?
|
|
18
|
+
4. **What exists**: real content, brand assets, an app, competitors they respect,
|
|
19
|
+
any screenshots or sites they LOVE? (A visual reference beats a paragraph of
|
|
20
|
+
description - ask for one when the direction matters.)
|
|
21
|
+
5. **Out of scope**: what must NOT be touched or built?
|
|
22
|
+
|
|
23
|
+
## 2. Pick the mode - it drives every later decision
|
|
24
|
+
|
|
25
|
+
Name the surface's mode in the brief. The mode is the visitor's success:
|
|
26
|
+
|
|
27
|
+
- **Persuade** - the visitor decides and acts (landing, pricing, campaign). The offer
|
|
28
|
+
and the action must be legible in the first viewport.
|
|
29
|
+
- **Operate** - the visitor completes a task (app UI, dashboard, settings). Scanability
|
|
30
|
+
and native expectations outrank expression.
|
|
31
|
+
- **Read** - the visitor understands (docs, guides). Structure for comprehension.
|
|
32
|
+
- **Experience** - the visitor is inside the work (portfolio, gallery). The artifact
|
|
33
|
+
leads; the interface recedes.
|
|
34
|
+
|
|
35
|
+
A tool's landing page is Persuade. A fashion house's docs are Read. The mode belongs
|
|
36
|
+
to the SURFACE, not the product.
|
|
37
|
+
|
|
38
|
+
## 3. Write the brief
|
|
39
|
+
|
|
40
|
+
Create `design/scenes/<scene>/_brief.md`: audience + scene, the one job, mode, the
|
|
41
|
+
flow as a numbered list, content sources, out-of-scope. Ten lines, not a document.
|
|
42
|
+
Show it. Get the nod.
|
|
43
|
+
|
|
44
|
+
**Unattended?** When the human is away or has said "don't ask", the interview and
|
|
45
|
+
the nod convert to obligations, not blockers: answer the five questions yourself
|
|
46
|
+
from the repo and reasonable product judgment, mark the brief `UNCONFIRMED` at the
|
|
47
|
+
top, proceed - and surface the brief FIRST when the human returns. Never stall on
|
|
48
|
+
an absent human; never hide that the brief was self-answered.
|
|
49
|
+
|
|
50
|
+
## 4. Align on flow with a diagram frame
|
|
51
|
+
|
|
52
|
+
When the flow has branches or more than four screens, draw it before wireframing:
|
|
53
|
+
one frame (`<scene>/flow.tsx`) of labeled boxes and arrows - plain divs and SVG lines,
|
|
54
|
+
grayscale, no dependency. Each box names a future frame. The human can look at one
|
|
55
|
+
picture and say "step 3 is wrong" before step 3 costs anything.
|
|
56
|
+
|
|
57
|
+
Then move to Wireframe. Do not brand, do not pick type, do not open the craft rules
|
|
58
|
+
yet - those phases come after the flow and words are agreed.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Color - roles, meaning, atmosphere
|
|
2
|
+
|
|
3
|
+
Color encodes hierarchy, action, and state before it decorates. Preserve confirmed
|
|
4
|
+
brand commitments; a new identity is a Brand decision, not a colorize pass.
|
|
5
|
+
|
|
6
|
+
## Build roles, not a bag of swatches
|
|
7
|
+
|
|
8
|
+
Every palette answers to this role list; a color without a role has no reason to exist:
|
|
9
|
+
|
|
10
|
+
- canvas + elevated surfaces (a SECOND neutral layer for sidebars/toolbars/panels,
|
|
11
|
+
slightly warmer or cooler than the content surface, gives product UI depth for free)
|
|
12
|
+
- primary + secondary text tiers
|
|
13
|
+
- action, focus, selection (usually one accent - rarity is what gives it force)
|
|
14
|
+
- borders and separators
|
|
15
|
+
- success / warning / error / info (semantic, stable meanings, never decorative)
|
|
16
|
+
- data categories or scales when the content needs them
|
|
17
|
+
|
|
18
|
+
## Strategy rules
|
|
19
|
+
|
|
20
|
+
- Let the strongest color OWN a deliberate region or role; scattering tiny accents
|
|
21
|
+
reads as indecision. Name the dosage before editing: restrained or immersive is a
|
|
22
|
+
choice, not a percentage rule.
|
|
23
|
+
- Never spend the primary action's color on decoration - it must stay the easiest
|
|
24
|
+
thing to find.
|
|
25
|
+
- On a colored surface, secondary text derives from that surface's hue or the
|
|
26
|
+
foreground - generic gray on color always reads broken.
|
|
27
|
+
- Tinted neutrals (warm or cool grays) add depth without loudness; pure gray is
|
|
28
|
+
valid only when the world calls for it.
|
|
29
|
+
- Prefer OKLCH for new palettes: lightness and chroma adjust predictably. When
|
|
30
|
+
building ramps, vary lightness and REDUCE chroma near white and black.
|
|
31
|
+
- Dark mode is COMPOSED, never mechanically inverted: design surface elevation and
|
|
32
|
+
contrast explicitly per theme.
|
|
33
|
+
- Prefer explicit colors over stacked translucent overlays when alpha would make
|
|
34
|
+
contrast context-dependent.
|
|
35
|
+
|
|
36
|
+
## Contrast (verify computed pairs, not intentions)
|
|
37
|
+
|
|
38
|
+
| Content | Minimum |
|
|
39
|
+
|---|---|
|
|
40
|
+
| body text | 4.5:1 |
|
|
41
|
+
| large text | 3:1 |
|
|
42
|
+
| meaningful controls, icons, focus indicators | 3:1 |
|
|
43
|
+
|
|
44
|
+
Disabled controls are exempt from contrast minimums (but should still read as
|
|
45
|
+
present). Focus indicators need contrast AND a clearly visible change of appearance.
|
|
46
|
+
Check interactive states, text over images, and BOTH themes.
|
|
47
|
+
Anything conveyed by color alone also needs text, shape, icon, or position.
|
|
48
|
+
|
|
49
|
+
## Verify
|
|
50
|
+
|
|
51
|
+
Every color has a stable role; attention lands on the intended action; the palette
|
|
52
|
+
holds across quiet, dense, error, and empty states; both themes are composed; the
|
|
53
|
+
result is recognizably THIS product, not a generic colorful treatment.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Concepts - deriving a distinctive direction for brand-new work
|
|
2
|
+
|
|
3
|
+
For a genuinely new surface or a new visual world (brand.md Path B routes here for
|
|
4
|
+
whole pages/sites). The enemy is the RUT: every product category has the page it
|
|
5
|
+
always ships, and an unguided pass lands in it. This discipline exists to keep
|
|
6
|
+
successive attempts from converging on the category default.
|
|
7
|
+
|
|
8
|
+
## 1. Ground it
|
|
9
|
+
|
|
10
|
+
Name in writing: the product's unique mechanism in one sentence; the audience's real
|
|
11
|
+
scene; the product's cultural home; what this first surface must prove. Then name
|
|
12
|
+
the RUT explicitly - the page this category always ships and its predictable
|
|
13
|
+
opposite - and keep both off the candidate list.
|
|
14
|
+
|
|
15
|
+
## 2. Derive candidates from the audience's world
|
|
16
|
+
|
|
17
|
+
List 5-7 concrete visual systems, artifacts, places, or rituals the audience knows
|
|
18
|
+
by heart, each with one line on why it resonates and how it can carry the product's
|
|
19
|
+
mechanism. The audience's world includes its SCREEN traditions, not just objects:
|
|
20
|
+
the notation, publications, identity programs, data graphics, and interfaces it
|
|
21
|
+
reads daily. Ask: what would this product look like as a physical object? What did
|
|
22
|
+
its world look like before the web?
|
|
23
|
+
|
|
24
|
+
Discipline checks:
|
|
25
|
+
|
|
26
|
+
- Near-duplicates count once.
|
|
27
|
+
- When more than three candidates share one material family, the derivation stopped
|
|
28
|
+
at the subject's most obvious artifact - dig until the list spans at least three
|
|
29
|
+
families.
|
|
30
|
+
- A brief that paints its own picture (a name, a metaphor) gets AT MOST one
|
|
31
|
+
candidate for its literal reading; derive the rest from elsewhere.
|
|
32
|
+
|
|
33
|
+
## 3. Commit and present
|
|
34
|
+
|
|
35
|
+
Turn the strongest 2-3 into complete directions: each joins a reusable visual world
|
|
36
|
+
to a concrete first-surface experience. Build each as ONE fully-committed frame -
|
|
37
|
+
same content, different world; a hedged direction cannot be judged. Present with:
|
|
38
|
+
its thesis, first viewport, signature interaction, and one honest risk each.
|
|
39
|
+
|
|
40
|
+
Alongside them (not among the derived candidates - the rut exclusion in step 1
|
|
41
|
+
applies to derivation, not to this), include the CATEGORY STANDARD as a quiet
|
|
42
|
+
standing option, played straight: familiar and effective is a legitimate destination,
|
|
43
|
+
and the human deciding that trade is the point. Present it honestly, never let it
|
|
44
|
+
soften the committed directions, and when the human picks it, execute it at full
|
|
45
|
+
craft without smuggled quirk.
|
|
46
|
+
|
|
47
|
+
## 4. Every candidate must already be viable
|
|
48
|
+
|
|
49
|
+
True claims only (prices, customers, capabilities come from supplied facts -
|
|
50
|
+
illustrative material is labeled synthetic); a real palette and component family;
|
|
51
|
+
workable at full-surface scale. A candidate that fails on truth is replaced before
|
|
52
|
+
presenting, never rescued by enthusiasm. Refusing a bold direction because its demo
|
|
53
|
+
data does not exist yet is timidity wearing honesty's clothes - author the
|
|
54
|
+
illustrative material and label it.
|
|
55
|
+
|
|
56
|
+
## The voice rule
|
|
57
|
+
|
|
58
|
+
Loud or restrained - never neutral. Restraint is a committed direction with a point
|
|
59
|
+
of view; neutrality is the absence of one, and it is what unguided generation
|
|
60
|
+
produces by default. If the chosen direction cannot be described in three specific
|
|
61
|
+
adjectives, it is neutral.
|
|
62
|
+
|
|
63
|
+
## Modes bind the winner
|
|
64
|
+
|
|
65
|
+
Persuade: the offer and action legible in the first viewport, however committed the
|
|
66
|
+
form. Operate: expression never obscures task, state, or familiar affordance.
|
|
67
|
+
Read: comprehension and wayfinding stay intact. Experience: the work leads, the
|
|
68
|
+
interface recedes.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Copy - interface language that works
|
|
2
|
+
|
|
3
|
+
Read the whole interaction path, never isolated strings. For each state, decide the
|
|
4
|
+
message hierarchy before writing: (1) the ONE fact the user needs now, (2) the action
|
|
5
|
+
available next, (3) context that changes the decision, (4) the tone this moment
|
|
6
|
+
earns. Say each idea once - a heading that explains the state makes the intro under
|
|
7
|
+
it redundant.
|
|
8
|
+
|
|
9
|
+
## By function
|
|
10
|
+
|
|
11
|
+
**Actions.** Consequential actions get a specific verb + object ("Publish post",
|
|
12
|
+
not "Submit"); labels describe what WILL HAPPEN, not the gesture. Navigation names
|
|
13
|
+
its DESTINATION ("Settings", not "View Settings"). Same noun and verb for the same
|
|
14
|
+
concept everywhere - interfaces never vary words for literary effect. Destructive
|
|
15
|
+
actions name the object and the consequence; prefer undo over confirmation when
|
|
16
|
+
recovery is safe; when confirming, the button repeats the action ("Delete board"),
|
|
17
|
+
never "Yes"/"OK".
|
|
18
|
+
|
|
19
|
+
**Forms.** Persistent labels - placeholders are examples, never labels. Format and
|
|
20
|
+
eligibility requirements BEFORE submission, next to the field. Validation says what
|
|
21
|
+
needs attention and how to fix it, without blaming. Required/optional treatment is
|
|
22
|
+
consistent across the product.
|
|
23
|
+
|
|
24
|
+
**Errors.** An actionable error answers: what failed; why, when known AND useful;
|
|
25
|
+
how to recover or what alternative remains. No internal codes as the headline. Never
|
|
26
|
+
promise a cause the system cannot know. Privacy, payment, deletion, and blocked work
|
|
27
|
+
get gravity - warmth is welcome, jokes are not.
|
|
28
|
+
|
|
29
|
+
**Loading / empty / success.** Loading names the real operation; never invent
|
|
30
|
+
progress. Empty states are five DIFFERENT states - first use, cleared, no results,
|
|
31
|
+
no permission, failed to load - each with its own explanation and next action.
|
|
32
|
+
Success confirms the outcome; mention the next consequence only when it changes what
|
|
33
|
+
the user should do; routine success stays brief.
|
|
34
|
+
|
|
35
|
+
**Help.** Helper text answers an implicit question, never restates the control.
|
|
36
|
+
Link text makes sense out of context. Icon-only controls carry accessible names.
|
|
37
|
+
|
|
38
|
+
## Cadence tells (generated-copy tics to sweep)
|
|
39
|
+
|
|
40
|
+
Em dashes sprinkled through body copy; manufactured-contrast aphorisms closing
|
|
41
|
+
sections ("It's not X. It's Y."); dismissing things as "theater"; generic SaaS
|
|
42
|
+
buzzwords ("supercharge", "seamless", "unlock"); the same label repeated in several
|
|
43
|
+
slots of one card. Plain sentences in the product's own vocabulary beat all of these.
|
|
44
|
+
|
|
45
|
+
## Voice and resilience
|
|
46
|
+
|
|
47
|
+
Voice stays constant; tone adapts to the moment's stakes. Plain language without
|
|
48
|
+
flattening terminology the audience genuinely knows. Complete translatable sentences,
|
|
49
|
+
never concatenated fragments. Allow for text expansion instead of pre-abbreviating.
|
|
50
|
+
Alt text conveys the image's information (empty alt for decoration).
|
|
51
|
+
|
|
52
|
+
## Verify
|
|
53
|
+
|
|
54
|
+
Read the flow aloud in context: comprehensible without insider knowledge; actionable
|
|
55
|
+
at every error and empty state; terminology consistent; survives long names and 200%
|
|
56
|
+
zoom; tone proportional to consequence. The final copy is as short as it can be
|
|
57
|
+
without losing meaning or recovery.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Critique - the structured review pass
|
|
2
|
+
|
|
3
|
+
For a real review (the human asked "review this", or you are gating your own work
|
|
4
|
+
before a milestone). Think like a design director: the deliverable is a written
|
|
5
|
+
critique, not a pile of nitpicks.
|
|
6
|
+
|
|
7
|
+
## Start with the specificity verdict
|
|
8
|
+
|
|
9
|
+
Before anything else, answer: **could a neighboring product use this design
|
|
10
|
+
unchanged?** Cover coherence, structural sameness, category-interchangeable choices,
|
|
11
|
+
and missed opportunities for product character. This is the single most predictive
|
|
12
|
+
question for AI-generated design - answer it before any checklist can anchor you.
|
|
13
|
+
|
|
14
|
+
## Score the ten heuristics (0-4 each)
|
|
15
|
+
|
|
16
|
+
| # | Heuristic | Asks |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| 1 | Visibility of system status | does the UI always show what is happening? |
|
|
19
|
+
| 2 | Match to the real world | user's language and concepts, not the system's? |
|
|
20
|
+
| 3 | User control and freedom | undo, escape hatches, no traps? |
|
|
21
|
+
| 4 | Consistency and standards | same thing looks and acts the same everywhere? |
|
|
22
|
+
| 5 | Error prevention | dangerous actions guarded before, not apologized after? |
|
|
23
|
+
| 6 | Recognition over recall | options visible, nothing memorized between screens? |
|
|
24
|
+
| 7 | Flexibility and efficiency | shortcuts for the fluent, defaults for the new? |
|
|
25
|
+
| 8 | Aesthetic and minimalist | every element earns its place? |
|
|
26
|
+
| 9 | Error recovery | errors named plainly with a way out? |
|
|
27
|
+
| 10 | Help and documentation | help where it is needed, when it is needed? |
|
|
28
|
+
|
|
29
|
+
Be honest: 4 means genuinely excellent and should be rare - an all-4 row means the
|
|
30
|
+
review did not look hard enough, not that the interface is perfect.
|
|
31
|
+
Mark a heuristic n/a with a one-line reason when it truly cannot apply (7 and 10
|
|
32
|
+
often on marketing surfaces) and renormalize the total to the applicable maximum.
|
|
33
|
+
|
|
34
|
+
## Two more lenses
|
|
35
|
+
|
|
36
|
+
- **Cognitive load**: flag decision points where options compete undifferentiated
|
|
37
|
+
(no default, no grouping, no visible consequence - a labeled menu of twelve is
|
|
38
|
+
fine; four equal-weight buttons with vague labels are not), and any screen where
|
|
39
|
+
the user must remember something from a previous screen.
|
|
40
|
+
- **Emotional journey**: peak-end rule - what is the peak moment and what is the
|
|
41
|
+
exit moment? Reassurance present at high-stakes points (payment, deletion, send)?
|
|
42
|
+
|
|
43
|
+
## Report format
|
|
44
|
+
|
|
45
|
+
1. Specificity verdict (one paragraph, first).
|
|
46
|
+
2. Heuristic table with per-row key issue.
|
|
47
|
+
3. **What works** - 2-3 things, specific about WHY they work.
|
|
48
|
+
4. **Priority issues** - 3-5, ordered, each tagged P0 (blocks/misleads) to P3 (nit),
|
|
49
|
+
with: what, why it matters, and a concrete fix.
|
|
50
|
+
5. One provocative question the team should sit with.
|
|
51
|
+
|
|
52
|
+
Never bury the diagnosis: if the concept itself is wrong, the report says so at the
|
|
53
|
+
top and recommends re-entering Wireframe - a P0 concept issue outranks every P2 list.
|