Thank you for your interest in contributing to Kin. This document covers everything you need to get started.
- Rust stable (2021 edition) -- install via rustup
- C/C++ compiler -- required for native dependencies in the workspace
- macOS:
xcode-select --install - Ubuntu/Debian:
apt install build-essential - Fedora:
dnf install gcc gcc-c++
- macOS:
git clone https://github.com/firelock-ai/kin.git
cd kin
cargo build --lockedCargo will fetch the pinned kin-db / kin-model dependency set automatically. The local workspace contains 18 Rust crates plus the integration test crate.
# Run all tests
cargo test --locked
# Run tests for a specific crate
cargo test --locked -p kin-parser
# Run integration tests only
cargo test --locked -p kin-integration-tests# Check formatting
cargo fmt -- --check
# Run clippy
cargo clippy --all-targets --all-features -- -D warningsAll contributions to Kin require a Developer Certificate of Origin sign-off. By signing off a commit, you certify that you created the contribution or otherwise have the right to submit it under the project's open source license.
Add a Signed-off-by line to every commit message:
Add Python decorator support to kin-parser
Signed-off-by: Your Name <your.email@example.com>
You can do this automatically with git commit -s.
Why DCO? Kin uses DCO as a lightweight contribution policy to maintain a clear provenance trail for all contributions and to document that they are submitted under the project's licensing terms. DCO is not required by Apache-2.0, but it helps keep contribution history clear for maintainers and future stewards.
- Fork the repository and create a branch from
main. - Name branches descriptively:
fix/parser-error-recovery,feat/python-decorator-support,docs/mcp-setup. - Keep changes focused. One logical change per PR.
- Ensure all commits are signed off (
git commit -s). PRs without DCO sign-off will not be merged. - Ensure
cargo testpasses locally before opening a PR. - Ensure
cargo clippyproduces no warnings. - Ensure
cargo fmthas been applied. - Write a clear PR description explaining what changed and why.
- Link related issues with
Closes #123orFixes #123. - A maintainer will review your PR. Expect feedback -- this is a complex codebase and we want to get the abstractions right.
Write clear, imperative-mood commit messages:
Add Python decorator support to kin-parser
The parser now extracts decorators as metadata on function/class entities
rather than treating them as standalone trivia nodes.
Closes #42
- Follow standard Rust conventions. Run
cargo fmtbefore committing. - Use
clippyas your lint guide -- treat warnings as errors. - Prefer explicit types over complex inference chains in public APIs.
- Error handling: use
thiserrorfor library errors,anyhowin CLI/integration code. - Add
#[cfg(test)]unit tests in the same file as the code they test. - Integration tests go in the
tests/integrationcrate.
Each crate has a specific responsibility. Before adding code, make sure it belongs in the crate you're modifying:
- kin-model: Shared canonical types, now shipped from the
kin-dbrepo. - kin-db: Embedded graph engine, snapshot persistence, and query acceleration.
- kin-blobs: All blob store I/O. Other crates reference content by hash.
- kin-parser: Tree-sitter parsing. Language-specific logic goes in language adapters within this crate.
- kin-cli: CLI routing and display. Business logic belongs in the underlying crates.
Use the bug report template. Include:
- Kin version (
kin --version) - OS and architecture
- Steps to reproduce
- Expected vs actual behavior
- Relevant logs (run with
RUST_LOG=debugfor verbose output)
Use the feature request template. Describe the problem you're trying to solve, not just the solution you want.
Look for issues labeled good first issue. These are scoped to a single crate and include enough context to get started without deep knowledge of the full system.
Open a discussion or ask in the issue tracker. We're happy to help you find the right place to contribute.