Automate Git workflows with atomic commits, Beads integration, and real-time sync...
Automate complex Git workflows with atomic commit enforcement, Beads integration, and real-time synchronization.
Use this skill when:
An atomic commit is a single, self-contained change that:
Benefits:
Enforcement Rules:
Format: {type}({scope}): {issue_id} {title}
Types:
feat: New featurefix: Bug fixrefactor: Code refactordocs: Documentationtest: Test additions/updateschore: Build, dependencies, toolingExamples:
feat(auth): TASK-42 Add JWT token validation
fix(api): ISSUE-123 Handle null responses correctly
docs(readme): Update installation instructions
test(utils): Add tests for date formatting
Real-time synchronization with Beads task tracking:
# Create branch from main
git checkout main && git pull
git checkout -b feat/TASK-42-description
# Branch naming: {type}/{issue-id}-{short-description}
Edit files for a single feature/fix:
# Edit files
vim src/feature.ts
# Stage changes
git add src/feature.ts
# Check status
git status
Ensure quality before commit:
# Run tests
npm test
# Check linting
npm run lint
# Type check
npm run type-check
# Validate changes meet atomic commit rules
# (Max files, single issue, proper formatting)
# Commit with proper format
git commit -m "feat(module): TASK-42 Add new feature"
# The commit will:
# 1. Validate message format
# 2. Check file count (< 50 files)
# 3. Verify single issue reference
# 4. Update Beads task status
# 5. Run pre-commit hooks
# Auto-sync happens on commit, but manual sync available:
git beads-sync TASK-42
# Updates: task status, linked commits, dependencies
# Push to remote
git push -u origin feat/TASK-42-description
# Create PR (on GitHub/GitLab)
# Reference task: "Closes TASK-42"
# Wait for reviews and CI
# Merge when approved
git merge feat/TASK-42-description
Task: BUGFIX-89 "Fix null pointer in auth service"
git checkout main && git pull
git checkout -b fix/BUGFIX-89-null-pointer
vim src/auth/service.ts
npm test # Verify fix works
git add src/auth/service.ts
git commit -m "fix(auth): BUGFIX-89 Handle null user object"
Commit validates:
Task: FEAT-156 "Add user preferences UI"
git checkout -b feat/FEAT-156-user-prefs
vim src/components/Preferences.tsx
vim src/api/preferences.ts
vim src/styles/preferences.css
npm test
git add src/components/Preferences.tsx src/api/preferences.ts src/styles/preferences.css
git commit -m "feat(ui): FEAT-156 Add user preferences panel"
Commit validates:
Task: TECH-203 "Refactor date utilities"
git checkout -b refactor/TECH-203-date-utils
vim src/utils/date.ts
vim src/utils/__tests__/date.test.ts
npm test # Validate refactor doesn't break anything
git add src/utils/date.ts src/utils/__tests__/date.test.ts
git commit -m "refactor(utils): TECH-203 Simplify date formatting"
Commit validates:
Before every commit:
Automatically commit when:
Safety checks:
Ensures commits don't break dependencies:
Watch for completed tasks every 30 seconds
Auto-commit when task status → closed
Validate each commit before pushing
Stop on errors or after 1 hour
Use for:
Keeps Git and task tracking in sync:
Sync on:
Organize branches by release version:
main → Production
v1.2.x → Stable releases
develop → Development
feat/... → Features (merge to develop)
bugfix/... → Bug fixes (merge to v-branch)
release/v1.2.0 → Release candidates
Tagging:
Problem: "Atomic commit validation failed"
Solution:
git log -1git diff --cached --name-only | wc -l{type}({scope}): {issue} {title}git validate --strictProblem: "Beads sync failed"
Solution:
beads statusbeads issues list TASK-42echo $BEADS_API_KEYgit beads-sync TASK-42Problem: "Auto-commit didn't run"
Solution:
beads issues get TASK-42git statusgit auto-commit --dry-run=falsecat .git/auto-commit.loggit, commits, automation, workflow, atomic-commits, beads, sync, branches, validation, conventional-commits
