@se-studio/project-build 1.0.131 → 1.0.133
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/CHANGELOG.md +12 -0
- package/README.md +13 -14
- package/package.json +2 -4
- package/dist/management/sync-skills.d.ts +0 -4
- package/dist/management/sync-skills.d.ts.map +0 -1
- package/dist/management/sync-skills.js +0 -97
- package/dist/management/sync-skills.js.map +0 -1
- package/dist/seskills.d.ts +0 -9
- package/dist/seskills.d.ts.map +0 -1
- package/dist/seskills.js +0 -32
- package/dist/seskills.js.map +0 -1
- package/skills/contentful-cms/alt-text-audit/SKILL.md +0 -60
- package/skills/contentful-cms/cms-guidelines/README.md +0 -166
- package/skills/contentful-cms/cms-guidelines/colour-hint-prompt.md +0 -77
- package/skills/contentful-cms/cms-guidelines/evaluation-prompt.md +0 -84
- package/skills/contentful-cms/cms-guidelines/generate-component-guidelines.md +0 -126
- package/skills/contentful-cms/cms-guidelines/generation-prompt.md +0 -231
- package/skills/contentful-cms/cms-guidelines/html-component-authoring.md +0 -401
- package/skills/contentful-cms/cms-guidelines/validation-prompt.md +0 -170
- package/skills/contentful-cms/cms-guidelines/variant-loop.md +0 -189
- package/skills/contentful-cms/cms-guidelines/variant-proposal-prompt.md +0 -131
- package/skills/contentful-cms/core/SKILL.md +0 -793
- package/skills/contentful-cms/generate-all-guidelines/SKILL.md +0 -313
- package/skills/contentful-cms/generate-cms-guidelines/SKILL.md +0 -313
- package/skills/contentful-cms/image-guide/SKILL.md +0 -240
- package/skills/contentful-cms/manifest.json +0 -11
- package/skills/contentful-cms/navigation/SKILL.md +0 -23
- package/skills/contentful-cms/rich-text/SKILL.md +0 -96
- package/skills/contentful-cms/schema-org/SKILL.md +0 -74
- package/skills/contentful-cms/screenshots/SKILL.md +0 -46
- package/skills/contentful-cms/seo-descriptions/SKILL.md +0 -54
- package/skills/contentful-cms/templates/SKILL.md +0 -21
- package/skills/contentful-cms/update-cms-guidelines/SKILL.md +0 -348
- package/skills/se-marketing-sites/cms-routes-and-appshared/SKILL.md +0 -99
- package/skills/se-marketing-sites/create-collection/SKILL.md +0 -295
- package/skills/se-marketing-sites/create-component/SKILL.md +0 -250
- package/skills/se-marketing-sites/create-page/SKILL.md +0 -129
- package/skills/se-marketing-sites/curate-showcase-mocks/SKILL.md +0 -343
- package/skills/se-marketing-sites/handling-media/SKILL.md +0 -195
- package/skills/se-marketing-sites/lib-cms-structure/SKILL.md +0 -83
- package/skills/se-marketing-sites/register-cms-features/SKILL.md +0 -95
- package/skills/se-marketing-sites/styling-system/SKILL.md +0 -122
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
# Variant Loop — Orchestrator
|
|
2
|
-
|
|
3
|
-
**Step 4.4 — Orchestration of: propose → screenshot → evaluate.**
|
|
4
|
-
|
|
5
|
-
This document describes the full variant loop for one CMS type. Run it as a **Cursor agent task**,
|
|
6
|
-
or manually follow the steps below.
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Overview
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
┌──────────────────────────────────────────────────┐
|
|
14
|
-
│ INPUT: typeName, source file path, N │
|
|
15
|
-
└──────────────────────┬───────────────────────────┘
|
|
16
|
-
│
|
|
17
|
-
▼
|
|
18
|
-
┌──────────────────────────────────────────────────┐
|
|
19
|
-
│ Step 1: Propose N variants (LLM) │
|
|
20
|
-
│ → variants.json (typeName, variants[]) │
|
|
21
|
-
└──────────────────────┬───────────────────────────┘
|
|
22
|
-
│
|
|
23
|
-
▼
|
|
24
|
-
┌──────────────────────────────────────────────────┐
|
|
25
|
-
│ Step 2: Capture screenshots │
|
|
26
|
-
│ → docs/cms-guidelines/screenshots/{mode}s/<n>.png│
|
|
27
|
-
└──────────────────────┬───────────────────────────┘
|
|
28
|
-
│
|
|
29
|
-
▼
|
|
30
|
-
┌──────────────────────────────────────────────────┐
|
|
31
|
-
│ Step 3: Evaluate screenshot diversity (LLM) │
|
|
32
|
-
│ → suitablyDifferent, acceptedVariants, rejected │
|
|
33
|
-
└──────────────────────┬───────────────────────────┘
|
|
34
|
-
│
|
|
35
|
-
┌────────────┴─────────────┐
|
|
36
|
-
│ suitablyDifferent? │
|
|
37
|
-
▼ YES ▼ NO + attempts < 2×N
|
|
38
|
-
┌──────────────────┐ ┌──────────────────────────────┐
|
|
39
|
-
│ Accept set; │ │ Capture suggested new │
|
|
40
|
-
│ proceed to gen │ │ variants; re-evaluate │
|
|
41
|
-
└──────────────────┘ └──────────────────────────────┘
|
|
42
|
-
│ attempts >= 2×N
|
|
43
|
-
▼
|
|
44
|
-
┌──────────────────────────┐
|
|
45
|
-
│ Accept best set so far │
|
|
46
|
-
└──────────────────────────┘
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## Cursor agent task
|
|
52
|
-
|
|
53
|
-
**Assign this task to a Cursor subagent.** Provide:
|
|
54
|
-
- `apps/example-brightline/src/project/components/<TypeName>.tsx` (component source)
|
|
55
|
-
- `generated/cms-discovery/field-list.json` (field metadata including enum values)
|
|
56
|
-
- `generated/cms-discovery/theme-context.md` (palette + typography — authoritative colour names)
|
|
57
|
-
- `scripts/guidelines/variant-proposal-prompt.md` (variant proposal instructions)
|
|
58
|
-
- `scripts/guidelines/evaluation-prompt.md` (evaluation instructions)
|
|
59
|
-
- `scripts/guidelines/capture-screenshots.mjs` (screenshot tool)
|
|
60
|
-
- This file (orchestration rules)
|
|
61
|
-
|
|
62
|
-
**Task prompt:**
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
Run the variant loop for <TypeName>:
|
|
66
|
-
|
|
67
|
-
1. PROPOSE: Read the component source file, field list, and theme-context.md (for palette names).
|
|
68
|
-
Using the instructions in scripts/guidelines/variant-proposal-prompt.md, produce a variants.json
|
|
69
|
-
for <TypeName>. Use N = 5 (or fewer if the component is simple).
|
|
70
|
-
IMPORTANT: use only colour names from theme-context.md — do NOT invent colour names.
|
|
71
|
-
|
|
72
|
-
2. CAPTURE: Run:
|
|
73
|
-
node scripts/guidelines/capture-screenshots.mjs --variants /tmp/variants.json
|
|
74
|
-
This saves screenshots to docs/cms-guidelines/screenshots/.
|
|
75
|
-
|
|
76
|
-
3. EVALUATE: Using the instructions in scripts/guidelines/evaluation-prompt.md, look at
|
|
77
|
-
the captured screenshots and produce an evaluation JSON.
|
|
78
|
-
- If suitablyDifferent = true: proceed to Step 4.
|
|
79
|
-
- If suitablyDifferent = false AND total attempts < 2 × N:
|
|
80
|
-
Extend variants.json with 1–2 new variants from the suggestions, capture them,
|
|
81
|
-
re-evaluate. Repeat until suitablyDifferent = true or 2×N total attempts.
|
|
82
|
-
- If 2×N attempts reached: accept the best acceptedVariants set seen.
|
|
83
|
-
|
|
84
|
-
4. WRITE ACCEPTED LIST: Save the final accepted variant list to:
|
|
85
|
-
generated/cms-discovery/accepted-variants/{components|collections|externals}/<type-slug>.json
|
|
86
|
-
Use the `mode` field to pick the subdir: component → components/, collection → collections/, external → externals/.
|
|
87
|
-
Format: { "typeName": "<TypeName>", "mode": "<mode>", "variants": [...] }
|
|
88
|
-
|
|
89
|
-
5. COMMIT: git add docs/cms-guidelines/screenshots/ generated/cms-discovery/
|
|
90
|
-
git commit -m "chore(bl): variant screenshots for <TypeName>"
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Manual steps
|
|
96
|
-
|
|
97
|
-
If running manually:
|
|
98
|
-
|
|
99
|
-
### 1 — Propose variants
|
|
100
|
-
|
|
101
|
-
Feed the component source file to an LLM with the prompt in
|
|
102
|
-
`scripts/guidelines/variant-proposal-prompt.md`.
|
|
103
|
-
|
|
104
|
-
Save the output as `/tmp/<type-slug>-variants.json`.
|
|
105
|
-
|
|
106
|
-
Example for Hero:
|
|
107
|
-
```json
|
|
108
|
-
{
|
|
109
|
-
"typeName": "Hero",
|
|
110
|
-
"mode": "component",
|
|
111
|
-
"variants": [
|
|
112
|
-
{ "label": "default", "description": "All fields.", "showcaseParams": {} },
|
|
113
|
-
{ "label": "no-visual", "description": "No visual.", "showcaseParams": { "showVisual": "false" } },
|
|
114
|
-
{ "label": "navy", "description": "Navy bg.", "showcaseParams": { "backgroundColour": "Navy", "textColour": "Off White" } },
|
|
115
|
-
{ "label": "pine", "description": "Pine bg.", "showcaseParams": { "backgroundColour": "Pine", "textColour": "Off White" } },
|
|
116
|
-
{ "label": "minimal", "description": "Heading only.", "showcaseParams": { "showVisual": "false", "showLinks": "false" } }
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### 2 — Capture screenshots
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
# From apps/example-brightline
|
|
125
|
-
node scripts/guidelines/capture-screenshots.mjs --variants /tmp/hero-variants.json
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Saves to `docs/cms-guidelines/screenshots/components/hero-*.png` (or `collections/` for collection types).
|
|
129
|
-
|
|
130
|
-
### 3 — Evaluate
|
|
131
|
-
|
|
132
|
-
Feed the screenshots + evaluation prompt to an LLM. The LLM looks at the images and
|
|
133
|
-
returns `suitablyDifferent`, `acceptedVariants`, `rejectedVariants`, and `suggestions`.
|
|
134
|
-
|
|
135
|
-
If not suitably different: replace rejected screenshots with suggestions, re-capture, re-evaluate.
|
|
136
|
-
|
|
137
|
-
### 4 — Save accepted list
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
# Use the appropriate subdir based on mode: components/, collections/, or externals/
|
|
141
|
-
mkdir -p generated/cms-discovery/accepted-variants/components
|
|
142
|
-
# Write manually or via script — e.g. for a component:
|
|
143
|
-
# generated/cms-discovery/accepted-variants/components/hero.json
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
### 5 — Commit
|
|
147
|
-
|
|
148
|
-
```bash
|
|
149
|
-
git add docs/cms-guidelines/screenshots/ generated/cms-discovery/accepted-variants/
|
|
150
|
-
git commit -m "chore(bl): variant screenshots for Hero"
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
|
-
## accepted-variants JSON format
|
|
156
|
-
|
|
157
|
-
```json
|
|
158
|
-
{
|
|
159
|
-
"typeName": "Hero",
|
|
160
|
-
"generatedAt": "2026-03-12",
|
|
161
|
-
"acceptedVariants": [
|
|
162
|
-
{
|
|
163
|
-
"label": "default",
|
|
164
|
-
"description": "All fields populated, no colour override.",
|
|
165
|
-
"screenshotPath": "docs/cms-guidelines/screenshots/components/hero-default.png",
|
|
166
|
-
"showcaseParams": {}
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"label": "navy",
|
|
170
|
-
"description": "Navy background + Off White text.",
|
|
171
|
-
"screenshotPath": "docs/cms-guidelines/screenshots/components/hero-navy.png",
|
|
172
|
-
"showcaseParams": { "backgroundColour": "Navy", "textColour": "Off White" }
|
|
173
|
-
}
|
|
174
|
-
]
|
|
175
|
-
}
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
This file is read by the generation step (Phase 5) to know which screenshots to include
|
|
179
|
-
in the guideline prompt.
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
## Notes
|
|
184
|
-
|
|
185
|
-
- Collections use `--collection <TypeName>` in cms-edit. The capture script handles this via `mode`.
|
|
186
|
-
- If `agent-browser` is not installed, the capture script degrades to URL-only output; run
|
|
187
|
-
`agent-browser install` to enable actual screenshot capture.
|
|
188
|
-
- The variant loop is the most expensive step. For simple components (1–2 visual states),
|
|
189
|
-
N = 3 is usually sufficient.
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
# Variant Proposal Prompt
|
|
2
|
-
|
|
3
|
-
**Step 4.1 — Input/output contract and prompt for proposing component variants.**
|
|
4
|
-
|
|
5
|
-
The variant loop produces screenshots that cover the visual diversity of a component. A good
|
|
6
|
-
set captures: default state, important absent-field states, colour variants, and any layout
|
|
7
|
-
variants (like flipped). The screenshots are then used to write the "What it looks like" and
|
|
8
|
-
"Colours" sections of the guideline.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Input
|
|
13
|
-
|
|
14
|
-
- **Component source file:** full contents of `src/project/components/<Type>.tsx` (or
|
|
15
|
-
`src/project/collections/<Type>.tsx`).
|
|
16
|
-
- **Used fields:** the `USED_FIELDS` or `FIELD_KEYS` from the source file.
|
|
17
|
-
- **Palette:** colour names from `generated/cms-discovery/theme-context.md` (generated by
|
|
18
|
-
`cms-generate-collection-guidelines` from `tailwind.config.json`). This is the authoritative
|
|
19
|
-
source — use it in preference to `field-list.json` or `generated/colors.ts`.
|
|
20
|
-
- **N:** number of variants to propose (typically 4–6 for a component, up to 8 for complex ones).
|
|
21
|
-
|
|
22
|
-
The LLM should output **N variants** in JSON format (see below).
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Prompt
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
You are preparing screenshots for CMS component guidelines.
|
|
30
|
-
|
|
31
|
-
I will give you the source code of a Next.js component that renders a CMS entry.
|
|
32
|
-
Your task: propose N variants that, together, best document how the component looks
|
|
33
|
-
under different conditions. Choose variants that are VISUALLY DISTINCT — a reader
|
|
34
|
-
should be able to tell them apart at a glance.
|
|
35
|
-
|
|
36
|
-
Component source:
|
|
37
|
-
<COMPONENT_SOURCE>
|
|
38
|
-
|
|
39
|
-
Palette (from generated/cms-discovery/theme-context.md — use ONLY these names):
|
|
40
|
-
Background colours (backgroundColour):
|
|
41
|
-
<BACKGROUND_COLOURS>
|
|
42
|
-
|
|
43
|
-
Text colours (textColour, i.e. foreground colours):
|
|
44
|
-
<TEXT_COLOURS>
|
|
45
|
-
|
|
46
|
-
Do NOT invent or paraphrase colour names. Use the exact names from theme-context.md.
|
|
47
|
-
|
|
48
|
-
Rules:
|
|
49
|
-
1. Always include a "default" variant with all optional fields populated and no colour override.
|
|
50
|
-
2. Include at least one variant per important "missing field" state (e.g. no visual, no links).
|
|
51
|
-
3. Include at least one colour variant if the component has backgroundColour (use a dark colour
|
|
52
|
-
like Navy or Deep Periwinkle).
|
|
53
|
-
4. If the component has a flipped/alternate variant (e.g. Hero Flipped), include it.
|
|
54
|
-
5. Avoid variants that will look identical or near-identical to another variant in the list.
|
|
55
|
-
6. N = <N>; produce exactly N variants (or fewer if the component is simple).
|
|
56
|
-
|
|
57
|
-
Output JSON only, no explanation. Format:
|
|
58
|
-
{
|
|
59
|
-
"typeName": "<CMS componentType or collectionType>",
|
|
60
|
-
"variants": [
|
|
61
|
-
{
|
|
62
|
-
"label": "default",
|
|
63
|
-
"description": "All fields populated, no colour override.",
|
|
64
|
-
"showcaseParams": {}
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"label": "no-visual",
|
|
68
|
-
"description": "visual field removed; copy spans full width.",
|
|
69
|
-
"showcaseParams": { "showVisual": "false" }
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"label": "navy-background",
|
|
73
|
-
"description": "Navy background with Off White text.",
|
|
74
|
-
"showcaseParams": { "backgroundColour": "Navy", "textColour": "Off White" }
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
showcaseParams keys must match the cms-edit screenshot --param format:
|
|
80
|
-
backgroundColour, textColour, showVisual, showLinks, showHeading, etc.
|
|
81
|
-
For a flipped variant, use a separate typeName entry for "Hero Flipped".
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## Output contract
|
|
87
|
-
|
|
88
|
-
```json
|
|
89
|
-
{
|
|
90
|
-
"typeName": "Hero",
|
|
91
|
-
"variants": [
|
|
92
|
-
{
|
|
93
|
-
"label": "default",
|
|
94
|
-
"description": "All optional fields populated, no colour override.",
|
|
95
|
-
"showcaseParams": {}
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"label": "no-visual",
|
|
99
|
-
"description": "Visual removed; copy spans full width.",
|
|
100
|
-
"showcaseParams": { "showVisual": "false" }
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"label": "navy",
|
|
104
|
-
"description": "Navy background + Off White text.",
|
|
105
|
-
"showcaseParams": { "backgroundColour": "Navy", "textColour": "Off White" }
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"label": "minimal",
|
|
109
|
-
"description": "Heading only, no eyebrow/subtitle/body/links/visual.",
|
|
110
|
-
"showcaseParams": { "showVisual": "false", "showLinks": "false" }
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
- `label` — used to name the screenshot file: `<typeName-kebab>-<label>.png`
|
|
117
|
-
- `description` — included in the screenshot log and used by the evaluation step
|
|
118
|
-
- `showcaseParams` — key-value pairs passed as `--param key=value` to `cms-edit screenshot`
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
## Notes on N and the cap
|
|
123
|
-
|
|
124
|
-
The orchestrator (Step 4.4) uses N (the number of proposed variants) as a cap:
|
|
125
|
-
|
|
126
|
-
- It will attempt up to **2×N** screenshots in total.
|
|
127
|
-
- If the evaluation step (Step 4.3) concludes the variants are "suitably different" before
|
|
128
|
-
reaching 2×N attempts, it stops early.
|
|
129
|
-
- If not, it requests a new proposal from the LLM for the remaining slots (up to 2×N total).
|
|
130
|
-
|
|
131
|
-
For most components, N = 4–6 produces a good coverage set.
|