@motion-proto/live-tokens 0.78.0 → 0.79.0

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 (166) hide show
  1. package/.claude/skills/live-tokens-check-compliance/SKILL.md +60 -31
  2. package/.claude/skills/live-tokens-create-component/SKILL.md +23 -28
  3. package/.claude/skills/live-tokens-create-component/references/contract-tests.md +61 -0
  4. package/.claude/skills/live-tokens-create-component/references/sketch-mode.md +2 -2
  5. package/.claude/skills/live-tokens-create-component/references/token-naming.md +6 -15
  6. package/.claude/skills/live-tokens-create-page/SKILL.md +6 -4
  7. package/.claude/skills/live-tokens-create-theme/references/design-directions.md +1 -1
  8. package/.claude/skills/live-tokens-pick-component/SKILL.md +3 -3
  9. package/.claude/skills/live-tokens-set-colors/references/color-anchors.md +1 -1
  10. package/.claude/skills/live-tokens-set-geometry/SKILL.md +1 -1
  11. package/.claude/skills/live-tokens-set-geometry/references/geometry-anchors.md +1 -1
  12. package/CHANGELOG.md +231 -0
  13. package/README.md +9 -15
  14. package/bin/check-component.mjs +152 -551
  15. package/bin/check-page.mjs +55 -541
  16. package/bin/cli.mjs +59 -13
  17. package/bin/contractRunner.mjs +37 -91
  18. package/bin/lib/catalogue.mjs +161 -34
  19. package/bin/lib/componentSource.mjs +152 -0
  20. package/bin/lib/cssValues.mjs +9 -0
  21. package/bin/lib/dataDir.mjs +126 -0
  22. package/bin/lib/findings.mjs +103 -12
  23. package/bin/lib/fixers.mjs +64 -0
  24. package/bin/lib/geometry.mjs +92 -0
  25. package/bin/lib/pageSource.mjs +230 -0
  26. package/bin/lib/report.mjs +57 -59
  27. package/bin/lib/tokenVocabulary.mjs +104 -34
  28. package/bin/rules/componentStructure.mjs +344 -0
  29. package/bin/rules/componentUse.mjs +313 -0
  30. package/bin/rules/importsAndRoutes.mjs +136 -0
  31. package/bin/rules/testRuns.mjs +122 -0
  32. package/bin/rules/tokens.mjs +363 -0
  33. package/bin/setup-claude.mjs +1 -2
  34. package/dist-plugin/{chunk-PDNL4NC5.js → chunk-D4WRIKEZ.js} +7 -2
  35. package/dist-plugin/{chunk-SWXRVZKT.js → chunk-REBHE3ZM.js} +414 -1
  36. package/dist-plugin/index.cjs +432 -15
  37. package/dist-plugin/index.js +8 -9
  38. package/dist-plugin/migrateData/index.cjs +422 -4
  39. package/dist-plugin/migrateData/index.js +2 -2
  40. package/dist-plugin/setColors/index.cjs +414 -1
  41. package/dist-plugin/setColors/index.d.cts +1 -1
  42. package/dist-plugin/setColors/index.d.ts +1 -1
  43. package/dist-plugin/setColors/index.js +1 -1
  44. package/dist-plugin/setGeometry/index.cjs +423 -13
  45. package/dist-plugin/setGeometry/index.d.cts +3 -3
  46. package/dist-plugin/setGeometry/index.d.ts +3 -3
  47. package/dist-plugin/setGeometry/index.js +10 -13
  48. package/dist-plugin/setType/index.d.cts +1 -1
  49. package/dist-plugin/setType/index.d.ts +1 -1
  50. package/dist-plugin/{themeTypes-BxRtuN5V.d.cts → themeTypes-B8_Idrp4.d.cts} +2 -2
  51. package/dist-plugin/{themeTypes-BxRtuN5V.d.ts → themeTypes-B8_Idrp4.d.ts} +2 -2
  52. package/package.json +2 -2
  53. package/src/editor/component-editor/CalloutEditor.svelte +2 -2
  54. package/src/editor/component-editor/CollapsibleSectionEditor.svelte +14 -15
  55. package/src/editor/component-editor/CornerBadgeEditor.svelte +14 -14
  56. package/src/editor/component-editor/DialogEditor.svelte +5 -5
  57. package/src/editor/component-editor/InlineEditActionsEditor.svelte +2 -2
  58. package/src/editor/component-editor/RadioButtonEditor.svelte +21 -21
  59. package/src/editor/component-editor/SectionDividerEditor.svelte +7 -7
  60. package/src/editor/component-editor/SegmentedControlEditor.svelte +5 -5
  61. package/src/editor/component-editor/SideNavigationEditor.svelte +25 -25
  62. package/src/editor/component-editor/TabBarEditor.svelte +6 -6
  63. package/src/editor/component-editor/TableEditor.svelte +6 -6
  64. package/src/editor/component-editor/ToggleEditor.svelte +2 -2
  65. package/src/editor/component-editor/index.ts +3 -0
  66. package/src/editor/component-editor/registry.ts +57 -1
  67. package/src/editor/component-editor/scaffolding/TokenLayout.svelte +14 -14
  68. package/src/editor/component-editor/scaffolding/VariantGroup.svelte +3 -0
  69. package/src/editor/component-editor/scaffolding/types.ts +15 -0
  70. package/src/editor/core/components/adjustAliases.ts +4 -4
  71. package/src/editor/core/components/aliasKinds.ts +20 -19
  72. package/src/editor/core/sketch/sketchLayer.ts +3 -3
  73. package/src/editor/core/themes/migrateComponentConfig.ts +14 -6
  74. package/src/editor/core/themes/migrations/2026-09-13-badge-brand.ts +42 -0
  75. package/src/editor/core/themes/migrations/2026-09-13-collapsiblesection-open.ts +33 -0
  76. package/src/editor/core/themes/migrations/2026-09-13-cornerbadge-prefix.ts +70 -0
  77. package/src/editor/core/themes/migrations/2026-09-13-hairline.ts +92 -0
  78. package/src/editor/core/themes/migrations/2026-09-13-indicator.ts +54 -0
  79. package/src/editor/core/themes/migrations/2026-09-13-sectiondivider-surface.ts +36 -0
  80. package/src/editor/core/themes/migrations/2026-09-13-selected-state.ts +124 -0
  81. package/src/editor/core/themes/migrations/2026-09-13-toggle-label.ts +31 -0
  82. package/src/editor/core/themes/migrations/index.ts +16 -0
  83. package/src/editor/core/themes/themeService.ts +3 -3
  84. package/src/editor/core/themes/themeTypes.ts +13 -15
  85. package/src/editor/docs/Docs.svelte +1 -1
  86. package/src/editor/docs/content/light-and-dark.md +3 -3
  87. package/src/editor/docs/content.generated.ts +1 -1
  88. package/src/editor/index.ts +1 -0
  89. package/src/editor/overlay/LiveEditorOverlay.svelte +15 -0
  90. package/src/editor/skill-atlas/SkillAtlas.svelte +4 -4
  91. package/src/editor/skill-atlas/TreeNodeCard.svelte +4 -4
  92. package/src/editor/skill-atlas/skillSources.generated.ts +11 -14
  93. package/src/editor/skill-atlas/skillTrees.ts +1 -3
  94. package/src/editor/skill-atlas/trees/check-compliance.ts +258 -93
  95. package/src/editor/skill-atlas/trees/create-component.ts +73 -62
  96. package/src/editor/skill-atlas/trees/create-page.ts +38 -17
  97. package/src/editor/skill-atlas/trees/pick-component.ts +3 -3
  98. package/src/editor/skill-atlas/trees/set-geometry.ts +1 -1
  99. package/src/editor/ui/UIPaletteSelector.svelte +11 -15
  100. package/src/editor/ui/variantScales.ts +8 -8
  101. package/src/live-tokens/data/themes/autumn.json +188 -188
  102. package/src/live-tokens/data/themes/halloween.json +188 -188
  103. package/src/live-tokens/data/themes/midnight-study.json +245 -245
  104. package/src/live-tokens/data/themes/ocean.json +188 -188
  105. package/src/live-tokens/data/themes/royal-velvet.json +188 -188
  106. package/src/live-tokens/data/themes/sketchy.json +188 -188
  107. package/src/live-tokens/data/themes/spring-meadow.json +188 -188
  108. package/src/live-tokens/data/themes/sunset.json +188 -188
  109. package/src/system/components/Badge.svelte +27 -23
  110. package/src/system/components/Button.svelte +13 -7
  111. package/src/system/components/Callout.svelte +16 -11
  112. package/src/system/components/Card.svelte +22 -15
  113. package/src/system/components/CodeSnippet.svelte +10 -6
  114. package/src/system/components/CollapsibleSection.svelte +68 -63
  115. package/src/system/components/CornerBadge.svelte +78 -72
  116. package/src/system/components/Dialog.svelte +21 -18
  117. package/src/system/components/IconButton.svelte +13 -9
  118. package/src/system/components/Image.svelte +14 -8
  119. package/src/system/components/ImageLightbox.svelte +10 -6
  120. package/src/system/components/InlineEditActions.svelte +17 -14
  121. package/src/system/components/Input.svelte +13 -7
  122. package/src/system/components/MenuSelect.svelte +13 -7
  123. package/src/system/components/Notification.svelte +17 -11
  124. package/src/system/components/Panel.svelte +13 -6
  125. package/src/system/components/ProgressBar.svelte +10 -5
  126. package/src/system/components/RadioButton.svelte +33 -30
  127. package/src/system/components/SectionDivider.svelte +28 -21
  128. package/src/system/components/SegmentedControl.svelte +27 -23
  129. package/src/system/components/SideNavigation.svelte +175 -171
  130. package/src/system/components/Slider.svelte +11 -7
  131. package/src/system/components/TabBar.svelte +53 -49
  132. package/src/system/components/Table.svelte +20 -15
  133. package/src/system/components/Toggle.svelte +14 -10
  134. package/src/system/components/Tooltip.svelte +10 -6
  135. package/src/system/styles/CONVENTIONS.md +3 -4
  136. package/src/testing-js/chunk-3UKGXCDL.js +48 -0
  137. package/src/testing-js/chunk-3UKGXCDL.js.map +1 -0
  138. package/src/testing-js/{chunk-FAFOAWYL.js → chunk-Q3YIAAG3.js} +17 -3
  139. package/src/testing-js/chunk-Q3YIAAG3.js.map +1 -0
  140. package/src/testing-js/{chunk-GNIUPIU2.js → chunk-U7OJE5DU.js} +18 -18
  141. package/src/testing-js/chunk-U7OJE5DU.js.map +1 -0
  142. package/src/testing-js/{chunk-4JQX6WWL.js → chunk-ZMZQZ33J.js} +474 -166
  143. package/src/testing-js/chunk-ZMZQZ33J.js.map +1 -0
  144. package/src/testing-js/component-behavior.contract.js +155 -0
  145. package/src/testing-js/component-behavior.contract.js.map +1 -0
  146. package/src/testing-js/component-editor.contract.js +6 -4
  147. package/src/testing-js/component-editor.contract.js.map +1 -1
  148. package/src/testing-js/component-render.contract.js +14 -10
  149. package/src/testing-js/component-render.contract.js.map +1 -1
  150. package/src/testing-js/index.d.ts +44 -4
  151. package/src/testing-js/index.js +13 -7
  152. package/src/testing-js/index.js.map +1 -1
  153. package/src/testing-js/page-compliance.contract.js +48 -10
  154. package/src/testing-js/page-compliance.contract.js.map +1 -1
  155. package/src/testing-js/registry.contract.js +5 -3
  156. package/src/testing-js/registry.contract.js.map +1 -1
  157. package/src/testing-js/{vitest-C-wNWcoA.d.ts → vitest-BMLIbDs2.d.ts} +8 -2
  158. package/src/testing-js/vitest.d.ts +1 -1
  159. package/src/testing-js/vitest.js +2 -1
  160. package/template/package.json +1 -1
  161. package/.claude/skills/live-tokens-create-component/SKILL copy.md +0 -196
  162. package/.claude/skills/live-tokens-fix-findings/SKILL.md +0 -105
  163. package/src/editor/skill-atlas/trees/fix-findings.ts +0 -504
  164. package/src/testing-js/chunk-4JQX6WWL.js.map +0 -1
  165. package/src/testing-js/chunk-FAFOAWYL.js.map +0 -1
  166. package/src/testing-js/chunk-GNIUPIU2.js.map +0 -1
