What agents should know before contributing
n8n-io/n8n
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
Read by Bluet from 5 files written for agents and 300 merged pull requests on 2026-09-24. Not reviewed by the maintainers.
Rules its files tell agents (15)
- CONTRIBUTING.md
mustNever set it on an instance reachable by anyone you would not give a shell to.
The variable is honoured regardless of NODE_ENV, so it also applies to production builds and the published Docker image. Never set it on an instance reachable by anyone you would not give a shell to. It also disables the crash journal, so a dev container that was killed rather than shut down gracefully does not pay the 10 second crash-loop penalty on its next boot.
- AGENTS.md
mustWhen working on security fixes, never expose the attack vector or vulnerability type in any public-facing arti…
This is a public repository. When working on security fixes, never expose the attack vector or vulnerability type in any public-facing artifact. Attackers monitor open-source repos for signals like branch names, commit messages, PR titles, test descriptions, and Linear URLs.
- AGENTS.md
mustSecurity improvements, whether driven by enterprise requirements or internal standards, must NEVER add frictio…
Security improvements, whether driven by enterprise requirements or internal standards, must NEVER add friction to the common-case building experience. When designing security-related features (defaults, behaviors, flows, error handling), apply these checks:
- AGENTS.md
mustNEVER use any type - use proper types or unknown
- AGENTS.md
mustRepositories extend BaseRepository and resolve the right EntityManager with this.managerFor(ctx); the Transact…
Transactions: transaction orchestration belongs in the persistence layer. Don't reach for .manager / .manager.transaction(...) or createQueryBuilder(...) in business logic. Use the sanctioned primitive in @n8n/db: inject the abstract TransactionRunner and wrap the unit of work in txRunner.run(ctx, async (ctx) => …). The callback receives an OperationContext carrying the active transaction; thread that ctx into the repository methods you call. run requires a context — pass an empty {} at the operation entry point, and reuse the one you were handed everywhere below it (a context that already car
- AGENTS.md
mustUse CSS variables directly - never hardcode spacing as px values
- AGENTS.md
mustArguments of secret-carrying words (config, login, publish, token) — whether a subcommand or baked into a flag…
Secrets on the command line: if a developer opted into anonymous dev metrics (scripts/dev-metrics), pnpm command arguments are recorded. Arguments of secret-carrying words (config, login, publish, token) — whether a subcommand or baked into a flag — are dropped, and the home dir is stripped from paths, but other args are sent as-is — so never put secrets in a command. Pass sensitive values via environment variables, which are never captured.
- docs/db.md
shouldThe schema reference is auto-generated — do not edit by hand.
The schema reference is auto-generated — do not edit by hand. CI fails when a migration changes the schema but the docs weren't regenerated; when that happens, run pnpm db:schema:docs and commit the result.
- CONTRIBUTING.md
shouldDo not paste raw model output.
Write your PR description, issue, and forum posts in your own words. Do not paste raw model output.
- CONTRIBUTING.md
shouldDo not use ts-ignore or ts-expect-error to silence the compiler.
- CONTRIBUTING.md
shouldIf you cannot, do not open the PR yet.
You must understand every line you submit and be able to explain what it does and how it fits the rest of the system, without the AI. If you cannot, do not open the PR yet.
- AGENTS.md
shouldDo not let tests read from or write to the developer's home directory, ~/.n8n, or other user-owned locations.
- AGENTS.md
shouldDo not replace typed entity mocks with as unknown as T.
Reuse immutable hoisted mock<T>(...) fixtures. Do not replace typed entity mocks with as unknown as T.
- AGENTS.md
shouldDon't use the deprecated ApplicationError class anywhere — it's a compatibility shim kept only so community no…
Don't use the deprecated ApplicationError class anywhere — it's a compatibility shim kept only so community nodes keep resolving. Use one of these instead, picking by cause:
- AGENTS.md
shouldThat clear step deletes anything named [seed] and any empty team project, whoever made them, so do not point e…
Both seed profiles delete their own prior output, so a re-run replaces it. That clear step deletes anything named [seed] and any empty team project, whoever made them, so do not point either at a shared instance. The viewer is unauthenticated and serves the whole table: keep it on loopback.
Decisions its pull requests settled (12)
- #38877Test the posted OAuth2 credential values instead of the stored credential
- #39007Attribute a draft-Agent eval scenario to the harness, not the builder (no-changelog)
- #38912Expand default blocked IP ranges for outbound request guard
- #39085Coalesce policy scope reads and demote the cache TTL (no-changelog)
- #39170Enforce persistence boundaries in code (no-changelog)
- #39160Let an AI Agent Tool use its own tools under a pre-v3 parent agent
- #39216Show which AI preferences a turn applied (no-changelog)
- #39250Enforce credential type availability policies (no-changelog)
- #39268Make SSO the primary option on the sign-in page when SSO is enabled
- #39364Let the engine decide how a wait is implemented (no-changelog)
- #39316Let a personal credential be usable in any project its owner works in (no-changelog)
- #39397Show which AI preferences a turn applied (no-changelog)