Execution Skill
Activate this skill during Phase 3 (Execution) of Maestro orchestration. This skill provides the protocols for executing implementation plan phases through subagent delegation, handling errors, and completing orchestration sessions.
Phase Execution Protocol
Sequential Execution
For phases with dependencies (blocked_by is non-empty):
- •Verify all blocking phases have
status: completed - •Update the phase status to
in_progressin session state - •Update
current_phasein session state - •Delegate to the assigned agent(s) with full context
- •Process the agent's Task Report
- •Update session state with results (files changed, validation status, token usage)
- •Transition phase status to
completedorfailed
Parallel Execution
For phases at the same dependency depth with no file overlap:
- •Verify all blocking phases for every phase in the batch are completed
- •Update all batch phases to
in_progresssimultaneously - •Invoke all assigned agents concurrently in a single message
- •Wait for all agents in the batch to complete
- •Process all Task Reports
- •Update session state for all phases in the batch
- •Only proceed to the next batch when all phases in the current batch are completed
Progress Context
Include the following in every delegation prompt to maintain execution awareness:
Progress: Phase [N] of [M]: [Phase Name] Session: [session_id]
Error Handling Protocol
Error Recording
Record all errors in session state with complete metadata:
- •
agent: Which subagent encountered the error - •
timestamp: When the error occurred (ISO 8601) - •
type: Category —validation,timeout,file_conflict,runtime,dependency - •
message: Full error message or relevant output - •
resolution: How it was resolved, orpendingif unresolved
Retry Logic
- •Maximum 2 retries per phase before escalating to user
- •First failure: Analyze the error, adjust delegation parameters (more context, narrower scope, different approach), retry automatically
- •Second failure: Report to user and request guidance
- •Third failure: Mark phase as
failed, stop execution, escalate
Increment retry_count in session state on each retry attempt.
Timeout Handling
When a subagent times out:
- •Record partial output in session state if available
- •Report the timeout to the user with context about what was attempted
- •Offer options: retry with adjusted parameters, skip phase, or abort
File Conflict Handling
When a subagent reports a file conflict (concurrent modification):
- •Stop execution immediately
- •Report conflict details to user (which files, which agents)
- •Do NOT attempt automatic resolution
- •Wait for user guidance before proceeding
Error Escalation Format
Present failures to the user in this structured format:
Phase Execution Failed: [phase-name] Agent: [agent-name] Attempt: [N] of 2 Error Type: [error-type] Error Message: [full error message] Context: [what the agent was trying to do] [relevant files/parameters] Options: 1. Manually fix the issue and retry this phase 2. Skip this phase and continue 3. Abort orchestration and review session state 4. Adjust delegation parameters and retry What would you like to do?
Subagent Output Processing
Task Report Parsing
After each subagent completes, parse its Task Report to extract:
- •Status:
success,failure, orpartial - •Files Created/Modified/Deleted: Update session state file manifest
- •Validation:
pass,fail, orskipped - •Errors: Append to session state errors array
State Update Sequence
After processing each Task Report:
- •Update phase
files_created,files_modified,files_deleted - •Append any errors to phase
errorsarray - •Aggregate token usage into session
token_usage - •If validation passed: transition phase to
completed - •If validation failed: trigger retry logic
- •Update
updatedtimestamp
Completion Protocol
Final Review
When all phases are completed:
- •Review all phase statuses — confirm none are
failedorpending - •Verify all deliverables from the implementation plan are accounted for
- •Cross-reference the file manifest against expected outputs
Deliverable Verification
For each phase in the implementation plan:
- •Confirm expected files were created/modified
- •Confirm validation passed (or was explicitly skipped by user)
- •Flag any deviations from the plan
Archival Trigger
After successful completion:
- •Activate the
session-managementskill - •Execute the archive protocol
- •Move design document, implementation plan, and session state to archive directories
Summary Format
Present the final orchestration summary:
Orchestration Complete: [session_id] Delivered: - [bullet point summary of what was built/changed] Files Changed: - Created: [count] files - Modified: [count] files - Deleted: [count] files Token Usage: - Total: [input + output tokens] - By Agent: [top 3 agents by usage] Deviations from Plan: - [any changes from original plan, or "None"] Recommended Next Steps: - [actionable follow-up items]