| name | amoa-agent-replacement |
| description | Use when replacing agents. Trigger with agent replacement or handoff requests. Loaded by ai-maestro-orchestrator-agent-main-agent |
| license | Apache-2.0 |
| compatibility | Python 3.8+, PyYAML, GitHub CLI, AI Maestro, AMCOS. |
| metadata | {"author":"Emasoft","version":"1.0.0"} |
| user-invocable | false |
| context | fork |
| agent | amoa-main |
Agent Replacement Skill
Overview
Handle agent replacement triggered by AMCOS. When an agent fails or loses context, compile task context and generate handoff documents for the replacement.
Prerequisites
Python 3.8+, PyYAML, GitHub CLI (gh) authenticated, AI Maestro running, AMCOS operational.
Output
Handoff document (GitHub issue comment), state file update, AMCOS confirmation, kanban reassignment.
Instructions
- On AMCOS notification, compile task context from the failed agent's GitHub issues, kanban cards, and AI Maestro message history.
- Generate a handoff document and deliver it to the replacement agent via AI Maestro
agent-messaging skill.
- Wait for ACK, confirm reassignment, and notify AMCOS of successful replacement.
See: replacement-workflow-steps.md for detailed steps.
Checklist
Copy this checklist and track your progress:
Examples
Input: AMCOS notification {"type": "agent-failed", "agent": "libs-svg-svgbbox", "reason": "context-loss"}
Output: Handoff document posted to GitHub issue + kanban tasks reassigned + AMCOS confirmation sent
See: examples.md for full examples.
Error Handling
See: error-handling-reference.md for errors and solutions.
Resources
- replacement-workflow-steps.md - 6-step workflow
Replacement Protocol Flow · Step 1: Receive AMCOS Notification · Step 2: Compile Task Context ·
Step 3: Generate Handoff Document · Step 4: Reassign Kanban Tasks ·
Step 5: Send Handoff to New Agent · Step 6: Confirm Reassignment · Python Scripts
- error-handling-reference.md - Errors
-
- Common Errors and Solutions
-
- Troubleshooting References
-
- Emergency Procedures
- handoff-document-format.md - Handoff format
3.1 Required Sections · 3.2 Task Detail Format · 3.3 Progress Documentation ·
3.4 Communication History Format · 3.5 Next Steps Clarity Requirements
- examples.md - Examples
- Example 1: Standard Replacement Flow
- Example 2: Emergency Replacement with Partial Context
- emergency-procedures.md - Emergencies
- Replacement Agent Also Fails
- Handoff Document Corrupted
- GitHub Project Access Issues
- context-compilation-workflow.md - Context gathering
2.1 Information Sources · 2.2 State File Extraction · 2.3 GitHub Issue Collection ·
2.4 Communication History Retrieval · 2.5 Git Branch Analysis