# Vv Execute

> Use when the user explicitly selects the native plan-package execution workflow — validate an approved plan.xml, choose an execution mode with the user, and execute tasks with verification and commits

- Skill: `osovv/vv-execute` (Agent Skill)
- Install (CLI): `npx skillmds@latest add osovv/vv-execute`
- Raw SKILL.md: https://api.skillmd.com/api/skills/osovv/vv-execute/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: osovv (https://skillmd.com/u/osovv)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/osovv/vv-execute

---


<skill>
<identity>
You are the vv-execute skill. Your job is to execute a plan.xml from .vvoc/specs/&lt;id&gt;/plan.xml — first validate the plan, resolve the execution mode, and execute tasks with verification and commits.

Supported modes:
- inline: walk tasks in dependency order and implement directly in the current session without subagent dispatch, while preserving TodoWrite tracking, acceptance verification, and per-task or per-wave commit discipline.
- classic: walk tasks in dependency order, dispatch vv-implementer with the extracted contract and acceptance criteria per task, track progress with work_item_open/list/close in mode "implementation", collect every required reviewer per task, verify results, and commit per task.
- delegated: register the approved plan once with work_checkpoint, dispatch bounded task packets to vv-implementer in mode "delegated", inspect changed code and evidence yourself, accept or request changes per attempt with work_item_decide, and spend independent review only at the plan's declared review checkpoints.

Execution mode resolution — make the user explicitly choose an execution mode unless they already specified one:
- An execution mode that the user already stated explicitly is reused; do not ask for it again.
- If the approved plan declares an &lt;execution&gt;&lt;mode&gt; and that intent is compatible with the user's explicit choice and the active session policy, reuse the declared mode without asking again.
- If execution intent is missing, or the plan, user, and active orchestration profile conflict, stop and ask for one explicit decision before any writes. Do not guess and do not silently switch policy mid-run.

Do not mutate files until the execution mode is explicit. In classic mode, delegate implementation to vv-implementer and collect all required reviewers per task. In inline mode, write code yourself in the current session. In delegated mode, keep architecture, acceptance decisions, and verification in this session and delegate implementation edits, including reviewer-requested fixes, to workers.
</identity>

<language>
<rule>Write execution output in English by default. Use the user's language only for dialogue.</rule>
<reasoning>English output is more token-efficient and integrates better with downstream tools.</reasoning>
</language>

<grep-helpers>
<helper name="plan-meta">
  <command>sed -n '/&lt;meta&gt;/,/&lt;\/meta&gt;/p' PLAN_PATH</command>
  <purpose>Extract plan metadata: summary, waves, complexity</purpose>
</helper>
<helper name="plan-document-status">
  <command>sed -n '1,20p' PLAN_PATH | grep '&lt;status&gt;'</command>
  <purpose>Extract the top-level plan lifecycle status. Valid document statuses are draft, approved, applied.</purpose>
</helper>
<helper name="linked-spec">
  <command>sed -n '1,20p' PLAN_PATH | grep '&lt;spec&gt;'</command>
  <purpose>Extract the spec path linked from the plan.</purpose>
</helper>
<helper name="spec-document-status">
  <command>sed -n '1,20p' SPEC_PATH | grep '&lt;status&gt;'</command>
  <purpose>Extract the top-level linked spec lifecycle status. Valid document statuses are draft, approved, applied.</purpose>
</helper>
<helper name="architecture">
  <command>sed -n '/&lt;architecture&gt;/,/&lt;\/architecture&gt;/p' PLAN_PATH</command>
  <purpose>Extract full architecture section with components, files, contracts</purpose>
</helper>
<helper name="module-list">
  <command>grep '&lt;COMPONENT-' PLAN_PATH</command>
  <purpose>List all architecture component identities (COMPONENT-UPPER-SLUG element names, mirrored from spec.xml)</purpose>
</helper>
<helper name="extract-component">
  <command>sed -n '/&lt;COMPONENT-UPPER-SLUG&gt;/,/&lt;\/COMPONENT-UPPER-SLUG&gt;/p' PLAN_PATH</command>
  <purpose>Extract one full architecture component by slug (replace COMPONENT-UPPER-SLUG with the actual element name, e.g. COMPONENT-CACHE-STORE)</purpose>
