|
| 1 | +# Claude Development Guide |
| 2 | + |
| 3 | +This file contains project-specific instructions for Claude and other AI agents working on the ck codebase. |
| 4 | + |
| 5 | +## Release Process |
| 6 | + |
| 7 | +### Version Tagging Convention |
| 8 | + |
| 9 | +**IMPORTANT**: Tags follow the format `X.Y.Z` (NO `v` prefix) to match current standard: |
| 10 | + |
| 11 | +```bash |
| 12 | +# Correct format (current standard since 0.3.8+) |
| 13 | +git tag 0.4.0 |
| 14 | +git tag 0.3.9 |
| 15 | + |
| 16 | +# Old format (deprecated, do not use) |
| 17 | +git tag v0.3.4 |
| 18 | +``` |
| 19 | + |
| 20 | +Always check existing tags first: `git tag --sort=-version:refname` |
| 21 | + |
| 22 | +### Pre-Commit Quality Checks |
| 23 | + |
| 24 | +**ALWAYS** run these commands in order before any commit: |
| 25 | + |
| 26 | +1. **Linting**: `cargo clippy` - Fix all warnings |
| 27 | +2. **Formatting**: `cargo fmt` - Format all code |
| 28 | +3. **Testing**: `cargo test` - Ensure all tests pass |
| 29 | + |
| 30 | +### Version Bump Process |
| 31 | + |
| 32 | +When bumping versions: |
| 33 | + |
| 34 | +1. **Update workspace version**: `Cargo.toml` (workspace level) |
| 35 | +2. **Update ALL crate versions**: Use find/replace across all `Cargo.toml` files |
| 36 | + ```bash |
| 37 | + find . -name "Cargo.toml" -exec sed -i '' 's/version = "OLD"/version = "NEW"/g' {} \; |
| 38 | + ``` |
| 39 | +3. **Update documentation versions**: Check `PRD.txt` and other docs |
| 40 | +4. **Update CHANGELOG.md**: Add comprehensive release notes (see format below) |
| 41 | + |
| 42 | +### CHANGELOG.md Format |
| 43 | + |
| 44 | +Always update CHANGELOG.md with new releases. Follow this structure: |
| 45 | + |
| 46 | +```markdown |
| 47 | +## [X.Y.Z] - YYYY-MM-DD |
| 48 | + |
| 49 | +### Added |
| 50 | +- **Feature name**: Clear user-facing description |
| 51 | +- **Technical capability**: What it enables |
| 52 | + |
| 53 | +### Fixed |
| 54 | +- **Bug description**: What was broken and how it's fixed |
| 55 | +- **Performance issue**: Specific improvements made |
| 56 | + |
| 57 | +### Technical |
| 58 | +- **Implementation details**: For maintainers and contributors |
| 59 | +- **Dependencies**: New dependencies added |
| 60 | +``` |
| 61 | + |
| 62 | +### Development Notes |
| 63 | + |
| 64 | +- **Test coverage**: Maintain comprehensive test coverage (currently 65+ tests) |
| 65 | +- **Cross-platform**: Ensure features work on Windows, macOS, and Linux |
| 66 | +- **Performance**: Consider impact on indexing and search performance |
| 67 | +- **User experience**: Maintain grep compatibility and intuitive CLI design |
| 68 | + |
| 69 | +### Common Patterns in this Codebase |
| 70 | + |
| 71 | +- **Error handling**: Use `anyhow::Result` consistently |
| 72 | +- **Async/await**: Tokio runtime for async operations |
| 73 | +- **Parallel processing**: Rayon for CPU-intensive tasks |
| 74 | +- **File I/O**: Memory-mapped files for large data access |
| 75 | +- **Configuration**: Workspace-level dependency management |
| 76 | + |
| 77 | +### Quality Standards |
| 78 | + |
| 79 | +- All clippy warnings must be resolved |
| 80 | +- Code must be formatted with `cargo fmt` |
| 81 | +- All tests must pass |
| 82 | +- New features require comprehensive test coverage |
| 83 | +- Breaking changes require major version bump |
0 commit comments