agent-rules-tool
[!IMPORTANT] Initial tool scaffolding.
[!WARNING] Clanker generated code.
Lint and migrate AI agent rule files using the agent-rules-spec structured rules format.
- RFC: RFC.md
- Schema: agent-rule.schema.json
- Mappings: compatibility/mapping.md
Install
From crates.io:
That tracks the latest 0.1 pre-release during the RC cycle and will resolve
to 0.1.0 once it is published. After stable 0.1.0, plain
cargo install agent-rules-tool also works.
From this repository:
Or build locally:
Pre-built binaries for tagged releases are on GitHub Releases.
CLI
Lint
By default, lints all *.md files under .agents/rules/:
--severity error(default): exit1if any error-level violation is found--severity warn: exit1on warnings or errors--report: write a YAML report (aggregate for directory mode, single-file for-i)
Migrate
By default, scans known tool-native rule directories and writes canonical
rules to .agents/rules/:
Unknown frontmatter keys error with a link to file an issue on agent-rules-spec. Lossy or ambiguous field mappings emit warnings.
<type>: source format (agents,cursor,windsurf,copilot,cline,claude,jetbrains,amazonq, orauto)--to: target format (default:agents)-o: output directory (dir mode) or file (-imode)--force: overwrite existing output files
Output directories are created automatically. Existing files are not
overwritten unless --force is set.
Third-party specifications
Native rule formats and documentation links for each supported agent. See docs/third-party-specs.md.
Releases
Published to crates.io/crates/agent-rules-tool
via release-plz on merge to main. See
docs/releases.md for the release workflow.
Maintaining vendored spec
See docs/maintenance.md.
Library
use ;
use RuleFormat;
let content = read_to_string?;
let report = lint_string?;
let migrated = migrate_string?;
for warning in &migrated.warnings
Credits
This tool implements the agent-rules-spec structured rules format. The specification was authored by Ram.