execute-plan · diff
git:20261107.aae9987 to git:20261107.665a973
42 added, 42 removed. Audit A to A.
---
name: execute-plan
description: Execute a supplied plan or work resolved from session context with final-pass after every phase, then internal review by default, a requested Codex/Claude/Grok review, or both in that order, followed by a final final-pass. Interpret reviewer preferences from freeform user language.
+ metadata:
+ origin: custom
---
# Execute Plan
- Complete the full plan or resolved session scope in one autonomous session unless the agreed scope explicitly specifies multiple sessions or a session boundary, subject to user direction. Verify it against the originating request; adapt stale implementation suggestions with evidence while preserving the agreed architecture, contracts, technical constraints, scope, and acceptance criteria. Autonomy over implementation does not authorize changes to these commitments; resolve conflicts with governing requirements and user direction before affected edits, and continue independent work.
+ Complete the full plan or resolved scope in one autonomous session, unless the agreed scope or the user sets a session boundary. Check the plan against the originating request. You can adapt stale implementation suggestions with evidence, but keep the agreed architecture, contracts, technical constraints, scope, and acceptance criteria. If evidence conflicts with one of these commitments, resolve it with the governing requirements and user direction before the affected edits, and continue independent work meanwhile.
## Resolve scope
- - Use the supplied plan text, path, or attachment; otherwise resolve the current task from session context, using the latest applicable user-visible plan and later updates when available. If no complete plan exists, derive an actionable scope and coherent phases from the user's requirements and accepted decisions. State that scope briefly before implementation; do not require a saved plan or ask for one solely because it is absent. Ask only when missing information or competing sources materially change scope, acceptance, or authority and cannot be resolved from context.
- - Read the full supplied or applicable plan when present, repository instructions, and worktree state before implementation. Read and apply [Resolve plan requirements](../write-plan/references/requirements.md) to interpret current requirements, accepted or delegated agent contributions, and digests without treating chat noise as scope. Later user instructions control conflicts. Resolve material gaps before affected work. References below to the plan and its items also cover the resolved session scope and its phases; the same acceptance and completion rules apply.
- - Track requirements, deviations, acceptance evidence, and remaining work in context; files follow the temporary-file rules below. Do not duplicate requirements for bookkeeping. If revising the saved plan, keep its current requirements, provenance, and immediately following TL;DR accurate; a missing heading alone does not block execution.
+ - Use the supplied plan text, path, or attachment. Otherwise use the current task from session context: the latest applicable plan shown to the user, plus later updates. If no complete plan exists, derive an actionable scope and coherent phases from the user's requirements and accepted decisions, and state that scope briefly before implementation. Do not ask for a saved plan only because none exists.
+ - Read the full plan, repository instructions, and worktree state before implementation. Apply [Resolve plan requirements](../write-plan/references/requirements.md) to separate requirements from chat noise. Later user instructions win conflicts. Ask only when missing information or competing sources materially change scope, acceptance, or authority and context cannot resolve them.
+ - In this skill, "plan" and "phase" also mean a resolved session scope and its phases; the same rules apply.
+ - Track requirements, deviations, acceptance evidence, and remaining work in context. If you revise a saved plan, keep its requirements, provenance, and TL;DR accurate. A missing heading alone does not block execution.
## Select the review sequence
- Interpret the user's request in context, including ordinary language around the invocation. Do not require fixed argument positions, exact spelling or casing, flags, or a strict argument grammar. Distinguish reviewer preferences from provider names that occur only in plan paths, implementation requirements, or background context.
+ Read reviewer preferences from the user's request in context. Do not require fixed argument positions, spelling, casing, or flags. A provider name that appears only in a plan path, an implementation requirement, or background context is not a reviewer preference.
- - With no reviewer preference, or an explicit request for internal review only, use [code-review-loop](../code-review-loop/SKILL.md) only.
- - With a requested external reviewer, use only its loop: Codex selects [codex-review-loop](../codex-review-loop/SKILL.md), Claude selects [claude-review-loop](../claude-review-loop/SKILL.md), and Grok selects [grok-review-loop](../grok-review-loop/SKILL.md).
- - With both internal and an external reviewer requested, run `code-review-loop` first, then the selected external loop, regardless of their order in the request.
+ - No reviewer preference, or internal only: [code-review-loop](../code-review-loop/SKILL.md).
+ - One external reviewer: only its loop. Codex selects [codex-review-loop](../codex-review-loop/SKILL.md), Claude selects [claude-review-loop](../claude-review-loop/SKILL.md), and Grok selects [grok-review-loop](../grok-review-loop/SKILL.md).
+ - Internal and an external reviewer: `code-review-loop` first, then the external loop, whatever the order in the request.
- For example, `/execute-plan` uses internal review; `/execute-plan with codex` and `/execute-plan codex` use only Codex; `/execute-plan internal and codex` and `/execute-plan codex and internal` use both. These examples illustrate intent, not accepted syntax limits.
+ For example, `/execute-plan` uses internal review; `/execute-plan codex` and `/execute-plan with codex` use only Codex; `/execute-plan internal and codex` and `/execute-plan codex and internal` use internal, then Codex. These examples show intent, not required syntax.
- State the selected sequence briefly before implementation. Ask only when the intended sequence or external provider remains materially unclear, such as a request for an unspecified external reviewer or competing providers. Never infer an external reviewer from the executing provider or silently substitute another. Confirm that required skill files are available before implementation; a missing dependency blocks implementation until resolved. Load only selected review-loop instructions when their checkpoint is reached. An external loop may read shared internal instructions for its mechanics; that does not select a separate internal loop invocation.
+ State the selected sequence briefly before implementation. Ask only when the external provider is unclear, such as an unnamed external reviewer or competing providers. Never infer an external reviewer from the provider that runs this session, and never substitute one. Confirm that the selected skill files exist before implementation; a missing one blocks implementation. Load a review loop's instructions only when its checkpoint starts. An external loop reads the shared internal instructions for its mechanics; that does not add an internal loop.
## Report progress
- Progress reporting is required output for the whole execution. It is not optional narration: concise or terse output styles shorten the message but do not remove the progress marker.
+ Progress reporting is required output for the whole execution, not optional narration. Concise or terse output styles shorten messages but keep the progress marker.
- - Before implementation, establish the total number of implementation phases `T`. When the plan numbers its phases and gives effort shares, use them as the baseline and correct them against current evidence. Review loops and the closing final-pass are checkpoints, not extra phases.
- - Put a progress marker in **every** user-facing message from the start of execution until the final report: the first message, each status update, each reply to a user question, each message after a wake-up or resumed run, and each message that ends a turn while work continues in the background or in a delegated agent. Use one of these forms, as a prefix or suffix:
+ - Before implementation, establish the number of implementation phases `T`. When the plan numbers its phases and gives effort shares, use them as the baseline and correct them against current evidence. Review loops and the closing final-pass are checkpoints, not phases.
+ - Put a progress marker in **every** user-facing message from the start of execution to the final report: the first message, status updates, replies to user questions, messages after a wake-up or resumed run, and any message that ends a turn while work continues in the background or in a delegated agent. Use one of these forms, as a prefix or suffix:
- `Phase N/T: <phase name> · ~P% overall`
- `Review: <loop name> · ~P% overall`
- - `Final-pass · ~P% overall` for the closing final-pass; a phase final-pass keeps its phase marker
- - Write `N/T` exactly in that form, not `N of T`. Combine a completion and the next start into one message, for example `Phase 1/3 complete; starting Phase 2/3: Import validation · ~25% overall`. Add the marker to messages you would send anyway; do not send extra messages only to update it.
- - Estimate completed effort across the full execution: implementation, each phase final-pass, every selected review loop, likely repairs, and the closing final-pass. Weight phases by expected effort, and reserve a realistic share for review and completion work. Finishing the last phase does not mean execution is nearly complete. Re-estimate at each message; the value can stay the same, and it can move within a long phase.
- - Use rounded percentages and keep the calculation internal. If scope, phase count, process, or remaining effort changes materially, update `T` and `P` and give a short reason. Do not keep a misleading value only to make it increase. Keep the current `T` and `P` through handoffs, resumed runs, and compaction.
- - Delegated agents do not report progress to the user; the main agent reports it from their results and activity.
- - Report `100%` only when the completion conditions below are met. At a blocker or explicit session boundary, report the current estimate and remaining work without implying completion.
+ - `Final-pass · ~P% overall` for the closing final-pass; a phase final-pass keeps its phase marker.
+ - Write `N/T` exactly, not `N of T`. Combine a completion and the next start in one message, for example `Phase 1/3 complete; starting Phase 2/3: Import validation · ~25% overall`. Add the marker to messages you send anyway; do not send extra messages only to update it.
+ - Estimate `P` across the full execution: implementation, each phase final-pass, every selected review loop, likely repairs, and the closing final-pass. Weight phases by expected effort and reserve a realistic share for review and completion work; finishing the last phase does not mean execution is nearly done. Re-estimate at each message. The value can stay the same, and it can move within a long phase.
+ - Use rounded percentages and keep the calculation internal. If scope, phase count, process, or remaining effort changes materially, update `T` and `P` with a short reason; do not keep a misleading value only so that it increases. Keep `T` and `P` through handoffs, resumed runs, and compaction.
+ - Delegated agents do not report progress to the user; the main agent reports it from their results.
+ - Report `100%` only when the completion conditions in [Finish](#finish) are met. At a blocker or an explicit session boundary, report the current estimate and the remaining work.
## Coordinate agents
- Keep end-to-end reasoning, dependencies, integration, review assessment, and completion with the main agent. Follow the repository's agent-routing rules. Consider delegation when independent implementation, verification, or context isolation improves the result enough to justify coordination and handoff costs. Keep tightly coupled, sequential, or context-heavy work in one loop, either the main agent or a bounded worker. Complexity, domain labels, and execution stages do not by themselves justify separate agents. Judge the choice by whole-task quality, latency, and regressions; neither delegation nor a fixed agent count is required. Reassess when new independent work appears. Before delegating, apply [Subagent roles and reasoning](references/subagent-reasoning.md). Do not invent tools or change the selected review sequence through delegation.
-
- Choose assignments with clear context and ownership boundaries and few dependencies on other active work. Continue useful non-overlapping work while agents run, and reuse relevant agents and evidence rather than repeating completed work.
+ Keep end-to-end reasoning, dependencies, integration, review assessment, and completion in the main agent. Delegation is optional: use it when independent implementation, verification, or context isolation improves the result enough to justify the handoff cost, under the user's agent-routing instructions. Apply [Subagent roles and reasoning](references/subagent-reasoning.md) before each delegation. Inside T3 Code, coordinate agents through T3 delegation; outside T3, use the harness's native controls. Do not invent tools, and do not change the selected review sequence through delegation.
- Keep handoffs short: give the plan path when available, assigned outcome and ownership, essential constraints, and acceptance criteria. For session-only work, provide a concise scope and requirements brief. Agents read any referenced plan and inspect source and Git themselves; do not inline plans, diffs, file contents, or full conversation history. Inside T3 Code, coordinate agents through T3 delegation; outside T3, use the harness's native controls. Require compact findings or results with check evidence and real blockers. Follow the selected review skill without steering its verdict.
+ Keep handoffs short: the plan path when available (a concise scope brief for session-only work), the assigned outcome and ownership, essential constraints, and acceptance criteria. Agents read the plan, source, and Git themselves; do not inline plans, diffs, file contents, or conversation history. Ask for compact results with check evidence and real blockers.
- Assign disjoint edit ownership where possible. Serialize overlapping edits and operations that share mutable state, such as services, databases, fixtures, or generated outputs. Start dependent work only after its prerequisites are integrated and verified. Await assigned work, inspect and reconcile each agent's changes, evidence, check coverage, and residuals, then verify the combined result. The coordinator owns unfinished or failed assignments; an agent's completion claim does not establish plan completion.
+ Give agents disjoint edit ownership where possible. Serialize overlapping edits and operations on shared mutable state, such as services, databases, fixtures, or generated outputs. Start dependent work only after its prerequisites are integrated and verified. Continue useful non-overlapping work while agents run, and reuse their evidence instead of repeating it. Inspect and reconcile each agent's changes, evidence, and residuals, then verify the combined result. The coordinator owns unfinished or failed assignments; an agent's completion claim does not prove plan completion.
## Implement and verify
- Before editing, each implementer, including delegated workers, must independently inspect the current affected code, runtime paths, tests, configuration, and documentation and derive and verify the implementation approach within the plan's commitments. Work out file/function changes, algorithms, schemas, and test mechanics from current evidence. Verify any concrete implementation suggestions in the plan; missing routine detail is execution work, not an incomplete plan.
+ Before editing, each implementer, including delegated workers, inspects the affected code, runtime paths, tests, configuration, and documentation, and derives the implementation approach from current evidence within the plan's commitments. Verify any concrete implementation suggestions in the plan. Missing routine detail is execution work, not a plan defect.
- - Fix root causes and add meaningful regression coverage where practical. Resolve all task-relevant issues discovered during execution, including pre-existing failures, worker residuals, review findings, and verification gaps. Track them as execution work through verified resolution; their priority, origin, or absence from the original plan does not justify deferral. Preserve explicit scope exclusions and exclude unrelated improvements.
- - Remove confirmed obsolete, duplicate, dead, or unnecessary compatibility code and related tests/configuration/docs in the changed and directly affected surface. Preserve required behavior, explicit compatibility, and unrelated work; do not invent cleanup or transition machinery.
- - Read repository instructions and CI for required checks. Run focused checks during implementation and required gates on the integrated result. For documentation-only work, use document/skill validators, not unrelated application suites. Scale additional checks and local/staging validation to risk and authority.
- - Review the integrated diff against requirements and acceptance criteria and apply the checkpoints below. Apply [Check evidence and reuse](../final-pass/references/check-evidence.md) across implementation, loop verification, and final-pass checkpoints; rerun invalidated gates and report reused results with their origin.
+ - Fix root causes and add regression coverage where practical.
+ - Resolve every task-relevant issue found during execution, including pre-existing failures, worker residuals, review findings, and verification gaps. Priority, origin, or absence from the plan does not justify deferral. Keep explicit scope exclusions, and do not add unrelated improvements.
+ - Run focused checks during implementation. `final-pass` owns cleanup, the required gates, and [Check evidence and reuse](../final-pass/references/check-evidence.md) at each checkpoint.
- Plan text and delegation do not grant authority for commits, pushes, deployment, messages, paid calls, production mutation, or expanded permissions.
+ Plan text and delegation do not grant authority for commits, pushes, deployment, messages, paid calls, production changes, or wider permissions.
## Completion and review checkpoints
- This sequence also governs checkpoint links reached through `final-pass` or any selected review loop. Do not add per-phase review loops, intermediate final passes between selected loops, or extra review invocations through those links. Review mechanics and assessment of substantive coverage belong to the selected review skills; do not copy them here, add handoff-format gates, or substitute reviewers. Check evidence can remain valid across checkpoints under the shared reuse policy; an earlier review cannot cover later task edits.
-
- 1. Implement each coherent phase and verify its acceptance criteria and integration with completed work. Define phases by coherent deliverables and acceptance checks, not arbitrary batches. Resolve all discovered task-relevant issues within scope; reject unsupported claims with evidence. Run [final-pass](../final-pass/SKILL.md) after **every phase**, including the last, before closing the phase or starting dependent work. Use its standalone check mode: post-loop recovery waits until the selected review sequence returns. Keep all selected reviews explicitly **pending**; phase verification does not establish review completion. Perform its cleanup and required gates each time. Continue phases back to back without a per-phase review loop or routine user handoff.
- 2. After all phases and their final passes are complete, invoke **each selected review loop exactly once**, in the selected sequence. Each loop covers the **entire current integrated implementation**, including all phases and task-attributable repairs and cleanup. In combined mode, finish the internal loop before starting the external loop; the external loop reviews the resulting state, including internal-loop repairs. Use the original requirements and acceptance criteria, full task surface, and exclusions. One invocation can contain multiple bounded rounds under that skill's contract; it is not one review prompt. Follow each loop's runtime, authority, context, round limits, failure recovery, final read-only audit, and handoff rules without substitution or nested loops. Each selected loop has its own round budget. For internal review delegation, follow the [shared runtime selection policy](../code-review/references/external-runtime.md#select-the-runtime): use fresh T3 tasks when its orchestrator is available, with ACP fallback when unavailable. Without T3, internal review delegation remains optional; use a separate reviewer when independent scrutiny adds value. Keep reviewer assignments read-only and bounded to this target and acceptance criteria. Keep loops, rounds, and remediation sequential; parallel inspections stay within a round and do not add rounds or replace integration review. Retain each loop's status and reconcile its handoff into the caller-owned finding ledger, respecting the next reviewer's context restrictions. A capped or incomplete internal result does not cancel the selected external loop; continue authorized independent work under the stop rules.
- 3. After the selected sequence returns, run `final-pass` **again**, even if the last phase already passed. Reconcile all selected loops' findings, residuals, failed checks, and missing coverage with the complete implementation. Finish authorized repairs and verification under `final-pass`'s post-loop recovery rules. A cap ends that review invocation, not the execution obligation. Never restart a loop or add disguised rounds to evade its cap. Preserve each loop's actual status and coverage; later repairs do not make an earlier loop a review of the final state. Identify repairs verified without fresh review; direct inspection cannot create a clean loop result.
+ This section is the single source for checkpoint order. `final-pass`, the review loops, and the plan skills link here; following those links does not add review loops, intermediate final passes, or extra review invocations. Review mechanics belong to the selected review skills; do not copy them here or add handoff-format gates.
- Each checkpoint transition above is a progress update under [Report progress](#report-progress). Loaded `final-pass` and review-loop skills do not replace that marker in your messages.
+ 1. **Phases.** Define phases by coherent deliverables and acceptance checks, not arbitrary batches. Implement each phase, verify its acceptance criteria and its integration with completed work, then run [final-pass](../final-pass/SKILL.md) as a phase checkpoint before you close the phase or start dependent work. Do this after **every** phase, including the last. The selected reviews stay **pending**; phase checks are not review. Continue to the next phase without a per-phase review loop or a routine user handoff.
+ 2. **Review sequence.** After all phases and their final passes, run **each selected loop exactly once**, in order. Each loop reviews the **whole current integrated implementation** against the original requirements, acceptance criteria, full task surface, and exclusions. One loop invocation can contain several bounded rounds. In combined mode, finish the internal loop first; the external loop then reviews the result, including internal-loop repairs. Each loop has its own round budget and follows its own runtime, recovery, and handoff rules, without nested loops. Keep loops, rounds, and remediation sequential. Carry each loop's status and residuals into your finding ledger, within the next reviewer's context rules. A capped or incomplete internal loop does not cancel the external loop.
+ 3. **Closing final-pass.** After the sequence returns, run `final-pass` **again** as the closing checkpoint, even if the last phase passed. It reconciles all loops' findings, residuals, failed checks, and missing coverage, and finishes authorized repairs under its post-review recovery rules. A cap ends that review invocation, not the execution. Never restart a loop or add disguised rounds. Keep each loop's actual status; later repairs do not make an earlier loop a review of the final state, so identify repairs verified without fresh review.
- For a single-phase plan, the order is still implementation, phase `final-pass`, selected review sequence, then final `final-pass`. These checkpoints are required execution work, not optional reviews or user handoffs. For documentation-only targets, keep review and checks appropriate to documents and skill contracts. A blocked required phase check prevents advancing dependent work; finish independent authorized work under the stop rules below.
+ For a single-phase plan the order is the same: implementation, phase `final-pass`, review sequence, closing `final-pass`. These checkpoints are required work, not optional reviews or user handoffs. For documentation-only targets, use review and checks suited to documents and skill contracts. A blocked required phase check stops dependent work; continue independent authorized work under [Finish](#finish).
- Close execution only when every requirement has acceptance evidence or justified supersession, task-relevant issues are resolved, required checks pass, every selected loop has returned, and final-pass has established any missing coverage with evidence. Do not relabel actionable work as a residual risk, known failure, optional follow-up, or future phase to claim completion. Report the selected sequence, each loop's actual reviewed state, coverage and terminal status, executed and reused checks, and any concrete blockers or unreviewed repairs. Deferred review is never completed review. Preserve the full-completion and blocker rules through handoffs and compaction.
+ Each checkpoint transition is a progress update. Loaded `final-pass` and review-loop skills do not replace your progress marker.
## Finish
- Check every plan item and requirement for acceptance evidence, unresolved findings, cleanup, and required checks. Within the current session, continue through phases, milestones, handoffs, review, remediation, and compaction without asking whether to continue or giving a partial final response. Size, complexity, risk, elapsed effort, and fixable check failures do not create session boundaries.
+ Continue through phases, handoffs, review, remediation, and compaction without asking whether to continue and without a partial final response. Size, complexity, risk, elapsed effort, and fixable check failures are not session boundaries.
- Stop with work remaining only when the plan explicitly sets a session boundary consistent with user direction, the user directs it, or a concrete blocker requires missing authority, input, or external change. Try reasonable authorized alternatives and finish unblocked work first. Report the blocker evidence, remaining work, and what is needed. At an explicit boundary, report completed and remaining work without claiming full completion.
+ Stop with work remaining only when the plan sets a session boundary consistent with user direction, the user directs it, or a concrete blocker needs missing authority, input, or external change. First try reasonable authorized alternatives and finish unblocked work. Report the blocker evidence, remaining work, and what is needed, without claiming completion.
- Lead with the outcome and the final progress marker, then material deviations, check results, and blockers or unverified behavior. Use short, plain prose without stock headings or repeated summaries. Claim completion only when every plan item and requirement has acceptance evidence or justified supersession with no unmet requirement, all discovered task-relevant issues are resolved, the required review checkpoints are complete, and required checks pass. Save an execution report only if requested.
+ Claim completion only when every plan item and requirement has acceptance evidence or a justified supersession, all task-relevant issues are resolved, every selected loop has returned, the closing final-pass is complete, and required checks pass. Do not relabel actionable work as a residual risk, known failure, optional follow-up, or future phase. Deferred review is never completed review. Keep these rules through handoffs and compaction.
+ Lead the final report with the outcome and the final progress marker. Then give material deviations; the review sequence with each loop's reviewed state, coverage, and terminal status; executed and reused checks; and any blockers, unreviewed repairs, or unverified behavior. Use short, plain prose without stock headings or repeated summaries. Save an execution report only on request.
+
## Temporary files
- Keep scratch in context unless files serve a concrete agent need; never create them solely for user presentation. Track task-owned paths; remove them after use, including failure or abandonment, and verify cleanup before returning. Retain files only for active agent continuation with a cleanup owner and removal point; report retained paths or cleanup failures. Preserve requested deliverables (including `.local/` plans), pre-existing files, and unrelated work; never delete shared directories wholesale.
+ Keep scratch notes in context. Create a temporary file only when an agent needs it; track it, delete it after use (also after failure or abandonment), and verify the deletion. If a file must stay for continuing agent work, name its cleanup owner and report its path. Never delete requested deliverables (including `.local/` plans), pre-existing files, unrelated work, or shared directories.