# Contributing

## Development Setup

Rust build:

```bash
cargo build --lib --bin bifrost
```

Python client build/install:

```bash
maturin develop
```

This repository has a maturin-backed `pyproject.toml` so `uv run python ...` can execute the `bifrost_searchtools` client through the PyO3 native Rust extension.

## Test

Rust:

```bash
cargo test
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
```

Python:

```bash
scripts/test_python.sh
```

That wrapper provisions a uv-managed Python 3.12 environment, makes `maturin` available, installs the editable native extension, and then runs the unittest suite.

## Python Development

For repo-local development without installing the package, `SearchToolsClient(..., library_path=...)` can load a built debug library such as `target/debug/libbrokk_bifrost.so`.

## Release Process

GitHub Releases are published by the workflow in `.github/workflows/release.yml`.

- Pushing a tag that matches `v*` triggers the release workflow automatically.
- The expected tag format is `vX.Y.Z`, for example `v0.1.3`.
- The workflow can also be run manually from the GitHub Actions UI with a `tag` input.

To cut a release from the current commit:

```bash
git tag -a v0.1.3 -m "Release v0.1.3"
git push origin refs/tags/v0.1.3
```

The workflow builds platform archives, generates SHA-256 checksum files, and publishes a GitHub Release with autogenerated release notes.

## Version Policy

The Tree-sitter grammar crate versions are intentionally not forced to share the same numeric version. The policy is documented in `Cargo.toml`.
