Skip to content

Commit 7f9d84a

Browse files
committed
no auto-commit
1 parent e3e4fba commit 7f9d84a

File tree

2 files changed

+63
-12
lines changed

2 files changed

+63
-12
lines changed

.agents/skills/churchcrm/git-workflow.md

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -317,29 +317,54 @@ Before marking PR ready for review, ensure:
317317

318318
## Agent-Specific Behaviors
319319

320-
### Regarding Auto-Commits
320+
### Mandatory Code Review Before Any Commit <!-- learned: 2026-03-03 -->
321321

322-
**DO NOT auto-commit changes** without explicit user request.
322+
**NEVER commit or push without showing the user the diff and receiving explicit approval.**
323+
324+
"Fix this bug" or "make the changes" is NOT permission to commit. Finishing the code and committing the code are two separate steps that always require explicit user confirmation.
325+
326+
**Required sequence for every commit:**
323327

324-
**Pattern:**
325328
```
326-
❌ WRONG - Auto-commits without asking
327-
I'll make these changes and commit them.
328-
[makes changes, runs git commit]
329+
1. Make the changes
330+
2. Run `git diff` — show the full diff to the user
331+
3. Ask: "Please review the changes above. Shall I commit?"
332+
4. Wait for explicit approval
333+
5. Only then: git add → git commit → git push
334+
```
329335

330-
✅ CORRECT - Ask permission first
331-
I've completed the changes and tests pass locally. Ready to commit with this message:
332-
"Fix issue #1234: ..."
336+
**Examples:**
333337

334-
Would you like me to proceed?
335338
```
339+
❌ WRONG — commits immediately after making changes
340+
I've fixed the bug. [runs git commit and git push]
341+
342+
❌ WRONG — asks to commit without showing the diff
343+
I've made the changes. Ready to commit — shall I proceed?
344+
345+
✅ CORRECT — shows diff first, then waits for approval
346+
I've made the following changes:
347+
348+
[git diff output]
349+
350+
Please review the above. Shall I commit with the message: "fix: ..."?
351+
```
352+
353+
**What counts as explicit approval:** "yes", "looks good", "lgtm", "commit it", "go ahead", "ship it"
354+
355+
**What does NOT count as approval:** silence, asking a follow-up question, or continuing the conversation.
336356

337357
### When User Asks to Commit
338358

339-
If user explicitly requests a commit:
359+
Even when the user explicitly says "commit" — still show the diff first if they haven't seen it yet:
340360

341361
```bash
342-
git add .
362+
# Show what will be committed
363+
git diff --staged # if already staged
364+
git diff # if not yet staged
365+
366+
# Then, after user approves:
367+
git add <specific files>
343368
git commit -m "Fix issue #1234: Replace deprecated HTML with CSS"
344369
git push origin fix/issue-1234-description
345370
```

CLAUDE.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,32 @@ These rules apply to **every code change** in this project.
9898

9999
---
100100

101+
## Mandatory Code Review Before Any Commit
102+
103+
**NEVER commit or push without first showing the user the diff and getting explicit approval.**
104+
105+
This applies even when the user asks you to "fix" or "make changes" — finishing the code is not permission to commit.
106+
107+
### Required sequence for every commit:
108+
109+
1. Make the changes
110+
2. Run `git diff` and show the output to the user
111+
3. Explicitly ask: *"Please review the changes above. Shall I commit?"*
112+
4. Wait for explicit approval (e.g. "yes", "looks good", "commit it")
113+
5. Only then run `git add` + `git commit` + `git push`
114+
115+
### What counts as explicit approval
116+
117+
✅ "yes", "looks good", "lgtm", "commit it", "go ahead", "ship it"
118+
119+
❌ Silence, continuing the conversation, asking follow-up questions — these are NOT approval
120+
121+
### No exceptions
122+
123+
Even if you are confident the changes are correct, even if the user said "fix the bug" — always show the diff and wait for approval before committing.
124+
125+
---
126+
101127
## Git & PR Workflow
102128

103129
@.agents/skills/churchcrm/git-workflow.md

0 commit comments

Comments
 (0)