@@ -7,9 +7,8 @@ import { pickComponent } from './trees/pick-component';
7
7
  import { createPage } from './trees/create-page';
8
8
  import { createComponent } from './trees/create-component';
9
9
  import { checkCompliance } from './trees/check-compliance';
10
- import { fixFindings } from './trees/fix-findings';
11
10
 
12
- // Tab order: the theme route and its three set skills, the page path, then the audit pair.
11
+ // Tab order: the theme route and its three set skills, the page path, then the audit.
13
12
  export const skillTrees: Record<string, SkillTree> = {
14
13
  'create-theme': createTheme,
15
14
  'set-colors': setColors,
@@ -19,5 +18,4 @@ export const skillTrees: Record<string, SkillTree> = {
19
18
  'create-page': createPage,
20
19
  'create-component': createComponent,
21
20
  'check-compliance': checkCompliance,
22
- 'fix-findings': fixFindings,
23
21
  };
@@ -2,182 +2,347 @@ import type { SkillTree } from '../types';
2
2
 
3
3
  export const checkCompliance: SkillTree = {
4
4
  "id": "live-tokens-check-compliance",
5
- "digest": "sha256:6ec5bd44eeee644c",
5
+ "digest": "sha256:7ea9c74741740d5c",
6
6
  "title": "check-compliance",
7
- "tagline": "Check to Ensure Live Tokens Is Used",
7
+ "tagline": "Check and Fix a Project's Use of Live Tokens",
8
8
  "nodes": [
9
9
  {
10
10
  "id": "cc2-trig",
11
11
  "row": 0,
12
12
  "kind": "trigger",
13
- "title": "Review design-system compliance",
14
- "desc": "Checks for correct use of components, properties, and tokens.",
13
+ "title": "Check and fix design-system compliance",
14
+ "desc": "Checks for correct use of components, properties, and tokens, and fixes the project until both checkers exit 0.",
15
15
  "lines": [3, 3],
16
- "anchor": "description: Report an existing project's adherence to @moti"
16
+ "anchor": "description: Check an existing @motion-proto/live-tokens pro"
17
17
  },
18
18
  {
19
19
  "id": "cc2-run",
20
20
  "row": 1,
21
21
  "kind": "cli",
22
22
  "title": "Generate the compliance report",
23
- "desc": "Provides a report of fixes for the fix-findings skill",
24
- "lines": [8, 8],
25
- "anchor": "Run `npx live-tokens report`. The CLI prints a report with t"
23
+ "desc": "One run reads the whole project: pending migrations, component facts, findings, and usage.",
24
+ "lines": [14, 14],
25
+ "anchor": "Run `npx live-tokens report --json`. Read it in its own key "
26
26
  },
27
27
  {
28
28
  "id": "cc2-sections",
29
29
  "row": 2,
30
30
  "kind": "chipset",
31
31
  "title": "Read the report sections",
32
- "desc": "Fixes in the report are listed by section.",
33
- "lines": [19, 19],
34
- "anchor": "Read each section of the report with the Report sections tab",
32
+ "desc": "The report's own key order, from project facts to usage.",
33
+ "lines": [37, 46],
34
+ "anchor": "## Report sections",
35
+ "anchorEnd": "| Project components unused (`usage.customUnused`) | The pro",
35
36
  "chips": [
36
37
  {
37
38
  "label": "Pending token migrations",
38
- "lines": [32, 32],
39
+ "lines": [41, 41],
39
40
  "anchor": "| Pending token migrations (`migrations`) | Whether `tokens."
40
41
  },
42
+ {
43
+ "label": "Component facts",
44
+ "lines": [42, 42],
45
+ "anchor": "| Component facts (`components[]`) | Every component the pro"
46
+ },
41
47
  {
42
48
  "label": "Checker findings by rule",
43
- "lines": [33, 33],
49
+ "lines": [43, 43],
44
50
  "anchor": "| Checker findings by rule (`findings.pages`, `findings.comp"
45
51
  },
46
52
  {
47
- "label": "Tokens a component never reads",
48
- "lines": [34, 34],
49
- "anchor": "| Tokens a component never reads (`components[].unread`) | T"
53
+ "label": "Components each page renders",
54
+ "lines": [44, 44],
55
+ "anchor": "| Components each page renders (`usage.byPage`) | Which comp"
50
56
  },
51
57
  {
52
- "label": "Component registration",
53
- "lines": [35, 35],
54
- "anchor": "| Component registration (`components[].registered`) | Wheth"
58
+ "label": "Shipped components no page renders",
59
+ "lines": [45, 45],
60
+ "anchor": "| Shipped components no page renders (`usage.unusedShipped`)"
55
61
  },
56
62
  {
57
- "label": "Component usage comment",
58
- "lines": [36, 36],
59
- "anchor": "| Component usage comment (`components[].described`) | Wheth"
63
+ "label": "Project components unused",
64
+ "lines": [46, 46],
65
+ "anchor": "| Project components unused (`usage.customUnused`) | The pro"
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "id": "cc2-migrate",
71
+ "row": 3,
72
+ "kind": "cli",
73
+ "title": "Run the token migrations",
74
+ "desc": "Bring tokens.css up to the installed package and heal the data tree. A stale file shows as unknown tokens.",
75
+ "lines": [15, 15],
76
+ "anchor": "Run `npx live-tokens migrate --check` to see the plan, then "
77
+ },
78
+ {
79
+ "id": "cc2-check",
80
+ "row": 4,
81
+ "kind": "cli",
82
+ "title": "Run both checkers",
83
+ "desc": "Each applies every auto repair, checks again, and returns the fixes beside the findings that remain.",
84
+ "lines": [16, 20],
85
+ "anchor": "Run both checkers with `--json`. Each first applies every fi",
86
+ "anchorEnd": "```"
87
+ },
88
+ {
89
+ "id": "cc2-read",
90
+ "row": 5,
91
+ "kind": "chipset",
92
+ "title": "Read what remains",
93
+ "desc": "Every finding left carries its guidance and a repair of choice or authored.",
94
+ "lines": [21, 21],
95
+ "anchor": "Read what remains. Each finding carries the fields under Fin",
96
+ "chips": [
97
+ {
98
+ "label": "guidance",
99
+ "lines": [55, 55],
100
+ "anchor": "| `guidance` | How to make the repair: the token for the rol"
60
101
  },
61
102
  {
62
- "label": "Components each page renders",
63
- "lines": [37, 37],
64
- "anchor": "| Components each page renders (`usage.byPage`) | Which comp"
103
+ "label": "repair",
104
+ "lines": [56, 56],
105
+ "anchor": "| `repair` | `auto`, `choice`, or `authored`. See Repair lev"
65
106
  },
66
107
  {
67
- "label": "Shipped components no page renders",
68
- "lines": [38, 38],
69
- "anchor": "| Shipped components no page renders (`usage.unusedShipped`)"
108
+ "label": "exception",
109
+ "lines": [57, 57],
110
+ "anchor": "| `exception` | The narrower config entry that records a dec"
70
111
  },
71
112
  {
72
- "label": "Project components unregistered or unused",
73
- "lines": [39, 39],
74
- "anchor": "| Project components unregistered or unused (`usage.customUn"
113
+ "label": "details",
114
+ "lines": [58, 58],
115
+ "anchor": "| `details` | Per-rule data the message already states in pr"
75
116
  }
76
117
  ]
77
118
  },
78
119
  {
79
- "id": "cc2-drill-q",
80
- "row": 3,
81
- "kind": "decide",
82
- "title": "Get details",
83
- "desc": "A finding may need more about one component or one token scale, such as space or color.",
84
- "lines": [20, 20],
85
- "anchor": "When a finding needs component or token scale details, run t",
120
+ "id": "cc2-group",
121
+ "row": 6,
122
+ "kind": "step",
123
+ "title": "Group findings by rule",
124
+ "desc": "Errors first, largest group first. Warnings only when the repair scope includes them.",
125
+ "lines": [22, 22],
126
+ "anchor": "Group the findings by rule. Take the largest error group fir"
127
+ },
128
+ {
129
+ "id": "cc2-repair",
130
+ "row": 7,
131
+ "kind": "chipset",
132
+ "title": "Repair from guidance",
133
+ "desc": "Every repair follows its finding's guidance, within the scope rules.",
134
+ "lines": [23, 23],
135
+ "anchor": "Make every repair in the group from its `guidance`, within S",
86
136
  "chips": [
87
137
  {
88
- "label": "component",
89
- "lines": [26, 26],
90
- "anchor": "For one component, run `npx live-tokens components <id>`. Fo"
138
+ "label": "choice",
139
+ "lines": [65, 65],
140
+ "anchor": "**`choice`.** A role or an ambiguous value determines the fi"
141
+ },
142
+ {
143
+ "label": "authored",
144
+ "lines": [66, 66],
145
+ "anchor": "**`authored`.** New code is the fix: a runtime that has to s"
91
146
  },
92
147
  {
93
- "label": "token scale",
94
- "lines": [26, 26],
95
- "anchor": "For one component, run `npx live-tokens components <id>`. Fo"
148
+ "label": "No new tokens",
149
+ "lines": [70, 70],
150
+ "anchor": "Add no token to `tokens.css`. Map a literal with no matching"
96
151
  },
97
152
  {
98
- "label": "continue with classification",
99
- "lines": [21, 21],
100
- "anchor": "Classify each finding as Mechanical, Judgement, or Deliberat"
153
+ "label": "Name the shift",
154
+ "lines": [71, 71],
155
+ "anchor": "When the nearest token differs from the literal, use the tok"
156
+ },
157
+ {
158
+ "label": "Deliberate exceptions",
159
+ "lines": [72, 72],
160
+ "anchor": "Any finding, at any repair level, can stay as a deliberate e"
101
161
  }
102
162
  ]
103
163
  },
104
164
  {
105
- "id": "cc2-component",
106
- "row": 4,
165
+ "id": "cc2-rerun",
166
+ "row": 8,
107
167
  "kind": "cli",
108
- "title": "Inspect the component",
109
- "desc": "Shows one component's props and usage.",
110
- "lines": [26, 26],
111
- "anchor": "For one component, run `npx live-tokens components <id>`. Fo"
168
+ "title": "Rerun both checkers",
169
+ "desc": "Run both checkers again to see what remains.",
170
+ "lines": [24, 24],
171
+ "anchor": "Run both checkers again. When repairable findings remain in "
112
172
  },
113
173
  {
114
- "id": "cc2-scale",
115
- "row": 4,
174
+ "id": "cc2-repeat",
175
+ "row": 9,
176
+ "kind": "gate",
177
+ "title": "Regroup the remaining findings",
178
+ "desc": "Findings a token can fix go back through grouping.",
179
+ "lines": [24, 24],
180
+ "anchor": "Run both checkers again. When repairable findings remain in "
181
+ },
182
+ {
183
+ "id": "cc2-unresolved",
184
+ "row": 9,
185
+ "kind": "step",
186
+ "title": "Record the unresolved findings",
187
+ "desc": "A finding no token fits stays, and the reply says why.",
188
+ "lines": [70, 70],
189
+ "anchor": "Add no token to `tokens.css`. Map a literal with no matching"
190
+ },
191
+ {
192
+ "id": "cc2-strict",
193
+ "row": 10,
116
194
  "kind": "cli",
117
- "title": "Inspect the token scale",
118
- "desc": "Shows every token in one scale, such as space or color, with its value.",
195
+ "title": "Run strict checks",
196
+ "desc": "Strict mode counts every warning as an error.",
197
+ "lines": [25, 25],
198
+ "anchor": "When the errors are clear, run both checkers with `--strict`"
199
+ },
200
+ {
201
+ "id": "cc2-warnings",
202
+ "row": 11,
203
+ "kind": "decide",
204
+ "title": "Warning scope",
205
+ "desc": "Warnings are cleared when the request includes them. Otherwise the user chooses.",
206
+ "lines": [25, 26],
207
+ "anchor": "When the errors are clear, run both checkers with `--strict`",
208
+ "anchorEnd": "When the repair scope includes warnings, return to step 5 wi"
209
+ },
210
+ {
211
+ "id": "cc2-warning-loop",
212
+ "row": 12,
213
+ "kind": "gate",
214
+ "title": "Include warnings in the repair scope",
215
+ "desc": "The warnings go back through grouping, with --strict on every run.",
119
216
  "lines": [26, 26],
120
- "anchor": "For one component, run `npx live-tokens components <id>`. Fo"
217
+ "anchor": "When the repair scope includes warnings, return to step 5 wi"
121
218
  },
122
219
  {
123
- "id": "cc2-classify",
124
- "row": 6,
220
+ "id": "cc2-build",
221
+ "row": 13,
222
+ "kind": "step",
223
+ "title": "Gate the existing build",
224
+ "desc": "check:design runs both checkers with --no-fix, and the build runs it first once both exit 0.",
225
+ "lines": [76, 76],
226
+ "anchor": "When `package.json` has no `check:design` script, add `\"chec"
227
+ },
228
+ {
229
+ "id": "cc2-reply",
230
+ "row": 14,
125
231
  "kind": "chipset",
126
- "title": "Classify the findings",
127
- "desc": "Mechanical maps a value to an existing token.\nJudgement asks the user to decide.\nDeliberate records a decision the project made.",
128
- "lines": [21, 21],
129
- "anchor": "Classify each finding as Mechanical, Judgement, or Deliberat"
232
+ "title": "Reply with the results",
233
+ "desc": "The report's picture, the fixes the checkers applied, the remaining changes by rule, the findings left with their reasons, and both exit codes.",
234
+ "lines": [28, 33],
235
+ "anchor": "Reply with:",
236
+ "anchorEnd": "both checker commands with their exit codes"
130
237
  },
131
238
  {
132
- "id": "cc2-handoff",
133
- "row": 7,
134
- "kind": "hand",
135
- "title": "live-tokens-fix-findings",
136
- "desc": "Reply with the findings and the fixes, in the order the repair skill takes them, and hand it the list.",
137
- "lines": [22, 24],
138
- "anchor": "Reply with the findings of each section in the table's order",
139
- "anchorEnd": "End with the hand-off: run **live-tokens-fix-findings** on t"
239
+ "id": "cc2-done",
240
+ "row": 15,
241
+ "kind": "done",
242
+ "title": "Results complete",
243
+ "desc": "Both checkers pass, or every finding left has a reason.",
244
+ "lines": [28, 33],
245
+ "anchor": "Reply with:",
246
+ "anchorEnd": "both checker commands with their exit codes"
140
247
  }
141
248
  ],
142
249
  "edges": [
143
250
  {
144
- "to": "cc2-run",
145
- "from": "cc2-trig"
251
+ "from": "cc2-trig",
252
+ "to": "cc2-run"
253
+ },
254
+ {
255
+ "from": "cc2-run",
256
+ "to": "cc2-sections"
257
+ },
258
+ {
259
+ "from": "cc2-sections",
260
+ "to": "cc2-migrate"
261
+ },
262
+ {
263
+ "from": "cc2-migrate",
264
+ "to": "cc2-check"
265
+ },
266
+ {
267
+ "from": "cc2-check",
268
+ "to": "cc2-read",
269
+ "label": "findings"
270
+ },
271
+ {
272
+ "from": "cc2-check",
273
+ "to": "cc2-strict",
274
+ "label": "exit 0"
275
+ },
276
+ {
277
+ "from": "cc2-read",
278
+ "to": "cc2-group"
279
+ },
280
+ {
281
+ "from": "cc2-group",
282
+ "to": "cc2-repair"
283
+ },
284
+ {
285
+ "from": "cc2-repair",
286
+ "to": "cc2-rerun"
287
+ },
288
+ {
289
+ "from": "cc2-rerun",
290
+ "to": "cc2-repeat",
291
+ "label": "repairable findings"
292
+ },
293
+ {
294
+ "from": "cc2-repeat",
295
+ "to": "cc2-group",
296
+ "label": "return to step 5",
297
+ "back": true
298
+ },
299
+ {
300
+ "from": "cc2-rerun",
301
+ "to": "cc2-unresolved",
302
+ "label": "no token fits"
303
+ },
304
+ {
305
+ "from": "cc2-unresolved",
306
+ "to": "cc2-reply"
146
307
  },
147
308
  {
148
- "to": "cc2-sections",
149
- "from": "cc2-run"
309
+ "from": "cc2-rerun",
310
+ "to": "cc2-strict",
311
+ "label": "errors clear"
150
312
  },
151
313
  {
152
- "to": "cc2-drill-q",
153
- "from": "cc2-sections"
314
+ "from": "cc2-strict",
315
+ "to": "cc2-warnings",
316
+ "label": "warnings"
154
317
  },
155
318
  {
156
- "to": "cc2-component",
157
- "from": "cc2-drill-q",
158
- "label": "component"
319
+ "from": "cc2-strict",
320
+ "to": "cc2-build",
321
+ "label": "strict checks pass"
159
322
  },
160
323
  {
161
- "to": "cc2-scale",
162
- "from": "cc2-drill-q",
163
- "label": "token scale"
324
+ "from": "cc2-warnings",
325
+ "to": "cc2-warning-loop",
326
+ "label": "repair scope includes warnings"
164
327
  },
165
328
  {
166
- "to": "cc2-classify",
167
- "from": "cc2-drill-q",
168
- "label": "continue with classification"
329
+ "from": "cc2-warnings",
330
+ "to": "cc2-build",
331
+ "label": "user defers warnings"
169
332
  },
170
333
  {
171
- "to": "cc2-classify",
172
- "from": "cc2-component"
334
+ "from": "cc2-warning-loop",
335
+ "to": "cc2-group",
336
+ "label": "use --strict",
337
+ "back": true
173
338
  },
174
339
  {
175
- "to": "cc2-classify",
176
- "from": "cc2-scale"
340
+ "from": "cc2-build",
341
+ "to": "cc2-reply"
177
342
  },
178
343
  {
179
- "to": "cc2-handoff",
180
- "from": "cc2-classify"
344
+ "from": "cc2-reply",
345
+ "to": "cc2-done"
181
346
  }
182
347
  ]
183
348
  };