[claude] Fix empty commits: require git add before commit in Kimi workflow (#1268) #1288
Reference in New Issue
Block a user
Delete Branch "claude/issue-1268"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1268
Problem
Kimi was creating empty commits (0 files changed) because the harness prompt and workspace guide did not explicitly require
git addbeforegit commit. The auto-merge step also had no guard against empty PRs, allowing them to slip through.Changes
.kimi/AGENTS.md(in-repo)git add .orgit add <files>before anygit commitgit diff --cached --statis non-empty before committingkimi-loop.sh(harness, applied to~/.hermes/bin/andhermes-config/)build_prompt()step 3 to showgit add .+git diff --cached --statcheck before the commit command/filesAPI before merging; if 0 files changed, closes the empty PR, posts an explanatory comment on the issue, and adds issue to skip list for 2h so it retries cleanlyDefense in depth
Three layers now prevent empty PRs:
.kimi/AGENTS.md) documents the requirement