Branch-And-Commit-Workflow

A set of rules for doing development work on a maintained open-source repository using a dedicated branch and small commits. A branch is a separate line of work, while a commit is a saved, reviewable change.

In plain words
What is it for?
Use it before meaningful code changes to check the current branch, create a task-specific branch when needed, and save work in small logical commits.
Why use it?
It prevents unrelated work from being mixed together and protects shared branches from unfinished changes. Frequent focused commits also preserve progress and make review easier.

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/fullive-ai/anima/branch-and-commit-workflow
Clone the repo
git clone --depth 1 https://github.com/Fullive-AI/Anima

Made for: Cursor.

Per session 624 This file is loaded in full into every session.
When invoked 624 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.00624 $0.00624
Opus 5 $0.00312 $0.00312
Sonnet 5 $0.00125 $0.00125
Haiku 4.5 $0.00062 $0.00062

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

Security

Grade A, and why

Branch-And-Commit-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/Branch-And-Commit-Workflow.mdc · 108 lines

How it starts

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

Use a branch-first, commit-early workflow suitable for a maintained open source repository.

Core rule

Before making meaningful code changes, ensure the work is on a dedicated task branch rather than on a protected or shared integration branch.

Once work starts, preserve progress through small, logical, reviewable commits instead of one large accumulated diff.

Branch behavior

At the beginning of meaningful work:

  1. Check the current branch.
  2. If already on a suitable task branch for the current task, continue there.
  3. If on a protected or shared branch such as main, master, develop, dev, or release, create and switch to a dedicated task branch before making meaningful edits.
  4. If on a branch unrelated to the current task, create and switch to a new task branch instead of mixing concerns.

Branch naming

Use short, descriptive, task-focused branch names.

Prefer patterns such as:

  • fix/dashboard-refresh-bug
  • fix/mqtt-timeout-handling
  • feat/device-status-history
  • refactor/adapter-payload-parser
  • docs/env-setup-clarification
  • test/add-timeout-regression

Branch names should be:

  • lowercase
  • concise
  • descriptive
  • scoped to one task or one closely related set of changes

Avoid vague names such as:

  • temp
  • misc
  • work
  • updates
  • new-branch

Commit behavior

Commit after each completed, coherent unit of work.

A commit should represent one logical step such as:

  • one bug fix
  • one small feature slice
  • one focused refactor
  • one interface update with its direct caller adjustments
  • one docs update tied to a code change
  • one regression test plus the related fix

Commit quality

Each commit should be:

  • small enough to review easily
  • coherent in purpose
  • safe to revert independently
  • tied to a clear intent
  • validated whenever practical

Write concise commit messages that describe the intent clearly.

Prefer:

  • fix dashboard polling after reconnect
  • add regression test for adapter timeout
  • refactor mqtt payload normalization
  • update docs for broker configuration

Read the full file on GitHub · 108 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 · 108 lines · 624 tokens per session scan A fc8d4c65e159

Subscribe to this mod's changes

Branch-And-Commit-Workflow is a cursor rule published in the GitHub repository Fullive-AI/Anima (1,049 stars, last pushed 12d ago), licensed Apache-2.0. It adds 624 tokens to every session, about $0.0031 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.