ipal-doctor: one command that checks a site against the team rules

bin ipal-doctor + @intecion/ipal-kit/doctor: static rules (versions, Node 22, AGENT.md §3
layout and naming, database names, env rules, headers, X-Powered-By, CSP, 2FA, cookie
scanner, adminMeta, AGENTS.md, skills, seeds, block library via blockLibraryManifest,
ipal-audit --quick), registry rules (latest plugin, pnpm audit --prod), live rules (--url,
ipal-seo-check), deep rules (--deep via payload run; GET /api/ipal/doctor, off until
IPAL_DOCTOR_TOKEN). Human / JSON output, --strict, exit codes 0/1/2/3, --sites drift table,
ipal-doctor.json with reasons, until, files, seen.

Fixes found on the way: sitemap leaves out the System pages 404 page; ipal-audit finds
array labels after fields, any form seed, runs grep in UTF-8; ipal-seo-check counts
duplicate titles per language. Reference site at zero findings (static), CI steps on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-29 16:03:00 +01:00
co-authored by Claude Opus 5.5
parent 0ab133fbd7
commit a4e8cfeae8
62 changed files with 2998 additions and 70 deletions
@@ -1,29 +1,36 @@
// src/components/forms/formClasses.ts — the ONLY place forms are styled. Every
// panel form (RenderForm / BuilderForm) uses it. Values = the project's design
// tokens (DESIGN.md); the plugin ships no styles. Delete keys you don't need.
// panel form (RenderForm / BuilderForm) uses it. Design-token utilities only
// (node_modules/@intecion/ipal-kit/docs/design-tokens.md): a brand changes
// src/design/tokens.ts, never this file. Delete keys you don't need.
import type { BuilderFormClassNames } from '@intecion/ipal-kit/client'
import { buttonClass } from '@intecion/ipal-kit/blocks/rsc'
const control =
'w-full rounded-control border border-border-strong bg-surface px-3 py-2 text-fg placeholder:text-fg-muted ' +
'transition-colors duration-fast ease-out focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus ' +
'aria-invalid:border-danger'
export const formClasses: BuilderFormClassNames = {
form: 'grid gap-6',
progress: 'text-sm text-muted', // "Step 1 of 3"
progress: 'text-sm text-fg-muted', // "Step 1 of 3"
step: 'grid gap-4',
stepTitle: 'text-h3 font-semibold',
stepDescription: 'text-muted',
stepTitle: 'text-h4',
stepDescription: 'text-fg-muted',
fields: 'grid grid-cols-12 gap-4',
field: 'col-span-12',
fieldHalf: 'md:col-span-6', // width ≤ 50 in the panel
label: 'mb-1 block font-medium',
input: 'w-full rounded-md border border-border px-3 py-2',
textarea: 'w-full rounded-md border border-border px-3 py-2',
select: 'w-full rounded-md border border-border px-3 py-2',
label: 'mb-1 block font-medium text-fg-strong',
input: control,
textarea: control,
select: control,
checkboxLabel: 'flex items-start gap-2',
choices: 'grid gap-2', // radio / checkbox group <fieldset>
legend: 'mb-1 font-medium',
legend: 'mb-1 font-medium text-fg-strong',
choice: 'flex items-center gap-2',
error: 'mt-1 text-sm text-danger',
formError: 'text-danger',
actions: 'flex gap-3',
back: 'btn btn-secondary', // same classes as Button.tsx variants
submit: 'btn btn-primary',
success: 'rounded-md bg-surface p-6',
formError: 'rounded-control bg-danger-surface p-4 text-danger',
actions: 'flex flex-wrap gap-3',
back: buttonClass('secondary'), // the same looks as the section buttons
submit: buttonClass('primary'),
success: 'rounded-card bg-success-surface p-6 text-success',
}