Skip to content

Auto-commit at workflow gates#26

Merged
drabaioli merged 2 commits into
mainfrom
gh_issue_20_auto_commit_gates
Jun 17, 2026
Merged

Auto-commit at workflow gates#26
drabaioli merged 2 commits into
mainfrom
gh_issue_20_auto_commit_gates

Conversation

@drabaioli

Copy link
Copy Markdown
Owner

Implements issue #20: sessions auto-commit their own changes at their gate so a session never leaves a dirty tree for the next one to inherit.

What changed

  • Process doc: new §2.11 (Commit conventions) — five rules: commit only what the session produced (never git add -A; stop-and-surface a dirty entry tree), local-only with /process-pr as the sole auto-push exception, follow CLAUDE.md message conventions, surface a one-line summary, and an auto-commit is not a seventh checkpoint. Updates to §3.3 (implementation session), §3.5 (/pre-pr), §3.7 (/process-pr), and §4 (checkpoint count unchanged).
  • /next-step: the generated handoff prompt now carries a standing instruction for the implementation session to commit its own changes locally.
  • /pre-pr: records a clean-tree entry snapshot in step 1; new step 8 commits reconciliation edits locally (old step 8 → step 9); checklist gains a "Reconciliation edits committed" line.
  • CLAUDE.md (/pre-pr workflow bullet) and roadmap updated; both template/ command copies kept in sync; two new placeholder tokens whitelisted in scripts/template-smoke-whitelist.txt.

Verification

  • bash -n clean across scripts/tools/template/demo
  • command-drift-check: clean
  • template smoke + demo seed-overlay smoke: all checks passed
  • No upstream drift

Closes #20

Make CDD sessions commit at their gate so none leaves a dirty tree for the
next to inherit, while staying non-disruptive: a gate commits only its own
changes, never pushes (except /process-pr), and stops-and-surfaces if it
finds pre-existing dirty state it didn't author.

- Process doc: new §2.11 "Commit conventions" (five rules), with §3.3, §3.5,
  §3.7/§4.1 and §4 cross-referencing it. §4 frames an auto-commit as a
  reversible local commit that adds no checkpoint and removes none.
- /pre-pr (both copies): snapshot git status at entry; new step 8 commits the
  reconciliation edits locally (no push) or stops-and-surfaces a dirty entry
  tree; Open PR renumbered to step 9.
- /next-step (both copies): second standing instruction in the generated
  handoff prompt so the implementation session reliably commits its own work.
- Both CLAUDE.md /pre-pr bullets note the new auto-commit behavior.
- Roadmap: add and tick the Phase 8 item.
- Whitelist the two new free-form command tokens for the template smoke check.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread .claude/commands/next-step.md Outdated
Comment thread .claude/commands/pre-pr.md Outdated
"Follow the commit conventions in CLAUDE.md" already covers the trailer;
spelling out `Co-Authored-By` was redundant. Removed from next-step, pre-pr,
and process-pr in both the repo and the template (drift-check clean).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@drabaioli drabaioli merged commit 8de6ab1 into main Jun 17, 2026
1 check passed
@drabaioli drabaioli deleted the gh_issue_20_auto_commit_gates branch June 17, 2026 19:29
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.

Automatically commit at some gates

1 participant