moai-ref-git-workflowlisted
Install: claude install-skill modu-ai/moai-cowork
# Git Workflow Reference
## Target Agent
`manager-git` - Applies these patterns directly to git operations, branch management, and PR creation.
## Branch Strategy Patterns
### GitHub Flow (Default for Most Projects)
```
main ─────────────────────────────────────────
└── feat/SPEC-XXX-description ──── PR ──→ merge
```
Rules:
- `main` is always deployable
- Feature branches from `main`
- PR required for all merges
- Delete branch after merge
### GitFlow (Complex Release Cycles)
```
main ──���───────────────────────────────────────
└── develop ─────────────────────────────────
├── feature/SPEC-XXX ──── PR ──→ develop
└── release/v1.2.0 ────── PR ──→ main + develop
```
### Trunk-Based (CI/CD Heavy)
```
main ──────────────────────────────────────────
└── short-lived branch (< 1 day) ──→ merge
```
## Branch Naming Convention
| Pattern | Example | Use Case |
|---------|---------|----------|
| `feat/SPEC-{ID}-{slug}` | `feat/SPEC-AUTH-001-jwt-auth` | New feature |
| `fix/SPEC-{ID}-{slug}` | `fix/SPEC-BUG-042-null-check` | Bug fix |
| `refactor/{slug}` | `refactor/extract-auth-middleware` | Refactoring |
| `docs/{slug}` | `docs/api-reference-update` | Documentation |
| `chore/{slug}` | `chore/upgrade-dependencies` | Maintenance |
## Conventional Commits Reference
| Type | When | Example |
|------|------|---------|
| `feat` | New feature | `feat(auth): add JWT refresh token flow` |
| `fix` | Bug fix | `fix(api): handle null user in profile endpoint`