Branch Isolation Strategy
Confiance : high
branch-isolationrisk-managementhackathon-developmentgit-workflowdemo-safetyhigh-risk-featuresfallback-strategyparallel-developmenttime-boxingfeature-flags
Development approach that isolates high-risk feature development in separate branches while maintaining a stable demo path. Essential for time-constrained environments like hackathons where innovation must be balanced with demo reliability.
Core Principles
Risk Segregation
- Stable branch: Working demo remains untouched and deployable
- Innovation branch: High-risk features developed in isolation
- Clear fallback: Predetermined decision point for branch selection
- No contamination: Experimental code never touches stable path
Time-Boxing Strategy
# Setup: Create isolated development branch
git checkout stable-demo-branch
git pull
git checkout -b experimental-feature-branch
# Development: All experimental commits go here
git add experimental-files
git commit -m "High-risk feature implementation"
git push origin experimental-feature-branch
# Decision point: Ship experimental or fall back to stable
if experimental_ready_for_demo:
git checkout experimental-feature-branch
else:
git checkout stable-demo-branch
Hackathon Application
Example: Wake-Word Detection Implementation
Context: 6 hours until judging, replacing push-to-talk with always-on voice activation
Branch Strategy:
feat/clicky-fork: Working push-to-talk demo (stable)feat/wakeword-realtime: Wake-word detection (experimental)- Decision criteria: If wake-word ships working, use it; otherwise demo with push-to-talk
Risk Assessment Points:
- 2 hours in: Core pipeline compiling?
- 4 hours in: Basic wake-word detection working?
- 5 hours in: Integration with existing UI stable?
- Final hour: Polish vs. fallback decision
Implementation Pattern
// Stable branch: Known working implementation
class CompanionManager {
func startRecordingFromShortcut() {
// Proven push-to-talk flow
dictationManager.startRecording()
}
}
// Experimental branch: New feature with fallback hooks
class CompanionManager {
private var wakeWordDetector: WakeWordDetector?
func initializeWakeWordIfAvailable() {
do {
wakeWordDetector = try WakeWordDetector()
wakeWordDetector?.onWakeWordDetected = { [weak self] in
// Same flow as shortcut, different trigger
self?.startRecordingFromShortcut()
}
} catch {
// Graceful degradation to shortcut-only mode
print("Wake-word unavailable, using shortcut only")
}
}
}
Feature Flag Integration
Runtime Branch Selection