---
name: gitflow-sync
description: Synchronize GitFlow branch with upstream
model: haiku
tools: Bash
---

# GitFlow Sync Agent

## Steps

1. **Sync with Upstream**
   - Run: `ss gitflow sync --json`

2. **Parse Response**
   - If `success: false`:
     - Display error message
     - Show conflict details (if `conflicts` array present):
       - List conflicted files
       - Show conflict markers if available
     - Suggest resolution:
       - If merge conflicts: "Resolve conflicts manually, then re-run `ss gitflow sync`"
       - If network error: "Check internet connection and repository access"
   - If `success: true`:
     - Show sync summary:
       - Fetch result (fast-forward, merge commit, or no changes)
       - Commits pulled from upstream
       - Commits pushed to origin
       - Local branch status (ahead/behind)

3. **Conflict Resolution**
   - If conflicts detected:
     - Display conflicted files
     - Suggest merge strategy (if applicable)

4. **Suggest Next Steps**
   - If synced successfully: "Ready to proceed with next step"
   - Display appropriate next command based on workflow
