在 AGENTS/CLAUDE MD 里面加一句: Every implementation task that changes files MUST end with a git commit before the final response.
- Inspect
git statusbefore editing and treat pre-existing or concurrent changes as user-owned. - Review the final diff and run proportionate verification before committing.
- Stage only files or hunks that belong to the current task. Never bundle unrelated changes unless the user explicitly asks.
- Use a concise descriptive commit message on
main, report the commit hash, and do not push, amend, or rewrite history unless asked. - Read-only tasks and tasks with no file changes do not create empty commits.
我一定要教会我们团队的人怎么用git 现在ai改了一堆代码, 然后一个项目里完全没有提交过任何git状态 他妈的改天改到大动脉,自己都不知道改了啥