Git Workflow
Core Principle
Each commit should represent one logical change. If you cannot describe the commit in one sentence, it is too large.
Commit Message Format
<type>: <description>
<optional body explaining why, not what>
Types: feat, fix, docs, refactor, test, chore.
Before Committing
- Run
cargo test. All tests must pass. - Run
cargo clippy. No warnings. - Run
cargo fmt --check. Code is formatted. - Review the diff:
git diff --cached. Every changed line should relate to the commit message.
Atomic Commits
- Separate refactoring from feature work. Refactor first, commit, then add the feature.
- Separate test additions from implementation. Add the test (it fails), commit. Implement (it passes), commit.
- Never mix documentation changes with code changes in the same commit.
Aixlarity-Specific Rules
- The
--gitflag inaixlarity execauto-commits after the session. Use it only when the task is self-contained. - For multi-step tasks, prefer manual commits between steps.