Block library: docs, agent guide, skills; picker order as an explicit list

- docs/block-library.md: setup, every block (fields, variants, accessibility),
  options, registry, primitives, eject, page templates, seeding after launch,
  versioning, manifest, turn off / override / extend
- AGENT.md (compass, how to add, §6, §6.3, module map), ipal-block (library
  block first), ipal-site (phases 2, 4, 6, 8), ipal-reference (wiring rows,
  export index), seed-content template from pageTemplates, seeding.md ($form)
- CHANGELOG Unreleased; proposal marked built with an as-built section

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-29 14:12:50 +01:00
co-authored by Claude Opus 5.5
parent 2d1cc0e77d
commit 2a07fb8844
14 changed files with 470 additions and 39 deletions
+6 -2
View File
@@ -194,11 +194,14 @@ process.exit(seed.summary().errors ? 1 : 0)
**Seed values.** Write each value once, every language side by side. An object whose keys are all
locale codes is one value per locale (`{ pl: 'Kontakt', en: 'Contact' }`); anything else is the same
in every locale. A locale missing from such an object is left untouched in that locale.
`{ $page: 'kontakt' }` becomes the ID of the page whose default-locale slug is `kontakt`.
`{ $page: 'kontakt' }` becomes the ID of the page whose default-locale slug is `kontakt`;
`{ $form: 'Contact form' }` becomes the ID of the form with that title (seed the form first). A missing form
is an error for that record, never an empty relation. Ready pages made of library blocks:
`pageTemplates` in [block-library.md](./block-library.md#page-templates).
| Method | What it does |
|---|---|
| `upsertBySlug(collection, data \| data[], { slugField })` | matches by the default-locale slug (`slugField`, default `slug`). With an array, missing records are created first (without fields that hold `$page` links), then every record gets its full content, so pages can link to each other in any order |
| `upsertBySlug(collection, data \| data[], { slugField })` | matches by the default-locale slug (`slugField`, default `slug`). With an array, missing records are created first (without fields that hold `$page` / `$form` links), then every record gets its full content, so pages can link to each other in any order |
| `upsertBy(collection, key, data)` | matches by other natural keys, e.g. `{ title: 'Contact form' }` (all keys must match, default locale) |
| `fillGlobal(slug, data)` | fills only the global's empty fields (the default locale decides). With `update` and an untouched global: every seeded field |
| `summary()` | prints the summary and returns `{ created, skipped, updated, skippedEdited, errors }` |
@@ -245,6 +248,7 @@ the script:
| `SEED_HASH_FIELD` | `editCheck.hashField` | `seedHash` | the hash field name; empty / `false` = timestamps only |
| — | `context` | `{ ipalSeed, disableRevalidate, ipalSkipIndexNow }` all `true` | merged over the defaults; set a key to `false` to drop it |
| — | `pagesCollection` | `pages` | the collection `{ $page }` links resolve in |
| — | `formsCollection` | `forms` | the collection `{ $form }` links resolve in (by `title`) |
| — | `label`, `log` | `[seed]`, stdout | line prefix and where lines go |
| `SEED_NOTIFY_EMAIL` | — | — | form seed: notification address for a first run when the company global is still empty |