Skip to content

spec: Branch naming & PR strategy — comprehensive specification - #2905

Merged
ashleyshaw merged 3 commits into
developfrom
spec/branch-naming-and-pr-strategy
Sep 14, 2026
Merged

ashleyshaw merged 3 commits into
developfrom
spec/branch-naming-and-pr-strategy

Conversation

@ashleyshaw

Copy link
Copy Markdown
Member

Summary

Comprehensive specification and implementation roadmap for formalizing GitHub branch naming and PR workflows.

This PR delivers three documents detailing:

  1. BRANCH_AND_PR_STRATEGY.md (1,200+ lines)

    • 10-section complete specification
    • 24 authorized branch types with examples
    • Branch naming rules and validation framework
    • PR template routing strategy (automatic type detection)
    • Labeling integration and enforcement mechanisms
    • 6-phase implementation roadmap (58-73 hours)
    • Troubleshooting guide and decision trees
  2. QUICK_REFERENCE.md (150+ lines)

    • Developer quick lookup guide
    • Type picker table (use this... to get type...)
    • Validation checklist (before pushing)
    • Common mistakes and fixes
    • Test commands for validation
  3. README.md - Project Control Panel

    • Executive summary and current state assessment
    • Key findings on missing enforcement
    • Timeline and effort estimates (6 weeks)
    • Success criteria by phase
    • Quick links to all documentation

Problem Statement

Current State:

  • ✅ Informal branch naming rules exist (in CLAUDE.md)
  • ✅ 19 PR templates exist (varying structure)
  • ✅ Some automatic labeling in place
  • ❌ No formal specification document
  • ❌ No automated pre-merge validation
  • ❌ Inconsistent PR template routing
  • ❌ Unclear type reference for new developers

Impact:

  • Wrong PR templates applied (missed checklists)
  • Naming violations slip through (repo clutter)
  • New developers uncertain about rules
  • Wasted time fixing branches after PR open

Specification Highlights

Branch Naming Pattern

{type}/{scope}-{title}

24 Authorized Types

Primary: feat, fix, hotfix, release, refactor, chore, task, docs, test
Infrastructure: perf, ci, build, deps, security
Specialized: design, a11y, ux, i18n, ops, proto, audit, codex, research, revert

Key Rules

  • ✅ Type is lowercase, from authorized list
  • ✅ Type followed by / (slash)
  • ✅ Scope is kebab-case, specific to change
  • ✅ Title is brief, action-oriented
  • ❌ NO: claude/, copilot/, openai/ prefixes (forbidden)
  • ❌ NO: Underscores, spaces, or capitals

Examples

  • feat/user-auth-login-redesign
  • fix/pr-template-routing-bug
  • docs/branching-strategy-guide
  • claude/my-feature (forbidden prefix)
  • Feature/my-work (uppercase)
  • feat/my_work (underscore)

Implementation Timeline

Phase Weeks Focus Effort
1 1 Specification & docs 8-10h
2 2-3 Template routing 10-12h
3 3-4 Validation & enforcement 10-12h
4 4-5 Auto-labeling 8-10h
5 5-6 Team training 12-15h
6 6-7 Monitoring & refinement 8-10h
Total 6 weeks Complete system 58-73 hours

Success Criteria

  • ✅ Formal specification document approved
  • ✅ PR template routing automated
  • ✅ Branch validation deployed & blocking invalid branches
  • ✅ Auto-labeling workflow in place
  • ✅ Team trained (90%+ attendance at Q&A)
  • ✅ 95%+ compliance with naming rules
  • ✅ Weekly monitoring dashboard

Documents Location

All planning documents are in:

.github/projects/active/branch-and-pr-strategy-2026-09-12/
├── README.md (start here)
├── BRANCH_AND_PR_STRATEGY.md (comprehensive spec)
└── QUICK_REFERENCE.md (developer quick ref)

Related Projects

Related to this specification:

Epic:

  • #1271 — Changelog Automation Hardening (parent epic)

