- DO NOT read code in
distfolders.
When new backend features are discovered, update ai-context/core-features-reference.md with the new feature reference. DO NOT update this file with React features.
- When writing comments, use
//for single-line comments and/* ... */for multi-line comments. Always end comments with a period - Use ES modules (import/export) syntax, not CommonJS (require)
- When generating code, once done, run
git add .to stage all changes - Only import one named import per line
- when generating code, one file MUST only contain one class
- When refactoring, we don't care about backwards compatibility, unless explicitly stated in the prompt
- When type checking, use
yarn check -p <package-name>, e.g.,yarn check -p @webiny/api-core - When building a single package, use
yarn build -p <package-name>, e.g.,yarn build -p @webiny/api-core. - To build all packages, simply run
yarn build. - To build all packages without caching, use
yarn build --no-cache.
- To test a package, use
yarn test packages/<package-name>, e.g.,yarn test packages/api-core
- Always run the full pre-commit checklist and commit after every code change — do not wait to be asked:
If any step fixes something, rerun from the top before committing.
git add . yarn > /dev/null 2>&1 node scripts/generateTsConfigsInPackages.js yarn adio yarn format > /dev/null 2>&1 yarn lint yarn webiny sync-dependencies git add .
- Avoid overly verbose descriptions or unnecessary details.
- Use conventional commit message formats like:
- feat: for new features
- fix: for bug fixes
- docs: for documentation changes
Entry data factories are injectable features, not imported functions. When writing use cases in packages/api-headless-cms that need to produce domain entry objects:
- Do not import from
~/crud/contentEntry/entryDataFactories/ - Do inject the factory token via
createImplementationdependencies and callthis.xyzFactory.create(...) - Factories live in
packages/api-headless-cms/src/features/contentEntry/entryDataFactories/ - Token scope:
"Cms/Entry/<FactoryName>"(e.g."Cms/Entry/CreateEntryDataFactory") - All factories are singletons
Available factories:
CreateEntryDataFactory— new entry from raw inputUpdateEntryDataFactory— update existing entryCreateEntryRevisionFromDataFactory— new revision from existing entryCreatePublishEntryDataFactory— transition to published stateCreateUnpublishEntryDataFactory— transition to unpublished stateCreateRepublishEntryDataFactory— re-publish with refreshed references
This project uses the Webiny framework.
A webiny MCP server is available.
When helping with Webiny-related tasks:
- Call
list_webiny_skillsto see available skills. - Call
get_webiny_skillwith the relevant topic before writing code.