RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/AGENTS.md/n8n-io/n8n

AGENTS.md

packages/cli/AGENTS.md
AGENTS.md

Quality

55/100

Scores the file, not the repository.

Length

412 words

3 headings · 0 code blocks

Repository

199k

— · pushed 0 days ago

Last changed

3 days ago

First indexed 3 days ago.
n8n-io/n8n/packages/cli/AGENTS.mdRawGitHub
1# AGENTS.md
2 
3Guidance specific to the `cli` package. See the root [AGENTS.md](../../AGENTS.md)
4for repo-wide conventions.
5 
6## TypeORM boundary
7 
8TypeORM belongs in the **persistence layer**, not in business logic.
9 
10**Allowed to import `@n8n/typeorm`** — entity and repository files, including the
11ones co-located inside `src/modules/**`:
12 
13- `src/databases/**`
14- a module's `database/entities/**` and `database/repositories/**`
15- files named `*.entity.ts` or `*.repository.ts` (some modules keep these at the
16 module root)
17 
18These are exempted in `eslint.config.mjs` **by location**, so a genuine `@Entity`
19or repository class is never flagged — including the few entity files that lack
20the `.entity.ts` suffix (they live in a `database/entities/` folder).
21 
22**Not allowed** — business logic (services, controllers, public-api handlers,
23commands, factories) must not import `@n8n/typeorm` or `@n8n/typeorm/...`
24subpaths. The `misplaced-n8n-typeorm-import` lint rule enforces this; a new
25import — or an inline `eslint-disable` of the rule — fails CI. The same rule also
26catches the **relabel dodge**: importing a TypeORM operator/driver type (`In`,
27`Not`, `FindOptionsWhere`, `EntityManager`, …) from `@n8n/db`, which
28re-exports them from `@n8n/typeorm` — that silences the direct-import check
29without decoupling anything. Existing leaks of both kinds are tracked in two
30`files`-scoped allowlists in `eslint.config.mjs` (direct `@n8n/typeorm` imports,
31and `@n8n/db` relabels) that only ever shrink: never add to them, and never
32suppress the rule inline.
33 
34Distinct from that shrink-only ratchet, two files are **permanently** exempted in
35`eslint.config.mjs` for legitimate TypeORM use outside the persistence tree —
36these are sanctioned, not migration targets, so don't try to relocate them or
37suppress the rule:
38 
39- `src/commands/db/revert.ts` — `MigrationExecutor` (CLI migration tooling)
40- `src/security-audit/security-audit.repository.ts` — `PackagesRepository`
41 
42Need an operator query (`In`, `IsNull`, `FindOptionsWhere`, …)? Add a
43use-case-named repository method (plain parameters, domain-shaped return) rather
44than importing the operator into business logic. Relabeling the import to
45`@n8n/db` is lint-enforced against, not just convention (see above); likewise
46don't string-match `QueryFailedError` or push `.manager` / `createQueryBuilder`
47into business logic to dodge the rule. See the root "Persistence layer & the
48TypeORM boundary" section for the full rationale.
49 
50## Transactions
51 
52Three patterns coexist while the persistence layer is migrated — new code uses
53only the third:
54 
551. **`manager.transaction(...)`** — raw TypeORM, leaks the ORM into business
56 logic. Anti-pattern; being removed.
572. **`withTransaction(...)`** (`@n8n/db`) — deprecated helper that still hands an
58 `EntityManager` to its callback. Removed as call sites migrate.
593. **`TransactionRunner.run(ctx, fn)`** (`@n8n/db`) — the target. Inject the
60 `TransactionRunner` port and thread the `OperationContext`; the driver handle
61 never reaches business logic. Use this for new work.
62 
63See the root AGENTS.md "Transactions" bullet for the full API and a worked
64example.
65 

Commands it names

  • eslint.config.mjs
  • eslint-disable

Sections

  • AGENTS.md
  • TypeORM boundary
  • Transactions

What it covers

lint-format

Stack — with the evidence

typescript

(1.00)

langchain

(1.00)

turborepo

(1.00)

vitest

(1.00)

eslint

(1.00)

biome

(1.00)

node

(0.70)

supabase

(0.70)

postgres

(0.70)

vite

(0.70)

pytest

(0.70)

ruff

(0.70)

javascript

(0.60)

monorepo

(0.60)

pnpm

(0.60)

terraform

(0.60)

github-actions

(0.60)

python

(0.50)

Format

AGENTS.md

A plain-markdown README for coding agents, deliberately unopinionated: no frontmatter, no globs, no vendor keys. That minimalism is why it became the one file a dozen different agents will read, and why it carries the least per-file targeting power of any format here.

What the corpus says about it

Repository

Owner
n8n-io
Language
—
License
—
Archived
no

All configs in this repo

Also in n8n-io/n8n

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
n8n-io/n8n.agents/skills/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16setuparchagent-behaviour58/1003 days ago
n8n-io/n8n.github/CLAUDE.md · 199kCLAUDE.mdtypescriptlangchain+17styleagent-behaviour48/1003 days ago
n8n-io/n8nAGENTS.md · 199kAGENTS.mdtypescriptlangchain+16setupbuildtestlint-format+896/1003 days ago
n8n-io/n8npackages/@n8n/ai-workflow-builder.ee/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16agent-behaviour53/1003 days ago
n8n-io/n8npackages/@n8n/db/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16database39/1003 days ago
n8n-io/n8npackages/@n8n/engine/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16archdo-not59/1003 days ago
n8n-io/n8npackages/@n8n/instance-ai/CLAUDE.md · 199kCLAUDE.mdtypescriptlangchain+16buildteststyletesting-strategy+189/1003 days ago
n8n-io/n8npackages/cli/src/modules/n8n-packages/CLAUDE.md · 199kCLAUDE.mdtypescriptlangchain+16stylearchdependenciesmonorepo+269/1003 days ago
n8n-io/n8npackages/frontend/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16style40/1003 days ago
n8n-io/n8npackages/frontend/editor-ui/src/app/stores/workflowDocument/CLAUDE.md · 199kCLAUDE.mdtypescriptlangchain+16styleagent-behaviour58/1003 days ago
n8n-io/n8npackages/nodes-base/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16teststylearchtypes+589/1003 days ago
n8n-io/n8npackages/testing/playwright/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+17setupbuildtestlint-format+896/1003 days ago
n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16buildteststylearch+3100/1003 days ago
n8n-io/n8nscripts/instance-seeding/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16setupstyledo-not65/1003 days ago
Diff against .agents/skills/AGENTS.md Diff against .github/CLAUDE.md Diff against AGENTS.md Diff against packages/@n8n/ai-workflow-builder.ee/AGENTS.md Diff against packages/@n8n/db/AGENTS.md Diff against packages/@n8n/engine/AGENTS.md Diff against packages/@n8n/instance-ai/CLAUDE.md Diff against packages/cli/src/modules/n8n-packages/CLAUDE.md Diff against packages/frontend/AGENTS.md Diff against packages/frontend/editor-ui/src/app/stores/workflowDocument/CLAUDE.md Diff against packages/nodes-base/AGENTS.md Diff against packages/testing/playwright/AGENTS.md Diff against packages/@n8n/agents/AGENTS.md Diff against scripts/instance-seeding/AGENTS.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
TryGhost/Ghoste2e/AGENTS.md · 55kAGENTS.mdtypescriptjavascript+12setupteststylearch+2100/1003 days ago
elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78kAGENTS.mdjavanode+4buildtestlint-formatstyle+2100/1003 days ago
mui/material-uiAGENTS.md · 99kAGENTS.mdtypescriptjavascript+13setupbuildtestlint-format+9100/1003 days ago
n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16buildteststylearch+3100/1003 days ago
code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67kAGENTS.mdtypescriptbun+10setupbuildtestlint-format+6100/1002 days ago
duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70AGENTS.mdtypescriptjavascript+5buildteststylearch+3100/1003 days ago
aaif-goose/gooseAGENTS.md · 52kAGENTS.mdrusttypescript+2setupbuildtestlint-format+6100/1003 days ago
elastic/elasticsearchx-pack/plugin/inference/AGENTS.md · 78kAGENTS.mdjavanode+4buildtestlint-formatstyle+3100/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack