---
name: more-progress-logs
description: Merge MCP servers and enhance progress logging for better context restoration
status: done
parts:
- src/main.rs (new unified entry point)
- src/servers/mod.rs
- src/servers/task.rs
- src/servers/review.rs
- src/storage.rs
- src/types/task.rs
- Cargo.toml
- CLAUDE.md
estimate:
  optimistic: 3 hours
  normal: 5 hours
  pessimistic: 8 hours
---

# Implementation Plan

## Task Summary

| ID | Task | Files |
|----|------|-------|
| T1 | Merge review MCP into task MCP - single binary | `Cargo.toml`, `src/main.rs`, `src/servers/mod.rs` |
| T2 | Update progress log format with optional feature ID | `src/storage.rs`, `src/types/task.rs` |
| T3 | Add automatic review event logging | `src/servers/review.rs` |
| T4 | Add automatic plan update logging | `src/servers/task.rs` |
| T5 | Add automatic feature completion logging | `src/servers/task.rs` |
| T6 | Update log_progress tool with feature_id param | `src/servers/task.rs` |
| T7 | Update documentation | `CLAUDE.md` |

## Tasks

### T1: Merge MCP Servers (F1)

- [ ] **T1.1**: Update `Cargo.toml` to have single `k4000-mcp` binary instead of two
- [ ] **T1.2**: Create unified `src/main.rs` that registers both task and review tools
- [ ] **T1.3**: Ensure both servers share the same `Storage` instance
- [ ] **T1.4**: Remove old binary entry points (`src/bin/k4000-task-mcp.rs`, `src/bin/k4000-review-mcp.rs`)
- [ ] **T1.5**: Update any internal imports/module structure as needed
- [ ] **T1.6**: Test that all tools work in the unified server

### T2: Update Progress Log Format (F2)

- [ ] **T2.1**: Modify `append_progress` in `storage.rs` to accept optional `feature_id: Option<&str>`
- [ ] **T2.2**: Update format to `[timestamp] [agent] [feature] message` when feature provided
- [ ] **T2.3**: Keep backward compatibility: `[timestamp] [agent] message` when no feature
- [ ] **T2.4**: Update all existing `append_progress` calls to use new signature

### T3: Review Event Logging (F3)

- [ ] **T3.1**: Log when `create_review_session` is called
- [ ] **T3.2**: Log when `submit_findings` is called (include finding count)
- [ ] **T3.3**: Log when `approve_review` is called
- [ ] **T3.4**: Log when `complete_iteration` is called

### T4: Plan Update Logging (F4)

- [ ] **T4.1**: Add progress log in `update_task_plan` handler

### T5: Feature Completion Logging (F5)

- [ ] **T5.1**: Add progress log in `mark_feature_complete` handler (verification started)

### T6: Update log_progress Tool (F6)

- [ ] **T6.1**: Add optional `feature_id` parameter to `LogProgressRequest`
- [ ] **T6.2**: Pass feature_id to `append_progress`
- [ ] **T6.3**: Update tool description/schema

### T7: Documentation (F7)

- [ ] **T7.1**: Update CLAUDE.md MCP configuration to show single `k4000-mcp` binary
- [ ] **T7.2**: Document what events agents should log during implementation
- [ ] **T7.3**: Provide example log messages for common scenarios
- [ ] **T7.4**: Document the new log format with feature ID
- [ ] **T7.5**: Update tool reference tables

## Testing Considerations

- Verify unified binary starts and all tools are accessible
- Test progress logging with and without feature ID
- Verify existing progress.txt files are still readable
- Test review workflow triggers progress logs
- Verify backward compatibility with existing task states

## Dependencies

```
F1 (merge) ──┬── F2 (log format) ── F6 (log_progress tool)
             │
             ├── F3 (review logging)
             │
             ├── F4 (plan logging)
             │
             ├── F5 (feature completion logging)
             │
             └── F7 (documentation)
```

---

## Estimate

**Senior Developer Profile:** 5+ years experience, familiar with Rust and MCP protocol.

| Scenario | Time |
|----------|------|
| Optimistic | 3 hours |
| Normal | 5 hours |
| Pessimistic | 8 hours |

### Assumptions

- Current MCP server structure allows straightforward merging
- No breaking changes to MCP protocol/tool schemas (except additions)
- Review and task servers already share storage module
- No need to maintain backward compatibility with separate binaries