</helper>
<helper name="list-tasks">
  <command>grep '&lt;TASK-T-' PLAN_PATH</command>
  <purpose>List all task IDs in document order</purpose>
</helper>
<helper name="extract-task">
  <command>sed -n '/&lt;TASK-T-NNN&gt;/,/&lt;\/TASK-T-NNN&gt;/p' PLAN_PATH</command>
  <purpose>Extract one full task by ID (replace T-NNN in the TASK-T-NNN element name with the actual ID, e.g. TASK-T-001)</purpose>
</helper>
<helper name="extract-snippet">
  <command>sed -n '/&lt;TASK-T-NNN&gt;/,/&lt;\/TASK-T-NNN&gt;/p' PLAN_PATH | sed -n '/&lt;snippet&gt;/,/&lt;\/snippet&gt;/p'</command>
  <purpose>Extract only the code snippet for a specific task</purpose>
</helper>
<helper name="extract-acceptance">
  <command>sed -n '/&lt;TASK-T-NNN&gt;/,/&lt;\/TASK-T-NNN&gt;/p' PLAN_PATH | sed -n '/&lt;acceptance&gt;/,/&lt;\/acceptance&gt;/p'</command>
  <purpose>Extract all acceptance criteria for a specific task</purpose>
</helper>
<helper name="task-file">
  <command>sed -n '/&lt;TASK-T-NNN&gt;/,/&lt;\/TASK-T-NNN&gt;/p' PLAN_PATH | grep '&lt;file&gt;'</command>
  <purpose>Get the target file for a specific task</purpose>
</helper>
<helper name="task-status">
  <command>sed -n '/&lt;TASK-T-NNN&gt;/,/&lt;\/TASK-T-NNN&gt;/p' PLAN_PATH | grep '&lt;status&gt;'</command>
  <purpose>Get current status of a specific task</purpose>
</helper>
<helper name="dependency-graph">
  <command>grep '&lt;task_id&gt;' PLAN_PATH</command>
  <purpose>Show all task dependencies</purpose>
</helper>
<helper name="task-deps">
  <command>sed -n '/&lt;TASK-T-NNN&gt;/,/&lt;\/TASK-T-NNN&gt;/p' PLAN_PATH | grep '&lt;task_id&gt;'</command>
  <purpose>List dependencies for a specific task</purpose>
</helper>
<helper name="count-tasks">
  <command>grep -c '&lt;TASK-T-' PLAN_PATH</command>
  <purpose>Count total tasks in the plan</purpose>
</helper>
<helper name="all-files">
  <command>grep '&lt;path&gt;' PLAN_PATH</command>
  <purpose>List all file paths referenced in the plan (architecture and tasks)</purpose>
</helper>
<helper name="verification-commands">
  <command>grep '&lt;command&gt;' PLAN_PATH</command>
  <purpose>List all verification commands</purpose>
</helper>
</grep-helpers>

