SAFe development workflow guidance including branch naming conventions, commit message format, rebase-first workflow, and CI validation...
📋 TEMPLATE: This skill uses
{{TICKET_PREFIX}}as a placeholder. Replace with your project's ticket prefix (e.g.,WOR,PROJ,FEAT).
Enforce SAFe-compliant git workflow with standardized branch naming, commit message format, and rebase-first merge strategy. Ensures linear history and full traceability to Linear tickets.
Invoke this skill when:
Required Format: {{TICKET_PREFIX}}-{number}-{short-description}
{{TICKET_PREFIX}}- followed by ticket number{{TICKET_PREFIX}}-447-create-safe-workflow-skill
{{TICKET_PREFIX}}-123-fix-login-redirect
{{TICKET_PREFIX}}-234-add-stripe-checkout
feature/add-dark-mode (missing ticket number)
fix/broken-login (missing ticket number)
john-new-feature (personal naming)
WIP (not descriptive)
Required Format: type(scope): description [{{TICKET_PREFIX}}-XXX]
| Type | When to Use |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation only |
style |
Formatting (no logic changes) |
refactor |
Code restructuring (no feature/bug) |
test |
Adding or updating tests |
chore |
Maintenance, dependencies |
ci |
CI/CD pipeline changes |
Common scopes: payments, auth, ui, api, db, harness, rls
Every commit MUST end with [{{TICKET_PREFIX}}-XXX] referencing the ticket.
feat(harness): create safe-workflow skill [{{TICKET_PREFIX}}-447]
fix(auth): resolve login redirect issue [{{TICKET_PREFIX}}-57]
docs: update API documentation [{{TICKET_PREFIX}}-123]
refactor(db): optimize query performance [{{TICKET_PREFIX}}-234]
chore: upgrade dependencies [{{TICKET_PREFIX}}-337]
This project enforces linear history through rebase-first workflow. Never create merge commits.
# 1. Start from latest {{MAIN_BRANCH}}
git checkout {{MAIN_BRANCH}} && git pull origin {{MAIN_BRANCH}}
# 2. Create feature branch
git checkout -b {{TICKET_PREFIX}}-{number}-{description}
# 3. Make commits (SAFe format)
git add .
git commit -m "type(scope): description [{{TICKET_PREFIX}}-XXX]"
# 4. Keep branch updated during development
git fetch origin
git rebase origin/{{MAIN_BRANCH}}
# 5. Before pushing - rebase one final time
git fetch origin
git rebase origin/{{MAIN_BRANCH}}
# Resolve any conflicts locally
# 6. Push with force-with-lease (safe after rebase)
git push --force-with-lease origin {{TICKET_PREFIX}}-{number}-{description}
# 7. Create PR using template
# Use "Rebase and merge" strategy ONLY
--force-with-lease?--force (won't overwrite unseen remote changes)Before creating a PR, ALL of these must pass:
{{CI_VALIDATE_COMMAND}}
This runs: type-check, lint, test:unit, format:check
{{LINT_MD_COMMAND}}
git status
# Must show: nothing to commit, working tree clean
git fetch origin
git rebase origin/{{MAIN_BRANCH}}
# Must be up-to-date with {{MAIN_BRANCH}} branch
git log origin/{{MAIN_BRANCH}}..HEAD --oneline
# All commits must follow SAFe format with [{{TICKET_PREFIX}}-XXX]
Shortcut: Use /pre-pr command to run all validation steps.
| Command | Purpose | When to Use |
|---|---|---|
/start-work |
Begin work on a ticket | Starting any new work |
/check-workflow |
Quick status check | Periodically during work |
/pre-pr |
Full validation before PR | Before creating PR |
/end-work |
Complete session cleanly | End of work session |
/quick-fix |
Fast-track for small bug fixes | Minor, isolated fixes |
| File | Risk | Required Action |
|---|---|---|
prisma/schema.prisma |
HIGH | Announce in Slack BEFORE touching |
prisma/migrations/* |
HIGH | Coordinate with all teams |
docker-compose*.yml |
HIGH | All teams must restart containers |
package.json |
MEDIUM | Run {{INSTALL_COMMAND}} after sync |
.env.template |
MEDIUM | Update local .env files |
Always sync with latest {{MAIN_BRANCH}}:
git checkout {{MAIN_BRANCH}} && git pull origin {{MAIN_BRANCH}}
Or use /local-sync command for full synchronization.
For complete workflow documentation, see:
| Placeholder | Description | Example |
|---|---|---|
{{TICKET_PREFIX}} |
Your ticket/issue prefix | WOR, PROJ, FEAT |
{{MAIN_BRANCH}} |
Main git branch name | main, dev |
{{CI_VALIDATE_COMMAND}} |
CI validation command | yarn ci:validate |
{{LINT_MD_COMMAND}} |
Markdown linting command | yarn lint:md |
{{INSTALL_COMMAND}} |
Package install command | yarn install |