IAPL rename: docs, agent guide, skills, reference site and starter on the new names; changelog draft

- docs, AGENT.md, the 16 skills, PROGRAMISTA and README use the preferred names (scripted, same list of forms);
  past CHANGELOG entries and the proposals in docs/dev are not rewritten
- AGENT.md: 'Names: IAPL and ipal-kit' — old name, new name, state in 1.x; what is not renamed; storageNames
- iapl-upgrade '→ 1.17.0', PROGRAMISTA §6 item 72, CHANGELOG 1.17.0 (draft): nothing required
- env.md, doctor.md (legacy-names, storage-names), stats.md, security.md, project-starter.md, iapl-reference, iapl-setup
- skill scripts read ipal-audit-skip and IPAL_IP_HEADER too; audit rule ids stay what they were
- reference site: iapl(), iapl-doctor.json, iapl-* skills, storageNames: 'iapl'; INDEX.md regenerated

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-25 17:36:09 +01:00
co-authored by Claude Fable 5.2
parent 425fac14fb
commit b91984fbcd
149 changed files with 1930 additions and 1747 deletions
+33 -28
View File
@@ -1,4 +1,4 @@
# project starter — `ipal-kit create`
# project starter — `iapl create`
One command creates a new Payload 3 + Next 16 client site that already follows every team convention, so
every project starts identical. The site is generated from the **reference site** (`reference/` in the plugin
@@ -15,12 +15,12 @@ pnpm --config.auto-install-peers=false dlx @intecion/[email protected] create inte
- `--config.auto-install-peers=false` keeps `dlx` to the plugin itself: 7 packages, ~44 MB, ~1 s with a warm
store. Without it pnpm also installs the plugin's peers (Payload, Next, React — 356 packages, ~750 MB in the dlx
cache) that the generator never loads.
- An agent that already has the plugin installed: `pnpm exec ipal-kit create <domain> --dir ../<name>-web`. The
- An agent that already has the plugin installed: `pnpm exec iapl create <domain> --dir ../<name>-web`. The
command refuses to write into the current project.
## What it asks — and where the answers go
The architecture questions of AGENT.md "Ask before you build" (the same list as `ipal-setup` stage 0), all before
The architecture questions of AGENT.md "Ask before you build" (the same list as `iapl-setup` stage 0), all before
a single file is written. Enter takes the recommendation shown in brackets — an explicit choice, recorded as the
owner's answer. There is no `--yes`: a missing answer stops the run with the list of open topics.
@@ -30,32 +30,37 @@ owner's answer. There is no `--yes`: a missing answer stops the run with the lis
| Languages | locales besides `pl` (default) and `en` | `src/i18n.config.ts` (every language with a URL prefix) |
| Styling | primary (+ secondary, accent), body and heading font, theme light / dark / both + default, radius sharp / soft / round, fluid standard / wide | `src/design/tokens.ts`, `DESIGN.md`, the next/font calls in the root layout, Site settings → Theme (seed) |
| Pages and content | the site map; collections `posts` / `caseStudies` | `AGENTS.md` → Site map; the collection files, `content.config.ts`, the entry list block, the blog archive page |
| Forms | forms, the inbox that receives them, SMTP or Microsoft Graph | Company → E-mail (seed), the seeded forms, `ipalEnvRules({ emailGraph })` + `GRAPH_*` |
| Analytics and consent | tools, Consent Mode, the settings window, cookie scanner, browser crawl | CSP flags in `next.config.ts`, `SiteProviders analytics` / `banner`, `cookieScanner`, `IPAL_COOKIE_SCAN_*` |
| Forms | forms, the inbox that receives them, SMTP or Microsoft Graph | Company → E-mail (seed), the seeded forms, `iaplEnvRules({ emailGraph })` + `GRAPH_*` |
| Analytics and consent | tools, Consent Mode, the settings window, cookie scanner, browser crawl | CSP flags in `next.config.ts`, `SiteProviders analytics` / `banner`, `cookieScanner`, `IAPL_COOKIE_SCAN_*` |
| SEO / GEO | local business (schema.org type), AI crawlers | `siteJsonLd` with `buildLocalBusinessJsonLd`, `robots.aiBots` |
| Media | R2 or local disk | `ipalEnvRules({ storage })`, `docs/DEPLOY.md` (Persistent Storage without R2) |
| Media | R2 or local disk | `iaplEnvRules({ storage })`, `docs/DEPLOY.md` (Persistent Storage without R2) |
| Admin | 2FA, white-label, agency credit, panel link preview | `twoFactor`, `whiteLabel`, `agency`, `adminMeta` |
| Hosting | canonical host apex / www, Coolify server, who adds DNS | `NEXT_PUBLIC_SERVER_URL`, `docs/DEPLOY.md` |
| Agent tooling | external skills | `ipal-skills --external` |
| Agent tooling | external skills | `iapl-skills --external` |
A site made by the starter gets the new spelling of the two stored names: `iapl({ storageNames: 'iapl' })` in
`payload.config.ts` (2FA counter key `iapl:2fa-verify:…`; visitor cookie `iapl_vid`, with
`visitorCookie={IAPL_VISITOR_COOKIE}` on `<PageStats>` when statistics are turned on — stats.md). Sites made before
1.17.0 keep the old ones.
Every answer is written into `AGENTS.md` → **Project decisions** (one line per topic) and the full set into
`.ipal/starter.json`. A module the owner turns off needs the owner's reason, which goes into
`ipal-audit-skip:` and `ipal-doctor.json` (`"rules": { "2fa": { "off": true, "reason": "…" } }`).
`.iapl/starter.json`. A module the owner turns off needs the owner's reason, which goes into
`iapl-audit-skip:` and `iapl-doctor.json` (`"rules": { "2fa": { "off": true, "reason": "…" } }`).
**Not supported yet — the command stops before writing anything** and points to the manual path (the
`ipal-setup` skill, stages 1–11), which covers them:
`iapl-setup` skill, stages 1–11), which covers them:
- **single-language sites** (owner's decision: later);
- **a default language other than `pl`**, and sites without `en` — the base seed is Polish + English with Polish
default-locale slugs;
- URLs without a language prefix; Postgres (MongoDB only).
Check: `ipal-kit create acme.pl --answers single.json` with one locale exits 1 with "a single-language site is not
supported by `ipal-kit create` yet — set the site up by hand with the ipal-setup skill", and the folder is not created.
Check: `iapl create acme.pl --answers single.json` with one locale exits 1 with "a single-language site is not
supported by `iapl create` yet — set the site up by hand with the iapl-setup skill", and the folder is not created.
For agents and CI, the same answers as JSON (shape: `StarterAnswers`, `@intecion/ipal-kit/starter`):
```bash
pnpm exec ipal-kit create intecion.com --dir ../intecioncom-web --answers answers.json
pnpm exec iapl create intecion.com --dir ../intecioncom-web --answers answers.json
```
```json
@@ -92,27 +97,27 @@ pnpm exec ipal-kit create intecion.com --dir ../intecioncom-web --answers answer
1. Validates the domain, the folder and every answer — nothing is written while one is missing.
2. Renders the site from the starter bundle (below) and writes it; writes a local `.env` (`.env.example` with a
fresh `PAYLOAD_SECRET`; git-ignored, never committed).
3. `pnpm install` from the shipped lockfile, `pnpm exec ipal-skills` (+ `--external`), `pnpm exec ipal-tokens`
3. `pnpm install` from the shipped lockfile, `pnpm exec iapl-skills` (+ `--external`), `pnpm exec iapl-tokens`
(writes `src/design/tokens.css`, fails on a WCAG contrast error — pick another colour), `pnpm generate:types`,
`pnpm generate:importmap`, `pnpm typecheck`, and `pnpm exec ipal-doctor --strict --offline` when the installed
ipal-kit ships it.
`pnpm generate:importmap`, `pnpm typecheck`, and `pnpm exec iapl-doctor --strict --offline` when the installed
IAPL ships it.
4. `git init -b main`, a secret check of every staged file (no `.env*` except `.env.example`, no assigned
`*_SECRET` / `*_TOKEN` / `*_PASSWORD` / `*_ACCESS_KEY` value, no private key) and one commit
`chore: create site with ipal-kit create <version>`. No remote, no push.
`chore: create site with iapl create <version>`. No remote, no push.
5. Prints the next steps: local MongoDB with `<domain>_dev`, `pnpm seed` (before launch), the panel steps, the
deploy (`docs/DEPLOY.md`).
**Check:** in the new folder `git log --oneline` = one commit, `git status` clean, `pnpm typecheck` passes,
`grep -c 'Project decisions' AGENTS.md` = 1, `cat ipal-doctor.json` shows the domain and `launched: false`.
`grep -c 'Project decisions' AGENTS.md` = 1, `cat iapl-doctor.json` shows the domain and `launched: false`.
## The generated site
The reference site's tree (AGENT.md §3) with: the plugin pinned to the exact released version, the database
names from `databaseNamesFor(domain)` (`intecion.com` → `intecioncom_dev` / `intecioncom_prod`; hyphens stay),
`packageManager` pinned (copied from the reference site), CSP in **report-only** (`ipal-doctor.json` silences the
`packageManager` pinned (copied from the reference site), CSP in **report-only** (`iapl-doctor.json` silences the
report-only finding for 28 days with the reason, and carries the reference site's own reasoned silences —
`i18n-literals` for the `/design` styleguide, `audit:collections-present` only while `posts` / `caseStudies` are in),
`assertEnv(ipalEnvRules({ databaseName, ipHeader, storage, … }))` in `instrumentation.ts`, the blocks from the
`assertEnv(iaplEnvRules({ databaseName, ipHeader, storage, … }))` in `instrumentation.ts`, the blocks from the
block library (`libraryBlocks` + `createBlockRegistry(content, { Image, Link, … })`), the design-token standard
(`styles.css` imports only, the brand in `src/design/tokens.ts`, next/font `--font-family-body` /
`--font-family-heading`), seeds through `createSeeder` with `SEED_ONLY`, and `docs/DEPLOY.md` for the team's
@@ -126,7 +131,7 @@ SEED_ONLY="pages:kontakt" pnpm seed # the real run
```
Not in a new site: the reference company's demo content and media, the Blocks showcase page, the smoke tests
(`e2e/`), `.agents/skills` (re-installed by `ipal-skills`), `README.md`.
(`e2e/`), `.agents/skills` (re-installed by `iapl-skills`), `README.md`.
## How the reference site becomes a site
@@ -135,7 +140,7 @@ Not in a new site: the reference company's demo content and media, the Blocks sh
| Role | Meaning |
|---|---|
| `drop` | left out (demo seeds and media, e2e, generated files) |
| `generate` | written by the starter from the answers (`src/i18n.config.ts`, `src/design/tokens.ts`, `DESIGN.md`, `ipal-doctor.json`) |
| `generate` | written by the starter from the answers (`src/i18n.config.ts`, `src/design/tokens.ts`, `DESIGN.md`, `iapl-doctor.json`) |
| `template` | copied with `placeholders` replaced — the reference's unique fake values (`example-studio.pl`, `Example Studio`, `example-studiopl`…) → the new site's values |
| `keep` | copied as is; must not contain a fake value (the bundle build fails) |
| `variants` | whole files that exist only with a flag on (`src/collections/Posts.ts` → `posts`) |
@@ -158,7 +163,7 @@ that is how the reference carries code it does not run itself. The flags come fr
`graph`, `localBusiness`, `aiBotsBlockTraining`, `aiBotsDisallow`, `analytics`, `metaPixel`, `linkedIn`, `tiktok`,
`clarity`, `consentBasic`, `bannerDetailed`, `bannerInline`, `bannerModal`, `themeToggle`, `defaultLight`,
`defaultDark`, `defaultSystem`, `whiteLabel`, `adminMeta`, `agencyNone`, `agencyCustom`, `enforceCsp` (always
off in a new site) and `demo` (always off). A flag the reference uses that this ipal-kit does not set stops the
off in a new site) and `demo` (always off). A flag the reference uses that this IAPL does not set stops the
run with its name.
**Adding a feature to the starter** = changing the reference site: write the code there (marked with
@@ -180,10 +185,10 @@ compiled code with source maps, docs — is ~340 KB unpacked (~4 % of 7.96 MB) a
`_dev` database (MongoDB in its own Docker container) → `pnpm generate:types && pnpm build` →
`SEED_ONLY="pages:kontakt" [SEED_DRY_RUN=1] pnpm seed` in production mode → a full seed in production refused (the guard's
"full seed refused" message is required; a run where Payload never initialized is inconclusive and retried, up to 3) →
`pnpm start` with `/api/health`, `/pl`, report-only CSP, no `X-Powered-By`, `/llms.txt` → `ipal-doctor --strict --offline`
`pnpm start` with `/api/health`, `/pl`, report-only CSP, no `X-Powered-By`, `/llms.txt` → `iapl-doctor --strict --offline`
(when shipped) → with the `nixpacks` CLI on PATH, the same seed inside the Nixpacks image. Each run packs to a new
file name and calls `dlx` with `--config.dlx-cache-max-age=0` (pnpm's dlx cache is keyed by the spec, so a reused path
would run the previous build), then checks the new site's `.ipal/starter.json` → `source` (the bundle's sha256 and the
would run the previous build), then checks the new site's `.iapl/starter.json` → `source` (the bundle's sha256 and the
plugin commit `build:starter` recorded) and the installed plugin against the packed tarball. Needs Docker;
`--keep` leaves `.starter-gate/` for inspection.
@@ -207,9 +212,9 @@ Types: `StarterAnswers`, `AnalyticsTool`, `ContentCollection`, `StarterBundle`,
## Turn off, override
- The command is optional: the manual path (`ipal-setup` stages 1–11) still sets up any site, including what this
- The command is optional: the manual path (`iapl-setup` stages 1–11) still sets up any site, including what this
version refuses (other default language, no URL prefix, Postgres).
- Every generated file belongs to the project afterwards — change it like any other file; `ipal-upgrade` and
`ipal-doctor` keep it in line with later plugin versions.
- Every generated file belongs to the project afterwards — change it like any other file; `iapl-upgrade` and
`iapl-doctor` keep it in line with later plugin versions.
- `--no-install`, `--no-git`, `--dir`, `--plugin-spec` change the run; a different reference tree → your own
generator from the building blocks above.