Complete knowledge base and workflow documentation with comprehensive recovery procedures

This commit is contained in:
2025-06-13 10:15:39 +02:00
parent 82fb557041
commit 70837a45fc
4 changed files with 461 additions and 738 deletions

View File

@@ -1,224 +1,154 @@
# Daily Development Workflow
# Daily Development Routine
## Morning Routine (5 minutes)
## Session Start Routine (2-3 minutes)
### Session Startup Checklist
- [ ] Pull latest changes from both repositories
- [ ] Review yesterday's session end notes
- [ ] Check current sprint priorities
- [ ] Open development environment (browser, devtools, editor)
- [ ] Quick game test to confirm current state
### Session Start Prompt
Use this prompt in Claude Projects to begin each session:
### 1. Environment Setup
```bash
# Open development environment
code neural-nexus-game/ # or your preferred editor
open http://localhost:8000 # if using local server
```
### 2. Context Refresh
Use the session start prompt:
```
Neural Nexus development check-in:
**SESSION FOCUS:**
- What game feature are we working on today?
- Any performance issues or player feedback from last session?
- Which devices should we test the latest changes on?
- Priority focus: gameplay mechanics, visual polish, or technical optimization?
**QUICK STATUS:**
- Current build status and any blockers?
- Recent player testing feedback or observations?
- Performance metrics from last session?
**TODAY'S GOALS:**
- Primary objective for this session?
- Secondary tasks if time permits?
- Any experimental features to explore?
Keep response concise and action-oriented to start productive development.
```
### 3. Quick System Check
- [ ] Game loads without errors
- [ ] Core mechanics working (try connecting a few nodes)
- [ ] No obvious visual glitches
- [ ] Performance feels smooth (check browser DevTools if needed)
## During Development
### Code Quality Habits
- **Test Early, Test Often**: Check changes on multiple devices every 30 minutes
- **Small Commits**: Commit working features individually with clear messages
- **Performance Monitoring**: Watch frame rate in DevTools during development
- **User Experience**: Consider player perspective with every change
### Focus Techniques
- **Pomodoro Method**: 25-minute focused work sessions
- **Single Feature Focus**: Complete one feature before starting another
- **Test Early, Test Often**: Check changes on target devices frequently
- **Document Decisions**: Note why you chose specific approaches
### Documentation While Coding
- **Decision Tracking**: Note why you chose specific approaches
- **Pattern Recording**: Document reusable code patterns in knowledge base
- **Issue Logging**: Record any bugs or odd behaviors for later investigation
- **Performance Notes**: Track frame rate impacts of new features
### Testing Workflow
```bash
# After each significant change:
1. Test on desktop browser
2. Test on mobile device (if applicable)
3. Check performance (F12 -> Performance tab)
4. Verify no console errors
```
## End of Session (5 minutes - CRITICAL)
### Version Control Habits
```bash
# Commit frequently with clear messages
git add .
git commit -m "feat: add audio system with 5 core sound effects"
### Session End Prompt
**NEVER skip this step** - Use the session end prompt from templates:
# Push at natural breakpoints
git push origin main
```
## Session End Routine (5 minutes)
### 1. Save Everything
- Save all open files
- Commit current changes (even if incomplete)
- Push to remote repository
### 2. Session Consolidation
**CRITICAL**: Always use the session end prompt:
```
Neural Nexus session wrap-up:
**ACCOMPLISHED TODAY:**
- [Specific features implemented or bugs fixed]
- [Performance improvements or optimizations made]
- [User experience enhancements added]
**GAME DESIGN DECISIONS:**
- [Difficulty balancing choices and reasoning]
- [Visual or audio design decisions made]
- [Technical architecture choices and trade-offs]
- [Choices made and reasoning]
**NEXT SESSION PRIORITY:**
- [Most important game feature or improvement to work on]
- [Specific technical goal or gameplay element]
- [Most important task]
**GAME HEALTH:** [Green/Yellow/Red]
- Performance: [60fps achieved/needs optimization/concerning issues]
- Fun factor: [highly engaging/needs refinement/major issues]
- Technical debt: [clean code/manageable/needs refactoring]
- Performance: [status]
- Fun factor: [assessment]
- Technical debt: [level]
**TESTING NOTES:**
- [Devices and browsers tested on]
- [Player feedback or usability observations]
- [Performance metrics and frame rate data]
**KNOWLEDGE BASE UPDATES NEEDED:**
- [New patterns or techniques to document]
- [Design decisions to capture]
- [Performance findings to record]
- [Devices tested, feedback received]
```
### Post-Session Tasks
- [ ] Commit all changes with descriptive messages
- [ ] Update feature roadmap if priorities shifted
- [ ] Add any new patterns to knowledge base
- [ ] Test final state on at least 2 different devices
- [ ] Push changes to repository
### 3. Environment Cleanup
- Close unnecessary browser tabs
- Stop local development servers
- Clear desktop clutter
- Update task tracking (if used)
## Weekly Routine (Fridays, 15 minutes)
## Weekly Routines
### Weekly Review Process
1. **Run weekly review prompt** (see templates/weekly-review-prompt.md)
2. **Update project documentation** based on week's learnings
3. **Assess roadmap progress** and adjust if needed
4. **Archive completed features** and plan next week
5. **Clean up knowledge base** - remove outdated information
### Friday: Weekly Review
- Run comprehensive weekly review prompt
- Update knowledge base with new discoveries
- Plan next week's priorities
- Archive completed session logs
### Git Maintenance
```bash
# Weekly repository maintenance
git fetch origin
git status
git log --oneline --since="1 week ago"
### Sunday: Week Prep
- Review roadmap and current priorities
- Set up development environment for Monday
- Clear any accumulated technical or organizational debt
# Tag weekly milestones
git tag -a week-$(date +%Y%m%d) -m "Weekly milestone: [summary of accomplishments]"
git push --tags
# Clean up branches if using feature branches
git branch --merged | grep -v main | xargs -n 1 git branch -d
```
## Emergency Procedures
### When Things Go Wrong
#### Game Broken After Changes
1. **Don't panic** - check browser console for errors
2. **Revert last commit** if needed: `git reset --hard HEAD~1`
3. **Use browser DevTools** to debug step by step
4. **Test in incognito mode** to rule out cache issues
5. **Ask Claude for help** with specific error messages
#### Lost Context in Claude Project
1. **Use emergency recovery prompt** from templates
2. **Re-upload key documentation** from knowledge base
3. **Run project status reconstruction**
4. **Continue with current session goals**
#### Performance Suddenly Degraded
1. **Profile in browser DevTools** to identify bottleneck
2. **Check recent commits** for performance-impacting changes
3. **Test on different devices** to isolate issue
4. **Use performance monitoring** tools from knowledge base
## Productivity Tips
### Focus Techniques
- **Pomodoro Method**: 25 min focused work, 5 min break
- **Feature Boxing**: Complete one small feature before starting another
- **Device Rotation**: Test on different devices throughout day
- **Player Perspective**: Regularly play your own game as a user
### Avoiding Common Pitfalls
- **Feature Creep**: Stick to current sprint goals
- **Perfect Code Syndrome**: Prototype first, optimize later
- **Testing Neglect**: Test immediately after each change
- **Documentation Debt**: Update docs as you code, not later
## Best Practices
### Energy Management
- **Morning**: Complex features and architecture decisions
- **Afternoon**: Testing, optimization, and polish
- **Evening**: Documentation and planning
- **When Tired**: Testing on devices, organizing knowledge base
- **Peak Hours**: Schedule complex work during your most alert time
- **Break Frequency**: Take 5-10 minute breaks every hour
- **Context Switching**: Minimize task switching within sessions
- **Deep Work**: Block distractions during focused development time
## Success Metrics
### Quality Control
- **Performance First**: Always check frame rate after changes
- **Cross-Platform**: Test on different devices and browsers
- **User Perspective**: Regularly play the game as a user would
- **Code Review**: Self-review code before committing
### Daily Success Indicators
- ✅ Clear progress on current sprint goal
- ✅ No performance regressions introduced
- ✅ All changes tested on mobile and desktop
- ✅ Session properly documented and consolidated
- ✅ Next session has clear starting point
### Motivation Maintenance
- **Visible Progress**: Keep a list of completed features
- **Share Updates**: Show progress to friends or online communities
- **Celebrate Wins**: Acknowledge when features work well
- **Learn from Setbacks**: Document what doesn't work and why
### Weekly Success Indicators
- ✅ Sprint goals on track or completed
- ✅ Technical debt managed (not growing)
- ✅ Knowledge base updated with new learnings
- ✅ Performance targets maintained
- ✅ Player experience improving measurably
## Red Flags
### Warning Signs
- 🚨 Repeating same tasks (may indicate unclear goals)
- 🚨 Frame rate declining (performance debt accumulating)
- 🚨 Unclear next steps (need better planning)
- 🚨 Skipping session consolidation (context will be lost)
- 🚨 Not testing on devices (mobile issues building up)
If you notice these patterns, take corrective action:
## Tools and Setup
- 🚨 **Skipping session end consolidation** → Context will be lost
- 🚨 **Working on multiple features simultaneously** → Focus on one
- 🚨 **Ignoring performance impacts** → Technical debt accumulates
- 🚨 **Not testing on target devices** → User experience suffers
- 🚨 **Unclear about next priorities** → Run weekly review
### Essential Browser DevTools
- **Console**: Error monitoring and debug logging
- **Performance**: Frame rate and memory profiling
- **Network**: Asset loading analysis
- **Device Toolbar**: Mobile testing and responsive design
- **Lighthouse**: Performance auditing
## Troubleshooting
### Development Environment
```bash
# Essential tools for productive development
brew install --cask google-chrome # Primary testing browser
brew install --cask firefox # Cross-browser testing
brew install python # Local server (python -m http.server)
brew install git # Version control
### Lost Motivation
- Review completed features list
- Play the game and appreciate what works
- Read positive user feedback (if available)
- Set smaller, achievable goals
# Optional but recommended
brew install --cask visual-studio-code # Code editor
brew install node # For future build tools
```
### Technical Confusion
- Return to last working state
- Break problem into smaller pieces
- Search for similar solutions online
- Ask for help in development communities
### Git Workflow
```bash
# Daily workflow
git status # Check current state
git add . # Stage changes
git commit -m "feat: add X" # Commit with clear message
git push origin main # Push to repository
### Time Management Issues
- Track actual time spent on different activities
- Identify and eliminate time wasters
- Set realistic daily goals
- Use time-boxing techniques
# Branch workflow (for larger features)
git checkout -b feature/audio-system
# ... work on feature ...
git checkout main
git merge feature/audio-system
git branch -d feature/audio-system
```
Remember: Consistency in daily workflow creates compound improvements over time. The small overhead of proper documentation and testing pays huge dividends in development velocity and code quality.
Remember: Consistency beats intensity. Regular small progress is better than sporadic large efforts.