This file contains project-specific instructions for Claude and other AI agents working on the ck codebase. Whenever you actually use ck and it does something unexpected, jot it down in a file could UNEXPECTED.md - supply what you ran, what you expected to happen, what happened instead.
IMPORTANT: Tags follow the format X.Y.Z (NO v prefix) to match current standard:
# Correct format (current standard since 0.3.8+)
git tag 0.4.1
git tag 0.3.9
# Old format (deprecated, do not use)
git tag v0.3.4Always check existing tags first: git tag --sort=-version:refname
ALWAYS run these commands in order before any commit:
- Linting:
cargo clippy- Fix all warnings - Formatting:
cargo fmt- Format all code - Testing:
cargo test- Ensure all tests pass
When bumping versions:
- Update workspace version:
Cargo.toml(workspace level) - Update ALL crate versions: Use find/replace across all
Cargo.tomlfilesfind . -name "Cargo.toml" -exec sed -i '' 's/version = "OLD"/version = "NEW"/g' {} \;
- Update documentation versions: Check
PRD.txtand other docs - Update CHANGELOG.md: Add comprehensive release notes (see format below)
Always update CHANGELOG.md with new releases. Follow this structure:
## [X.Y.Z] - YYYY-MM-DD
### Added
- **Feature name**: Clear user-facing description
- **Technical capability**: What it enables
### Fixed
- **Bug description**: What was broken and how it's fixed
- **Performance issue**: Specific improvements made
### Technical
- **Implementation details**: For maintainers and contributors
- **Dependencies**: New dependencies added- Test coverage: Maintain comprehensive test coverage (currently 65+ tests)
- Cross-platform: Ensure features work on Windows, macOS, and Linux
- Performance: Consider impact on indexing and search performance
- User experience: Maintain grep compatibility and intuitive CLI design
- Error handling: Use
anyhow::Resultconsistently - Async/await: Tokio runtime for async operations
- Parallel processing: Rayon for CPU-intensive tasks
- File I/O: Memory-mapped files for large data access
- Configuration: Workspace-level dependency management
- All clippy warnings must be resolved
- Code must be formatted with
cargo fmt - All tests must pass
- New features require comprehensive test coverage
- Breaking changes require major version bump
- --help reflects any new features
- README incorporates any new user features (e.g. flags etc)