diff --git a/AGENTS.md b/AGENTS.md index 0c541f9..8e2dba3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -3,7 +3,6 @@ ## AGENT RULES - you **MUST NOT** change `AGENTS.md` or `CLAUDE.md` unless explicitly asked - you **MUST** never do `git push`, unless you're explicitly told to -- you **MUST NOT** commit to `main`. If the current branch is `main`, ask the user before making changes whether to create a new branch or to make the changes without committing - you **MUST** always run `cargo fmt --all` after changing file contents. Never pass formatting options on the command line (`--config`, `--edition`, ...) or invoke `rustfmt` directly on files; when present, formatting settings come from `rustfmt.toml` and `Cargo.toml` - you **MUST** use conventional commits when committing (`feat`, `fix`, `perf`, `refactor`, `chore`, `docs`, `test`, `dev`), with `!` and a `BREAKING CHANGE:` footer for API breaks - `dev` is used for tooling, debugging aids and test-flakiness work that doesn't change shipped behaviour @@ -11,7 +10,7 @@ - you **MUST** end commit messages with a `Co-Authored-By:` trailer naming yourself as the agent (product name only, no model or version), e.g. `Co-Authored-By: Claude ` - you **MUST** inform the user about commits or any other changes to git, including the commit message - you **SHOULD** commit your changes after every step, unless the user tells you to not commit or a file with the name `.NOCOMMIT` exists in the project root. This applies to all changes, including docs, `AGENTS.md`, CI and config files, not just Rust code - - changes that affect compilation or tests (Rust code, `Cargo.toml`/`Cargo.lock`, build scripts, test data) may only be committed after `cargo clippy` and `cargo test` pass + - changes that affect compilation or tests (Rust code, `Cargo.toml`/`Cargo.lock`, build scripts, test data) may only be committed after `cargo clippy` and `just test` pass - other changes (Markdown, CI, editor or deployment config) don't need those checks; commit them right away - check the current branch (`git branch --show-current`) before every commit, not just at the start of the session - you **SHOULD** commit formatting-only changes separately from functional changes: if `cargo fmt --all` reformats code you didn't change, commit that first as `chore: cargo fmt`; do not stage unrelated user changes @@ -21,7 +20,7 @@ ```sh cargo build --workspace --all-targets -cargo test --workspace --no-default-features +just test cargo clippy --all -- -D warnings # must stay clean cargo fmt --all ```