Every document filename now mirrors its lifecycle state with a status suffix (e.g., .draft.md, .wip.md, .accepted.md). No more bare .md for tracked document types. Also renamed all from_str methods to parse to avoid FromStr trait confusion, introduced StagingDeploymentParams struct, and fixed all 19 clippy warnings across the codebase. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3.9 KiB
3.9 KiB
RFC 0011: MCP Workflow Guidance
| Status | In Progress |
| Date | 2026-01-25 |
| Source Spike | Inconsistent Worktree Creation in Claude MCP |
Problem
Claude doesn't consistently create worktrees and feature branches when implementing RFCs via MCP. Investigation found five root causes:
- Tool descriptions lack workflow context -
blue_worktree_createsays what it does but not when to use it - CLI syntax in MCP responses -
blue_nextsays "Run 'blue worktree create'" instead of "Use blue_worktree_create" - Hints don't name tools -
generate_hint()says "Want to start?" but doesn't say how - No next_action on status change - When RFC becomes "accepted", response has no guidance
- No warning on premature in-progress - RFC can go in-progress without worktree, only detected later as "stalled"
The result: Claude skips worktree creation ~50% of the time, working directly on main branch.
Goals
- Claude creates worktrees consistently when implementing accepted RFCs
- MCP responses guide Claude to the next workflow step
- Tool descriptions explain their place in the workflow
- Warnings surface when workflow is violated
Non-Goals
- Enforcing worktree creation (just guiding)
- Changing the workflow itself
- CLI behavior changes (MCP only)
Proposal
1. Add next_action field to status-changing responses
When blue_rfc_update_status changes status to "accepted":
{
"status": "success",
"title": "my-feature",
"new_status": "accepted",
"next_action": {
"tool": "blue_worktree_create",
"args": { "title": "my-feature" },
"hint": "Create a worktree to start implementation"
}
}
2. Fix blue_next to use MCP tool syntax
Change:
"'{}' is ready to implement. Run 'blue worktree create {}' to start."
To:
"'{}' is ready to implement. Use blue_worktree_create with title='{}' to start."
3. Update generate_hint() to name tools
Change:
"'{}' is ready to implement. Want to start?"
To:
"'{}' is ready to implement. Use blue_worktree_create to begin."
4. Enhance tool descriptions with workflow context
Current:
"Create an isolated git worktree for RFC implementation."
Proposed:
"Create an isolated git worktree for RFC implementation. Use after an RFC is accepted, before starting work. Creates a feature branch and switches to isolated directory."
5. Add warning when RFC goes in-progress without worktree
In handle_rfc_update_status, when status becomes "in-progress":
{
"status": "success",
"warning": "No worktree exists for this RFC. Consider creating one with blue_worktree_create.",
...
}
Alternatives Considered
A. Require worktree before in-progress
Rejected: Too restrictive. Some quick fixes don't need worktrees.
B. Auto-create worktree on accept
Rejected: Side effects without explicit user action violate principle of least surprise.
C. Add workflow documentation to MCP server description
Partial: Good idea but doesn't solve the in-context guidance problem.
Implementation Plan
- Add
next_actionstruct and field to response types - Update
handle_rfc_update_statusto include next_action - Update
handle_nextto use MCP tool syntax - Update
generate_hint()to name tools - Enhance tool descriptions in
handle_tools_list - Add worktree warning in status transitions
Test Plan
blue_rfc_update_statusto "accepted" includes next_action with blue_worktree_createblue_nextoutput uses MCP tool syntax, not CLI syntaxblue_statushint mentions tool names- Tool description for blue_worktree_create includes workflow context
blue_rfc_update_statusto "in-progress" warns if no worktree exists- Manual test: Claude creates worktree after accepting RFC
"Show, don't tell. But also tell, when showing isn't enough."
— Blue