mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 01:30:33 +00:00
* feat: optimize AI rules with unified .rules.md and entry points - Create .rules.md as the central AI coding rules file - Add .copilot-rules.md as GitHub Copilot entry point - Add CLAUDE.md as Claude AI entry point - Incorporate principles from rustfs.com project - Add three critical rules: 1. Use English for all code comments and documentation 2. Clean up temporary scripts after use 3. Only make confident modifications * Update CLAUDE.md --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2.6 KiB
2.6 KiB
Claude AI Rules for RustFS Project
Core Rules Reference
This project follows the comprehensive AI coding rules defined in .rules.md. Please refer to that file for the complete set of development guidelines, coding standards, and best practices.
Claude-Specific Configuration
When using Claude for this project, ensure you:
- Review the unified rules: Always check
.rules.mdfor the latest project guidelines - Follow branch protection: Never attempt to commit directly to main/master branch
- Use English: All code comments, documentation, and variable names must be in English
- Clean code practices: Only make modifications you're confident about
- Test thoroughly: Ensure all changes pass formatting, linting, and testing requirements
- Clean up after yourself: Remove any temporary scripts or test files created during the session
Quick Reference
Critical Rules
- 🚫 NEVER commit directly to main/master branch
- ✅ ALWAYS work on feature branches
- 📝 ALWAYS use English for code and documentation
- 🧹 ALWAYS clean up temporary files after use
- 🎯 ONLY make confident, necessary modifications
Pre-commit Checklist
# Before committing, always run:
cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings
cargo check --all-targets
cargo test
Branch Workflow
git checkout main
git pull origin main
git checkout -b feat/your-feature-name
# Make your changes
git add .
git commit -m "feat: your feature description"
git push origin feat/your-feature-name
gh pr create
Claude-Specific Best Practices
- Task Analysis: Always thoroughly analyze the task before starting implementation
- Minimal Changes: Make only the necessary changes to accomplish the task
- Clear Communication: Provide clear explanations of changes and their rationale
- Error Prevention: Verify code correctness before suggesting changes
- Documentation: Ensure all code changes are properly documented in English
Important Notes
- This file serves as an entry point for Claude AI
- All detailed rules and guidelines are maintained in
.rules.md - Updates to coding standards should be made in
.rules.mdto ensure consistency across all AI tools - When in doubt, always refer to
.rules.mdfor authoritative guidance - Claude should prioritize code quality, safety, and maintainability over speed
See Also
- .rules.md - Complete AI coding rules and guidelines
- CONTRIBUTING.md - Contribution guidelines
- README.md - Project overview and setup instructions