# MCP Prompts Round 8 Plan

## Summary

Round 8 should improve MCP client UX by adding prompts/resources around the now-stable tool surface.

The work is sequenced in this order:

1. define the smallest useful MCP prompts/resources set
2. add prompt/resource handlers without changing tool behavior
3. verify MCP compatibility and update handoff status

## Key Changes

### MCP prompts

- add prompts for common flows such as:
  - lifecycle review
  - wakeup generation
  - project context retrieval

### MCP resources

- add read-only resources for:
  - current lifecycle handoff status
  - implementation plans / restart entry points

## Test Plan

- handler tests for prompt/resource listing and reads
- end-to-end MCP smoke test covering at least one prompt/resource call

## Assumptions

- Round 8 does not rename tools
- Round 8 does not change lifecycle write contracts
- Round 8 still does not add persistent disk cache

## Completion Status

Last checked: `2026-04-13`

Completed in this round:

- added MCP prompt support:
  - `review_lifecycle_queue`
  - `generate_project_wakeup`
  - `retrieve_project_context`
- added MCP resource support for current handoff and implementation plan documents
- exposed prompts/resources in MCP server capabilities
- added handler tests and expanded end-to-end MCP smoke coverage
- tightened resource loading so config-local docs are preferred, with repo-doc fallback for smoke and local startup paths
- fixed daemon-backed lifecycle read integration by wiring `DaemonClient` imports/call sites and preserving direct-read fallback when daemon is unavailable
- current daemon-backed read integration reuses a shared stdio daemon session keyed by `(daemon_bin, config_path)` across repeated reads inside one process
- if that shared session dies, the next request drops the stale session, rebuilds it once, and then continues; direct fallback remains intact when daemon transport still fails after rebuild
- hardened MCP stdio parsing so malformed JSON now returns JSON-RPC parse errors instead of terminating the server, and the server continues serving subsequent requests after the parse error
- lifecycle create/action tool responses now derive their summary payload from a shared helper (`src/lifecycle_summary.rs`) instead of ad-hoc per-tool assembly
- verification completed with targeted MCP test passes and final full-suite green runs
  - `cargo test mcp -- --nocapture`
  - `cargo test -- --nocapture`

Checked for omissions against this plan:

- no missed items inside the scoped implementation baseline
- tool names remain unchanged
- lifecycle write contracts remain unchanged
- persistent disk cache remains intentionally deferred
