Beta Coming soon. This feature is still being built, so names and details may change before it ships.

Effective rules

In a monorepo, rules can live at the root, in each package and in any folder below it. The Effective Rules view shows, for any file, the rules that actually apply to it, merged from the root down through its package and folders, with markers where a deeper rule overrides a higher one.

How rules stack in a monorepo

LayerWhereApplies to
Global~/.ingot/rules, ~/.ingot/AGENTS.mdevery project on this machine
Root.ingot/rules, imported rule folders, the root AGENTS.mdthe whole project
Package<package>/.ingot/rules, <package>/AGENTS.mdfiles in that package (a folder with package.json, pyproject.toml, go.mod, Cargo.toml and similar)
Folder<folder>/.ingot/rules, <folder>/AGENTS.mdfiles under that folder

Two rules decide what wins:

  • Same name, deeper folder wins. packages/web/.ingot/rules/style.md replaces the root .ingot/rules/style.md for files in packages/web.
  • Nearest AGENTS.md. The root AGENTS.md always loads; of the nested ones, only the closest one above the file loads.

Inside one folder, .ingot rules win over legacy and imported rules with the same name.

Open the view

  • Right-click a file in the project tree or in the editor › Show Effective Rules.
  • Find Action (⌘⇧A / Ctrl+Shift+A) › Show Effective Rules for File, or press ⌘⌥⇧E (Ctrl+Alt+Shift+E) for the active editor.

Type or pick another path in the File box to compare files; the target button jumps back to the active editor.

Reading the view

The layer chips at the top show the path the merge took, for example Root › Package packages/web/ › Folder packages/web/src/components/. Below, every rule is listed under its layer with a status:

StatusMeaning
appliedloads for this file (always on, glob match or nearest AGENTS.md)
on requestthe agent loads it when its description fits the task
@-mention onlyloads only when you @-mention it
no glob matchits globs don't match this file
overriddena rule with the same name in a deeper folder replaces it
shadoweda rule with the same name in a stronger folder (.ingot over .cursor) replaces it

Override markers connect the two sides: ↓ overridden by packages/web/style on the replaced rule and ↑ overrides style on the one that replaces it. When a deeper rule contradicts a single line of a higher rule (named vs default exports, tabs vs spaces), the higher line is struck through and the replacing line is shown with its file and line number. Contradictions inside the same layer are flagged with ⚠ — those are real conflicts for Rules Doctor to report.

Open Merged instructions to read the final text the agent gets for this file, in load order. The token count at the top is the cost of everything that applies.

From the terminal

ingot effective packages/web/src/components/Button.tsx            # layers, statuses and markers
ingot effective packages/web/src/components/Button.tsx --merged   # plus the merged instructions
ingot effective packages/web/src/components/Button.tsx --json