Reference site: Example Studio on ipal-kit (reference/), index for agents, CI job

reference/ is one complete client site on the plugin (made-up company, pl/en,
MongoDB, every library block and template, token standard light/dark, forms,
consent, SEO/GEO, enforced CSP, 2FA, base + demo seeds, Coolify runbook,
smoke tests). It uses the plugin as file:.. (injected) and is not shipped.

- docs/agent/reference-site/INDEX.md (generated by scripts/reference-index.mjs,
  kept current by test/referenceIndex.test.ts)
- AGENT.md section and pointers in ipal-site, ipal-setup, ipal-reference,
  ipal-upgrade, ipal-block; release steps in PROGRAMISTA §8.1b
- CI: reference (fast) on every push, reference-full on main; doctor steps
  wired, commented until ipal-doctor ships

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-29 15:17:11 +01:00
co-authored by Claude Opus 5.5
parent 8bb5ebd394
commit 8adac41f92
129 changed files with 18440 additions and 1 deletions
+22
View File
@@ -736,6 +736,28 @@ commit). `prepare` (`pnpm build`) builds the package on install from git and on
`typecheck` and `lint` are **not** in `prepublishOnly` — before a commit: `pnpm typecheck && pnpm lint &&
pnpm test:int` (CI in `.gitea/workflows/ci.yml` runs typecheck, lint, test:int and build on push and PR).
### 8.1b The reference site (`reference/`) — part of every release
`reference/` is one complete client site on the plugin ("Example Studio", made up; not in the npm package). Agents copy
from it (`docs/agent/reference-site/INDEX.md`, shipped) and the project starter is generated from it. A release is not
done until the reference site uses it. Before `npm version`:
- [ ] Everything new or changed in this release is used in `reference/` — a new option set, a route wired, a block or
variant shown (the Blocks page picks up new blocks and variants from `blockLibraryManifest` by itself).
- [ ] `reference/` upgraded the way `ipal-upgrade` tells client projects; the upgrade notes are tried here first.
- [ ] Local run green: `pnpm build` (plugin) → `pnpm --dir reference install --ignore-workspace` (refreshes the injected
copy) → in `reference/`: `pnpm generate:types && pnpm generate:importmap` (no diff), `pnpm typecheck`,
`pnpm seed` on a throwaway MongoDB, `pnpm build`, `ALLOW_LOCAL_MEDIA=1 PORT=3100 pnpm start`,
`pnpm payload run e2e/create-test-admin.ts`, `pnpm test:e2e`.
- [ ] `pnpm reference:index` → `docs/agent/reference-site/INDEX.md` committed (`test/referenceIndex.test.ts` fails otherwise;
a new file in `reference/` needs its line in `scripts/reference-index.mjs` → `DESCRIPTIONS`).
- [ ] CI job `reference` green (`.gitea/workflows/ci.yml`), the starter check included once `ipal-kit create` ships.
- [ ] Tag `v<version>` pushed — the index links to `reference/` at that tag, and `git diff v<old> v<new> -- reference/` is
the upgrade guide for projects.
The site uses the plugin as `file:..` with `dependenciesMeta.injected`, so the plugin's peers (Payload, React,
`@payloadcms/ui`) resolve from the site — a plain `link:..` loads two copies of `@payloadcms/ui` and the admin crashes.
### 8.1a Plugin tests
`test/` (outside `src`, not shipped in `dist`), vitest: `pnpm test:int` (once), `pnpm test:watch`.