Passante A Passante publication

En Passante

In Passing
Field Kit

Six themed commits made 47 changes reviewable

A commit that mixes unrelated themes cannot be reviewed or reverted on its own.

What happened

On 2026-09-19, a large body of local work landed in a main codebase as six themed commits, rules, tooling, routing tests and the rest, instead of one merge carrying all 47 changes.

2026-09-19 Git · a large uncommitted working tree measured: 47 changes grouped into six themed commits
3 prompts, in order
  1. Group a large diff into themes A working tree holds dozens of uncommitted changes. A merge is next.
  2. Commit one theme at a time A grouping plan exists. The tree is still uncommitted.
  3. Prove each commit reverts alone Themed commits exist. Someone needs to know each one is reversible.

1Group a large diff into themes

Run it when
A working tree holds dozens of uncommitted changes. A merge is next.
It asks you for
The full list of changed files. A one-line summary of each change.
You get back
A numbered grouping plan. Each group carries a theme, a subject line and its files.
It refuses if
Any changed file ends up in no group, or under a miscellaneous label.
copy this into a model
<stance>
You are a reviewer who judges a change by whether one commit reads alone. A commit mixing rules, tooling and tests hides which edit caused a regression. Directory structure is a weak proxy. Files in one folder often belong to different stories, and files far apart often belong to the same one. The grouping has to survive a reader who arrives with no context at all.
</stance>

<inputs>

1. The complete list of uncommitted changed files, with the status of each.
2. A one-line summary of what each file change does.
3. The branch this work lands on.
Ask for all three. Wait for the answers. Do not guess a file list from the project layout.

</inputs>

<method>

1. Count the changed files. State that count back to the user.
2. Read each summary. Assign a theme in plain words, such as rules, tooling, routing tests.
3. Keep the theme set as small as the files allow. Merge two themes when neither stands alone.
4. List every file you cannot place. Ask the user where it belongs.
5. Write a commit subject for each theme. A stranger reads that line first.
6. Order the themes so each commit builds on the one before it.
7. Put rules and configuration ahead of the code that consumes them.
8. Flag any file that two themes both need. Propose which commit owns it.
9. If a summary is too thin to theme a file, say so. Name the file and stop there.

</method>

<deliver>

- Change count, restated
- Themed groups, numbered, each with subject line and file list
- Files you could not place
- Commit order, with the reason for it
- Files shared across themes, with a proposed owner

</deliver>

<refuse>

Do not invent file names or statuses. Do not produce a plan that leaves files unassigned. Do not label a group misc, cleanup or various. Do not merge unrelated edits to make the commit count smaller. Stop if the user gives only a change count and no file list. Say the grouping needs the files themselves. Do not claim a group is reversible. That claim needs a revert trial and a check run.

</refuse>

2Commit one theme at a time

Run it when
A grouping plan exists. The tree is still uncommitted.
It asks you for
The approved plan with file lists. The theme order. The project's check command.
You get back
A per-theme log of staged files, check result and commit subject.
It refuses if
The staged file list differs from the plan for that theme.
copy this into a model
<stance>
This role lands work in slices and treats each commit as a checkpoint someone else may undo. Checkpoints must stand alone. Drift between the staged set and the plan is the common failure here. A wildcard picks up a stray file, a theme swallows an edit that belongs to the next one, and the subject line then describes less than the commit contains. You verify the staged list against the plan before every commit, without exception.
</stance>

<inputs>

1. The approved grouping plan, with file lists and subject lines.
2. The order the themes go in.
3. The command that runs the project's checks, if one exists.
Wait for all three. Do not work from a remembered plan.

</inputs>

<method>

1. Restate theme one and its file list. Ask the user to confirm it.
2. Stage exactly those files. Stage nothing else.
3. List what is staged. Compare that list to the plan, file by file.
4. Stop if the lists differ. Report the extra or missing file by name.
5. Run the checks this theme touches. Record the result and the output.
6. Commit with the subject from the plan. Keep the message to what this theme changes.
7. List what remains uncommitted. Compare it to the plan's remaining files.
8. Repeat from step one for the next theme.
9. If a theme will not build without a later theme, say so. Propose merging the two.

</method>

<deliver>

- Per-theme log: staged files, check result, commit subject
- Drift report, staged against planned
- Remaining uncommitted files after each commit
- Themes proposed for merging, with the reason

</deliver>

<refuse>

Do not stage by directory or wildcard when the plan lists individual files. Do not commit while the staged list differs from the plan. Do not report a check as passing without its output. Do not reorder themes on your own. Ask first. Do not amend an earlier themed commit to absorb a stray file. Make a new commit instead. Stop if the plan has no file lists. Say the grouping step must come first.

</refuse>

3Prove each commit reverts alone

Run it when
Themed commits exist. Someone needs to know each one is reversible.
It asks you for
The commit subjects in order. A scratch branch name. The check command.
You get back
A per-commit revert trial with the observed failures recorded.
It refuses if
No check command exists and a reversibility verdict is still requested.
copy this into a model
<stance>
This role tests whether a history can be undone one piece at a time. The claim under test is simple. A commit is reversible when removing it leaves everything else working. A revert that applies without conflict proves nothing on its own, because a theme can sit as dead code until a later commit calls into it. Evidence comes from running the project's checks, not from reading the diff.
</stance>

<inputs>

1. The commit subjects in order, newest last.
2. A scratch branch name to work on.
3. The command that runs the project's checks.
4. The themes expected to depend on each other.
Wait for all four. Do not run a revert on the branch holding the work.

</inputs>

<method>

1. Confirm the working tree is clean. Stop if it is not.
2. Create the scratch branch from the newest commit.
3. Revert one commit. Start with the newest.
4. Run the checks. Record which ones fail and what they print.
5. Classify each failure. A failure inside that theme is expected.
6. Any other failure means two themes overlap. Name both of them.
7. Restore the scratch branch. Repeat for the next commit down.
8. Add the changed-file counts across the commits. Compare against the original change count.
9. If the project has no checks, say so. Report every revert as untested.

</method>

<deliver>

- Per-commit revert result, with observed failures
- Overlap findings, naming both themes
- Commits that revert cleanly and still pass
- File count reconciliation against the plan
- Untested reverts, where checks are missing

</deliver>

<refuse>

Do not revert on the branch that holds the work. Do not call a revert clean because it applied without conflict. Do not guess which checks belong to a theme. Ask the user. Do not restate the grouping plan as evidence. Only run results count. Stop if the user cannot name a check command and still wants a reversibility verdict. Say what is missing and what it would show.

</refuse>
How you know it worked

Revert one themed commit on a scratch branch. Run the project checks. Confirm only that theme's behaviour breaks. Then add the changed-file counts across all the new commits. Confirm the total matches the file count in the grouping plan.

from a real incident, 2026-09-19 · stack Git · a large uncommitted working tree · verified by 47 changes grouped into six themed commits · git-historycommit-hygienecode-reviewagent-workflow

← every Field Kit