Parallel Task
Use this skill when the user explicitly asks for $parallel-task to execute a plan file.
Scope
- •Execute an existing implementation plan; do not author a new plan.
- •Run eligible tasks in dependency waves using parallel subagents.
- •Keep task state, logs, and file lists updated in the plan file.
Inputs
- •
plan_file(required) - •
task_idssubset (optional)
If no task_ids are provided, execute the full plan.
Preflight checks
- •Confirm
plan_fileexists and is readable. - •Parse task blocks (for example
### T1: ...). - •For each task, extract:
- •ID and name
- •
depends_onlist - •
location,description,validation - •
touches,scope_ok - •
status,log,files edited/created
- •Validate unique IDs and dependency references.
- •If
.autolab/state.jsonexists, load iteration and stage context for prompts. - •Load
.autolab/prompts/rendered/<stage>.context.jsonwhen present. Extractallowed_edit_dirsfromrunner_scopeand verify each task'stouchesare within allowed scope before launching subagents. - •Fail preflight if any task omits
touchesorscope_ok, or ifscope_okis not set to true.
Subset execution rules
- •If task subset is requested, include all transitive dependencies.
- •If a requested task ID is missing, stop and list available task IDs.
Execution loop
- •Identify unblocked tasks:
- •task not completed
- •all
depends_ontasks completed
- •Extract
touchesandconflict_groupfrom each unblocked task during preflight. - •When building a wave, exclude tasks whose
touchesoverlap or share aconflict_groupwith already-selected tasks in the wave. - •Launch all wave tasks in parallel subagents.
- •Wait for completion, collect outputs, and validate results.
- •Mark task as complete only when plan updates are present:
- •
status: Completed - •non-empty
log - •non-empty
files edited/created
- •
- •If a task fails validation, retry once; otherwise report blocked status.
- •Repeat until no pending tasks remain.
Subagent prompt contract
Each task prompt must include:
- •plan file path
- •iteration/stage context (if available)
- •full task section
- •acceptance/validation requirements
Instruction requirements for subagent:
- •Read affected files before editing.
- •Implement only the assigned task.
- •Run validation when feasible.
- •Update the task block in
plan_fileimmediately after completion. - •Return a concise summary of files changed, validation run, and residual risks.
Guardrails
- •Do not force per-task git commits.
- •Do not stage unrelated files.
- •Delegate commit workflow to
$commitwhen requested.
Failure handling
- •Parse failure: show parse attempt and expected heading format.
- •Dependency cycle: report cycle and stop.
- •No unblocked tasks while pending tasks remain: report unresolved blockers.
Execution summary
Return:
- •tasks completed
- •tasks failed/blocked with reasons
- •plan file path
- •validation coverage summary
Emit plan_execution_summary.json alongside the plan with fields: schema_version ("1.0"), iteration_id, plan_file, tasks_total, tasks_completed, tasks_failed, tasks_blocked. Optional: waves_executed, task_details[].
Example plan_execution_summary.json:
json
{
"schema_version": "1.0",
"iteration_id": "iter_001",
"plan_file": "experiments/iter_001/implementation_plan.md",
"tasks_total": 8,
"tasks_completed": 7,
"tasks_failed": 1,
"tasks_blocked": 0,
"waves_executed": 3,
"task_details": [
{"id": "T1", "status": "Completed", "wave": 1},
{"id": "T2", "status": "Completed", "wave": 1},
{"id": "T3", "status": "Failed", "wave": 2, "error": "validation failed"}
]
}