@se-studio/skills 1.10.6 → 1.10.8

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,17 @@
1
1
  # @se-studio/skills
2
2
 
3
+ ## 1.10.8
4
+
5
+ ### Patch Changes
6
+
7
+ - fabd80e: Smoke tests fail existing CMS page URLs when nav, footer, an h1, title, description, or the featured image is missing. A missing featured image is a failure, not a warning. 404 probes and non-page cases are unchanged.
8
+
9
+ ## 1.10.7
10
+
11
+ ### Patch Changes
12
+
13
+ - 4006c25: Review a piece of work once, at the final head SHA. A design review is only for schema, forms, analytics, caching, or security. A production promote records `CI covers the changes since` instead of a second AI review. The post-merge guardrail is the `pushed-through` label, with no follow-up AI review. Customer repos can call the shared site CI workflow for lint, typecheck, tests, and opt-in Prettier, lychee, and Lighthouse.
14
+
3
15
  ## 1.10.6
4
16
 
5
17
  ### Patch Changes
@@ -6,7 +6,7 @@ Agent-neutral guards, published in `@se-studio/skills` as the `se-agent-guard` b
6
6
  se-agent-guard commit | push | claude-pretool | merge-gate <pr> [--audit] | worktrees-clean [--apply] [--remote]
7
7
  ```
8
8
 
9
- Customer repos copy four thin files that call the bin: see `references/agent-session/customer-guardrails/`. Core uses the same code from `packages/skills/agent-guard/`.
9
+ Customer repos copy the thin files that call the bin, plus the site CI caller: see `references/agent-session/customer-guardrails/`. Core uses the same gate code from `packages/skills/agent-guard/`. Core's own lint, typecheck, and tests stay on CI Dev; customer repos call `.github/workflows/site-ci.yml`.
10
10
 
11
11
  Rules live in `rules.mjs`, `shell.mjs` and `merge-gate.mjs` (pure functions, tested in `scripts/__tests__`).
12
12
 
@@ -15,7 +15,7 @@ Rules live in `rules.mjs`, `shell.mjs` and `merge-gate.mjs` (pure functions, tes
15
15
  | Layer | Covers | Strength |
16
16
  |-------|--------|----------|
17
17
  | `cli.mjs commit` / `cli.mjs push` (husky) | every agent and human | **Enforcement.** No commits on `dev`/`develop`/`main`/`production`; no push or delete of `main`/`master`/`production`. Skipped by `--no-verify`, `-c core.hooksPath=...`, or uninstalled hooks. |
18
- | `merge-gate-audit.yml` (CI, after every merge) | everyone, including the GitHub UI | **Detection.** Labels and comments `pushed-through` when a merge skipped the approval. Cannot undo or block a merge. |
18
+ | `merge-gate-audit.yml` (CI, after every merge) | everyone, including the GitHub UI | **Detection.** Labels `pushed-through` when a merge skipped the approval, and posts a short breach comment. That label is the guardrail. It does not start an AI review. Cannot undo or block a merge. |
19
19
  | `claude-pretool.mjs` (Claude Code hook) | Claude only | **Advice before the command runs.** Reads the command text with a quote-aware tokenizer (`shell.mjs`): quoting, `git -C/-c`, `env`/`xargs`/`npx`/`pnpm dlx` wrappers, `sh -c`, `eval`, `$( )`, backticks, heredocs, `{ }` groups, `if`/`while`/`do`/`!` and leading redirections. It asks (rather than guesses) when a push argument contains `$( )`, backticks or a glob, and when a shell reads commands from a pipe, heredoc or process substitution. It does not follow variables, aliases, functions or scripts that run git, so treat it as a guard against honest mistakes, not a sandbox. |
20
20
 
21
21
  GitHub branch protection and rulesets are not available on this plan (HTTP 403), so nothing stops a human merging in the GitHub UI; the audit is the backstop.
@@ -32,7 +32,7 @@ Grok and Cursor rely on the git hooks and the CI audit. Add thin adapters that c
32
32
 
33
33
  ## Merge gate
34
34
 
35
- `merge-gate.mjs <pr>`: the PR needs a `## Merge approval` comment that names the current head SHA and cites a review. **Anyone** may post it (Nick's decision, 30 Oct 2026: what matters is that the PR was reviewed, not who clicks approve), so the author is not checked. The review is: a link into this PR to a review comment (agent or human; its first heading says "review", it names the head SHA, it gives a verdict such as PASS/BLOCKERS/NITs/LGTM, and it was posted strictly before the approval), or a line that is exactly `none, Nick override`. Links to PR reviews (`#pullrequestreview-N`) are not accepted because `gh` returns no numeric review id to match them to; post the review as a comment. A bare "reviewed", an external link, a link to a comment that does not exist, a review of an older SHA, a `#pullrequestreview-` link, a minimized comment, or the approval citing itself all fail. Also: not a draft, not "do not merge". `--audit` labels `pushed-through` after a breach.
35
+ `merge-gate.mjs <pr>`: the PR needs a `## Merge approval` comment that names the current head SHA and cites a review. **Anyone** may post it (Nick's decision, 30 Oct 2026: what matters is that the PR was reviewed, not who clicks approve), so the author is not checked. The review is: a link into this PR to a review comment (agent or human; its first heading says "review", it names the head SHA, it gives a verdict such as PASS/BLOCKERS/NITs/LGTM, and it was posted strictly before the approval), or a line that is exactly `none, Nick override`. The head SHA match is the full SHA or a prefix of at least 12 hex characters. A later lint, typecheck, test, or format push may keep that review only when the review names the current head that way; a different hex string shared with the approval does not. A production promote (`dev` → `main`, or `develop` → `main` / `production`, and `isCrossRepository` false) may instead use a whole line `CI covers the changes since` and does not need a review comment on that PR (Nick, 4 Nov 2026: no second AI review; CI covers the commits since the feature review). `dev` → `production` and a fork head do not. Words after that line do not count. Links to PR reviews (`#pullrequestreview-N`) are not accepted because `gh` returns no numeric review id to match them to; post the review as a comment. A bare "reviewed", an external link, a link to a comment that does not exist, a review of an older SHA, a `#pullrequestreview-` link, a minimized comment, or the approval citing itself all fail. Also: not a draft, not "do not merge". `--audit` labels `pushed-through` after a breach and comments that no post-merge AI review will run.
36
36
 
37
37
  `gh` returns no `updatedAt` for comments, so a review comment edited after the approval (to add the SHA, say) cannot be detected. It cannot tell that the review was any good, or that the approver is Nick; someone determined can fabricate a review comment. It makes the honest path easy and the lazy fake fail. It reads comments through `gh pr view --json comments`; very long threads rely on `gh` paging them.
38
38
 
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Merge gate (AGENTS.md: "Merge approval comment", "Review before merge").
4
4
  * node packages/skills/agent-guard/merge-gate.mjs <pr number|url|branch> # exit 1 when not mergeable
5
- * node packages/skills/agent-guard/merge-gate.mjs <pr> --audit # after a merge: label + comment on a breach
5
+ * node packages/skills/agent-guard/merge-gate.mjs <pr> --audit # after a merge: label on a breach (no AI review)
6
6
  *
7
7
  * GitHub cannot enforce this as a required check on this plan, so it is checked
8
8
  * (1) before an agent runs `gh pr merge` (Claude adapter) and (2) after any merge (audit workflow).
@@ -21,9 +21,13 @@ function approvalComments(comments) {
21
21
  return live(comments).filter((c) => /^\s*##\s+Merge approval\b/i.test(c.body ?? ''));
22
22
  }
23
23
 
24
+ /** A head citation is the full SHA or a prefix of it. Seven characters is too easy to share by accident. */
25
+ const MIN_HEAD_SHA = 12;
26
+
24
27
  function citesSha(body, headSha) {
28
+ if (!headSha) return false;
25
29
  const head = headSha.toLowerCase();
26
- return (body.match(/\b[0-9a-f]{7,40}\b/gi) ?? []).some((sha) =>
30
+ return (body.match(new RegExp(`\\b[0-9a-f]{${MIN_HEAD_SHA},40}\\b`, 'gi')) ?? []).some((sha) =>
27
31
  head.startsWith(sha.toLowerCase()),
28
32
  );
29
33
  }
@@ -32,18 +36,18 @@ function citesSha(body, headSha) {
32
36
  const VERDICT = /\b(BLOCKERS?|NITs?|PASS|LGTM|approved?)\b/i;
33
37
 
34
38
  /**
35
- * A comment that is itself a review: its first heading says "review", it names the head SHA,
36
- * and it gives a verdict. A heading may follow a short preamble.
39
+ * A comment that is itself a review: its first heading says "review", it gives a verdict,
40
+ * and it names the current head (the full SHA, or a prefix of at least 12 hex characters).
41
+ * A heading may follow a short preamble. A hex string that is not that prefix does not count,
42
+ * including one shared with a `CI covers the changes since` line.
37
43
  */
38
44
  function isReviewComment(comment, headSha) {
39
45
  const body = comment.body ?? '';
40
46
  const heading = body.split('\n').find((l) => /^\s*#{1,6}\s/.test(l)) ?? '';
41
- return (
42
- /\breview/i.test(heading) &&
43
- !/merge approval/i.test(heading) &&
44
- citesSha(body, headSha) &&
45
- VERDICT.test(body)
46
- );
47
+ if (!/\breview/i.test(heading) || /merge approval/i.test(heading) || !VERDICT.test(body)) {
48
+ return false;
49
+ }
50
+ return citesSha(body, headSha);
47
51
  }
48
52
 
49
53
  /** Strictly before: a missing or equal timestamp cannot prove the review came first. */
@@ -62,15 +66,40 @@ function linksIn(body) {
62
66
  /** The approval line `none, Nick override` must stand alone, not sit in a quote or a negation. */
63
67
  const OVERRIDE_LINE = /^\s*(?:\d+[.)]\s*)?none,\s*nick override\.?\s*$/im;
64
68
 
69
+ /**
70
+ * Production promote, and only these pairs: core `dev` → `main`, or a site
71
+ * `develop` → `main` / `production`. `dev` → `production` is not a promote.
72
+ * The head branch must be in this repository (`isCrossRepository === false`).
73
+ */
74
+ export function isProductionPromote(pr) {
75
+ if (pr.isCrossRepository !== false) return false;
76
+ const base = pr.baseRefName ?? '';
77
+ const head = pr.headRefName ?? '';
78
+ return (
79
+ (head === 'dev' && base === 'main') ||
80
+ (head === 'develop' && (base === 'main' || base === 'production'))
81
+ );
82
+ }
83
+
84
+ /**
85
+ * Whole line, same shape as the override. Words after the phrase, including a negation,
86
+ * do not count. An optional SHA of at least 12 hex characters may follow.
87
+ */
88
+ const CI_COVERS_LINE =
89
+ /^\s*(?:\d+[.)]\s*)?CI covers the changes since(?:\s+[0-9a-f]{12,40})?\.?\s*$/im;
90
+
65
91
  /**
66
92
  * Anyone may approve, but the approval has to point at a review that really exists on this PR
67
- * at the current head: a review comment (agent or human) naming the head SHA, with a verdict, posted
68
- * before the approval. `none, Nick override` skips it. Links to PR reviews (#pullrequestreview-N) are
93
+ * at the current head: a review comment (agent or human) naming the head SHA (full, or a
94
+ * prefix of at least 12 hex characters), with a verdict, posted before the approval.
95
+ * `none, Nick override` skips it. A promote may use a whole line `CI covers the changes since`.
96
+ * Links to PR reviews (#pullrequestreview-N) are
69
97
  * not accepted: gh returns no numeric review id, so such a link cannot be tied to a review.
70
98
  * Cannot detect a review comment edited after the approval (gh returns no updatedAt).
71
99
  */
72
100
  function citedReview(approval, pr) {
73
101
  if (OVERRIDE_LINE.test(approval.body)) return true;
102
+ if (isProductionPromote(pr) && CI_COVERS_LINE.test(approval.body ?? '')) return true;
74
103
  const prUrl = (pr.url ?? '').replace(/\/$/, '');
75
104
  for (const url of linksIn(approval.body)) {
76
105
  const id = fragmentId(url);
@@ -113,14 +142,17 @@ export function evaluateMergeGate(pr, { ignoreDraft = false } = {}) {
113
142
  } else if (!atHead.some((c) => citedReview(c, pr))) {
114
143
  problems.push(
115
144
  'The `## Merge approval` comment must link a review on this PR (an agent or human review comment ' +
116
- 'naming the current head SHA with a verdict, posted before the approval), or have a line saying `none, Nick override`.',
145
+ 'naming the current head SHA — the full SHA or a prefix of at least 12 hex characters — with a verdict, posted before the approval), or have a line saying `none, Nick override`. ' +
146
+ 'A hex string that is not that prefix does not count. ' +
147
+ 'A production promote (`dev` → `main`, or `develop` → `main` / `production`, same repository) may use a whole line `CI covers the changes since` with no review on that PR.',
117
148
  );
118
149
  }
119
150
  }
120
151
  return { ok: problems.length === 0, problems };
121
152
  }
122
153
 
123
- const PR_FIELDS = 'isDraft,title,labels,headRefOid,comments,number,url';
154
+ const PR_FIELDS =
155
+ 'isDraft,title,labels,headRefOid,baseRefName,headRefName,isCrossRepository,comments,number,url';
124
156
 
125
157
  export function fetchPr(target, { cwd, repo } = {}) {
126
158
  const args = [
@@ -156,7 +188,9 @@ function audit(pr, problems) {
156
188
  '--body',
157
189
  `## Merge gate breach\n\nThis PR was merged without meeting AGENTS.md "Merge approval comment" / "Review before merge":\n\n${problems
158
190
  .map((p) => `- ${p}`)
159
- .join('\n')}\n\nLabelled \`${BREACH_LABEL}\` for review after the fact.`,
191
+ .join(
192
+ '\n',
193
+ )}\n\nLabelled \`${BREACH_LABEL}\`. That label is the guardrail. No post-merge AI review runs.`,
160
194
  );
161
195
  }
162
196
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/skills",
3
- "version": "1.10.6",
3
+ "version": "1.10.8",
4
4
  "description": "SE Studio agent skills for marketing site development with Contentful CMS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -70,17 +70,17 @@ Non-UI changes skip visual gates and go to code review.
70
70
 
71
71
  Before asking to merge to `develop`, run the review in `CODE_REVIEW.md` and stop. Findings: **BLOCKER** / **NIT**. Do not keep a second checklist in `AGENTS.md`. That file only points at `CODE_REVIEW.md`.
72
72
 
73
- A change to placement, schema, caching, analytics or forms also needs a design review by someone who did not write it. Use skill `architecture-review` (post `## Design review` on the PR: PASS / BLOCKERS / N/A).
73
+ One AI review per piece of work, at the end, on the final head SHA. Do not re-review on every push. Lint, typecheck, and tests are CI (the shared site CI workflow). A design review, by someone who did not write the change, is only for schema, forms, analytics, caching, or security. Use skill `architecture-review` and post `## Design review` (PASS / BLOCKERS) as part of that one review.
74
74
 
75
75
  ### Review and merge
76
76
 
77
- 1. **Review.** A real review (an agent or a human) is posted as a PR comment under a heading that says "review", names the **current head SHA**, and gives a verdict (PASS, BLOCKERS, NITs, LGTM or approved). Push a new commit and the old review no longer counts: review again, reading only the delta.
77
+ 1. **Review.** One review (an agent or a human), when the work is finished. Post it as a PR comment under a heading that says "review", name the **final head SHA** (the full SHA, or a prefix of at least 12 hex characters), and give a verdict (PASS, BLOCKERS, NITs, LGTM or approved). Do not re-review on every push. A later commit that changes schema, forms, analytics, caching, or security gets a review of that delta only. Anything else is CI, and the cited review must still name the current head. A different hex string does not count.
78
78
  2. **Approve.** Nick's go in chat is the approval. The agent records it as a PR comment headed `## Merge approval`: who, where, when (Europe/London), the head SHA, and a link to the review comment (`#issuecomment-N` on this PR). Post the review before the approval. Never merge a PR marked **do not merge**.
79
79
  3. **Check.** `pnpm exec se-agent-guard merge-gate <number>` runs the same gate the Claude hook and the post-merge audit use. Run it before merging; fix what it names.
80
- 4. **Merge.** `gh pr merge <number> --merge --match-head-commit <approved head sha>`. Merge commits only: never `--squash` or `--rebase`. To undo a merge, `git revert -m 1 <merge commit>`. A merge that skipped the gate is labelled `pushed-through` and reviewed after the fact.
80
+ 4. **Merge.** `gh pr merge <number> --merge --match-head-commit <approved head sha>`. Merge commits only: never `--squash` or `--rebase`. To undo a merge, `git revert -m 1 <merge commit>`. A merge that skipped the gate is labelled `pushed-through`. That label is the guardrail. It does not start a post-merge AI review.
81
81
  5. **Clean up** (see "Parallel features").
82
82
 
83
- Production merges (integration → `main`/`production`) also need a review and a `## Merge approval`, on top of ask + confirm (`production-merge.md`).
83
+ Production merges (integration → `main`/`production`) need ask + confirm (`production-merge.md`) and a `## Merge approval` whose review line is `CI covers the changes since`. They do not get a second AI review.
84
84
 
85
85
  The guard (git hooks, Claude hook, audit workflow) comes from `@se-studio/skills` (`se-agent-guard`), pinned in this repo's lockfile. **Precondition:** `@se-studio/skills` is an exact-version devDependency and `pnpm install` has run (see `customer-guardrails/README.md`); until then these commands do not exist. Do not copy its scripts into the repo and do not bypass it (`--no-verify`, `core.hooksPath`). Fix the failing check instead.
86
86
 
@@ -54,5 +54,6 @@ Source of truth: `se-core-product` `docs/PHILOSOPHY.md`. Code review: `CODE_REVI
54
54
 
55
55
  - Keep smoke cases and discovery intact; fix `@se-studio/site-check` in core if smoke is wrong.
56
56
  - New behaviour needs a test. Failing typecheck/lint/tests blocks merge.
57
+ - One review at the final head SHA (`CODE_REVIEW.md`). Design review only for schema, forms, analytics, caching, or security. CI gates lint, typecheck, and tests. No re-review on every push, no second AI review on a promote, no post-merge AI review.
57
58
  - Follow `CODE_REVIEW.md` and stop. Do not run a second checklist from this file.
58
59
  - Production merges need human ask + confirm. Agents do not push production.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Use this prompt when reviewing a **customer marketing site** PR (or when the user asks for a code review). Label every finding **BLOCKER** or **NIT**. Blockers first. Unclear judgement calls → flag to Nick in chat.
4
4
 
5
- Do **not** use Bugbot or a `nick-go` GitHub label. Merge to `develop` only when Nick says so in chat, a review (agent or human) covers the current head SHA, 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`).
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
7
  Canonical architecture: `se-core-product` `docs/PHILOSOPHY.md`. Placement and handoffs: skill `site-workflows-agent-session`.
8
8
 
@@ -10,8 +10,8 @@ Canonical architecture: `se-core-product` `docs/PHILOSOPHY.md`. Placement and ha
10
10
 
11
11
  - Review added and modified lines, plus call sites broken by a deleted or renamed symbol. Do not audit the rest of the repo.
12
12
  - A lens the diff cannot touch is one line: N/A.
13
- - Do not re-check Biome style or TypeScript strictness. The repo validate script already does.
14
- - A later review of the same PR reads only the diff since the SHA already reviewed.
13
+ - 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.
15
15
 
16
16
  ---
17
17
 
@@ -106,4 +106,4 @@ Out of scope: inventing product/design/copy changes; Netlify/Storybook check noi
106
106
 
107
107
  ## Design review
108
108
 
109
- When the diff is a new mechanism, analytics, a Contentful fetch or cache change, schema, or placement: post `## Design review` on the PR (PASS / BLOCKERS / N/A), separate from type-check and tests. Otherwise write N/A. The procedure is `docs/design-review.md` in se-core-product.
109
+ Post `## Design review` only when the diff changes schema, forms, analytics, caching, or security (PASS / BLOCKERS). That is the targeted review, and it is part of the one review at the final head SHA, not a second pass. Otherwise do not post one. The procedure is `docs/design-review.md` in se-core-product.
@@ -1,13 +1,14 @@
1
1
  # Customer guardrail files (v1)
2
2
 
3
- Four thin files a customer repo copies once. They only call the pinned `se-agent-guard` bin from `@se-studio/skills`, so the behaviour is versioned by the lockfile and cannot drift. A check that a repo still has them (`se-agent-guard check`, and a fleet-wide run from core) is planned and not shipped yet.
3
+ Thin files a customer repo copies once. The hook, Claude settings, and merge-gate audit call the pinned `se-agent-guard` bin from `@se-studio/skills`, so that behaviour is versioned by the lockfile and cannot drift. `site-ci.yml` calls the shared workflow in se-core-product. A check that a repo still has them (`se-agent-guard check`, and a fleet-wide run from core) is planned and not shipped yet.
4
4
 
5
5
  | Copy | To | Purpose |
6
6
  |------|----|---------|
7
7
  | `pre-commit` | `.githooks/pre-commit` or `.husky/pre-commit` | refuse commits on `main`/`develop`/`production`; then the repo's own staged checks |
8
8
  | `pre-push` | `.githooks/pre-push` or `.husky/pre-push` | refuse pushes to `main`/`production`; type-check non-delete pushes |
9
9
  | `claude-settings.json` | `.claude/settings.json` | Claude Code pre-tool guard (denies `vercel deploy`, `--no-verify`, ungated `gh pr merge`, and so on) |
10
- | `merge-gate-audit.yml` | `.github/workflows/merge-gate-audit.yml` | labels `pushed-through` when a merge skipped the approval |
10
+ | `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 |
11
+ | `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 |
11
12
 
12
13
  Requirements:
13
14
 
@@ -15,7 +16,7 @@ Requirements:
15
16
  - `package.json` sets `packageManager` (`pnpm/action-setup@v6` in the audit reads it; there is no `version:` input).
16
17
  - The hooks directory is installed by `prepare` (`git config core.hooksPath .githooks` or husky). A failing `prepare` must not be silenced with `|| true`.
17
18
  - `.claude/settings.json` must contain no tokens, and no allowlisted URL with an `access_token`.
18
- - GitHub Actions runs only the deployment smoke (a Vercel Deployment Check), the audit above and any publish job. Vercel is the build, and its Deployment Checks (for example Lint and TypeCheck) are the gate; do not add a lint or test workflow on GitHub. The repo's `validate` script runs locally and is not a CI step. 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.
19
+ - GitHub Actions runs the shared site CI workflow (`site-ci.yml`: lint, typecheck, and tests), the deployment smoke (a Vercel Deployment Check), the audit above, and any publish job. 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.
19
20
  - 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`.
20
21
  - 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. The git hooks are the enforcement; the Claude hook is advice earlier.
21
22
  - The `pre-push` template runs `pnpm run type-check`: the repo needs that script (or edit the line).
@@ -0,0 +1,35 @@
1
+ # Shared site CI. Lint, typecheck, and tests are the required gate.
2
+ # Prettier, lychee, and Lighthouse stay off until this repo adopts them:
3
+ # set the matching input to true. Lighthouse also needs lighthouse_urls:
4
+ # a public origin with no query, fragment, or bypass token. The shared
5
+ # workflow strips `?` and `#` before the report and does not upload reports
6
+ # to temporary public storage.
7
+ #
8
+ # actions: write is granted on this job so the shared workflow's Lighthouse
9
+ # job can upload artifacts. That job is the only one that uses it. Lint,
10
+ # typecheck, test, Prettier, and lychee stay at contents: read.
11
+ #
12
+ # Pin @<sha> or @dev once se-core-product has this workflow on that ref.
13
+ # Core itself does not use this file; CI Dev in se-core-product is the core gate.
14
+
15
+ name: CI
16
+
17
+ on:
18
+ pull_request:
19
+ push:
20
+ branches:
21
+ - develop
22
+
23
+ permissions:
24
+ contents: read
25
+
26
+ jobs:
27
+ ci:
28
+ permissions:
29
+ contents: read
30
+ actions: write
31
+ uses: Something-Else-Studio/se-core-product/.github/workflows/site-ci.yml@dev
32
+ with:
33
+ run_prettier: false
34
+ run_lychee: false
35
+ run_lighthouse: false
@@ -26,7 +26,7 @@ Never ship customer production from a registry `productionPath` checkout. Merge
26
26
  2. **Confirm.** The agent **stops**, restates the exact merge, and waits for a **second** affirmative reply (`yes` / `confirm` / `do it`) to **that** restatement. The original ask is not confirmation.
27
27
  3. **One repo.** Merge one customer repo at a time. Do not fan out “all sites to production”. Core promote is one `dev` → `main` merge (do not also merge customer production in the same step unless asked and confirmed separately).
28
28
  4. **Git only.** `gh pr merge` or equivalent to `origin/<targetBranch>`. **Never** `vercel deploy`, `pnpm cms-edit:deploy`, or Netlify promote. Do **not** run `pnpm release` / `npm publish` from a laptop unless the human explicitly asked for a **manual** publish (normal path is Release Main on push to `main`).
29
- 5. **Prerequisites (core promote).** Version bumps must already be on `dev` (pending `.changeset/*.md` consumed by CI Dev). Do not promote while changesets remain. Post `## Merge approval` on the promote PR (who, where, when Europe/London, head SHA, review). Merge approval is **in addition to** ask + confirm — not a substitute.
29
+ 5. **Prerequisites (core promote).** Version bumps must already be on `dev` (pending `.changeset/*.md` consumed by CI Dev). Do not promote while changesets remain. Post `## Merge approval` on the promote PR (who, where, when Europe/London, head SHA). The review line is a whole line `CI covers the changes since` (nothing after it). It applies to `dev` → `main` and to customer `develop` → `main` or `production`, when the head branch is in this repository. Do not run a second AI review of the promote. Merge approval is **in addition to** ask + confirm — not a substitute. The same CI line applies to a customer production promote.
30
30
  6. **Release verification (customer).** When the customer promote depends on new or changed Contentful entries, complete [`release-verification.md`](./release-verification.md) (publish state via CDA vs CPA, content smoke, preview compare, no unresolved failed production build). Record results on the promote PR. A Nick override never skips publish-state or content smoke.
31
31
 
32
32
  ### Restatement — customer production (required before merge)
@@ -49,7 +49,7 @@ Default for **ordinary** implement-from-sketch work: proceed to Phase D with the
49
49
  That default is **not** “never block on the human.” SE Studio approval gates still win:
50
50
 
51
51
  - Do **not** merge, push `main`, publish Contentful, or promote production without the usual Nick / `## Merge approval` / ask+confirm / release-verification rules.
52
- - For changes that need a **design review before build** (placement, schema, caching, analytics/forms — architecture R9.2 / Project design-review), surface the synthesized design, post or prepare `## Design review`, and **pause** until that gate is satisfied — even when the invoker did not say “with checkpoint.”
52
+ - For a change to schema, forms, analytics, caching, or security (R9.2), surface the synthesized design and pause for the one `## Design review` at the final head SHA. Do not run that review on every push, and do not run it again on a production promote.
53
53
  - Opt in to an extra checkpoint anytime the invoker asks: "/architect with checkpoint," "stop and show me before implementing," or similar. Then surface the synthesized design and pause for sign-off.
54
54
 
55
55
  The synthesis can ship as its own commit either way (scaffold first), subject to the gates above. Planned and scoped breakage during fill-in is fine. For adversarial pressure on the design before implementing, run the **interrogate** skill on the synthesized sketch (Auto reviewers only; see interrogate skill).
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: architecture-review
3
- description: "Review a PR against docs/PHILOSOPHY.md (placement, schema, rendering, caching, analytics/forms) and post a ## Design review with PASS / BLOCKERS / N/A. Use for 'design review', 'architecture review', 'review against the philosophy', or before merging a PR that docs/design-review.md says needs one. Any agent or human can run it; the author cannot review their own design."
3
+ description: "Review a PR against docs/PHILOSOPHY.md and post a ## Design review with PASS or BLOCKERS. Use only when the diff changes schema, forms, analytics, caching, or security. One review, at the final head SHA. Any agent or human can run it; the author cannot review their own design."
4
4
  ---
5
5
 
6
6
  # Architecture review
7
7
 
8
- Check a change against the numbered rules in `docs/PHILOSOPHY.md` and report on the PR. This is the design half of the review in `AGENTS.md` ("Review before merge"). It is not the code review (`CODE_REVIEW_PROMPT.md`); post it separately or as a clearly headed section of the same comment.
8
+ Check a change against the numbered rules in `docs/PHILOSOPHY.md` and report on the PR. This is the targeted design half of the one review in `AGENTS.md` ("Review before merge"). Run it once, at the final head SHA, and only when the diff changes schema, forms, analytics, caching, or security. It is not a second pass, not a review on every push, and not a post-merge review. Post it as its own comment or as a clearly headed section of the code review (`CODE_REVIEW_PROMPT.md` on core, `CODE_REVIEW.md` on a site).
9
9
 
10
10
  ## Scope
11
11
 
@@ -17,7 +17,7 @@ Any agent or human who did **not** write the change. Check the PR author, the co
17
17
 
18
18
  ## 1. Decide if it applies
19
19
 
20
- Read `docs/design-review.md`. A review is needed when the PR adds or changes a mechanism, shared package behaviour, analytics / consent / forms, Contentful fetch / cache tags / revalidation, schema, placement, or package boundaries. Trivial tooling with no visitor- or editor-visible effect and no architecture surface: post the template in step 5 with `Verdict: N/A` and the reason, and stop.
20
+ Read `docs/design-review.md`. A review is needed only when the diff changes schema, forms, analytics, caching, or security. Otherwise stop. Do not post a design review, including one whose verdict is N/A. Lint, typecheck, and tests are CI. A production promote does not get this review.
21
21
 
22
22
  ## 2. Gather (from origin, not a stale checkout)
23
23
 
@@ -54,7 +54,7 @@ Post on the PR only when asked to (or when the caller told you to post): `gh pr
54
54
 
55
55
  Head SHA: <full sha>
56
56
  Scope: <what changed, one line>
57
- Verdict: PASS | BLOCKERS | N/A
57
+ Verdict: PASS | BLOCKERS
58
58
 
59
59
  ### BLOCKERS
60
60
  - R<n.n> <file:line> <what breaks the rule, and the evidence>
@@ -66,4 +66,4 @@ Verdict: PASS | BLOCKERS | N/A
66
66
  - <anything the rules do not settle>
67
67
  ```
68
68
 
69
- A rule break is a BLOCKER (R9.4, R9.5). A later review reads only the delta since the reviewed SHA, as in `CODE_REVIEW_PROMPT.md`. The `## Merge approval` comment cites the code review; the design review sits alongside it.
69
+ A rule break is a BLOCKER (R9.4, R9.5). Do not re-review on a later push. If a later commit changes schema, forms, analytics, caching, or security, review only that delta. The `## Merge approval` comment cites this review. A production promote cites `CI covers the changes since` and does not get another one.
@@ -279,6 +279,21 @@ Add `/llms.txt`, `/markdown-index.txt`, and `/site-info.md` to `route-build-poli
279
279
 
280
280
  `expectHtmlStatus` requires `@se-studio/site-check@^2.7.2`. Omit for normal 2xx HTML checks.
281
281
 
282
+ ### CMS page chrome (existing URLs)
283
+
284
+ `@se-studio/site-check` checks CMS page categories already in `smoke.cases.json` (home, page, article, person, tag, and listing categories). Do not add URLs for this. A 2xx page fails when any of these is missing:
285
+
286
+ | Check | Failure |
287
+ |-------|---------|
288
+ | `<nav>` | `cms_missing_nav` |
289
+ | `<footer>` | `cms_missing_footer` |
290
+ | non-empty `<h1>` | `cms_missing_h1` |
291
+ | non-empty `<title>` | `cms_missing_title` |
292
+ | meta `description` | `cms_missing_description` |
293
+ | featured image (`og:image`, `og:image:url`, or `twitter:image`) | `cms_missing_featured_image` |
294
+
295
+ A missing featured image **fails** the case. It is not a warning. 404 probes, other non-2xx statuses, and non-page categories (robots, discovery) are skipped. Customer sites get this when they bump `@se-studio/site-check` after the npm release. Do not copy the checks into a site-only script.
296
+
282
297
  ### Content assertions (release verification)
283
298
 
284
299
  Live / production smoke must assert **key blocks render**, not only HTTP 200 (release verification rule 2). Add optional `contentAssert` on representative cases:
@@ -284,7 +284,7 @@ When placement says **core** (or the site is blocked on package behaviour): emit
284
284
 
285
285
  ### Code review (replaces Bugbot)
286
286
 
287
- Before asking to merge to `dev` / `develop`, follow the review file and stop. Do not restate its checklist here.
287
+ Before asking to merge to `dev` / `develop`, follow the review file once, at the final head SHA, and stop. Do not re-review on every push. A design review is only for schema, forms, analytics, caching, or security. A production promote does not get a second AI review (`CI covers the changes since`). Do not start a post-merge AI review; a skipped merge is labelled `pushed-through` only. Do not restate the checklist here.
288
288
 
289
289
  - **Core:** [`CODE_REVIEW_PROMPT.md`](../../../../CODE_REVIEW_PROMPT.md)
290
290
  - **Customer:** [`customer-code-review.md`](../../references/agent-session/customer-code-review.md) (copied into the site as `CODE_REVIEW.md`)
@@ -110,7 +110,7 @@ Also copy:
110
110
  | [`customer-architecture.mdc`](../../references/agent-session/customer-architecture.mdc) | `.cursor/rules/architecture.mdc` |
111
111
  | [`customer-code-review.md`](../../references/agent-session/customer-code-review.md) | `CODE_REVIEW.md` (repo root) |
112
112
  | Starter notes | `docs/AGENT_PROCESS_NOTES.md` (see [`process-feedback.md`](../../references/agent-session/process-feedback.md)) |
113
- | [`customer-guardrails/`](../../references/agent-session/customer-guardrails/README.md) | `pre-commit`, `pre-push` hooks, `.claude/settings.json`, `.github/workflows/merge-gate-audit.yml` (add `@se-studio/skills` as an exact-version devDependency first) |
113
+ | [`customer-guardrails/`](../../references/agent-session/customer-guardrails/README.md) | `pre-commit`, `pre-push` hooks, `.claude/settings.json`, `.github/workflows/merge-gate-audit.yml`, `.github/workflows/ci.yml` from `site-ci.yml` (add `@se-studio/skills` as an exact-version devDependency first) |
114
114
 
115
115
  Do **not** create `.cursor/BUGBOT.md`. Do **not** create `.cursorrules`. Do **not** require a `nick-go` label.
116
116