# v0.1.16 Sprint Checklist

**Start Date**: Week of Feb 17, 2026
**Target Release**: Week of Mar 10, 2026
**Total Duration**: 4 weeks
**Total Effort**: 44-70 hours

---

## 🚀 Week 1 Checklist (Feb 17-23)

### Quick Wins - Start Here

- [ ] **B2: Test Triage** (4-6h)
  - [ ] Audit all `#[ignore]` tests (currently 3 found)
  - [ ] Categorize: fixable / needs-infra / obsolete / intentionally-slow
  - [ ] Fix transient test failures
  - [ ] Remove obsolete tests
  - [x] Add `// REASON:` comments to intentionally ignored tests
  - [ ] Target: ≤10 ignored tests
  - [ ] Run `cargo test --all` to verify
  - [ ] Update ROADMAP_ACTIVE.md

- [ ] **B3: dead_code Cleanup** (3-5h)
  - [ ] Find all `#[allow(dead_code)]` annotations (currently 951 found)
  - [ ] Audit each annotation: is code actually used?
  - [ ] Check feature flags for conditional usage
  - [ ] Remove truly dead code (functions, structs, fields)
  - [ ] Replace `#[allow(dead_code)]` with `#[cfg(feature = "...")]` where appropriate
  - [ ] Target: ≤40 annotations remaining
  - [ ] Run `cargo build --all-features` to verify
  - [ ] Run `cargo clippy --all -- -D warnings`
  - [ ] Update ROADMAP_ACTIVE.md

### Code Quality - Start in Parallel

- [ ] **B1: Error Handling Audit** (8-12h) - Start with do-memory-core
  - [ ] Count all `unwrap()` and `.expect()` calls by crate
  - [ ] Prioritize: public API > internal logic > CLI
  - [ ] Start with `do-memory-core` crate (smallest surface area)
  - [ ] Introduce `thiserror::Error` enums per crate
  - [ ] Replace unwraps with `?` or proper error handling
  - [ ] Target: Reduce by 50% (≤280 remaining)
  - [ ] Add unit tests for new error paths
  - [ ] Run `cargo test -p do-memory-core`
  - [ ] Run `cargo clippy -p do-memory-core -- -D warnings`

### Week 1 Success Criteria

- [ ] B2 complete: ≤10 ignored tests
- [ ] B3 complete: ≤40 `#[allow(dead_code)]` annotations
- [ ] B1 30% complete: `do-memory-core` crate improved
- [ ] All CI checks passing
- [ ] Weekly progress update to team

---

## 📦 Week 2 Checklist (Feb 24-Mar 2)

### Code Quality - Complete

- [ ] **B1: Error Handling Audit** (Complete) (4-6h remaining)
  - [ ] Continue with `do-memory-storage-turso` crate
  - [ ] Continue with `do-memory-storage-redb` crate
  - [ ] Continue with `do-memory-mcp` crate
  - [ ] Continue with `do-memory-cli` crate
  - [ ] Total ≤280 `unwrap()` calls remaining
  - [ ] All crates pass `cargo clippy --all -- -D warnings`
  - [ ] All tests passing: `cargo test --all`
  - [ ] Update ROADMAP_ACTIVE.md

### Feature Work - Start After B1

- [ ] **C2: Embeddings CLI/MCP Integration** (8-12h)
  - [ ] Design CLI subcommands:
    - [ ] `memory embed <text>` - Generate embedding
    - [ ] `memory embed-search <query>` - Semantic search
    - [ ] `memory embed-status` - Provider status
  - [ ] Implement CLI commands in `do-memory-cli/src/commands/`
  - [ ] Add MCP tools:
    - [ ] `generate_embedding` - Generate embedding
    - [ ] `search_by_embedding` - Semantic search
    - [ ] `embedding_provider_status` - Health check
  - [ ] Add integration tests for all providers (OpenAI, Cohere, Ollama, local)
  - [ ] Test with real API keys (OpenAI, Cohere)
  - [ ] Test with local models (Ollama, local embeddings)
  - [ ] Update documentation with examples
  - [ ] Run `cargo test -p do-memory-cli`
  - [ ] Run `cargo test -p do-memory-mcp`

- [ ] **C1: Batch Module** (Start) (3-5h)
  - [ ] Audit existing batch code in `do-memory-mcp/src/server/tools/batch.rs`
  - [ ] Remove `jsonrpsee` dependency
  - [ ] Design native JSON-RPC architecture
  - [ ] Plan error handling strategy (using B1 improvements)

### Week 2 Success Criteria

- [ ] B1 complete: ≤280 `unwrap()` calls in production code
- [ ] C2 complete: All embeddings CLI/MCP tools functional
- [ ] C1 50% complete: Architecture designed
- [ ] All CI checks passing
- [ ] Weekly progress update to team

---

## ⚙️ Week 3 Checklist (Mar 3-9)

### Feature Work - Complete

- [ ] **C1: Batch Module** (Complete) (3-5h remaining)
  - [ ] Implement batch operations with native JSON-RPC
  - [ ] Add proper error handling
  - [ ] Implement fan-out to individual tool handlers
  - [ ] Add batch result collection
  - [ ] Add unit tests for batch operations
  - [ ] Add integration tests with 1000+ episodes
  - [ ] Validate performance <100ms per batch
  - [ ] Update ROADMAP_ACTIVE.md

### Advanced Features - Start After C1