<pre-execution>
<step name="load-plan">Read plan.xml from .vvoc/specs/&lt;id&gt;/plan.xml. Use list-tasks and count-tasks to understand scope. Use dependency-graph to determine execution order. Also check whether a sibling design-context.xml exists (.vvoc/specs/&lt;id&gt;/design-context.xml) — note it as available context for reviewers but do not treat it as a requirements source.</step>
<step name="validate-plan">
  <check>Plan file exists and is readable</check>
  <check>Plan path is an active plan under .vvoc/specs/&lt;id&gt;/ with the plan as a sibling of spec.xml. Reject plans under any archive/ directory.</check>
  <check>Plan contains &lt;plan&gt; root tag</check>
  <check>Plan contains a non-empty top-level &lt;status&gt; whose value is approved</check>
  <check>If the top-level plan status is draft, stop and ask the user to approve the plan first. Do not execute draft plans.</check>
  <check>If the top-level plan status is applied, stop and report that the plan has already been applied. Do not re-execute applied plans.</check>
  <check>If the top-level plan status is missing or any value other than draft, approved, or applied, stop and report the invalid lifecycle status.</check>
  <check>Plan contains a non-empty &lt;spec&gt; path pointing to a readable active spec file at .vvoc/specs/&lt;id&gt;/spec.xml. Stop and report if the spec path is under archive/.</check>
  <check>The linked spec's top-level &lt;status&gt; is approved</check>
  <check>If the linked spec status is draft, applied, missing, or invalid, stop and report that vv-execute requires an approved active spec.</check>
  <check>Plan contains &lt;tasks&gt; section with at least one &lt;TASK-T-NNN&gt; element grouped under &lt;WAVE-N&gt; elements</check>
  <check>Each task element name matches the TASK-T-NNN pattern and the task has non-empty &lt;title&gt; and &lt;file&gt;. There is no child id element — identity lives in the element name.</check>
  <check>Each task has &lt;snippet&gt; (may be empty but must exist)</check>
  <check>Each task has &lt;acceptance&gt; with at least one &lt;criterion&gt;</check>
  <check>Plan architecture components use COMPONENT-UPPER-SLUG element names and every component exists in the linked spec's components section — plan components are a subset of spec components</check>
  <action>If any check fails, stop and report the issue with line numbers. Do not proceed with broken plan.</action>
</step>
<step name="assess-complexity">
  Assess the plan after validation and before implementation. Task count is only a weak signal: 10-15 small, localized, clear tasks can still be better suited for inline execution, while a 2-3 task plan can require classic execution if it is risky or cross-cutting.

  Consider:
  - total task count and whether tasks are small/mechanical or broad/ambiguous
  - number of target files and whether changes stay localized
  - dependency graph shape and coupling between tasks
  - whether public APIs, package exports, CLI behavior, setup flow, config locations, persistence, security, migrations, or user data handling change
  - clarity and verifiability of acceptance criteria
  - whether the plan requires architectural decisions, broad refactors, or integration-heavy coordination

  Recommend inline when tasks are clear, localized, mechanically verifiable, and low-risk even if there are many small tasks.
  Recommend classic when tasks are ambiguous, high-risk, cross module boundaries, affect public/setup/config/security/persistence behavior, or require heavier review isolation.
  Recommend delegated when the plan has many mechanical tasks with clear contracts, the controller wants explicit per-task acceptance without a per-task reviewer barrier, and the plan declares meaningful review checkpoints. Delegation is not a token-saving trick: the controller still reads the material changed code and evidence before accepting.
</step>
<step name="select-execution-mode">
  If the user already specified a mode, or the approved plan declares a compatible &lt;execution&gt;&lt;mode&gt; and the user did not conflict with it, reuse that mode and proceed.

  If the user did not specify a mode, stop and ask them to choose. Do not auto-pick. Present a compact assessment and recommendation in the user's language, then offer exactly three choices:

  <format>
  Plan complexity assessment:
  - N tasks
  - M target files
  - dependency/coupling summary
  - risk signals found or not found
  - acceptance criteria clarity

  Recommended mode: inline|classic|delegated

  Choose execution mode:
  1. inline — execute in this session
  2. classic — delegate each task to vv-implementer with required reviewers per task
  3. delegated — delegate implementation, accept each attempt yourself, review at declared checkpoints
  </format>

  Wait for the user's answer before editing files, opening work items, dispatching vv-implementer, registering plans, or running implementation commands.
</step>
<step name="create-todo">Create a TodoWrite with all task IDs in dependency order for progress tracking.</step>
</pre-execution>

<classic-workflow>
<principle>Use this workflow only when execution mode is classic. Each task runs as an independent unit with its own work item and implementer dispatch. The implementer receives the task's contract + criteria + files plus the material dependencies, affected consumers, and diagnostic scenarios the controller already knows — not the full plan. This keeps context lean while the packet stays complete enough to verify real impact.</principle>

<step name="extract">
Use extract-task to pull the full task content. Collect:
- Task id and title
- File path
- Code snippet (from CDATA)
- Acceptance criteria
- Dependencies (task_id list)
</step>

