These instructions apply to the whole volto-plate monorepo unless a deeper AGENTS.md overrides them.
-
Monorepo with two main work areas:
-
backend/: Plone policy packagekitconcept.plate, managed withuv -
frontend/: Volto add-on workspace, managed withpnpm -
Prefer the repo
Makefiletargets over ad-hoc commands. The Makefiles already encode the supported bootstrap, test, lint, and acceptance flows. -
frontend/aurorais a local checkout of the Plone Aurora repository where the codebase for@plone/plateand@plone/helpersare developed. It is not a dependency of the main repo, but it is used for local development and testing of the frontend add-on. Ideally we should not change anything from this checkout, but if we do, we should make sure to keep it in sync with the upstream repository and ask for permission first.
- Python is managed through
uv - Node is expected to be
24 - Package manager is
pnpm corepackis the expected way to enablepnpm
Use the standard Make targets first.
- Full install:
make install
- Backend only:
make backend-install- This installs the backend virtualenv and creates the Plone site
- Frontend only:
make frontend-install
Common local dev flow:
- Terminal 1:
make backend-start - Terminal 2:
make frontend-start
If a site is missing or needs to be recreated:
make backend-create-site
Backend tests must follow the pattern in backend/Makefile.
- For the full backend suite, use:
make -C backend test- or from the repo root:
make backend-test
- Do not run a global
pytestbinary for backend work - Do not rely on ad-hoc
PYTHONPATHhacks for backend tests - If a targeted backend pytest invocation is necessary, use the backend virtualenv pytest, matching the Makefile pattern:
cd backend && .venv/bin/pytest tests/path_or_test.py
Reason:
- The backend test environment is expected to come from
backend/.venv - The repo already standardizes this through
backend/Makefile:test
- Use
make -C frontend test - Or from the repo root:
make frontend-test
The repo acceptance flow is Playwright-based from frontend/.
- Start backend acceptance server only if it is not already started in port 55001:
make ci-acceptance-backend-start
- Start frontend for acceptance only if it is not already started in port 3000:
make acceptance-frontend-dev-start
- Run acceptance tests:
cd frontend && pnpm exec playwright test --reporter=list,html
- When running acceptance tests as an agent, launch Playwright unsandboxed on the first attempt. Do not try the sandboxed path first.
If you only need the standard interactive wrapper:
make acceptance-test
Acceptance tests live under frontend/acceptance/:
fixtures/: Plate values for each native block of the wiki presets (native-blocks.ts), a page factory that creates one small wiki page per test through the REST API (pages.ts), editor helpers (editor.ts) and clipboard payloads for paste tests (clipboard.ts).tests/: behaviour tests, covering thewiki-editorpreset (editor) and thewiki-rendererpreset (public view).
Only cover features reachable through the wiki presets. Prefer createNativeBlocksPage and the fixture sections over building page values by hand.
Prefer Make targets before direct tool calls.
- Whole repo:
make formatmake lintmake check
- Backend only:
make -C backend formatmake -C backend lint
- Frontend only:
make -C frontend formatmake -C frontend lint
Backend formatting/linting is driven by:
ruffzprettypyromacheck-python-versions
Frontend formatting/linting is driven by:
eslintprettierstylelint
- Keep backend changes inside
backend/src/kitconcept/plate/andbackend/tests/unless broader plumbing is required - Keep frontend changes inside
frontend/packages/volto-plate/unless the workspace config or app shell must change - Preserve existing Makefile-driven workflows instead of introducing one-off local command conventions
- Follow existing naming and test placement patterns already present in the touched package
Every file placed under frontend/packages/volto-plate/src/customizations/ (a shadowed Volto/add-on component) MUST start with the mandatory OVERRIDE documentation header. This is enforced in CI by the shadow-headers job in .github/workflows/frontend.yml (script: .github/scripts/check-shadow-headers.mjs), which fails the build if the header or any required label is missing.
Required labels in the leading block comment: OVERRIDE, REASON, FILE, FILE VERSION, DATE. Optional: PULL REQUEST, TICKET, CHANGELOG.
Template:
/**
* OVERRIDE ComponentName.jsx
* REASON: Short explanation of why this component is shadowed.
* FILE: https://github.com/plone/volto/blob/<sha>/src/.../ComponentName.jsx
* FILE VERSION: Volto 18.0.0
* DATE: 2026-08-25
* DEVELOPER: @your-handle
* CHANGELOG:
* - What changed and why (#ticket) @your-handle
*
* Mark the actual changes inline with `START CUSTOMIZATION` / `END CUSTOMIZATION`.
*/Run the check locally with pnpm --filter @kitconcept/volto-plate check:shadow (or, from the repo root, node .github/scripts/check-shadow-headers.mjs frontend/packages).
The script is repo-agnostic and auto-discovers add-ons: point it at a packages root (e.g. frontend/packages) and it checks every <addon>/src/customizations it finds — no need to enumerate packages. It can be copied into any other Volto/Aurora repo unchanged.
Asset files that cannot carry a leading JS block comment (.svg, .png, .jpg, .jpeg, .gif, .webp, .ico) are skipped automatically, so shadowing an icon or image does not require a header.
This repo checks for towncrier fragments in CI.
- Backend changes need a fragment under
backend/news/ - Frontend add-on changes need a fragment under
frontend/packages/volto-plate/news/ - Repo-level (not related to
backendorfrontend) changes may need a fragment under the rootnews/
Use the fragment type that matches the change, such as:
featurebugfixinternaldocumentationbreaking
- Backend CI runs lint, test matrix, and coverage
- Frontend CI runs code analysis, i18n, unit tests, and image build
- Acceptance CI installs both sides, starts the backend and frontend, then runs Playwright
- Prefer commands that mirror CI behavior when validating changes locally
- Start with the narrowest validation that still exercises the changed area
- After meaningful code changes, run the relevant scoped tests using the repo-sanctioned command path
- For backend validation, prefer
make -C backend testorbackend/.venv/bin/pytest, never globalpytest - For frontend validation, prefer
make -C frontend testor the package scripts behind it - For Playwright acceptance validation, request unsandboxed execution immediately instead of retrying after a sandbox failure
- For all changes made, run the full repo
make checkto ensure all formatting and linting is satisfied - If a command fails because dependencies are not installed yet, bootstrap with the corresponding Make target instead of working around the environment manually
- Create a PR only when you are told to
- After creating a PR, make sure that a Towncrier fragment is present for the change, and that it is in the correct location. Create it/them if needed following the Changelog Fragments guidance section.