| name | amcos-emergency-handoff |
| description | Use when handling emergency work handoff from failed agents. Trigger with agent failure handoff or task blocker routing. Loaded by ai-maestro-chief-of-staff-main-agent |
| user-invocable | false |
| license | Apache-2.0 |
| compatibility | Requires AI Maestro installed. |
| metadata | {"author":"Emasoft","version":"1.0.0"} |
| context | fork |
| agent | ai-maestro-chief-of-staff-main-agent |
AMCOS Emergency Handoff
Overview
Transfer critical work when deadlines cannot wait. Routes task blocker escalations to AMAMA.
Prerequisites
- Deadline-critical failure OR task blocker escalation from AMOA
- AI Maestro running locally
- Handoff dir:
$CLAUDE_PROJECT_DIR/thoughts/shared/handoffs/emergency/
Instructions
Phase 5: Emergency Work Handoff
- Identify critical tasks at risk
- Notify AMOA of emergency handoff initiation
- Find an available receiving agent
- Create minimum-viable handoff doc (task, state, files, deadline)
- Send handoff via AI Maestro
- Verify receiving agent acknowledges
- Notify AMAMA (notification only, no approval needed)
- Monitor deadline compliance
| Aspect | Regular | Emergency |
|---|
| Timing | After replacement | Immediately |
| Completeness | Full context | Minimum viable |
| Recipient | Replacement | Any available |
| Duration | Permanent | Temporary |
Task Blockers vs Agent Failures
Agent Failures -- resolve via failure recovery workflow.
Task Blockers -- blocked by missing info/access/user decision:
- Receive escalation from AMOA
- AMCOS can resolve? (reassignment, permission) -> handle directly
- Needs user input? -> route to AMAMA via
blocker-escalation
- Track; route AMAMA response back to AMOA
Decision Tree
Escalation -> Agent failure? -> recovery workflow
-> Blocker AMCOS resolves? -> handle
-> Needs user input? -> route to AMAMA
Handoff Validation Checklist
Copy this checklist and track your progress:
Output
| Result | Output |
|---|
| Handoff sent | Work transferred to available agent |
| Blocker routed | Awaiting AMAMA user decision |
| Blocker resolved | Agent reassigned directly |
Error Handling
| Issue | Resolution |
|---|
| No available agent | Notify AMAMA for manual intervention |
| Handoff rejected | Try next available agent |
| Deadline missed | Document, notify, post-mortem |
| AMAMA unresponsive | 15 min wait, reminder, escalate |
Examples
Emergency handoff
amp-send.sh apps-svgplayer-development "EMERGENCY: SVG fix (2h)" urgent \
'{"type":"emergency-handoff","message":"svgbbox crashed. Fix by 18:00 UTC.","task":"Fix SVG rendering","failed_agent":"libs-svg-svgbbox","deadline":"2025-02-05T18:00:00Z"}'
Task blocker routing
amp-send.sh amama-assistant-manager "BLOCKER: API key needed" high \
'{"type":"blocker-escalation","message":"API key needed, user must provide.","blocker_type":"user-decision","impact":"Deploy blocked","escalated_from":"amoa-deployment"}'
Checklist
Copy this checklist and track your progress:
Resources
- work-handoff-during-failure — Emergency handoff procedures, message formats, reconciliation
- 5.1 When to use this document
- 5.2 Overview of emergency handoff
- 5.3 Triggering emergency handoff
- 5.3.1 When to initiate emergency handoff
- 5.3.2 Notification to orchestrator
- 5.3.3 Notification to manager
- 5.4 Creating emergency handoff documentation
- 5.4.1 Required handoff content
- 5.4.2 Handoff document template
- 5.4.3 Extracting information from failed agent
- 5.5 Reassigning work during failure
- 5.5.1 Temporary reassignment to other agents
- 5.5.2 Holding tasks for replacement agent
- 5.5.3 Splitting tasks across multiple agents
- 5.6 Emergency handoff message formats
- 5.6.1 Handoff request to orchestrator
- 5.6.2 Task reassignment notification
- 5.6.3 Receiving agent instructions
- 5.7 Post-failure work reconciliation
- 5.7.1 Identifying duplicate work
- 5.7.2 Merging partial progress
- 5.7.3 Updating task status