@se-studio/project-build 1.0.131 → 1.0.132

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 (42) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +13 -14
  3. package/package.json +2 -4
  4. package/dist/management/sync-skills.d.ts +0 -4
  5. package/dist/management/sync-skills.d.ts.map +0 -1
  6. package/dist/management/sync-skills.js +0 -97
  7. package/dist/management/sync-skills.js.map +0 -1
  8. package/dist/seskills.d.ts +0 -9
  9. package/dist/seskills.d.ts.map +0 -1
  10. package/dist/seskills.js +0 -32
  11. package/dist/seskills.js.map +0 -1
  12. package/skills/contentful-cms/alt-text-audit/SKILL.md +0 -60
  13. package/skills/contentful-cms/cms-guidelines/README.md +0 -166
  14. package/skills/contentful-cms/cms-guidelines/colour-hint-prompt.md +0 -77
  15. package/skills/contentful-cms/cms-guidelines/evaluation-prompt.md +0 -84
  16. package/skills/contentful-cms/cms-guidelines/generate-component-guidelines.md +0 -126
  17. package/skills/contentful-cms/cms-guidelines/generation-prompt.md +0 -231
  18. package/skills/contentful-cms/cms-guidelines/html-component-authoring.md +0 -401
  19. package/skills/contentful-cms/cms-guidelines/validation-prompt.md +0 -170
  20. package/skills/contentful-cms/cms-guidelines/variant-loop.md +0 -189
  21. package/skills/contentful-cms/cms-guidelines/variant-proposal-prompt.md +0 -131
  22. package/skills/contentful-cms/core/SKILL.md +0 -793
  23. package/skills/contentful-cms/generate-all-guidelines/SKILL.md +0 -313
  24. package/skills/contentful-cms/generate-cms-guidelines/SKILL.md +0 -313
  25. package/skills/contentful-cms/image-guide/SKILL.md +0 -240
  26. package/skills/contentful-cms/manifest.json +0 -11
  27. package/skills/contentful-cms/navigation/SKILL.md +0 -23
  28. package/skills/contentful-cms/rich-text/SKILL.md +0 -96
  29. package/skills/contentful-cms/schema-org/SKILL.md +0 -74
  30. package/skills/contentful-cms/screenshots/SKILL.md +0 -46
  31. package/skills/contentful-cms/seo-descriptions/SKILL.md +0 -54
  32. package/skills/contentful-cms/templates/SKILL.md +0 -21
  33. package/skills/contentful-cms/update-cms-guidelines/SKILL.md +0 -348
  34. package/skills/se-marketing-sites/cms-routes-and-appshared/SKILL.md +0 -99
  35. package/skills/se-marketing-sites/create-collection/SKILL.md +0 -295
  36. package/skills/se-marketing-sites/create-component/SKILL.md +0 -250
  37. package/skills/se-marketing-sites/create-page/SKILL.md +0 -129
  38. package/skills/se-marketing-sites/curate-showcase-mocks/SKILL.md +0 -343
  39. package/skills/se-marketing-sites/handling-media/SKILL.md +0 -195
  40. package/skills/se-marketing-sites/lib-cms-structure/SKILL.md +0 -83
  41. package/skills/se-marketing-sites/register-cms-features/SKILL.md +0 -95
  42. package/skills/se-marketing-sites/styling-system/SKILL.md +0 -122
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @se-studio/project-build
2
2
 
3
+ ## 1.0.132
4
+
5
+ ### Patch Changes
6
+
7
+ - Version bump: patch for changed packages
8
+
3
9
  ## 1.0.131
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -56,23 +56,28 @@ pnpm setailwind
56
56
  pnpm setup-colours
57
57
  ```
58
58
 
59
- ### Skills sync (seskills)
59
+ ### Agent skills
60
60
 
61
- Skills are sourced from `packages/project-build/skills/` and can be synced into an app’s `.agents/skills/` directory so the app has the same marketing-site skills as the package. Add a `.cursor/skills` → `.agents/skills` symlink if the editor only discovers `.cursor/skills`.
61
+ SE Studio skills are now published as a separate package: **`@se-studio/skills`**. Skill source files live in `packages/skills/skills/`.
62
62
 
63
- **From an app directory** (e.g. `apps/example-brightline`):
63
+ **In the monorepo**, run from the repo root to sync skills into `.agents/skills/`:
64
64
 
65
65
  ```bash
