---
name: plan-todo-implementer
description: Orchestrate delegated implementation of plan-todo artifacts with parent-owned review.
disable-model-invocation: true
---

# Orchestrated plan implementation

Implement the complete handoff produced by `plan-todo`:
- `.selesai/tasks/plan.md`: authoritative context and plan-wide acceptance.
- `.selesai/tasks/todo.md`: task IDs, ownership, dependencies, and task-level gates.

One task per writer assignment, not one task per run or one writer globally.
The parent orchestrates the whole backlog and reviews results; subagents write
implementation code. Do not spawn reviewer subagents.

Load and follow `pi-subagents` for delegation authorization, launch mechanics,
parallelism, isolation, and async lifecycle. This skill supplies execution
guidance, not delegation authorization.

## 1. Establish the execution contract

Read both artifacts completely and inspect the current working tree.
Use an explicitly supplied task directory instead of the default when provided.
Require an explicitly user-specified writer model and reasoning effort for
this run. If either is unspecified, ask the user for the missing value before
launching writers. Do not infer these values from configured defaults or the
parent model, and do not silently substitute unsupported values.

Build a task board from all todo IDs: accepted, ready, blocked, or active.
Verify existing completion claims before treating them as prerequisites.
Resolve blocking scope or contract decisions in the parent without inventing
user agreements. Preserve unrelated work.

**Done:** every todo ID is accounted for, dependency and ownership boundaries
are understood, and writer configuration is resolved.

## 2. Dispatch ready assignments

Schedule ready tasks in dependency waves, respecting the plan's shared-file
and integration ownership. Let `pi-subagents` choose safe execution shapes.
Split oversized assignments at independently checkable boundaries rather than
sending the whole implementation to one writer.

Give each writer fresh context and a concise handoff containing:
- Repository/cwd/ref and allowed edit boundary.
- Full read-only `plan.md`.
- Only its assigned todo task or bounded subtask, including its ID.
- Required source leads and accepted prerequisite/interface results.
- Concrete actions where the parent needed to clarify the task.
- Acceptance criteria, validation, and the report contract from `todo.md`.

Do not pass the remaining actionable backlog. Tell writers to keep task source
documents read-only, avoid scope expansion and nested delegation, and report
missing prerequisites or unresolved decisions instead of guessing. If the full
plan cannot fit, report the blocker rather than silently trimming it.

**Done:** each launched writer has one bounded assignment with satisfied
prerequisites and checkable gates.

## 3. Review results and advance the board

Review each returned diff and validation evidence yourself against its task
criteria and the plan's constraints. A writer's success claim is not acceptance.
Send blocking findings back as bounded correction assignments. If corrections
stop making progress, record the blocker rather than retrying indefinitely.

Only the parent marks todo checkboxes complete, after all assigned subtasks
are accepted. Carry accepted interface changes and evidence into downstream
handoffs. Keep dependent tasks blocked until acceptance; continue independent
ready work under `pi-subagents` lifecycle rules.

Return to dispatch as tasks become ready. Yield with a revisit trigger when
only async work remains; an async launch is not completion of the plan.

**Done:** every returned assignment is accepted or has concrete blocking
findings, and task status and downstream readiness reflect that decision.

## 4. Close the complete plan

Ensure the designated integration work has landed, then verify the integrated
result against every plan-wide acceptance and validation gate. Route required
code fixes back to writers; review stays with the parent.

**Done:** every todo ID is accepted and plan-wide gates pass, or every remaining
ID is explicitly reported blocked with its reason and required next action.
Report completed IDs, integrated validation evidence, and remaining blockers.
Do not claim the plan is implemented merely because individual writers finished.
