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:
Radosław Smoliński
2026-12-01 16:10:23 +01:00
co-authored by Claude Opus 5.5
parent f0127ac1b8
commit 8cf5a58045
19 changed files with 136 additions and 69 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ next/font in `--font-body` with the preset (warning), and with `src/design/token
`iapl-tokens --check` — a stale `src/design/tokens.css` or a WCAG AA contrast failure is an error.
## Speed (AGENT.md §6.11b, docs/performance.md)
The full run (not `--quick`) lists the doctor's `performance` group as warnings: `next.config` without
The full run (not `--quick`) lists the doctor's `performance` group as errors (since 1.18.0; a rule the project lowered in `iapl-doctor.json` shows as a warning): `next.config` without
`buildImagesConfig()`, fonts from Google or with `display: 'block'`, more than two families, a blocking `<script src>`
or a remote stylesheet, an `<iframe>` that loads with the page, transitions of layout properties, `transition-all`,
`scroll` listeners, animations with nothing for reduced motion. The `iapl-performance` skill measures the built site and
@@ -362,12 +362,14 @@ if [ -n "$UI" ]; then
done
fi
# --- Speed (§6.11b, performance.md) — the doctor's performance group: images config, fonts, render-blocking,
# embeds, animations, a budget test. Full mode only: the doctor itself runs this audit with --quick.
# --- Speed (§6.11b, performance.md) — the doctor's performance group (errors since 1.18.0): images config, fonts,
# render-blocking, embeds, animations, a budget test. Full mode only: the doctor itself runs this audit with --quick.
if [ "$QUICK" -eq 0 ] && [ -x node_modules/.bin/iapl-doctor ]; then
# errors since 1.18.0; a rule the project lowered in iapl-doctor.json comes back as a warning, a silenced one not at all
PERF=$(node_modules/.bin/iapl-doctor --only performance --offline --json 2>/dev/null \
| node -e 'let s="";process.stdin.on("data",(d)=>(s+=d)).on("end",()=>{try{for(const f of JSON.parse(s).findings){if(!f.silenced&&f.severity!=="info"){console.log(`${f.file??"(site)"} [${f.rule}] ${f.message}`)}}}catch{}})')
report WARNING "speed (iapl-doctor --only performance)" "§6.11b / performance.md — each line names the rule; iapl-performance skill" "$PERF"
| node -e 'let s="";process.stdin.on("data",(d)=>(s+=d)).on("end",()=>{try{for(const f of JSON.parse(s).findings){if(!f.silenced&&f.severity!=="info"){console.log(`${f.severity==="error"?"E":"W"}|${f.file??"(site)"} [${f.rule}] ${f.message}`)}}}catch{}})')
report ERROR "speed (iapl-doctor --only performance)" "§6.11b / performance.md — each line names the rule; lower or silence one with a reason in iapl-doctor.json" "$(printf '%s\n' "$PERF" | sed -n 's/^E|//p')"
report WARNING "speed, lowered to a warning in iapl-doctor.json" "§6.11b / performance.md" "$(printf '%s\n' "$PERF" | sed -n 's/^W|//p')"
fi
# --- Compile & build ---
+6 -1
View File
@@ -1,6 +1,6 @@
---
name: iapl-doctor
description: Checks the whole site against the IAPL team standard with one command (`pnpm exec iapl-doctor`) — plugin, Next, sharp and Node versions, the AGENT.md §3 folder layout and naming, database names (<domain>_dev/_prod), env rules, security headers, X-Powered-By, CSP, 2FA, the cookie scanner, adminMeta/agency, AGENTS.md "Project decisions", current iapl-* skills, seeds (createSeeder, SEED_ONLY, no deletes), the block library, pnpm audit, hardcoded texts, and with --url / --deep the running site and the database. Use after setting up a site, after an IAPL upgrade, before a deploy, in CI of a new site, and when asked whether a site follows the team rules.
description: Checks the whole site against the IAPL team standard with one command (`pnpm exec iapl-doctor`) — plugin, Next, sharp and Node versions, the AGENT.md §3 folder layout and naming, database names (<domain>_dev/_prod), env rules, security headers, X-Powered-By, CSP, 2FA, the cookie scanner, adminMeta/agency, AGENTS.md "Project decisions", current iapl-* skills, seeds (createSeeder, SEED_ONLY, no deletes), the block library, pnpm audit, hardcoded texts, speed (the performance rules — errors) and what grows (sizes, versions, retention, unused media), and with --url / --deep the running site and the database. Use after setting up a site, after an IAPL upgrade, before a deploy, in CI of a new site, and when asked whether a site follows the team rules.
---
# iapl-doctor
@@ -25,11 +25,16 @@ Full reference: `node_modules/@intecion/ipal-kit/docs/doctor.md`.
with the Intecion mail service (IWSN in the panel): waiting for approval, stopped, refused, disconnected, a replaced sender name),
`mail-reply-address`, `mail-graph-deprecated`, `mail-relay-route` (trailing slashes, another API route, a redirect or a
block in front of `/api/iapl/mail-relay/confirm`) — fixes: `iapl-debug` "Consent / analytics / forms / email".
**Speed (`perf-*`) findings are errors since 1.18.0** (images config, fonts, render-blocking, embeds, animations,
a budget test; `--url`: compression, blocking scripts, font preloads, a lazy first image, HTML size; `--deep`:
oversized stored images) — the `iapl-performance` skill. The `growth-*` findings stay warnings and infos.
4. A deliberate exception (the owner's decision) goes into `iapl-doctor.json` **with a reason** — the same reason as in
AGENTS.md "Project decisions". Never silence a rule just to make the run pass:
```json
{ "rules": { "i18n-literals": { "off": true, "files": ["src/components/design/**"], "reason": "approved exception: styleguide labels" } } }
```
A speed rule the client accepts is lowered rather than silenced, so it stays in the report:
`"perf-fonts": { "severity": "warning", "reason": "the client's brand font, replaced in Q1" }`.
Keys: `off`, `severity`, `reason` (required), `until` (ISO date), `files` (globs). Top level: `domain`, `launched`,
`layout.allow`, `layout.frontend` (the pages' folder, e.g. `src/app/(site)` — found by structure otherwise; any route
group name works), `seen` (written by the doctor), `extraRules`.
+5 -2
View File
@@ -13,7 +13,10 @@ must do, how to measure, how to read the findings. This skill is the order of wo
pnpm exec iapl-doctor --only performance # images config, fonts, render-blocking, embeds, animations, budget test
bash .agents/skills/iapl-audit/scripts/audit.sh --quick # <img>/<video> outside Media, priority outside the hero, YouTube iframe, h-screen
```
Fix every warning — each names the file, the fix and the doc. The rules that matter most:
These are **errors** since 1.18.0 (`iapl-doctor` fails). Fix each — it names the file, the fix and the doc. When the
client accepts one (a brand font, a map that is the page's content), lower it with a reason in `iapl-doctor.json`
(`"perf-fonts": { "severity": "warning", "reason": "…" }`) or silence it (`"off": true`, optionally `until`), and record
it in AGENTS.md → Project decisions. The rules that matter most:
| Area | Do | Never |
|---|---|---|
@@ -64,6 +67,6 @@ pnpm exec iapl-doctor --deep --only growth # counts and sizes per collection,
- Thresholds of the findings: `iapl-doctor.json` → `growth`.
## 5. Before "done"
`iapl-doctor --only performance` without warnings (or each one silenced with a reason in `iapl-doctor.json`),
`iapl-doctor --only performance` without errors (each exception lowered or silenced with a reason in `iapl-doctor.json`),
the budget test green, and the numbers in `AGENTS.md` → "Project decisions" when the client accepted an exception
(a heavy font, a third-party widget).