66
- pnpm exec seskills sync
66
+ pnpm skills:sync
67
67
  ```
68
68
 
69
- **From the repo root** (sync into a specific app):
69
+ **In external projects**, install skills via the `skills` CLI:
70
70
 
71
71
  ```bash
72
- pnpm exec seskills sync apps/example-brightline
72
+ npx skills add @se-studio/skills
73
73
  ```
74
74
 
75
- This copies the contents of `project-build/skills/` into the target’s `.agents/skills/`. Run after pulling changes to project-build skills or when setting up a new app.
75
+ Add to your project’s `package.json` to auto-install on `pnpm install`:
76
+
77
+ ```json
78
+ "devDependencies": { "@se-studio/skills": "^1.0.0" },
79
+ "scripts": { "postinstall": "npx skills update -y" }
80
+ ```
76
81
 
77
82
  ## API Reference
78
83
 
@@ -111,13 +116,7 @@ setup-colours
111
116
  ```
112
117
 
113
118
  #### `seskills sync [target-dir]`
114
- Syncs skills from `packages/project-build/skills/` into a project’s `.agents/skills/`. Default target is current working directory.
115
-
116
- **Usage:**
117
- ```bash
118
- seskills sync # sync into current directory
119
- seskills sync apps/example-om1 # sync into given path
120
- ```
119
+ Deprecated. Use `npx skills add @se-studio/skills` instead. See `packages/skills/` for the canonical skill sources.
121
120
 
122
121
  For detailed JSDoc documentation on all exports, see the TypeScript declaration files (`.d.ts`) in the package.
123
122
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/project-build",
3
- "version": "1.0.131",
3
+ "version": "1.0.132",
4
4
  "description": "Build tools and management scripts for SE Studio projects",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,7 +28,6 @@
28
28
  "bin": {
29
29
  "setailwind": "./dist/setailwind.js",
30
30
  "setup-colours": "./dist/management/setupColours.js",
31
- "seskills": "./dist/seskills.js",
32
31
  "generate-showcase-data": "./dist/generate-showcase-data.js",
33
32
  "generate-showcase-mocks": "./dist/generate-showcase-mocks.js",
34
33
  "cms-generate-field-list": "./dist/cms-generate-field-list.js",
@@ -40,7 +39,6 @@
40
39
  },
41
40
  "files": [
42
41
  "dist",
43
- "skills",
44
42
  "*.md"
45
43
  ],
46
44
  "keywords": [
@@ -76,7 +74,7 @@
76
74
  "vitest": "^4.1.4"
77
75
  },
