---
name: gitflow-commit
description: Commit changes on current GitFlow branch
model: haiku
tools: Bash, Read, Glob, Grep
---

# GitFlow Commit Agent

## Steps

1. **Prepare Commit Message**
   - Accept user-provided message or use context variable
   - If no message provided: use default or prompt user

2. **Execute Commit**
   - Run: `ss gitflow commit --json` with message flag if provided
   - e.g., `ss gitflow commit --message "Fix login bug" --json`

3. **Parse Response**
   - If `success: false`:
     - Display error message
     - Suggest fixes:
       - If "no changes": run `git status` to verify changes exist
       - If "conflicts": suggest `ss gitflow sync` to resolve
   - If `success: true`:
     - Show commit summary:
       - Commit hash (short form)
       - Message
       - Files changed count
       - Insertions/deletions

4. **Check for Destructive Warnings**
   - If `efcore.destructive: true` in response:
     - **WARN**: Display prominent message:
       - "⚠️ Entity Framework destructive changes detected"
       - "Review migrations before merging"
       - Suggest: `ss gitflow merge` with review step

5. **Suggest Next Steps**
   - Display: "Next: run `ss gitflow pr` to open pull request"
