@contentful/experience-design-system-cli 2.38.0 → 2.38.1-dev-build-6d903339.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 (189) hide show
  1. package/dist/app.d.ts +3 -6
  2. package/dist/app.js +28155 -642
  3. package/dist/index.js +32060 -421
  4. package/dist/package.json +8 -3
  5. package/dist/src/commands/import-options.d.ts +12 -0
  6. package/dist/src/commands/import.d.ts +2 -1
  7. package/dist/src/tui/home/home.theme.d.ts +1 -2
  8. package/dist/src/tui/import/resolve-user-path.d.ts +1 -0
  9. package/dist/src/tui/import/shared/error-step/controls.d.ts +7 -0
  10. package/{legacy/dist/src/import/tui/steps/ErrorStep.d.ts → dist/src/tui/import/shared/error-step/error-step.d.ts} +2 -2
  11. package/dist/src/tui/import/shared/error-step/logic.d.ts +15 -0
  12. package/dist/src/tui/import/shared/gate-step/controls.d.ts +8 -0
  13. package/dist/src/tui/import/shared/gate-step/gate-step.d.ts +14 -0
  14. package/dist/src/tui/import/shared/gate-step/logic.d.ts +11 -0
  15. package/dist/src/tui/import/shared/index.d.ts +3 -0
  16. package/dist/src/tui/import/shared/running-step/logic.d.ts +12 -0
  17. package/dist/src/tui/import/shared/running-step/running-step.d.ts +11 -0
  18. package/dist/src/tui/import/shared/running-step/theme.d.ts +3 -0
  19. package/dist/src/tui/import/shared/running-step/use-elapsed.d.ts +1 -0
  20. package/dist/src/tui/import/steps/03-path-validation/controls.d.ts +13 -0
  21. package/dist/src/tui/import/steps/03-path-validation/helpers/scan-files.d.ts +10 -0
  22. package/dist/src/tui/import/steps/03-path-validation/logic.d.ts +43 -0
  23. package/dist/src/tui/import/steps/03-path-validation/screen.d.ts +12 -0
  24. package/dist/src/tui/import/steps/04-credentials/controls.d.ts +21 -0
  25. package/dist/src/tui/import/steps/04-credentials/logic.d.ts +15 -0
  26. package/dist/src/tui/import/steps/04-credentials/screen.d.ts +17 -0
  27. package/dist/src/tui/import/steps/04-credentials/validate.d.ts +8 -0
  28. package/dist/src/tui/import/steps/05-token-reuse/logic.d.ts +21 -0
  29. package/dist/src/tui/import/steps/05-token-reuse/screen.d.ts +10 -0
  30. package/dist/src/tui/import/steps/06-extraction/find-skill-path.d.ts +1 -0
  31. package/dist/src/tui/import/steps/06-extraction/logic.d.ts +48 -0
  32. package/dist/src/tui/import/steps/06-extraction/run.d.ts +26 -0
  33. package/dist/src/tui/import/steps/06-extraction/screen.d.ts +10 -0
  34. package/dist/src/tui/import/steps/06-extraction/selection.d.ts +18 -0
  35. package/dist/src/tui/import/steps/06-extraction/types.d.ts +46 -0
  36. package/dist/src/tui/import/steps/06-extraction/use-extraction.d.ts +14 -0
  37. package/dist/src/tui/import/steps/07-scope-gate/cache-check.d.ts +17 -0
  38. package/{legacy/dist/src/import/tui/scope-gate-columns.d.ts → dist/src/tui/import/steps/07-scope-gate/columns.d.ts} +22 -2
  39. package/dist/src/tui/import/steps/07-scope-gate/graph/composite-closure.d.ts +26 -0
  40. package/dist/src/tui/import/steps/07-scope-gate/graph/cycle-detection.d.ts +27 -0
  41. package/dist/src/tui/import/steps/07-scope-gate/graph/fuzzy-search.d.ts +3 -0
  42. package/dist/src/tui/import/steps/07-scope-gate/graph/index.d.ts +33 -0
  43. package/dist/src/tui/import/steps/07-scope-gate/graph/lineage.d.ts +29 -0
  44. package/dist/src/tui/import/steps/07-scope-gate/graph/search-neighborhood.d.ts +3 -0
  45. package/dist/src/tui/import/steps/07-scope-gate/graph/slot-graph.d.ts +11 -0
  46. package/dist/src/tui/import/steps/07-scope-gate/keymap.d.ts +84 -0
  47. package/dist/src/tui/import/steps/07-scope-gate/load.d.ts +8 -0
  48. package/dist/src/tui/import/steps/07-scope-gate/panels/added-column.d.ts +15 -0
  49. package/dist/src/tui/import/steps/07-scope-gate/panels/cycles-panel.d.ts +8 -0
  50. package/dist/src/tui/import/steps/07-scope-gate/panels/reject-prompt.d.ts +5 -0
  51. package/dist/src/tui/import/steps/07-scope-gate/screen.d.ts +9 -0
  52. package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/GotoBanner.d.ts +32 -0
  53. package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.d.ts +93 -0
  54. package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/HelpOverlay.d.ts +21 -0
  55. package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/badge.d.ts +13 -0
  56. package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.d.ts +31 -0
  57. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/group-collapse.d.ts +1 -1
  58. package/dist/src/tui/import/steps/07-scope-gate/sidebar/hooks/use-terminal-size.d.ts +6 -0
  59. package/dist/src/tui/import/steps/07-scope-gate/sidebar/hooks/useImmediateInput.d.ts +19 -0
  60. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/sidebar-help.d.ts +1 -1
  61. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/sidebar-navigation.d.ts +2 -2
  62. package/dist/src/tui/import/steps/07-scope-gate/sidebar/theme.d.ts +8 -0
  63. package/dist/src/tui/import/steps/07-scope-gate/sidebar/types.d.ts +7 -0
  64. package/dist/src/tui/import/steps/07-scope-gate/state.d.ts +19 -0
  65. package/dist/src/tui/import/steps/07-scope-gate/types.d.ts +24 -0
  66. package/dist/src/tui/import/steps/07-scope-gate/use-scope-gate-flow.d.ts +27 -0
  67. package/dist/src/tui/import/steps/07-scope-gate/use-scope-gate.d.ts +76 -0
  68. package/dist/src/tui/import/steps/08-generation/logic.d.ts +27 -0
  69. package/dist/src/tui/import/steps/08-generation/map-tokens.d.ts +14 -0
  70. package/dist/src/tui/import/steps/08-generation/run.d.ts +22 -0
  71. package/dist/src/tui/import/steps/08-generation/save-decisions.d.ts +8 -0
  72. package/dist/src/tui/import/steps/08-generation/screen.d.ts +12 -0
  73. package/dist/src/tui/import/steps/08-generation/types.d.ts +47 -0
  74. package/dist/src/tui/import/steps/08-generation/use-generation.d.ts +14 -0
  75. package/dist/src/tui/import/steps/09-review/components/ComponentRationalePanel.d.ts +10 -0
  76. package/dist/src/tui/import/steps/09-review/components/FieldEditor.d.ts +67 -0
  77. package/dist/src/tui/import/steps/09-review/components/FinalizeDialog.d.ts +22 -0
  78. package/dist/src/tui/import/steps/09-review/components/HighlightedLine.d.ts +9 -0
  79. package/dist/src/tui/import/steps/09-review/components/JsonPanel.d.ts +11 -0
  80. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/LivePreviewSummary.d.ts +2 -2
  81. package/dist/src/tui/import/steps/09-review/components/QuitDialog.d.ts +8 -0
  82. package/dist/src/tui/import/steps/09-review/components/RationaleLine.d.ts +21 -0
  83. package/dist/src/tui/import/steps/09-review/components/RationalePanel.d.ts +15 -0
  84. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewComponentPanel.d.ts +3 -3
  85. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewDetailsEditor.d.ts +3 -3
  86. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewDialogs.d.ts +2 -2
  87. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewStatus.d.ts +1 -1
  88. package/dist/src/tui/import/steps/09-review/components/ScrollablePanel.d.ts +14 -0
  89. package/dist/src/tui/import/steps/09-review/components/TokenReviewPanel.d.ts +30 -0
  90. package/dist/src/tui/import/steps/09-review/components/removed-components-text.d.ts +7 -0
  91. package/dist/src/tui/import/steps/09-review/components/wrap-text.d.ts +1 -0
  92. package/{legacy/dist/src/import/tui/steps/GenerateReviewStep.d.ts → dist/src/tui/import/steps/09-review/generate-review-step.d.ts} +1 -1
  93. package/{legacy/dist/src/import → dist/src/tui/import/steps/09-review/graph}/cycle-auto-reject.d.ts +1 -1
  94. package/{legacy/dist/src/analyze → dist/src/tui/import/steps/09-review/graph}/cycle-view.d.ts +2 -2
  95. package/dist/src/tui/import/steps/09-review/graph/issue-inheritance.d.ts +8 -0
  96. package/dist/src/tui/import/steps/09-review/graph/selection-cascade.d.ts +3 -0
  97. package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review/helpers}/enumerate-cycle-breaks.d.ts +1 -1
  98. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/history.d.ts +1 -1
  99. package/dist/src/tui/import/steps/09-review/preview-annotations.d.ts +26 -0
  100. package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review}/review-details-panel.d.ts +2 -2
  101. package/{legacy/dist/src/import/tui/hooks → dist/src/tui/import/steps/09-review}/review-input.d.ts +2 -2
  102. package/{legacy/dist/src/import/tui/runLivePreview.d.ts → dist/src/tui/import/steps/09-review/run-live-preview.d.ts} +2 -3
  103. package/dist/src/tui/import/steps/09-review/scroll-offset.d.ts +30 -0
  104. package/dist/src/tui/import/steps/09-review/session.d.ts +26 -0
  105. package/dist/src/tui/import/steps/09-review/theme.d.ts +9 -0
  106. package/dist/src/tui/import/steps/09-review/token-suggestions.d.ts +8 -0
  107. package/dist/src/tui/import/steps/09-review/types.d.ts +19 -0
  108. package/{legacy/dist/src/import/tui/hooks/useReviewEditor.d.ts → dist/src/tui/import/steps/09-review/use-review-editor.d.ts} +1 -3
  109. package/{legacy/dist/src/import/tui/hooks/useReviewPreview.d.ts → dist/src/tui/import/steps/09-review/use-review-preview.d.ts} +2 -2
  110. package/{legacy/dist/src/import/tui/hooks/useReviewSession.d.ts → dist/src/tui/import/steps/09-review/use-review-session.d.ts} +5 -35
  111. package/dist/src/tui/import/steps/10-flow/flow/build-flow-start.d.ts +21 -0
  112. package/dist/src/tui/import/steps/10-flow/flow/controller.d.ts +65 -0
  113. package/dist/src/tui/import/steps/10-flow/flow/preview.d.ts +56 -0
  114. package/dist/src/tui/import/steps/10-flow/flow/push.d.ts +43 -0
  115. package/dist/src/tui/import/steps/10-flow/flow/save.d.ts +50 -0
  116. package/dist/src/tui/import/steps/10-flow/flow/screen.d.ts +17 -0
  117. package/dist/src/tui/import/steps/10-flow/flow/types.d.ts +71 -0
  118. package/dist/src/tui/import/steps/10-flow/flow/use-flow.d.ts +9 -0
  119. package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/10-flow/screens}/PushingStep.d.ts +1 -1
  120. package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/10-flow/screens}/WizardPreviewStep.d.ts +0 -1
  121. package/dist/src/tui/import/steps/10-flow/support/contentful-urls.d.ts +15 -0
  122. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/wizard-state-transitions.d.ts +0 -13
  123. package/dist/src/tui/import/steps/10-flow/theme.d.ts +13 -0
  124. package/dist/src/tui/import/steps/index.d.ts +4 -0
  125. package/dist/src/tui/import/steps/preview-validation-error/logic.d.ts +12 -0
  126. package/dist/src/tui/import/steps/preview-validation-error/screen.d.ts +11 -0
  127. package/dist/src/tui/user-agent.d.ts +5 -0
  128. package/legacy/dist/package.json +4 -1
  129. package/legacy/dist/src/analyze/select/tui/components/ScrollablePanel.d.ts +2 -2
  130. package/legacy/dist/src/analyze/select/tui/theme.d.ts +1 -1
  131. package/legacy/dist/src/index.js +15073 -23076
  132. package/legacy/package.json +8 -3
  133. package/package.json +8 -3
  134. package/skills/generate-components.md +612 -0
  135. package/skills/generate-tokens.md +194 -0
  136. package/skills/map-tokens.md +102 -0
  137. package/skills/select-components.md +235 -0
  138. package/dist/src/tui/import/spawn-v1-import.d.ts +0 -29
  139. package/dist/src/tui/import/terminal-input.d.ts +0 -2
  140. package/legacy/dist/src/import/agent-model-resolve.d.ts +0 -27
  141. package/legacy/dist/src/import/command.d.ts +0 -2
  142. package/legacy/dist/src/import/composition-options.d.ts +0 -7
  143. package/legacy/dist/src/import/tui/WizardApp.d.ts +0 -67
  144. package/legacy/dist/src/import/tui/run-selection-agent.d.ts +0 -9
  145. package/legacy/dist/src/import/tui/runScopeGate.d.ts +0 -12
  146. package/legacy/dist/src/import/tui/spawn-generate.d.ts +0 -33
  147. package/legacy/dist/src/import/tui/steps/CredentialsStep.d.ts +0 -43
  148. package/legacy/dist/src/import/tui/steps/GateStep.d.ts +0 -15
  149. package/legacy/dist/src/import/tui/steps/PathValidationStep.d.ts +0 -10
  150. package/legacy/dist/src/import/tui/steps/PreviewValidationErrorStep.d.ts +0 -11
  151. package/legacy/dist/src/import/tui/steps/RunningStep.d.ts +0 -32
  152. package/legacy/dist/src/import/tui/steps/ScopeGateStep.d.ts +0 -48
  153. package/legacy/dist/src/import/tui/steps/TokenInputStep.d.ts +0 -8
  154. package/legacy/dist/src/import/tui/steps/WelcomeStep.d.ts +0 -7
  155. package/legacy/dist/src/import/tui/wizard-422-helpers.d.ts +0 -48
  156. package/legacy/dist/src/import/tui/wizard-generate-progress.d.ts +0 -21
  157. /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/scope-gate-cascade.d.ts +0 -0
  158. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/ai-flag.d.ts +0 -0
  159. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/autocomplete.d.ts +0 -0
  160. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/CompactControlBar.d.ts +0 -0
  161. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/CounterStrip.d.ts +0 -0
  162. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/LegendEntry.d.ts +0 -0
  163. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/SearchMatchSummary.d.ts +0 -0
  164. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/hooks/sidebar-search-state.d.ts +0 -0
  165. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/hooks/useOverlayPanel.d.ts +0 -0
  166. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/lineage-layout.d.ts +0 -0
  167. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/sidebar-input.d.ts +0 -0
  168. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/step-filters.d.ts +0 -0
  169. /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review/helpers}/auto-reject-decision.d.ts +0 -0
  170. /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review/helpers}/breaking-change-format.d.ts +0 -0
  171. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review/helpers}/cycle-panel-scroll.d.ts +0 -0
  172. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review/helpers}/sidebar-width.d.ts +0 -0
  173. /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review}/review-json-panel.d.ts +0 -0
  174. /package/{legacy/dist/src/import/tui/useFinalizePreview.d.ts → dist/src/tui/import/steps/09-review/use-finalize-preview.d.ts} +0 -0
  175. /package/{legacy/dist/src/import/tui/useLivePreview.d.ts → dist/src/tui/import/steps/09-review/use-live-preview.d.ts} +0 -0
  176. /package/{legacy/dist/src/import/tui/hooks/useReviewSurfaceState.d.ts → dist/src/tui/import/steps/09-review/use-review-surface-state.d.ts} +0 -0
  177. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/components}/CustomPromptBanner.d.ts +0 -0
  178. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow}/components/SpaceEnvironment.d.ts +0 -0
  179. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow}/components/StepHeader.d.ts +0 -0
  180. /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/10-flow/screens}/DoneStep.d.ts +0 -0
  181. /package/{legacy/dist/src/runs/path-prompt.d.ts → dist/src/tui/import/steps/10-flow/screens/PathPrompt.d.ts} +0 -0
  182. /package/{legacy/dist/src/import → dist/src/tui/import/steps/10-flow/support}/path-utils.d.ts +0 -0
  183. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/preview-confirmation-input.d.ts +0 -0
  184. /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/10-flow/support}/preview-diff.d.ts +0 -0
  185. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/push-progress.d.ts +0 -0
  186. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/run-print-files-helpers.d.ts +0 -0
  187. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/run-teaser.d.ts +0 -0
  188. /package/{legacy/dist/src/tui → dist/src/tui/import/steps/10-flow/support}/use-blinking-cursor.d.ts +0 -0
  189. /package/{legacy/dist/src/tui → dist/src/tui/import/steps/10-flow/support}/use-timed-spinner.d.ts +0 -0