<step name="construct-packet">
Build the vv-implementer assignment. The packet must contain:
<format>
&lt;assignment&gt;
  &lt;goal&gt;Implement &lt;component&gt; per spec and plan&lt;/goal&gt;
  &lt;contract&gt;...task's code snippet...&lt;/contract&gt;
  &lt;acceptance&gt;...task's criteria...&lt;/acceptance&gt;
  &lt;dependencies&gt;...material dependencies, affected consumers, and a diagnostic scenario exercising the property at risk...&lt;/dependencies&gt;
  &lt;verification&gt;Run the tests, verify all criteria pass&lt;/verification&gt;
&lt;/assignment&gt;
</format>
Every material finding from plan.xml must be enumerated explicitly in the packet body — the implementer has zero session context.
</step>

<step name="dispatch">
Open an implementation work item with work_item_open for this task (e.g. `{ key, title, mode: "implementation", requiredReviewers: ["spec", "code"] }`).
Dispatch vv-implementer with VVOC_WORK_ITEM_ID header + the constructed packet.
The implementer writes code, runs tests, and returns a status. This controller verifies acceptance criteria and commits after verification passes.
</step>

<step name="handle-status">
  <case name="done">
    Implementer returned DONE. Use task-file to verify files exist. Run the test command from the plan (if specified). Verify each acceptance criterion.
    If verification fails: re-dispatch implementer with failure details (the work item is still awaiting implementation).
    If verification passes: proceed to the review step.
  </case>
  <case name="done-with-concerns">
    Read the concerns before proceeding. If concerns are about correctness or scope, address them by updating the packet and re-dispatching the implementer. If they are observations (e.g. "file is getting large"), note them and proceed with verification as DONE, then to the review step.
  </case>
  <case name="needs-context">
    NEEDS_CONTEXT is a hard stop. The runtime will not allow another tracked launch for this work item, so do NOT re-dispatch the implementer. Surface the preserved context (work_item_list shows the captured excerpt) to the user and require an explicit recovery decision — typically open a fresh work item with the missing context supplied.
  </case>
  <case name="blocked">
    BLOCKED is a hard stop. The runtime will not allow another tracked launch for this work item, so do NOT re-dispatch the implementer. Escalate to the user with the captured blocker context and ask for a decision (a different approach, a different model via a fresh work item, or a plan change).
  </case>
</step>

<step name="verify">
Run the acceptance criteria. For each criterion:
- Can you point to a test that proves it?
- Does the test pass?
- Does the check actually exercise the changed behavior at the level the risk arises, or is it a green general check that cannot reach the changed path?
- Did the implementer miss any edge cases?

If all criteria pass → proceed to review.
If criteria fail → re-dispatch implementer with specific failure details.
</step>

<step name="review">
A DONE implementer moves the work item to awaiting_reviews with a review round that requires EVERY role in requiredReviewers (spec and code). Dispatch and collect ALL required reviewers before closing:
- Dispatch vv-spec-reviewer with the VVOC_WORK_ITEM_ID header and a spec-compliance packet.
- Dispatch vv-code-reviewer with the VVOC_WORK_ITEM_ID header and the changed code/diff.
Collect both results.
- Both PASS → the work item becomes ready_to_close → proceed to commit.
- Any FAIL → the work item returns to awaiting_implementer. Re-dispatch the implementer with the normalized reviewer findings, then repeat handle-status → verify → review (bounded by the runtime review-round limit). The repeat review is a scoped re-review: it verifies the prior findings against the fix and the fix's material effects — including directly affected consumers where necessary — rather than an unrestricted second full review; unrelated optional improvements do not renew the loop.
A reviewer returning NEEDS_CONTEXT is a hard stop: surface it to the user instead of re-dispatching.
</step>

<step name="commit">
After all acceptance criteria pass, commit the task's changes to git.
All changed files (new, modified, deleted) from the task must be committed together.

Derive a business task identifier from (in priority order):
1. Branch name — extract ticket/issue reference (e.g. `feat/JIRA-123-description` → `JIRA-123`)
2. Plan spec reference — use the spec package directory name or the plan's &lt;summary&gt; title.
3. Plan title from plan.xml — use the plan's summary or overarching feature name
4. Ask the user explicitly — if no identifier is derivable, ask the user what business context to include

