Agent skill
phase-5-execute
Execute phase skill for plan management. DUMB TASK RUNNER that executes tasks from TASK-*.toon files sequentially.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/phase-5-execute
SKILL.md
Phase Execute Skill
Role: DUMB TASK RUNNER that executes tasks from TASK-*.toon files sequentially.
Execution Pattern: Locate current task → Execute steps → Mark progress → Next task
Phase Handled: execute
CRITICAL: Use manage-* scripts via Bash for plan file updates (Edit/Write tools trigger permission prompts on .plan/ directories).
Standards (Load On-Demand)
Workflow
Read standards/workflow.md
Contains: Task execution pattern, phase transition, auto-continue behavior
Operations
Read standards/operations.md
Contains: Delegation patterns for builds, quality checks, PR creation
Execution Loop
Step 0: Get Routing Context (Once at start)
Get current phase, skill routing, and progress in a single call:
python3 .plan/execute-script.py pm-workflow:plan-marshall:manage-lifecycle get-routing-context \
--plan-id {plan_id}
Returns:
status: success
plan_id: {plan_id}
current_phase: 5-execute
skill: pm-workflow:phase-5-execute
skill_description: Execute phase skill for task implementation
total_phases: 4
completed_phases: 2
phases:
- init: complete
- refine: complete
- execute: in_progress
- finalize: pending
Use current_phase for logging, skill for dynamic routing, and completed_phases/total_phases for progress display.
Step 0.1: Read Commit Strategy (Once at start)
Cache the commit strategy for the entire execute loop:
python3 .plan/execute-script.py plan-marshall:manage-plan-marshall-config:plan-marshall-config \
plan phase-5-execute get --trace-plan-id {plan_id}
Extract commit_strategy from output. Valid values: per_deliverable, per_plan, none.
Step 0.5: Log Phase Start (Once per phase)
At the start of execute or finalize phase:
python3 .plan/execute-script.py plan-marshall:manage-logging:manage-log \
work {plan_id} INFO "[STATUS] (pm-workflow:phase-5-execute) Starting {phase} phase"
For each task in current phase:
Step 1: Locate Task with Context
python3 .plan/execute-script.py pm-workflow:manage-tasks:manage-tasks next \
--plan-id {plan_id} \
--include-context
Returns next task with status pending or in_progress, including embedded goal context (title, body) for immediate use without additional script calls.
Step 2: Execute Steps
For each step in task's steps[] array:
- Parse the step text
- Execute the action (delegate if specified)
- Mark step complete via
manage-tasks:step-done
Step 3: Mark Step Complete
python3 .plan/execute-script.py pm-workflow:manage-tasks:manage-tasks step-done \
--plan-id {plan_id} \
--task {task_number} \
--step {step_number}
Step 3.5: Log Task Completion
After each task completes:
python3 .plan/execute-script.py plan-marshall:manage-logging:manage-log \
work {plan_id} INFO "[OUTCOME] (pm-workflow:phase-5-execute) Completed {task_id}: {task_title} ({steps_completed} steps)"
Step 3.6: Conditional Per-Deliverable Commit
If commit_strategy == per_deliverable (cached from Step 0.1):
-
Check dependency chain: Does any other pending/in-progress task have
depends_onpointing to the just-completed task?- YES → Skip commit (a downstream task still needs to run)
- NO → This is the chain tail (all tasks for this deliverable are done) → Commit
-
Commit (only when chain tail):
Skill: pm-workflow:workflow-integration-git Parameters: - message: conventional commit derived from task title - push: false - create-pr: false -
Log commit outcome:
bashpython3 .plan/execute-script.py plan-marshall:manage-logging:manage-log \ work {plan_id} INFO "[OUTCOME] (pm-workflow:phase-5-execute) Per-deliverable commit: {task_id} ({commit_hash})"
If commit_strategy is per_plan or none → Skip this step entirely.
Step 4: Next Task or Phase
- If more tasks in phase → Continue to next task
- If phase complete → Log phase outcome and auto-transition to next phase
- If all phases complete → Mark plan complete
Step 5: Log Phase Completion (When phase completes)
python3 .plan/execute-script.py plan-marshall:manage-logging:manage-log \
work {plan_id} INFO "[STATUS] (pm-workflow:phase-5-execute) Completed {phase} phase: {tasks_completed} tasks"
Delegation
When checklist items specify delegation, invoke the appropriate agent/skill:
| Checklist Pattern | Delegation |
|---|---|
| "Run build" / "maven" / "npm" | See standards/operations.md |
| "Delegate to {agent}" | Task: {agent} |
| "Load skill: {skill}" | Skill: {skill} |
| "Run /command" | SlashCommand: /command |
Auto-Continue Behavior
Execute continuously without user prompts except:
- Error blocks progress
- Decision genuinely required
- User explicitly requested confirmation
Do NOT prompt for:
- Phase transitions
- Task transitions
- Routine confirmations
Phase Transition
When transitioning from execute phase to verify:
python3 .plan/execute-script.py pm-workflow:plan-marshall:manage-lifecycle transition \
--plan-id {plan_id} \
--completed 5-execute
This automatically updates status.toon and moves to the next phase.
Error Handling
On any error, first log the error to work-log:
python3 .plan/execute-script.py plan-marshall:manage-logging:manage-log \
work {plan_id} ERROR "[ERROR] (pm-workflow:phase-5-execute) {task_id} failed - {error_type}: {error_context}"
Script Failure (Lessons-Learned Capture)
ON SCRIPT FAILURE: When any script execution fails (exit != 0):
- Log error to work-log (see above)
- Capture error context (script path, exit code, stderr)
- Continue with normal error recovery (retry, fail task, etc.)
Other Errors
| Error | Options |
|---|---|
| Build failure | Fix and retry / View log / Skip task |
| Test failure | Fix tests / View details / Skip task |
| Dependency not met | Complete dependency / Skip check |
Integration
Command Integration
- /plan-marshall action=execute - Primary entry point invoking this skill
Related Skills
- phase-4-plan - Creates tasks from deliverables (previous phase)
- phase-6-verify - Quality verification (next phase)
- phase-7-finalize - Shipping workflow (commit, PR)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?