Next Steps

  1. Review — Team reviews specification and quick reference
  2. Approve — Stakeholder sign-off for Phase 2 implementation
  3. Plan — Schedule phases 2-6, assign owners
  4. Execute — Follow week-by-week roadmap starting Phase 2

🤖 Generated with Claude Code

https://claude.ai/code/session_013xVWhbLXCWKFHHWghhqTxT


Generated by Claude Code

Delivers complete assessment and strategic roadmap for changelog quality improvements:

## Audit Findings (CHANGELOG_QUALITY_AUDIT_REPORT.md - 2000+ lines)

### Current State Analysis
- CHANGELOG.md: 1,431 lines, 60+ entries in [Unreleased]
- Entry Length Crisis: 95% of entries 5-10x over 250-char guideline
- Average entry: 1,200 chars (was 250 char target)
- Quality Issues: Implementation details, verbose descriptions, formatting inconsistencies

### Automation Landscape Inventory
- Validation Systems: 7-layer safety audit, multiple scripts, CI integration
- Workflows: Active changelog-management.yml, archived safety audit with valuable patterns
- Agents & Skills: 67 agent specs, 158 canonical labels, comprehensive governance
- Documentation: CHANGELOG_AUTOMATION.md (v1.2), guidelines, checklist (500+ lines rules)

### AI Governance Review
- Agent specifications: 100% spec coverage, CI/CD integrated
- Label governance: 158 canonical labels, Phase 1-2 complete, Phase 3-4 in progress
- Workflow standardization: 54 workflows on Node.js 24, .nvmrc single source of truth
- Issue management: Enrichment system with Definition of Ready/Done templates

### Root Cause Analysis
1. No automated length enforcement (validation checks format, not length)
2. Scope creep (combining multiple features into single entries)
3. Implementation-focused writing (HOW not WHAT)
4. Unclear definition of "user-facing" (mixing infrastructure with features)

### Quality Metrics
| Metric | Current | Target | Gap |
|--------|---------|--------|-----|
| Avg entry length | 1,200 | 250 | -480% |
| Entries within limit | 5% | 95% | -90% |
| Implementation details | 60% | 5% | -55% |
| User-facing clarity | 40% | 95% | -55% |

## Phase 5 Strategic Roadmap (PHASE_5_IMPLEMENTATION_ROADMAP.md - 1000+ lines)

### Execution Timeline: 7 Weeks

**Week 1-2: Quality Audit & Refactoring (12-15 hours)**
- Audit all 60+ entries against guidelines
- Refactor into 3 batches (longest first)
- Split multi-component entries, remove implementation details
- Create quality baseline and case studies

**Week 2-3: Enforcement Hardening (8-10 hours)**
- Add length validation to validate-changelog.cjs
- Implement implementation-detail detection
- Deploy CI gate (blocks >250 char entries)
- Update PR template with quality checklist

**Week 3-4: Workflow Consolidation (10-12 hours)**
- Create unified changelog-orchestration.yml
- Migrate validation from existing workflows
- Integrate all validation layers
- Archive old workflows

**Week 4-5: Automation & Linking (10-12 hours)**
- Implement auto-link-pr-entries.cjs script
- Auto-link PRs with meta:needs-changelog label
- Test 100% accuracy
- Document usage

**Week 5-6: Metrics & Monitoring (8-10 hours)**
- Design metrics collection schema
- Create weekly reporting job
- Build dashboard (compliance trends, violations)
- Configure regression alerts

**Week 6-7: Documentation & Training (6-8 hours)**
- Update CHANGELOG_AUTOMATION.md (v2.0)
- Create troubleshooting guide
- Record 10-minute video walkthrough
- Host team Q&A session

### Success Criteria
- 95%+ entries <250 characters ✅
- 100% entries have PR links ✅
- 0 implementation details ✅
- 100% auto-linking accuracy ✅
- 99.9% workflow success rate ✅

