Skip to content

Commit 37bb9fb

Browse files
authored
docs(claude): add gh CLI and commit linting standards (#28)
- Add GitHub Issues quick reference commands - Add GitHub Issue Dependencies API commands - Add conventional commit types table - Add cross-platform and validation requirements - Add CI/CD workflow expectations - Add labels reference
1 parent b614022 commit 37bb9fb

1 file changed

Lines changed: 131 additions & 21 deletions

File tree

CLAUDE.md

Lines changed: 131 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,53 @@ This file provides guidance to Claude Code when working with this repository.
44

55
## Critical Rules
66

7-
1. **NEVER commit directly to main** - Always create a feature branch and submit a pull request
7+
**These rules override all other instructions:**
8+
9+
1. **NEVER commit directly to main** - Always create a feature branch and submit a pull request. No exceptions.
810
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+
3. **GitHub Issues for TODOs** - Use `gh` CLI to manage issues, no local TODO files. Use conventional commit format for issue titles
12+
4. **Pull Request titles** - Use conventional commit format (same as commits)
1113
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+
6. **Working an issue** - When working an issue, always create a new branch from an updated main branch
15+
7. **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.
16+
8. **Run validation before commits** - Run `cargo fmt`, `cargo clippy`, and `cargo test` before committing and pushing
17+
9. **Cross-platform** - All features must work on Windows, macOS, and Linux
18+
10. **No co-authors** - Do not add any co-author information on commits or pull requests
19+
11. **No "generated by" statements** - Do not add generated-by statements on pull requests
1420

15-
## Project Overview
21+
---
1622

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.
23+
## Conventional Commit Types
1824

19-
## Tech Stack
25+
| Type | Description |
26+
|------|-------------|
27+
| `feat` | New feature |
28+
| `fix` | Bug fix |
29+
| `docs` | Documentation only |
30+
| `refactor` | Code change (no bug fix or feature) |
31+
| `test` | Adding or updating tests |
32+
| `chore` | Maintenance tasks |
33+
| `perf` | Performance improvement |
34+
| `ci` | CI/CD changes |
35+
| `build` | Build system or dependencies |
2036

21-
- **Language**: Rust
22-
- **Target Platforms**: Windows, macOS, Linux
23-
- **Task File Format**: YAML (`rnr.yaml`)
37+
---
2438

25-
## Build Commands
39+
## Quick Reference
40+
41+
### Build Commands
2642

2743
```bash
2844
# Build
2945
cargo build
3046

31-
# Build release
47+
# Build release (optimized for size)
3248
cargo build --release
3349

3450
# Run tests
3551
cargo test
3652

37-
# Run clippy
53+
# Run clippy (linting)
3854
cargo clippy
3955

4056
# Format code
@@ -44,6 +60,50 @@ cargo fmt
4460
cargo run -- <args>
4561
```
4662

63+
### GitHub Issues
64+
65+
```bash
66+
gh issue list # List open issues
67+
gh issue view <number> # View details
68+
gh issue create --title "feat(scope): description" --label mvp --body "..."
69+
gh issue close <number>
70+
```
71+
72+
### GitHub Issue Dependencies (Blocked By / Blocking)
73+
74+
```bash
75+
# List what blocks an issue
76+
gh api repos/CodingWithCalvin/rnr.cli/issues/<number>/dependencies/blocked_by --jq '.[] | "#\(.number) \(.title)"'
77+
78+
# List what an issue blocks
79+
gh api repos/CodingWithCalvin/rnr.cli/issues/<number>/dependencies/blocking --jq '.[] | "#\(.number) \(.title)"'
80+
81+
# Add a blocking relationship (issue <number> is blocked by <blocker_id>)
82+
# First get the blocker's numeric ID (not issue number):
83+
gh api repos/CodingWithCalvin/rnr.cli/issues/<blocker_number> --jq '.id'
84+
# Then add the dependency:
85+
gh api repos/CodingWithCalvin/rnr.cli/issues/<number>/dependencies/blocked_by -X POST -F issue_id=<blocker_id>
86+
87+
# Remove a blocking relationship
88+
gh api repos/CodingWithCalvin/rnr.cli/issues/<number>/dependencies/blocked_by/<blocker_id> -X DELETE
89+
```
90+
91+
**Note:** 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'`
92+
93+
---
94+
95+
## Project Overview
96+
97+
**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.
98+
99+
| Attribute | Value |
100+
|-----------|-------|
101+
| Language | Rust |
102+
| Target Platforms | Windows, macOS, Linux |
103+
| Task File Format | YAML (`rnr.yaml`) |
104+
105+
---
106+
47107
## Project Structure
48108

49109
```
@@ -65,6 +125,8 @@ rnr.cli/
65125
└── README.md
66126
```
67127

128+
---
129+
68130
## Architecture
69131

70132
See `DESIGN.md` for complete design documentation including:
@@ -73,9 +135,9 @@ See `DESIGN.md` for complete design documentation including:
73135
- MVP features
74136
- Future features
75137

76-
## Conventions
138+
---
77139

78-
### Task File Schema
140+
## Task File Schema
79141

80142
Tasks are defined in `rnr.yaml`:
81143

@@ -90,17 +152,65 @@ test:
90152
env:
91153
RUST_LOG: debug
92154
cmd: cargo test
155+
156+
# Sequential steps
157+
ci:
158+
steps:
159+
- task: lint
160+
- task: test
161+
- task: build
162+
163+
# Parallel execution
164+
build-all:
165+
steps:
166+
- parallel:
167+
- task: build-api
168+
- task: build-web
93169
```
94170
95-
### Error Handling
171+
---
96172
97-
- Use `anyhow` for application errors
98-
- Use `thiserror` for library errors
99-
- Provide clear, actionable error messages
173+
## Code Style
100174
101-
### Code Style
175+
### Rust Conventions
102176
103177
- Follow Rust idioms
104178
- Use `clippy` for linting
105179
- Use `rustfmt` for formatting
106180
- Prefer explicit error handling over `.unwrap()`
181+
182+
### Error Handling
183+
184+
- Use `anyhow` for application errors
185+
- Use `thiserror` for library errors
186+
- Provide clear, actionable error messages
187+
188+
### Cross-Platform
189+
190+
- Use `std::path::PathBuf` for paths, not string concatenation
191+
- Test on Windows, macOS, and Linux
192+
- Handle platform-specific shell execution (`sh -c` vs `cmd /c`)
193+
194+
---
195+
196+
## CI/CD
197+
198+
### Expected Workflows
199+
200+
| Workflow | Trigger | Purpose |
201+
|----------|---------|---------|
202+
| `build.yml` | PR, push to main | Lint, build, test on Windows/macOS/Linux |
203+
| `release.yml` | Manual/tag | Build release binaries for all platforms |
204+
| `commit-lint.yml` | PR | Validate PR titles follow conventional commits |
205+
206+
---
207+
208+
## Labels
209+
210+
| Label | Description | Color |
211+
|-------|-------------|-------|
212+
| `mvp` | MVP feature | Green |
213+
| `future` | Future feature | Purple |
214+
| `core` | Core functionality | Blue |
215+
| `cli` | CLI commands | Yellow |
216+
| `build` | Build and distribution | Orange |

0 commit comments

Comments
 (0)