You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(mcp): Phase 3 — gui_set_spec_status (the only write tool) (#55)
* feat(mcp): Phase 3 — gui_set_spec_status (the only write tool)
Wraps the existing PUT /api/cowork/specs/{feature}/{phase}/status
route as an MCP tool. Same validation (slug regex, phase enum,
_VALID_STATUSES), same atomic write via attune_gui._fs.atomic_write.
Behavior mirrors the FastAPI route:
- if a `**Status**:` line already exists, substitute via _STATUS_RE
- otherwise insert a fresh line near the top, after the title
This is the only write tool in the MCP surface — additive to the five
read-mostly tools from Phase 2. The spec called it out as "optional /
gated" and Patrick approved shipping it as part of the post-Phase-2
plan.
Tests (test_mcp_tools.py, +6):
- happy path: status flip persists to disk + gui_get_spec_status
reflects the new value
- invalid status (not in _VALID_STATUSES)
- invalid phase
- invalid feature slug (path-traversal attempt)
- unknown feature
- missing phase file (e.g. setting tasks.md status on a spec that
has only requirements/design)
Also updated test_mcp_server.py's tool-registry assertion to expect
six tools, renaming the test from _phase2_ to _full_.
Marks 3.1 done in tasks.md. CHANGELOG entry under Unreleased.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* docs(living-docs): regenerate sidecar templates for Phase 3 changes
Auto-regen triggered by the new gui_set_spec_status code in
sidecar/attune_gui/mcp/tools.py. source_hash drift only.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments