Summary
The mr op (push + create MR) commits every tracked change in the working tree, not just what the caller staged. A single-purpose MR can silently absorb unrelated tracked edits the author never intended to ship.
Reproduction (real, this session)
- Made a one-line change to
.supertool.json and committed only that file.
- The working tree also had an unrelated pre-existing tracked change (
.claude/remember/team/max/2026-06.md) left over from a prior session.
- Ran
mr:body.md|15m|LABELS expecting to push the one-file commit.
- The op ran
git add across all tracked changes and auto-committed the memory file too — the MR shipped 2 files.
- Stripping the extra file then required a force-push, which is (correctly) blocked by the agent's destructive-action guard. Dead end — the MR had to ship with the unintended file.
The auto-add is what turned a clean one-file MR into an unrecoverable two-file one.
Why it's wrong
mr is push+create, not "stage everything." The author has usually already curated their commit(s). Auto-git add -A overrides that curation, and because the next step pushes immediately, there's no chance to catch it before it's remote — at which point fixing it needs history rewriting.
Proposed fix
- Default: commit/push only what's already staged (or the existing commits on the branch). Do not auto-add unstaged/untracked tracked changes.
- If there are extra tracked changes not in the commit, warn and require confirmation:
N tracked changes not staged — include them? [y/N] (default No).
- Keep the current "commit everything" behavior behind an explicit
--all / :all opt-in for those who rely on it.
Files
- The
mr preset / push-and-create-mr.sh wrapper — the git add step before push.
Summary
The
mrop (push + create MR) commits every tracked change in the working tree, not just what the caller staged. A single-purpose MR can silently absorb unrelated tracked edits the author never intended to ship.Reproduction (real, this session)
.supertool.jsonand committed only that file..claude/remember/team/max/2026-06.md) left over from a prior session.mr:body.md|15m|LABELSexpecting to push the one-file commit.git addacross all tracked changes and auto-committed the memory file too — the MR shipped 2 files.The auto-add is what turned a clean one-file MR into an unrecoverable two-file one.
Why it's wrong
mris push+create, not "stage everything." The author has usually already curated their commit(s). Auto-git add -Aoverrides that curation, and because the next step pushes immediately, there's no chance to catch it before it's remote — at which point fixing it needs history rewriting.Proposed fix
N tracked changes not staged — include them? [y/N](default No).--all/:allopt-in for those who rely on it.Files
mrpreset /push-and-create-mr.shwrapper — thegit addstep before push.