Skip to content

Home Information - Your home, your data, organized.

Python

Document multi-phase implementation strategy for complex issues (#70)

cassandra-ai-agent85c7f05f842f
diff --git a/docs/CLAUDE.md b/docs/CLAUDE.md
index e38b1aa7..4da333ba 100644
--- a/docs/CLAUDE.md
+++ b/docs/CLAUDE.md
@@ -32,6 +32,15 @@ When working on GitHub issues, follow this development workflow:
- The proposed changes have significant architectural implications
- Otherwise, proceed directly to implementation
+3.5. **For Complex Issues - Apply Multi-Phase Strategy** (when applicable):
+ - If issue involves multiple aspects, significant trade-offs, or substantial complexity, apply the multi-phase methodology from [Guidelines.md](dev/Guidelines.md#complex-issue-implementation-strategy)
+ - Post phase breakdown to GitHub issue before starting implementation
+ - Complete Phase 1 fully, commit and push (but don't create PR yet)
+ - Update TodoWrite tool with phase completion status
+ - Stop and report Phase 1 completion with summary
+ - Wait for human feedback before proceeding to subsequent phases
+ - Only create PR when all phases complete or explicitly requested
+
4. **Development environment check** - The virtual environment and necessary environment variables should be set before starting claude. If there is no virtual environment, this is an indication that the environment has not been properly set up. That means the unit test cannot run and code changes cannot be validated. We shoudl stop the process and fix it. There is no need to check ever time since this shoudl be rare, but if running tests is failing, that is a good thing to look for.
5. **Create a dev branch off the staging branch** - Use proper naming convention:
diff --git a/docs/dev/Guidelines.md b/docs/dev/Guidelines.md
index 9768431a..76ed3d69 100644
--- a/docs/dev/Guidelines.md
+++ b/docs/dev/Guidelines.md
@@ -151,6 +151,49 @@ def simple_function():
See [Testing Guidelines](Testing.md) for comprehensive testing patterns, conventions, and best practices.
+## Complex Issue Implementation Strategy
+
+When tackling issues that involve multiple aspects, trade-offs, or significant complexity, use this proven multi-phase approach:
+
+### Core Methodology
+
+1. **Analyze and Break Down**: Identify distinct phases or approaches
+ - Phase 1: Simple, reliable solution that fully addresses the core issue
+ - Phase 2+: Advanced optimizations, UX improvements, or edge cases
+
+2. **Implement Incrementally**: Complete phases sequentially
+ - Complete Phase 1 first - ensure the bug/issue is FULLY RESOLVED
+ - Commit and push Phase 1 (but do not create PR yet)
+ - Validate approach before proceeding to optimizations
+ - Wait for feedback before proceeding to Phase 2
+
+3. **Communication and Review**: Natural checkpoints for feedback
+ - Post investigation findings and phase breakdown to GitHub issue
+ - After each phase, update issue with implementation details
+ - Only create PR when all phases are complete or explicitly requested
+ - Enable course correction if needed
+
+4. **Benefits of This Approach**:
+ - Allows for early validation of approach
+ - Enables course correction if needed
+ - Provides natural checkpoints for review
+ - Ensures core functionality before optimizations
+ - Independent value delivery per phase
+
+### Key Principles
+
+1. **Always solve the core issue first** - Phase 1 must fully resolve the bug
+2. **Incremental value delivery** - Each phase should be independently valuable
+3. **Natural stopping points** - Complete phases are good moments for review
+4. **No PR until complete** - Unless explicitly asked, wait until all phases done
+
+### Case Study: Issue #30 - EntityType Icon Updates
+
+- **Phase 1**: Simple page refresh on EntityType change (reliable, addresses core issue)
+- **Phase 2**: Smart transitions with database management (UX optimization)
+
+This strategy proved highly effective by providing early validation of the approach, allowing for feedback before complex optimizations, ensuring the core bug was fixed before adding enhancements, and creating natural checkpoints for code review.
+
## Commit Messages
See [Workflow Guidelines](Workflow.md) for commit message standards and branching conventions.