ipal-doctor proposal: starter clashes (src allow list, ui/ with createBlockRegistry, per-rule reasons, plugin-latest warning)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a1f810e9de
commit
1a3a52a1be
@@ -45,7 +45,7 @@ Source tags: **S** = static (files only, no network, no database), **R** = regis
|
||||
|
||||
| Id | Sev | Src | Check | Fix hint |
|
||||
|---|---|---|---|---|
|
||||
| `plugin-latest` | error if a minor or more behind, else warning | R | the installed `@intecion/ipal-kit` equals the newest one on the team registry (`pnpm view @intecion/ipal-kit version`, through the project's `.npmrc`). Offline → info "could not check", compared with the doctor's own version instead | `pnpm add @intecion/ipal-kit@<latest>` + the `ipal-upgrade` skill |
|
||||
| `plugin-latest` | warning naming the newer version; error two or more minors behind | R | the installed `@intecion/ipal-kit` equals the newest one on the team registry (`pnpm view @intecion/ipal-kit version`, through the project's `.npmrc`). Offline → info "could not check", compared with the doctor's own version instead | `pnpm add @intecion/ipal-kit@<latest>` + the `ipal-upgrade` skill |
|
||||
| `plugin-installed` | error | S | the version in `node_modules` satisfies `package.json` (a stale install hides the real state) | `pnpm install` |
|
||||
| `next-min` | error | S | installed `next` ≥ 16.4.1 and `eslint-config-next` on the same 16.4.x (AGENT.md §4 item 11) | `pnpm add [email protected] [email protected]` |
|
||||
| `sharp-min` | error | S | resolved `sharp` ≥ 0.35.5 | `pnpm add sharp@^0.35.5` / override |
|
||||
@@ -57,9 +57,9 @@ Source tags: **S** = static (files only, no network, no database), **R** = regis
|
||||
|
||||
| Id | Sev | Src | Check | Fix hint |
|
||||
|---|---|---|---|---|
|
||||
| `layout-required` | error | S | every file of AGENT.md §3 exists: `proxy.ts`, `i18n.config.ts`, `instrumentation.ts`, `lib/content.ts`, the route files (`manifest`, `robots`, `sitemap.xml`, `llms.txt`, `llms-full.txt`, `md/…`, `api/mcp`, `api/health`, `indexnow-key.txt`), `(frontend)/[locale]/{layout,actions,not-found,[[...slug]]/page}` (no `[locale]` for one language), `blocks/registry.ts`, `collections/{Pages,Media}.ts`, `components/{ui,layout}/`, `components/forms/formClasses.ts`. A feature the project switched off (`ipal-audit-skip`, §4) drops its file | the `ipal-setup` skill, stage named in the hint |
|
||||
| `layout-required` | error | S | every file of AGENT.md §3 exists: `proxy.ts`, `i18n.config.ts`, `instrumentation.ts`, `lib/content.ts`, the route files (`manifest`, `robots`, `sitemap.xml`, `llms.txt`, `llms-full.txt`, `md/…`, `api/mcp`, `api/health`, `indexnow-key.txt`), `(frontend)/[locale]/{layout,actions,not-found,[[...slug]]/page}` (no `[locale]` for one language), `blocks/registry.ts`, `collections/{Pages,Media}.ts`, `components/layout/`, `components/forms/formClasses.ts`, and `components/ui/` **only when the project does not take the primitives from `@intecion/ipal-kit/blocks/rsc` through `createBlockRegistry`** (then `ui/` holds only overrides and may be missing). A feature the project switched off (`ipal-audit-skip`, §4) drops its file | the `ipal-setup` skill, stage named in the hint |
|
||||
| `layout-forbidden` | error | S | no `middleware.ts`; no `lib/{pages,locales,navigation}.ts`, `fields/{link,sectionHeader,sectionSettings}.ts` (the plugin has them) | delete and import from the plugin |
|
||||
| `layout-extra` | info | S | top-level entries in `src/` outside the convention (listed, nothing more) | move into the convention, or silence with a reason |
|
||||
| `layout-extra` | info | S | top-level entries in `src/` outside the convention (listed, nothing more). The default allow list is the AGENT.md §3 set plus the shared drafts: `seed/`, `design/`, `db.ts`, `env.rules.ts`, `content.config.ts`. The list is exported, and `ipal-doctor.json` `layout.allow` extends it | move into the convention, or silence with a reason |
|
||||
| `naming` | warning | S | block folders, collections, globals in PascalCase; `scripts/*` in kebab-case; no `index.ts` barrels in `blocks/`, `components/` | rename |
|
||||
| `importmap` | error | S + D | static: `app/(payload)/<admin>/importMap.js` exists, holds the entries for every feature the config turns on (2FA → `TotpRedirectProvider` + `payload-2fa/rsc#…`; R2 → `S3ClientUploadHandler`; cookie scanner → `CookieReviewTab`…; `adminMeta` → `AdminIcon`…) and names no export the installed plugin no longer has. Deep: generates the import map into a temp file and diffs it with the committed one (exact) | `pnpm payload generate:importmap` and commit |
|
||||
| `tsconfig-skills` | error | S | `tsconfig.json` excludes the skills folder | `"exclude": ["node_modules", ".agents"]` |
|
||||
@@ -196,6 +196,7 @@ link, then a summary `3 errors, 5 warnings, 2 info (2 silenced)`. Colour only on
|
||||
}
|
||||
```
|
||||
|
||||
- A module the owner turned off (`twoFactor`, `cookieScanner`, `adminMeta`, `agency`, …) is a valid silenced rule: one entry per rule, each with its own `reason` (the owner's decision, the same text as the `ipal-audit-skip` line). `--strict` does not fail on silenced findings.
|
||||
- Silencing or lowering a rule **needs a `reason`**; without one the entry is ignored and reported.
|
||||
- `until` makes it expire: after that date the rule is back and the report says so.
|
||||
- Silenced findings still appear in JSON with `"silenced": true` and in the summary count — nothing disappears.
|
||||
@@ -225,7 +226,7 @@ modules so docs and code cannot disagree.
|
||||
| # | Decision | Recommendation |
|
||||
|---|---|---|
|
||||
| D1 | Ship as a bin in the plugin, or a separate `@intecion/ipal-doctor` package | **bin in the plugin**; newest rules via `pnpm dlx --package=@intecion/ipal-kit@latest` |
|
||||
| D2 | How strict is `plugin-latest`: error when any patch behind, or only a minor behind | **error a minor behind, warning a patch behind** |
|
||||
| D2 | How strict is `plugin-latest` | **warning naming the newer version; error two or more minors behind** (a site the starter generated stays clean until a release, then shows a warning, not an error) |
|
||||
| D3 | Deep checks: `payload run` only, a token endpoint only, or both | **both**, endpoint off until `IPAL_DOCTOR_TOKEN` is set |
|
||||
| D4 | The Node pin form | **`"engines": { "node": ">=22 <23" }` + `.nvmrc` = `22`** |
|
||||
| D5 | "Seeds take a named-record list" needs a **new seed-helper option**: today `createSeeder` has no way to pick records. Proposal: `SEED_ONLY=pages:home,forms:Contact` (or `--only pages:home`) filtering every `seed.collection/global` call by its natural key, and refusing a run without a list on a `_prod` database unless `SEED_ALL=1` and the owner's OK. Build it in this track or a separate one? | **separate small track, before the doctor's release**; until then `seed-named` checks only helper use + no deletes |
|
||||
|
||||
Reference in New Issue
Block a user