Export rules to other tools
Keep one set of rules in .ingot/rules and export them to the files other AI coding tools read: AGENTS.md, CLAUDE.md, .cursor/rules, .windsurf/rules and GitHub Copilot's instructions. Teammates who use another tool get the same rules, and CI can fail when the copies drift.
Export from the IDE
Open the Rules & MCP page (right stripe), pick the Rules tab and click Export. You can also run Export Rules to Other Tools… from Find Action.
The dialog shows every file the export would write, before anything changes:
- New, Update and Delete with the lines added and removed.
- Up to date when a file already matches.
- Skipped for a rule file you wrote by hand; Ingot never overwrites it unless you check Overwrite hand-written files.
Uncheck a target to leave its files alone, then click Export.
What gets written
| Target | Files |
|---|---|
AGENTS.md | one managed block with every exported rule |
CLAUDE.md | the same managed block |
.cursor/rules | one <rule>.mdc per rule, with alwaysApply, globs and description |
.windsurf/rules | one <rule>.md per rule, with the matching trigger (always on, glob, model decision or manual) |
| GitHub Copilot | .github/copilot-instructions.md (managed block) plus .github/instructions/<rule>.instructions.md with applyTo for rules with globs |
The managed block sits between <!-- ingot:export:begin --> and <!-- ingot:export:end --> comments. Your own text above and below it stays as it is. Ingot reads AGENTS.md and CLAUDE.md without that block, so exported rules never reach the agent twice.
Generated rule files start with a generated by ingot export comment. When you delete or rename a rule in .ingot/rules, the next export deletes its generated files, and only those.
Keep a rule private
Add export: false to a rule's frontmatter to keep it out of every exported file:
---
description: Our release checklist
export: false
---
Only Ingot agents need this.
To export to some targets only, list them in .ingot/export.json, for example { "targets": ["agents", "claude", "copilot"] }. Run ingot export --help for every target id.
From the terminal
npx @ingotide/cli export # write every target
npx @ingotide/cli export --dry-run # show what would change
npx @ingotide/cli export --check # exit 1 when a file is out of date (CI)
| Option | Meaning |
|---|---|
--targets <list> | comma list of targets (default: .ingot/export.json, else all) |
--check | write nothing; exit 1 when an exported file differs from .ingot/rules |
--dry-run | print the plan without writing |
--force | also overwrite hand-written rule files |
--json | the plan as JSON |
--init-ci | add .github/workflows/ingot-rules.yml |
Check for drift in CI
ingot export --init-ci writes a GitHub Actions workflow that runs on pull requests that touch rules. It runs export --check, so a pull request fails when someone edits .ingot/rules without exporting, or edits an exported file by hand. It also runs rule tests with the free mock model.