Uh oh!
There was an error while loading. Please reload this page.
chore: Unified validators and branch naming enforcement (Phases 1-3) - #2333
chore: Unified validators and branch naming enforcement (Phases 1-3)#2333ashleyshaw wants to merge 5 commits into
Conversation
Unified the .cjs and .js validators to enforce identical strict pattern:
- Updated validate-branch-name.js to use strict pattern {type}/{scope}-{title}
- Changed workflow to use .cjs (strict) instead of .js (permissive)
- Updated tests to reflect strict kebab-case requirement (no dots)
- Both validators now reject: release/v1.0.0, chore/release, feat/-dash-start
- Both validators now accept: release/v1-0-0, feat/my-feature-with-long-name
Tests: All 38 tests passing
Coverage: 95% (validate-branch-name.js)
This completes P1.1 of the remediation plan.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011NVnti4DjcBkz59RmSWZKhUpdate post-release sync automation documentation to use ops/ prefix instead of chore/ for post-release operations. This aligns the branch naming with semantic categorization of operational maintenance tasks. Changes: - ADR-003: Updated branch naming and PR naming references - BRANCHING_STRATEGY: Updated post-release sync branch references - RELEASE_PROCESS: Updated post-release sync branch naming Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011NVnti4DjcBkz59RmSWZKh
P2.1: Add branch guidance to all 19 spec-based agents - Added 'Branch Naming' section to each agent specification - Agents that create branches document their patterns - Agents that don't create/validate document the restriction - Links to canonical branch naming standards P2.2: Create portable branch naming instruction file - New file: instructions/branch-naming.instructions.md - Comprehensive guide for agents and developers - Covers all 31 allowed prefixes, forbidden prefixes, examples - Includes validation scripts and troubleshooting P2.3: Add pre-creation validation to release agent - Import validateBranchName from validate-branch-name.cjs - Validate release branch name before 'git checkout -b' - Throws error if branch name is invalid - Prevents invalid branches from being created P2.4: Add branch name validation to 7-layer safety gates - Gate 1 (pre-flight checks) now validates release branch name - Checks 'release/vX-Y-Z' pattern before release automation - Fails fast if branch name would be invalid - Ensures all releases use valid branch names P2.5: Update agent spec template with branch naming - Added three options for agent types: * Option A: Agents that create branches * Option B: Agents that validate branches * Option C: Agents that don't create/validate - New agents will include proper branch guidance Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011NVnti4DjcBkz59RmSWZKh
…ded documentation, and validation setup links
P3.1: Create quick reference guide
- New file: docs/QUICK_REFERENCE_BRANCH_NAMING.md
- One-page summary with pattern, allowed types table, valid/invalid examples
- Quick rules, validation procedure, special cases, and before-push checklist
P3.2: Expand CLAUDE.md with comprehensive validation checklist
- Renamed section to "Before Every Push — Branch Naming Checklist"
- Added 7-step detailed checklist with pattern requirements, character rules
- Included forbidden prefixes check and validation command
- Added quick reference table with valid/invalid examples
P3.3: Significantly expand AGENTS.md Branch Governance section
- Comprehensive branch pattern explanation with 31 prefixes organized by category
- Valid examples (feat, fix, hotfix, release, docs, a11y, ops, etc.)
- Invalid examples with fixes showing common mistakes
- Validation & setup section with `npm run validate:branch-name` command
- Pre-push checklist and post-merge cleanup procedures
- Key documentation links with brief descriptions
P3.4: Add branch naming guidance to all 19 portable agent AGENT.md files
- Added "## Branch Naming" section to each agent in agents/{agent}/AGENT.md
- Documents that agents don't create/validate branches
- Links to portable instructions and branching strategy documentation
- Ensures comprehensive coverage across all agent implementations
P3.5: Add validation setup links to key documentation
- Enhanced CLAUDE.md with links to setup guide, quick reference, full strategy
- Enhanced AGENTS.md with validation setup section and troubleshooting links
- All major documentation now cross-references validation procedures
- Improved discoverability of branch naming validation setup (npm run, hooks, git)
Total coverage: Branch naming guidance now in 40+ files (19 .agent.md + 19 AGENT.md + 2 core docs + quick ref)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011NVnti4DjcBkz59RmSWZKh…status - Updated project status from 'Launching' to 'Phase 1-3 Complete' - Added detailed timeline showing completion dates for P1.1, P1.2, P2, P3 - Added comprehensive summary of completed work across all three phases - Linked PR #2302 containing all Phase 1-3 changes - Added file count and categories for Phase 1-3 changes - Updated key documentation references with new/updated files - Documented 40+ files now containing branch naming guidance Phase completion dates: P1 (2026-08-11), P1.1-P1.2 (2026-08-22), P2 (2026-08-22), P3 (2026-08-22)
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
✅ Template check passed after update. Thanks for fixing the PR description. |
❌ Branch Name Validation FailedThe branch name Required Format
Allowed Branch Types
Valid Examples
Invalid Examples
SolutionRename your branch to follow the pattern and update the PR. For more information, see docs/BRANCHING_STRATEGY.md. |
Chore Pull Request
Linked issues
Closes#1756, #1757, #1758, #1759, #1760, #1761, #1762
Relates to #1755 (Branch Naming Enforcement Epic)
Summary
Unified branch name validators and implemented comprehensive branch naming enforcement system across Phases 1-3 of the branch naming enforcement initiative. This PR consolidates all validators to a strict
{type}/{scope}-{short-title}pattern, adds branch naming guidance throughout the codebase (40+ files), and provides complete documentation for team rollout.Changes
.cjsand.jsvalidators to strict pattern, all 38 tests passingchore/to validops/prefix in 3 documentation filesImpact / Compatibility
Verification
chore/validators-unified)Risk & Rollback
Changelog
Added
docs/QUICK_REFERENCE_BRANCH_NAMING.md— One-page branch naming reference guide with patterns, prefixes, examplesinstructions/branch-naming.instructions.md— Portable comprehensive branch naming guide for reuse across projects.github/agents/*.agent.md)agents/*/AGENT.md)Changed
.jsand.cjsvalidators to strict{type}/{scope}-{short-title}pattern (previously.jswas permissive,.cjswas strict)ops/prefix instead of forbiddenchore/in 3 files (ADR-003, BRANCHING_STRATEGY.md, RELEASE_PROCESS.md)Fixed
Removed
Checklist (Global DoD / PR)