8.0 KiB
Quick Reference - Issue #477 Fix
📋 Document Overview
| Document | Size | Purpose |
|---|---|---|
| README.md | 11.4KB | Start here - complete overview and navigation |
| IMPLEMENTATION-PLAN.md | 7.5KB | Detailed 7-phase implementation roadmap |
| TODO.md | 12.8KB | Actionable task checklist with priorities |
| TEST-SPECIFICATIONS.md | 27.4KB | Comprehensive test strategy and scenarios |
| issue-desc-477.md | 5.0KB | Original GitHub issue context |
| PLAN.md | 5.9KB | Original outline (reference) |
Total: 70KB of detailed documentation
🚀 Quick Start
Step 1: Understand the Problem (5 min)
Read the Quick Summary section in README.md:
- What's wrong
- Example of the bug
- Root cause
- Expected behavior
Step 2: Review the Solution (10 min)
Review Solution Overview in README.md:
- 5-component architecture
- How it fixes the problem
- Key files to modify
Step 3: Start Phase 1 (2 hours)
Open TODO.md and begin Phase 1: Code Analysis
- Task 1.1: Examine Install Command Entry Point
- Task 1.2: Map All Configuration Questions
- Task 1.3: Understand Current Manifest Usage
🎯 Success Criteria
The fix is complete when ALL of these are true:
- ✅ No configuration questions asked during update
- ✅ Existing settings preserved from
install-manifest.yaml - ✅ Version detection still works (shows update available)
- ✅ Files properly updated without re-asking
- ✅ All IDE configurations preserved
- ✅ All expansion packs preserved
- ✅ Backward compatible with old installations
- ✅ Graceful fallback on corrupted manifest
- ✅ Comprehensive test coverage
- ✅ Documentation updated
📦 What Gets Changed
Files to Modify (5)
tools/cli/commands/install.js- Add update detection, config loadingtools/cli/lib/config.js- Add manifest loading methodstools/cli/installers/lib/core/installer.js- Add mode detectiontools/cli/installers/lib/core/manifest.js- Add validation- All prompt functions in
tools/cli/installers/lib/- Add skipping logic
Files to Create (1-2)
tools/cli/lib/config-loader.js- New configuration loadertest/- New test files (10+ test files)
No Breaking Changes
- Backward compatible with old manifest formats
- Graceful handling of missing fields
- Safe fallback to fresh install if needed
📊 Effort Breakdown
Phase 1: Code Analysis 2 hours (understand current code)
Phase 2: Configuration Loading 3 hours (build config loader)
Phase 3: Update Detection 3 hours (add version detection)
Phase 4: Question Skipping 4 hours (skip questions on update)
Phase 5: Validation 2 hours (error handling)
Phase 6: Integration & Testing 4 hours (test and validate)
Phase 7: Documentation & Release 2 hours (docs and PR)
────────────────────────────────────
TOTAL: 20 hours
Recommended: 2-4 hour work sessions, one phase per session
🧪 Testing Strategy
| Category | Count | Time |
|---|---|---|
| Unit Tests | 12 | ~30 min |
| Integration Tests | 8 | ~45 min |
| End-to-End Scenarios | 6 | ~60 min |
| Manual Tests | 8 | ~90 min |
| TOTAL | 34 | ~3.5 hours |
All tests run automatically - just follow the test plan in TEST-SPECIFICATIONS.md
🎓 Key Concepts
Update Detection
No manifest file → FRESH INSTALL (ask all questions)
Manifest exists:
- Version changed → UPDATE (skip questions)
- Version same → REINSTALL (skip questions)
- Invalid manifest → treat as FRESH (ask all questions)
Configuration Flow
1. User runs: npx bmad-method install
2. System checks for existing manifest
3. If update/reinstall detected:
- Load previous configuration
- Skip all configuration questions
- Use cached values
4. If fresh install:
- Ask all questions
- Store answers in manifest
5. Proceed with installation
Error Handling
Error in manifest loading/validation:
1. Log warning to user
2. Treat as fresh install
3. Ask all questions
4. Create new manifest
5. Never corrupt existing manifest
🔗 File Dependencies
Phase 1: Analysis (standalone)
↓
Phase 2: Config Loading (depends on Phase 1)
↓
Phase 3: Update Detection (depends on Phase 2)
↓
Phase 4: Question Skipping (depends on Phase 3)
↓
Phase 5: Validation (depends on Phase 2)
↓
Phase 6: Testing (depends on Phase 4 & 5)
↓
Phase 7: Documentation (depends on Phase 6)
Critical Path: 1→2→3→4→6→7
💡 Pro Tips
Before Starting
- Read README.md completely (15 minutes)
- Skim IMPLEMENTATION-PLAN.md (10 minutes)
- Skim TEST-SPECIFICATIONS.md (5 minutes)
- Understand the 5-component solution
During Implementation
- Follow TODO.md checklist strictly
- Check off items as completed
- Create tests BEFORE implementing (TDD)
- Commit after each phase
- Run tests frequently
After Each Phase
- Run unit tests:
npm test -- test/unit/ --verbose - Review code for clarity
- Add comments explaining logic
- Commit with phase number:
git commit -m "feat(#477): Phase X - Name"
Before PR
- All tests pass locally
- No console logs or debug code
- Documentation updated
- Backward compatibility verified
- Manual testing completed
🛠 Useful Commands
# Check current branch
git branch --show-current
# View status
git status
# View specific file changes
git diff tools/cli/commands/install.js
# Run all tests
npm test
# Run unit tests only
npm test -- test/unit/ --verbose
# Run integration tests only
npm test -- test/integration/ --verbose
# Create a commit for current phase
git commit -m "feat(#477): Phase X - [phase-name]"
# Push to remote
git push origin fix/477-installer-update-config
# View TODO checklist
cat ".patch/477/TODO.md" | grep "^\- \[ \]" | wc -l
📍 Current Status
✅ Planning Complete
- All documentation created
- Solution architected
- Test strategy defined
- Task list ready
⏳ Next: Phase 1 - Code Analysis
- Open TODO.md
- Start at Task 1.1
- Estimate: 2 hours
⏭ After Phase 1: Phase 2 - Configuration Loading (3 hours)
⚠️ Important Notes
- Stay in Branch: All work must be in
fix/477-installer-update-config - Test First: Create tests before implementing (TDD approach)
- No Breaking Changes: Must be backward compatible
- Graceful Fallback: Never fail silently, always provide options
- Comprehensive Testing: 34 test scenarios - don't skip any
- Documentation: Update README and add code comments
🎯 Definition of Done
A phase is "done" when:
- All tasks marked complete in TODO.md
- Code written and committed
- All tests passing (unit, integration, or e2e as applicable)
- No console errors or warnings
- Code reviewed for quality
- Documentation updated
- Next phase ready to start
📞 Troubleshooting
Can't find manifest file?
See: TEST-SPECIFICATIONS.md → Test Fixtures Setup
Not sure what to test?
See: TEST-SPECIFICATIONS.md → Specific Test Suite
Need implementation details?
See: IMPLEMENTATION-PLAN.md → Specific Phase
Need context on the issue?
See: issue-desc-477.md or README.md → Problem Statement
Unsure about architecture?
See: README.md → Solution Overview
🚀 Ready to Start?
- Open TODO.md
- Go to Phase 1, Task 1.1
- Follow the checklist
- Mark items ✓ as completed
- Commit frequently
- Refer back to these docs as needed
Estimated Completion: 20 hours Start Time: Now Good Luck! 🎉