Use this list before opening a pull request and when reviewing one. Skip the sections the change does not touch. Each item names what checks it: [type], [lint], [test], [build], [deploy] or [convention]. A [convention] item is checked only by a reviewer, so read it carefully.
Always
-
pnpm check-types,pnpm lint,pnpm i18n:check,FORMAT_BASE_REF=origin/main pnpm format:checkandpnpm testpass.[type][lint][test] - Database behavior is tested against the disposable cluster:
node scripts/test-local-postgres.mjs exec pnpm test:integration.TEST_DATABASE_URLnever points at a shared or hosted database.[test] - A user-visible change has a changelog entry, and a changed flow updates its guide in the same change.
[convention] - Commits are logical Conventional Commits, and file moves are not mixed with behavior changes.
[convention] - Identifiers, comments, test names, log messages, commits, the branch and the pull request are in English. User-facing text is in the catalogs, not hard-coded, and a domain word from another language has one English name in
CONTEXT.md(rule).[test]scripts/code-language.test.mjs·[convention]
Backend feature shape
- The feature lives in
packages/api/src/features/<feature>/with role names (contract,procedures,service,errors,jobs,http) as described in ADR-0011.[test]boundary test - The contract file starts with the
LEAF MODULEheader and imports only leaves.[test]scripts/leaf-modules.test.mjs - Nothing new imports another feature's internals, a
*.proceduresfile or a*.jobsfile, andplatform/imports no feature.[lint].oxlintrc.json·[test]scripts/feature-boundaries.test.mjs - No import cycle was introduced.
[test]scripts/import-cycles.test.mjs - A migrated feature's
*.service.ts,*.rules.ts,*.policy.tsand*.procedures.tsare listed in the D2 and D8 overrides of.oxlintrc.json.[lint]
Tenant isolation
- Procedures use
context.db, which runs asapp_tenant. TheorganizationIdfilter is still present.[test]rls.isolation.test.ts - A new table uses
pgTable.withRLSwithtenantPolicy(...), gets its GRANT inpackages/db/scripts/rls-baseline.mjsand ships with a generated, reviewed migration.drizzle-kit pushis never used.[test]rls-catalog.test.ts - A new cross-tenant path uses
asSystem(db, reason, fn)with a newSystemReason, andnode scripts/check-system-call-sites.mjs --writeran in the same change.[lint] -
withTenantholds no network I/O.[convention] - An operation limited to some Org roles chains
requireOrgRole(...)afterorgProcedure; no service compares role strings.[test]require-org-role.test.ts·[convention] - A tenancy change ran
pnpm --filter @template-cloudflare/db test:rls-matrix, andnode scripts/rls-preview-proof.mjs <previewUrl>passed against the preview before a production deploy.[test][deploy]
Client/server boundary
- A client imports only leaves, contracts or
import type. No barrel was added to a server-capable module (ADR-0002).[lint] - A new cross-package import added a deliberate
exportsentry, and the package page names it. No./routers/*subpath comes back; web and mobile import<feature>/contract.[test]packages/api/src/exports.test.ts, docs package-exports test -
pnpm --filter web buildpasses, includingassert-client-bundle-clean.mjs.[build] -
apps/mobilechanged only if the change is meant for the native app.[convention]
Errors and Effect
- A domain failure is a
Schema.TaggedErrorin<feature>.errors.ts, and the feature mapper handles it. A service imports no@orpc/*.[type][lint] - A new client-visible code is in
APP_ERRORS,ERROR_MESSAGE_KEYSand every locale (en, de, fr).[type][test]locale tests - A procedure runs one program: a handler of the feature's
effectProcedurebuilder, or onerunProcedurecall outside oRPC. Nocontext.organizationId!. NoLayer,ManagedRuntimeor I/O runtime exists at module scope (ADR-0010, ADR-0005).[convention] - Only idempotent reads are retried. A webhook POST or an email send is never retried in-round.
[convention]
Design sources
- Every new chart, sparkline and KPI/stat card is a Bklit UI component; no other chart library was imported or added (Design patterns).
[test]scripts/web-chart-library.test.mjs - New faux product UI on a landing, marketing or docs page (still, feature card, cursor demo, bento grid) is built with Stageshow from a gold example, labelled as an illustration, and its loop passed
film.mjs --gate. No hand-built mock windows.[convention] - A new or reworked web screen was built with the
ui-sdkskill as Design patterns adapts it: controls arepackages/uiwrappers (a missing ui-sdk component was wrapped there first, no hand-rolledrole=widget), every control is named from the i18n catalogs, and the screen has wiring tests and the agent test. A delete, pay or send action hasdata-agent-confirmwith a catalog sentence on the button that confirms, and a password inputdata-agent-secret.[test]scripts/web-ui-sdk.test.mjs·[convention]for the rest - Every new loading skeleton is
MeasuredSkeletonfrom@/platform/skeleton/measured-skeletonwith a sample in<feature>.samples.ts, on a signed-in page. No hand-made pulse boxes, no shadcnSkeleton, no directskulletimport, no other skeleton library (Design patterns).[test]scripts/web-skeletons.test.mjs - A new or reworked view, component or block went through the
ui-polishskill: its anti-slop critique ran on the render, it was checked in a real browser in light and dark, at 390 px, by keyboard and with reduced motion, and the PR shows the screenshots. No paid or Pro catalog item was added (Design patterns).[convention]
Configuration and logging
- A new environment variable is declared in
packages/envand documented in the environments guide. It is read through the schema, notprocess.env.[lint]node/no-process-env - Expected failures (4xx) are not logged as errors. Unexpected failures carry the request ID. Logs contain no credentials, prompts or private payloads.
[convention]
Runtime, bundle and decisions
- A runtime, deadline or heavy-dependency change has a dated report in
docs/measurements/with exact commands and limits.[convention] - A change to an established boundary reads the relevant ADR first. A new boundary decision gets an ADR with a status line, and the ADR index is updated.
[convention] - Dependency changes follow the two-day release quarantine and exact pins.
[test]tooling tests
Read Enforcement for the full list of rules and how each is checked.