synthesisui 0.15.0 → 0.16.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.
Files changed (2) hide show
  1. package/dist/claude-md.js +39 -6
  2. package/package.json +1 -1
package/dist/claude-md.js CHANGED
@@ -86,6 +86,30 @@ async function readManifest(projectRoot, ds) {
86
86
  return null;
87
87
  }
88
88
  }
89
+ /**
90
+ * The loop that closes itself, and the one paragraph both kinds of system share.
91
+ *
92
+ * The contract said what to write and never said to check, so verification
93
+ * happened days later, by a human, across a whole repo - archaeology rather
94
+ * than a fix. `doctor <file> --verbose` already existed; nobody was pointing
95
+ * the agent at it.
96
+ *
97
+ * Held in one constant on purpose: the same paragraph typed into two template
98
+ * literals is two paragraphs that drift.
99
+ */
100
+ const SELF_CHECK = `
101
+
102
+ **After writing or editing any UI file, check it before moving on:**
103
+
104
+ npx synthesisui@latest doctor <the file you just wrote> --verbose
105
+
106
+ It names the token for every hardcoded value it finds. Fix what it names, run it
107
+ again, and only then move to the next thing. Do not batch this up for the end -
108
+ a component checked while you still have its context is a two-line fix; the same
109
+ component found in a repo-wide audit next week is an archaeology exercise.
110
+
111
+ If it reports a value with no token, do NOT invent one. Say which value and what
112
+ you would call it, and let a person decide.`;
89
113
  async function renderRegion(projectRoot, installed) {
90
114
  if (installed.length === 0) {
91
115
  return `${START}\n${END}`;
@@ -111,15 +135,24 @@ async function renderRegion(projectRoot, installed) {
111
135
  project's OWN custom properties, exactly as the guide lists them. Do not write raw colours,
112
136
  spacings or radii that a token already covers, and do not invent a new token silently - say so
113
137
  instead, because a new token is a decision for a person to make. There is no component
114
- manifest for an adopted system - the tokens ARE the contract. Run \`synthesisui doctor\` to see
115
- how much of the shipped UI already resolves to them.`
138
+ manifest for an adopted system - the tokens ARE the contract.${SELF_CHECK}`
116
139
  : `**When creating or editing components, read the system's GUIDE.md and follow it:** use only semantic tokens
117
140
  (\`var(--ds-color-semantic-*)\`, \`--ds-spacing-*\`, etc.), scope the UI with \`data-ds="<slug>"\`,
118
- and reuse the \`.ds-*\` classes. Do not use raw values outside the system's scale. **Before
119
- creating any UI element, check the component manifest below - if it exists, use or extend
120
- it (\`synthesisui component <slug> <name>\` materializes it as your code).** To review a
141
+ and reuse the \`.ds-*\` classes. Do not use raw values outside the system's scale.
142
+
143
+ **Before creating any UI element, look it up in the manifest below.** If something there
144
+ already covers the purpose, do not write it from scratch - run
145
+
146
+ npx synthesisui@latest component <slug> <name>
147
+
148
+ YOURSELF. It materializes that component as real typed code in this project, and you use and
149
+ extend that. The person who asked you for a feature should never have to know these command
150
+ names or type them; finding the right component is your job, not theirs.
151
+
152
+ Only write something new when nothing in the manifest covers the purpose - and when you do,
153
+ say which entry you considered and why it did not fit. To review a
121
154
  component, create an isolated sample page (e.g. \`app/synthesisui-samples/<component>/\`) - do not
122
- apply it to real production pages unless asked.`;
155
+ apply it to real production pages unless asked.${SELF_CHECK}`;
123
156
  const body = `## Design Systems (via SynthesisUI)
124
157
 
125
158
  This project uses design system(s) tracked by the \`synthesisui\` CLI. ${rule}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synthesisui",
3
- "version": "0.15.0",
3
+ "version": "0.16.1",
4
4
  "description": "Bring SynthesisUI design systems into any project - tokens, typed components, whole pages and an agent-ready CLAUDE.md manifest.",
5
5
  "type": "module",
6
6
  "bin": {