@se-studio/skills 1.15.0 → 1.15.2
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 +19 -0
- package/package.json +1 -1
- package/references/agent-session/customer-agents-block.md +1 -1
- package/references/agent-session/customer-architecture.mdc +1 -1
- package/references/agent-session/customer-code-review.md +1 -1
- package/skills/se-marketing-sites-cms-routes-and-appshared/SKILL.md +2 -2
- package/skills/se-marketing-sites-create-page/SKILL.md +8 -2
- package/skills/se-marketing-sites-lib-cms-structure/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @se-studio/skills
|
|
2
2
|
|
|
3
|
+
## 1.15.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- dce254a: `generate-marketing-routes` and `check-marketing-routes` express index versus detail URL shapes, so a site such as Highlander (`/people/` index with `/person/{slug}/` detail, `/tag/{slug}/` with no `/tags/`) no longer needs a hand-written route or a canonical that disagrees with the served URL.
|
|
8
|
+
|
|
9
|
+
- New optional keys in a section `marketing-routes.json`: `personSlug` and `tagSlug` (singular detail segment, default the index slug), `enablePeopleIndex` and `enableTagsIndex` (default: on when the index slug is set; `true` needs the index slug). An index that is off writes no page and the flag is `false`; the detail pages stay. A config with none of these keys generates the same files as before. A config that declares any of them also writes `PERSON_DETAIL_BASE`, `PERSON_DETAIL_SLUG`, `TAG_DETAIL_BASE` and `TAG_DETAIL_SLUG` into `src/generated/marketing-slugs.ts`; build person and tag links from them. Existing section configs that already carry `enablePeopleIndex` / `enableTagsIndex` (previously ignored) are now honoured.
|
|
10
|
+
- The generated person and tag detail pages pass their served path to the handlers (the tag page no longer reads the site's tag url calculator when the shape is declared), so the canonical is always the served URL.
|
|
11
|
+
- `allowHandWrittenPages` also allows a known non-CMS page: `resource-list-cards` or `src/app/resource-list-cards/page.tsx`. `preview` allows `(cms-routes)/preview`. Matching is exact; a child page is not covered.
|
|
12
|
+
- `--from-cms --write` keeps the four shape keys the way it keeps `allowHandWrittenPages`, and validates them. `tagTypeRoutes: false` skips tag types that have no slug.
|
|
13
|
+
- `@se-studio/core-ui`: new optional `renderTagListing` on `createRouteHandlers`. `generateTagPage` renders its result after the tag content, so a generated tag page keeps a site's custom listing or filter (category tabs plus article list) with no hand-written route and no generator fork. A tag with no `contents` still renders when the hook is set. Additive; sites that do not pass it are unchanged.
|
|
14
|
+
- Docs and skills (`@se-studio/skills`) describe the keys, the hook and the allowlist.
|
|
15
|
+
|
|
16
|
+
## 1.15.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- e1c7cfd: Name the real route commands in the create-page, cms-routes and customer skills: `generate-marketing-routes --from-cms --write` (`pnpm generate:routes` in a site) and `check-marketing-routes`, both `@se-studio/project-build` bins. State that tabs, filters and listings come from CMS tags and types, and that a missing tag/type with CMS writes off means stop and ask.
|
|
21
|
+
|
|
3
22
|
## 1.15.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@ Before non-trivial code, run the placement checklist (in the skill). Summary:
|
|
|
29
29
|
|
|
30
30
|
| Belongs in… | Examples |
|
|
31
31
|
|-------------|----------|
|
|
32
|
-
| **This repo** (`src/project/*`, `cms-edit/**`) | Brand components, styling, editor-pack, and `src/lib/marketing-routes.json` (which article-type and person-type folders exist). A new URL is a Contentful slug, not a new `page.tsx`. |
|
|
32
|
+
| **This repo** (`src/project/*`, `cms-edit/**`) | Brand components, styling, editor-pack, and `src/lib/marketing-routes.json` (which article-type and person-type folders exist). A new URL is a Contentful slug, not a new `page.tsx`. Run `pnpm generate:routes`; tabs, filters and listings come from CMS tags and types. If CMS writes are off and the tag/type is missing, stop and ask. |
|
|
33
33
|
| **Customer shared package** (if monorepo) | Consent/analytics shared across sites in this customer |
|
|
34
34
|
| **`se-core-product`** (`@se-studio/*`) | Fixes/features needed by 2+ sites, CMS infrastructure |
|
|
35
35
|
|
|
@@ -24,7 +24,7 @@ Source of truth: `se-core-product` `docs/PHILOSOPHY.md`. Code review: `CODE_REVI
|
|
|
24
24
|
|
|
25
25
|
- Keep T0/T1 skeleton files thin; document deviations in the site README.
|
|
26
26
|
- Use core route handlers (`generatePage`, robots, sitemaps, etc.). Do not reimplement.
|
|
27
|
-
- A new marketing URL is a Contentful page slug (use `indexed: false` for an experiment). Do not add `src/app/**/page.tsx` for it. App Router pages are the CMS catch-all, a folder named in `src/lib/marketing-routes.json` for an article type or a person type, and the fixed misc files (page-test, preview, sitemap, robots, markdown, download, og, api, cms-dev).
|
|
27
|
+
- A new marketing URL is a Contentful page slug (use `indexed: false` for an experiment). Do not add `src/app/**/page.tsx` for it. App Router pages are the CMS catch-all, a folder named in `src/lib/marketing-routes.json` for an article type or a person type, and the fixed misc files (page-test, preview, sitemap, robots, markdown, download, og, api, cms-dev). Generate them with `pnpm generate:routes` (`generate-marketing-routes --from-cms --write`) and verify with `check-marketing-routes`. Tabs, filters and listings come from CMS tags and article/tag types, never from code-side mappings or a hand-written route for grouping. If CMS writes are off and the tag, type or data you need is missing, stop and ask. Do not code around it.
|
|
28
28
|
- Every marketing block is `<Section>` with `content-cols-grid`. Width is `col-span-*`, `max-w-cols-N`, or `max-w-cols-gap-N`. Type is a `fontTable` class (`h1`, `p2`, `sizingInformation.*`). Vertical space is `section-spacing` on `Section`.
|
|
29
29
|
- Figma stays the source for layout, copy, colour, and type when a text style is set. Implement with the grid and the font table. Do not paste MCP arbitrary classes.
|
|
30
30
|
- Plan-time stops: the frame width (1440, 1920, whatever the artboard is) is not `max-w-[…]`. Type with no text style (`leading-[1.2]`, raw `text-[32px]`) means the designer did not specify the font — name the node and wait. Do not pick a class and continue.
|
|
@@ -59,7 +59,7 @@ Run a lens only when the diff can touch it.
|
|
|
59
59
|
- Consent granted by default where a CMP decides, or bypassing site consent gating.
|
|
60
60
|
- Forms: preview posting to production CRM/forms destinations or GTM, or bypassing server-side submit.
|
|
61
61
|
- Hard-coded heading skips, `Visual` without size helpers, or needless duplicate mobile/desktop content.
|
|
62
|
-
- A new `src/app/**/page.tsx` for a marketing URL. That URL is a Contentful slug (often `indexed: false` for an experiment). Allowed app pages: the CMS catch-all, an article type or person type named in `src/lib/marketing-routes.json`, and the fixed misc set (page-test, preview, sitemap, robots, markdown, download, og, api, cms-dev).
|
|
62
|
+
- A new `src/app/**/page.tsx` for a marketing URL. That URL is a Contentful slug (often `indexed: false` for an experiment). Allowed app pages: the CMS catch-all, an article type or person type named in `src/lib/marketing-routes.json`, and the fixed misc set (page-test, preview, sitemap, robots, markdown, download, og, api, cms-dev). Also BLOCKER: a `*Tabs` / `*Groups` constant or tag-slug mapping in code, or a hand-written route, standing in for CMS tags and types. `check-marketing-routes` (`@se-studio/project-build`) must pass.
|
|
63
63
|
- Arbitrary layout standing in for the grid or an unspecified text style (R5.13): a Fixed Figma width copied as `max-w-[…]`, `w-[…px]` on a grid item (a direct child of a section grid), or `max-w-cols-N` (including `max-w-[1440px]` and `max-w-[1920px]`); `w-cols-N` on a grid item (a `max-w-cols-N` cap that is the block's intended maximum, not the node's width, is fine, with or without `col-span`); the horizontal width or offset of a grid item within 8px of a column span or offset that is not built with `col-start` / `col-span` or a `grid-cols-subgrid` wrapper, including any horizontal offset faked with padding, margin, transform, position or a wrapper (`pl-[37px]`, `translate-x-[…]`), compared at the width of the node's Figma frame; one further than 8px off the grid with no cited override (an explicit approval comment from anyone, the author included, that names the node and gives the reason, linked in the PR or given in a code comment at the node, or a Figma annotation on the node or its frame saying it is intentionally off grid, quoted with the node id; take the citation on trust and flag it if absent; `se-exception:` on the layout lint is not a substitute); `leading-[…]` / `text-[32px]` with no `fontTable` class; section padding via `py-[…]` instead of `<Section>`; a nested `content-cols-grid`. A repo may override the snap-and-refusal part of R5.13 in its AGENTS.md, recorded as a deviation (code comment plus README "Deviations" entry); check the override on the base branch, not the PR head, and apply the rest of R5.13 regardless. Name the Figma node in the plan and wait. Do not guess a style and do not paste MCP classes.
|
|
64
64
|
- Failing typecheck, lint, or tests; new behaviour with no test where the site already tests that layer.
|
|
65
65
|
- Smoke/discovery/`server-config` hacks to unblock deploy smoke (belongs in `@se-studio/site-check`).
|
|
@@ -7,7 +7,7 @@ description: "Guide for the (cms-routes) route group and appShared pattern. Use
|
|
|
7
7
|
|
|
8
8
|
Reference app: **example-empty** (this monorepo). Customer sites with fuller route sets: see `docs/RELATED_PROJECTS.md` (e.g. OM1 uses `resources/`, `team/`, `topics/` instead of `articles/`, `people/`, `tags/`).
|
|
9
9
|
|
|
10
|
-
Do not add a `page.tsx` for a marketing URL. That URL is a Contentful slug on the catch-all. Extra folders are only article types and person types listed in `src/lib/marketing-routes.json`.
|
|
10
|
+
Do not add a `page.tsx` for a marketing URL. That URL is a Contentful slug on the catch-all. Extra folders are only article types and person types listed in `src/lib/marketing-routes.json`. Route files come from `generate-marketing-routes <app> --from-cms --write` (the `@se-studio/project-build` bin; a site runs `pnpm generate:routes`; `node scripts/generate-marketing-routes.mjs` exists only in se-core-product). `check-marketing-routes <app>` (same package) fails any hand-written `(cms-routes)` page outside `marketing-routes.json` or its `allowHandWrittenPages` list. Tabs, filters and listings come from CMS tags and article/tag types, never from code-side mappings or a hand-written route for grouping. A site that needs its own tag listing or filter component passes `renderTagListing` to `createRouteHandlers`; it does not hand-write the tag route. Known non-CMS pages (`resource-list-cards`, `(cms-routes)/preview`) go on `allowHandWrittenPages`. If CMS writes are off and the tag, type or data you need is missing, stop and ask. Do not code around it.
|
|
11
11
|
|
|
12
12
|
## Route Group: (cms-routes)
|
|
13
13
|
|
|
@@ -103,7 +103,7 @@ export default async function (props: PageProps<'/[level1]'>) {
|
|
|
103
103
|
}
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
A dynamic `articles` route uses `converterContext.urlCalculators` (`article`, `articleType`, `articleTypeTag`). Import `converterContext` from `@/lib/converter-context` when that module exists (so route files don't pull in cms-server); otherwise from `@/lib/cms-server`. A fixed article folder, and a dynamic base whose path is not `articles`, passes the path of the file that was written (`/work/`, `/work/${articleSlug}/`). `article()` prefixes `ARTICLES_BASE` and, when primary tags are on, inserts `other`. That is a different URL from the file that was written. The generator writes `[tag]` pages with `articleTypeTag` when `tagInPath` is true. Feature flags live in `marketing-routes.json` and `src/generated/marketing-flags.ts`. The legacy generator writes a typed person at `/peopleType/${peopleType}/${slug}/`. The section generator writes a static `/${peopleSlug}/${type}/${slug}/`, or `/${type}/${slug}/` when there is no person prefix. A person with no type is `/${peopleSlug}/${slug}
|
|
106
|
+
A dynamic `articles` route uses `converterContext.urlCalculators` (`article`, `articleType`, `articleTypeTag`). Import `converterContext` from `@/lib/converter-context` when that module exists (so route files don't pull in cms-server); otherwise from `@/lib/cms-server`. A fixed article folder, and a dynamic base whose path is not `articles`, passes the path of the file that was written (`/work/`, `/work/${articleSlug}/`). `article()` prefixes `ARTICLES_BASE` and, when primary tags are on, inserts `other`. That is a different URL from the file that was written. The generator writes `[tag]` pages with `articleTypeTag` when `tagInPath` is true. Feature flags live in `marketing-routes.json` and `src/generated/marketing-flags.ts`. The legacy generator writes a typed person at `/peopleType/${peopleType}/${slug}/`. The section generator writes a static `/${peopleSlug}/${type}/${slug}/`, or `/${type}/${slug}/` when there is no person prefix. A person with no type is `/${peopleSlug}/${slug}/`, or `/${personSlug}/${slug}/` when `marketing-routes.json` sets `personSlug` (likewise `tagSlug` for `/${tagSlug}/${slug}/`; `enablePeopleIndex` / `enableTagsIndex` switch an index off; build links from `PERSON_DETAIL_BASE` / `TAG_DETAIL_BASE`). Neither route redirects to the other. `[level1]` stays a generic page.
|
|
107
107
|
|
|
108
108
|
## See Also
|
|
109
109
|
|
|
@@ -16,10 +16,16 @@ A new URL is a Contentful page slug, served by the catch-all (`[level1]` and `[.
|
|
|
16
16
|
App Router `page` files are only:
|
|
17
17
|
|
|
18
18
|
- the CMS catch-all
|
|
19
|
-
- a folder named in `src/lib/marketing-routes.json` for an article type or a person type (`
|
|
19
|
+
- a folder named in `src/lib/marketing-routes.json` for an article type or a person type (`generate-marketing-routes . --from-cms --write` writes the thin article index and detail wrappers; in a site, `pnpm generate:routes`)
|
|
20
20
|
- the fixed misc files (page-test, preview, sitemap, robots, markdown, download, og, api, cms-dev)
|
|
21
21
|
|
|
22
|
-
`pnpm
|
|
22
|
+
**Commands.** The bin is `generate-marketing-routes` from `@se-studio/project-build` (`--from-cms --write` reads the CMS tag and type model and rewrites `marketing-routes.json` plus the generated pages). A customer site runs it as `pnpm generate:routes`. `node scripts/generate-marketing-routes.mjs <app> --write` exists only in se-core-product; it is not in a customer repo. The guard is `check-marketing-routes .` (same package, same install). It fails a hand-written `(cms-routes)` page that is not in `marketing-routes.json` or its explicit `allowHandWrittenPages` list. The list also allows a known non-CMS page (`resource-list-cards`). URL shape keys `personSlug`, `tagSlug`, `enablePeopleIndex`, `enableTagsIndex` in `marketing-routes.json` split index and detail segments (see `@se-studio/project-build` README); a custom tag listing is the `renderTagListing` route-handler hook. In core, `pnpm skeleton:check` runs the same check.
|
|
23
|
+
|
|
24
|
+
**Tabs, filters and listings come from CMS tags and types.** Never add a code-side tag-to-slug mapping, a `*Tabs` / `*Groups` constant, or a new hand-written route to group content.
|
|
25
|
+
|
|
26
|
+
**If CMS writes are off and the needed tag, type or data is missing, stop and ask. Do not code around it.**
|
|
27
|
+
|
|
28
|
+
`pnpm skeleton:check` (core) and `check-marketing-routes` (sites) fail an extra `page.ts` once `marketing-routes.json` is present. Search and other non-page tools stay misc routes. They are not a second copy of a CMS page.
|
|
23
29
|
|
|
24
30
|
## Page Architecture
|
|
25
31
|
|
|
@@ -43,7 +43,7 @@ export const siteTitle = '...';
|
|
|
43
43
|
export const siteDescription = '...';
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
`enablePerson`, `enablePeopleIndex`, `enableTag`, `enableTagsIndex`, `enableArticleTypeIndex`, `enableArticleTypeTagIndex`, and `enablePrimaryTagPartOfSlug` live in `src/lib/marketing-routes.json`. `
|
|
46
|
+
`enablePerson`, `enablePeopleIndex`, `enableTag`, `enableTagsIndex`, `enableArticleTypeIndex`, `enableArticleTypeTagIndex`, and `enablePrimaryTagPartOfSlug` live in `src/lib/marketing-routes.json`. `generate-marketing-routes` (`@se-studio/project-build` bin; `pnpm generate:routes` in a site) writes `src/generated/marketing-flags.ts`.
|
|
47
47
|
|
|
48
48
|
## Data Flow
|
|
49
49
|
|