FlowDesigner - Agent Handoff & Orchestration Logic
Overview
FlowDesigner designs and manages agent handoff protocols for PromptForge AI. When work moves from one agent to another, critical context, state, and expectations must transfer seamlessly. Poor handoffs cause rework, lost context, and workflow failures.
When to Use
- When designing handoff protocols between specific agents in a workflow
- When troubleshooting handoff failures (lost context, incomplete transfers)
- When optimizing handoff speed and reliability
- When adding new agents to existing workflows
- When auditing handoff quality across the organization
- Don't use when: Designing overall workflow architecture (use cascade-promptforge-workflow-designer)
Core Procedures
Step 1: Analyze Handoff Requirements
For each handoff point:
- What context must transfer? (conversation history, decisions, constraints, partial results)
- What format does the receiving agent expect? (structured data, natural language, specific schema)
- What quality checks are needed before handoff? (completeness, validity, format compliance)
- What happens if the receiving agent is unavailable? (queue, retry, fallback agent)
Step 2: Design Handoff Protocol
Every handoff includes a Handoff Package:
HANDOFF PACKAGE
===============
From: [sending agent name and role]
To: [receiving agent name and role]
Context: [summary of work completed so far]
Artifacts: [files, data, prompts, outputs being transferred]
Instructions: [what the receiving agent should do]
Constraints: [limitations, deadlines, quality requirements]
Priority: [urgent/normal/low]
Timeout: [maximum time for receiving agent to acknowledge]
Correlation ID: [unique ID linking this handoff to the overall workflow]
Step 3: Implement Context Transfer
- Structured Context: Use JSON schema for machine-readable context
- Narrative Context: Include human-readable summary for complex situations
- State Snapshot: Capture current workflow state (step number, progress, decisions)
- Decision Log: Include key decisions made so far and their rationale
- Open Questions: Flag any unresolved issues the receiving agent should address
Step 4: Validate Handoff Success
Step 5: Monitor and Optimize
Track handoff metrics:
- Handoff success rate (acknowledged and completed)
- Average handoff duration
- Context completeness score
- Handoff failure rate and common failure modes
- Rework rate (how often receiving agent asks for clarification)
Success Metrics
- Handoff success rate: >=98% (receiving agent acknowledges and proceeds)
- Context completeness: >=95% (no missing information requests)
- Average handoff time: <30 seconds for automated handoffs
- Rework rate: <5% (receiving agent doesn't need to ask for clarification)
Error Handling
- Error: Receiving agent doesn't acknowledge handoff within timeout
Response: Retry once, then escalate to sage-promptforge-chief-architect, check agent availability
- Error: Receiving agent reports missing context
Response: Resend handoff package with additional context, log the gap for protocol improvement
- Error: Handoff package exceeds size limits
Response: Compress context, send reference to stored artifacts instead of inline data
Cross-Team Integration
Related Skills: cascade-promptforge-workflow-designer, harmonic-promptforge-orchestration-strategy, statemaster-promptforge-state-management, integration-promptforge-cross-agent-compatibility
Used By: Cascade, Harmonic, Integration, ALL agents that receive work from other agents
1---2name: flowdesigner-promptforge-agent-handoff3description: >4 Use when designing, implementing, or troubleshooting agent handoff protocols,5 context transfer between agents, and seamless workflow transitions. This skill6 ensures agents pass work between each other without loss of context or quality.7metadata:8 source: https://skillmd.com/skills/construct-ai-primary/flowdesigner-promptforge-agent-handoff9---1011# FlowDesigner - Agent Handoff & Orchestration Logic1213## Overview14FlowDesigner designs and manages agent handoff protocols for PromptForge AI. When work moves from one agent to another, critical context, state, and expectations must transfer seamlessly. Poor handoffs cause rework, lost context, and workflow failures.1516## When to Use17- When designing handoff protocols between specific agents in a workflow18- When troubleshooting handoff failures (lost context, incomplete transfers)19- When optimizing handoff speed and reliability20- When adding new agents to existing workflows21- When auditing handoff quality across the organization22- **Don't use when:** Designing overall workflow architecture (use cascade-promptforge-workflow-designer)2324## Core Procedures2526### Step 1: Analyze Handoff Requirements27For each handoff point:281. What context must transfer? (conversation history, decisions, constraints, partial results)292. What format does the receiving agent expect? (structured data, natural language, specific schema)303. What quality checks are needed before handoff? (completeness, validity, format compliance)314. What happens if the receiving agent is unavailable? (queue, retry, fallback agent)3233### Step 2: Design Handoff Protocol34Every handoff includes a **Handoff Package**:35```36HANDOFF PACKAGE37===============38From: [sending agent name and role]39To: [receiving agent name and role]40Context: [summary of work completed so far]41Artifacts: [files, data, prompts, outputs being transferred]42Instructions: [what the receiving agent should do]43Constraints: [limitations, deadlines, quality requirements]44Priority: [urgent/normal/low]45Timeout: [maximum time for receiving agent to acknowledge]46Correlation ID: [unique ID linking this handoff to the overall workflow]47```4849### Step 3: Implement Context Transfer50- **Structured Context:** Use JSON schema for machine-readable context51- **Narrative Context:** Include human-readable summary for complex situations52- **State Snapshot:** Capture current workflow state (step number, progress, decisions)53- **Decision Log:** Include key decisions made so far and their rationale54- **Open Questions:** Flag any unresolved issues the receiving agent should address5556### Step 4: Validate Handoff Success57- [ ] Receiving agent acknowledges receipt within timeout58- [ ] Receiving agent confirms it has all required context59- [ ] Receiving agent can begin work without requesting missing information60- [ ] Handoff completes within expected time (<30 seconds for automated handoffs)61- [ ] No context loss detected (compare sent vs received context)6263### Step 5: Monitor and Optimize64Track handoff metrics:65- Handoff success rate (acknowledged and completed)66- Average handoff duration67- Context completeness score68- Handoff failure rate and common failure modes69- Rework rate (how often receiving agent asks for clarification)7071## Success Metrics72- Handoff success rate: >=98% (receiving agent acknowledges and proceeds)73- Context completeness: >=95% (no missing information requests)74- Average handoff time: <30 seconds for automated handoffs75- Rework rate: <5% (receiving agent doesn't need to ask for clarification)7677## Error Handling78- **Error:** Receiving agent doesn't acknowledge handoff within timeout79 **Response:** Retry once, then escalate to sage-promptforge-chief-architect, check agent availability80- **Error:** Receiving agent reports missing context81 **Response:** Resend handoff package with additional context, log the gap for protocol improvement82- **Error:** Handoff package exceeds size limits83 **Response:** Compress context, send reference to stored artifacts instead of inline data8485## Cross-Team Integration86**Related Skills:** cascade-promptforge-workflow-designer, harmonic-promptforge-orchestration-strategy, statemaster-promptforge-state-management, integration-promptforge-cross-agent-compatibility87**Used By:** Cascade, Harmonic, Integration, ALL agents that receive work from other agents