## Project Control Panel (README.md)

Quick navigation to:
- Executive summary
- Key findings
- Phase 5 strategy overview
- Getting started guides
- Timeline & milestones
- Success criteria

## Deliverables

- 3000+ lines of comprehensive audit & planning documentation
- Week-by-week task breakdown with hours & success criteria
- Quality metrics baseline & improvement roadmap
- Risk mitigation strategies
- Execution tracking templates
- Training & documentation update plan

See .github/projects/active/changelog-audit-quality-audit-2026-09-12/ for complete documentation.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013xVWhbLXCWKFHHWghhqTxT
…oadmap

- Add BRANCH_AND_PR_STRATEGY.md (10 sections, 24 types, validation framework)
  - Complete branch naming rules and patterns
  - PR template routing strategy
  - Validation & enforcement framework
  - 6-phase implementation roadmap (58-73 hours)
  - Troubleshooting & integration guide

- Add QUICK_REFERENCE.md for developers
  - Fast type picker table
  - Validation checklist
  - Common mistakes & fixes
  - Test commands

- Add README.md project control panel
  - Executive summary & timeline
  - Key findings on current state
  - Success criteria & phases
  - Quick links to documentation

Addresses branch naming inconsistencies, template routing issues, and need
for formal specification. Includes 6-phase implementation roadmap for
deploying automated validation, template routing, and team training.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013xVWhbLXCWKFHHWghhqTxT
@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Advanced

Run ID: f0afbcd6-8fbb-4ef4-b10e-369421b71f54

📥 Commits

Reviewing files that changed from the base of the PR and between e09fe4e and b2c3844.

📒 Files selected for processing (8)
  • .github/projects/active/branch-and-pr-strategy-2026-09-12/BRANCH_AND_PR_STRATEGY.md
  • .github/projects/active/branch-and-pr-strategy-2026-09-12/IMPLEMENTATION_TASKS.md
  • .github/projects/active/branch-and-pr-strategy-2026-09-12/QUICK_REFERENCE.md
  • .github/projects/active/branch-and-pr-strategy-2026-09-12/README.md
  • .github/projects/active/changelog-audit-quality-audit-2026-09-12/CHANGELOG_QUALITY_AUDIT_REPORT.md
  • .github/projects/active/changelog-audit-quality-audit-2026-09-12/PHASE_5_IMPLEMENTATION_ROADMAP.md
  • .github/projects/active/changelog-audit-quality-audit-2026-09-12/PHASE_5_IMPLEMENTATION_TASKS.md
  • .github/projects/active/changelog-audit-quality-audit-2026-09-12/README.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- Add PHASE_5_IMPLEMENTATION_TASKS.md (1000+ lines, 43 tasks across 7 phases)
  - Week-by-week task breakdown for Changelog Quality Audit Phase 5
  - Parallelization opportunities and execution dependencies
  - Risk mitigation, success criteria, team notes
  - Effort estimate: 58-73 hours (6 weeks)

- Add IMPLEMENTATION_TASKS.md (1200+ lines, 48 tasks across 6 phases)
  - Week-by-week task breakdown for Branch Naming & PR Strategy
  - Parallelization opportunities and execution dependencies
  - Risk mitigation, success criteria, team notes
  - Effort estimate: 58-73 hours (6 weeks)

Both files use strict task format (Task ID, Parallelizable flag, file paths)
and include independent test criteria, deployment checklists, and monitoring plans.

Total: 91 implementation tasks ready for team assignment and tracking.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013xVWhbLXCWKFHHWghhqTxT
@ashleyshaw
ashleyshaw marked this pull request as ready for review September 13, 2026 05:02
@ashleyshaw ashleyshaw self-assigned this Sep 14, 2026
@ashleyshaw
ashleyshaw merged commit 10c816b into develop Sep 14, 2026
16 checks passed
@ashleyshaw
ashleyshaw deleted the spec/branch-naming-and-pr-strategy branch September 14, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants