synthesisui 0.11.0 → 0.11.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.
@@ -375,6 +375,7 @@ export async function doctor(opts) {
375
375
  console.log(body("complains - the surface just stays put when the scheme"));
376
376
  console.log(body("moves around it."));
377
377
  }
378
+ const frozenAt = new Set(frozen.map((f) => `${f.component}:${f.where.split(" · ").pop()}`));
378
379
  if (overrides.length > 0) {
379
380
  // An override on a property the component's own law FORBIDS, written as a
380
381
  // reset, is not drift - it is the author keeping a promise the recipe
@@ -465,6 +466,13 @@ export async function doctor(opts) {
465
466
  ? " ↑ removes it rather than replacing it"
466
467
  : " ↑ a raw value, not a token");
467
468
  }
469
+ // The recipe froze this binding at a primitive and the author reached
470
+ // for a ROLE. Theirs follows the scheme; the recipe's does not. Listing
471
+ // that as an infraction is the same unfairness as the law case above.
472
+ if (frozenAt.has(`${o.component}:${o.prop}`) &&
473
+ /var\(\s*--ds-color-semantic-/.test(o.wrote)) {
474
+ console.log(" ✓ the recipe is frozen here; yours names a role");
475
+ }
468
476
  const kept = lawKept(o);
469
477
  if (kept) {
470
478
  console.log(` ✓ but the law says: "${kept}"`);
@@ -510,6 +518,23 @@ export async function doctor(opts) {
510
518
  for (const line of verdict(d, hasSystem, overrides.length, conflictsInUse.length))
511
519
  console.log(line);
512
520
  console.log("");
513
- if (opts.strict && (d.findings.length > 0 || overrides.length > 0))
514
- process.exitCode = 1;
521
+ if (opts.strict) {
522
+ const mine = d.findings.length > 0 || overrides.length > 0;
523
+ // The two system lenses are deliberately NOT in here by default. A team
524
+ // that installed someone else's system cannot fix its self-contradiction
525
+ // by editing this repo, and failing their build for it punishes the wrong
526
+ // person. It still prints, so a CI log carries it upstream. Anyone who
527
+ // authors their own system wants the opposite, and asks for it.
528
+ const theirs = conflictsInUse.length + frozen.length;
529
+ if (opts.strictSystem && theirs > 0) {
530
+ console.log(body(`--strict-system: ${theirs} problem(s) in the system itself. Failing.`));
531
+ process.exitCode = 1;
532
+ }
533
+ else if (theirs > 0) {
534
+ console.log(body(`${theirs} problem(s) above are in the system, not this repo - not failing.`));
535
+ console.log(body("Run with --strict-system if the system is yours."));
536
+ }
537
+ if (mine)
538
+ process.exitCode = 1;
539
+ }
515
540
  }
package/dist/index.js CHANGED
@@ -52,7 +52,8 @@ Options:
52
52
  --instruction <s> refit: extra guidance for the adaptation
53
53
  --dry refit: adapt and print, but save nothing
54
54
  --force clean: apply the changes (without it, dry run)
55
- --strict doctor: exit 1 when drift is found (for CI)
55
+ --strict doctor: exit 1 when drift is found in THIS repo (for CI)
56
+ --strict-system doctor: also exit 1 when the system itself is inconsistent
56
57
  --all doctor: list every finding, not just the loudest files
57
58
  --laws doctor: show every usage law, not just the busiest components
58
59
  --out <path> output path for the generated template (default: <pagesDir>/<file>)
@@ -126,7 +127,8 @@ async function main() {
126
127
  await doctor({
127
128
  dir,
128
129
  scopes: args,
129
- strict: flags.strict === true,
130
+ strict: flags.strict === true || flags["strict-system"] === true,
131
+ strictSystem: flags["strict-system"] === true,
130
132
  all: flags.all === true,
131
133
  laws: flags.laws === true,
132
134
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synthesisui",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
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": {