| name | amcos-agent-spawning |
| description | Use when creating new agents. Trigger with agent spawn requests, pre-flight validation, or new agent creation. 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 |
Agent Spawning
Overview
Creates new agent instances with OAuth validation, plugin setup, and registry registration.
Prerequisites
- AI Maestro running,
ai-maestro-agents-management and agent-messaging skills available
- tmux installed, team registry accessible via the
aimaestro-teams.sh list CLI
Instructions
Copy this checklist and track your progress:
Pre-Flight: Validate OAuth Scopes
gh auth status 2>&1 | grep -q "project" || echo "ERROR: Missing project scope"
Required: repo, project, read:project. If missing, request human to run gh auth refresh -h github.com -s project,read:project. Do NOT proceed if scopes are missing.
Spawn Procedure (PROCEDURE 1)
- Request GovernanceRequest approval - Submit spawn request to sourceManager via
amcos-permission-management skill. BLOCK until approved.
- Select agent type from roles (Orchestrator, Architect, Integrator, Programmer)
- Choose session name - Format:
<role-prefix>-<project>-<descriptive> (must be unique)
- Setup plugin - Copy from
$HOME/.claude/plugins/cache/ai-maestro/<plugin>/<latest>/ to $HOME/agents/<session>/.claude/plugins/<plugin>/
- Create instance via
ai-maestro-agents-management skill with args: --dangerously-skip-permissions --chrome --add-dir /tmp --plugin-dir <path> --agent <agent-name>
- Verify agent appears online in agent list
- Register via
uv run python scripts/amcos_team_registry.py add-agent
- Send welcome message via
agent-messaging skill
The --agent Flag
| Role | --agent Flag Value |
|---|
| Orchestrator | ai-maestro-orchestrator-main-agent |
| Architect | ai-maestro-architect-main-agent |
| Integrator | ai-maestro-integrator-main-agent |
| Programmer | ai-maestro-programmer-main-agent |
Output
| Step | Expected Output |
|---|
| Pre-flight | OAuth scopes confirmed |
| Spawn | tmux session created, agent running |
| Registry | Agent registered as "running" |
Error Handling
| Issue | Resolution |
|---|
| OAuth scopes missing | Block spawn, request human gh auth refresh |
| Plugin validation failed | Verify cache exists at source path |
| Session name collision | Choose different unique name |
| Resource limit exceeded | Queue request, hibernate oldest idle |
Examples
Spawn a Programmer Agent
gh auth status 2>&1 | grep -q "project" && echo "OK"
cp -r ~/.claude/plugins/cache/ai-maestro/ai-maestro-programmer-agent/latest/* \
~/agents/ampa-svgbbox-impl/.claude/plugins/ai-maestro-programmer-agent/
Checklist
Copy this checklist and track your progress:
Resources