Iron rule: Do not cram a string of unrelated changes into the same commit, and do not arrange a commit process without quality gate results.
Workflow
- Step 1: Divide change batches ⚠️ REQUIRED
- 1.1 Split commit units by feature, test, documentation, and configuration changes.
- 1.2 Mark the user's existing changes and the current task's changes to avoid mistakenly staging them.
- Step 2: Arrange the commit process
- 2.1 Clarify which commits must enter the repository before other commits.
- 2.2 If only generating a commit message, hand it off to conventional-committer for execution.
- Step 3: Risk check
- 3.1 First confirm that quality-guardian has completed the necessary checks.
- 3.2 Identify shared files that may cause conflicts and risks from long-lived branches.
- Step 4: Change record (conditional)
- 4.1 When a changelog or release note is needed, summarize by commit batch.
- 4.2 Explain which changes are suitable for separate commits and which are suitable for squashing.
Anti-patterns
- Mixing features, tests, formatting, and renames all together just to save effort.
- Not distinguishing the user's existing changes from the current task's changes.
- The commit order is not explained, so stable cherry-pick or rollback is impossible later.
Pre-delivery checklist
- The commit plan has been split by feature boundaries.
- Unrelated changes and potential conflict points have been identified.
- The quality gate status is clear.
- If a commit message is needed, it has been explicitly handed off to conventional-committer.