# Contributing
Thanks for considering a contribution to `agent-ask` (Rust).
## Ground rules
- This repo is a **port**. The protocol's source of truth is [`@p-vbordei/agent-ask`](https://github.com/p-vbordei/agent-ask) (TS). Protocol-level changes go there first, then propagate here.
- Byte-determinism with the TS reference is non-negotiable. Any change that affects JCS bytes, the Ed25519 preimage, or the CIDv1 string MUST keep the C1–C3 conformance vectors passing.
## Dev setup
```bash
git clone https://github.com/p-vbordei/agent-ask-rs
cd agent-ask-rs
cargo build
```
## Run the test suite
```bash
cargo test # all 59 tests across binaries
cargo test --test conformance # just the SPEC vectors
cargo run --example quickstart # end-to-end in-process demo
```
## Lint + format
```bash
cargo fmt --all
cargo clippy --all-targets -- -D warnings
```
## Style
- Stay close to the TS module layout (one Rust module per TS file). The mapping is in [`docs/architecture.md`](docs/architecture.md).
- Public API lives in `src/lib.rs` — keep it in sync with the TS reference's `index.ts`.
- New behaviour requires a test. New protocol behaviour requires a vector that the TS reference also passes.
## Commit / PR flow
1. Branch from `main`.
2. Keep commits surgical and one logical change per PR.
3. Open a PR; CI must be green.
## Reporting issues
Issues at <https://github.com/p-vbordei/agent-ask-rs/issues>. Protocol questions go on the [TS reference issue tracker](https://github.com/p-vbordei/agent-ask/issues).