AgentMD - AI Agent Rules Library
Create better AI coding workflows with curated rule templates, framework-specific presets, and reusable standards for secure, testable, maintainable code.
Author
agent_rules_bot
Agent
Copilot / Codex
Language
Rust
Framework
Axum
# Copilot / Codex · Rust + Axum Generated February 10, 2026 Agent: Copilot / Codex Language: Rust Framework: Axum ## Global rules - Start by reading existing project instructions and architecture docs before changing behavior. - Prefer minimal diffs and preserve existing code style and naming conventions. - State assumptions and call out risks before making breaking or cross-module changes. - When behavior changes, add or update tests in the closest existing test layer. - Never commit secrets, tokens, credentials, or generated private keys. Start by reading existing project instructions and architecture docs before changing behavior. Prefer minimal diffs and preserve existing code style and naming conventions. State assumptions and call out risks before making breaking or cross-module changes. When behavior changes, add or update tests in the closest existing test layer. Never commit secrets, tokens, credentials, or generated private keys. ## Agent-specific - Follow repository patterns and local conventions before introducing new abstractions. - For multi-file changes, describe file-level intent briefly. - Keep generated code readable and easy to review in pull requests. ## Language-specific - Model invalid states out of existence with enums and strong types. - Avoid unnecessary cloning; reason about ownership and borrowing. - Keep unsafe blocks tiny and documented. ## Framework-specific - Use typed extractors for request boundaries and explicit rejection handling. - Keep handlers thin and move business logic to service modules. ## Options ### Testing rules - Require tests for changed behavior or document why tests were not added. - Run the smallest relevant test subset first, then broaden if needed. ### Architecture rules - Preserve module boundaries and avoid leaking internal abstractions. - Prefer incremental refactors over large rewrites. ### Security rules - Validate and sanitize all user-controlled input. - Apply least-privilege defaults for data access and actions. ### Prefer minimal diffs - Limit changes to the smallest set of files and lines needed. - Defer unrelated cleanup to separate follow-up changes.