agentleFS
anandartinanandartin/celestial-skills/skills/git-workflow-engineering/AGENTS.md

celestial-skills / git-workflow-engineering

AGENTS.md1 starsChanged 18 days agoApache-2.0View on GitHub

Work in short-lived branches with small, well-described commits, so history explains itself and any change can be reviewed, bisected or reverted. Generated from the Celestial engineering practice “Git workflow”.

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 1 is common, 1 is distinctive, and 0 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Common:

    Keep secrets and environment files out of the repository with ignore rules and a pre-commit secret scan.

    line 23
  2. Distinctive:

    Never force-push to main or to a branch someone else is working on.

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md — Git workflow

Work in short-lived branches with small, well-described commits, so history explains itself and any change can be reviewed, bisected or reverted.

How to do it

  1. Start from fresh main — Pull the latest main and create a branch named type/short-description, for example fix/login-timeout. One branch per issue.
  2. Commit in small, working steps — Each commit makes one logical change and leaves the build passing. Stage selectively so unrelated edits go in separate commits.
  3. Write a clear message — Use a short imperative subject under about 70 characters with a type prefix, a blank line, then a body explaining why the change was needed when it is not obvious.
  4. Stay close to main — Rebase on or merge main at least daily. Resolve conflicts in your branch, re-run tests, and keep branches alive for days, not weeks.
  5. Tidy before review — Squash fixup commits and reorder so the branch tells a clear story. Never rewrite history that others have already pulled.
  6. Open a focused pull request — Keep it under about 400 changed lines, link the issue, describe what and why, and note how to test. Wait for CI to pass before requesting review.
  7. Merge and delete — Squash-merge or rebase-merge once approved, delete the branch, and confirm main is still green.

Checklist (before a pull request)

  • Branch is named by type and topic and is based on recent main
  • Every commit builds and has a message saying what and why
  • No secrets, build output or local config are committed
  • Branch is up to date with main and CI is green
  • Pull request is focused, linked to its issue and under the size limit
  • Branch was deleted after merge

Rules

  • Keep secrets and environment files out of the repository with ignore rules and a pre-commit secret scan. (Anything committed stays in history even after deletion.)
  • Never force-push to main or to a branch someone else is working on. (Rewriting shared history destroys other people's work.)
  • Protect main: require a pull request, passing CI and one approval. (Main stays deployable only if nothing reaches it unchecked.)
  • Revert a bad merge on main first, then fix forward on a branch. (Restoring a working main matters more than a quick patch.)

Checks

GateToolThresholdWhen
Commit message formatCommit-message linter in CIAll commits follow the agreed type: subject formatEvery pull request

Generated from the Celestial engineering practice “Git workflow”.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.