Files
payloadcms/AGENTS.md
Elliot DeNolf d109b44856 chore: add AGENTS.md (#13688)
Adds an [`AGENTS.md`](https://agents.md) file.
2025-09-04 16:11:17 +01:00

3.8 KiB

Payload Monorepo Agent Instructions

Project Structure

  • Packages are located in the packages/ directory.
    • The main Payload package is packages/payload. This contains the core functionality.
    • Database adapters are in packages/db-*.
    • The UI package is packages/ui.
    • The Next.js integration is in packages/next.
    • Rich text editor packages are in packages/richtext-*.
    • Storage adapters are in packages/storage-*.
    • Email adapters are in packages/email-*.
    • Plugins which add additional functionality are in packages/plugin-*.
  • Documentation is in the docs/ directory.
  • Monorepo tooling is in the tools/ directory.
  • Test suites and configs are in the test/ directory.
  • LLMS.txt is at URL: https://payloadcms.com/llms.txt
  • LLMS-FULL.txt is at URL: https://payloadcms.com/llms-full.txt

Dev environment tips

  • Any package can be built using a pnpm build:* script defined in the root package.json. These typically follow the format pnpm build:<directory_name>. The options are all of the top-level directories inside the packages/ directory. Ex pnpm build:db-mongodb which builds the packages/db-mongodb package.
  • ALL packages can be built with pnpm build:all.
  • Use pnpm dev to start the monorepo dev server. This loads the default config located at test/_community/config.ts.
  • Specific dev configs for each package can be run with pnpm dev <directory_name>. The options are all of the top-level directories inside the test/ directory. Ex pnpm dev fields which loads the test/fields/config.ts config. The directory name can either encompass a single area of functionality or be the name of a specific package.

Testing instructions

  • There are unit, integration, and e2e tests in the monorepo.
  • Unit tests can be run with pnpm test:unit.
  • Integration tests can be run with pnpm test:int. Individual test suites can be run with pnpm test:int <directory_name>, which will point at test/<directory_name>/int.spec.ts.
  • E2E tests can be run with pnpm test:e2e.
  • All tests can be run with pnpm test.
  • Prefer running pnpm test:int for verifying local code changes.

PR Guidelines

  • This repository follows conventional commits for PR titles
  • PR Title format: ():