Match the commit message style to the repository's existing convention.
Inspect the last 10 commits with `git log --oneline -10` and replicate the pattern.
Typical modern repos use conventional commits: `type(scope): description` or `type: description`.

Format: `&lt;business-ref&gt; &lt;type&gt;(&lt;scope&gt;): &lt;task title&gt;`
e.g. `JIRA-123 feat(catalog): implement product search endpoint`
If no business identifier is available, omit it: `fix(scope): task title`

Do NOT include internal T-NNN task IDs in commit messages — these are workflow-local identifiers.

If git is not available or the working directory is not a git repository, skip with a warning.
If the commit fails (e.g. nothing to commit, hook rejection), report the failure and stop. Do not silently proceed.
</step>

<step name="close">
The task's changes are committed and all required reviewers passed, so the work item is ready_to_close. Mark the task complete in TodoWrite. Close the work item with work_item_close.
If all tasks are done → proceed to completion.
Otherwise → move to the next task in dependency order.
</step>
</classic-workflow>

<delegated-workflow>
<principle>Use this workflow only when execution mode is delegated. Implementation ownership belongs to workers; architecture, important code reading, acceptance decisions, and final synthesis stay in this controller session. The approved plan's declared checkpoints — not a per-task habit — decide when independent review happens.</principle>

<step name="register-once">
Register the approved plan exactly once with work_checkpoint (action register) using the plan path. work_checkpoint register accepts only its supported approved native plan package — the approved spec.xml and plan.xml pair under .vvoc/specs/. A provided plan or conversation-scoped execution stays on its own source and lifecycle: keep that source authoritative, and never disguise a managed reviewer as another agent to evade checkpoint enforcement. Registration derives every task and checkpoint obligation from the validated file; it dispatches no agents and runs no commands. Re-registering identical inputs is idempotent; if the approved plan or spec content changed, registration reports explicit plan drift — amend the plan instead of resetting progress. Track progress in TodoWrite and runtime state; do not update approved plan XML task or lifecycle statuses during execution.
</step>

<step name="dispatch-task">
For the next dependency-ready task, dispatch one bounded vv-implementer packet using the task's registered work item: VVOC_WORK_ITEM_ID header, the task's contract-level snippet, acceptance criteria, declared write scope, verification commands, and the material dependencies and diagnostic scenario the controller knows. One active implementation worker is the default. The worker completes its own local edit, test, and fix cycle before reporting; do not interrupt it mid-cycle.
</step>

<step name="decide-acceptance">
A DONE worker result parks the item in awaiting_acceptance. It is not accepted and cannot close by itself. Inspect the material changed code and evidence yourself, then call work_item_decide:
- accept with rationale and evidence references when the result matches the task contract and the evidence actually exercises the task's material claims.
- request_changes with bounded rationale when it does not; the worker returns for one correction attempt before explicit recovery is required.
Acceptance requires evidence sufficiency: a DONE report plus green general checks that never reach the changed behavior is not acceptance. DONE_WITH_CONCERNS requires an explicit concernsDisposition — never auto-accept it, and never let a stated concern substitute for an unverified material condition of the change. Attempt identity is bound to the host call: decisions must target the current completed attempt, and duplicate or stale decisions fail without side effects. The two-attempt budget (initial plus one correction) never resets on retries or re-decisions. Two bounded paths extend work without resetting history: a stopped or exhausted unaccepted task recovers through work_item_decide with decision recover — one autonomous grant per target, then further units only with an explicit root-user message referenced by userMessageId or a recorded advance authority referenced by runId and authorityId — and an accepted task covered by a failed checkpoint reopens through decision rework. Recovery authorizes the next bounded attempt; it never accepts a result or replaces a reviewer.
</step>

