6.8 KiB
Agent Handoff Receive Workflow Instructions
The workflow execution engine is governed by: {project-root}/bmad/core/tasks/workflow.xml You MUST have already loaded and processed: {project-root}/bmad/core/workflows/handoff-receive/workflow.yaml Communicate in {communication_language} throughout the workflow execution
Run Serena MCP tool: mcp__serena__activate_project Pass current project directory as the project parameter Wait for confirmation that project is activated Display error: "⚠️ Failed to activate Serena project. Ensure Serena MCP is installed and configured." Provide troubleshooting: Check Serena MCP server status and configuration EXIT workflow if Serena is not available Run Serena MCP tool: mcp__serena__list_memories Filter memories to find handoff-related entries matching these patterns: - New format: *-handoff-YYYY-MM-DD-HHmmss (e.g., dev-handoff-2025-10-20-150000) - Legacy format: *-handoff-YYYY-MM-DD (e.g., architect-handoff-2025-10-19) Display error message: ⚠️ No handoff memories found in Serena.This could mean:
- No handoff was created yet (run /handoff first in previous session)
- Wrong project activated (check current directory)
- Handoff memory has a different naming pattern
Recovery options: a) List all Serena memories: mcpserenalist_memories b) Check project activation: mcpserenaget_current_config c) Create new handoff in previous agent session d) Manual search: Look for memories containing 'handoff'
Would you like me to:
- List all available memories?
- Show current Serena project? EXIT workflow and wait for user guidance
Which one would you like to receive? (Enter number or agent name)
Default: Will select #1 (most recent) in 5 seconds... Select handoff number or agent name Use user selection or default to #1
Run Serena MCP tool: mcp__serena__read_memory Parameters: memory_file_name = [Selected handoff memory name from Step 3] Display error: "⚠️ Failed to read handoff memory: [memory-name]" Suggest: Verify memory exists and is accessible EXIT workflow Verify handoff memory contains required sections: - "Work Just Completed" section - "Your Task" section - "Success Criteria" section Display warning: "⚠️ Handoff memory incomplete - missing: [SECTION_NAME]" Show available content Continue with available data Extract key information and display formatted summary: # 📬 Handoff ReceivedFrom: [Previous agent/phase] To: [Target agent - you] Date: [Handoff date]
✅ What Was Just Completed
[Brief summary from "Work Just Completed" section]
🎯 Your Task
[Extract from "Your Task" section]
Command to run: [NEXT_COMMAND]
🔑 Key Context (Quick Reference)
[Extract top 3-5 points from "Key Context You Need"]
📁 Files to Review
PRIMARY (Must read):
- [File 1]
- [File 2]
REFERENCE:
- [File 3]
- [File 4]
✓ Success Criteria
[Extract from "Success Criteria" section]
🚀 Ready to Start?
- Review the files listed above
- [Next specific action from "Next Steps"]
- Execute:
[NEXT_COMMAND]
Full handoff details in memory: [memory-name]
Present information in scannable, actionable format Focus on what the current agent needs to DO
Present options: What would you like to do?- Read a specific file - I can read any file from the "Files to Review" list
- Proceed with the task - Execute the next command/action
- Ask questions - Clarify anything about the handoff
- Read full handoff - See the complete handoff memory again
Or just tell me what to do next!
Wait for user response and proceed accordingly
Important Execution Notes
Selection Algorithm
- Sort by timestamp (newest first)
- Support both new (YYYY-MM-DD-HHmmss) and legacy (YYYY-MM-DD) formats
- Auto-select when clear, prompt user when ambiguous
BMAD Integration
This workflow works seamlessly with:
/handoff- Creates the handoff memory/workflow-status- Provides current state and next action- BMAD agents - Standard agent handoff protocol
Error Recovery
- No handoffs found: Provide clear troubleshooting and recovery options
- Multiple handoffs: Auto-select most recent or present numbered list
- Incomplete handoff: Show warning but continue with available content
- Read failure: Clear error message with actionable next steps
Version Compatibility
- Tested with: BMAD v6.x
- Requires: Serena MCP for memory persistence
- Compatible with: /handoff command and /workflow-status (BMAD v6+)
- Backward compatible: Supports both timestamped and legacy formats