# AGENTS.md

## Commands

```sh
# Build
cargo build

# Test
cargo test
cargo test --test compile

# Miri (UB detection for unsafe code in read-only crate)
cargo +nightly miri test --test miri

# Coverage (allow one known uncovered artifact)
cargo llvm-cov --workspace --all-features --summary-only --fail-uncovered-lines 1 --fail-uncovered-regions 1

# Lint
cargo clippy --all-targets --all-features

# Format
cargo fmt --all

# Check
cargo check
```

## Conventions

- Run `cargo fmt` and `cargo clippy` before committing.
- Add macro compile tests under `tests/macro/` for proc macro changes.
- Publish order matters: `read-only-derive` must be published before
  `read-only`, because the public crate depends on the derive crate as a
  versioned proc-macro dependency.
- Keep `CHANGELOG.md` in the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
  format, using the standard section headings such as `Added` and `Changed`.
  Include behavior- or API-relevant changes there; do not include
  documentation-only or test-only updates.
- Prefer upstream documentation for re-exported public items when that behavior
  is intentionally delegated upstream.
- Keep the public API minimal and well-documented.
