@se-studio/skills 1.10.9 → 1.10.10

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @se-studio/skills
2
2
 
3
+ ## 1.10.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 08365ca: State that cms-edit edits content only and never the content model. Add the `contentful-cms-content-model` skill (Contentful CLI + numbered migrations, colours, new component/collection types) and cross-link it from the core and sync-schema skills.
8
+
3
9
  ## 1.10.9
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/skills",
3
- "version": "1.10.9",
3
+ "version": "1.10.10",
4
4
  "description": "SE Studio agent skills for marketing site development with Contentful CMS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,7 +17,7 @@ Source of truth: `se-core-product` `docs/PHILOSOPHY.md`. Code review: `CODE_REVI
17
17
 
18
18
  ## Contentful
19
19
 
20
- - Do not change content models or run migrations in an app PR. Schema work is numbered migrations (core or `NN-…-<site>.js`), run on Nick's Mac only when Nick asks in chat.
20
+ - Do not change content models or run migrations in an app PR. Schema work is numbered migrations (core or `NN-…-<site>.js`), run with the Contentful CLI from any authenticated environment, and only after a human approves each one.
21
21
  - Fetch only through core helpers with cache tags. No direct Contentful CDA `fetch`.
22
22
 
23
23
  ## Rendering / visual system
@@ -25,7 +25,7 @@ Run a lens only when the diff can touch it.
25
25
  - [ ] If 2+ sites would need this within ~6 months, the change belongs in core — **BLOCKER** if implemented only here.
26
26
  - [ ] Server/client boundaries: `'use client'` does not import `cms-server`, `@se-studio/core-ui/server`, or `contentful-rest-api`.
27
27
  - [ ] Four-layer components / five-layer collections preserved; registrations match CMS types.
28
- - [ ] Contentful model/migrations are **not** in this app PR. Schema work is Nick’s Mac only, triggered via chat.
28
+ - [ ] Contentful model/migrations are **not** in this app PR. Schema work is a numbered migration run with the Contentful CLI from any authenticated environment, approved by a human before it runs.
29
29
 
30
30
  ### 2. Next.js / React / Vercel
31
31
 
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: contentful-cms-content-model
3
+ description: "Change the Contentful content model (content types, fields, validations, enums, colours, new component/collection/external-component types) with the Contentful CLI and numbered migrations. Use when a field, type or enum value is missing. cms-edit never does this."
4
+ ---
5
+
6
+ # Contentful content model changes
7
+
8
+ The content model is a **development** concern. **cms-edit edits content (entries, assets) only.** It never creates or changes content types, fields, validations, enums or editor interfaces, and `schema` commands are read-only inspection. If an editor task needs a field, type or enum value that does not exist, stop and use this skill (or hand it to a developer).
9
+
10
+ ## Preferred route
11
+
12
+ 1. Write a **numbered, idempotent** migration in `scripts/migrations/` (re-running it must be a no-op).
13
+ 2. Run it with the Contentful CLI: `contentful space migration --space-id <id> --environment-id <env> scripts/migrations/NN-name.js`. Any environment works where the CLI is installed and correctly logged in (`contentful login`), but a human must approve the migration before it runs (they need not be the one who asked for it). Try a non-production environment before master.
14
+ 3. In se-core-product only, after a core migration, re-export the golden schema (`docs/schema-export.json`; see `contentful-cms-sync-schema`). Customer-specific migrations do not touch the golden file.
15
+ 4. Regenerate types (`pnpm codegen`) and update `src/lib/registrations.ts` when a new component/collection/external component is added (skill `se-marketing-sites-register-cms-features`).
16
+
17
+ Rules:
18
+
19
+ - Append-only for enums: never shrink live `componentType` / `collectionType` / `externalComponentType` lists.
20
+ - Never delete and recreate a field that holds content.
21
+ - Prefer typed named fields over free-form `meta`.
22
+ - Different UI or behaviour means a distinct component/collection/external component type, not a `cmsLabel` switch.
23
+
24
+ ## The common changes
25
+
26
+ Most model changes are one of two kinds.
27
+
28
+ | Change | Route |
29
+ |---|---|
30
+ | Colours (names in the colour validation) | the `setup-colours` bin from `@se-studio/project-build` (sites usually wrap it as `pnpm setup:colours`). Colour values on entries are still set with cms-edit; only the allowed names are model. |
31
+ | New component, collection or external component type | These are enum values (`componentType`, `collectionType`, `externalComponentType`) on the `component`, `collection` and `externalComponent` content types, not content types of their own. Append the name to the enum with a numbered migration (the enum is append-only), then register it in `src/lib/registrations.ts` and run `pnpm codegen`. |
32
+ | Anything else (new field, validation, genuinely new content type) | Hand-written numbered migration. Check `contentful-cms-sync-schema` first for an existing one. Reference migrations that create content types: `12-add-html-component.js`, `32-add-person-type.js`. |
33
+
34
+ ## Related skills
35
+
36
+ - `contentful-cms-sync-schema` — drift vs the golden export and migration runbooks.
37
+ - `contentful-cms-schema-audit` — cross-site audit.
38
+ - `contentful-cms-core` — editing content once the model supports it.
@@ -9,6 +9,8 @@ Use this skill when you need to read or edit content in Contentful using **hoste
9
9
 
10
10
  **Do not** run the local `cms-edit` binary for content. It refuses `open`, `save`, `set`, and other content commands. Local CLI is only for `host`, `editor-pack`, `patterns`, `project`, `schema`, and `guide`.
11
11
 
12
+ **Scope: content only.** cms-edit edits entries and assets. It does **not** change the content model (content types, fields, validations, enums such as `componentType` or colours). `schema` commands are read-only. If a field, type or enum value is missing, stop and use skill **`contentful-cms-content-model`** (Contentful CLI + numbered migrations); do not work around it.
13
+
12
14
  **Page patterns (local):** `cms-edit patterns generate --project-config cms-edit/<site>/project.json` writes live family stacks from the Delivery API. Hosted agents read `cms-edit://customer/page-patterns` after editor-pack generate.
13
15
 
14
16
  **Before editing:** use skill **`contentful-cms-editor-tasks`** to read `tasks-index` and the matching capability playbook for this site (hosted MCP or local `cms-edit/<site>/editor-pack/`).
@@ -7,6 +7,8 @@ description: "Audit Contentful schema drift vs golden export, write descriptive
7
7
 
8
8
  Use when a customer Contentful space should match the **structural** core schema (content types, fields, non-enum validations). Do **not** use for full enum alignment of `componentType` / `collectionType` — each site keeps its own component names.
9
9
 
10
+ For how to make a model change in the first place (Contentful CLI, numbered migrations, colours, new component types), see skill `contentful-cms-content-model`. cms-edit never changes the content model.
11
+
10
12
  ## Golden reference
11
13
 
12
14
  | Artifact | Purpose |