codebase-git

Installation
SKILL.md

Codebase Git

History is read by people and agents who weren't there. The goal: from git log alone, anyone can tell what changed and where; from a PR alone, what was agreed and whether it was met. The practices below are recommendations that serve that goal. A project can choose otherwise and record why in docs/ARCHITECTURE.md.

Changes

Goal: each step can be read and undone on its own, and each goal is accepted and merged as a whole, without more ceremony than it needs.

Commits are cheap and pull requests aren't, so the fine grain goes into commits:

  • A commit is the smallest step that makes sense alone. One concern, understandable and revertible by itself. It at least builds, so git bisect works; the full check has to pass where the branch merges.
  • Delete in the same commit. The commit that brings in a replacement removes what it replaces: old code, files, flags, and docs. No commented-out code, no _v2, _old, or _new copies, no old and new paths side by side. When a migration really needs both for a while, say when the old one goes.
  • A branch delivers one agreed goal, as the fewest commits it takes. Split it only when part of it is hard to undo (a schema migration, a public contract, deleting data: merge that part on its own), when the branch would live long enough to drift from main (merge it in stages that each work), when the diff grows past what a reviewer, human or agent, can judge accurately, or when several people or agents work on it in parallel. Never split a goal into halves that leave main unusable, and don't open a branch for a typo.

Commits

Goal: each commit is one change that a reader understands from its subject line.

A way that works: Conventional Commits, type(scope): subject.

Installs
1
Repository
aningdev/skills
First Seen
8 days ago