Add `AGENTS.md`

d80dcb6a47fe30874c39106283c5f7ed76789211
Alexis Sellier committed ago 1 parent 50445e10
AGENTS.md added +30 -0
1 +
# AGENTS
2 +
3 +
After you're done implementing a code or test change:
4 +
5 +
* ALWAYS run `cargo fmt`
6 +
* ALWAYS run `cargo clippy --all-targets --all-features`
7 +
* ALWAYS run `cargo test --all-targets --all-features`
8 +
* ALWAYS run `RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-deps --document-private-items`
9 +
10 +
Fix any warnings or errors surfaced by these tools.
11 +
12 +
When modifying only documentation files, such as Markdown or plain text files,
13 +
do not run the Rust formatting, linting, test, or documentation-generation
14 +
commands.
15 +
16 +
When modifying code:
17 +
18 +
* NEVER add a new dependency to Cargo.toml without first asking me.
19 +
* ALWAYS document top-level symbols, even the private ones.
20 +
* ALWAYS document struct fields and enum variants, even the private ones.
21 +
* ALWAYS structure human-facing terminal output with the existing UI primitives
22 +
  (`Table`, `VStack`, `HStack`, `Line`, labels, and related renderable types)
23 +
  instead of hand-aligning text with ad hoc spacing.
24 +
* Always do things the proper, idiomatic, robust way. NO HACKS.
25 +
26 +
When modifying tests:
27 +
28 +
* NEVER add assertions whose purpose is to reject a previous implementation's
29 +
  output or behavior. Tests should assert the current required behavior and
30 +
  externally meaningful invariants, not historical states.