@cychien/ezdesign 0.0.0-stage → 0.8.1
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/LICENSE +21 -0
- package/README.md +486 -2
- package/dist/cli.mjs +5649 -0
- package/dist/constants.d.ts +45 -0
- package/dist/overlay.css +465 -0
- package/dist/overlay.js +2447 -0
- package/dist/project-root.d.ts +10 -0
- package/dist/shell.css +2482 -0
- package/dist/shell.js +4644 -0
- package/dist/vite.d.ts +26 -0
- package/dist/vite.mjs +100 -0
- package/package.json +79 -4
- package/skills/ezdesign/SKILL.md +78 -0
- package/skills/ezdesign/reference/baseline.md +131 -0
- package/skills/ezdesign/reference/components.md +102 -0
- package/skills/ezdesign/reference/critique.md +129 -0
- package/skills/ezdesign/reference/design.md +247 -0
- package/skills/ezdesign/reference/inspiration.md +125 -0
- package/skills/ezdesign/reference/make.md +331 -0
- package/skills/ezdesign/reference/principles.md +130 -0
- package/skills/ezdesign/reference/product.md +127 -0
- package/skills/ezdesign/reference/stack.md +123 -0
- package/skills/ezdesign/reference/start.md +76 -0
- package/skills/ezdesign/scripts/page.d.mts +61 -0
- package/skills/ezdesign/scripts/page.mjs +908 -0
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
# Make something
|
|
2
|
+
|
|
3
|
+
> Only for a turn whose prompt says 增強設計 (the design harness) is on for it, or a request that
|
|
4
|
+
> asks for it by name. In any other turn, handle the request as if you had never read this file.
|
|
5
|
+
|
|
6
|
+
The request in front of you is job A: something to change or build. It arrives as an ezdesign
|
|
7
|
+
feedback batch, as a plain request in chat, or as an explore round asking for variants of one
|
|
8
|
+
element. Whichever it is, `PRODUCT.md` at the project root is the brief and `DESIGN.md` the visual
|
|
9
|
+
direction - read them first if you have not - and `.ezdesign/config.json` says what the project is built on, which
|
|
10
|
+
browser tool to look at it with, and where its design system and components are. When the config
|
|
11
|
+
is missing or names no browser tool, run [stack.md](stack.md) first; when it records no
|
|
12
|
+
`components.primitives`, run [components.md](components.md) first.
|
|
13
|
+
|
|
14
|
+
What each form of the request adds:
|
|
15
|
+
|
|
16
|
+
- **A batch**: `items`, each annotation with an `anchor` to source (`file:line`), a selector and
|
|
17
|
+
the viewport it was made at; `references`; `attachments`; and the running page's `url`.
|
|
18
|
+
- **An explore**: one element's capture - its markup, computed styles, the slot it sits in and the
|
|
19
|
+
page's tokens - and a tool each variant goes back through. Nothing is edited in an explore; the
|
|
20
|
+
variants are proposals the user picks from, and the one they pick comes back later as a batch.
|
|
21
|
+
- **A plain request**: none of that. Find the source yourself and use the dev server.
|
|
22
|
+
|
|
23
|
+
## The request is the scope
|
|
24
|
+
|
|
25
|
+
Change what the request asks for, and nothing else. When you notice something else that is wrong -
|
|
26
|
+
a contrast failure, a missing state, text that overflows, a stale token - **say so
|
|
27
|
+
in one line in your reply and leave the code alone**. You are not being asked to be thorough; you
|
|
28
|
+
are being asked for this change. A fix nobody requested is one the user has to notice, understand
|
|
29
|
+
and possibly undo, in a diff they did not expect - and it buries the change they did ask for.
|
|
30
|
+
|
|
31
|
+
Three exceptions. What you just built must itself be right: correcting your own work is finishing
|
|
32
|
+
the job, not extending it. The project's documents may learn from the request, in Learn, because a
|
|
33
|
+
correction the user has had to make twice is a gap in the documents, not in the code. And a pattern
|
|
34
|
+
your change makes appear a third time is extracted, as Build says, which touches its other copies
|
|
35
|
+
without changing how they look.
|
|
36
|
+
|
|
37
|
+
## How closely to keep to the design system
|
|
38
|
+
|
|
39
|
+
`DESIGN.md` is the direction; the design system is the material, and how closely you keep to it
|
|
40
|
+
depends on how complete it is.
|
|
41
|
+
|
|
42
|
+
- **A complete system** - a real scale of colours, type, spacing, radii and shadows, used across
|
|
43
|
+
the page - is the product's language. Build from its tokens, and reach outside them only when
|
|
44
|
+
none of them can do what the piece needs.
|
|
45
|
+
- **A sparse one** - a handful of tokens, most values written inline - is only a hint. Go in the
|
|
46
|
+
direction it and `DESIGN.md` point, and choose the values yourself.
|
|
47
|
+
|
|
48
|
+
Either way, a value that keeps coming up becomes part of the system - see **Patterns that keep
|
|
49
|
+
coming up**, under Build.
|
|
50
|
+
|
|
51
|
+
What stays fixed is `PRODUCT.md`: what the product is for, and its Brand Commitments. Beyond
|
|
52
|
+
that, `DESIGN.md` is where you start, not a limit: a precedent that shows a better arrangement, a
|
|
53
|
+
stronger emphasis or a contrast it does not describe can take the piece past it, built from the
|
|
54
|
+
system's own material.
|
|
55
|
+
|
|
56
|
+
## Tweak, or a piece of design?
|
|
57
|
+
|
|
58
|
+
A **tweak** adjusts what exists: the size, colour or spacing of a thing already on the page. A
|
|
59
|
+
**piece of design** makes something new, or replaces how something looks. Most requests are
|
|
60
|
+
tweaks. A tweak goes straight to Build, and gets your own look in Review rather than a reviewer's;
|
|
61
|
+
everything else applies to both. An explore is always a piece of design, made fast: nothing in it
|
|
62
|
+
is built yet, so it decides like one but takes no screenshots beyond its capture, looks at no
|
|
63
|
+
states, and has no review of any kind.
|
|
64
|
+
|
|
65
|
+
## Effort
|
|
66
|
+
|
|
67
|
+
The prompt may set this turn's design effort, which the user picks. Without one, it is high.
|
|
68
|
+
|
|
69
|
+
- **High**: everything in this file.
|
|
70
|
+
- **Medium**: everything but Review. No reviewer, for a piece of design either: look at the
|
|
71
|
+
result yourself once, at the request's viewport, and fix what is plainly off.
|
|
72
|
+
- **Low**: read `PRODUCT.md`, `DESIGN.md` and [baseline.md](baseline.md), and go straight to
|
|
73
|
+
building the change in the project's components and tokens. No Purpose, Look or Decide, no screenshots, no search for 靈感,
|
|
74
|
+
no `principles.md`, no Review. Learn and Deliver still run.
|
|
75
|
+
|
|
76
|
+
The level changes how much work goes into a change, never what the request asks for.
|
|
77
|
+
|
|
78
|
+
## Purpose
|
|
79
|
+
|
|
80
|
+
Before looking for anything, decide what this piece is for. An adjective - clean, modern, polished -
|
|
81
|
+
decides nothing. Work out, from the request, `PRODUCT.md` and the page:
|
|
82
|
+
|
|
83
|
+
- what the person looking at it comes here to do or find;
|
|
84
|
+
- what is therefore the main body, and what is secondary;
|
|
85
|
+
- what makes that easy to do: what they must see or understand before they act, the fewest steps
|
|
86
|
+
to get it done, what tells them it worked, and how they get back from a mistake.
|
|
87
|
+
|
|
88
|
+
That is what you search with and what you judge every input against. How to lay it out is not
|
|
89
|
+
decided yet: Look may show you a better arrangement than the first one you would reach for.
|
|
90
|
+
|
|
91
|
+
## Look
|
|
92
|
+
|
|
93
|
+
Gather the inputs before deciding anything:
|
|
94
|
+
|
|
95
|
+
- **The current page.** Look at where the piece will sit, and at the page as a whole: what it
|
|
96
|
+
leads with, and the rhythm of its sections. A piece is right or
|
|
97
|
+
wrong only in the page it lands in, so choose the direction that keeps the whole page looking
|
|
98
|
+
good, not the one that looks best on its own. Look with screenshots, taken by the skill's own
|
|
99
|
+
script - `<skill>` is the folder above this file's `reference/`:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
node <skill>/scripts/page.mjs shot <url><page> <file> --viewport <W>x<H> --around "<selector>" --page
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
It writes the piece with some of the page around it at twice the page's pixels, whole even when
|
|
106
|
+
it runs past the viewport, and with `--page` the whole page beside it at its own size. Judge the
|
|
107
|
+
details - spacing, alignment, type, edges, colour - only on the piece; the whole page is for the
|
|
108
|
+
rhythm of its sections and their proportions, and is too small to judge a detail on. Several
|
|
109
|
+
viewports - `--viewport 1168x861,390x844` - come out of the same run, one file each.
|
|
110
|
+
`--hover`, `--focus` and `--active` shoot the piece again with one element in that state - the
|
|
111
|
+
pointer on it, focus reached from the keyboard, or pressed - a file each; give each the selector
|
|
112
|
+
of the element to put in the state, or nothing to use `--around`'s, and `--states` is all three on
|
|
113
|
+
the piece. A phone has no hover, so that one is skipped there. In a batch, `page`, `viewport` and `selector` are the
|
|
114
|
+
item's anchor's. A `clipped:` line means part of the piece is scrolled out of sight inside it,
|
|
115
|
+
and what it hides is not in the picture. A `redirected:` line means the page sent the script
|
|
116
|
+
somewhere else, a sign-in most of the time, so the picture is not the user's page: judge from the
|
|
117
|
+
source and the user's own screenshots instead, and say so in one line in your reply. Only when
|
|
118
|
+
the script cannot run - there is no Chrome - take them with the browser tool. Read the DOM only around the piece, never as a snapshot of the
|
|
119
|
+
whole page: the source is found through the anchor or the code, and a whole-page dump fills the
|
|
120
|
+
context with a page the screenshot has already shown you.
|
|
121
|
+
- **The project's own kin.** What the request asks for usually exists somewhere already. A flow
|
|
122
|
+
that needs a dialog uses the dialog this project has; go and look at it - the primitive in the
|
|
123
|
+
component set (`components.path` in the config), and how the pages that use it use it. Do not
|
|
124
|
+
invent a second version of a thing the project already has a version of.
|
|
125
|
+
- **The system.** `DESIGN.md`'s direction, the design system, and the component set.
|
|
126
|
+
- **This user's taste.** `.ezdesign/taste.md`, when it exists: how this user has judged earlier
|
|
127
|
+
work. Build the first version to it; the review judges by it too.
|
|
128
|
+
|
|
129
|
+
Search [inspiration.md](inspiration.md) for precedent only when the database is available: the
|
|
130
|
+
prompt says so, or, outside an ezdesign session, `~/.ezdesign/credentials.json` holds an `inspire`
|
|
131
|
+
token. Otherwise skip the search and say nothing about it. When you do search, describe what the thing
|
|
132
|
+
is and has to show, and read what comes back in the order inspiration.md gives: the text and the
|
|
133
|
+
first image of each result, then the code of only the ones you learn from. A precedent is the
|
|
134
|
+
work of an outstanding designer, so study why each part of it is the way it is - the intent behind
|
|
135
|
+
its elements and patterns, and what its motion is for - before you judge it. What it can give you
|
|
136
|
+
is a move you would not have reached yourself - an arrangement, what leads and what recedes, an
|
|
137
|
+
emphasis, a contrast - and the reasoning that makes it work. Bring what it teaches into a design of
|
|
138
|
+
your own, in this project's tokens; start from its pattern only when that pattern is right for this
|
|
139
|
+
case, and adapt it even then. The design is still yours.
|
|
140
|
+
|
|
141
|
+
**An explore is not a search for inspiration.** The user wants to see how the element could be
|
|
142
|
+
arranged to read more easily and look cleaner. Its variants differ in a decision - what leads, what
|
|
143
|
+
recedes, how it is grouped, how much it shows - not in decoration, and each is a direction of its
|
|
144
|
+
own. When the prompt lists what earlier rounds on this element already offered, offer something
|
|
145
|
+
else.
|
|
146
|
+
|
|
147
|
+
## Decide
|
|
148
|
+
|
|
149
|
+
Now turn the purpose into layout decisions, with what Look showed you: take a precedent's move where
|
|
150
|
+
it beats your first idea. Decide:
|
|
151
|
+
|
|
152
|
+
- how dense it should be, and what has to be visible first;
|
|
153
|
+
- what colour and emphasis are for here, and what they are not for.
|
|
154
|
+
|
|
155
|
+
Not "a clean, modern, good-looking dashboard", but:
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
The user comes here to find orders that went wrong.
|
|
159
|
+
The list of those orders is the body of the screen; revenue figures are secondary.
|
|
160
|
+
A compact data layout, so the first screen on desktop shows as many orders as it can.
|
|
161
|
+
Red marks a problem and nothing else.
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Write these four or five lines, the purpose with them, for yourself before building; they are what
|
|
165
|
+
Build builds and what you check the result against. Then hold the direction up against the
|
|
166
|
+
request's own content before you build any of it: can everything the request says must be seen,
|
|
167
|
+
done or noticed still be seen, done and noticed this way? A direction that would hide something
|
|
168
|
+
the request needs is cheaper to adjust here than after it is built, polished and reviewed - and the
|
|
169
|
+
adjustment is usually small: order, a count, the one item that must not be missed brought forward. A tweak needs one of them, a piece of design all
|
|
170
|
+
of them. In an explore the purpose is shared, and each variant answers the decisions differently.
|
|
171
|
+
|
|
172
|
+
Decide the direction yourself. A request that is open-ended - "make it more appealing", "be
|
|
173
|
+
bolder", "改好看一點" - is asking you to decide, so do not hand the choice back as options: pick the
|
|
174
|
+
strongest direction, build it, and say in your reply, in a few words, which one you took. The
|
|
175
|
+
review is what catches a wrong one. When the batch builds a variant the user picked in an explore,
|
|
176
|
+
the direction is already theirs: do not look for another. Ask the user only when the answer turns on something only they
|
|
177
|
+
know - which content, which audience, a fact about the business. An explore puts its choices to
|
|
178
|
+
the user as variants, so it never asks in words.
|
|
179
|
+
|
|
180
|
+
## Build
|
|
181
|
+
|
|
182
|
+
Read [baseline.md](baseline.md) and then [principles.md](principles.md) before you build. The
|
|
183
|
+
baseline is the standard every piece is held to; the principles put it into practice, with the
|
|
184
|
+
defaults against AI slop and the craft floor. The defaults are defaults rather than bans, so `DESIGN.md`, the user's own
|
|
185
|
+
request or a precedent's move can earn any of them back; going against one without any of these is
|
|
186
|
+
the reflex they exist to stop.
|
|
187
|
+
|
|
188
|
+
Build with the project's components and design system, from the inputs above and the inspiration
|
|
189
|
+
you found, into UI that does what the user asked and reaches the goal behind it. A component the
|
|
190
|
+
work needs and the set lacks is written the way `components.library` says, as the components step
|
|
191
|
+
would write it, and its values come from the design system as the section on keeping to it says.
|
|
192
|
+
In an explore, build each variant within the round's own rules - one
|
|
193
|
+
root, its own styles, no files touched.
|
|
194
|
+
|
|
195
|
+
**Look at it in every state.** Whenever you look at what you built - a tweak's own look, the
|
|
196
|
+
check before a review, the look after a refine - shoot each interactive element you changed or
|
|
197
|
+
added, a button, a link, a field or a card that responds, with `--hover`, `--focus` and `--active`,
|
|
198
|
+
and look at every file. A state that looks wrong - a box that appears on hover, a focus ring that is
|
|
199
|
+
missing or cut off, a press that shifts the layout - is part of the change, and is fixed before you
|
|
200
|
+
deliver; the user should never be the one to find it.
|
|
201
|
+
|
|
202
|
+
**Patterns that keep coming up.** A design grows in use, and the system grows with it. When your
|
|
203
|
+
change makes a value or a piece of UI appear for the third time - the same shadow written out a
|
|
204
|
+
third time, a third card with the same header - extract it. A value becomes a token in the design
|
|
205
|
+
system, under a name that says what it is; a piece of UI becomes a component in the project's
|
|
206
|
+
library, written the way `components.library` says, and its name goes into `components.primitives`
|
|
207
|
+
in `.ezdesign/config.json` so later work finds it among the project's own kin and uses it. Switch
|
|
208
|
+
the existing copies to it without changing how they look, and name the extraction in your reply.
|
|
209
|
+
Twice is not yet a pattern; leave it. An explore extracts nothing, since nothing in it is settled.
|
|
210
|
+
|
|
211
|
+
Build to the bar the reviewer holds it to, the baseline: outstanding rather than the safe
|
|
212
|
+
average, designed for the whole screen rather than the component alone, the point of the page first
|
|
213
|
+
and plain, hierarchy visible at a glance, greys carrying the page and colour kept for the point,
|
|
214
|
+
spacing fit for what the page is for, and every state finished. Before you write it, picture that
|
|
215
|
+
version, not the first competent one, and build that. A clever idea is not the goal; a useful move
|
|
216
|
+
done cleanly is.
|
|
217
|
+
|
|
218
|
+
## Review
|
|
219
|
+
|
|
220
|
+
A maker judging their own work praises it. So a piece of design in a batch or a plain request is
|
|
221
|
+
judged by an independent reviewer: a subagent with a fresh context, started with your agent tool,
|
|
222
|
+
that did not watch you make it.
|
|
223
|
+
|
|
224
|
+
First screenshot the piece in place with `shot`, as in Look and in one run: `--around` it at the
|
|
225
|
+
request's viewport - and at `390x844` too when the piece reflows - with its interactive elements in
|
|
226
|
+
their states, plus one of the whole page at desktop, into files outside the project. Those are what
|
|
227
|
+
the reviewer judges, and your own check that nothing is broken. Then give it this brief, with the three paths
|
|
228
|
+
written out in full - a file a reviewer is only pointed to from inside another is one it does not
|
|
229
|
+
open. Add only what it needs to run, and never your intent or your opinion of the result:
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
Review a UI change you did not make. Read <the paths of critique.md, baseline.md and principles.md,
|
|
233
|
+
all beside this file>, then judge by critique.md.
|
|
234
|
+
The user asked: "<the request, in their words>"
|
|
235
|
+
Page: <url>, at <viewport - an item's anchor.viewport, else desktop>.
|
|
236
|
+
The change is in: <the selector, or file:line, of what you changed>.
|
|
237
|
+
Screenshots: <the files>.
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
One review covers the whole batch: when it holds more than one piece of design, list each one in
|
|
241
|
+
the brief - its request, where it is, its screenshots - and get one answer. When a piece builds a
|
|
242
|
+
variant the user picked in an explore, add `The direction was chosen by the user; judge execution
|
|
243
|
+
and fit.` to the brief, and read a pivot on that piece as refine. When a piece takes a precedent's
|
|
244
|
+
move past what `DESIGN.md` describes, add `It departs from DESIGN.md on purpose: <the move, in a few
|
|
245
|
+
words>. Judge whether the move serves the page.`
|
|
246
|
+
|
|
247
|
+
It answers with scores, a verdict and at most three fixes. **One review**, acted on by its verdict:
|
|
248
|
+
|
|
249
|
+
- **ship**: go on to Learn.
|
|
250
|
+
- **refine**: make the listed fixes, look at the result yourself, and go on to Learn.
|
|
251
|
+
- **pivot**: the direction was wrong. Build a different one, not a variant of the same idea, and
|
|
252
|
+
have that reviewed once more - with the same brief and one more line, since two reviewers score
|
|
253
|
+
the same piece differently and a comparison is steadier than a second score:
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
An earlier version, for comparison: <a screenshot of the first direction, taken before you replaced it>.
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Deliver the direction that review calls better, putting the first one back when that is its
|
|
260
|
+
answer. There is no third review.
|
|
261
|
+
|
|
262
|
+
A **tweak** gets no reviewer: look at it yourself, rendered at the request's viewport, fix what is
|
|
263
|
+
plainly off, and stop. **An explore** gets no review at all, not even your own: it is there to
|
|
264
|
+
put directions in front of the user quickly, and the one they pick is reviewed when a batch builds
|
|
265
|
+
it. Send each variant the moment it is made. When your agent has no way to start a subagent, review the piece yourself
|
|
266
|
+
by critique.md, strictly, as if someone else had made it.
|
|
267
|
+
|
|
268
|
+
## Learn
|
|
269
|
+
|
|
270
|
+
An ordinary change edits code only. `PRODUCT.md`, `DESIGN.md` and `.ezdesign/taste.md` change only
|
|
271
|
+
on what the user has actually said, never on what you read into it. Two signals count:
|
|
272
|
+
|
|
273
|
+
- **The user states a rule.** "Never", "always", "from now on", in so many words, is a rule the
|
|
274
|
+
first time.
|
|
275
|
+
- **The same correction, asked for again.** The same kind of adjustment the user has already asked
|
|
276
|
+
for once before - the spacing tighter again, the accent used less again - means the documents
|
|
277
|
+
let you make the same mistake twice.
|
|
278
|
+
|
|
279
|
+
Nothing else counts: not a batch that sends back what you made, not a tone, not a guess at what
|
|
280
|
+
they meant. Fix the work for those, and leave the documents alone. When a signal holds, write it
|
|
281
|
+
into the document it belongs to, in the form that document already uses:
|
|
282
|
+
|
|
283
|
+
- A visual lesson goes to `DESIGN.md`, at the level the file is written at: a Do or Don't that
|
|
284
|
+
names a tendency - "the accent stays rare, one filled button per band" - not a value. A value
|
|
285
|
+
stays in the code.
|
|
286
|
+
- A visual rule the user states as binding - "never", "always", in so many words - goes to
|
|
287
|
+
`PRODUCT.md`'s Brand Commitments, because `DESIGN.md` is a direction and the user's own rule is
|
|
288
|
+
not optional.
|
|
289
|
+
- A product rule goes to `PRODUCT.md`: Product Principles when it is a principle, Capabilities and
|
|
290
|
+
Constraints when it is a fact.
|
|
291
|
+
- How the user judges quality - what they have called good or bad in general terms, or corrected
|
|
292
|
+
twice - goes to `.ezdesign/taste.md`, creating it if it is not there: the judgment ("a single
|
|
293
|
+
emphasised figure beats a row of equal badges"), not the element it came from. Newest first.
|
|
294
|
+
- One line, in the user's own terms, not an essay. If it contradicts an entry already there, change
|
|
295
|
+
that entry rather than adding a second one that disagrees, and say so.
|
|
296
|
+
|
|
297
|
+
When none of these holds but your change leaves a line in either file stale - it still describes
|
|
298
|
+
what you just removed - name the line in 順帶一提 and leave the file as it is.
|
|
299
|
+
|
|
300
|
+
The skill's own `baseline.md`, `principles.md` and `critique.md` are shared by every project this
|
|
301
|
+
skill is installed in, so they are never edited here. What you learn from this request is about
|
|
302
|
+
this product and this user, and it lives with the project.
|
|
303
|
+
|
|
304
|
+
An explore edits no file, so this step does not run in one; the pick that comes back later as a
|
|
305
|
+
batch is where the learning happens.
|
|
306
|
+
|
|
307
|
+
## Deliver
|
|
308
|
+
|
|
309
|
+
For a batch or a plain request: a reply the user can read in a few seconds. One short line per
|
|
310
|
+
item: what changed, as they will see it on the page, and the files it touched, since it is their
|
|
311
|
+
code - no sub-bullets, no pixel values or breakpoints, no account of what you checked or could not
|
|
312
|
+
run. When Learn wrote to a document, one more line naming the file and the entry, so they can
|
|
313
|
+
strike it if the reading was wrong. When you searched for 靈感, one more line for each result you
|
|
314
|
+
took from: what you took - its arrangement and its details, the spacing, sizes and weights - and
|
|
315
|
+
where yours differs from it and why, so the user can judge the reason. A reason that names 設計規範 is
|
|
316
|
+
one `DESIGN.md` or `PRODUCT.md` actually says; a reason you inferred is given as your own judgment. Then, only
|
|
317
|
+
when there is something they would act on and do not already know, a short **順帶一提** list: one
|
|
318
|
+
line each, what and where, no fixes applied. That list is the whole of what you do about it.
|
|
319
|
+
|
|
320
|
+
Leave out everything they did not ask about: the review, its scores and its verdict; which steps
|
|
321
|
+
you followed; a tour of every detail you made; facts they already have, such as what
|
|
322
|
+
`PRODUCT.md` says. When the review raised something you left and it matters to them, it goes in
|
|
323
|
+
順帶一提 as your own observation.
|
|
324
|
+
|
|
325
|
+
For an explore: each variant through the tool, with a note that says the idea in one line.
|
|
326
|
+
|
|
327
|
+
Everything the user reads - replies, progress lines, questions, variant names and notes - is in the
|
|
328
|
+
language they write in, and in their words: 增強設計, 設計規範, 靈感, not harness, make.md, precedent
|
|
329
|
+
or inspire. A progress line says what you are doing to their page ("正在調整間距"), never which step
|
|
330
|
+
of this file you are on, and never anything about the review: while it runs, "正在檢查細節" is all
|
|
331
|
+
the line needs. This holds for every line, including the ones you write between tool calls.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Design principles
|
|
2
|
+
|
|
3
|
+
> Only for a turn whose prompt says 增強設計 (the design harness) is on for it, or a request that
|
|
4
|
+
> asks for it by name. In any other turn, handle the request as if you had never read this file.
|
|
5
|
+
|
|
6
|
+
Read this before you build, after [baseline.md](baseline.md): the baseline is the standard every
|
|
7
|
+
piece is held to, and what follows puts it into practice.
|
|
8
|
+
|
|
9
|
+
Three kinds of rule live here and they bind differently. The **anti-slop defaults** say what not
|
|
10
|
+
to reach for when nothing asked for it. The **craft floor** holds whatever the direction is. The
|
|
11
|
+
**design system** section says to start from the direction the project already documents.
|
|
12
|
+
|
|
13
|
+
## Against AI slop
|
|
14
|
+
|
|
15
|
+
These are the tells that mark a page as machine-made: each is cheap to reach for and expensive to
|
|
16
|
+
justify. Every one is a **default, not a ban**. The project's `DESIGN.md`, a pinned brief, a precedent's
|
|
17
|
+
move, or the user asking for it in so many words can earn any of them back, and when one of them is what the
|
|
18
|
+
design actually needs, use it. What the defaults rule out is the reflex.
|
|
19
|
+
|
|
20
|
+
### Page structure
|
|
21
|
+
|
|
22
|
+
- **Do not number sections** (01 / 02 / 03) unless the sequence carries information the reader
|
|
23
|
+
needs, such as steps that have to be done in order.
|
|
24
|
+
- **Do not put a task in a modal** when it needs neither interruption nor protected focus.
|
|
25
|
+
|
|
26
|
+
### Borders and edges
|
|
27
|
+
|
|
28
|
+
- **No thick coloured border on one side of a card.** The side-tab accent is the most recognisable
|
|
29
|
+
tell there is.
|
|
30
|
+
- **No thick accent border on a rounded element.** The border and the radius fight each other, so
|
|
31
|
+
drop one of them.
|
|
32
|
+
- **Do not pair a hairline border with a wide diffuse shadow.** Commit to a defined edge or to a
|
|
33
|
+
soft elevation, not to both at once.
|
|
34
|
+
|
|
35
|
+
### Colour and light
|
|
36
|
+
|
|
37
|
+
- **Purple and violet gradients, cyan on dark, and cream or beige page backgrounds need an explicit
|
|
38
|
+
reason.** Without one they are off the table; with one they are yours to use. These are the
|
|
39
|
+
palettes every generator reaches for by reflex.
|
|
40
|
+
- **Do not use glowing shadows**: a zero-offset coloured halo on any background, or any coloured
|
|
41
|
+
blurred shadow on a dark one. A shadow carries an offset and a soft blur; a halo is decoration.
|
|
42
|
+
- **Do not reach for gradient text.** Gradient type needs a reason, not a mood.
|
|
43
|
+
- **Do not use hard offset shadows** (`box-shadow: 4px 4px 0`) outside a world that is actually
|
|
44
|
+
neobrutalist. The zero-blur block shadow is a costume, not a depth system.
|
|
45
|
+
|
|
46
|
+
### Type and icons
|
|
47
|
+
|
|
48
|
+
- **Monospace is for code.** Mono worn as a costume for "technical" is a tell.
|
|
49
|
+
- **Do not use emoji or Unicode glyphs as an icon system.** Icons are drawn, from a real library or
|
|
50
|
+
authored SVG, in one consistent stroke and weight.
|
|
51
|
+
- **Do not crush letter spacing** past the point where characters keep their own shapes. Tighten
|
|
52
|
+
display type optically, not destructively.
|
|
53
|
+
|
|
54
|
+
### Layout and motion
|
|
55
|
+
|
|
56
|
+
- **Do not use one spacing value everywhere.** Tight groupings for related items, generous
|
|
57
|
+
separation between sections; the variation is the rhythm.
|
|
58
|
+
- **Do not use bounce or elastic easing.** Real objects decelerate smoothly, so use an exponential
|
|
59
|
+
ease-out.
|
|
60
|
+
- **Do not use a pulsing status dot** unless it is tied to genuinely live, changing data. A static
|
|
61
|
+
indicator with a clear label is honest and calmer.
|
|
62
|
+
|
|
63
|
+
### Imagery
|
|
64
|
+
|
|
65
|
+
- **Do not approximate an organic contour with a geometric mask.** A circle, polygon or
|
|
66
|
+
radial-gradient cutout traced around a photographic subject reads worse than leaving the effect
|
|
67
|
+
out. Derive an alpha matte from the image, or produce a real cut-out asset.
|
|
68
|
+
- **Do not assemble an illustration out of primitive shapes.** A hero-sized inline SVG built from a
|
|
69
|
+
pile of rects and circles reads as placeholder clip art. Icons and data graphics are fine at
|
|
70
|
+
their own scale.
|
|
71
|
+
|
|
72
|
+
### Copy you write
|
|
73
|
+
|
|
74
|
+
- **Do not lean on em dashes.** Commas, colons, periods and parentheses carry the same joins.
|
|
75
|
+
- **No SaaS buzzwords**: streamline, empower, supercharge, unleash, world-class, enterprise-grade,
|
|
76
|
+
next-generation, cutting-edge, best-in-class, industry-leading, seamless, harness the power. Pick
|
|
77
|
+
a specific verb and noun that says what the product literally does.
|
|
78
|
+
- **No aphoristic cadence.** "Not a feature. A platform." and "X. Just Y." are a rhythm, not a
|
|
79
|
+
voice. Once is fine; the pattern is the tell.
|
|
80
|
+
|
|
81
|
+
### Theme
|
|
82
|
+
|
|
83
|
+
- **Default to a light page.** Build a dark theme only when the user asks for it, or `DESIGN.md`
|
|
84
|
+
commits to it. One dark surface on a light page - a popover, a focal panel - is contrast, not a
|
|
85
|
+
theme.
|
|
86
|
+
|
|
87
|
+
## The craft floor
|
|
88
|
+
|
|
89
|
+
These hold whatever the direction is. Each is a check on the built result, judged by looking at
|
|
90
|
+
it, not a number to hit: the right size, measure and spacing depend on how dense the page has to be.
|
|
91
|
+
|
|
92
|
+
### Legibility
|
|
93
|
+
|
|
94
|
+
- **Text reads without effort** at the size, contrast, line length and line height it is set in,
|
|
95
|
+
for the density the page needs. Nothing is so small, so long or so tightly set that reading it is
|
|
96
|
+
work.
|
|
97
|
+
- **Never grey text on a coloured background.** Tint the secondary text from that hue, or use white
|
|
98
|
+
or near-white.
|
|
99
|
+
- **Text does not touch its container or the edge of the viewport.**
|
|
100
|
+
|
|
101
|
+
### Layout and overflow
|
|
102
|
+
|
|
103
|
+
- **No card inside a card.** This is about nesting cards: a card - a container with its own
|
|
104
|
+
background, border or shadow - never holds items that are cards themselves. Inside a card, set the
|
|
105
|
+
members apart with space, faint dividers or type; when the members need to be cards, drop the
|
|
106
|
+
container. A fill that marks a row's state - hover, selected, the current step - is a highlight,
|
|
107
|
+
not a card, and is fine inside one; so are a badge, an input and a button. This holds whatever
|
|
108
|
+
`DESIGN.md` or a precedent suggests.
|
|
109
|
+
- **Content lines up with content.** The text and icons of a row, a menu item or any trigger start
|
|
110
|
+
on the same edge as the heading and text around them. Its hover or selected background is what
|
|
111
|
+
gives way: it may reach past the container's padding, so the content never shifts inward to make
|
|
112
|
+
room for it.
|
|
113
|
+
- **Nothing overflows its container.** Let text wrap, constrain the width, or give the region a
|
|
114
|
+
deliberate scroll affordance.
|
|
115
|
+
- **A secondary card's description stops at three lines.** Past that, it ends in an ellipsis with a
|
|
116
|
+
"more" control beside it that expands the full text in place. The main content of a page is not
|
|
117
|
+
cut short this way.
|
|
118
|
+
- **A clipping container does not swallow a popover.** Tooltips, menus and popovers that need to
|
|
119
|
+
escape must not sit inside `overflow: hidden`.
|
|
120
|
+
- **Cards in a horizontal scroller keep the same inset on both sides**, so their edges and rounded
|
|
121
|
+
corners are not cut off at rest.
|
|
122
|
+
- **Animate transform and opacity, not layout.** Width, height, padding and margin cause layout
|
|
123
|
+
thrash; use `grid-template-rows` for a height change.
|
|
124
|
+
|
|
125
|
+
## The project's design system
|
|
126
|
+
|
|
127
|
+
Start from the language `DESIGN.md` describes and the design system's tokens. Keep to the tokens
|
|
128
|
+
as closely as the system is complete: a full system is the product's language, a sparse one only a
|
|
129
|
+
hint. A value that keeps coming up becomes a token in the system; the document is not edited for
|
|
130
|
+
it.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Write the project's PRODUCT.md
|
|
2
|
+
|
|
3
|
+
> Only for a turn whose prompt says 增強設計 (the design harness) is on for it, or a request that
|
|
4
|
+
> asks for it by name. In any other turn, handle the request as if you had never read this file.
|
|
5
|
+
|
|
6
|
+
## What this file is
|
|
7
|
+
|
|
8
|
+
`PRODUCT.md` at the project root captures durable product truth: who the product is for and what
|
|
9
|
+
job they are doing, what it makes possible, what position it holds, and what future work must
|
|
10
|
+
preserve. It outlives any particular screen, and every later design decision is measured against
|
|
11
|
+
it.
|
|
12
|
+
|
|
13
|
+
It does not invent a visual world and it does not write `DESIGN.md`. Palettes, typography,
|
|
14
|
+
components, page concepts, and how the product should feel belong to `DESIGN.md`; none of that is
|
|
15
|
+
asked about or written here.
|
|
16
|
+
|
|
17
|
+
This works with or without a review session. The evidence is the project itself. A running page,
|
|
18
|
+
when one is open, is one more thing to read, not a requirement.
|
|
19
|
+
|
|
20
|
+
## Step 1: Load current state
|
|
21
|
+
|
|
22
|
+
Look for `PRODUCT.md` at the project root.
|
|
23
|
+
|
|
24
|
+
- **No `PRODUCT.md`:** explore, interview, and write it (steps 2-4).
|
|
25
|
+
- **`PRODUCT.md` exists:** leave it. Say so in one line and go on with what you were asked to do.
|
|
26
|
+
- **Only `DESIGN.md` exists:** leave it untouched and create `PRODUCT.md` (steps 2-4).
|
|
27
|
+
|
|
28
|
+
Never silently overwrite an existing file, and never offer `DESIGN.md` during this work. If
|
|
29
|
+
another request invoked this, finish `PRODUCT.md` first, then resume it.
|
|
30
|
+
|
|
31
|
+
## Step 2: Explore the project
|
|
32
|
+
|
|
33
|
+
Before asking anything, scan what the project already says about itself:
|
|
34
|
+
|
|
35
|
+
- brand and product assets, docs, and copy: README, product docs, marketing copy, the strings in
|
|
36
|
+
the source, and the rendered page when one is running;
|
|
37
|
+
- app boundaries, features, workflows, routes, and roles;
|
|
38
|
+
- names, logos, legal and proof assets, and existing brand commitments.
|
|
39
|
+
|
|
40
|
+
Treat everything you find as a hypothesis about the user's intent, not as their answer. The
|
|
41
|
+
exploration gives you context; the interview settles which of it is real product truth.
|
|
42
|
+
|
|
43
|
+
## Step 3: Interview for product truth
|
|
44
|
+
|
|
45
|
+
Ask the user about what you observed or inferred, and confirm the real product truth. A fact with
|
|
46
|
+
strong evidence needs no question - a distinctive logo, a clearly defined document - so record
|
|
47
|
+
those as product truth rather than spending the user's attention on them.
|
|
48
|
+
|
|
49
|
+
Use the structured question tool when available; otherwise ask and wait. Keep rounds to at most
|
|
50
|
+
three focused questions and require one real answer or approval round before writing a new
|
|
51
|
+
`PRODUCT.md`. Confirm inferences.
|
|
52
|
+
|
|
53
|
+
The interview exists to settle three things. They are goals, not questions to read out:
|
|
54
|
+
|
|
55
|
+
1. Who the primary user is, in what situation, and what job they are doing.
|
|
56
|
+
2. What the product makes possible, and its meaningfully different mechanism or position.
|
|
57
|
+
3. What durable constraints, assets, evidence, or product facts future work must preserve.
|
|
58
|
+
|
|
59
|
+
Find the answers wherever they are: what the exploration settled is recorded, and only what it
|
|
60
|
+
left open is asked, in questions you write for this project. Start with the open unknowns that
|
|
61
|
+
most change future product decisions.
|
|
62
|
+
|
|
63
|
+
Do not ask about aesthetic direction, emotional feel, visual references, colors, typography, or
|
|
64
|
+
style. If the user volunteers a binding visual constraint, record it under Brand Commitments as
|
|
65
|
+
stated; do not develop it.
|
|
66
|
+
|
|
67
|
+
### What belongs in PRODUCT.md
|
|
68
|
+
|
|
69
|
+
- users, jobs, workflows, purpose, success, positioning, and operating context;
|
|
70
|
+
- capabilities, constraints, terminology, evidence, platform, and accessibility;
|
|
71
|
+
- confirmed voice, assets, and brand commitments.
|
|
72
|
+
|
|
73
|
+
### What does not belong
|
|
74
|
+
|
|
75
|
+
- visual worlds, palettes, typography, components, or page concepts;
|
|
76
|
+
- visitor mode, narrative, CTA/proof sequence, or other surface strategy;
|
|
77
|
+
- invented testimonials, customers, benchmarks, pricing, licensing, or deployment claims;
|
|
78
|
+
- a requirement to decide every optional field.
|
|
79
|
+
|
|
80
|
+
## Step 4: Write PRODUCT.md
|
|
81
|
+
|
|
82
|
+
Write only confirmed facts and explicitly marked open decisions. Omit a section you have nothing
|
|
83
|
+
real for rather than filling it with generic prose.
|
|
84
|
+
|
|
85
|
+
```markdown
|
|
86
|
+
# Product
|
|
87
|
+
|
|
88
|
+
## Users
|
|
89
|
+
[Primary users, their situation, and job. Add other audiences only when confirmed.]
|
|
90
|
+
|
|
91
|
+
## Product Purpose
|
|
92
|
+
[What the product does, why it exists, and what success means.]
|
|
93
|
+
|
|
94
|
+
## Positioning
|
|
95
|
+
[The product mechanism or claim a neighboring product could not truthfully copy.]
|
|
96
|
+
|
|
97
|
+
## Operating Context
|
|
98
|
+
[Workflows, environments, tools, documents, materials, and rituals that are factual parts of using
|
|
99
|
+
or evaluating the product.]
|
|
100
|
+
|
|
101
|
+
## Capabilities and Constraints
|
|
102
|
+
[Confirmed functionality, technical constraints, terminology, and explicitly undecided product
|
|
103
|
+
facts.]
|
|
104
|
+
|
|
105
|
+
## Brand Commitments
|
|
106
|
+
[Existing name, voice, assets, personality, identity constraints, and references the user
|
|
107
|
+
explicitly made binding. Omit when none exist.]
|
|
108
|
+
|
|
109
|
+
## Evidence on Hand
|
|
110
|
+
[Real content, data, demonstrations, testimonials, case studies, press, or assets, with paths where
|
|
111
|
+
applicable. State absences that future work must not fabricate.]
|
|
112
|
+
|
|
113
|
+
## Product Principles
|
|
114
|
+
[Three to five durable strategic principles derived from confirmed answers; no visual recipes.]
|
|
115
|
+
|
|
116
|
+
## Accessibility & Inclusion
|
|
117
|
+
[Known user needs or required standard. Omit when no product-specific requirement was
|
|
118
|
+
established.]
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Write it to `PROJECT_ROOT/PRODUCT.md`. It is finished before any visual-world or surface-concept
|
|
122
|
+
work begins.
|
|
123
|
+
|
|
124
|
+
## Step 5: Wrap up or resume
|
|
125
|
+
|
|
126
|
+
Tell the user in two or three lines which product facts are now captured, which were confirmed,
|
|
127
|
+
and which are marked open. When this step runs as part of a larger request - a setup turn, or a batch that needed it first - skip this and let that request's reply cover it. Then end, or resume the request that invoked this.
|