From varp
Execute a Varp plan by dispatching tasks to subagents with capability enforcement
How this skill is triggered — by the user, by Claude, or both
Slash command
/varp:executeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are the orchestrator. You execute a Varp plan by dispatching tasks to subagents, enforcing capabilities, and maintaining project consistency. You stay at the meta level — you manage context windows, not code.
You are the orchestrator. You execute a Varp plan by dispatching tasks to subagents, enforcing capabilities, and maintaining project consistency. You stay at the meta level — you manage context windows, not code.
Priority: correctness > safety > throughput.
varp_health mode=manifest to load the component registry~/.claude/projects/<project>/memory/plans/. Load via varp_parse_plan.log.xml exists alongside the plan, load it to resume from the last completed task/tmp/claude/varp-cost.json if it exists. Record the totalCostUSD, inputTokens, and outputTokens values as the plan start baseline. If the file doesn't exist, skip cost tracking silently.Classify the plan based on its scope shape, then follow the corresponding protocol:
Single-scope — all tasks write to the same component (or the plan has only one task).
varp_check_warm_staleness with the agent's component scope and last-active timestamp. If safe_to_resume is false, either start cold or inject the summary into the resumed agent's prompt as a staleness warningSequential multi-scope — tasks write to different components but have RAW dependencies that prevent parallelism.
varp_schedule mode=waves — expect single-task wavesParallel multi-scope — tasks write to different components with independent waves.
varp_schedule mode=all to derive waves, hazards, and critical path in one callIf varp_schedule reports a cycle, check whether all tasks share a write component. If so, downgrade to single-scope mode (sequential by task ID). If not, the plan has a structural problem — report to the human and stop.
For each task (or wave of tasks in parallel mode), follow these steps. Steps marked with a mode indicator are conditional — skip them when they don't apply.
Pick the next executable task(s).
Check that execution preconditions hold.
<verify> commands for any conditions relevant to this taskCall varp_resolve_docs with the task's touches declaration to get doc paths.
Do not read the doc files yourself. The orchestrator resolves paths; the subagent reads content. Your job is to tell the subagent which docs to read, not to understand the implementation details.
For each component in the task's write set, check if it has an env field in the manifest. If so, verify those environment variables are set. If any are missing, log a warning and ask the human before dispatching — the subagent's tests will likely fail without them.
Cost snapshot (pre-task): Read /tmp/claude/varp-cost.json before dispatching. Record the totalCostUSD value.
Send the task to a subagent using the Task tool. Assemble the prompt:
Stability-aware dispatch: When dispatching to a stable component with many dependents, emphasize in the subagent prompt that changes must preserve backward compatibility. When dispatching to an experimental component, allow more exploratory latitude.
<action> element<values> element, as a priority orderingcritical="true" invariantsThe subagent prompt must mandate:
COMPLETE | PARTIAL | BLOCKED | NEEDS_REPLANWarm resumption: If the next task shares a component scope with the just-completed task and no intervening writes occurred, resume the previous subagent session instead of starting cold.
Receive the result. Cost snapshot (post-task): Read /tmp/claude/varp-cost.json again. Compute the delta from the Step 4 pre-task snapshot to get the task's cost_usd.
Record in log.xml:
cost_usd on the <metrics> element (if cost tracking is active)Call varp_health mode=freshness for the task's write components. If any docs are stale after the subagent completed:
This catches the common failure mode where subagents implement code + tests but skip doc updates.
Call varp_verify_capabilities with:
touches (reads and writes)If violations found (files modified outside declared write set):
Capability violations are always errors.
If the project has Nx, Turborepo, or moon installed, cross-check the task's actual impact against its declared touches using the tool's affected analysis. This is advisory — log discrepancies as warnings, don't block execution.
Nx:
nx show projects --affected --files=<comma-separated modified files> --json
Turborepo:
turbo query '{ affectedPackages(base: "HEAD~1", head: "HEAD") { items { name reason { __typename } } } }'
Compare the affected set against the task's declared touches. If a project appears as affected but isn't in the task's read or write set, log an advisory warning: "Component X was structurally affected but not declared in touches — consider adding it as a read dependency."
This catches undeclared read dependencies that varp_verify_capabilities cannot detect (it only checks writes). Structural impact != behavioral impact, so these are signals for the planner to review, not hard errors.
Skip this step if no monorepo tool is available.
When to run: After all tasks in the current wave complete (not between individual tasks within a wave). In single-scope mode, this runs after each task since each task is its own "wave."
<verify> commands, especially critical="true" ones<verify> commands for completed tasksIf a critical invariant fails:
If a non-critical invariant fails:
If the task's exit status is not COMPLETE:
Call varp_derive_restart_strategy with the failed task, all tasks, and completion state.
| Strategy | Action |
|---|---|
isolated_retry | Redispatch the task (max 2 retries) |
cascade_restart | Cancel affected wave, restart from failed task forward |
escalate | Stop execution, report to human with diagnosis |
After 2 failed retries on the same task, escalate regardless.
Call varp_invalidation_cascade with the components whose docs were updated.
For each affected component:
Skip this step in single-scope mode — there are no cross-component dependencies to invalidate.
Mark the task complete in log.xml and check progress:
plans/<name>/ to plans/archive/<name>/When CLAUDE_CODE_ENABLE_TELEMETRY=1 is set, Claude Code exports per-request metrics and events with a session.id attribute. Combined with the log.xml <session started="..."> timestamp, this enables filtering external OTel dashboards (Grafana, Datadog, etc.) to the exact execution window — useful for per-model cost breakdowns and cache analysis beyond what in-session statusline captures.
When the final task/wave completes and all postconditions pass (plan is archived), generate a project status snapshot:
/tmp/claude/varp-cost.json. Compute the delta from the plan start baseline (Step 0). Write the <cost> element to log.xml with total_cost_usd, total_input_tokens, and total_output_tokens.varp_health mode=all to get the current component registry, doc freshness, and lint results in one callOutput a summary section at the end of the execution report:
## Post-Execution Status
### Doc Freshness
| Component | Status |
|-----------|--------|
| <name> | fresh / N stale docs |
### Lint
<total_issues> issues (<errors> errors, <warnings> warnings)
<list any new issues, grouped by category>
This replaces the need to manually run /varp:status after execution completes.
The orchestrator's value is in managing context windows, enforcing scope boundaries, and maintaining the execution DAG. It should never need deep understanding of any component's internals.
Write execution metrics to log.xml alongside the plan.
<log>
<session started="ISO-8601" mode="single-scope|sequential|parallel" />
<cost total_cost_usd="0.45" total_input_tokens="125000" total_output_tokens="18000" />
<tasks>
<task id="1" status="COMPLETE">
<metrics tokens="24500" minutes="8.2" tools="15" cost_usd="0.12" />
<files_modified>
<file>src/auth/rate-limit.ts</file>
<file>src/auth/rate-limit.test.ts</file>
</files_modified>
<postconditions>
<check id="post-1" result="pass" />
</postconditions>
<observations>
<observation>Rate limiting uses sliding window algorithm with Redis</observation>
</observations>
</task>
</tasks>
<invariant_checks>
<wave id="1">
<check result="pass">All tests pass</check>
<check result="pass">TypeScript compiles</check>
</wave>
</invariant_checks>
<waves>
<wave id="1" status="complete" />
</waves>
</log>
| Tool | When | Mode |
|---|---|---|
varp_health | Initialization, Step 6, Step 12 | All (mode=manifest, freshness, or all) |
varp_parse_plan | Initialization | All |
varp_schedule | Initialization | Sequential/Parallel (mode=waves, all) |
varp_resolve_docs | Step 3 | All |
varp_verify_capabilities | Step 7 | All |
varp_derive_restart_strategy | Step 9 | All |
varp_invalidation_cascade | Step 10 | Parallel |
npx claudepluginhub phibkro/vevx --plugin varpOrchestrates plan-driven builds by reading plan.json or requirements.md and dispatching workers. Use when executing /execute or running a blueprint plan.
Executes implementation plans by dispatching tasks to implementer and reviewer subagents. Tracks progress per-task and coordinates sequential phases.
Executes written implementation plans: loads and critically reviews them, runs tasks in dependency order with parallel dispatch, separate worker-validator subagents, and verifies completion.