docs(mcp): nudge handoff toward reusing existing items - #265
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe MCP ChangesHandoff guidance
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/mcp_prompts.rs`:
- Around line 217-223: Update the status-update guidance so every item update
includes the required target ID: in src/mcp_prompts.rs lines 217-223, document
item(action=update, id=<id>, assignee_agent=<recipient>), and apply the same id
requirement in the tool description at src/mcp_server.rs lines 412-413.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a81ab6ad-7975-41aa-888c-95d5da44f13b
📒 Files selected for processing (3)
src/mcp_prompts.rssrc/mcp_server.rssrc/mcp_server/types.rs
| If the work already lives on some other existing item (not just your \ | ||
| own inbox reply), pass that item's id as item_id too — omitting it \ | ||
| always creates a new item, even when one covering this work already \ | ||
| exists. And if this is just a plain-text status update with no \ | ||
| versioned artifact to attach, skip `handoff` entirely: call `comment` \ | ||
| (action=create, item_id=<id>) plus `item` (action=update, \ | ||
| assignee_agent=<recipient>) instead — lighter, no new item, no asset.\n\ |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Include the required item ID in the status-update guidance.
item(action=update) requires id, not only assignee_agent. Following either description literally leaves the update target missing and fails validation. Document id=<item_id> in both locations.
src/mcp_prompts.rs#L217-L223: useitem(action=update, id=<id>, assignee_agent=<recipient>).src/mcp_server.rs#L412-L413: include the sameidrequirement in the tool description.
📍 Affects 2 files
src/mcp_prompts.rs#L217-L223(this comment)src/mcp_server.rs#L412-L413
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/mcp_prompts.rs` around lines 217 - 223, Update the status-update guidance
so every item update includes the required target ID: in src/mcp_prompts.rs
lines 217-223, document item(action=update, id=<id>,
assignee_agent=<recipient>), and apply the same id requirement in the tool
description at src/mcp_server.rs lines 412-413.
Summary
handofftool description +item_idparam description now spell out that omittingitem_idalways mints a new item, and to pass it when the work already has a home itemcomment(action=create) +item(action=update, assignee_agent=...) as the lighter alternative when a handoff is just a plain-text status update with no versioned artifact to attach/handoffslash-command prompt grammarPrompted by a duplicate item (#216) created via
handofffor a status update that already had a home on #212.Test plan
cargo build --workspace --all-featurescargo fmt --all -- --checkcargo test --bin agentflare handoff/mcp_prompts(32/32 pass)Summary by CodeRabbit