@se-studio/skills 1.15.2 → 1.16.1
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/package.json +1 -1
- package/references/agent-session/customer-agents-block.md +1 -1
- package/references/agent-session/customer-code-review.md +4 -2
- package/references/agent-session/customer-guardrails/README.md +2 -2
- package/references/agent-session/customer-guardrails/site-ci.yml +6 -0
- package/references/agent-session/merge-review-template.md +1 -1
- package/skills/se-marketing-sites-cms-routes-and-appshared/SKILL.md +3 -1
- package/skills/se-marketing-sites-create-page/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @se-studio/skills
|
|
2
2
|
|
|
3
|
+
## 1.16.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7344552: se-marketing-sites-cms-routes-and-appshared documents `peopleTypeSlug`, `segmentConfig`, the new article/person route hooks, the `enableArticleTypeIndex` fix and policy entries for allowlisted pages. It also notes that `segmentConfig` `force-dynamic` / `edge` trade away static rendering, that the checker fails an illegal `segmentConfig`, and why `enableArticleTypeTagIndex` is independent of `articlesSlug`.
|
|
8
|
+
|
|
9
|
+
## 1.16.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 680a9af: Customer review docs and templates: trigger on any added or modified hand-written page or route under `src/app` and on `allowHandWrittenPages` / opt-out changes, and require an independent reviewer (a fresh session that did not author the change; still one `## Code review of <sha>` comment). The customer `site-ci.yml` caller template turns on `run_marketing_routes`. Marketing-routes skills document the opt-out file, `{ path, reason }` allowlist entries, article type options and the new route hooks.
|
|
14
|
+
|
|
3
15
|
## 1.15.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -76,7 +76,7 @@ The review, design-review triggers and merge steps are in **Review and merge** b
|
|
|
76
76
|
|
|
77
77
|
The template below is **mandatory** (Nick, 19 Nov 2026). The canonical copy, with the reasons, is `node_modules/@se-studio/skills/references/agent-session/merge-review-template.md`. It binds every bot, agent, tool and script that merges (Claude, Cursor, Grok Bot, Codex, local scripts): run the check first, stop if it fails.
|
|
78
78
|
|
|
79
|
-
1. **Review.** One review
|
|
79
|
+
1. **Review.** One review, when the work is finished, by a reviewer who did not author the change: a human, or a fresh agent session that did not write or push the code (never the authoring session reviewing itself). Post it as a PR comment (never a GitHub "PR review") **before** the approval, in exactly this shape:
|
|
80
80
|
|
|
81
81
|
```markdown
|
|
82
82
|
## Code review of <full head SHA>
|
|
@@ -4,6 +4,8 @@ Use this prompt when reviewing a **customer marketing site** PR (or when the use
|
|
|
4
4
|
|
|
5
5
|
Do **not** use Bugbot or a `nick-go` GitHub label. Review this piece of work **once**, at the end, on the final head SHA. Do not re-review on every push. Merge to `develop` only when Nick says so in chat, that review is on the PR, and the PR has a `## Merge approval` comment (see `AGENTS.md`, "Review and merge"). Merge commits only. Production still needs ask + confirm (`production-merge.md`) and does **not** get a second AI review; the promote approval says `CI covers the changes since`. Do not start a post-merge AI review. A skipped merge is labelled `pushed-through` only.
|
|
6
6
|
|
|
7
|
+
**Independent reviewer.** The review is written by a fresh session that did not author the change (not the session that wrote or pushed the code, and not a continuation of it). The author never reviews its own work. It is still one comment at the final head SHA, in the `## Code review of <full head SHA>` shape below.
|
|
8
|
+
|
|
7
9
|
Canonical architecture: `se-core-product` `docs/PHILOSOPHY.md`. Placement and handoffs: skill `site-workflows-agent-session`.
|
|
8
10
|
|
|
9
11
|
## Scope
|
|
@@ -11,7 +13,7 @@ Canonical architecture: `se-core-product` `docs/PHILOSOPHY.md`. Placement and ha
|
|
|
11
13
|
- Review added and modified lines, plus call sites broken by a deleted or renamed symbol. Do not audit the rest of the repo.
|
|
12
14
|
- A lens the diff cannot touch is one line: N/A.
|
|
13
15
|
- Do not re-check Biome style, Prettier, link checks, Lighthouse, or TypeScript strictness. CI does that (lint, typecheck, and tests, plus Prettier, lychee, and Lighthouse when the repo has turned them on in the shared site CI workflow).
|
|
14
|
-
- Do not start another review because the branch was pushed. If a later commit changes schema, forms, analytics, caching, or security, review only that delta. Anything else is CI: the cited review must still name the current head SHA (full SHA, or a prefix of at least 12 hex characters). A different hex string does not count.
|
|
16
|
+
- Do not start another review because the branch was pushed. If a later commit changes schema, forms, analytics, caching, or security, review only that delta (including any added or modified hand-written `page.ts[x]` / `route.ts` under `src/app`, and any `allowHandWrittenPages` or `marketing-routes.opt-out.json` change). Anything else is CI: the cited review must still name the current head SHA (full SHA, or a prefix of at least 12 hex characters). A different hex string does not count.
|
|
15
17
|
|
|
16
18
|
---
|
|
17
19
|
|
|
@@ -59,7 +61,7 @@ Run a lens only when the diff can touch it.
|
|
|
59
61
|
- Consent granted by default where a CMP decides, or bypassing site consent gating.
|
|
60
62
|
- Forms: preview posting to production CRM/forms destinations or GTM, or bypassing server-side submit.
|
|
61
63
|
- Hard-coded heading skips, `Visual` without size helpers, or needless duplicate mobile/desktop content.
|
|
62
|
-
-
|
|
64
|
+
- Any added **or modified** hand-written `src/app/**/page.ts[x]` or `route.ts` for a marketing URL (not only a new or renamed file), and any change to `allowHandWrittenPages` (entries are `{ path, reason }`; a bare string is deprecated) or to `src/lib/marketing-routes.opt-out.json` (needs a real reason; only for a repo not yet migrated). 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; it fails when `marketing-routes.json` is missing, and the shared site CI runs it (`run_marketing_routes`).
|
|
63
65
|
- 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
66
|
- Failing typecheck, lint, or tests; new behaviour with no test where the site already tests that layer.
|
|
65
67
|
- Smoke/discovery/`server-config` hacks to unblock deploy smoke (belongs in `@se-studio/site-check`).
|
|
@@ -9,7 +9,7 @@ Thin files a customer repo copies once. The hook, Claude settings, and merge-gat
|
|
|
9
9
|
| `claude-settings.json` | `.claude/settings.json` | Claude Code pre-tool guard (denies `vercel deploy`, `--no-verify`, ungated `gh pr merge`, MCP merge tools, and so on). The matcher includes `mcp__.*`, and a second hook runs `merge-guard.mjs` |
|
|
10
10
|
| `claude-merge-guard.mjs` | `.claude/hooks/merge-guard.mjs` | committed fallback for the Claude hook (matcher `Bash|mcp__.*`, no dependencies). Denies MCP merge tools; for `gh pr merge` it defers to the full adapter when installed, otherwise runs the pinned `merge-gate --check` via `npx` and allows only on exit 0. Any error denies. `doctor` and `fleet-audit` warn when it is missing |
|
|
11
11
|
| `merge-gate-audit.yml` | `.github/workflows/merge-gate-audit.yml` | labels `pushed-through` when a merge skipped the approval. The label is the guardrail; it does not start an AI review |
|
|
12
|
-
| `site-ci.yml` | `.github/workflows/ci.yml` | calls the shared site CI workflow. Lint, typecheck, and tests always run. Set `run_prettier`, `run_lychee`, or `run_lighthouse` to adopt those checks |
|
|
12
|
+
| `site-ci.yml` | `.github/workflows/ci.yml` | calls the shared site CI workflow. Lint, typecheck, and tests always run. The template sets `run_marketing_routes: true` (`check-marketing-routes`, filesystem only, no CMS secrets; a repo not yet migrated adds `src/lib/marketing-routes.opt-out.json` with a reason). Set `run_prettier`, `run_lychee`, or `run_lighthouse` to adopt those checks |
|
|
13
13
|
|
|
14
14
|
Requirements:
|
|
15
15
|
|
|
@@ -17,7 +17,7 @@ Requirements:
|
|
|
17
17
|
- `package.json` sets `packageManager` (`pnpm/action-setup@v6` in the audit reads it; there is no `version:` input).
|
|
18
18
|
- The hooks directory is installed by `prepare` (`git config core.hooksPath .githooks` or husky). A failing `prepare` must not be silenced with `|| true`.
|
|
19
19
|
- `.claude/settings.json` must contain no tokens, and no allowlisted URL with an `access_token`.
|
|
20
|
-
- GitHub Actions runs the shared site CI workflow (`site-ci.yml`: lint, typecheck, and
|
|
20
|
+
- GitHub Actions runs the shared site CI workflow (`site-ci.yml`: lint, typecheck, tests, and the marketing routes check), the deployment smoke (a Vercel Deployment Check with `targets` `["production"]` — feature previews are not gated, and new projects omit the skip job that posts a passing status on other branches), the audit above, and any publish job. The marketing routes check (`run_marketing_routes`, default off in the shared workflow so a caller on `@dev` does not change under it; the template turns it on), Prettier, lychee link checking, and Lighthouse CI are inputs on that workflow; turn on the ones this repo uses. Lighthouse URLs are public origins with no bypass token. The shared workflow strips the query and fragment before upload and does not publish reports to temporary public storage. The caller job grants `actions: write` so that upload can succeed; only the Lighthouse job uses it. Vercel is still the production build. The repo's `validate` script also runs locally. If it needs the Contentful tokens (`validate:routes` does), it reads them from the repo's `.env.local`, and `DRAFT_ONLY` picks the preview or delivery token.
|
|
21
21
|
- Link the package's skills into `.agents/skills` with `skills-npm --yes` in `prepare` (skipped on Vercel and CI). Do not run `skills update` or `skills@latest`. Keep the linked skill directories out of git: ignore everything under `.agents/skills`, `.claude/skills`, `.cursor/skills` and `.grok/skills` except the repo's own authored skills (use the `dir/*` form with `!dir/<name>` exceptions, as eagle-website does), and track `skills-npm-lock.json`.
|
|
22
22
|
- Run `pnpm install` in every worktree. The git hooks fail closed without it (the commit is refused). The Claude hook cannot: Claude Code only blocks a tool call on exit code 2, so with no `node_modules` it fails open. That is what `.claude/hooks/merge-guard.mjs` is for: it is committed, so a merge is still checked. The git hooks are the enforcement; the Claude hook is advice earlier.
|
|
23
23
|
- The `pre-push` template runs `pnpm run type-check`: the repo needs that script (or edit the line).
|
|
@@ -30,6 +30,12 @@ jobs:
|
|
|
30
30
|
actions: write
|
|
31
31
|
uses: Something-Else-Studio/se-core-product/.github/workflows/site-ci.yml@dev
|
|
32
32
|
with:
|
|
33
|
+
# Runs check-marketing-routes (filesystem only, no CMS secrets). It fails when
|
|
34
|
+
# src/lib/marketing-routes.json is missing. A repo that has not migrated adds
|
|
35
|
+
# src/lib/marketing-routes.opt-out.json ({"reason": "..."}); do not set this to
|
|
36
|
+
# false to skip it. The shared workflow defaults to false only so a caller pinned
|
|
37
|
+
# to @dev does not change under it.
|
|
38
|
+
run_marketing_routes: true
|
|
33
39
|
run_prettier: false
|
|
34
40
|
run_lychee: false
|
|
35
41
|
run_lighthouse: false
|
|
@@ -19,7 +19,7 @@ A production promote (`main` or `production` as the base) also needs the human a
|
|
|
19
19
|
|
|
20
20
|
## Review comment
|
|
21
21
|
|
|
22
|
-
Post it **before** the approval, as a PR comment, never as a GitHub "PR review".
|
|
22
|
+
Post it **before** the approval, as a PR comment, never as a GitHub "PR review". The reviewer is independent: a human, or a fresh session that did not author the change. The authoring session does not review its own work.
|
|
23
23
|
|
|
24
24
|
```markdown
|
|
25
25
|
## Code review of <full head SHA>
|
|
@@ -7,7 +7,9 @@ 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`. 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
|
|
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` as `{ "path": "preview", "reason": "..." }` (a bare string is deprecated and warns). The check also fails when `marketing-routes.json` is missing, unless a not-yet-migrated repo has `src/lib/marketing-routes.opt-out.json` with a `reason`; it also covers `page.ts[x]` anywhere under `src/app` and `route.ts` under `(cms-routes)`, modified files included. The shared site CI runs it (`run_marketing_routes`, no CMS secrets). Index-only article types (`detailPages: false`), nested article slugs (`nestedSlugs: true`, `[...slugs]`) and `excludeArticleTypes` are per-type options in `marketing-routes.json`; custom person pages use the `renderPersonIndex` / `renderPersonDetail` hooks and article metadata tweaks `transformArticleMetadata`, never a hand-written route. Reviews of any added or modified hand-written page or route, or an allowlist change, must come from a reviewer who did not author the change. If CMS writes are off and the tag, type or data you need is missing, stop and ask. Do not code around it.
|
|
11
|
+
|
|
12
|
+
Before hand-writing a page and listing it in `allowHandWrittenPages`, use the config and hooks instead: `peopleTypeSlug` (the CMS custom type slug when it differs from the people URL, e.g. URL `/people/`, type `person`), `segmentConfig` (`{ "resources": { "dynamic": "force-static" } }` writes literal segment config into that generated page), and the opt-in `createRouteHandlers` hooks `transformPersonMetadata`, `renderArticleTypeListing` (index page, after the CMS contents) and `renderArticleDetail` (`{ before, after }` around an article's contents). `segmentConfig` accepts `dynamic: 'force-dynamic'` and `runtime: 'edge'` as opt-ins, but each trades away static rendering (and the R5 SSG guard) on that generated route; `check-marketing-routes` fails an illegal `segmentConfig`. `enableArticleTypeIndex` is true only when `articlesSlug` is set (the hub only); `enableArticleTypeTagIndex` stays `tagInPath && (articlesSlug || articleTypes)` because tag indexes live on article-type routes (`/resources/events/{tag}/`) and need no hub. A hand-written page that stays on the allowlist may also be listed in `route-build-policy.json` `mustBeSsgOrStatic`; `generate --write` keeps that entry. Details: `@se-studio/project-build` and `@se-studio/core-ui` READMEs.
|
|
11
13
|
|
|
12
14
|
## Route Group: (cms-routes)
|
|
13
15
|
|
|
@@ -19,7 +19,7 @@ App Router `page` files are only:
|
|
|
19
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
|
-
**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.
|
|
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`). Entries are `{ "path": ..., "reason": ... }` (bare strings are deprecated). A missing `marketing-routes.json` fails the check unless the repo has `src/lib/marketing-routes.opt-out.json` with a `reason` (only for a repo not yet migrated), and `route.ts` under `(cms-routes)` is policed too. Per-type article options: `detailPages: false` (index only, at `indexSlug`), `nestedSlugs: true` (`/{type}/[...slugs]`); `excludeArticleTypes` keeps a CMS type off. `--force` without `--write` is a dry run. Person index and detail pages with custom rendering use `renderPersonIndex` / `renderPersonDetail` on `createRouteHandlers` (see `@se-studio/core-ui` README). 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
23
|
|
|
24
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
25
|
|