@@ -0,0 +1,194 @@
1
+ # Generate Tokens — Classification Skill
2
+
3
+ ## Purpose
4
+
5
+ Classify every raw token from the input into a DTCG token tree. Output one JSON tool call per line to stdout. The CLI reads your stdout and writes each token and group directly to the pipeline database — you do not produce a JSON file.
6
+
7
+ ---
8
+
9
+ ## Prerequisites — Input
10
+
11
+ All input is embedded inline in the prompt before this file:
12
+
13
+ - **Raw token source** — the original source file as-is. This may be any format: SCSS/CSS variable declarations, a JavaScript/TypeScript token module, a JSON object, a Style Dictionary config, Tailwind config, or any other token definition format the project uses. Read it as you would any source file.
14
+ - **Token-name sidecar** — if provided, maps raw names to DTCG paths (read-only context). Use these as authoritative path assignments when present.
15
+
16
+ ---
17
+
18
+ ## Target schema
19
+
20
+ The CLI assembles your output into a DTCG token tree. Each `set_group` call produces an intermediate group node; each `set_token` call produces a leaf with `$type` and `$value`. You do not produce JSON directly — emit tool calls and the CLI writes the rows.
21
+
22
+ ---
23
+
24
+ ## Output protocol
25
+
26
+ Emit one JSON object per line. The CLI parses lines starting with `{`. Lines not starting with `{` are treated as prose and ignored — use them freely for reasoning.
27
+
28
+ **Two tool calls:**
29
+
30
+ ```
31
+ {"tool":"set_group","path":"<dot.notation.path>","description":"<optional>"}
32
+
33
+ {"tool":"set_token","path":"<dot.notation.path>","type":"<DTCG type>","value":<value>,"description":"<reason>"}
34
+ ```
35
+
36
+ Every leaf token must have an explicit `$type` — do not rely on group-level inheritance. Intermediate nodes (groups) must NOT have a `type` field.
37
+
38
+ **Rules:**
39
+ - Emit exactly one JSON object per line. No multi-line JSON.
40
+ - Every intermediate group must have a `set_group` call.
41
+ - Every leaf token must have a `set_token` call.
42
+ - `path` is dot-notation from root, e.g. `colors.brand.primary` — no leading dots or slashes.
43
+ - `type` must be one of the 13 valid DTCG types (see table below).
44
+ - `value` must be valid JSON — string, number, array, or object depending on the type. Do NOT quote complex values.
45
+ - Emit `set_group` calls before the `set_token` calls under them.
46
+ - `description` on `set_token` documents your reasoning — always include it.
47
+
48
+ ---
49
+
50
+ ## Valid types
51
+
52
+ Exactly **13** valid DTCG `$type` values:
53
+
54
+ | type | Typical values |
55
+ |---|---|
56
+ | `color` | `"#0066ff"`, `"rgb(0,102,255)"` |
57
+ | `dimension` | `"8px"`, `"1rem"`, `"0.5em"` |
58
+ | `fontFamily` | `"Inter, sans-serif"` |
59
+ | `fontWeight` | `400`, `"bold"` |
60
+ | `duration` | `"200ms"`, `"0.3s"` |
61
+ | `cubicBezier` | `[0.42, 0, 0.58, 1]` |
62
+ | `number` | `1.5`, `100` |
63
+ | `strokeStyle` | `"solid"`, `"dashed"` |
64
+ | `border` | `{"width":"1px","style":"solid","color":"#000"}` |
65
+ | `transition` | `{"duration":"200ms","timingFunction":[0.42,0,0.58,1],"delay":"0ms"}` |
66
+ | `shadow` | `{"offsetX":"0px","offsetY":"4px","blur":"8px","spread":"0px","color":"#00000026"}` |
67
+ | `gradient` | `[{"color":"#000","position":0},{"color":"#fff","position":1}]` |
68
+ | `typography` | `{"fontFamily":"Inter","fontSize":"16px","fontWeight":400,"lineHeight":1.5,"letterSpacing":"0px"}` |
69
+
70
+ ---
71
+
72
+ ## Mapping guidance — Type resolution
73
+
74
+ For each token value, determine the DTCG `$type` by reading the value and its context:
75
+
76
+ | Value pattern | Type |
77
+ |---|---|
78
+ | Starts with `#`, `rgb(`, `hsl(`, `rgba(` | `color` |
79
+ | Ends with `px`, `rem`, `em`, `%`, `vw`, `vh` | `dimension` |
80
+ | `cubic-bezier(...)` or 4-element array | `cubicBezier` |
81
+ | Ends with `ms` or `s` (animation/transition) | `duration` |
82
+ | Font family name string | `fontFamily` |
83
+ | Numeric `100`–`900`, or `bold`/`normal`/`light` | `fontWeight` |
84
+ | Multi-property shadow value | `shadow` |
85
+ | Multi-property border value | `border` |
86
+ | `solid`, `dashed`, `dotted` alone | `strokeStyle` |
87
+ | Composite font shorthand | `typography` |
88
+ | Unitless number | `number` |
89
+
90
+ When a token's type is ambiguous from its value alone, use its name as context (e.g. `$spacing-*` → `dimension`, `$duration-*` → `duration`). Document your reasoning in `description`. If no type fits, use `number` with a `"WARNING: type unknown"` description.
91
+
92
+ Resolve variable references: if a value references another variable (e.g. SCSS `$black` in `rgba($black, 0.6)`, or a JS alias), substitute the referenced value before classifying.
93
+
94
+ ---
95
+
96
+ ## Grouping
97
+
98
+ Organize tokens into a nested DTCG hierarchy that reflects their semantic purpose:
99
+
100
+ 1. Examine naming patterns and existing structure in the source (variable prefixes, object nesting, file-level categories).
101
+ 2. **For already-nested sources (JS/TS objects, JSON, Style Dictionary)**: derive paths directly from the source key hierarchy — lowercase each key segment and join with dots. Do NOT reorganize, rename, or flatten unless the original key is purely implementation-specific (e.g. `DEFAULT` as a single-child wrapper can be elided). The source structure IS the path. Example: `tokens[SPACING].DEFAULT.8` → `spacing.8`; `tokens[COLOR].text.standard` → `color.text.standard`; `tokens[SHADOW].level.1` → `shadow.level.1`.
102
+ 3. For flat names (SCSS variables, CSS custom properties): strip leading `--` or `$`; replace `-` and `_` separators with `.` to form nested paths. Use the first meaningful segment as the top-level group.
103
+ 4. If neither rule applies, propose a grouping strategy: by kind (`colors`, `spacing`, `typography`), by semantic role (`brand`, `semantic`, `neutral`), or hybrid.
104
+ 5. Emit a `set_group` call for every intermediate node before emitting any `set_token` calls under it.
105
+
106
+ **Determinism rule**: Identical source input MUST produce identical paths on every run. Never invent synonyms, abbreviations, or alternative hierarchies for keys that already exist in the source. If `primary` is the key, the path segment is `primary` — not `brand-primary`, `main`, or `accent`.
107
+
108
+ If the token-name sidecar is provided, use it as authoritative path assignments — it maps raw names to DTCG dot-notation paths already.
109
+
110
+ ---
111
+
112
+ ## Value handling
113
+
114
+ Most values pass through as strings. For composite types, parse the raw string into the required JSON structure:
115
+
116
+ **`border`** — parse `1px solid #ccc` into:
117
+ ```json
118
+ {"width":"1px","style":"solid","color":"#cccccc"}
119
+ ```
120
+
121
+ **`shadow`:**
122
+ ```json
123
+ {"offsetX":"0px","offsetY":"4px","blur":"8px","spread":"0px","color":"#00000026"}
124
+ ```
125
+
126
+ **`transition`:**
127
+ ```json
128
+ {"duration":"200ms","delay":"0ms","timingFunction":[0.42,0,0.58,1]}
129
+ ```
130
+
131
+ **`gradient`** — array of color stops:
132
+ ```json
133
+ [{"color":"#000","position":0},{"color":"#fff","position":1}]
134
+ ```
135
+
136
+ ---
137
+
138
+ ## Examples
139
+
140
+ Input (SCSS):
141
+ ```scss
142
+ $brand-primary: #0066ff;
143
+ $spacing-sm: 8px;
144
+ $anim-speed: 200ms;
145
+ $black: #1a1a1a;
146
+ $overlay: rgba($black, 0.6);
147
+ ```
148
+
149
+ Output:
150
+ ```
151
+ Analyzing SCSS variables: 5 tokens across color, spacing, duration, and composite color categories.
152
+ $overlay references $black — resolving to rgba(26, 26, 26, 0.6).
153
+ {"tool":"set_group","path":"colors","description":"Brand and UI color tokens"}
154
+ {"tool":"set_group","path":"colors.brand","description":"Brand palette"}
155
+ {"tool":"set_token","path":"colors.brand.primary","type":"color","value":"#0066ff","description":"Brand primary color"}
156
+ {"tool":"set_token","path":"colors.neutral.black","type":"color","value":"#1a1a1a","description":"Base black neutral"}
157
+ {"tool":"set_token","path":"colors.neutral.overlay","type":"color","value":"rgba(26, 26, 26, 0.6)","description":"Semi-transparent overlay; $black variable resolved to #1a1a1a"}
158
+ {"tool":"set_group","path":"spacing","description":"Spacing scale"}
159
+ {"tool":"set_token","path":"spacing.sm","type":"dimension","value":"8px","description":"Small spacing step"}
160
+ {"tool":"set_group","path":"motion","description":"Animation timing"}
161
+ {"tool":"set_group","path":"motion.duration","description":"Duration values"}
162
+ {"tool":"set_token","path":"motion.duration.speed","type":"duration","value":"200ms","description":"Standard animation speed"}
163
+ ```
164
+
165
+ ---
166
+
167
+ ## Edge cases
168
+
169
+ - **Empty input** — emit nothing; the CLI will report 0 tokens stored.
170
+ - **Path collision** — two raw tokens resolve to the same dot-notation path: append `_2`, `_3` to disambiguate, and add a `description` warning.
171
+ - **Unrecognizable value** — no heuristic matches and `inferredKind` is invalid → use `number` with a warning in `description`.
172
+ - **Complex composite value** — parse raw string into the required JSON structure; if parsing is ambiguous, use a best-effort parse and document in `description`.
173
+
174
+ ---
175
+
176
+ ## Validation step — Pre-emit checklist
177
+
178
+ Before emitting any tool calls, verify:
179
+
180
+ 1. Every raw token in the input has exactly one `set_token` call.
181
+ 2. Every intermediate group has a `set_group` call.
182
+ 3. All `type` values are from the 13 valid DTCG types.
183
+ 4. `value` is valid JSON for the given type (string for color/dimension/etc., object for border/shadow/etc., array for gradient/cubicBezier).
184
+ 5. All `path` values use dot-notation with no leading dots or slashes.
185
+ 6. No duplicate paths.
186
+ 7. `set_group` calls precede the `set_token` calls under them.
187
+
188
+ After the run, the developer can validate with:
189
+
190
+ ```
191
+ experience-design-system-cli print validate --tokens <out-path>
192
+ ```
193
+
194
+ Re-run or iterate on any tokens flagged by warnings until validation passes.
@@ -0,0 +1,102 @@
1
+ # Map Tokens — Token Restriction Narrowing Skill
2
+
3
+ ## Purpose
4
+
5
+ For every design-category, token-typed prop already present in the generated CDF, decide whether there is concrete evidence to narrow it to a restricted subset (`$token.allowed`). Output one JSON tool call per line to stdout — the CLI reads it and writes each decision directly to the pipeline database. You do not write any files.
6
+
7
+ This is a narrowing fallback, not a classification step: it does not re-classify props or touch anything that isn't already a design-category `token` prop. It also does not name a candidate universe — the universe is implicit, every token in the library whose type matches the prop's `$token.kind`. Your only job is to decide, from source evidence, whether that universe should be narrowed further.
8
+
9
+ Default-path resolution is deterministic and happens in the CLI before this skill runs. A resolved `$default` is not model input for a mapping decision and never asks you to emit a mapping — a default alone does not restrict the allowed list.
10
+
11
+ ---
12
+
13
+ ## Input
14
+
15
+ All input is embedded inline in the prompt before this file:
16
+
17
+ - **Generated CDF so far** — design-category, token-typed props only, grouped by component. Every prop shown here already has `$type: "token"` and `$category: "design"`; you do not need to re-verify either.
18
+ - **Token path index** — one or more sections, each a flat list of `path · type` lines (one leaf token per line, `$value` omitted). Every section is pre-scoped: a section titled with a `$token.kind` contains every leaf token of that type and no others; a prop with that `$token.kind` draws its candidates only from the matching section. The "full tree" section — present only when at least one prop has no `$token.kind` — lists every leaf token, unscoped. Never mix candidates across sections.
19
+ - **Component source references** — the real file text for each component (bounded/truncated), rendered inline as a fenced code block, so you can look for an explicit restriction: a comment naming the valid tokens, or code that validates the prop against a fixed list of token paths. Content from files the component's own file imports (siblings) is inlined the same way, one hop deep — token-resolution logic often lives one file away from the component itself. When more sibling files were found than could be inlined, or a property has a use that fell outside the excerpt shown, the prompt says so explicitly; treat that as unknown evidence, not absence. **You have no filesystem access and no tools — a citation path is a label only, never something to open.** When a component's source couldn't be read (moved/deleted since extraction), there is no source evidence to narrow from — skip the prop.
20
+
21
+ If no token path index is provided, there is nothing to narrow against — do not emit any tool calls.
22
+
23
+ ---
24
+
25
+ ## Decision tree
26
+
27
+ For each design-category, token-typed prop shown in the "Generated CDF so far" section:
28
+
29
+ 1. **Prop type is a union of variant names** (e.g. `'primary' | 'secondary'`)? That prop should not be a `token` at all — the component receives a name and resolves it, which is the `enum` case in the classification step. Do not narrow it; narrowing cannot repair a wrong type. Emit nothing, and note in a prose line that it looks misclassified.
30
+ 2. **A default value or `tokenReference` is the prop's default, not a restriction.** `padding = tokens.spacingM` or a structured `tokenReference` tells you which token the prop *starts* on — it does not say the author may choose no other. Narrowing to that single path would leave the marketer one option, which is worse than no list. On its own, this evidence yields no tool call. If you narrow on other grounds (step 3), the default's path must be in the list.
31
+ 3. **Look for an explicit restriction** in the component source or its siblings: a comment naming the valid tokens, or code that validates/maps the prop against a fixed list of token paths (an allowlist array, a `satisfies` over specific token keys). If found, emit `$token.allowed` as the evidenced subset, scoped to tokens of the prop's `$token.kind`.
32
+ 4. **No explicit restriction?** Emit nothing. Omitting the list means "any token of this kind," which is correct and live — a guessed list is worse than none because it freezes the author's choices.
33
+ 5. **No plausible candidates at all** (no index entries of the prop's `$token.kind`)? Skip the prop.
34
+
35
+ ---
36
+
37
+ ## Output protocol
38
+
39
+ Emit one JSON object per line. The CLI parses lines starting with `{`; anything else is prose, ignored by the parser — use it freely for reasoning.
40
+
41
+ ```
42
+ {"tool":"map_token_prop","component":"<ComponentName>","prop":"<propName>","token_allowed":["colors.brand.primary","colors.brand.secondary"]}
43
+ ```
44
+
45
+ Rules:
46
+
47
+ - Emit exactly one JSON object per line. No multi-line JSON.
48
+ - Only emit a call for a prop that appears in the "Generated CDF so far" section.
49
+ - `token_allowed` is required and must be non-empty. If there's nothing to narrow to, emit no call at all.
50
+ - Every path in `token_allowed` must be an individual **leaf** path that exists verbatim in the token path index section matching the prop's `$token.kind` (or the "full tree" section, for a prop with no `$token.kind`). Never emit a group/prefix path (e.g. `colors.brand`) — the index has no entry for groups, only leaves. Never invent a path, and never substitute a variant/enum name for a real token path; if you can't find a matching path, omit that entry.
51
+ - No `$value` is provided in this step — reason from paths and `$type` only.
52
+
53
+ ---
54
+
55
+ ## Examples
56
+
57
+ ### Explicit restriction — narrow
58
+
59
+ ```ts
60
+ interface ButtonProps {
61
+ /** Accepts only the brand colour tokens: colors.brand.primary or colors.brand.secondary. */
62
+ accentColor?: string;
63
+ }
64
+ const ACCENT_TOKENS = ['colors.brand.primary', 'colors.brand.secondary'] as const;
65
+ ```
66
+
67
+ ```
68
+ accentColor is restricted to two named tokens by the doc comment and the ACCENT_TOKENS allowlist
69
+ {"tool":"map_token_prop","component":"Button","prop":"accentColor","token_allowed":["colors.brand.primary","colors.brand.secondary"]}
70
+ ```
71
+
72
+ ### No restriction evidence — emit nothing
73
+
74
+ `bgColor` is interpolated generically, with no comment or allowlist naming specific tokens, and no default. Any color token remains valid:
75
+
76
+ ```
77
+ bgColor has no restriction evidence in source — any color token remains valid, so no tool call
78
+ ```
79
+
80
+ ---
81
+
82
+ ## Checklist
83
+
84
+ Before emitting any tool calls, verify:
85
+
86
+ 1. Every `map_token_prop` call targets a prop that appears in the "Generated CDF so far" section.
87
+ 2. Every path in `token_allowed` is a leaf path that exists verbatim in the token path index, and matches the prop's `$token.kind` — no group/prefix paths, no variant names, nothing invented.
88
+ 3. `token_allowed` is never empty.
89
+ 4. Every emitted list includes the prop's own default token when it has one.
90
+ 5. No list was emitted on the strength of a default alone, and none targets a prop whose type is a union of variant names.
91
+
92
+ ---
93
+
94
+ ## Existing entities in the target space
95
+
96
+ The preamble may include an "Existing design tokens in the target Contentful space" JSON block listing tokens already present in the target space (by name + DTCG type).
97
+
98
+ Prefer restricting to existing tokens over proposing new ones:
99
+
100
+ 1. When the source has restriction evidence AND a candidate maps semantically to an existing token by name/type, favor the existing token in the emitted `token_allowed` list.
101
+ 2. Never emit a `token_allowed` entry that contradicts the "path exists verbatim" rule above — the existing-tokens block is guidance, not a substitute for the token path index. If a token appears in the existing-entities list but not in the token path index, do not use it.
102
+ 3. If none of the existing tokens fit and the source's evidence is specific, proceed as usual — the diff will surface the new proposal.
@@ -0,0 +1,235 @@
1
+ # Analyze Select — Agent Component Selection Skill
2
+
3
+ ## Purpose
4
+
5
+ Review the extracted React/Next.js component(s) provided below and decide whether each belongs in **Contentful Experience Orchestration** as a Component Type. The input is a JSON array — you may receive 1–N components in a single message. Output one JSON tool call per input component to stdout, named after the component. Tool calls may appear in any order.
6
+
7
+ ---
8
+
9
+ ## What is Contentful Experience Orchestration?
10
+
11
+ Contentful Experience Orchestration is a Contentful product that enables **designers, developers, and marketers** to compose and manage digital experiences in Contentful. Component Types are used at every layer of the design system:
12
+
13
+ - **Atoms** — low-level UI primitives: icons, buttons, inputs, badges
14
+ - **Molecules** — composed UI units: cards, search fields, modals, navigation items
15
+ - **Organisms** — larger sections: heroes, banners, footers, press release lists, parallax sections
16
+
17
+ All three levels are valid Component Types in Contentful Experience Orchestration. Designers and developers compose atoms into molecules, molecules into organisms. Marketers then configure content and design values on any of these.
18
+
19
+ The entity being defined — a **Component Type** — is the schema that tells Contentful what is configurable for this component. It defines design properties, content properties, and slots. Even a component with only a few configurable props is a valid Component Type.
20
+
21
+ ---
22
+
23
+ ## The one rule: is this the author-facing UI component?
24
+
25
+ **Accept** the component if it is the component that directly defines the author-facing UI surface — regardless of whether it is an atom, molecule, or organism, and regardless of whether it has many or few configurable props. A footer icon with two props (`icon`, `label`) is just as valid as a parallax hero with fifteen props.
26
+
27
+ **Reject** the component if its primary purpose is framework or data-loading infrastructure rather than the author-facing UI surface:
28
+
29
+ - It is a React hook (name starts `use` or `Use`)
30
+ - It is a pure context provider with no visual output
31
+ - It is a Ninetailed/personalization platform wrapper (its job is routing to variants, not rendering content)
32
+ - It is a data-fetch wrapper that loads data for a sibling renderer and then forwards that data into the sibling renderer
33
+ - It is an analytics/event-tracking component (fires events, renders nothing)
34
+ - It is a security or infrastructure utility (no UI at all)
35
+
36
+ ---
37
+
38
+ ## What NOT to use as a rejection reason
39
+
40
+ These are **not** valid reasons to reject a component:
41
+
42
+ | Invalid reason | Why it is wrong |
43
+ | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
44
+ | "Only atoms/low-level" | Atoms are first-class Component Types in Contentful Experience Orchestration |
45
+ | "Tightly coupled to a parent component" | Contentful Experience Orchestration handles composition at the experience layer |
46
+ | "Has A/B testing or personalization-related props" | These props are classified as `state` or excluded in the generate step — their presence does not disqualify the component |
47
+ | "Has no marketer-configurable props" | Marketers are not the only users; designers and developers configure components too |
48
+ | "Domain-specific or feature-level" | Press releases, newsrooms, search — all valid content components |
49
+ | "Server-side or SSR" | Server components that render visible UI are valid |
50
+ | "Few configurable props" | One or two props is fine |
51
+
52
+ ---
53
+
54
+ ## Reject only these categories
55
+
56
+ | Category | Why |
57
+ | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
58
+ | **React hooks** | `useXxx` / `UseXxx` — functions, not renderable components. Zero visual output. |
59
+ | **Pure context providers** | Wrap children to pass context but render no UI themselves |
60
+ | **A/B testing or personalization wrappers** | Components whose _entire purpose_ is routing users to content variants or tracking experiment participation — they render no UI of their own |
61
+ | **Data-fetch wrappers** | Components whose job is to load or resolve data for a sibling renderer. Even if they eventually return visible UI, the sibling renderer is the real Component Type. |
62
+ | **Analytics and event tracking** | Components that only fire analytics events and render nothing visible |
63
+ | **Security utilities** | Non-visual security primitives with no rendered output |
64
+
65
+ > **Variant routing rule**: Reject a component if its entire purpose is deciding _which_ content variant to show — that is framework infrastructure, not a Component Type. Do **not** reject a component merely because it _contains_ some A/B testing or personalization-related props — those props are handled as `state` in the generate step.
66
+
67
+ > **Data-fetch wrapper rule**: Reject a component if it imports or calls a generated query hook, loads data, and then forwards that data into a sibling renderer. The sibling renderer is the Component Type; the data-loader wrapper is not.
68
+
69
+ > **Utility-wrapper rule**: Reject a component if **all three** of the following are true:
70
+ >
71
+ > 1. It has no props that meaningfully shape user-facing content (no text strings, headings, image URLs, links, body content, rich text, or media references).
72
+ > 2. The props it does have are purely structural or behavioral — e.g., `container`, `target`, `as`, `asChild`, render-prop callbacks, internal `ref` forwarding, focus/portal targets, debug toggles, or `children` only.
73
+ > 3. It is a utility wrapper rather than a composable content surface. Concrete examples to reject under this rule: `Portal`, `SrOnly` (screen-reader-only wrappers), `FocusTrap`, `ErrorBoundary`, `Suspense` fallbacks, debug-only wrappers, and provider-shaped components whose only job is to forward children.
74
+ >
75
+ > Use `reject_component` with a reason like `"Utility wrapper — no authorable content surface"` or `"Structural-only component — no user-shaping props"`. This rule is additive to the categories above; do **not** use it to reject a component that has even one author-shaping prop (e.g., a `label`, `title`, `text`, `href`, `src`, or `richText` prop) — those still belong as Component Types per the "one rule" above.
76
+
77
+ ## Using `selectionContext`
78
+
79
+ If the input includes `selectionContext`, treat it as the only repo-level context you may use. It is already bounded to the customer-provided project files and may include:
80
+
81
+ - the component source file
82
+ - sibling files in the same folder
83
+ - import/export summaries
84
+ - resolver or registry references
85
+ - one likely parent usage site
86
+
87
+ Use that bounded context to distinguish the author-facing renderer from infrastructure wrappers. In particular:
88
+
89
+ - If the component imports a sibling renderer and mainly forwards fetched data into it, reject the wrapper and prefer the sibling renderer.
90
+ - If sibling files show a presentation-focused renderer with the real authoring props, that renderer is the Component Type.
91
+ - Resolver or parent-usage references help show how the repo treats the component, but they do not override the renderer-vs-wrapper rule.
92
+ - Do not assume access to any files outside `selectionContext`.
93
+
94
+ ---
95
+
96
+ ## Output protocol
97
+
98
+ Emit one JSON object on a single line. Lines not starting with `{` are ignored by the parser — use them freely for reasoning.
99
+
100
+ **Two tool calls — emit exactly one per input component:**
101
+
102
+ ```
103
+ {"tool":"select_component","name":"<ComponentName>","reason":"<brief reason>","confidence":<1-5>}
104
+
105
+ {"tool":"reject_component","name":"<ComponentName>","reason":"<brief reason>","confidence":<1-5>}
106
+ ```
107
+
108
+ **Rules:**
109
+
110
+ - Emit exactly one JSON object per line. No multi-line JSON. No markdown fences.
111
+ - Emit exactly one tool call per input component. Tool calls may appear in any order.
112
+ - The `name` must match a component name from the input array exactly.
113
+ - `reason` is a brief phrase documenting your decision.
114
+ - `confidence` is your certainty (1–5) that the decision is correct:
115
+ - **5** — obvious case, no doubt (clear UI atom, or clear infrastructure with no visual output)
116
+ - **4** — likely correct, minor ambiguity
117
+ - **3** — uncertain, borderline component (few props, ambiguous purpose, could go either way)
118
+ - **2** — low confidence, guessing
119
+ - **1** — very unsure, human review strongly recommended
120
+ - Emit prose lines (not starting with `{`) to log your reasoning before the final tool call.
121
+
122
+ ---
123
+
124
+ ## Examples
125
+
126
+ ```
127
+ Analytics — fires analytics events, no visual output
128
+ {"tool":"reject_component","name":"Analytics","reason":"analytics tracker — no visual output"}
129
+ ```
130
+
131
+ ```
132
+ CanaryToken — security utility, no visual output
133
+ {"tool":"reject_component","name":"CanaryToken","reason":"security utility — no visual output"}
134
+ ```
135
+
136
+ ```
137
+ ClientExperience — personalization wrapper whose entire purpose is routing users to content variants
138
+ {"tool":"reject_component","name":"ClientExperience","reason":"variant routing wrapper — entire purpose is A/B routing, not rendering UI"}
139
+ ```
140
+
141
+ ```
142
+ ComponentMarker — experimentation marker component, no visual output
143
+ {"tool":"reject_component","name":"ComponentMarker","reason":"experimentation marker — no visual output"}
144
+ ```
145
+
146
+ ```
147
+ ComponentTracker — variant attribution tracker, no visual output
148
+ {"tool":"reject_component","name":"ComponentTracker","reason":"variant attribution tracker — no visual output"}
149
+ ```
150
+
151
+ ```
152
+ Refresh — client-side route refresh utility for personalization platform, no visual output
153
+ {"tool":"reject_component","name":"Refresh","reason":"personalization route refresh utility — no visual output"}
154
+ ```
155
+
156
+ ```
157
+ ServerExperience — server-side variant routing wrapper, no visual output
158
+ {"tool":"reject_component","name":"ServerExperience","reason":"server-side variant routing wrapper — no visual output"}
159
+ ```
160
+
161
+ ```
162
+ UseHelpNavigation — React hook, not a renderable component
163
+ {"tool":"reject_component","name":"UseHelpNavigation","reason":"React hook — not a renderable component"}
164
+ ```
165
+
166
+ ```
167
+ Providers — React context provider with no visual output
168
+ {"tool":"reject_component","name":"Providers","reason":"pure context provider — no visual output"}
169
+ ```
170
+
171
+ ```
172
+ HeroBannerGql — fetch wrapper that loads data and forwards it into HeroBanner
173
+ It may eventually return visible UI, but the author-facing component is HeroBanner, not HeroBannerGql.
174
+ {"tool":"reject_component","name":"HeroBannerGql","reason":"data-fetch wrapper — loads data for a sibling renderer rather than defining the author-facing UI surface"}
175
+ ```
176
+
177
+ ```
178
+ FooterIcon — atom: renders an icon with optional label in the footer
179
+ {"tool":"select_component","name":"FooterIcon","reason":"UI atom — renders icon with configurable icon and label"}
180
+ ```
181
+
182
+ ```
183
+ FeedbackModal — modal dialog with visibility state
184
+ {"tool":"select_component","name":"FeedbackModal","reason":"modal UI component with configurable visibility and content"}
185
+ ```
186
+
187
+ ```
188
+ ActiveFilters — renders active filter chips with remove controls
189
+ {"tool":"select_component","name":"ActiveFilters","reason":"filter UI component — renders visible filter chips"}
190
+ ```
191
+
192
+ ```
193
+ FullSizeBarNoContent — full-width text bar with link; has some personalization state props
194
+ The personalization props (hideContentForPersonalization, componentId) are state props handled in the generate step.
195
+ The component renders real visual UI — a bar with text, chevron, and link.
196
+ {"tool":"select_component","name":"FullSizeBarNoContent","reason":"content bar UI — renders visible bar with configurable text, link, and design"}
197
+ ```
198
+
199
+ ```
200
+ ParallaxComponent — parallax marketing section; has some A/B testing props alongside real content props
201
+ The A/B testing props (abmFallback, abmLinkedFromAccount) are state props, not the component's primary purpose.
202
+ The component renders a parallax section with title, subtitle, and visual effects.
203
+ {"tool":"select_component","name":"ParallaxComponent","reason":"marketing section UI — renders parallax content with configurable title, subtitle, and design"}
204
+ ```
205
+
206
+ ```
207
+ NewsroomLandingPressReleases — press release list with pagination and locale
208
+ {"tool":"select_component","name":"NewsroomLandingPressReleases","reason":"content list UI — renders press releases with configurable locale and pagination"}
209
+ ```
210
+
211
+ ```
212
+ ServerHelpNavigation — server-side navigation with configurable search visibility and locale
213
+ {"tool":"select_component","name":"ServerHelpNavigation","reason":"navigation UI — renders help navigation with configurable locale and search toggle"}
214
+ ```
215
+
216
+ ```
217
+ TextImageCard — card with rich text and background image
218
+ {"tool":"select_component","name":"TextImageCard","reason":"content card UI — configurable rich text, image, and layout"}
219
+ ```
220
+
221
+ ```
222
+ SearchInput — search field with dropdown
223
+ {"tool":"select_component","name":"SearchInput","reason":"search UI — configurable placeholder and state"}
224
+ ```
225
+
226
+ ---
227
+
228
+ ## Existing entities in the target space
229
+
230
+ The preamble may include an "Existing components in the target Contentful space" JSON block and a rolled-up token summary. Use them as **signal, not as a filter**. Rules:
231
+
232
+ 1. Never let a name overlap force a decision. Acceptance is still driven purely by "does the codebase component render visible, authorable UI?" — a name match does not auto-accept, and a name conflict does not auto-reject.
233
+ 2. When a codebase component appears to correspond to an existing space component (name overlap, semantic overlap in the description), note it in your `reason` — e.g. `"accepted; likely maps to existing space component 'Button'"`. This surfaces the mapping for downstream review.
234
+ 3. When the space is mature (many existing components, dozens of tokens) and the codebase has thin wrappers with no visible UI difference, lean harder toward rejecting the wrappers. Extra noise in a mature space is more costly than in an empty one.
235
+ 4. When no overlap exists, the acceptance decision is unchanged from the rules above.
@@ -1,29 +0,0 @@
1
- interface StepResult {
2
- step: string;
3
- status: 'complete' | 'failed' | 'skipped';
4
- durationMs?: number;
5
- reason?: string;
6
- detail?: Record<string, unknown>;
7
- error?: string;
8
- }
9
- interface PipelineResult {
10
- session: string;
11
- project: string;
12
- steps: StepResult[];
13
- cycleError?: {
14
- report: string[];
15
- };
16
- }
17
- export interface SpawnV1ImportOptions {
18
- project?: string;
19
- tokens?: string;
20
- onProgress?: (line: string) => void;
21
- }
22
- export interface SpawnV1ImportResult {
23
- exitCode: number;
24
- result?: PipelineResult;
25
- stdout: string;
26
- stderr: string;
27
- }
28
- export declare function spawnV1Import(options?: SpawnV1ImportOptions): Promise<SpawnV1ImportResult>;
29
- export {};
@@ -1,2 +0,0 @@
1
- export declare function stopReadingTerminal(): Promise<void>;
2
- export declare function startReadingTerminal(): void;
@@ -1,27 +0,0 @@
1
- /**
2
- * Resolution chain for the combined `--agent` override on `experiences import`.
3
- *
4
- * The wizard path previously hard-defaulted `--agent` to `'claude'` at the
5
- * commander layer, which (a) shadowed the stored `credentials.json` value when
6
- * the user passed no flag, and (b) made it impossible to distinguish "user
7
- * explicitly passed --agent claude" from "user passed nothing". The combined
8
- * flag accepts either `agent:model` or `agent model`.
9
- *
10
- * These helpers produce the resolved values to feed into `WizardApp` /
11
- * the import wizard:
12
- *
13
- * 1. CLI flag wins when provided.
14
- * 2. Otherwise, the value persisted in `credentials.json` (written by
15
- * `experiences setup`) is used.
16
- * 3. Otherwise, the built-in default (currently `'claude'`) is used for
17
- * the agent. Model has no default — agents pick a small/fast model
18
- * themselves when no model is included in `--agent`.
19
- */
20
- /** Built-in fallback agent when neither a flag nor a stored preference is set. */
21
- export declare const DEFAULT_AGENT = "claude";
22
- export declare function parseAgentModel(value: string | undefined): {
23
- agent?: string;
24
- model?: string;
25
- };
26
- export declare function resolveAgent(flagValue: string | undefined, storedValue: string | undefined): string;
27
- export declare function resolveModel(flagValue: string | undefined, storedValue: string | undefined): string | undefined;
@@ -1,2 +0,0 @@
1
- import type { Command } from 'commander';
2
- export declare function registerImportCommand(program: Command): void;
@@ -1,7 +0,0 @@
1
- export type CompositionOptionInput = {
2
- prompt?: string[];
3
- };
4
- export type CompositionForwardingOptions = {
5
- promptOverrides?: string[];
6
- };
7
- export declare function buildCompositionForwardingOptions(options: CompositionOptionInput): CompositionForwardingOptions;