Uh oh!
There was an error while loading. Please reload this page.
refactor(validation): P1-P2 - Unified validators and agent branch guidance - #2302
Conversation
❌ 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. |
Warning Review limit reached
Next review available in:21 minutes 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. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (51)
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 |
140ad14 to
a22e08fCompareMissing required section(s): Linked issues, Changelog, Global DoD checklist This is a post-merge backstop for admin bypasses. Please review branch protection for develop. |
…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)
Pull request was closed
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)
0e2913f to
e3e044aCompareUh oh!
There was an error while loading. Please reload this page.
Summary
Comprehensive branch naming validation remediation: unified divergent validators, fixed post-release sync naming, and added branch guidance to all agents with pre-creation validation.
Phases Delivered:
.cjsand.js) to enforce identical strict patternchore/toops/prefixProblems Addressed
P1.1 - Validator Divergence:
.cjsvalidator enforced strict{type}/{scope}-{title}pattern.jsvalidator allowed permissive{type}/{anything}pattern with dots.js(permissive), allowing invalid branches to passrelease/v1.0.0failed.cjsbut passed.js❌P1.2 - Post-Release Sync Violation:
chore/post-release-sync-main-to-developprefixops/post-release-sync-main-to-develop✓P2 - Agent Branch Guidance Gaps:
Changes
P1.1: Unified Validators
Files:
scripts/validation/validate-branch-name.js— Updated regex to strict patternscripts/validation/__tests__/validate-branch-name.test.js— Updated tests (38/38 passing).github/workflows/branch-name-validation.yml— Changed to use.cjsvalidatorPattern Change:
P1.2: Post-Release Sync Naming
Files:
docs/ADRs/ADR-003-post-release-sync.md— Updated branch naming (lines 143, 145)docs/BRANCHING_STRATEGY.md— Updated references (lines 400, 495)docs/RELEASE_PROCESS.md— Updated naming (line 288)Change:
P2: Agent Guidance & Pre-Creation Validation
P2.1 - Agent Branch Guidance:
## Branch Namingsection to all 19 spec-based agentsP2.2 - Portable Instruction File:
instructions/branch-naming.instructions.md(8.9 KB)P2.3 - Release Agent Pre-Creation Validation:
scripts/agents/release.agent.js— Import and validate beforegit checkout -bP2.4 - 7-Layer Safety Gates:
agents/release/gates/release-gates.cjs— Gate 1 now validates release branch namesP2.5 - Agent Spec Template:
.github/agents/template.agent.md— Updated with three optionsValidation
Unit Tests
✅ 38 tests pass (validate-branch-name test suite)
Validation Test Matrix
release/v1.0.0chore/releasefeat/-dash-startfeat/my-featurerelease/v1-0-0ops/post-release-syncFiles Changed
Summary of Changes
Agent Specs (19 files):
Validation & Release (3 files):
Documentation (4 files):
Safety Gates & Templates (3 files):
Risk & Rollback
Risk Level: Low
release/v1.0.0; must userelease/v1-0-0Rollback Plan: Single clean commit per phase; easy to revert if needed
Related Issues
Checklist
Effort: ~23 hours (P1.1: 3h, P1.2: 1.5h, P2: 18.5h estimated)
Status: Ready for code review and merge