Conventional Branch

A specification for adding human and machine readable meaning to branch

About

The Conventional Branch specification was inspired by Conventional Commits.

AI Agent Source Prefixes

As AI coding agents increasingly open their own pull requests, Conventional Branch maintains a registry of their branch prefixes so tools and teams can recognize them consistently. This registry is the machine-readable source of truth — the table below is generated from data/agents.yaml.

Prefix Agent Vendor Since
ai/ Any AI agent v1.1.0
claude/ Claude Code Anthropic v1.1.0
codex/ OpenAI Codex OpenAI v1.1.0
copilot/ GitHub Copilot GitHub v1.1.0
cursor/ Cursor Anysphere v1.1.0

Giving each agent a documented prefix (or using the vendor-neutral ai/) lets teams do more than just eyeball who opened a PR:

Building an agent that opens PRs? Register its prefix so reviewers and tooling recognize it out of the box.

Tooling for Conventional Branch

Conventional Branch can be adopted with local checks, CI validation, and agent skills:

Install the skill with:

npx skills add conventional-branch/conventional-branch --skill conventional-branch

Projects Using Conventional Branch

Roughly ordered by how widely recognized the organization is, so the list is useful to skim.

Conventional Branch

Want your project on this list? Send a pull request.

CI/CD Integration

Because the branch name already encodes its purpose, CI/CD pipelines can key their behavior off the prefix directly, without any extra metadata or configuration lookup. In GitHub Actions, that means an if: startsWith(...) condition per job:

jobs:
  test:
    if: startsWith(github.head_ref, 'feature/') || startsWith(github.head_ref, 'bugfix/')
    runs-on: ubuntu-latest
    steps:
      - run: npm test

  security-review:
    if: startsWith(github.head_ref, 'hotfix/')
    runs-on: ubuntu-latest
    steps:
      - run: ./scripts/security-scan.sh

  release-candidate:
    if: startsWith(github.head_ref, 'release/')
    runs-on: ubuntu-latest
    steps:
      - run: ./scripts/build-release-candidate.sh

A common mapping of prefixes to pipeline behavior:

Branch prefix Typical CI/CD behavior
feature/* Run the full test suite; deploy a preview environment
bugfix/* Run regression tests
hotfix/* Require a security scan or extra approval before merge
release/* Trigger the release-candidate pipeline; deploy to staging
chore/* Skip preview deployment

Other CI/CD platforms support the same pattern using their own equivalent of a branch-name condition (e.g., GitLab CI’s rules: - if:, or a shell check against $CI_COMMIT_REF_NAME). Conventional Branch only standardizes the branch name — the mapping above is a starting point to adapt to your own pipeline.

How to Adopt

  1. Communicate the convention to your team and add it to your contributing guidelines.

  2. Enforce it automatically using one of the tools listed above.

  3. Add the badge to your repository README to signal adoption:

    Conventional Branch

    [![Conventional Branch](https://conventionalbranch.org/badge.svg)](https://conventionalbranch.org/)
    

    Or in HTML:

    <a href="https://conventionalbranch.org/">
      <img alt="Conventional Branch 1.1.0" src="https://conventionalbranch.org/badge.svg">
    </a>
    

    Prefer to generate it yourself, or want a different shape? The shields.io equivalent carries the same colors and version, and takes &style=flat-square, &style=plastic or &style=for-the-badge:

    [![Conventional Branch](https://img.shields.io/badge/Conventional%20Branch-1.1.0-6699CC)](https://conventionalbranch.org/)
    
  4. Configure your CI/CD to trigger different workflows based on branch prefix (e.g., auto-deploy on release/ branches) — see CI/CD Integration above.