# Contributing to veer
Thanks for your interest in improving `veer`. Contributions of all sizes are welcome — bug reports, new importers, better normalizers, docs, and tests.
## Development setup
```bash
git clone https://github.com/zaydmulani09/veer
cd veer
cargo test
```
Before opening a pull request, make sure all three of these are clean — CI enforces them:
```bash
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-features
```
## Project layout
| `src/model.rs` | The normalized `Trace` / `Step` model that everything shares. |
| `src/import.rs` | Importers (OpenAI / Anthropic / native) + format auto-detection. |
| `src/normalize.rs`, `src/normalize/scan.rs` | The normalization pass and hand-written maskers. |
| `src/similarity.rs` | Text (Dice) and structural (JSON) similarity, and step scoring. |
| `src/align.rs` | The edit-distance alignment core and nested field diffs. |
| `src/report.rs` | Human / summary / JSON rendering. |
| `src/config.rs` | Configuration and thresholds. |
| `src/main.rs` | The CLI (behind the `cli` feature). |
## Guidelines
- **Add a test with every behaviour change.** Unit tests live next to the code; end-to-end tests live in `tests/`.
- **Keep the library dependency-light.** New runtime dependencies for the core library (`default-features = false`) need a good reason. CLI-only dependencies belong behind the `cli` feature.
- **No `unsafe`.** The crate sets `#![forbid(unsafe_code)]`.
- **Document public items.** `missing_docs` is a warning; keep it at zero.
## Adding a new importer
Implement a function that turns the provider's JSON into a `model::Trace`, wire it into `import::import_value`, and — if it can be auto-detected — extend `import::detect`. Add a fixture round-trip test. See `import_anthropic` for a template.
## Reporting bugs
Please include the two traces (or minimal reductions of them) and the command you ran. A failing case is the fastest path to a fix.