|
| 1 | +# Immediate Action Checklist - Week 1 |
| 2 | + |
| 3 | +**Project**: Machine Dream |
| 4 | +**Priority**: CRITICAL |
| 5 | +**Timeline**: 5 business days |
| 6 | +**Goal**: Fix test failures and establish baseline quality |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## Day 1: Test Failure Analysis |
| 11 | + |
| 12 | +### Morning: Setup & Assessment |
| 13 | +- [ ] Pull latest code: `git pull origin llm_integration` |
| 14 | +- [ ] Clean install: `rm -rf node_modules && npm install` |
| 15 | +- [ ] Run full test suite: `npm test -- --run` |
| 16 | +- [ ] Document current test results: |
| 17 | + ```bash |
| 18 | + npm test -- --run > test-results-day1.txt 2>&1 |
| 19 | + ``` |
| 20 | +- [ ] Review failing tests breakdown (52 failures) |
| 21 | + |
| 22 | +### Afternoon: ProfileStorage Debug |
| 23 | +- [ ] Read ProfileStorage implementation: `src/llm/profiles/ProfileStorage.ts` |
| 24 | +- [ ] Read ProfileStorage tests: `tests/unit/profiles/ProfileStorage.test.ts` |
| 25 | +- [ ] Identify root cause of 7 failures: |
| 26 | + 1. Save and Load - profile persistence |
| 27 | + 2. Profile Retrieval - count mismatch |
| 28 | + 3. Delete Profile - incomplete deletion |
| 29 | + 4. Export/Import - import logic |
| 30 | + 5. Export/Import - overwrite logic |
| 31 | + 6. Clear All - not clearing properly |
| 32 | +- [ ] Create debugging plan for Day 2 |
| 33 | + |
| 34 | +**Deliverable**: Root cause analysis document |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +## Day 2: Fix ProfileStorage |
| 39 | + |
| 40 | +### Morning: Core Persistence Logic |
| 41 | +- [ ] Fix save/load implementation |
| 42 | +- [ ] Fix profile count tracking |
| 43 | +- [ ] Run save/load tests: `npm test -- ProfileStorage.test.ts` |
| 44 | +- [ ] Verify fixes work |
| 45 | + |
| 46 | +### Afternoon: CRUD Operations |
| 47 | +- [ ] Fix delete operation |
| 48 | +- [ ] Fix clearAll operation |
| 49 | +- [ ] Test delete operations |
| 50 | +- [ ] Test clear operations |
| 51 | +- [ ] Run all ProfileStorage tests: Should see 0/7 failures |
| 52 | + |
| 53 | +**Deliverable**: ProfileStorage tests passing |
| 54 | + |
| 55 | +--- |
| 56 | + |
| 57 | +## Day 3: Export/Import & Remaining Tests |
| 58 | + |
| 59 | +### Morning: Export/Import Fixes |
| 60 | +- [ ] Fix export logic |
| 61 | +- [ ] Fix import logic |
| 62 | +- [ ] Fix import with overwrite |
| 63 | +- [ ] Test export/import scenarios |
| 64 | +- [ ] Verify all ProfileStorage tests pass (41 tests) |
| 65 | + |
| 66 | +### Afternoon: Other Test Failures |
| 67 | +- [ ] Run full test suite: `npm test -- --run` |
| 68 | +- [ ] Identify remaining failures (should be 45 left) |
| 69 | +- [ ] Categorize by module: |
| 70 | + - [ ] CLI tests |
| 71 | + - [ ] TUI tests |
| 72 | + - [ ] Integration tests |
| 73 | + - [ ] Unit tests |
| 74 | +- [ ] Fix top 5 most critical |
| 75 | + |
| 76 | +**Deliverable**: ProfileStorage 100% + progress on other tests |
| 77 | + |
| 78 | +--- |
| 79 | + |
| 80 | +## Day 4: Test Stabilization |
| 81 | + |
| 82 | +### Full Day: Fix Remaining Failures |
| 83 | +- [ ] Fix CLI integration tests |
| 84 | +- [ ] Fix TUI integration tests |
| 85 | +- [ ] Fix unit test failures |
| 86 | +- [ ] Run test suite every hour to verify progress |
| 87 | +- [ ] Target: <10 failing tests by end of day |
| 88 | + |
| 89 | +**Deliverable**: >95% test pass rate |
| 90 | + |
| 91 | +--- |
| 92 | + |
| 93 | +## Day 5: Quality Assurance & CI Setup |
| 94 | + |
| 95 | +### Morning: Final Test Fixes |
| 96 | +- [ ] Fix last remaining test failures |
| 97 | +- [ ] Verify 100% pass rate: `npm test -- --run` |
| 98 | +- [ ] Run typecheck: `npm run typecheck` |
| 99 | +- [ ] Run lint: `npm run lint` (fix critical errors) |
| 100 | +- [ ] Document test coverage: `npm test -- --coverage` |
| 101 | + |
| 102 | +### Afternoon: CI/CD Foundation |
| 103 | +- [ ] Create `.github/workflows/ci.yml`: |
| 104 | + ```yaml |
| 105 | + name: CI |
| 106 | + on: [push, pull_request] |
| 107 | + jobs: |
| 108 | + test: |
| 109 | + runs-on: ubuntu-latest |
| 110 | + steps: |
| 111 | + - uses: actions/checkout@v3 |
| 112 | + - uses: actions/setup-node@v3 |
| 113 | + with: |
| 114 | + node-version: '20' |
| 115 | + - run: npm ci |
| 116 | + - run: npm run typecheck |
| 117 | + - run: npm test |
| 118 | + - run: npm run build |
| 119 | + ``` |
| 120 | +- [ ] Commit and push to trigger first CI run |
| 121 | +- [ ] Verify CI passes on GitHub |
| 122 | +- [ ] Enable branch protection (require CI to pass) |
| 123 | +
|
| 124 | +**Deliverable**: All tests passing + CI operational |
| 125 | +
|
| 126 | +--- |
| 127 | +
|
| 128 | +## Success Criteria |
| 129 | +
|
| 130 | +By end of Week 1, you should have: |
| 131 | +- ✅ **Zero failing tests** (272/272 passing) |
| 132 | +- ✅ **CI/CD pipeline** running on GitHub Actions |
| 133 | +- ✅ **Clean builds** (typecheck, test, build all pass) |
| 134 | +- ✅ **Documentation** of test fixes and known issues |
| 135 | +
|
| 136 | +--- |
| 137 | +
|
| 138 | +## Debugging Commands |
| 139 | +
|
| 140 | +### Run Specific Test File |
| 141 | +```bash |
| 142 | +npm test -- ProfileStorage.test.ts |
| 143 | +``` |
| 144 | + |
| 145 | +### Run Tests in Watch Mode |
| 146 | +```bash |
| 147 | +npm test # Interactive mode |
| 148 | +``` |
| 149 | + |
| 150 | +### Run Tests with Verbose Output |
| 151 | +```bash |
| 152 | +npm test -- --reporter=verbose |
| 153 | +``` |
| 154 | + |
| 155 | +### Check Test Coverage |
| 156 | +```bash |
| 157 | +npm test -- --coverage |
| 158 | +``` |
| 159 | + |
| 160 | +### Debug Single Test |
| 161 | +```bash |
| 162 | +npm test -- -t "should save and load profiles" |
| 163 | +``` |
| 164 | + |
| 165 | +### Run TypeScript Checks |
| 166 | +```bash |
| 167 | +npm run typecheck |
| 168 | +``` |
| 169 | + |
| 170 | +### Check for Type Errors in Specific File |
| 171 | +```bash |
| 172 | +npx tsc --noEmit src/llm/profiles/ProfileStorage.ts |
| 173 | +``` |
| 174 | + |
| 175 | +--- |
| 176 | + |
| 177 | +## Common Issues & Solutions |
| 178 | + |
| 179 | +### Issue: Tests fail locally but pass in CI |
| 180 | +**Solution**: Clean install |
| 181 | +```bash |
| 182 | +rm -rf node_modules package-lock.json |
| 183 | +npm install |
| 184 | +npm test |
| 185 | +``` |
| 186 | + |
| 187 | +### Issue: File permission errors |
| 188 | +**Solution**: Check file paths and permissions |
| 189 | +```bash |
| 190 | +ls -la ~/.machine-dream/ |
| 191 | +chmod 644 ~/.machine-dream/llm-profiles.json |
| 192 | +``` |
| 193 | + |
| 194 | +### Issue: Database locked errors |
| 195 | +**Solution**: Close all instances and delete test DB |
| 196 | +```bash |
| 197 | +pkill -f machine-dream |
| 198 | +rm -f .agentdb test.db |
| 199 | +npm test |
| 200 | +``` |
| 201 | + |
| 202 | +### Issue: Import/export tests fail |
| 203 | +**Solution**: Check file I/O and JSON serialization |
| 204 | +```bash |
| 205 | +# Test manually |
| 206 | +node -e " |
| 207 | + const fs = require('fs'); |
| 208 | + const data = { test: 'value' }; |
| 209 | + fs.writeFileSync('test.json', JSON.stringify(data)); |
| 210 | + const loaded = JSON.parse(fs.readFileSync('test.json', 'utf-8')); |
| 211 | + console.log(loaded); |
| 212 | +" |
| 213 | +``` |
| 214 | + |
| 215 | +--- |
| 216 | + |
| 217 | +## Daily Standup Template |
| 218 | + |
| 219 | +**Date**: _____ |
| 220 | +**Progress**: |
| 221 | +- Completed: _____ |
| 222 | +- Blocked by: _____ |
| 223 | +- Tests passing: ___/272 |
| 224 | + |
| 225 | +**Today's Focus**: |
| 226 | +- [ ] Task 1 |
| 227 | +- [ ] Task 2 |
| 228 | +- [ ] Task 3 |
| 229 | + |
| 230 | +**Blockers**: None / [describe] |
| 231 | + |
| 232 | +--- |
| 233 | + |
| 234 | +## Emergency Contacts |
| 235 | + |
| 236 | +If you get stuck: |
| 237 | +1. **Review Specifications**: `docs/specs/13-llm-profile-management.md` |
| 238 | +2. **Check Phase 4 Summary**: `docs/phase4-cli-wiring-summary.md` |
| 239 | +3. **Review Test Output**: Look for specific error messages |
| 240 | +4. **Debug Tests**: Add `console.log` to understand state |
| 241 | +5. **Isolate Issue**: Create minimal reproduction |
| 242 | + |
| 243 | +--- |
| 244 | + |
| 245 | +## Week 1 Deliverables Checklist |
| 246 | + |
| 247 | +### Testing |
| 248 | +- [ ] All 272 tests passing |
| 249 | +- [ ] Test coverage report generated |
| 250 | +- [ ] No skipped or disabled tests |
| 251 | +- [ ] Test execution < 10 seconds |
| 252 | + |
| 253 | +### Code Quality |
| 254 | +- [ ] TypeScript typecheck passes |
| 255 | +- [ ] No TypeScript errors |
| 256 | +- [ ] ESLint passes (critical errors fixed) |
| 257 | +- [ ] No console.error in test output |
| 258 | + |
| 259 | +### CI/CD |
| 260 | +- [ ] GitHub Actions workflow created |
| 261 | +- [ ] First CI run successful |
| 262 | +- [ ] Branch protection enabled |
| 263 | +- [ ] Badge added to README |
| 264 | + |
| 265 | +### Documentation |
| 266 | +- [ ] Test fixes documented |
| 267 | +- [ ] Known issues logged |
| 268 | +- [ ] Next steps identified |
| 269 | +- [ ] Week 1 summary written |
| 270 | + |
| 271 | +--- |
| 272 | + |
| 273 | +## Next Week Preview (Week 2) |
| 274 | + |
| 275 | +**Focus**: Remove mock implementations |
| 276 | + |
| 277 | +Tasks: |
| 278 | +1. Implement real memory command backend |
| 279 | +2. Implement real system command backend |
| 280 | +3. Add integration tests for new implementations |
| 281 | +4. Verify no mock data remains in production code |
| 282 | + |
| 283 | +--- |
| 284 | + |
| 285 | +## Tracking Progress |
| 286 | + |
| 287 | +### Test Pass Rate |
| 288 | +| Day | Passing | Failing | Rate | |
| 289 | +|-----|---------|---------|------| |
| 290 | +| Mon | 220 | 52 | 81% | |
| 291 | +| Tue | ___ | ___ | ___% | |
| 292 | +| Wed | ___ | ___ | ___% | |
| 293 | +| Thu | ___ | ___ | ___% | |
| 294 | +| Fri | 272 | 0 | 100% ✅ | |
| 295 | + |
| 296 | +### Time Log |
| 297 | +| Day | Hours | Focus Area | Blockers | |
| 298 | +|-----|-------|------------|----------| |
| 299 | +| Mon | ___ | Test analysis | ___ | |
| 300 | +| Tue | ___ | ProfileStorage | ___ | |
| 301 | +| Wed | ___ | Export/Import | ___ | |
| 302 | +| Thu | ___ | Other tests | ___ | |
| 303 | +| Fri | ___ | CI setup | ___ | |
| 304 | + |
| 305 | +--- |
| 306 | + |
| 307 | +**Checklist Version**: 1.0 |
| 308 | +**Created**: January 7, 2026 |
| 309 | +**Owner**: Development Team |
| 310 | +**Review**: End of each day |
0 commit comments