Claude Code Integration Guide

This guide provides comprehensive documentation for Claude Code integration in the Remind Tools project, including Git Flow workflows, custom commands, and development automation.

Overview

Claude Code enhances the development experience through:
  • Git Flow workflow automation
  • Intelligent code analysis and generation
  • Multi-platform development assistance
  • Automated testing and quality assurance
  • Team collaboration and documentation

Git Flow Commands

Feature Development

/gitflow-start-feature

Purpose: Initialize new feature development with complete environment setup
Usage: /gitflow-start-feature [feature-name|issue-number]
What it does:
  • Creates feature branch from develop
  • Runs melos bootstrap for package linking
  • Validates Flutter SDK and dependencies
  • Sets up VS Code workspace
  • Configures environment variables and API keys
  • Runs initial test baseline
Example:
/gitflow-start-feature user-authentication
/gitflow-start-feature 123-payment-integration

/gitflow-finish-feature

Purpose: Complete feature development with comprehensive validation
Usage: /gitflow-finish-feature [PR-title|completion-type]
What it does:
  • Runs full test suite with coverage validation
  • Executes code quality checks and linting
  • Analyzes monorepo impact across packages
  • Creates comprehensive PR with templates
  • Integrates with CI/CD for automated testing
  • Notifies team and updates documentation
Example:
/gitflow-finish-feature "Add OAuth authentication system"
/gitflow-finish-feature draft

Release Management

/gitflow-start-release

Purpose: Begin release preparation with version coordination
Usage: /gitflow-start-release [version|release-type]
What it does:
  • Creates release branch from develop
  • Coordinates version bumping with Melos
  • Updates platform-specific build configurations
  • Prepares release notes and changelogs
  • Sets up QA testing environment
  • Configures CI/CD for release builds
Example:
/gitflow-start-release 1.2.0
/gitflow-start-release minor

/gitflow-finish-release

Purpose: Complete release with production deployment
Usage: /gitflow-finish-release [deployment-type|release-notes]
What it does:
  • Merges release branch to main and develop
  • Creates version tags with semantic versioning
  • Coordinates multi-platform deployment
  • Updates documentation and release notes
  • Manages production rollout monitoring
  • Configures rollback procedures
Example:
/gitflow-finish-release production
/gitflow-finish-release "Major feature release with new UI"

Emergency Response

/gitflow-hotfix

Purpose: Handle critical production issues with emergency workflow
Usage: /gitflow-hotfix [issue-description|severity-level]
What it does:
  • Creates hotfix branch from main
  • Implements rapid fix with targeted testing
  • Coordinates emergency deployment across platforms
  • Manages incident communication
  • Provides rollback capabilities
  • Documents post-incident analysis
Example:
/gitflow-hotfix "Database connection timeout P0"
/gitflow-hotfix "Payment processing failure"

Monitoring and Status

/gitflow-status

Purpose: Monitor Git Flow state and repository health
Usage: /gitflow-status [analysis-type|branch-name]
What it does:
  • Analyzes current branch status and health
  • Reports version consistency across packages
  • Shows CI/CD pipeline status
  • Identifies merge conflicts and bottlenecks
  • Provides team activity insights
  • Suggests workflow optimizations
Example:
/gitflow-status overview
/gitflow-status branches
/gitflow-status health

Development Workflow Commands

Environment Setup

/dev-workflow

Purpose: Setup complete development environment for feature work
Usage: /dev-workflow [feature-name|issue-number|setup-type]
Enhanced for Git Flow:
  • Creates Git Flow feature branch from develop
  • Validates Git Flow configuration
  • Syncs with latest develop changes
  • Sets up branch-specific debugging
  • Configures Git Flow-aware VS Code settings

Code Quality and Commits

/smart-commit

Purpose: Advanced automatic commits with Git Flow awareness
Usage: /smart-commit
Git Flow Enhancements:
  • Detects current Git Flow branch type
  • Applies branch-specific commit rules
  • Uses appropriate emoji and scope patterns
  • Validates commit message conventions
  • Handles cross-package dependencies
Branch-Specific Behavior:
  • feature/: Normal development commits (✨ feat, 🐛 fix, ♻️ refactor)
  • release/: Bug fixes and preparation only (🐛 fix, 📚 docs, 🔖 release)
  • hotfix/: Emergency fixes only (🚑 hotfix, 🐛 fix critical)
  • develop: Integration commits (🔀 merge, 🔧 chore)
  • main: Production releases (🔖 release, 🔀 merge)

Role-Based Commands

Product Owner Commands

/create-prd

Purpose: Generate comprehensive Product Requirements Documents Git Flow Integration:
  • Links PRD to feature branches
  • Coordinates with release planning
  • Tracks feature completion status

Tech Lead Commands

/create-tasks

Purpose: Break down PRDs into development tasks Git Flow Integration:
  • Creates feature branch structure
  • Assigns tasks to team members
  • Coordinates release timeline

Senior Developer Commands

/implement-task

Purpose: Implement specific development tasks Git Flow Integration:
  • Works within current Git Flow context
  • Follows branch-specific development patterns
  • Integrates with quality gates

/debug-issue

Purpose: Systematic debugging and issue resolution Git Flow Integration:
  • Creates hotfix branches for critical issues
  • Documents resolution for knowledge base
  • Coordinates team communication

