---
description: Git commit and PR conventions — Conventional Commits format, bisectable commits, branch naming. Auto-loads into every session including forge subagents (builder, prototype-builder) which lack Skill-tool access.
---

# Git Workflow

## Conventional Commits

Format: `type(scope): description` — lowercase, imperative mood.

| Type | When |
|------|------|
| `feat` | New feature |
| `fix` | Bug fix |
| `refactor` | Restructuring (no behavior change) |
| `test` | Adding or updating tests |
| `docs` | Documentation only |
| `chore` | Build, config, tooling |

## Commit Discipline

- One commit per logical change — each must be bisectable
- Every commit must leave the project in a working state
- Always create new commits; never amend unless explicitly asked
- Never commit generated files, build artifacts, or secrets

## Branch Naming

`feat/`, `fix/`, `refactor/`, `hotfix/` + kebab-case description.

## Pull Requests

- One PR per logical function — atomic, independently mergeable
- PR description references requirements or issue
- Squash merges for feature branches
- Every PR must pass CI before merge

## Secrets

See [rules/common/security.md](security.md) for canonical secrets handling.