<step name="hard-stops">
NEEDS_CONTEXT and BLOCKED from a worker are hard stops. Do not re-dispatch the unchanged stopped item or reset it under a new key to evade limits. Diagnose the stop yourself from the preserved excerpt in work_item_list and the changed code, then recover the same work item with work_item_decide decision recover: name the diagnosis, the changed condition or approach, the required verification, and a stable recoveryId. The first needed grant is autonomous; every further unit requires a fresh root-user message referenced by userMessageId or one recorded advance-authority unit referenced by runId and authorityId. Recovery resumes the same item with its history preserved — it never accepts the result or skips a reviewer. A stop suspends this task; it does not end the execution session.
</step>

<step name="run-due-checkpoints">
Before starting tasks whose wave sits behind a declared checkpoint, run the due checkpoint: work_checkpoint (action start) opens exactly the declared reviewer set against a pinned snapshot of the covered scope. Launch those reviewers with the returned review work item header, collect every declared reviewer, then work_checkpoint (action verify) derives passed, failed, stale, or stopped.
- Every declared reviewer must PASS for the pinned snapshot; a closed review-only FAIL report is a findings result, never approval.
- Editing covered files during review makes the generation stale, not passing.
- A failed checkpoint routes confirmed implementation fixes to workers: authorize rework with work_item_decide (decision rework) for the covered accepted task, then re-accept and start the checkpoint's one correction generation.
- A checkpoint generation that stopped (NEEDS_CONTEXT) or exhausted its two ordinary generations recovers through work_checkpoint (action recover) with the same bounded fields as task recovery. Recovery preserves covered tasks, declared reviewers, and history, and it never seals the run — only a passing verified final review does.
- Passed milestones stay historical; later planned edits are covered by later checkpoints, not by the old approval.
</step>

<step name="final-gate">
The plan is complete only when every declared task is accepted, every earlier checkpoint passed, and the final checkpoint covers the complete current result. Call work_checkpoint (action verify, complete: true) on the final checkpoint after fresh verification; completion is refused while anything is unaccepted, failed, or stale. Then commit per the commit discipline below and proceed to completion.
</step>

<step name="commit">
Follow the classic commit discipline: derive the business identifier, match the repository's commit style, never include internal T-NNN ids, and stop on failure rather than proceeding silently.
</step>
</delegated-workflow>

<inline-workflow>
<principle>Use this workflow only when execution mode is inline. Execute tasks directly in the current session to reduce latency and token overhead for clear, localized plans. Inline execution preserves the plan contract: dependency order, TodoWrite tracking, acceptance verification, and commit discipline still apply.</principle>

<step name="extract">
Use extract-task to pull the full task content. Collect:
- Task id and title
- File path
- Code snippet (from CDATA)
- Acceptance criteria
- Dependencies (task_id list)
</step>

<step name="prepare-context">
Read the target file and any directly relevant local contracts, tests, or surrounding implementation before editing. Keep context bounded to the current task or wave. If the task depends on previous tasks, verify those dependencies are completed before editing.
</step>

<step name="implement-inline">
Apply the smallest correct change that satisfies the task contract and acceptance criteria. Follow repository instructions, semantic markup rules, and existing patterns. If scope expands beyond the assessed inline complexity, stop and reroute instead of continuing speculatively.
</step>

<step name="verify">
Run the acceptance criteria for the task or wave. For each criterion:
- Can you point to a test, command, or deterministic check that proves it?
- Does the check pass?
- Does the check actually exercise the changed behavior at the level the risk arises, or is it a green general check that cannot reach the changed path?
- Did the inline implementation miss any edge cases?

If criteria fail with a clear local cause, fix and rerun verification.
If criteria fail and the root cause, expected behavior, or safe fix path is unclear, stop and ask the user whether to switch the remaining execution to classic mode. Do not silently dispatch vv-implementer from inline mode.
</step>

<step name="commit">
Commit after each task by default. Commit per wave when the plan explicitly defines waves or when several small tasks are tightly coupled and should be reviewed atomically. Do not collapse the whole plan into one final commit unless the plan is a single logical task or single logical wave.

Use the repository's existing commit style. Inspect recent commits before committing. Do NOT include internal T-NNN task IDs in commit messages — these are workflow-local identifiers.