78
76
  "scripts": {
79
- "build": "node scripts/merge-contentful-skills.mjs && tsc --project tsconfig.build.json",
77
+ "build": "tsc --project tsconfig.build.json",
80
78
  "dev": "tsc --project tsconfig.build.json --watch",
81
79
  "type-check": "tsc --noEmit",
82
80
  "lint": "biome lint .",
@@ -1,4 +0,0 @@
1
- export declare function syncSkills(targetDir?: string,
2
- /** When true, exits silently (code 0) if not running as an installed package. Safe for postinstall. */
3
- ifInstalled?: boolean): Promise<void>;
4
- //# sourceMappingURL=sync-skills.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sync-skills.d.ts","sourceRoot":"","sources":["../../src/management/sync-skills.ts"],"names":[],"mappings":"AA+CA,wBAAsB,UAAU,CAC9B,SAAS,GAAE,MAAsB;AACjC,uGAAuG;AACvG,WAAW,UAAQ,iBAsEpB"}
@@ -1,97 +0,0 @@
1
- import * as fs from 'node:fs';
2
- import * as path from 'node:path';
3
- import { fileURLToPath } from 'node:url';
4
- const __filename = fileURLToPath(import.meta.url);
5
- const __dirname = path.dirname(__filename);
6
- async function copyDir(src, dest) {
7
- await fs.promises.mkdir(dest, { recursive: true });
8
- const entries = await fs.promises.readdir(src, { withFileTypes: true });
9
- for (const entry of entries) {
10
- const srcPath = path.join(src, entry.name);
11
- const destPath = path.join(dest, entry.name);
12
- if (entry.isDirectory()) {
13
- await copyDir(srcPath, destPath);
14
- }
15
- else {
16
- await fs.promises.copyFile(srcPath, destPath);
17
- }
18
- }
19
- }
20
- async function flattenGroup(srcGroupDir, prefix, targetDir) {
21
- if (!fs.existsSync(srcGroupDir))
22
- return;
23
- const entries = await fs.promises.readdir(srcGroupDir, { withFileTypes: true });
24
- for (const entry of entries) {
25
- if (!entry.isDirectory())
26
- continue;
27
- await copyDir(path.join(srcGroupDir, entry.name), path.join(targetDir, `${prefix}-${entry.name}`));
28
- }
29
- }
30
- /**
31
- * Returns true when this script is running from inside a pnpm/npm workspace
32
- * (i.e. as a local package, not as an installed dependency from the registry).
33
- *
34
- * Detection: if the path to this file does NOT contain "node_modules" then we
35
- * are running from the workspace source — syncing would overwrite the canonical
36
- * skill files with the distributed copies, which is the wrong direction.
37
- */
38
- function isWorkspacePackage() {
39
- return !__dirname.includes('node_modules');
40
- }
41
- export async function syncSkills(targetDir = process.cwd(),
42
- /** When true, exits silently (code 0) if not running as an installed package. Safe for postinstall. */
43
- ifInstalled = false) {
44
- if (isWorkspacePackage()) {
45
- if (ifInstalled) {
46
- // Running inside the monorepo during a workspace install — skip silently.
47
- return;
48
- }
49
- console.warn('Warning: seskills sync is running from a workspace package (not from node_modules).\n' +
50
- 'Skipping to avoid overwriting canonical skill files in the monorepo.\n' +
51
- 'Run `seskills sync` from an external project that has @se-studio/project-build installed.');
52
- return;
53
- }
54
- // Locate the skills directory relative to this file (dist/management/sync-skills.js)
55
- // dist/management/ -> dist/ -> package root -> skills/
56
- const packageRoot = path.resolve(__dirname, '..', '..');
57
- const skillsSourceDir = path.join(packageRoot, 'skills');
58
- const skillsTargetDir = path.join(targetDir, '.agents', 'skills');
59
- console.log(`Syncing skills from ${skillsSourceDir} to ${skillsTargetDir}...`);
60
- try {
61
- try {
62
- await fs.promises.access(skillsSourceDir);
63
- }
64
- catch {
65
- console.error(`Error: Skills directory not found at ${skillsSourceDir}`);
66
- console.error('This may be because the package was not built or installed correctly.');
67
- return;
68
- }
69
- // Remove stale nested group dirs and flat aliases before rebuilding
70
- const groups = ['contentful-cms', 'se-marketing-sites', 'site-workflows'];
71
- try {
72
- const existing = await fs.promises.readdir(skillsTargetDir, { withFileTypes: true });
73
- for (const entry of existing) {
74
- if (!entry.isDirectory())
75
- continue;
76
- const isNestedGroup = groups.includes(entry.name);
77
- const isFlatAlias = groups.some((g) => entry.name.startsWith(`${g}-`));
78
- if (isNestedGroup || isFlatAlias) {
79
- await fs.promises.rm(path.join(skillsTargetDir, entry.name), { recursive: true });
80
- }
81
- }
82
- }
83
- catch {
84
- // target dir may not exist yet — fine
85
- }
86
- // Flatten group dirs into <group>-<skill>/ at the top level
87
- await flattenGroup(path.join(skillsSourceDir, 'contentful-cms'), 'contentful-cms', skillsTargetDir);
88
- await flattenGroup(path.join(skillsSourceDir, 'se-marketing-sites'), 'se-marketing-sites', skillsTargetDir);
89
- await flattenGroup(path.join(skillsSourceDir, 'site-workflows'), 'site-workflows', skillsTargetDir);
90
- console.log('Skills synced successfully.');
91
- }
92
- catch (error) {
93
- console.error('Error syncing skills:', error);
94
- process.exit(1);
95
- }
96
- }
97
- //# sourceMappingURL=sync-skills.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sync-skills.js","sourceRoot":"","sources":["../../src/management/sync-skills.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAE3C,KAAK,UAAU,OAAO,CAAC,GAAW,EAAE,IAAY;IAC9C,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAExE,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAE7C,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,MAAM,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACnC,CAAC;aAAM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I,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;gBACpF,CAAC;YACH,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,sCAAsC;QACxC,CAAC;QAED,4DAA4D;QAC5D,MAAM,YAAY,CAChB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,gBAAgB,CAAC,EAC5C,gBAAgB,EAChB,eAAe,CAChB,CAAC;QACF,MAAM,YAAY,CAChB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,oBAAoB,CAAC,EAChD,oBAAoB,EACpB,eAAe,CAChB,CAAC;QACF,MAAM,YAAY,CAChB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,gBAAgB,CAAC,EAC5C,gBAAgB,EAChB,eAAe,CAChB,CAAC;QAEF,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;IAC7C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;QAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * seskills - Skill management CLI for SE Studio projects
4
- *
5
- * Usage:
6
- * seskills sync [target-dir]
7
- */
8
- export {};
9
- //# sourceMappingURL=seskills.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"seskills.d.ts","sourceRoot":"","sources":["../src/seskills.ts"],"names":[],"mappings":";AACA;;;;;GAKG"}
package/dist/seskills.js DELETED
@@ -1,32 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * seskills - Skill management CLI for SE Studio projects
4
- *
5
- * Usage:
6
- * seskills sync [target-dir]
7
- */
8
- import { syncSkills } from './management/sync-skills.js';
9
- async function main() {
10
- const args = process.argv.slice(2);
11
- const command = args[0];
12
- if (command === 'sync') {
13
- // Filter out flags from positional args
14
- const positional = args.slice(1).filter((a) => !a.startsWith('--'));
15
- const ifInstalled = args.includes('--if-installed');
16
- const targetDir = positional[0] || process.cwd();
17
- await syncSkills(targetDir, ifInstalled);
18
- }
19
- else {
20
- console.log('Usage: seskills sync [target-dir] [--if-installed]');
21
- console.log('');
22
- console.log(' --if-installed Exit silently when running as a workspace package.');
23
- console.log(' Use this in a postinstall script so it only runs in');
24
- console.log(' external projects, not inside the monorepo.');
25
- process.exit(1);
26
- }
27
- }
28
- main().catch((err) => {
29
- console.error(err);
30
- process.exit(1);
31
- });
32
- //# sourceMappingURL=seskills.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"seskills.js","sourceRoot":"","sources":["../src/seskills.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,KAAK,UAAU,IAAI;IACjB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAExB,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;QACvB,wCAAwC;QACxC,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QACpE,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;QACpD,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QACjD,MAAM,UAAU,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IAC3C,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,oDAAoD,CAAC,CAAC;QAClE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,sEAAsE,CAAC,CAAC;QACpF,OAAO,CAAC,GAAG,CAAC,uEAAuE,CAAC,CAAC;QACrF,OAAO,CAAC,GAAG,CAAC,+DAA+D,CAAC,CAAC;QAC7E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,60 +0,0 @@
1
- ---
2
- name: "Alt Text Audit"
3
- description: "Audit and improve image alt text across site pages using cms-edit, with brand-aware terminology and accessibility best practices."
4
- ---
5
-
6
- # Skill: contentful-cms — Alt Text Audit
7
-
8
- Use this skill when auditing or improving **image alt text** across a site's pages using `cms-edit`. Works with any brand context skill for customer-specific terminology.
9
-
10
- ## Brand Context
11
-
12
- Before starting, check if a brand context skill is available (e.g., "OM1 Brand Context", "Something Else Brand Context"). If so, use its terminology, image interpretation guidelines, and brand voice when writing alt text.
13
-
14
- If no brand context is available, ask the user about any brand-specific terms before proceeding.
15
-
16
- ## Workflow
17
-
18
- 1. **Get all pages**: `cms-edit sitemap`
19
- 2. **For each page** (or a specific page if the user specified one):
20
- a. `cms-edit open /<slug>`
21
- b. `cms-edit snapshot` — identify components with visual/image/media fields
22
- c. For each image-bearing component:
23
- - `cms-edit read @ref` to inspect fields
24
- - Check `altText` on any image/visual references
25
- - `cms-edit read @ref visual` to see asset details if needed
26
- d. **Flag** images with:
27
- - Missing alt text (empty or null)
28
- - Generic alt text ("image", "photo", "banner", "screenshot", "img", "picture")
29
- - Alt text that doesn't use brand terminology (if brand context available)
30
- - Alt text over 125 characters
31
- e. **Generate** improved alt text following the guidelines below
32
- f. `cms-edit set @ref altText "new alt text"`
33
- g. `cms-edit diff` to review, then `cms-edit save`
34
-
35
- ## Alt Text Guidelines
36
-
37
- 1. **Be specific and descriptive** — describe what is actually in the image
38
- 2. **Use brand terminology** — refer to the brand context for correct terms
39
- 3. **Keep under 125 characters** — screen readers truncate longer text
40
- 4. **Don't start with** "Image of", "Photo of", "Picture of"
41
- 5. **Decorative images** — set alt to "" (empty string) for dividers, background patterns
42
- 6. **Context matters** — describe the image's purpose on the page, not just its visual content
43
- 7. **Include relevant actions** — if people are doing something meaningful, describe it
44
-
45
- ## Reading Page Content
46
-
47
- To understand a page before auditing its images, use `fetch_page_markdown` (from the site-workflows MCP server) with the page slug.
48
-
49
- ## Output
50
-
51
- Present a summary table when complete:
52
-
53
- | Page | Component | Old Alt Text | New Alt Text | Status |
54
- |------|-----------|-------------|-------------|--------|
55
-
56
- Where Status is: Updated, Skipped (decorative), Already Good, or Needs Review.
57
-
58
- ## Related skills
59
-
60
- See the **core** skill for the full cms-edit workflow (open, snapshot, read, set, save).
@@ -1,166 +0,0 @@
1
- # CMS Guidelines Generation
2
-
3
- This directory contains the pipeline prompts and documentation for generating CMS component guideline fragments for any app in the monorepo.
4
-
5
- ---
6
-
7
- ## What are CMS guidelines?
8
-
9
- Guidelines are short markdown fragments — one per CMS type — that describe how each component or collection looks, what fields it uses, how colours are applied, and how it behaves. They are merged into `docs/cms-guidelines/COMPONENT_GUIDELINES_FOR_LLM.md`, a single document used to give LLMs accurate context about the app's component library.
10
-
11
- ---
12
-
13
- ## Lifecycle: From content to guidelines
14
-
15
- 1. **Build the site** — implement all components and collections; ensure all content is correct and published in Contentful.
16
- 2. **Generate showcase data** — pull real Contentful data into the app's showcase:
17
- ```bash
18
- pnpm --filter <appName> generate-showcase
19
- ```
20
- This writes `src/generated/showcase-examples.json`.
21
- 3. **Curate showcase mocks** — run the [curate-showcase-mocks skill](.agents/skills/se-marketing-sites-curate-showcase-mocks/SKILL.md) to select the best examples into `showcase-mocks.json`. This makes the showcase (and screenshots) show realistic content.
22
- 4. **Generate field list** — parse TypeScript types to produce structured field metadata:
23
- ```bash
24
- # From the app directory:
25
- pnpm run cms-discovery:field-list
26
-
27
- # Or from repo root:
28
- pnpm --filter <appName> exec cms-generate-field-list --app-dir .
29
- ```
30
- 5. **Generate guidelines** — run the [Generate CMS guidelines skill](.agents/skills/contentful-cms-generate-cms-guidelines/SKILL.md).
31
-
32
- Steps 1–3 only need to be repeated when content or component code changes significantly. Step 4 only needs to be repeated when TypeScript types change. Step 5 can be re-run at any time.
33
-
34
- ---
35
-
36
- ## How to run guideline generation
37
-
38
- Use the Cursor skill at [`.agents/skills/contentful-cms-generate-cms-guidelines/SKILL.md`](.agents/skills/contentful-cms-generate-cms-guidelines/SKILL.md). It supports three modes:
39
-
40
- | Mode | When to use |
41
- |---|---|
42
- | `full` | First-time generation, or regenerate everything |
43
- | `single` | Regenerate one component after code changes |
44
- | `merge-only` | Rebuild `COMPONENT_GUIDELINES_FOR_LLM.md` after manual fragment edits |
45
-
46
- **Example: full from scratch for `example-om1`**
47
-
48
- Start the app:
49
- ```bash
50
- pnpm --filter example-om1 dev
51
- ```
52
-
53
- Then invoke the skill with:
54
- - App directory: `apps/example-om1`
55
- - Mode: `full`
56
- - Discovery URL: `http://localhost:3013/api/cms/discovery/`
57
-
58
- **Example: single component**
59
-
60
- Invoke the skill with:
61
- - App directory: `apps/example-se2026`
62
- - Mode: `single`
63
- - Type name: `Hero`
64
- - Discovery URL: `http://localhost:3012/api/cms/discovery/`
65
-
66
- **Example: merge only**
67
-
68
- ```bash
69
- cms-merge-guidelines --app-dir apps/example-om1
70
- ```
71
-
72
- ---
73
-
74
- ## CLIs used by this pipeline
75
-
76
- | CLI | Purpose |
77
- |---|---|
78
- | `cms-generate-html-style-guide` | Generate `html-component-style-guide.md` from `tailwind.config.json` + `globals.css` |
79
- | `cms-generate-field-list` | Parse TypeScript types → `field-list.json` |
80
- | `cms-capture-screenshots` | Capture component screenshots for variant evaluation |
81
- | `cms-update-colour-hints` | Upsert a colour hint in `colour-hints.json` |
82
- | `cms-generate-collection-guidelines` | Generate all collection/external `.md` files from a discovery URL |
83
- | `cms-merge-guidelines` | Merge all fragments → `COMPONENT_GUIDELINES_FOR_LLM.md` |
84
-
85
- All CLIs are provided by `@se-studio/project-build`. Run `pnpm build` from the repo root to ensure they are built and linked.
86
-
87
- ---
88
-
89
- ## `cms-generate-html-style-guide`
90
-
91
- Generates `docs/cms-guidelines/html-component-style-guide.md` — a design system reference for any LLM or developer authoring HTML in `HtmlComponent` CMS entries.
92
-
93
- Does not require a running dev server. Reads only local files:
94
- - `tailwind.config.json` → colour palette, typography classes, grid configuration
95
- - `src/app/globals.css` → custom utilities, RTF class names, CSS custom properties
96
-
97
- ```bash
98
- # From the app directory:
99
- pnpm cms-generate-html-style-guide
100
- ```
101
-
102
- The output file is a **static fragment** — not generated by the LLM component pipeline. It is automatically included as a preamble in `COMPONENT_GUIDELINES_FOR_LLM.md` when `cms-merge-guidelines` runs. Regenerate it whenever the design system changes.
103
-
104
- ---
105
-
106
- ## `cms-generate-collection-guidelines`
107
-
108
- New project-independent CLI. Reads the discovery API and writes collection and external guideline fragments without any app-specific hardcoding.
109
-
110
- ```bash
111
- cms-generate-collection-guidelines \
112
- --discovery-url http://localhost:3010/api/cms/discovery/ \
113
- --app-dir apps/example-brightline
114
- ```
115
-
116
- Options:
117
-
118
- | Flag | Description |
119
- |---|---|
120
- | `--discovery-url <url>` | Discovery API URL (required). App must be running. |
121
- | `--app-dir <path>` | App directory (default: cwd). |
122
-
123
- Outputs:
124
- - `docs/cms-guidelines/collections/<slug>.md` for every collection
125
- - `docs/cms-guidelines/externals/<slug>.md` for every external
126
- - Updates `generated/cms-discovery/colour-hints.json`
127
-
128
- ---
129
-
130
- ## Pipeline document index
131
-
132
- | File | Purpose |
133
- |---|---|
134
- | `generate-component-guidelines.md` | Full pipeline overview: Phases A–F |
135
- | `variant-loop.md` | Phase A: propose variants → screenshot → evaluate |
136
- | `variant-proposal-prompt.md` | LLM prompt: propose showcase variants |
137
- | `evaluation-prompt.md` | LLM prompt: evaluate screenshot diversity |
138
- | `generation-prompt.md` | Phase B: three-step guideline generation |
139
- | `colour-hint-prompt.md` | Phase C: derive colour application hint |
140
- | `validation-prompt.md` | Phase D: 9-check guideline validation |
141
-
142
- ---
143
-
144
- ## Output files (per app)
145
-
146
- ```
147
- <appDir>/
148
- docs/cms-guidelines/
149
- html-component-style-guide.md # design system reference (auto-generated; static fragment)
150
- components/ # one .md per componentType
151
- collections/ # one .md per collectionType
152
- externals/ # one .md per externalComponentType
153
- COMPONENT_GUIDELINES_FOR_LLM.md # merged document (includes style guide as preamble)
154
- generated/cms-discovery/
155
- field-list.json
156
- colour-hints.json
157
- accepted-variants/
158
- components/ # one .json per component type
159
- collections/ # one .json per collection type
160
- externals/ # one .json per external component type
161
- screenshots/
162
- components/ # PNG screenshots for components
163
- collections/ # PNG screenshots for collections
164
- externals/ # PNG screenshots for externals
165
- index.json # file field uses subpath e.g. "components/hero-default.png"
166
- ```
@@ -1,77 +0,0 @@
1
- # Colour Hint Prompt
2
-
3
- **Step 5.2 — Produce a structured colour hint per CMS type.**
4
-
5
- The colour hint is a short machine-readable label describing how `backgroundColour` and
6
- `textColour` are applied in this component. It is stored in
7
- `generated/cms-discovery/colour-hints.json` and served by the discovery API.
8
-
9
- ---
10
-
11
- ## Purpose
12
-
13
- The colour hint helps tools and LLMs quickly understand how colours work without reading
14
- the full guideline. For example:
15
-
16
- - `"section"` → the colour applies to the full-width section (both copy and visual columns).
17
- - `"card"` → the colour is applied per-card inside a collection.
18
- - `"none"` → this type does not use backgroundColour/textColour.
19
-
20
- ---
21
-
22
- ## Valid hint values
23
-
24
- | Value | Meaning |
25
- |---|---|
26
- | `"section"` | backgroundColour/textColour apply to the full-width section wrapper (most components) |
27
- | `"card"` | Colours apply per-card (collection items); section has no colour |
28
- | `"section+card"` | Both section-level and card-level colours exist |
29
- | `"none"` | The type does not use backgroundColour or textColour |
30
-
31
- ---
32
-
33
- ## Prompt (to run as part of generation)
34
-
35
- ```
36
- You are writing a colour hint for a CMS component documentation system.
37
-
38
- Component: <COMPONENT_TYPE>
39
- Component source:
40
- <COMPONENT_SOURCE>
41
-
42
- Section.tsx source (shows how backgroundColour/textColour are applied at section level):
43
- <SECTION_SOURCE>
44
-
45
- Look at how backgroundColour and textColour are used in the source.
46
-
47
- Rules:
48
- - If backgroundColour/textColour are in USED_FIELDS AND passed to a Section wrapper (or
49
- similar full-width wrapper): hint = "section"
50
- - If backgroundColour/textColour are applied per-card in a collection: hint = "card"
51
- - If both are true: hint = "section+card"
52
- - If neither backgroundColour nor textColour is in USED_FIELDS: hint = "none"
53
-
54
- Output JSON only:
55
- {
56
- "typeName": "<COMPONENT_TYPE>",
57
- "colourApplication": "section",
58
- "notes": "backgroundColour and textColour applied to the full Section wrapper."
59
- }
60
- ```
61
-
62
- ---
63
-
64
- ## Script to update colour-hints.json
65
-
66
- Run the script after generating each component:
67
-
68
- ```bash
69
- cms-update-colour-hints --type "Hero" --hint "section" \
70
- --notes "backgroundColour and textColour applied to the full Section wrapper."
71
- ```
72
-
73
- Or provide an LLM-generated JSON file:
74
-
75
- ```bash
76
- cms-update-colour-hints --from /tmp/hero-colour-hint.json
77
- ```
@@ -1,84 +0,0 @@
1
- # Evaluation Prompt — Screenshot Differences
2
-
3
- **Step 4.3 — Prompt for evaluating whether captured screenshots are suitably different.**
4
-
5
- The evaluation step is used by the orchestrator (Step 4.4) to decide whether to accept the
6
- current set of screenshots, or to request additional variants (up to the 2×N cap).
7
-
8
- ---
9
-
10
- ## When to run
11
-
12
- After `cms-capture-screenshots` has captured a batch of screenshots, feed them to an LLM with
13
- this prompt. The LLM inspects the images and returns a verdict.
14
-
15
- ---
16
-
17
- ## Prompt
18
-
19
- ```
20
- You are reviewing a set of component screenshots for CMS documentation purposes.
21
-
22
- Your task: decide whether this set of screenshots is "suitably different" — meaning
23
- each screenshot looks visually distinct enough that a reader could tell them apart,
24
- and together they cover the important visual states of the component.
25
-
26
- Component: <COMPONENT_TYPE>
27
- Screenshots (attached as images):
28
- <LIST OF {label, path, description} PAIRS>
29
-
30
- Rules:
31
- 1. Two screenshots are "not different enough" if they look nearly identical — same layout,
32
- same colours, same content, just minor text length differences.
33
- 2. The set is "suitably different" if:
34
- - At least two screenshots have clearly different layouts (e.g. one has a visual, one does not), OR
35
- - At least two screenshots have clearly different colour schemes (e.g. one light, one dark), OR
36
- - At least two screenshots show clearly different content (e.g. one full, one minimal).
37
- 3. A set with only one screenshot is NEVER "suitably different" — we need at least two variants.
38
-
39
- Output JSON only:
40
- {
41
- "suitablyDifferent": true,
42
- "reason": "Short explanation of why the set is or is not diverse enough.",
43
- "acceptedVariants": ["default", "navy", "no-visual"],
44
- "rejectedVariants": ["minimal"],
45
- "suggestions": [
46
- "The 'minimal' variant looks too similar to 'no-visual'. Try a variant with a tinted background
47
- instead, e.g. Pine background."
48
- ]
49
- }
50
-
51
- - acceptedVariants: labels of screenshots that are good to keep.
52
- - rejectedVariants: labels that are too similar to others or not useful.
53
- - suggestions: optional list of new variant ideas to try if suitablyDifferent is false
54
- (or if any variant was rejected).
55
- - If suitablyDifferent is true, suggestions can be empty.
56
- ```
57
-
58
- ---
59
-
60
- ## Output contract
61
-
62
- ```json
63
- {
64
- "suitablyDifferent": true,
65
- "reason": "The default and navy variants have clearly different colour schemes. The no-visual variant shows a different layout. Together they document the main visual states.",
66
- "acceptedVariants": ["default", "navy", "no-visual"],
67
- "rejectedVariants": ["minimal"],
68
- "suggestions": [
69
- "Consider replacing 'minimal' with a Pine background variant to show a green colour scheme."
70
- ]
71
- }
72
- ```
73
-
74
- ---
75
-
76
- ## How the orchestrator uses this
77
-
78
- 1. If `suitablyDifferent === true` AND all variants are accepted → stop; use the accepted set.
79
- 2. If `suitablyDifferent === false` OR any variants were rejected:
80
- - If `attempts < 2 × N` → use `suggestions` to generate additional variant params; capture
81
- the new screenshots; re-evaluate.
82
- - If `attempts >= 2 × N` → stop; use `acceptedVariants` from the best evaluation so far.
83
- 3. The final accepted set is written to `generated/cms-discovery/accepted-variants/{components|collections|externals}/<type-slug>.json`
84
- and the screenshots are committed to `docs/cms-guidelines/screenshots/{components|collections|externals}/`.