Payload application development in Core
Read apps/admin/AGENTS.md, apps/admin/payload.config.ts, and the affected CMS source before editing. OpenSpec and docs/ai/rules/backend.md own durable behavior. Supabase schema, RLS, and Auth follow the Supabase skill and supabase/AGENTS.md; business data remains behind docs/guides/architecture/data-access-boundary.md. Admin UI follows Core's Base UI, exact base-maia, semantic tokens, and shared component ownership.
Use the versions in apps/admin/package.json and the installed public exports. Read Core's public-v4 compatibility reference for request creation, access defaults, media, generated types, and tokens. The official versioned migration guide and installed source resolve API questions. The retired vendor/payload-upstream copy (Payload 3.77.0, kept only in Git history) and the removed generic v3 skill examples describe v3 and are not API authority. Provenance and refresh records the reviewed source and Core adaptations.
Implementation workflow
- Identify the owning collection, access function, hook, serializer, or admin adapter. Preserve its tenant, publication, draft, public-route, and document contracts.
- Use the public API for the installed release. Preserve authenticated
reqthrough nested calls and transactions. User operations enforce access; privileged maintenance calls explicitly justifyoverrideAccess: true. - Preserve collection-specific versions and authorship settings. Core currently disables the shared instruction-management feature. Enabling a new feature or relationship requires its own domain and migration qualification.
- Write a behavioral regression test at the affected seam. Use a disposable representative database for schema changes; compare records, relationships, assets, and rollback boundaries.
- Generate import maps through
bun run cms:importmap. Generate types throughnode scripts/cms/run-payload-command.mjs generate:types, then typecheck with those types present. Do not edit generated files or cast away a compatibility mismatch. - Use the committed CMS migration runner and the Web Studio runbook at
docs/guides/development/web-studio-runbook.md. Verify the actual target, backup, preservation checks, migration order, and rollback boundary before an authorized application. Schema push is disabled in this workflow. - Run focused CMS tests, typecheck, and the relevant compiled/browser flows. Generated artifacts, runtime behavior, provider authentication, and deployment qualification are separate evidence.
For migration from another CMS, use cms-migration. For the delivered public-v4 migration and its qualification limits, read docs/maintenance/modernization/payload.md.