feat(commit): add hunk-level staging guidance via patch-file flow #2

Merged
claudiomaradonna merged 2 commits from feat/commit-hunk-staging into main 2026-04-30 18:11:39 +02:00

Document a hunk-level staging flow inside /commit so that when a single file's changes belong to more than one atomic commit, the skill no longer has to fall back to one-commit-per-file or — worse — to restructuring files just to align commit boundaries with file boundaries. The new sub-section 6a describes a patch-file flow (git diff > /tmp/patch.diff → curate → git apply --cached → commit, repeat against the updated diff): deterministic, reviewable, and safe to run non-interactively, where git add --patch / git commit --patch cannot be driven without stdin. Step 4 gains a planning nudge, the safety rules a matching prohibition on file-moving as a workaround, and the README's /commit summary reflects the new bullet. Bumps to 0.5.0.

Merge: rebase.

Document a hunk-level staging flow inside `/commit` so that when a single file's changes belong to more than one atomic commit, the skill no longer has to fall back to one-commit-per-file or — worse — to restructuring files just to align commit boundaries with file boundaries. The new sub-section 6a describes a patch-file flow (`git diff > /tmp/patch.diff` → curate → `git apply --cached` → commit, repeat against the updated diff): deterministic, reviewable, and safe to run non-interactively, where `git add --patch` / `git commit --patch` cannot be driven without stdin. Step 4 gains a planning nudge, the safety rules a matching prohibition on file-moving as a workaround, and the README's `/commit` summary reflects the new bullet. Bumps to 0.5.0. Merge: rebase.
Add a 6a sub-section documenting how to stage at hunk granularity
when a single file's changes belong to more than one atomic commit.
The new flow uses git diff -- <path>, a curated patch file, then
git apply --cached, repeated against the updated diff. This is
deterministic, reviewable, and safe to drive non-interactively,
unlike git add --patch / git commit --patch which are prompt-driven
and impractical to drive without stdin.

Step 4 (atomic grouping) gains a one-paragraph nudge to plan for
hunk-level staging when a single file straddles commits, instead
of falling back to one-commit-per-file or restructuring files just
to align commits with file boundaries. Step 6 references 6a;
safety rules add a matching prohibition on file-restructuring as
a workaround.

Mirrors the 1a pattern (SSH signing key recovery): a sub-section
for the detailed flow, with the main step's bullets staying tight.
Bump plugin version to 0.5.0 (minor: feat(commit) added hunk-level
staging guidance) and reflect the new behavior in the README's
/commit workflow summary: step 6 bullet now mentions splitting at
hunk granularity via the patch-file flow when a single file's
changes span multiple commits.

Plugin manifest description unchanged - the skill's overall
purpose is the same; only its internal workflow gained a sub-step.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
claudiomaradonna/claude-plugin-conventional-commit!2
No description provided.