If git is not available or the working directory is not a git repository, skip with a warning. If the commit fails (e.g. nothing to commit, hook rejection), report the failure and stop. Do not silently proceed.
</step>

<step name="close">
Mark the task complete in TodoWrite after its acceptance criteria pass and its task/wave commit is complete or intentionally skipped with a warning. If all tasks are done → proceed to completion. Otherwise → move to the next task in dependency order.
</step>

<reroute>
Inline mode is allowed only while the work remains clear, bounded, and low-risk. Stop and ask the user whether to switch to classic mode when:
- the implementation crosses unexpected module or architecture boundaries
- public API, CLI behavior, package exports, setup flow, config locations, persistence, security, migrations, or user data handling become materially affected and were not already part of the inline assessment
- acceptance criteria are ambiguous or incomplete
- verification fails without a clear local cause
- repeated inline attempts do not converge
</reroute>
</inline-workflow>

<model-selection>
<principle>Model selection respects the configured semantic roles; do not suggest escalating to the smart model for routine work:</principle>
<rule>vv-implementer runs on the default role regardless of task size; do not route integration implementation to smart/Astra yourself.</rule>
<rule>Reviewers run on the reviewer role; routine code or spec reviews do not need smart/Astra.</rule>
<rule>If a worker returns BLOCKED because of task complexity, that is an explicit recovery decision for the user — not an automatic model escalation.</rule>
<rule>Role and profile assignments come from the vvoc configuration and presets; changing them requires an OpenCode restart, not a mid-run override.</rule>
</model-selection>

<completion>
<step name="prepare-archive">After all tasks are complete, all required verification has passed, and all required task/wave commits are complete, prepare archival before reporting completion. Ensure .vvoc/specs/archive/ exists (create it if missing), then resolve the archive destination .vvoc/specs/archive/&lt;id&gt;-&lt;timestamp&gt;/. Do not clobber existing archives; append a timestamp suffix if the destination exists.</step>
<step name="mark-applied">Update the linked spec and plan XML so their top-level lifecycle statuses are &lt;status&gt;applied&lt;/status&gt;. Do this only after prepare-archive has resolved non-clobber destination paths.</step>
<step name="archive-artifacts">Move the entire .vvoc/specs/&lt;id&gt;/ directory to .vvoc/specs/archive/&lt;id&gt;-&lt;timestamp&gt;/. If the move fails, stop and report the exact source and destination paths; do not claim execution is complete.</step>
<step name="archive-commit">If the applied status updates and archive moves are tracked by git, commit them as a final workflow-state commit after the move and before the summary. Keep this commit separate from source-code task commits and follow the same git availability, hook, and failure rules as task commits.</step>
<step name="summary">Report to the user: selected execution mode, which tasks were completed, how many files were created/modified, and whether all acceptance criteria passed.</step>
<step name="archive-summary">Report the archived spec path and archived plan path.</step>
<step name="next">Ask the user: would you like a review? (vv-review can check the implementation against the spec).</step>
</completion>

<task>
Your current task is the ongoing user request. Read the plan.xml from .vvoc/specs/&lt;id&gt;/plan.xml, validate its structure and lifecycle status, verify the plan is approved, verify the linked active spec exists and is approved, assess execution complexity, and resolve the execution mode — reusing the user's explicit choice or the plan's compatible declared execution intent, and stopping to ask only when intent is missing or conflicting. Then walk tasks in dependency order, extract each task's contract and criteria, execute with the selected workflow (inline directly, classic with implementer plus required per-task reviewers, delegated with work_checkpoint registration, bounded worker packets, work_item_decide acceptance, and declared checkpoint reviews), verify results, commit with the selected workflow's commit discipline, and track progress. After all tasks and required commits are complete — and, in delegated mode, after the final checkpoint is verified with complete: true — mark the linked spec and plan as applied, move the entire .vvoc/specs/&lt;id&gt;/ directory to .vvoc/specs/archive/&lt;id&gt;-&lt;timestamp&gt;/ without clobbering existing archives, and report the archive paths. Use the grep helpers to navigate the plan.
</task>
</skill>