- [ ] **D1: Pattern Validation** (Start) (6-10h)
  - [ ] Review DBSCAN implementation:
    - [ ] `do-memory-core/src/patterns/dbscan/algorithms.rs`
    - [ ] `do-memory-core/src/patterns/dbscan/detector.rs`
    - [ ] `do-memory-core/src/patterns/dbscan/types.rs`
  - [ ] Review BOCPD implementation:
    - [ ] `do-memory-core/src/patterns/changepoint/algorithms.rs`
    - [ ] `do-memory-core/src/patterns/changepoint/detector.rs`
    - [ ] `do-memory-core/src/patterns/changepoint/types.rs`
  - [ ] Validate DBSCAN produces meaningful clusters:
    - [ ] Run on 10,000+ episodes
    - [ ] Verify cluster quality
    - [ ] Check performance <100ms
  - [ ] Validate BOCPD detects changepoints:
    - [ ] Run on pattern metrics time series
    - [ ] Verify changepoint accuracy
    - [ ] Check performance is acceptable

### Week 3 Success Criteria

- [ ] C1 complete: Batch module operational
- [ ] D1 50% complete: Algorithms validated
- [ ] All CI checks passing
- [ ] Weekly progress update to team

---

## 🎯 Week 4 Checklist (Mar 10-16)

### Advanced Features - Complete

- [ ] **D1: Pattern Validation** (Complete) (6-10h remaining)
  - [ ] Wire DBSCAN into episode completion workflow
  - [ ] Wire BOCPD into monitoring pipeline
  - [ ] Add CLI tools for pattern analysis:
    - [ ] `memory pattern detect-anomalies` - DBSCAN
    - [ ] `memory pattern detect-changepoints` - BOCPD
  - [ ] Add MCP tools for pattern analysis
  - [ ] Add integration tests for both algorithms
  - [ ] Benchmark performance with large datasets
  - [ ] Validate memory usage is acceptable
  - [ ] Update documentation with usage examples

### Release Preparation

- [ ] **Documentation** (2-3h)
  - [ ] Update CHANGELOG.md with v0.1.16 changes
  - [ ] Update ROADMAP_ACTIVE.md with completion status
  - [ ] Update README.md if needed
  - [ ] Create release notes

- [ ] **Quality Checks** (1-2h)
  - [ ] Run `./scripts/quality-gates.sh`
  - [ ] Run `cargo test --all`
  - [ ] Run `cargo clippy --all -- -D warnings`
  - [ ] Run `cargo fmt --all -- --check`
  - [ ] Verify all CI checks passing (including nightly)

- [ ] **Release** (1h)
  - [ ] Create git tag: `git tag v0.1.16`
  - [ ] Push tag: `git push origin v0.1.16`
  - [ ] Create GitHub release with notes
  - [ ] Update project status documentation

### Week 4 Success Criteria

- [ ] D1 complete: DBSCAN + BOCPD deployed and tested
- [ ] All documentation updated
- [ ] All CI checks passing
- [ ] v0.1.16 release created
- [ ] Final sprint retrospective

---

## 📊 Overall Success Criteria

### Phase B: Code Quality

- [ ] B1: ≤280 `unwrap()` + `expect()` calls (down from 561)
- [ ] B2: ≤10 `#[ignore]` tests (down from 3)
- [ ] B3: ≤40 `#[allow(dead_code)]` annotations (down from 951)
- [ ] All quality gates passing

### Phase C: Features

- [ ] C1: Batch module operational with 1000+ episodes
- [ ] C2: Embeddings CLI commands working
- [ ] C2: Embeddings MCP tools registered
- [ ] All integration tests passing

### Phase D: Advanced

- [ ] D1: DBSCAN produces meaningful clusters
- [ ] D1: BOCPD detects changepoints accurately
- [ ] D1: Pattern extraction <100ms
- [ ] D1: Large-scale validation (10K+ episodes) <60s
- [ ] D1: CLI/MCP tools for pattern analysis

### Release

- [ ] All CI checks passing
- [ ] Documentation updated
- [ ] GitHub release created
- [ ] Version bumped to v0.1.16

---

## 🚨 Risk Mitigation Checklist

### If B1 Takes Longer Than Expected

- [ ] Focus on public API boundaries first (highest impact)
- [ ] Document remaining unwrap() calls with TODOs
- [ ] Defer internal logic cleanup to v0.1.17

### If C1 Legacy Code Is Too Complex

- [ ] Simplify scope for v0.1.16 (basic batch operations)
- [ ] Defer advanced features to v0.1.17
- [ ] Keep batch module behind feature flag

### If D1 Validation Fails

- [ ] Document algorithm limitations
- [ ] Add configuration options to disable
- [ ] Plan algorithm improvements for v0.1.17

---

## 📋 Weekly Check-in Template

### Week X Progress

**Completed**:
- [ ] Task 1
- [ ] Task 2

**In Progress**:
- [ ] Task 3 (X% complete)

**Blocked**:
- [ ] Task 4 - Reason: ...

**Next Week**:
- [ ] Task 5
- [ ] Task 6

**Metrics**:
- CI Status: ✅ / ❌
- Test Pass Rate: X%
- Unwrap() Count: X (target: ≤280)
- Ignored Tests: X (target: ≤10)
- dead_code Annotations: X (target: ≤40)

**Issues/Concerns**:
- Issue 1
- Issue 2

---

**Checklist Status**: 🔄 In Progress (Week 1)
**Last Updated**: 2026-02-16
**Next Update**: 2026-02-23 (end of Week 1)
