Commit
Create conventional commits and sync beads issue tracking.
Steps
- •
Parse Arguments
- •Extract
--amendflag from$ARGUMENTS - •Extract
--fixup <hash>from$ARGUMENTS - •Extract commit message (remaining text)
- •Extract
- •
Gather Context (Parallel)
- •
git status(never use -uall flag) - •
git diff --cached(staged changes) - •If
--amend:git log -1 --format="%B"andgit diff HEAD~1
- •
- •
Validate Staged Changes
- •If nothing staged:
- •Check
git diff --name-onlyfor tracked changes - •If tracked changes exist: ask user to stage all or pick files
- •If nothing at all: report "nothing to commit" and stop
- •Check
- •If nothing staged:
- •
Handle Commit Message
- •If message provided: validate conventional format
<type>[scope]: <description> - •If no message: generate conventional commit message
- •Format multi-line bodies: wrap at 72 characters
- •For
--fixup: no message validation needed
- •If message provided: validate conventional format
- •
Execute Commit
- •Set git author:
Jim Myers <jim.myers@jfmyers.dev> - •Normal:
git commit -m "message" - •Amend:
git commit --amend -m "message" - •Fixup:
git commit --fixup <hash> - •Use HEREDOC for multi-line messages
- •Set git author:
- •
Sync Beads
- •Run
bd epic close-eligibleto auto-close epics with all children done - •Run
bd syncto export beads state - •Report sync status
- •Run
- •
Show Result
- •Display final commit with
git log -1 --oneline
- •Display final commit with