@contentful/experience-design-system-cli 2.42.1-dev-build-f69db6bf.0 → 2.42.1-dev-build-fb965e69.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.
- package/bin/cli.js +1 -1
- package/dist/app.js +24734 -16921
- package/dist/index.js +34651 -25246
- package/dist/package.json +1 -1
- package/dist/src/commands/import-options.d.ts +8 -0
- package/dist/src/tui/debug-store.d.ts +2 -0
- package/dist/src/tui/import/cancellation.d.ts +26 -0
- package/dist/src/tui/import/debug-resume-screen.d.ts +7 -0
- package/dist/src/tui/import/debug-resume.d.ts +53 -0
- package/dist/src/tui/import/shared/agent-activity.d.ts +2 -0
- package/dist/src/tui/import/shared/running-step/logic.d.ts +7 -0
- package/dist/src/tui/import/shared/running-step/running-step.d.ts +2 -1
- package/dist/src/tui/import/shared/running-step/use-elapsed.d.ts +1 -0
- package/dist/src/tui/import/steps/03-path-validation/logic.d.ts +1 -0
- package/dist/src/tui/import/steps/03-path-validation/screen.d.ts +1 -0
- package/dist/src/tui/import/steps/06-extraction/logic.d.ts +2 -4
- package/dist/src/tui/import/steps/06-extraction/run-tokens-only.d.ts +1 -0
- package/dist/src/tui/import/steps/06-extraction/run.d.ts +9 -9
- package/dist/src/tui/import/steps/06-extraction/selection.d.ts +7 -1
- package/dist/src/tui/import/steps/06-extraction/types.d.ts +13 -0
- package/dist/src/tui/import/steps/07-scope-gate/graph/index.d.ts +3 -1
- package/dist/src/tui/import/steps/07-scope-gate/screen.d.ts +2 -1
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/ai-flag.d.ts +0 -1
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.d.ts +2 -0
- package/dist/src/tui/import/steps/07-scope-gate/state.d.ts +5 -2
- package/dist/src/tui/import/steps/07-scope-gate/types.d.ts +4 -6
- package/dist/src/tui/import/steps/07-scope-gate/use-scope-gate-flow.d.ts +3 -0
- package/dist/src/tui/import/steps/07-scope-gate/use-scope-gate.d.ts +7 -3
- package/dist/src/tui/import/steps/08-generation/logic.d.ts +2 -8
- package/dist/src/tui/import/steps/08-generation/map-tokens.d.ts +1 -1
- package/dist/src/tui/import/steps/08-generation/run.d.ts +9 -1
- package/dist/src/tui/import/steps/08-generation/save-decisions.d.ts +3 -5
- package/dist/src/tui/import/steps/08-generation/types.d.ts +15 -5
- package/dist/src/tui/import/steps/09-review/components/FieldEditor.d.ts +50 -2
- package/dist/src/tui/import/steps/09-review/components/RepresentationEditor.d.ts +11 -0
- package/dist/src/tui/import/steps/09-review/components/ReviewComponentPanel.d.ts +4 -1
- package/dist/src/tui/import/steps/09-review/components/ReviewDetailsEditor.d.ts +1 -1
- package/dist/src/tui/import/steps/09-review/components/source-observation-rows.d.ts +3 -0
- package/dist/src/tui/import/steps/09-review/generate-review-step.d.ts +17 -0
- package/dist/src/tui/import/steps/09-review/graph/cycle-view.d.ts +3 -0
- package/dist/src/tui/import/steps/09-review/history.d.ts +1 -0
- package/dist/src/tui/import/steps/09-review/persist-review-entry.d.ts +14 -0
- package/dist/src/tui/import/steps/09-review/review-details-panel.d.ts +1 -2
- package/dist/src/tui/import/steps/09-review/review-models.d.ts +12 -0
- package/dist/src/tui/import/steps/09-review/run-live-preview.d.ts +1 -0
- package/dist/src/tui/import/steps/09-review/types.d.ts +2 -1
- package/dist/src/tui/import/steps/09-review/use-review-editor.d.ts +7 -2
- package/dist/src/tui/import/steps/10-flow/flow/preview.d.ts +1 -0
- package/dist/src/tui/import/steps/10-flow/flow/push.d.ts +2 -0
- package/dist/src/tui/import/steps/10-flow/flow/save.d.ts +2 -0
- package/dist/src/tui/settings/PreferenceScreen.d.ts +17 -0
- package/package.json +3 -3
- package/skills/consensus/check.md +6 -0
- package/skills/consensus/tier.md +5 -0
- package/skills/consensus/verify.md +6 -0
- package/skills/debate-select.md +37 -0
- package/skills/explore/components.md +30 -0
- package/skills/explore/full-inventory.md +27 -0
- package/skills/explore/model-component.md +44 -0
- package/skills/explore/rules.md +20 -0
- package/skills/generate-components.md +156 -427
- package/skills/generate-tokens.md +1 -7
- package/skills/map-tokens.md +1 -1
- package/skills/select-components.md +20 -159
- package/dist/src/tui/import/steps/10-flow/support/use-timed-spinner.d.ts +0 -4
|
@@ -185,10 +185,4 @@ Before emitting any tool calls, verify:
|
|
|
185
185
|
6. No duplicate paths.
|
|
186
186
|
7. `set_group` calls precede the `set_token` calls under them.
|
|
187
187
|
|
|
188
|
-
|
|
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.
|
|
188
|
+
Before finishing, review the token output against this checklist and iterate on any warning the supplied input can resolve. Preserve unresolved warnings in the token `description`; do not guess values.
|
package/skills/map-tokens.md
CHANGED
|
@@ -26,7 +26,7 @@ If no token path index is provided, there is nothing to narrow against — do no
|
|
|
26
26
|
|
|
27
27
|
For each design-category, token-typed prop shown in the "Generated CDF so far" section:
|
|
28
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
|
|
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 a primitive with typed `values` 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
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
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
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.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
4
|
|
|
5
|
-
Review the extracted
|
|
5
|
+
Review the extracted component definition(s) provided below and decide whether each belongs in **Contentful Experience Orchestration** as a Component Type. Use the supplied framework and source evidence; supported inputs may come from more than one UI framework. 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
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -20,59 +20,14 @@ The entity being defined — a **Component Type** — is the schema that tells C
|
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Source purpose and inclusion
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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.
|
|
25
|
+
Assess the component's declared purpose, visible/configurable surface and actual flow from the supplied source and renderer contract.
|
|
26
|
+
Do not use component names, framework families, property counts, styles, callback shapes, structural-only inputs or a known component pattern as an authorability recipe.
|
|
27
|
+
A renderable input, including a render callback, may be a source-supported configurable region even when its observed callers are missing or text-only.
|
|
28
|
+
Reject only when the supplied source establishes why the entity is outside the target component contract; absence from bounded excerpts is uncertainty.
|
|
29
|
+
A wrapper's behavior and delegated data are evidence to inspect, not a blanket rejection rule.
|
|
30
|
+
Preserve uncertain inclusion for human review and explain what the source supports.
|
|
76
31
|
|
|
77
32
|
## Using `selectionContext`
|
|
78
33
|
|
|
@@ -84,6 +39,16 @@ If the input includes `selectionContext`, treat it as the only repo-level contex
|
|
|
84
39
|
- resolver or registry references
|
|
85
40
|
- one likely parent usage site
|
|
86
41
|
|
|
42
|
+
## Source evidence and selection uncertainty
|
|
43
|
+
|
|
44
|
+
- Make acceptance or rejection decisions from the supplied definition and captured evidence. Component names, framework labels, familiar patterns, prop counts, or a likely match in an existing model do not prove the component's purpose or rendering behavior by themselves.
|
|
45
|
+
- Captured source references, observations, and parent usage are bounded context. A single caller shows an example of use, not the complete contract or all uses. Missing callers, imports, sibling files, or excerpts do not prove that a component is unused, non-rendering, or an infrastructure wrapper.
|
|
46
|
+
- Treat existing model summaries as optional alignment context. They cannot force acceptance or rejection, and a mature model does not change the evidence required for a decision.
|
|
47
|
+
- When evidence does not establish whether a component defines author-facing UI, preserve that uncertainty in the reason and lower confidence. Do not turn missing evidence into a rejection.
|
|
48
|
+
- The inline context does not provide repository tools, filesystem or working-directory access, a complete compiler graph, final consensus, or an authorability guarantee.
|
|
49
|
+
|
|
50
|
+
The example component names below are illustrative. Apply an example's decision only when the supplied evidence supports the described behavior; a name alone is not evidence.
|
|
51
|
+
|
|
87
52
|
Use that bounded context to distinguish the author-facing renderer from infrastructure wrappers. In particular:
|
|
88
53
|
|
|
89
54
|
- If the component imports a sibling renderer and mainly forwards fetched data into it, reject the wrapper and prefer the sibling renderer.
|
|
@@ -121,115 +86,11 @@ Emit one JSON object on a single line. Lines not starting with `{` are ignored b
|
|
|
121
86
|
|
|
122
87
|
---
|
|
123
88
|
|
|
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
89
|
## Existing entities in the target space
|
|
229
90
|
|
|
230
91
|
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
92
|
|
|
232
|
-
1. Never let a name overlap force a decision.
|
|
93
|
+
1. Never let a name overlap force a decision. Decide from supplied evidence about whether the component renders visible, author-facing UI; a name match does not auto-accept, and a name conflict does not auto-reject.
|
|
233
94
|
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.
|
|
95
|
+
3. A mature space does not change the evidence threshold for deciding whether a component is an author-facing UI surface. Record possible duplication for review without using model size to reject a component.
|
|
235
96
|
4. When no overlap exists, the acceptance decision is unchanged from the rules above.
|