You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- If this is the first commit in a batch, run `npm run build && npm run lint && npm run test` before creating commits. If any step fails, abort immediately and return the failure to the caller. Do not attempt to fix unrelated issues from inside this skill.
38
+
- If this is the first commit in a batch, inspect `package.json` and run only the validation scripts that actually exist among `build`, `lint`, and `test`. If any existing required script fails, abort immediately and return the failure to the caller. Do not attempt to fix unrelated issues from inside this skill.
39
39
- One logical change per commit — do not bundle unrelated changes
40
40
- Keep the subject line under 72 characters
41
41
- No period at the end of the subject line
@@ -44,6 +44,33 @@ Rules:
44
44
45
45
Before creating any commit, review staged changes with `git diff --cached` to ensure only intended changes are included.
46
46
47
+
## Enforcing Atomic Commits
48
+
49
+
Do not treat "atomic commits" as a preference. Treat it as a required workflow.
50
+
51
+
Before creating any commit:
52
+
53
+
1. Inspect the full working tree with `git status --short` and `git diff --stat`.
54
+
2. Identify the logical change units before staging anything.
55
+
3. Create a brief internal commit plan such as:
56
+
-`feat: add parser support for new field`
57
+
-`feat: add reusable chart component`
58
+
-`ui: refresh dashboard layout`
59
+
4. Stage and commit one logical unit at a time. Prefer file-based staging when a file belongs entirely to one change; use partial staging such as `git add -p` when multiple logical changes share a file.
60
+
5. After each staged unit, run `git diff --cached` and verify the staged diff matches exactly one logical change.
61
+
6. If the current working tree cannot be cleanly split into atomic commits without risky manual surgery, stop and tell the caller that the changes need to be reorganized before committing.
62
+
63
+
Never create a single catch-all commit when the diff spans multiple concerns, such as:
64
+
65
+
- parser or data-shape changes mixed with UI changes
66
+
- new reusable components mixed with feature wiring
67
+
- layout/styling changes mixed with behavior changes
68
+
- review feedback fixes mixed with unrelated cleanup
69
+
70
+
If the user asks to create a PR and the branch contains uncommitted work spanning multiple logical changes, the skill must split that work into multiple commits before pushing.
71
+
72
+
If the user asks to address PR feedback, keep the fixes in one commit only when they all serve the same review-driven purpose. If feedback touches separate concerns, split it into multiple commits.
0 commit comments