Skip to content

Commit b614022

Browse files
committed
docs: add initial design document and CLAUDE.md
- DESIGN.md: Complete design specification for rnr task runner - CLAUDE.md: Development guidelines and project structure
0 parents  commit b614022

2 files changed

Lines changed: 624 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code when working with this repository.
4+
5+
## Critical Rules
6+
7+
1. **NEVER commit directly to main** - Always create a feature branch and submit a pull request
8+
2. **Conventional commits** - Format: `type(scope): description`
9+
3. **GitHub Issues for TODOs** - Use `gh` CLI to manage issues, no local TODO files
10+
4. **Pull Request titles** - Use conventional commit format
11+
5. **Branch naming** - Format: `type/scope/short-description` (e.g., `feat/parser/yaml-support`)
12+
6. **No co-authors** - Do not add co-author information on commits or pull requests
13+
7. **No "generated by" statements** - Do not add generated-by statements on pull requests
14+
15+
## Project Overview
16+
17+
**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.
18+
19+
## Tech Stack
20+
21+
- **Language**: Rust
22+
- **Target Platforms**: Windows, macOS, Linux
23+
- **Task File Format**: YAML (`rnr.yaml`)
24+
25+
## Build Commands
26+
27+
```bash
28+
# Build
29+
cargo build
30+
31+
# Build release
32+
cargo build --release
33+
34+
# Run tests
35+
cargo test
36+
37+
# Run clippy
38+
cargo clippy
39+
40+
# Format code
41+
cargo fmt
42+
43+
# Run rnr locally
44+
cargo run -- <args>
45+
```
46+
47+
## Project Structure
48+
49+
```
50+
rnr.cli/
51+
├── src/
52+
│ ├── main.rs # Entry point
53+
│ ├── cli.rs # CLI argument parsing (clap)
54+
│ ├── config.rs # rnr.yaml parsing (serde)
55+
│ ├── runner.rs # Task execution
56+
│ ├── commands/
57+
│ │ ├── mod.rs
58+
│ │ ├── init.rs # rnr init command
59+
│ │ ├── upgrade.rs # rnr upgrade command
60+
│ │ └── list.rs # rnr --list command
61+
│ └── ...
62+
├── Cargo.toml
63+
├── DESIGN.md # Detailed design document
64+
├── CLAUDE.md # This file
65+
└── README.md
66+
```
67+
68+
## Architecture
69+
70+
See `DESIGN.md` for complete design documentation including:
71+
- Task file schema
72+
- Built-in commands
73+
- MVP features
74+
- Future features
75+
76+
## Conventions
77+
78+
### Task File Schema
79+
80+
Tasks are defined in `rnr.yaml`:
81+
82+
```yaml
83+
# Shorthand
84+
build: cargo build --release
85+
86+
# Full form
87+
test:
88+
description: Run all tests
89+
dir: src/
90+
env:
91+
RUST_LOG: debug
92+
cmd: cargo test
93+
```
94+
95+
### Error Handling
96+
97+
- Use `anyhow` for application errors
98+
- Use `thiserror` for library errors
99+
- Provide clear, actionable error messages
100+
101+
### Code Style
102+
103+
- Follow Rust idioms
104+
- Use `clippy` for linting
105+
- Use `rustfmt` for formatting
106+
- Prefer explicit error handling over `.unwrap()`

0 commit comments

Comments
 (0)