From 9e583a92c9141e250fc36b1097d6ce22519587f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Smoli=C5=84ski?= Date: Thu, 29 Oct 2026 13:35:13 +0100 Subject: [PATCH] ipal-doctor proposal: blockLibraryManifest, slug-based duplicate match Co-Authored-By: Claude Opus 5.5 --- docs/dev/ipal-doctor-proposal.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/dev/ipal-doctor-proposal.md b/docs/dev/ipal-doctor-proposal.md index 476686a..c8c00f4 100644 --- a/docs/dev/ipal-doctor-proposal.md +++ b/docs/dev/ipal-doctor-proposal.md @@ -102,12 +102,14 @@ Source tags: **S** = static (files only, no network, no database), **R** = regis | `blocks-registry` | error | S | `blocks/registry.ts` builds the registry with `createBlockRegistry(content, { ui, components, classNames, extra })` or renders through `RenderBlocks`; no hand-written `switch (blockType)` | blocks.md → Block library | | `blocks-ui-required` | error | S | without `createBlockRegistry`, `components/ui/` holds the five primitives (Section, SectionHeader, Media, CMSLink, Button); with it, `ui/` is optional | the `ipal-block` skill | | `blocks-ui-override` | warning | S | every file in `components/ui/` named like a library primitive (Section, SectionHeader, Media, CMSLink, Button, Container, Card) is passed through the registry's `ui` option. Otherwise the library blocks keep the plugin's version and the two looks drift apart | `createBlockRegistry(content, { ui: { Button } })` | -| `blocks-duplicate` | warning | S | a project block whose folder or slug matches a library block (or a variant of one) and is not a declared override or eject | use the library block + variant, or record the eject in "Project decisions" | +| `blocks-duplicate` | warning | S | a project block whose `slug` (read from its `config.ts`, not the folder name) or `interfaceName` matches a library block or a variant of one, and is not a declared override or eject. A library block renamed through its `slug` option (`testimonials` → `reviews`) counts as the library block, so a project block with the old or the new slug is a duplicate | use the library block + variant, or record the eject in "Project decisions" | | `blocks-helper-copy` | warning | S | no local copies of plugin helpers (`buildItemsField`, `buildActionButtonsField`, `ctaHref`, and the other exported field builders) | import from the plugin | | `blocks-tokens` | error | S | classes use design tokens only (no hex, no arbitrary colours) — the `ipal-audit` hex rule, extended by the design-token track's names | DESIGN.md / tokens | -The list of library blocks and primitives is read from the installed plugin (an exported manifest), not -hard-coded in the doctor, so a new library block needs no doctor change. +The doctor reads `blockLibraryManifest` from `@intecion/ipal-kit/blocks` (plain data: `blocks[{ slug, interfaceName, +variants, fields, phase }]`, `primitives`, `fieldBuilders`, `templates`), so a new library block, primitive or +field builder needs no doctor change. `blocks-helper-copy` checks the `fieldBuilders` names; `blocks-ui-override` +the `primitives`. ### 2.6 Live checks (`--url`)