Rule hits & provenance
The Rule Hits panel shows, for every agent turn, which rules, AGENTS.md files and habits were loaded, why each one was loaded, and what it cost in tokens. Click a rule to see who last changed it, when, and which store pack it came from.
Open the panel
- In an agent chat, expand the Read rules step of a reply and click Why these rules? — the panel opens on that chat's latest turn.
- Find Action (⌘⇧A / Ctrl+Shift+A) › Rule Hits, or press ⌘⌥⇧R (Ctrl+Alt+Shift+R).
- Find Action › Why These Rules? (Last Agent Turn).
The panel keeps the last 50 turns. Each turn shows the start of your prompt and the total token cost of its instructions; the newest turn is expanded. When you have several chats, pick one from the list at the top.
Why a rule loaded
| Reason | Meaning |
|---|---|
| always | the rule has alwaysApply: true |
| AGENTS.md | the project's root AGENTS.md, which loads in every turn |
| nearest AGENTS.md | the closest AGENTS.md above a file in context (monorepo packages) |
| parent folder | an AGENTS.md in a folder above the open project (a subfolder of a repository is open); it is named by its path, for example ../../AGENTS.md, and loads in every turn |
| glob | one of the rule's globs matched a file in context; the file is named |
| @-mention | you mentioned the rule by name in your prompt (@react) |
| agent requested | the agent picked the rule from its description |
| habit | a habit matched the turn |
Each row also shows the rule's token estimate, so you can see which rule makes a turn expensive.
Where a rule came from
Click a row to open its provenance card:
- Last change — the git author and date of the last commit that touched the file, and who added it first. Files with uncommitted edits say so.
- Source —
.ingotrules, imported (.cursor), legacy, agent instructions or your global~/.ingotrules. - Pack — when the rule was installed from the Ingot store, the pack and version (for example
acme.react-pack@1.2.0). Ingot reads it from the rule'spack:frontmatter,.ingot/ingot-lock.jsonor the installed extension folder.
Click the file name to open the rule.
From the terminal
ingot why answers the same question without the IDE, for any files and prompt:
ingot why packages/web/src/components/Button.tsx
ingot why src/server.ts --prompt "follow @api please" # mentions and descriptions count too
ingot why src/server.ts --provenance # adds author, date and pack
ingot why src/server.ts --json
Related
- Rules Doctor: conflicts, dead globs and the always-on budget
- Effective rules: the merged rules for one file, root → package → folder
- Rules and Habits