diff --git a/.github/workflows/scheduled-deploy.yml b/.github/workflows/scheduled-deploy.yml
deleted file mode 100644
index 7c64e36..0000000
--- a/.github/workflows/scheduled-deploy.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: Scheduled deploy
-
-# Vercel git deploys are disabled (vercel.json git.deploymentEnabled: false) so
-# that the hourly content routine's per-article pushes/merges don't each trigger
-# a build. Instead, batch production deploys onto a schedule by POSTing a Vercel
-# Deploy Hook. workflow_dispatch is the manual "publish now" button.
-on:
- schedule:
- - cron: '0 9 * * *' # 09:00 UTC
- - cron: '0 21 * * *' # 21:00 UTC
- workflow_dispatch:
-
-jobs:
- deploy:
- name: Trigger Vercel deploy hook
- runs-on: ubuntu-latest
- steps:
- - name: Fire deploy hook
- env:
- HOOK: ${{ secrets.VERCEL_DEPLOY_HOOK_URL }}
- run: |
- if [ -z "$HOOK" ]; then
- echo "::error::VERCEL_DEPLOY_HOOK_URL secret is not set — create a Vercel Deploy Hook for the main branch and add it as a repo secret."
- exit 1
- fi
- curl -fsS -X POST "$HOOK" -o /dev/null -w "Deploy hook triggered: HTTP %{http_code}\n"
diff --git a/CLAUDE.md b/CLAUDE.md
index 0e23e07..0554fb6 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -43,10 +43,13 @@ npm run check # validate + astro check (types)
3. **Write** — fill in the MDX body. House style and frontmatter reference:
`docs/CONTENT-AUTHORING.md`. Embed interactivity with `` (no import
needed) and list every embedded slug in the `artifacts:` frontmatter array.
-4. **Validate** — `npm run validate` must exit 0. It enforces taxonomy membership, path↔date
- agreement, slug uniqueness, dangling references, and index freshness.
+4. **Gate** — `npm run check && npm run build` must pass (this is the exact CI job:
+ `validate` + `astro check` types + `build`). `validate` enforces taxonomy membership,
+ path↔date agreement, slug uniqueness, dangling references, and index freshness. Run the
+ full gate, not just `validate` — a type error passes `validate` but fails CI.
5. **Commit & push** — commit the article *and* the regenerated `content/_index.json`
- together. Conventions below.
+ together. Flip the PR ready and enable squash auto-merge; a green local gate means CI passes
+ and the PR merges itself (production auto-deploys on merge). Conventions below.
To **update** an existing article: edit in place, set `updatedDate`, run `npm run index`,
validate, commit. Never change a published article's `slug` (it's the URL).
@@ -57,8 +60,9 @@ validate, commit. Never change a published article's `slug` (it's the URL).
topic, add it there deliberately (id, label, description, hue) in its own commit — don't
free-type new topics in frontmatter. Prefer reusing existing topics; the taxonomy should
grow by ones, not tens.
-- **Validation is the gate.** No commit that leaves `npm run validate` failing. CI runs it on
- every push.
+- **The CI gate is `npm run check && npm run build`.** No PR ships red. CI runs this exact job
+ on every push (`validate` + `astro check` + `build`); run it locally so a green PR merges
+ unattended.
- **Content runs touch content.** During article/artifact routines, do not modify
`src/layouts/`, `src/styles/`, `src/lib/`, or page templates. Design/feature work happens in
dedicated sessions, not content runs.
diff --git a/docs/ROUTINES.md b/docs/ROUTINES.md
index fedcf38..988e32b 100644
--- a/docs/ROUTINES.md
+++ b/docs/ROUTINES.md
@@ -13,9 +13,11 @@ playbooks. Each playbook assumes: clean checkout, `npm ci` done, work on the ses
3. `npm run new:article -- --title "…" --topics [--series --series-order N]`
4. Write the body per `docs/CONTENT-AUTHORING.md`. Interlink at least one related existing
article when one exists. Embed an artifact if a concept genuinely benefits from one.
-5. `npm run validate` → fix until green. `npm run build` if anything beyond pure content
- changed.
-6. Commit (`content: add article `) including `content/_index.json`; push.
+5. `npm run check && npm run build` → fix until green. This is the **exact CI job**
+ (`validate` + `astro check` types + `build`); running only `validate` misses type errors
+ that fail CI and stall auto-merge.
+6. Commit (`content: add article `) including `content/_index.json`; push. Flip ready and
+ enable squash auto-merge — see "Delivery & auto-merge" below.
## Playbook: new artifact (+ optional companion article)
@@ -39,10 +41,10 @@ playbooks. Each playbook assumes: clean checkout, `npm ci` done, work on the ses
interaction listed in `controls`, a keyboard path for SVG/DOM where natural; `data.json` +
`dataSource`/`dataAsOf` for data-backed pieces (the validator enforces provenance). Verify
Three.js/GSAP APIs via Context7.
-4. **Verify it runs**: `npm run build` must pass; if a browser is available, load `/artifacts/`
- and view it embedded in the article — confirm rendering, interaction, and zero console errors in
- **portrait, landscape, and ⛶ fullscreen** (resize/rotate); nothing clipped, overflowing, or
- overlapping.
+4. **Verify it runs**: `npm run check && npm run build` must pass (full CI gate — types included);
+ if a browser is available, load `/artifacts/` and view it embedded in the article — confirm
+ rendering, interaction, and zero console errors in **portrait, landscape, and ⛶ fullscreen**
+ (resize/rotate); nothing clipped, overflowing, or overlapping.
5. Fill in `controls`, set `featured` judiciously. Validate, commit (`artifact: add `).
## Coordination between parallel routines
@@ -83,7 +85,20 @@ articles use — URLs depend on them.
- **Bi-weekly**: 1 new artifact, ideally paired with that week's article.
- **Monthly**: refresh pass over the 3–5 oldest articles in active topics; link-rot check on
`sources:` URLs.
-- **On PR / push (CI)**: validation + build already enforced by `.github/workflows/ci.yml`.
+- **On PR / push (CI)**: `npm run check` + `npm run build` enforced by `.github/workflows/ci.yml`.
+
+## Delivery & auto-merge
+
+Fire-and-forget: a green local gate means a green CI run, so let auto-merge do the work.
+
+- Before flipping ready, re-fetch `origin/main`; if another content PR merged during your run,
+ rebase, re-run `npm run index`, and re-run `npm run check && npm run build` once.
+- Flip the draft to ready and **enable squash auto-merge**. Because `npm run check && npm run
+ build` mirrors CI exactly, CI passes and the PR squash-merges on its own — **do not keep the
+ session alive watching CI**. Your finish line is "ready + auto-merge enabled on a gate-green PR".
+- **Production auto-deploys on merge** and previews build per PR (Vercel is *not* a required
+ check). New content goes live shortly after merge; the PR preview URL is available for a final
+ visual check, but verify locally first.
## Failure etiquette
diff --git a/vercel.json b/vercel.json
deleted file mode 100644
index 8705660..0000000
--- a/vercel.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "$schema": "https://openapi.vercel.sh/vercel.json",
- "git": {
- "deploymentEnabled": false
- }
-}