This guide is for developers who want to contribute to Yuki.
- Nix with flakes enabled
- Git
- GitHub account (for pushing changes)
# Clone the repository
git clone https://github.com/Spirizeon/yuki-code
cd yuki-code
# Enter the dev shell with Rust toolchain
nix developThis provides:
- Rust toolchain (rustc, cargo, rustfmt, clippy, rust-analyzer)
- Nil (Nix LSP)
- Nixfmt for formatting Nix files
If you cannot use flakes:
nix-shell shell.nixcd rust
cargo build --releaseThe binary will be at rust/target/release/yuki.
# Build default profile
nix build .#default
# Build rust profile
nix build .#rust
# Build review profile
nix build .#reviewBuilt profiles appear in ./result/bin/yuki.
cd rust
# Run all tests
cargo test --release
# Run only library tests
cargo test --release --lib
# Run only integration tests
cargo test --release --test '*'
# Run clippy lints
cargo clippy --release --workspace --all-targets -- -D warnings# Build all profiles (validation)
nix build .#default
nix build .#rust
nix build .#review
# Test dev shell
nix develop --command echo "works"
# Test shell.nix fallback
nix-shell shell.nix --command echo "works"
# Check Nix formatting
nix fmtgit checkout -b feature/my-new-feature- Rust code lives in
rust/crates/ - Nix modules live in
modules/ - Profiles live in
profiles/ - Documentation lives in
docs/md/
Build and run tests before committing:
# Build
cargo build --release
nix build .#default
# Run tests
cargo test --releaseIf your change affects users, update the relevant docs:
README.md- Main user-facing documentationdocs/md/SKILL.md- Module system referencedocs/md/USAGE.md- CLI referencedocs/md/CHANGELOG.md- Release notes
# Stage your changes
git add -A
# Write a descriptive commit message
git commit -m "feat: add new feature
- Added X to support Y
- Updated documentation
- Added tests"
# Or use conventional commits
git commit -m "feat: add new feature"
git commit -m "fix: resolve bug in X"
git commit -m "docs: update readme"
git commit -m "chore: cleanup"git push -u origin feature/my-new-feature
# Then create PR via GitHub UI- Run
cargo fmtbefore committing - Run
cargo clippyto catch issues - Follow existing code patterns in the codebase
- Use
nixfmtornixfmt-rfc-stylefor formatting - Keep modules focused and composable
- Create
profiles/my-profile.nix - Define module options
- Add to
flake.nixoutputs:
packages.x86_64-linux.my-profile = mkHarness [ ./profiles/my-profile.nix ];- Edit
modules/default.nix - Define the option with type and defaults
- Use in
lib/mkHarness.nix
- Edit
rust/crates/rusty-claude-cli/src/main.rs - Add command parsing in the CLI handler
- Test with
./rust/target/release/yuki --help
The harness script looks for the binary in these locations:
./rust/target/release/yuki(local development)/run/current-system/sw/bin/yuki(NixOS system path)- Any
yukiin PATH
If you built with cargo build --release, the binary should be found.
Check the Nix flake is valid:
nix flake check
nix flake showMake sure you have the right Rust version:
rustc --version # Should show stable
cargo --versionGitHub Actions runs on every push:
- Rust CI:
cargo fmt,cargo test,cargo clippy - Nix CI: Build profiles, test dev shell, test yuki binary
All tests must pass before merging to main.
- Update
CHANGELOG.mdwith new version - Create git tag:
git tag -a v0.x.0 -m "Release v0.x.0" - Push with tags:
git push --follow-tags
- Create GitHub release with
gh release create v0.x.0
- Open an issue: https://github.com/Spirizeon/yuki-code/issues
- Check existing docs:
docs/md/ - Look at CLAUDE.md for project context