MCP Server Integration

Supabase MCP

Git Flow Enhancements:
  • Branch-specific database migrations
  • Environment coordination (develop/staging/production)
  • Schema versioning with release branches
  • Rollback procedures for hotfixes

GitHub MCP

Git Flow Enhancements:
  • Automated PR creation for feature branches
  • Release branch protection rules
  • Issue tracking with branch correlation
  • Team notification management

Dart/Flutter MCP

Git Flow Enhancements:
  • Branch-specific code analysis
  • Platform-specific testing coordination
  • Hot reload optimization for feature development
  • Performance monitoring across branches

Memory MCP

Intelligent Context Management:
  • Project architecture and pattern knowledge persistence
  • Team member preferences and expertise tracking
  • Development decision history and rationale capture
  • Workflow optimization through learned patterns
  • Automatic context loading for Git Flow operations
  • Cross-session knowledge continuity
Memory Contexts:
  • Core Memory: Project architecture, patterns, and technical decisions
  • Team Memory: Member preferences, expertise, and collaboration patterns
  • Architecture Memory: Decision evolution and pattern effectiveness tracking

Configuration Files

.claude/settings.json

Enhanced with Git Flow hooks:
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "git-flow-branch-validator --check-branch-type"
          }
        ]
      }
    ]
  }
}

CLAUDE.md

Updated project context:
  • Git Flow branch strategy documentation
  • Development patterns and conventions
  • Branching model explanation
  • Version management coordination

Best Practices

Git Flow Command Usage

  1. Always start features with /gitflow-start-feature
    • Ensures proper environment setup
    • Validates dependencies and configuration
    • Creates consistent branch structure
  2. Use /gitflow-status regularly
    • Monitor repository health
    • Identify potential issues early
    • Coordinate with team activity
  3. Complete features with /gitflow-finish-feature
    • Ensures quality gates are met
    • Creates proper documentation
    • Integrates with CI/CD pipeline

Branch-Specific Development

Feature Branches:
# Start new feature
/gitflow-start-feature payment-integration

# Regular development workflow
/smart-commit  # Automatically detects feature branch context

# Complete feature
/gitflow-finish-feature "Add Stripe payment integration"
Release Branches:
# Start release preparation
/gitflow-start-release 1.2.0

# Only bug fixes during stabilization
/smart-commit  # Applies release branch commit rules

# Complete release
/gitflow-finish-release "Release v1.2.0 with new features"
Hotfix Branches:
# Emergency response
/gitflow-hotfix "Critical payment processing failure P0"

# Rapid fix implementation
/smart-commit  # Uses hotfix commit patterns

# Emergency deployment handled automatically

Quality Gates

All Git Flow commands integrate with quality assurance:
  1. Automated Testing
    • Unit tests (80%+ coverage requirement)
    • Widget tests for UI components
    • Integration tests for workflows
    • Platform-specific testing
  2. Code Quality
    • Dart analyzer validation
    • Formatting consistency checks
    • Security audit integration
    • Performance monitoring
  3. Documentation
    • API documentation updates
    • Changelog generation
    • Release notes preparation
    • Team communication

Monitoring and Analytics

Development Metrics

Claude Code tracks key development indicators:
  • Velocity: Features completed per sprint
  • Quality: Bug escape rate and test coverage
  • Process: Time from branch creation to merge
  • Team: Individual and collective productivity

Git Flow Health

Regular monitoring includes:
  • Branch Status: Active branches and merge readiness
  • Version Consistency: Package version alignment
  • CI/CD Health: Pipeline success rates
  • Conflict Resolution: Merge conflict frequency

Troubleshooting

Common Git Flow Issues

Branch Synchronization:
# Fix out-of-sync branches
/gitflow-status branches
git checkout develop && git pull origin develop
git rebase develop
Version Conflicts:
# Coordinate package versions
melos version --dry-run
/gitflow-start-release patch  # Handles version coordination
Failed Quality Gates:
# Address test failures
melos test --verbose
melos run analyze --fix
/smart-commit  # Commits fixes with proper context

Emergency Procedures

Production Issues:
  1. Use /gitflow-hotfix immediately
  2. Follow emergency response protocols
  3. Coordinate with team communication
  4. Monitor deployment and rollback readiness
Repository Corruption:
  1. Use /gitflow-status health for assessment
  2. Coordinate with team lead for resolution
  3. Follow backup and recovery procedures
  4. Document incident for prevention

Training and Adoption

Team Onboarding

  1. Git Flow Fundamentals
    • Review /docs/development/git-flow.md
    • Practice with feature branch workflow
    • Understand release coordination
  2. Claude Code Integration
    • Learn custom command usage
    • Practice quality gate validation
    • Understand automation benefits
  3. Role-Specific Training
    • Product Owner: PRD and planning commands
    • Tech Lead: Task creation and coordination
    • Developer: Implementation and debugging

Continuous Improvement

  • Weekly Retrospectives: Review workflow effectiveness
  • Monthly Process Updates: Evolve commands based on team feedback
  • Quarterly Training: Update skills and introduce new features
This Claude Code integration ensures efficient, high-quality development while maintaining the discipline and coordination benefits of Git Flow methodology.