@pro-vi/designer 0.3.0 → 0.3.2

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
@@ -1,106 +1,81 @@
1
1
  # designer
2
2
 
3
- MCP + CLI for iterating on **claude.ai/design** Claude's web-based wireframe and high-fidelity design tool.
3
+ MCP + CLI that lets your coding agent drive **[claude.ai/design](https://claude.ai/design)** (Claude's wireframe + hi-fi design tool, no API) with full context of your codebase — capabilities, data shape, existing tokens fed into every prompt.
4
4
 
5
- The human describes intent. The orchestrating agent translates intent into a minimal prompt, relays it to Claude Design, hands the URL back to the human, interprets their reaction, iterates. When the human says "yes", `designer_handoff` downloads a tar.gz bundle (README + chat transcripts + all design files + source JSX) so the implementing agent (Claude Code, typically) can build the design in a real repo.
5
+ Human describes intent agent surveys codebase and prompts Claude Design hands you the URL iterate `designer_handoff` bundles the result (README + chats + HTML + JSX) back into your repo.
6
+
7
+ > **Status:** v0.3.0, early. macOS only.
6
8
 
7
9
  ## Stance
8
10
 
9
- - **Single-vendor, single-purpose.** Only `claude.ai/design`. No kitchen sink.
10
- - **`agent-browser` is the substrate.** Attaches to your real Chrome via CDP sidesteps Cloudflare + Google SSO.
11
- - **Human is the designer.** See `~/.claude/skills/designer-loop`. Orchestrator is translation + plumbing; Claude Design has the taste; human arbitrates.
12
- - **URL is the default taste path.** `designer_prompt` returns a live claude.ai/design URL where tweak sliders work and variants switch. Local tasting harness exists only for when IDE chrome gets in the way.
13
- - **Artifacts land on disk.** Every iteration + every handoff saves under `./artifacts/{key}/`.
11
+ - **Single-vendor, single-purpose.** Only `claude.ai/design`.
12
+ - **Real Chrome via CDP.** Sidesteps Cloudflare + Google SSO.
13
+ - **Capabilities drive design.** Agent surveys the codebase (entities, operations, states, tokens) and feeds them into every prompt. Intent tells Claude Design *how*; the codebase tells it *what*. See the [designer-loop skill](skills/designer-loop/SKILL.md).
14
+ - **URL is the default taste path.** `designer_prompt` returns a live claude.ai/design URL with working tweak sliders and variant switcher.
15
+ - **Artifacts land on disk.** Every iteration + handoff saves under `./artifacts/{key}/`.
14
16
 
15
17
  ## Install
16
18
 
17
- One-call first-run:
18
-
19
- ```bash
20
- git clone https://github.com/pro-vi/designer.git && cd designer
21
- npm install
22
- ./bin/designer setup
23
- ```
24
-
25
- Optional — make `designer` available globally:
26
-
27
- ```bash
28
- npm link
29
- designer setup # now works from any cwd
30
- ```
31
-
32
- `designer setup` is idempotent and auto-progresses:
19
+ ### Prerequisites
33
20
 
34
- 1. Installs deps if missing.
35
- 2. Checks `agent-browser` is on PATH.
36
- 3. Asks you to Cmd+Q Chrome if a non-debug Chrome is running (polls until quit).
37
- 4. Launches a dedicated debug Chrome (`--remote-debugging-port=9222`, profile at `~/.chrome-designer-profile/`).
38
- 5. Polls until you sign in to Claude and reach `/design`.
39
- 6. Installs the `designer-loop` skill at `~/.claude/skills/designer-loop/` unless one is already present (respects bootstrap/dotfiles-managed symlinks).
40
- 7. Registers the MCP with Claude Code at user scope.
21
+ - macOS, Node 20+, Google Chrome at `/Applications/Google Chrome.app`.
22
+ - `agent-browser` on PATH: `npm i -g agent-browser` (or `brew install agent-browser`).
41
23
 
42
- Re-run any time — every step no-ops when already satisfied.
24
+ ### Three paths
43
25
 
44
- ### Why a dedicated profile?
26
+ All land at `designer setup`.
45
27
 
46
- Since Chrome 136, `--remote-debugging-port` is blocked on the default profile for security. The dedicated `~/.chrome-designer-profile/` is a one-time login that persists across launches. Your normal Chrome is untouched.
28
+ ```bash
29
+ # A. Trial — no install
30
+ npx -y @pro-vi/designer setup
47
31
 
48
- ### Auto-launch
32
+ # B. Daily use
33
+ npm i -g @pro-vi/designer && designer setup
49
34
 
50
- After first setup, the MCP auto-launches debug Chrome from the saved profile on the first tool call of any session. You don't have to think about Chrome state again. If a non-debug Chrome is running, auto-launch bails with an actionable error.
35
+ # C. Hacking on it
36
+ git clone https://github.com/pro-vi/designer.git && cd designer
37
+ npm install && ./bin/designer setup
38
+ ```
51
39
 
52
- ### Bot detection
40
+ ### What `designer setup` does
53
41
 
54
- Login is a real human typing into a real Chrome window. `--remote-debugging-port` alone doesn't set `navigator.webdriver` (only `--enable-automation` does); user-agent is identical to normal Chrome. Cloudflare and Google OAuth see a normal session. First login on the new profile may trigger Google's "new device" verification — that's a standard one-time prompt.
42
+ 1. Verify deps (lockfile-hash compare).
43
+ 2. Check `agent-browser` on PATH.
44
+ 3. Ask you to quit a non-debug Chrome (polls until done).
45
+ 4. Launch debug Chrome (`--remote-debugging-port=9222`, profile at `~/.chrome-designer-profile/`).
46
+ 5. Poll until you sign in and land on `/design`.
47
+ 6. Install the `designer-loop` skill at `~/.claude/skills/designer-loop/` (skipped if already present — respects dotfile symlinks).
48
+ 7. Register the MCP with Claude Code (user scope).
55
49
 
56
- ### Manual setup
50
+ Re-run anytime — idempotent. Verify with `designer doctor`.
57
51
 
58
- The MCP registration embeds `DESIGNER_CDP=9222`, so Claude sessions pick it up automatically. The shell export below only matters for direct CLI invocations (`designer session`, `designer prompt`, etc.) from an interactive terminal — add it to `~/.zshenv` or equivalent if you use the CLI directly.
52
+ ### MCP only (skip the CLI)
59
53
 
60
54
  ```bash
61
- ./scripts/designer-chrome.sh # launches debug Chrome
62
- # sign in to Claude, navigate to /design
63
- curl -s http://127.0.0.1:9222/json/version | head # verify CDP
64
- export DESIGNER_CDP=9222 # only needed for direct CLI use
65
- claude mcp add --transport stdio designer \
66
- -- env DESIGNER_CDP=9222 "$PWD/bin/designer" mcp serve
55
+ claude mcp add --scope user --transport stdio designer \
56
+ -- env DESIGNER_CDP=9222 npx -y @pro-vi/designer mcp serve
67
57
  ```
68
58
 
69
- ## CLI
59
+ Still needs debug Chrome running (`npx -y @pro-vi/designer setup` handles it).
70
60
 
71
- Top-level help leads with the typical loop:
61
+ ### Notes
72
62
 
73
- ```
74
- $ designer --help
63
+ - **Dedicated profile.** Chrome 136+ blocks `--remote-debugging-port` on the default profile. Login to `~/.chrome-designer-profile/` persists.
64
+ - **Auto-launch.** MCP auto-launches debug Chrome on the first tool call if the profile exists.
65
+ - **Bot detection.** Real Chrome + user-controlled login — not headless. Cloudflare + Google OAuth see a normal session. First login may trigger a Google new-device prompt.
66
+ - **`DESIGNER_CDP=9222`** is embedded in the MCP registration. Only export it in your shell if you invoke the CLI directly.
75
67
 
76
- designer CLI + MCP for iterating on claude.ai/design
68
+ ## CLI
77
69
 
78
- Typical loop:
79
- designer setup (once per machine)
80
- designer session --action create --name "X" --key x start a project
81
- designer prompt "design the …" --key x prints 'Taste here: <url>' ← open that
82
- designer prompt - --key x < follow-up.txt iterate until human says yes
83
- designer handoff --key x bundle for code implementation
84
70
  ```
85
-
86
- Verbs are grouped: session lifecycle, design operations, file introspection, exit/promotion, setup+ops, internal. Every verb supports `--help`:
87
-
88
- ```bash
89
- designer prompt --help # expanded docs: input modes, flags, output shape, examples
90
- designer help handoff # same
71
+ designer setup (once per machine)
72
+ designer session --action create --name "X" --key x start a project
73
+ designer prompt "design the …" --key x prints 'Taste here: <url>'
74
+ designer prompt - --key x < follow-up.txt iterate
75
+ designer handoff --key x bundle for code implementation
91
76
  ```
92
77
 
93
- All verbs take `--key <k>` to isolate parallel sessions (e.g., working on two features at once). Local state lives at `~/.designer/sessions.json`.
94
-
95
- Prompts accept three input modes:
96
-
97
- ```bash
98
- designer prompt "short text" --key feat-x # positional
99
- designer prompt --prompt-file ./brief.md --key feat-x # from file
100
- cat follow-up.txt | designer prompt - --key feat-x # stdin
101
- ```
102
-
103
- Output of `prompt` and `snapshot` leads with `Taste here: <url>` above the JSON — the URL is the default taste path.
78
+ Every verb has `--help`. `--key <k>` isolates parallel sessions (state at `~/.designer/sessions.json`). Prompts accept positional, `--prompt-file`, or stdin (`-`).
104
79
 
105
80
  ## MCP
106
81
 
@@ -108,103 +83,54 @@ Six tools, registered at user scope by `designer setup`:
108
83
 
109
84
  | Tool | Purpose |
110
85
  |---|---|
111
- | `designer_session` | Enter / inspect / transition. Actions: `status` (default, read-only), `ensure_ready`, `resume`, `create`. Always returns stored state + `currentUrl` + `availableFiles`. |
112
- | `designer_prompt` | Modify the design (HTML-diff wait). Auto-appends a flat-layout instruction. Returns `url` (hand to human), `newFiles`, `activeFile`, `failureMode`, `htmlPath`, `chatReply`. |
113
- | `designer_ask` | Q&A with the assistant (chat-panel wait). No file changes. Returns `reply`. |
114
- | `designer_list` | `scope: 'projects'` (scrapes home) or `'files'` (scrapes file panel — flat-only, see quirks). |
115
- | `designer_snapshot` | Capture current state. Optional `filename` to switch first. Default: paths + hash only; `includeHtml: true` inlines. |
116
- | `designer_handoff` | Export → Handoff → download + extract tar.gz. Returns README + paths. Auto-repairs Claude-side em-dash filename bugs. |
117
-
118
- Registration:
119
-
120
- ```bash
121
- claude mcp add --transport stdio designer \
122
- -- env DESIGNER_CDP=9222 \
123
- /Users/provi/Development/_projs/designer/bin/designer mcp serve
124
- ```
125
-
126
- (`designer setup` runs this. After `npm link` it collapses to `designer mcp serve`.)
86
+ | `designer_session` | Enter / inspect / transition. Returns stored state + `currentUrl` + `availableFiles`. |
87
+ | `designer_prompt` | Modify the design (HTML-diff wait). Returns `url`, `newFiles`, `activeFile`, `failureMode`, `htmlPath`, `chatReply`. |
88
+ | `designer_ask` | Q&A with the assistant, no file changes. |
89
+ | `designer_list` | `projects` or `files` (flat-only see quirks). |
90
+ | `designer_snapshot` | Capture current file. Paths + hash by default; `includeHtml: true` inlines. |
91
+ | `designer_handoff` | Export → download + extract tar.gz. Auto-repairs em-dash filename bugs. |
127
92
 
128
93
  ## The loop
129
94
 
130
95
  ```
131
96
  1. Intent → human describes what they want to feel / change
132
- 2. Read designer_session returns currentUrl + availableFiles
133
- 3. Relay → designer_prompt with a terse, guide-not-constrain prompt
134
- 4. Tastehand the human the url from the return; they react in their own words
97
+ 2. Survey agent reads the target repo: entities, operations, states,
98
+ failure modes, existing tokens capability facts, verbatim
99
+ 3. Relaydesigner_prompt = intent + capabilities, minimal faithful prompt
100
+ 4. Taste → hand the human the returned URL; they react in their own words
135
101
  5. Interpret → next designer_prompt (modify) or designer_ask (clarify)
136
102
  6. Repeat 3-5 → until human says "that's it"
137
103
  7. Promote → designer_handoff — bundle is the decision record
138
104
  ```
139
105
 
140
- Full guidance in `~/.claude/skills/designer-loop/SKILL.md` (also in-repo at `skills/designer-loop/SKILL.md`).
106
+ Full guidance in [`skills/designer-loop/SKILL.md`](skills/designer-loop/SKILL.md).
141
107
 
142
108
  ## Tasting harness
143
109
 
144
- Fallback for when claude.ai/design's IDE chrome (chat panel + toolbar) eats too much viewport to judge at real scale. Requires a prior `designer_handoff`.
110
+ Fallback when the live URL's IDE chrome eats viewport. Requires a prior handoff.
145
111
 
146
112
  ```bash
147
113
  designer tasting --key <key>
148
114
  ```
149
115
 
150
- Walks the latest bundle's `project/` dir (recursively — handles nested layouts), writes `tasting.html` with variant tabs + keyboard shortcuts (1/2/3) + persistent notes (localStorage), starts a local `http.server`, opens the browser.
151
-
152
- Default path for tasting is the live URL. Use tasting when: full-viewport comparison matters, Claude didn't build its own `index.html` gallery, or the IDE chrome is distracting.
116
+ Writes `tasting.html` with variant tabs + 1/2/3 shortcuts + persistent notes, serves locally, opens the browser.
153
117
 
154
118
  ## Operations
155
119
 
156
- - `designer doctor` — diagnose first-run setup state. Checks agent-browser, CDP, a /design tab is open, selectors present, skill installed, MCP registered. Exits 2 on failure.
157
- - `designer health` — probe every UI anchor this MCP depends on. 17 probes across home / session / share / pattern categories. Exits 2 on any fail. Wire into cron / CI to catch claude.ai UI regressions (it already moved Export under Share once mid-development).
158
-
159
- ## Layout
160
-
161
- ```
162
- designer/
163
- ├── package.json
164
- ├── tsconfig.json # type-check only
165
- ├── tsconfig.build.json # tsc → dist/
166
- ├── bin/designer # bash wrapper, prefers dist/ then tsx
167
- ├── mcp-server.ts # MCP stdio server (exports startMcpServer)
168
- ├── cli.ts # same verbs, directly runnable; rich --help
169
- ├── designer-controller.ts # core flow: session, prompt, ask, snapshot, handoff
170
- ├── browser.ts # thin wrapper over agent-browser subprocess
171
- ├── cdp-ensure.ts # auto-launches debug Chrome on first tool call
172
- ├── tasting.ts # tasting.html generator + http.server
173
- ├── ui-anchors.ts # every DOM / URL / structural dependency, enumerated
174
- ├── setup.ts # designer setup verb
175
- ├── session-store.ts # per-session state at ~/.designer/
176
- ├── artifact-store.ts # writes HTML/PNG/JSON under ./artifacts/{key}/
177
- ├── repo-root.ts # package.json walk so source + compiled both resolve resources
178
- ├── selectors.json # DOM selectors for the claude.ai/design surface
179
- ├── scripts/
180
- │ ├── designer-chrome.sh # standalone Chrome launcher
181
- │ └── probe.ts # manual DOM exploration helper
182
- ├── skills/
183
- │ └── designer-loop/SKILL.md # the skill, copied to ~/.claude/skills/ by setup
184
- ├── artifacts/ # generated outputs (gitignored)
185
- └── dist/ # tsc build output (gitignored; published on npm)
186
- ```
120
+ - `designer doctor` — diagnose setup state. Exits 2 on failure.
121
+ - `designer health` — probe 17 UI anchors. Wire into cron to catch claude.ai UI regressions.
187
122
 
188
123
  ## Known quirks
189
124
 
190
- - **Folder-organized variants.** Claude Design sometimes organizes multi-file variants under a subfolder (`directions/sediment.html`). The live MCP's file-list scrape (`designer_list files`, `availableFiles` in session status, `newFiles` diff from `designer_prompt`) is flat-only; nested files are invisible until `designer_handoff`. Mitigation: `designer_prompt` auto-appends *"Keep all generated files at the project root; no subfolders."* Handoff bundle is folder-aware; `designer tasting` walks recursively.
191
- - **React-controlled inputs.** `agent-browser fill` doesn't fire React's synthetic input event. The controller uses the native `HTMLTextAreaElement` value-setter + `dispatchEvent(new Event('input', { bubbles: true }))`, plus JS `.click()` on Send and Create. Both are canonical React-compat patterns.
192
- - **Em-dash handoff filenames.** Claude's handoff pipeline wrote em-dash (`—`) into `index.html` hrefs but saved files with regular hyphens. `designer_handoff` detects and repairs (`repaired.renamed: [...]`). No-op when hrefs already resolve.
193
- - **Cross-origin iframe.** Served HTML lives on `claudeusercontent.com` with a signed `t=` token in the URL. Direct fetch from node works without cookies. The token is session-scoped, not per-iteration.
194
- - **UI regressions.** Claude has moved critical buttons mid-development (Export → Share dropdown). `designer health` is the early-warning system; run it periodically.
125
+ - **Folder-organized variants.** The live file-list scrape is flat-only; nested files invisible until `designer_handoff`. `designer_prompt` auto-appends *"no subfolders."* Bundle + `designer tasting` are folder-aware.
126
+ - **React-controlled inputs.** `agent-browser fill` doesn't fire React's synthetic `input` event; we use the native value-setter + `dispatchEvent` + JS `.click()`.
127
+ - **Em-dash handoff filenames.** Claude's handoff pipeline sometimes writes `—` in hrefs but `-` in filenames. `designer_handoff` detects and repairs.
128
+ - **UI regressions.** Claude has moved critical buttons mid-development (Export Share). Run `designer health` periodically.
195
129
 
196
- ## Publishing (future — not yet on npm)
130
+ ## Credits
197
131
 
198
- Prepped but not shipped. Prerequisites: npm account with scope `@pro-vi` (currently 404/available), 2FA, `npm login`. Then:
132
+ Built on [`agent-browser`](https://github.com/ctate/agent-browser) by [@ctatedev](https://x.com/ctatedev).
199
133
 
200
- ```bash
201
- npm publish --access public
202
- ```
203
-
204
- `prepublishOnly` runs `tsc --noEmit` + `tsc -p tsconfig.build.json`. `files` whitelist in `package.json` keeps the tarball under 35KB. Published package will support:
134
+ ## License
205
135
 
206
- ```bash
207
- npx @pro-vi/designer setup # trial
208
- npm i -g @pro-vi/designer && designer setup # daily use
209
- claude mcp add --transport stdio designer -- designer mcp serve # MCP
210
- ```
136
+ [MIT](LICENSE).
package/dist/cli.js CHANGED
@@ -488,14 +488,17 @@ async function runDoctor() {
488
488
  return out;
489
489
  }
490
490
  function checkDeps() {
491
+ const rootLock = path.join(REPO_ROOT, 'package-lock.json');
492
+ if (!fs.existsSync(rootLock)) {
493
+ return { name: 'dependencies installed', status: 'ok', detail: 'installed-mode' };
494
+ }
491
495
  const nm = path.join(REPO_ROOT, 'node_modules');
492
496
  if (!fs.existsSync(nm)) {
493
- return { name: 'dependencies installed', status: 'fail', detail: 'node_modules missing — run `designer setup` or `npm install`' };
497
+ return { name: 'dependencies installed', status: 'fail', detail: 'node_modules missing — run `npm install`' };
494
498
  }
495
- const rootLock = path.join(REPO_ROOT, 'package-lock.json');
496
499
  const innerLock = path.join(nm, '.package-lock.json');
497
- if (!fs.existsSync(rootLock) || !fs.existsSync(innerLock)) {
498
- return { name: 'dependencies installed', status: 'ok', detail: 'node_modules present (no lockfile to compare)' };
500
+ if (!fs.existsSync(innerLock)) {
501
+ return { name: 'dependencies installed', status: 'ok', detail: 'node_modules present (no inner lockfile)' };
499
502
  }
500
503
  const h = (p) => createHash('sha1').update(fs.readFileSync(p)).digest('hex');
501
504
  if (h(rootLock) !== h(innerLock)) {
package/dist/setup.js CHANGED
@@ -92,12 +92,8 @@ async function step1NpmInstall() {
92
92
  const rootLock = path.join(REPO_ROOT, 'package-lock.json');
93
93
  const innerLock = path.join(nm, '.package-lock.json');
94
94
  if (!fs.existsSync(rootLock)) {
95
- if (fs.existsSync(nm)) {
96
- log('deps', 'ok', 'installed-mode (no package-lock to verify)');
97
- return true;
98
- }
99
- log('deps', 'fail', 'no package-lock.json and no node_modules — reinstall the package');
100
- return false;
95
+ log('deps', 'ok', 'installed-mode');
96
+ return true;
101
97
  }
102
98
  if (fs.existsSync(nm)) {
103
99
  const a = lockfileHash(rootLock);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pro-vi/designer",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "description": "MCP + CLI for autonomous iteration of claude.ai/design — drives the design surface via agent-browser, downloads handoff bundles, and exposes a tasting harness for full-viewport variant comparison.",
6
6
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  "check": "tsc --noEmit",
34
34
  "build": "tsc -p tsconfig.build.json",
35
35
  "prepublishOnly": "npm run check && npm run build",
36
- "postinstall": "node -e \"if (!process.env.npm_config_global) process.exit(0); console.log('\\n designer installed. Next: run `designer setup` to launch debug Chrome, sign in, and register the MCP.\\n')\"",
36
+ "postinstall": "node scripts/postinstall.mjs",
37
37
  "probe": "tsx scripts/probe.ts"
38
38
  },
39
39
  "dependencies": {
@@ -53,6 +53,7 @@
53
53
  "bin/",
54
54
  "skills/",
55
55
  "scripts/designer-chrome.sh",
56
+ "scripts/postinstall.mjs",
56
57
  "selectors.json",
57
58
  "README.md",
58
59
  "LICENSE"
@@ -0,0 +1,4 @@
1
+ // Runs on `npm i -g @pro-vi/designer`. Silent for local/dev installs.
2
+ if (process.env.npm_config_global) {
3
+ console.log('\n designer installed. Next: run "designer setup" to launch debug Chrome, sign in, and register the MCP.\n');
4
+ }
@@ -53,7 +53,7 @@ Orient in the claude.ai/design surface:
53
53
 
54
54
  1. `designer_session({ key })` — returns stored state + `availableFiles`. If `stored.designUrl` exists, you're resuming; otherwise create one with a sensible default name derived from the intent (don't interview for a project name).
55
55
  2. For existing projects: `designer_snapshot({ filename })` per file of interest. You get `htmlPath` — read it only if deep inspection is warranted.
56
- 3. If this is a frontend for an existing backend or codebase, read the backend's API shape and any existing design tokens in the target repo BEFORE prompting. Those are constraints to thread into the prompt verbatim, not aesthetic hypotheses to propose.
56
+ 3. **Survey capabilities — this is the primary source of design, not an afterthought.** Before relaying any intent, read the target repo for what the system actually DOES: entities and their fields, operations / endpoints, states (loading / empty / error / success), failure modes, hard constraints (auth, rate limits, offline cases), and existing design tokens. The design EXPRESSES these capabilities — the human's feeling-shaped intent only tells you *how*; the codebase tells you *what*. Transfer capability facts into the prompt verbatim; don't filter them down to what you think matters aesthetically. If there's no codebase yet (greenfield intake), say so in the prompt so Claude Design doesn't invent constraints.
57
57
 
58
58
  A one-line brief is fine ("I see X; here's the prompt I'm about to send"). Don't turn it into design-by-interview.
59
59
 
@@ -65,9 +65,9 @@ Guide, don't constrain. The prompt gives Claude enough to make good decisions, n
65
65
 
66
66
  | Guide (include) | Constrain (omit) |
67
67
  |---|---|
68
- | What the product does / data it renders | Color palette (unless it's a hard brand token) |
68
+ | **Capability context**: what the product does, entities + fields, operations, states, failure modes | Color palette (unless it's a hard brand token) |
69
69
  | User's situation / primary action | Type treatment, font feel |
70
- | Entities, field names, copy that must appear | Layout direction, whitespace rules |
70
+ | Entities, field names, copy that must appear verbatim | Layout direction, whitespace rules |
71
71
  | Adjacent surfaces / what must NOT change | Tone adjectives ("contemplative", "trustworthy") unless paired with a concrete lever |
72
72
  | Hard brand tokens (palette, type, existing component names) as non-negotiables | Visual hierarchy choices |
73
73
  | Quantity + shape of variants ("3 full-page files", "20 on a wrapping grid") | Variant names (let Claude pick) |
@@ -184,6 +184,7 @@ Never override with "but best practice says..." — capture the tension in the d
184
184
  ## Guardrails
185
185
 
186
186
  - **Read before relaying** (Phase 2). Call `designer_session` first — it returns `availableFiles`.
187
+ - **Transfer capabilities, don't summarize them.** When the codebase has real endpoints / entities / states, drop them into the prompt unabridged. Summarizing is filtering — you're quietly making design decisions Claude Design should make.
187
188
  - **Guide, don't constrain.** Scope + data + hard brand tokens in; aesthetic choices out.
188
189
  - **Lock brand explicitly.** Claude won't guess your palette.
189
190
  - **Let Claude name variants** from the problem domain.
@@ -193,6 +194,7 @@ Never override with "but best practice says..." — capture the tension in the d
193
194
 
194
195
  ## Anti-Patterns
195
196
 
197
+ - **Designing before reading capabilities.** Booting the loop without surveying the target repo produces designs that look good and don't fit the system. Phase 2 step 3 is load-bearing.
196
198
  - **Interviewing about aesthetics.** Scope questions are fine when intent is genuinely unclear; taste questions aren't yours to ask.
197
199
  - **Proposing variants of your own.** Claude Design proposes. You relay.
198
200
  - **Constraining where Claude should have room.** Brand tokens are constraints; palette feelings and layout hunches aren't.