Skip to content

Author PRs as atomic commit series and preserve them through review - #56

Merged
nonreagent merged 5 commits into
mainfrom
atomic-commits
Aug 28, 2026
Merged

Author PRs as atomic commit series and preserve them through review#56
nonreagent merged 5 commits into
mainfrom
atomic-commits

Conversation

@nonreagent

Copy link
Copy Markdown
Collaborator

Problem

Agent-authored PRs accumulate appended commits when feedback arrives: address-pr-feedback step 5 mandated "make all accepted changes in one commit" and push, so accepted feedback landed as new commits even when it logically belonged in an earlier one. The series stops being a sequence of independently reviewable units, and nothing in the agent config encoded the alternative.

Motivation

Review quality tracks commit legibility: a reviewer who challenges the library choice in commit 1 should see commit 1 change, not diff a fifth commit against their memory of the first four. The harness also has no interactive git rebase -i, so the non-interactive rewrite choreography is exactly what a session re-derives badly under pressure — worth encoding once, verified.

Proposed Solution

  • New atomic-commits skill (home/.agents/skills/atomic-commits/): non-interactive history-rewrite mechanics — fixup + autosquash via GIT_SEQUENCE_EDITOR=true (git 2.43-safe), edit-then-amend reword, split, git rebase -x to prove every commit green, --force-with-lease etiquette. Every recipe was exercised in a scratch repo before being written down; recipes are BSD-sed-safe for the macOS deploy target.
  • Two rule bullets in home/.agents/rules/workflow.md (Git & PR Hygiene): plans name the commit series, one plan task = one commit; feedback amends the owning commit, never appends.
  • address-pr-feedback rerouted: triage identifies each accepted comment's owning commit, the confirmation gate names the destination, step 5 lands changes via the atomic-commits skill, and replies cite post-rewrite SHAs.

Design and parked decisions: docs/superpowers/specs/2026-08-25-atomic-commits-design.md. Execution record: docs/superpowers/plans/2026-08-25-atomic-commits.md.

Feedback

Self-review (adversarial whole-branch pass) caught two Important items, both fixed before this PR went up: a GNU-only sed -i in the reword/split recipes (now sed -i.bak) and a stale spec Status line. Highest-value review targets: the two rule bullets — they load into every session, so their wording is the contract — and whether the skill's safety preamble is strict enough before any force-push. The branch practices what it installs: five atomic commits, review fixes landed as fixups into their owning commits, series proven green per commit with git rebase -x. Note this branch was force-pushed over the spec-only revision you reviewed earlier — the spec commit changed (Status line, reword-recipe note, unwrapped rule bullets).

nonreagent and others added 5 commits August 26, 2026 00:35
Records the brainstormed design for authoring PRs as a planned series of
atomic commits and preserving that atomicity through review: amend the
owning commit and rebase rather than appending feedback commits. Covers
the workflow.md rule, a new atomic-commits mechanics skill, edits to
address-pr-feedback, and the parked decisions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Three tasks, one commit each: the atomic-commits mechanics skill, the
Git & PR hygiene rule bullets, and the address-pr-feedback rerouting.
Recipes were verified against git 2.43 in a scratch repo; the plan pins
the GIT_SEQUENCE_EDITOR form as primary and encodes the verified
rejection of -m with --fixup=reword.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@nonreagent
nonreagent requested a review from nonrational August 26, 2026 00:39

@nonrational nonrational left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's give it a shot!

@nonreagent
nonreagent merged commit 3969035 into main Aug 28, 2026
2 checks passed
@nonreagent
nonreagent deleted the atomic-commits branch August 28, 2026 16:54
nonrational added a commit that referenced this pull request Aug 30, 2026
…ative

* origin/main:
  Author PRs as atomic commit series and preserve them through review (#56)
  don't commit gemini config json
  Add code-comment-register skill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants