architect-migrate-to-procedures
Migrate a system-prompt agent to procedures
Guide the user through moving a prompt-heavy agent to a procedure-driven setup. Everything is branch-scoped over the ConvAI REST API (host https://api.elevenlabs.io, header xi-api-key: $API_KEY). You need $AGENT_ID and the $BRANCH_ID you are working on. Procedure creates and edits follow the draft then publish model; see the architect-manage-procedures skill for the exact endpoint mechanics.
1. Check current agent state
Read the agent with GET /v1/convai/agents/$AGENT_ID?branch_id=$BRANCH_ID. Verify it is effectively system-prompt-only: an empty workflow with no custom nodes or edges, and no existing custom procedures beyond default system ones (list via GET /v1/convai/agents/$AGENT_ID/branches/$BRANCH_ID/procedures). If it already has custom workflow nodes or existing procedures, flag this to the user, but do not stop the migration.
2. Analyze the system prompt for candidates
Read the system prompt (conversation_config.agent.prompt.prompt off the agent GET). Identify good procedure candidates: sequential step-by-step instructions, and conditional logic or branching paths (for example, "if the user asks for X, do Y").
3. Survey for clarity
If any part of the system prompt is unclear or needs more detail to become a procedure, ask specific clarifying questions. Resolve all ambiguities before proceeding.
4. Propose suggested procedures
Present a Markdown table with columns: