01-git-workflow

A set of Git rules for branch names, commit messages, rebasing, and pull requests in SAFe development, a structured way for teams to plan and deliver work.

In plain words
What is it for?
Use it for every Git operation, especially when creating branches, writing commits, rebasing, or opening pull requests.
Why use it?
It prevents CI from rejecting incorrectly named branches or commits and keeps changes aligned with the project's review workflow.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/bybren-llc/safe-agentic-workflow/01-git-workflow
Clone the repo
git clone --depth 1 https://github.com/bybren-llc/safe-agentic-workflow

Made for: Cursor.

Per session 716 This file is loaded in full into every session.
When invoked 716 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00716 $0.00716
Opus 5 $0.00358 $0.00358
Sonnet 5 $0.00143 $0.00143
Haiku 4.5 $0.00072 $0.00072

Measured 2d ago against content hash a8a2efb59069, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

01-git-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/01-git-workflow.mdc · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git Workflow

This project enforces a rebase-first workflow validated by CI/CD automation. See CONTRIBUTING.md for the full guide.

Branch Naming

Required format: {{TICKET_PREFIX}}-{number}-{short-description}

Examples:

  • {{TICKET_PREFIX}}-42-add-user-authentication
  • {{TICKET_PREFIX}}-57-fix-profile-image-upload

Rules:

  • MUST start with {{TICKET_PREFIX}}-{number}
  • Use lowercase letters and hyphens only
  • Keep total length under 50 characters
  • Never include personal names or dates
  • CI will reject branches that do not follow this format

Commit Message Format

Required format: type(scope): description [{{TICKET_PREFIX}}-XXX]

Types

  • feat -- New feature
  • fix -- Bug fix
  • docs -- Documentation changes
  • style -- Code formatting (no logic changes)
  • refactor -- Code restructuring
  • test -- Adding or updating tests
  • chore -- Maintenance tasks, dependencies
  • ci -- CI/CD pipeline changes

Scopes (optional)

  • payments, auth, ui, api, db, scheduler, security, cursor

Examples

feat(payments): add Stripe checkout integration [{{TICKET_PREFIX}}-42]
fix(auth): resolve login redirect issue [{{TICKET_PREFIX}}-57]
docs: update API documentation [{{TICKET_PREFIX}}-123]

CI will reject commits that do not include a ticket reference.

Workflow Steps

# 1. Start from latest base branch
git checkout {{MAIN_BRANCH}}
git pull origin {{MAIN_BRANCH}}
git checkout -b {{TICKET_PREFIX}}-{number}-{description}

# 2. Make changes and commit
git add <files>
git commit -m "feat(scope): description [{{TICKET_PREFIX}}-XXX]"

# 3. Keep branch updated (rebase, NEVER merge)
git fetch origin
git rebase origin/{{MAIN_BRANCH}}

# 4. Validate before pushing
# Run: {{CI_VALIDATE_COMMAND}}

# 5. Push
git push --force-with-lease origin {{TICKET_PREFIX}}-{number}-{description}

# 6. Create PR using .github/pull_request_template.md
# 7. Merge using "Rebase and merge" ONLY (never squash or merge commit)

Read the full file on GitHub · 93 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 93 lines · 716 tokens per session scan A a8a2efb59069

Subscribe to this mod's changes

01-git-workflow is a cursor rule published in the GitHub repository bybren-llc/safe-agentic-workflow (404 stars, last pushed 1mo ago), licensed MIT. It adds 716 tokens to every session, about $0.0036 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.