.agents/git-workflow-manager/SKILL.md
Manages git operations: worktree creation, branch management, commits, PRs, semantic versioning, daily rebase workflow, and PR feedback handling. Use when: Creating branches/worktrees, committing, pushing, versioning, handling PR feedback Triggers: create worktree, commit, push, rebase, version, PR, PR feedback
npx skillsauth add stharrold/bingo git-workflow-managerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Handles all git operations following git-flow + GitHub-flow hybrid model.
main ← Production (tagged vX.Y.Z)
↑
release/vX.Y.Z ← Release candidate
↑
develop ← Integration branch
↑
contrib/<gh-user> ← Personal contribution branch
↑
feature/<timestamp>_<slug> ← Isolated feature (worktree)
hotfix/vX.Y.Z-hotfix.N ← Production hotfix (worktree)
CRITICAL: This skill manages git operations and MUST enforce branch protection rules.
Protected branches (NEVER delete, NEVER commit directly):
main - Production branch (tagged releases only)develop - Integration branch (PR merges only)All scripts in this skill comply with:
main (except tag operations)develop (except backmerge_release.py - documented exception)Exception documented:
backmerge_release.py commits to develop during Phase 5.5 back-mergeScript validation:
scripts/ directory are validated for compliancetests/test_branch_protection.py verifies no unintended main/develop commitsCreates feature/release/hotfix worktree with TODO file.
python .claude/skills/git-workflow-manager/scripts/create_worktree.py \
<feature|release|hotfix> <slug> <base_branch>
Arguments:
workflow_type: feature, release, or hotfixslug: Short descriptive name (e.g., 'json-validator')base_branch: Branch to create from (e.g., 'contrib/username')Output:
Performs daily rebase of contrib branch onto develop.
python .claude/skills/git-workflow-manager/scripts/daily_rebase.py \
<contrib_branch>
Steps:
Calculates semantic version based on component changes.
python .claude/skills/git-workflow-manager/scripts/semantic_version.py \
<base_branch> <current_version>
Version bump logic:
Creates release branch from develop with TODO file generation.
python .claude/skills/git-workflow-manager/scripts/create_release.py \
<version> <base_branch>
Arguments:
version: Semantic version (e.g., v1.1.0, v2.0.0)base_branch: Branch to release from (typically 'develop')Steps:
Output:
✓ Created release branch: release/v1.1.0
✓ Base: develop (commit abc123)
✓ TODO file: TODO_release_20251023T143000Z_v1-1-0.md
✓ Ready for final QA and documentation updates
Creates annotated tag on main branch after release merge.
python .claude/skills/git-workflow-manager/scripts/tag_release.py \
<version> <branch>
Arguments:
version: Semantic version to tag (e.g., v1.1.0)branch: Branch to tag (typically 'main')Steps:
Output:
✓ Checked out main branch
✓ Pulled latest changes (commit def456)
✓ Created annotated tag: v1.1.0
Message: "Release v1.1.0: Production release with vocabulary modules"
✓ Pushed tag to origin
✓ GitHub release created: https://github.com/user/german/releases/tag/v1.1.0
Merges release branch back to develop after main merge.
python .claude/skills/git-workflow-manager/scripts/backmerge_release.py \
<version> <target_branch>
Arguments:
version: Release version (e.g., v1.1.0)target_branch: Branch to merge into (typically 'develop')Steps:
Output (no conflicts):
✓ Checked out develop
✓ Pulled latest changes
✓ Merged release/v1.1.0 into develop (no conflicts)
✓ Pushed to origin/develop
✓ Back-merge complete
Output (with conflicts):
⚠ Merge conflicts detected
✓ Created PR: https://github.com/user/german/pull/46
Title: "chore(release): back-merge v1.1.0 to develop"
Please resolve conflicts in GitHub UI and merge.
Deletes release branch after successful release and back-merge.
python .claude/skills/git-workflow-manager/scripts/cleanup_release.py \
<version>
Arguments:
version: Release version (e.g., v1.1.0)Safety Checks (all must pass):
Steps:
Output:
✓ Verified tag v1.1.0 exists
✓ Verified tag on main branch
✓ Verified back-merge to develop complete
✓ Deleted local branch: release/v1.1.0
✓ Deleted remote branch: origin/release/v1.1.0
✓ Archived: TODO_release_20251023T143000Z_v1-1-0.md
✓ Release workflow complete for v1.1.0
Generates work-items from unresolved PR conversations for tracking follow-up work.
python .claude/skills/git-workflow-manager/scripts/generate_work_items_from_pr.py \
<pr_number>
Arguments:
pr_number: Pull request number to analyzePurpose:
When to use:
What it does:
reviewThreads.isResolved == falsethreads.status == active|pendinggh issue create with label "pr-feedback"az boards work-item create --type Taskpr-{pr_number}-issue-{sequence}
pr-94-issue-1, pr-94-issue-2GitHub Integration:
isResolved statusrepository.pullRequest.reviewThreadsisResolved: false, isOutdated: falsepr-feedback, pr-94Azure DevOps Integration:
az repos pr show --id {pr} --query threadsstatus == "active" || status == "pending"pr-feedback, pr-{pr_number}Workflow Pattern:
# 1. Create PR from feature to contrib
gh pr create --base contrib/stharrold --head feature/20251108T112041Z_auth
# 2. Reviewers add comments in web portal
# 3. Generate work-items for unresolved conversations
python .claude/skills/git-workflow-manager/scripts/generate_work_items_from_pr.py 94
# Output:
# ✓ Found 3 unresolved conversations
# ✓ Created work-item: pr-94-issue-1 (https://github.com/user/repo/issues/123)
# ✓ Created work-item: pr-94-issue-2 (https://github.com/user/repo/issues/124)
# ✓ Created work-item: pr-94-issue-3 (https://github.com/user/repo/issues/125)
# 4. Approve PR in web portal (conversations remain as work-items)
# 5. For each work-item, create new feature worktree:
python .claude/skills/git-workflow-manager/scripts/create_worktree.py \
feature pr-94-issue-1 contrib/stharrold
# 6. Implement fix, create PR, merge
# 7. Repeat for remaining work-items
Key Features:
Decision Tree:
PR reviewed with comments
├─ Simple fixes (typos, formatting)
│ └─ Fix directly on feature branch, push update
└─ Substantive changes (new features, refactoring)
└─ Generate work-items, approve PR, fix in separate features
The release workflow implements Phase 5 from WORKFLOW.md, providing a complete automation of git-flow release process.
Use release workflow when:
Use hotfix workflow when:
# Step 1: Create release branch from develop
python .claude/skills/git-workflow-manager/scripts/create_release.py \
v1.1.0 develop
# Step 2: Perform QA on release branch
# - Run quality gates
# - Update documentation
# - Update version in pyproject.toml
# Step 3: Create PR: release/v1.1.0 → main
gh pr create --base main --title "Release v1.1.0"
# Step 4: User merges PR in GitHub UI
# (Manual step - review and merge)
# Step 5: Tag release on main
python .claude/skills/git-workflow-manager/scripts/tag_release.py \
v1.1.0 main
# Step 6: Back-merge to develop
python .claude/skills/git-workflow-manager/scripts/backmerge_release.py \
v1.1.0 develop
# Step 7: Cleanup release branch
python .claude/skills/git-workflow-manager/scripts/cleanup_release.py \
v1.1.0
# Step 8: Update contrib branch
python .claude/skills/git-workflow-manager/scripts/daily_rebase.py \
contrib/<gh-user>
The release scripts implement the 8-step process documented in WORKFLOW.md Phase 5:
| Step | Script | Description | |------|--------|-------------| | 5.1 | create_release.py | Create release branch | | 5.2 | Manual | QA and documentation updates | | 5.3 | gh pr create | Create PR to main | | 5.4 | Manual | User merges in GitHub UI | | 5.5 | tag_release.py | Tag release on main | | 5.6 | backmerge_release.py | Back-merge to develop | | 5.7 | cleanup_release.py | Delete release branch | | 5.8 | daily_rebase.py | Update contrib branch |
If a release workflow step fails:
All scripts include comprehensive error messages with recovery instructions.
<type>(<scope>): <subject>
<body>
<footer>
Types: feat, fix, docs, style, refactor, test, chore
Example:
feat(validator): add JSON schema validation endpoint
Implements REST API endpoint for validating JSON against schemas.
Uses jsonschema library for validation logic.
Implements: impl_003
Spec: specs/json-validator/spec.md
Tests: tests/test_validator.py
Coverage: 85%
Refs: TODO_feature_20251022T143022Z_json-validator.md
# Feature → contrib/<gh-user>
gh pr create \
--base "contrib/<gh-user>" \
--head "<feature-branch>" \
--title "feat: <description>" \
--body "See TODO_feature_*.md for details"
# After user merges in GitHub UI:
# Contrib → develop
gh pr create \
--base "develop" \
--head "contrib/<gh-user>" \
--title "feat: <description>" \
--body "Completed feature: <name>"
Other skills call these scripts:
import subprocess
# Create worktree
result = subprocess.run([
'python',
'.claude/skills/git-workflow-manager/scripts/create_worktree.py',
'feature', 'my-feature', 'contrib/user'
], capture_output=True, text=True)
# Calculate version
result = subprocess.run([
'python',
'.claude/skills/git-workflow-manager/scripts/semantic_version.py',
'develop', 'v1.0.0'
], capture_output=True, text=True)
new_version = result.stdout.strip()
development
Enforces quality gates: 80% test coverage, passing tests, successful builds, semantic versioning. Runs before PR creation. Use when: Running tests, checking coverage, validating quality, versioning Triggers: run tests, check coverage, quality gates, version bump
tools
Meta-skill (Phase 0) for bootstrapping new repositories with workflow system. Interactive callable tool that copies skills, documentation, and standards from source repository. Use when: Starting a new project that needs the workflow system Triggers: "initialize new repository", "bootstrap workflow", "replicate workflow system"
tools
Interactive callable tool that creates BMAD planning documents (requirements, architecture, epics) in main repository on contrib branch. Three-persona Q&A system generates comprehensive planning before feature development. Use when: On contrib branch, planning phase, need requirements/architecture Triggers: plan feature, requirements, architecture, BMAD
testing
Persistent state management using AgentDB (DuckDB) for workflow analytics and checkpoints. Provides read-only analytics cache synchronized from TODO_*.md files, enabling: - Complex dependency graph queries - Historical workflow metrics - Context checkpoint storage/recovery - State transition analysis Use when: Data gathering and analysis for workflow state tracking Triggers: "analyze workflow", "query state", "checkpoint", "workflow metrics"