The official
cargosubcommand to bootstrap AI-ready Rust projects withAGENTS-RUST.md.
One command. Zero configuration. Production-grade AI rules delivered instantly.
agentforge-rs provides a lightweight CLI tool (cargo agentforge) that places a battle-tested AGENTS-RUST.md baseline into your project root. This file acts as a constitution for AI coding agents, enforcing:
- Strict safety & idiomatic Rust patterns
- Mandatory
clippy,fmt,test, anddocvalidation - Predictable, tiered refactoring workflows
- A formal
[OVERRIDE §X]system for project-specific exceptions
Stop manually copying rules. Stop guessing how your AI should behave. Just run cargo agentforge and start building.
cargo install --git https://github.com/suradet-ps/agentforge-rs cargo-agentforgecd your-rust-project
cargo agentforge✅ AGENTS-RUST.md is now in your project root. Your AI agent will automatically read and follow it.
| Step | Action |
|---|---|
cargo agentforge |
Checks if AGENTS-RUST.md already exists |
| Missing | Embeds the latest baseline template & writes it to root |
| Exists | Skips installation & prints a reminder |
| Update | Re-run cargo install --git ... --force to pull latest rules |
Built with pure Rust. Zero dependencies. Compiled once, works everywhere.
The installed file contains 14 enforceable sections covering:
§0–2Agent behavior, interaction protocols & golden rules§3–4Mandatory checks,Cargo.toml& workspace standards§5–7Ownership, error handling, async/tokio patterns§8–9Testing hygiene & documentation standards§10–11Security checklist & CI/release workflows§12–13Refactoring workflow & anti-pattern table§14Project Overrides system for safe rule exceptions
View the full AGENTS-RUST.md source
Real projects need flexibility. Add exceptions directly in the generated file:
## 14. Project Overrides
[OVERRIDE §5.2] Use `anyhow` instead of `thiserror` for faster iteration
[OVERRIDE §4.1] edition = "2021" (legacy dependency requirement)AI agents read overrides at runtime and adjust behavior without breaking baseline compliance.
# Update the CLI to the latest version
cargo install --git https://github.com/suradet-ps/agentforge-rs cargo-agentforge --force
# Update the rules in an existing project
rm AGENTS-RUST.md && cargo agentforgeThis project is a living standard. We welcome:
- Bug reports & AI edge-case discoveries
- Rule refinements, anti-pattern additions, or workflow improvements
- Translations or domain-specific templates (Tauri, Bevy, Embedded, WASM)
Open an issue or PR. Please reference the § section you're modifying.
Distributed under the MIT License. See LICENSE for details.