Doctor: the performance rules are errors (owner's decision for 1.18.0); lowered or silenced per rule in iapl-doctor.json; growth stays warnings; audit reports them as errors; legacy:site lists perf-* errors an old site meets; docs, skills, changelog; reference skills refreshed
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f0127ac1b8
commit
8cf5a58045
+23
-8
@@ -144,14 +144,14 @@ Turn off: `iapl({ doctor: false })`. Adapt: `iapl({ doctor: { tokenVar: 'MY_TOKE
|
||||
| | `blocks-duplicate` | warning | a project block whose `slug` (or `interfaceName`) matches a library block — also a slug renamed through the block's `slug` option — unless it is an override in `createBlockRegistry({ components })` |
|
||||
| | `blocks-helper-copy` | warning | no local copy of a plugin field builder (`blockLibraryManifest.fieldBuilders`), `ctaHref`, `buildActionButtonsField` |
|
||||
| | `blocks-tokens` | error / warning | from `iapl-audit`: hex colours, the token standard not wired, `iapl-tokens --check` |
|
||||
| performance | `perf-images-config` | warning | `next.config` uses `buildImagesConfig()` (AVIF / WebP, R2, long cache) — [performance.md](./performance.md) |
|
||||
| | `perf-fonts` | warning | no font from Google / Typekit hosts, no `font-display: block`, every `@font-face` has `font-display`, at most two `next/font` families |
|
||||
| | `perf-render-blocking` | warning | no `<script src>` without `async` / `defer`, no stylesheet `<link>` or CSS `@import` from another host |
|
||||
| | `perf-embeds` | warning | no `<iframe>` (map, widget) that loads with the page — a click-to-load facade, or `loading="lazy"`; YouTube is `iapl-audit`'s |
|
||||
| | `perf-animations` | warning | no transition of a layout property or `transition-all`, no `scroll` listener, something honours `prefers-reduced-motion` when the site animates |
|
||||
| | `perf-budgets` | info | a project that runs Playwright has a performance budget test in `e2e/` (the `iapl-performance` skill's template) |
|
||||
| | `perf-live` | warning | (live) the home HTML is compressed, has no blocking `<script>` in `<head>`, preloads at most four fonts, its first image in `<main>` is not lazy, and is at most 150 KB |
|
||||
| | `perf-images` | warning | (deep) no stored image over 1.5 MB or 2560 px wide (`IMAGE_RULES`) |
|
||||
| performance | `perf-images-config` | error | `next.config` uses `buildImagesConfig()` (AVIF / WebP, R2, long cache) — [performance.md](./performance.md) |
|
||||
| | `perf-fonts` | error | no font from Google / Typekit hosts, no `font-display: block`, every `@font-face` has `font-display`, at most two `next/font` families |
|
||||
| | `perf-render-blocking` | error | no `<script src>` without `async` / `defer`, no stylesheet `<link>` or CSS `@import` from another host |
|
||||
| | `perf-embeds` | error | no `<iframe>` (map, widget) that loads with the page — a click-to-load facade, or `loading="lazy"`; YouTube is `iapl-audit`'s |
|
||||
| | `perf-animations` | error | no transition of a layout property or `transition-all`, no `scroll` listener, something honours `prefers-reduced-motion` when the site animates |
|
||||
| | `perf-budgets` | error | a project that runs Playwright has a performance budget test in `e2e/` (the `iapl-performance` skill's template) |
|
||||
| | `perf-live` | error | (live) the home HTML is compressed, has no blocking `<script>` in `<head>`, preloads at most four fonts, its first image in `<main>` is not lazy, and is at most 150 KB |
|
||||
| | `perf-images` | error | (deep) no stored image over 1.5 MB or 2560 px wide (`IMAGE_RULES`) |
|
||||
| growth | `growth-size` | warning | (deep) no collection over `growth.maxDocs` (200 000) documents or `growth.maxMB` (512, data + indexes, MongoDB) — [performance.md](./performance.md) §6 |
|
||||
| | `growth-versions` | warning | (deep) no collection or global keeps versions without a limit (`maxPerDoc` / `max`: 0), none over `growth.maxVersions` (50 000) |
|
||||
| | `growth-retention` | warning | (deep) a log with a retention (consent log, statistics, form submissions with `submissionRetentionDays`) holds no record older than it — its purge runs |
|
||||
@@ -170,6 +170,21 @@ Turn off: `iapl({ doctor: false })`. Adapt: `iapl({ doctor: { tokenVar: 'MY_TOKE
|
||||
The block rules read `blockLibraryManifest` (`@intecion/ipal-kit/blocks`), so a new library block needs no doctor
|
||||
change.
|
||||
|
||||
### The performance rules are errors (1.18.0)
|
||||
|
||||
`iapl-doctor` (and `--strict`) fails on every `perf-*` finding. None of them measures time — each reads the
|
||||
project's files, the home page's HTML or stored counts — so the same site gives the same answer every run. A project
|
||||
that accepts one for a reason lowers or silences it in `iapl-doctor.json`, per rule:
|
||||
|
||||
```json
|
||||
{ "rules": {
|
||||
"perf-fonts": { "severity": "warning", "reason": "the client's brand font, replaced in Q1" },
|
||||
"perf-embeds": { "off": true, "reason": "the map is the page's content (client decision)", "files": ["src/components/Map.tsx"] },
|
||||
"perf-budgets": { "off": true, "reason": "no e2e on this site yet", "until": "2027-03-01" }
|
||||
} }
|
||||
```
|
||||
The `growth` group stays warnings and infos.
|
||||
|
||||
## Adapt it — `iapl-doctor.json`
|
||||
|
||||
Every rule can be silenced, lowered or raised — **with a reason** — in `iapl-doctor.json` in the project root
|
||||
|
||||
Reference in New Issue
Block a user