diff --git a/AGENTS.md b/AGENTS.md index 5c0a6db637..8482a3bf08 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,11 +14,12 @@ In the codex-rs folder where the rust code lives: - When writing tests, prefer comparing the equality of entire objects over fields one by one. - When making a change that adds or changes an API, ensure that the documentation in the `docs/` folder is up to date if applicable. -Run `just fmt` (in `codex-rs` directory) automatically after making Rust code changes; do not ask for approval to run it. Before finalizing a change to `codex-rs`, run `just fix -p ` (in `codex-rs` directory) to fix any linter issues in the code. Prefer scoping with `-p` to avoid slow workspace‑wide Clippy builds; only run `just fix` without `-p` if you changed shared crates. Additionally, run the tests: +## Validating changes +Run `just fmt` (in `codex-rs` directory) automatically after making Rust code changes; do not ask for approval to run it. Additionally, run the tests for the specific project(s) that changed. For example, if changes were made in `codex-rs/tui`, run `cargo test -p codex-tui`. -1. Run the test for the specific project that was changed. For example, if changes were made in `codex-rs/tui`, run `cargo test -p codex-tui`. -2. Once those pass, if any changes were made in common, core, or protocol, run the complete test suite with `cargo test --all-features`. - When running interactively, ask the user before running `just fix` to finalize. `just fmt` does not require approval. project-specific or individual tests can be run without asking the user, but do ask the user before running the complete test suite. +Before finalizing a change to `codex-rs`, run `just fix -p ` (in `codex-rs` directory) to fix any linter issues in the code. Prefer scoping with `-p` to avoid slow workspace‑wide Clippy builds; only run `just fix` without `-p` if you changed shared crates. + +Once those pass, if significant changes were made in common, core, or protocol, suggest running the complete test suite with `cargo test --all-features`as a next step ## TUI style conventions