This file provides guidance to Claude Code when working with this repository.
These rules override all other instructions:
- NEVER commit directly to main - Always create a feature branch and submit a pull request. No exceptions.
- Conventional commits - Format:
type(scope): description - GitHub Issues for TODOs - Use
ghCLI to manage issues, no local TODO files. Use conventional commit format for issue titles - Pull Request titles - Use conventional commit format (same as commits)
- Branch naming - Format:
type/scope/short-description(e.g.,feat/parser/yaml-support) - Working an issue - When working an issue, always create a new branch from an updated main branch
- Check branch status before pushing - ALWAYS verify the remote tracking branch still exists before pushing. If a PR was merged/deleted, create a new branch from main instead of trying to push to the old one.
- Run validation before commits - Run
cargo fmt,cargo clippy, andcargo testbefore committing and pushing - Cross-platform - All features must work on Windows, macOS, and Linux
- No co-authors - Do not add any co-author information on commits or pull requests
- No "generated by" statements - Do not add generated-by statements on pull requests
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation only |
refactor |
Code change (no bug fix or feature) |
test |
Adding or updating tests |
chore |
Maintenance tasks |
perf |
Performance improvement |
ci |
CI/CD changes |
build |
Build system or dependencies |
# Build
cargo build
# Build release (optimized for size)
cargo build --release
# Run tests
cargo test
# Run clippy (linting)
cargo clippy
# Format code
cargo fmt
# Run rnr locally
cargo run -- <args>gh issue list # List open issues
gh issue view <number> # View details
gh issue create --title "feat(scope): description" --label mvp --body "..."
gh issue close <number># List what blocks an issue
gh api repos/CodingWithCalvin/rnr.cli/issues/<number>/dependencies/blocked_by --jq '.[] | "#\(.number) \(.title)"'
# List what an issue blocks
gh api repos/CodingWithCalvin/rnr.cli/issues/<number>/dependencies/blocking --jq '.[] | "#\(.number) \(.title)"'
# Add a blocking relationship (issue <number> is blocked by <blocker_id>)
# First get the blocker's numeric ID (not issue number):
gh api repos/CodingWithCalvin/rnr.cli/issues/<blocker_number> --jq '.id'
# Then add the dependency:
gh api repos/CodingWithCalvin/rnr.cli/issues/<number>/dependencies/blocked_by -X POST -F issue_id=<blocker_id>
# Remove a blocking relationship
gh api repos/CodingWithCalvin/rnr.cli/issues/<number>/dependencies/blocked_by/<blocker_id> -X DELETENote: The API uses numeric issue IDs (not issue numbers) for POST/DELETE operations. Get the ID with gh api repos/CodingWithCalvin/rnr.cli/issues/<number> --jq '.id'
rnr (pronounced "runner") is a cross-platform task runner designed for zero-setup execution. Clone a repo and tasks just work - no dependency installs, no global tools, no configuration.
| Attribute | Value |
|---|---|
| Language | Rust |
| Target Platforms | Windows, macOS, Linux |
| Task File Format | YAML (rnr.yaml) |
rnr.cli/
├── src/
│ ├── main.rs # Entry point
│ ├── cli.rs # CLI argument parsing (clap)
│ ├── config.rs # rnr.yaml parsing (serde)
│ ├── runner.rs # Task execution
│ ├── commands/
│ │ ├── mod.rs
│ │ ├── init.rs # rnr init command
│ │ ├── upgrade.rs # rnr upgrade command
│ │ └── list.rs # rnr --list command
│ └── ...
├── Cargo.toml
├── DESIGN.md # Detailed design document
├── CLAUDE.md # This file
└── README.md
See DESIGN.md for complete design documentation including:
- Task file schema
- Built-in commands
- MVP features
- Future features
Tasks are defined in rnr.yaml:
# Shorthand
build: cargo build --release
# Full form
test:
description: Run all tests
dir: src/
env:
RUST_LOG: debug
cmd: cargo test
# Sequential steps
ci:
steps:
- task: lint
- task: test
- task: build
# Parallel execution
build-all:
steps:
- parallel:
- task: build-api
- task: build-web- Follow Rust idioms
- Use
clippyfor linting - Use
rustfmtfor formatting - Prefer explicit error handling over
.unwrap()
- Use
anyhowfor application errors - Use
thiserrorfor library errors - Provide clear, actionable error messages
- Use
std::path::PathBuffor paths, not string concatenation - Test on Windows, macOS, and Linux
- Handle platform-specific shell execution (
sh -cvscmd /c)
| Workflow | Trigger | Purpose |
|---|---|---|
build.yml |
PR, push to main | Lint (fmt, clippy), build, test on Windows/macOS/Linux |
integration-test.yml |
PR, push to main | E2E tests for task execution and init command |
commit-lint.yml |
PR | Validate PR titles follow conventional commits |
contributors.yml |
Push to main | Auto-update contributors section in README |
preview-changelog.yml |
PR | Preview release notes for PRs |
release.yml |
Manual dispatch | Full release: validate, build, create GitHub Release, notify |
- Ensure build workflow passes on main
- Go to Actions -> Release -> Run workflow
- Enter version number (e.g.,
1.0.0) - Workflow validates version, builds all platforms, creates GitHub Release
- Publishes binaries and archives for all 5 platforms
- Creates GitHub Discussion announcement
- Posts to Bluesky and LinkedIn
Each release publishes:
- Raw binaries:
rnr-{platform}(for direct download byinitcommand) - Archives:
rnr-{version}-{platform}.{tar.gz|zip}(for manual installation)
| Label | Description | Color |
|---|---|---|
mvp |
MVP feature | Green |
future |
Future feature | Purple |
core |
Core functionality | Blue |
cli |
CLI commands | Yellow |
build |
Build and distribution | Orange |