V2.1 Development Branch Workflow

Created: 2025-10-15 Purpose: Safe development workflow for V2.1 behavioral enhancements


🌲 Branch Structure

main (production)
β”œβ”€β”€ v2.0-stable (tag) ← Emergency rollback point
└── v2.1-development (branch) ← Active development

πŸ“‹ Current State

Branches

  • main: Production-ready code (v2.0 with GitHub Pages fixes)
  • v2.1-development: V2.1 enhancements workspace

Tags

  • v2.0-stable: Stable release before V2.1 development
    • GitHub Pages UI complete
    • CSS loading fixed
    • Logo positioned correctly
    • All documentation updated

πŸ”„ Development Workflow

1. Daily Development

# Always work in v2.1-development branch
git checkout v2.1-development

# Make changes, commit frequently
git add .
git commit -m "Description of changes"
git push origin v2.1-development

2. Testing Phase

# Test thoroughly in v2.1-development
# Verify:
# - Token usage remains efficient
# - No context duplication
# - All v1.0 features still work
# - New v2.1 features work correctly

3. Merge to Main (When Ready)

# Switch to main
git checkout main

# Pull latest (if any changes)
git pull origin main

# Merge development branch
git merge v2.1-development

# Push to main
git push origin main

# Create release tag
git tag -a v2.1.0 -m "V2.1 Release - Behavioral Enhancements"
git push origin v2.1.0

4. Emergency Rollback (If Needed)

# If something goes wrong in main:
git checkout main
git reset --hard v2.0-stable
git push origin main --force

# Then fix issues in v2.1-development and retry

βœ… Commit Guidelines

Good Commit Messages

βœ… β€œAdd pre-response-protocol pattern to .claude/patterns/” βœ… β€œCreate behavior profiles: default, backend-focused, frontend-focused” βœ… β€œImplement silent metrics tracking system” βœ… β€œUpdate CLAUDE.md to reference pattern library”

Bad Commit Messages

❌ β€œUpdates” ❌ β€œFix stuff” ❌ β€œWIP” ❌ β€œTest”


πŸ” Safety Checks Before Merge

Pre-Merge Checklist

  • All tests passing
  • Token usage < 1KB increase
  • No context duplication
  • Backward compatible with v1.0
  • Documentation updated
  • CHANGELOG.md updated
  • No β€œPrompt too long” errors
  • GitHub Pages still works

πŸ“Š V2.1 Development Phases

Week 1: Pattern Library

  • Create .claude/patterns/ folder
  • Extract 6 core patterns from CLAUDE.md
  • Write concise pattern docs
  • Update CLAUDE.md to reference patterns
  • Test: Confirm zero token increase

Week 2: Behavior Profiles

  • Create .claude/profiles/ folder
  • Build 3 profiles (default, backend, frontend)
  • Add profile selection mechanism
  • Test: Measure token impact (< 1KB)

Week 3: Smart Metrics

  • Create silent tracking system
  • Add quality score to status footer
  • Implement banned question counter
  • Test: Verify minimal display impact

Week 4: Documentation & Release

  • Write BEHAVIORAL_PATTERNS_LIBRARY.md
  • Write CONTEXT_EFFICIENCY_GUIDE.md
  • Update README.md
  • Final testing
  • Merge to main
  • Create v2.1.0 release

🚨 Important Notes

Never Commit Directly to Main

  • Always work in v2.1-development
  • Only merge when tested and stable
  • Use PRs for review if working with team

Keep v2.0-stable Tag

  • Do NOT delete v2.0-stable tag
  • It’s our emergency rollback point
  • Only delete after v2.1 is proven stable

Branch Naming for Features (Optional)

# If working on specific features:
git checkout -b feature/pattern-library
git checkout -b feature/behavior-profiles
git checkout -b feature/smart-metrics

# Then merge to v2.1-development:
git checkout v2.1-development
git merge feature/pattern-library

πŸ“ Changelog Updates

Format

## [2.1.0] - 2025-10-XX - Behavioral Enhancements

### Added
- Pattern library system in .claude/patterns/
- Behavior profiles (default, backend-focused, frontend-focused)
- Quality score tracking in status footer
- Silent metrics system

### Changed
- CLAUDE.md now references pattern library
- Profile selection at session start

### Maintained
- All v1.0 features unchanged
- Token efficiency preserved
- Zero context duplication

🎯 Success Criteria

Ready to Merge When:

  1. βœ… All v2.1 features implemented
  2. βœ… Token usage increase < 1KB
  3. βœ… All v1.0 functionality preserved
  4. βœ… Documentation complete
  5. βœ… No performance regressions
  6. βœ… User testing successful

πŸ”„ Current Status

Branch: v2.1-development Status: Just created, ready for development Next: Start Week 1 - Pattern Library extraction


Remember: The goal is safe, incremental development with easy rollback if needed!