synthesisui 0.16.153 → 0.16.155
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/dist/absorb-plan.js +154 -0
- package/dist/commands/absorb.js +211 -0
- package/dist/commands/doctor.js +117 -14
- package/dist/commands/import.js +34 -0
- package/dist/commands/init.js +14 -0
- package/dist/commands/summary.js +79 -0
- package/dist/config.js +54 -0
- package/dist/doctor/frozen.js +13 -1
- package/dist/doctor/variant-read.js +86 -12
- package/dist/index.js +71 -0
- package/dist/measured-scope.js +63 -0
- package/dist/skill-init.js +92 -33
- package/package.json +1 -1
package/dist/skill-init.js
CHANGED
|
@@ -32,20 +32,22 @@ visual, semantic and functional parity, without supposing and without inventing
|
|
|
32
32
|
|
|
33
33
|
## THE SHAPE OF THIS RUN, AND WHY IT IS THIS SHAPE
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Five questions, asked before anything that needs an answer. Then silence, then four lines.
|
|
36
36
|
|
|
37
37
|
\`\`\`
|
|
38
38
|
1 environment which agent they work in - and what that agent can actually get
|
|
39
39
|
2 authorisation may we optimise after importing, and which parts
|
|
40
40
|
3 project WHICH folder becomes the system (the only unavoidable choice)
|
|
41
41
|
4 identity name, primary, theme - each already answered by the census
|
|
42
|
+
5 intent adopting the system, or migrating design INTO it
|
|
43
|
+
(+ where absorbed values live, only if they are migrating)
|
|
42
44
|
---- nobody waits from here on ----
|
|
43
|
-
import
|
|
44
|
-
|
|
45
|
+
init -> import -> freeze -> apply what they authorised -> four lines
|
|
46
|
+
6 offer the two lines that wire it up
|
|
45
47
|
\`\`\`
|
|
46
48
|
|
|
47
49
|
**Every question is asked before the work, and the work starts during the questions.** A person who
|
|
48
|
-
answers
|
|
50
|
+
answers five things in ninety seconds and then watches one bar has had a good four minutes; the same
|
|
49
51
|
person interrupted twice mid-silence has had a bad twenty (dono, 01/08).
|
|
50
52
|
|
|
51
53
|
**What runs in parallel, precisely.** The UNSCOPED census - \`npx synthesisui import --dry\` - needs no
|
|
@@ -161,6 +163,59 @@ in the \`sui-import-ds\` skill; do not reinvent it here, and do not ask anything
|
|
|
161
163
|
|
|
162
164
|
---
|
|
163
165
|
|
|
166
|
+
## 5. INTENT
|
|
167
|
+
|
|
168
|
+
The one question the census cannot answer, and the only one whose answer changes what a later command
|
|
169
|
+
puts first.
|
|
170
|
+
|
|
171
|
+
\`\`\`
|
|
172
|
+
What are you doing with this system?
|
|
173
|
+
|
|
174
|
+
Adopting it (recommended) make the code use the system. The doctor leads with the
|
|
175
|
+
values your system already names - those have a one-line
|
|
176
|
+
fix, and \`doctor --fix\` does them.
|
|
177
|
+
Migrating into it you are moving design out of your apps and into the shared
|
|
178
|
+
package. The doctor leads with the values your system does
|
|
179
|
+
NOT name yet, by frequency - those are the tokens the
|
|
180
|
+
library still has to absorb.
|
|
181
|
+
\`\`\`
|
|
182
|
+
|
|
183
|
+
Both lists exist in both modes. The answer decides the ORDER, and the order decides what somebody
|
|
184
|
+
does first - measured on a real monorepo (dono, 06/08): with no intent declared, four of the five
|
|
185
|
+
suggestions came out of a consumer app, led by a colour that does not belong to the system's palette
|
|
186
|
+
at all. The same number is noise under one intent and the strongest candidate in the repo under the
|
|
187
|
+
other.
|
|
188
|
+
|
|
189
|
+
Pass the answer straight through:
|
|
190
|
+
|
|
191
|
+
\`\`\`
|
|
192
|
+
npx synthesisui@latest init --intent adopt (or --intent migrate)
|
|
193
|
+
\`\`\`
|
|
194
|
+
|
|
195
|
+
**One follow-up, and ONLY when they chose migrating.** Absorbing is what a migration does; asking an
|
|
196
|
+
adopter where absorbed values would go is asking about a command they will not run this month.
|
|
197
|
+
|
|
198
|
+
\`\`\`
|
|
199
|
+
When your system absorbs a value, where should it live?
|
|
200
|
+
|
|
201
|
+
In the system (recommended) it becomes a token of the design system, and the
|
|
202
|
+
tokens.css it generates starts emitting it
|
|
203
|
+
In your own CSS we hand you the block and you paste it into your
|
|
204
|
+
vocabulary; the next import reads it back as a
|
|
205
|
+
token you declared
|
|
206
|
+
\`\`\`
|
|
207
|
+
|
|
208
|
+
Then \`--absorb system\` or \`--absorb code\` on the same \`init\`. Both answers are real: the second exists
|
|
209
|
+
because in some teams the canonical vocabulary IS their stylesheet, and in that case our part is to hand
|
|
210
|
+
over the snippet - never to write in their file.
|
|
211
|
+
|
|
212
|
+
**Run \`init\` even when nothing else needs it.** It writes \`_synthesisui/config.json\` - the committed
|
|
213
|
+
file that holds \`target\`, \`pagesDir\`, \`componentsDir\`, \`styles\` and this intent - and until 06/08 this
|
|
214
|
+
run never called it: a full first run left no config at all, so \`template\` and \`component\` fell back to
|
|
215
|
+
defaults and the intent had nowhere to live (dono, 06/08).
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
164
219
|
## THE SILENT PART
|
|
165
220
|
|
|
166
221
|
Now nobody is asked anything.
|
|
@@ -209,46 +264,46 @@ answers 400, and a 400 in a first run reads as a broken product.
|
|
|
209
264
|
|
|
210
265
|
---
|
|
211
266
|
|
|
212
|
-
##
|
|
267
|
+
## 6. THE FOUR LINES
|
|
213
268
|
|
|
214
|
-
This is the whole point of the run
|
|
269
|
+
This is the whole point of the run, and **it is not yours to compose.** Run this and print nothing
|
|
270
|
+
else:
|
|
215
271
|
|
|
216
272
|
\`\`\`
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
v2 is frozen: your system exactly as your code has it today. It never moves.
|
|
220
|
-
v3 is what you are looking at - the same system with 118 deterministic fixes: contrast on
|
|
221
|
-
text only, lengths onto your own scale, near-identical colours unified.
|
|
222
|
-
|
|
223
|
-
Back to v2 is one click: /dashboard/mine/signalui/publish
|
|
273
|
+
npx synthesisui@latest summary <slug> --base <base> --draft <draft> --fixes <how many>
|
|
224
274
|
\`\`\`
|
|
225
275
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
v3. Proved against production before this skill ever ran (05/08) - and a first screen that points at
|
|
230
|
-
the wrong version to restore is worse than no version at all.
|
|
276
|
+
It prints their component count, their own token count, where the system was read from, the two
|
|
277
|
+
versions with the way back, and the one thing to do next. The numbers for \`--base\` and \`--draft\` come
|
|
278
|
+
from the \`optimize\` RESPONSE - never invented here, because the platform is what numbers a version.
|
|
231
279
|
|
|
232
|
-
**
|
|
233
|
-
|
|
234
|
-
|
|
280
|
+
**Why a command instead of four lines you write.** The last screen of this run has ended long, more
|
|
281
|
+
than once - up to four hundred words, with three of its four paragraphs about the AGENT rather than
|
|
282
|
+
about their system: notes from a previous session, a generator that had been deleted and rebuilt, a
|
|
283
|
+
regression stripped by hand. Two of those notes were also out of date, which is worse than verbose: it
|
|
284
|
+
warned somebody about defects that no longer existed (dono, 06/08).
|
|
235
285
|
|
|
236
|
-
|
|
237
|
-
|
|
286
|
+
The pull to report your own work at the end of a long job beats a rule written sixty lines earlier. So
|
|
287
|
+
the rule became a program. What you have in hand when the run ends - your notes, your retries, your
|
|
288
|
+
repairs - has no way into a block that a command prints.
|
|
238
289
|
|
|
239
|
-
|
|
290
|
+
**Anything you think belongs on that screen and is not in the command's output does not belong on that
|
|
291
|
+
screen.** If it is a real finding, it is already in the report or in the causes screen; if it is about
|
|
292
|
+
what you did, it is not theirs.
|
|
240
293
|
|
|
241
|
-
|
|
294
|
+
## 7. THE OFFER
|
|
242
295
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
296
|
+
There is exactly one thing to offer, and it is not the fix: it is the two lines that wire the system
|
|
297
|
+
up. Until a stylesheet imports the tokens and an element carries \`data-ds\`, none of the tokens reach
|
|
298
|
+
the browser.
|
|
246
299
|
|
|
247
|
-
|
|
248
|
-
\`\`\`
|
|
300
|
+
\`summary\` already prints both. Say nothing more about them.
|
|
249
301
|
|
|
250
|
-
|
|
251
|
-
|
|
302
|
+
**Never offer \`doctor --fix\` here.** It was offered for a while, with the number of values that have a
|
|
303
|
+
token - and on an unwired project that swap points hundreds of literals at variables the browser
|
|
304
|
+
cannot resolve, so the declarations are dropped and the page changes (dono, 06/08: 210 values, in a
|
|
305
|
+
project where neither line was in place). The doctor itself now refuses in that state, and it is the
|
|
306
|
+
right place for the offer: it can see the wiring, and this run cannot see what they do after it ends.
|
|
252
307
|
|
|
253
308
|
---
|
|
254
309
|
|
|
@@ -261,6 +316,10 @@ short.
|
|
|
261
316
|
- **Never applies an optimisation without a frozen v1**, and never reports one without the way back.
|
|
262
317
|
- **Never claims parity between agents.** The post-write check exists in one of them. Saying
|
|
263
318
|
otherwise is the kind of sentence that ends a trial.
|
|
264
|
-
- **Never ends long.** If the last screen needs scrolling, the run failed at the last step.
|
|
319
|
+
- **Never ends long.** If the last screen needs scrolling, the run failed at the last step. The last
|
|
320
|
+
screen is \`summary\`'s output and nothing else - see section 6 for why that stopped being a rule and
|
|
321
|
+
became a command.
|
|
322
|
+
- **Never offers a fix that the wiring blocks.** A swap to tokens that do not reach the browser
|
|
323
|
+
changes the page, and it would be our command that changed it.
|
|
265
324
|
`;
|
|
266
325
|
export const INIT_SKILL_PATH = ".claude/skills/sui-init/SKILL.md";
|
package/package.json
CHANGED