/ev:ev-goal <project-slug-or-path> [--until=<predicate>] [--env[=<provider>]]from ev
Autonomous driver over a project — the "human-on-call" sibling of /ev-run (ADR-0009). Self-drives phase after phase toward a goal predicate (default: all phases merged), re-entering on PR-merge/CI wake, evaluating each phase with the guild panel substrate, and pausing to ask only when a panel can't resolve a decision. Reuses the existing ev-loop-* bodies unchanged. Use when the user wants a project (or its mechanical tail) driven to completion without picking each phase by hand.
Ships in ev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Autonomous driver. Same loop bodies as /ev-run, different control
posture: instead of dispatching one phase and parking, it drives to a
goal predicate, re-entering itself on the PR-activity wake, and
escalates to the operator via AskUserQuestion only when the auto-mode
panel posture can't resolve a decision. The fork rationale and the v1
scope boundary live in
projects/adr-log/0009-fork-ev-run-human-in-loop-and-ev-goal-human-on-call.md.
Invocations of /ev-run, /ev-loop-*, and /loom-archive below mean
Skill(skill: <name>, args: "…") — the Skill tool is how the driver
re-uses those bodies. CLI invocations like loom pr discover mean
Bash("loom pr discover <args>"). Citing "/ev-run's § 3" means apply
that skill's documented procedure; it does not mean shell out to a
verb.
/ev-goal reuses, verbatim, /ev-run's Preflight (Tiers 1–3),
§ 0.5 Sync git state, § 1 Orient, § 3 next-phase policy, and
§ 4 Dispatch. It does not re-implement them — it cites
them. The only behavior it overrides is what happens at the two points
where /ev-run hands control back to a human:
| Point | /ev-run behavior | /ev-goal override |
|---|---|---|
| Phase has an open PR, nothing else unblocked (§3) | Park and stop | Park, stay subscribed, re-enter on wake |
| Phase close | Open PR, STOP | Open PR, loop to next phase |
| Decision a panel can't resolve | (n/a — human is present) | AskUserQuestion, block, continue on answer |
| Goal predicate satisfied | (n/a) | Invoke /loom-archive, stop |
<project-slug-or-path> — resolved by loom's standard slug
resolution, exactly as /ev-run.--until=<predicate> — the goal/stop condition. Default
all-merged (every phases[].status == "completed"). Recognized
forms: --until=phase:<N> (stop after phase N merges) and
--until=all-merged (explicit default). Any other predicate → stop
and ask before driving anything.--mode=auto is implied and need not be passed; /ev-goal always
runs the auto-mode panel-offload posture (see § Escalation).
--env[=<provider>] opts into provisioned-environment execution exactly
as /ev-run — /ev-goal reuses /ev-run's § Environment provisioning
verbatim, including the mode branch (ADR-0011): provision-or-reuse before
each dispatch, fall back to local on any env-* error, then — per the
provider's mode — either route loop commands via ev env exec (exec /
shared-tree) or run the whole phase inside the env via ev env dispatch <slug> --phase=<N> (dispatch / separate-tree, e.g. coder). In dispatch
mode the in-env Claude opens the phase PR, and /ev-goal's existing
PR-wake re-entry advances the drive loop on merge exactly as for a local
run. Because the handle is project-slug-keyed, every drive-loop iteration
and PR-wake re-entry reuses the one environment for the project. v1
leaves teardown manual; a v2 forward pointer is "tear down at
goal-converge, alongside the /loom-archive step" (ADR-0010 § Forward
pointers).
--parallel (requires --env, dispatch-mode providers only, e.g.
coder) opts into fanning out every simultaneously unblocked phase to
its own environment at once, instead of the normal one-at-a-time pick —
see § Parallel dispatch + convergence (ADR-0012). A no-op (falls back to
normal single dispatch) when the ready set has 0 or 1 phases in it.
Run /ev-run's Preflight, § 0.5, and § 1 unchanged. Emit
goal-loop-entered with {slug, until, decision_budget, round_budget} once, after orientation succeeds.
Repeat until the goal predicate (§ Goal predicate) is true:
Pick the next actionable phase using /ev-run's § 3 policy
(in-progress first; else lowest-numbered not-started whose
loom parse-plan dependencies are all completed).
With --parallel: before applying §3's single pick, run
Bash("loom phase ready <slug> --pretty"). If its ready array has
more than one entry AND none of them is already in-progress with an
open PR (a batch already in flight — see § Parallel dispatch +
convergence, step 2), fan out to all of them at once instead of
picking one — go to § Parallel dispatch + convergence, step 1, then
return to step 3 below once dispatched (do not also apply the
single-phase pick this turn). Otherwise (0 or 1 ready, or a batch
already dispatching), fall through to the normal single-pick behavior
below unchanged.
If a phase is actionable: dispatch it via /ev-run's § 4 — the
body is /ev-loop-interactive or /ev-loop-confidence, selected by
the same precedence (PLAN per-phase override → [config].worker_bindings
→ ev-loop-confidence default) — passing the implied auto-mode
posture. On the loop body's return,
emit goal-loop-iteration with {slug, phase, outcome} and continue
the drive loop (back to step 1).
If nothing is actionable because a phase's PR is open (the
/ev-run §3 "subscribed/park" case): do not stop. Park and
yield to the PR-activity wake. When the wake fires, the harness
re-enters /ev-goal, which resumes from § 0 (re-orient: live PR
state via loom pr discover) and re-evaluates the drive loop. On
merge, the phase is completed, its dependents unblock, and the
drive loop advances. This wake-driven re-entry IS the loop's
iteration when work is gated on review/CI.
In the local gh-only fallback (no subscription available), fall
back to /ev-run's § Wait for merge blocking poll, then re-evaluate.
If nothing is actionable and no PR is open (genuine stall): escalate via § Escalation — this is a decision the driver can't make alone (e.g. all remaining phases blocked on an external dependency).
When the goal predicate is true, emit goal-loop-converged with
{slug, phases_completed, iterations} and invoke /loom-archive <slug>. Stop.
--parallel, ADR-0012)Only reachable from § Drive loop step 1's --parallel branch. Requires
--env in dispatch mode (e.g. coder) — --parallel with an exec-mode
provider or no --env at all is a usage error: stop and report, do not
silently ignore the flag.
For each phase N in loom phase ready <slug>'s ready array, run these
three concurrently (one set per phase, not sequentially phase-by-phase):
Bash("ev env up <slug> --tag=p<N> --provider=<provider>") —
provision-or-reuse, tagged so phase N gets its own handle.Bash("ev env status <slug> --tag=p<N> --provider=<provider>") — gate
on readiness exactly as the single-dispatch path does.Bash("ev env dispatch <slug> --phase=<N> --tag=p<N> --provider=<provider>")
— the in-env /ev-run <slug> <N> --mode=auto opens phase N's PR
against the tree state at provisioning time. Safe by construction: the
ready set has no dependsOn between its members, so no fanned-out
phase is waiting on another's code.Record the batch (slugs, phase numbers, tags) for step 2. Subscribe to all N PRs as they open (the existing "open a PR, subscribe, move on" posture, generalized from one PR to N). Then park — return to the drive loop's PR-wake handling (§ Drive loop step 3) exactly as a single dispatch would, just for N PRs instead of one.
When a PR-activity wake re-enters /ev-goal and a batch from step 1 has
every member's PR open (none still mid-dispatch):
loom pr discover each batch member's branch to confirm all N are
open. If any is still dispatching, do not converge yet — keep parking
(this is the "batch already dispatching" check § Drive loop step 1
guards on, so a partially-open batch doesn't get a second fan-out
layered on top).gt track each branch not already tracked, then retarget
each PR's base sequentially (phase i bases onto phase i-1 instead
of the project's base branch), so the batch reads as one ordered stack
instead of N independent siblings.Evaluated against the manifest each drive-loop turn:
all-merged (default): every phases[].status == "completed".phase:<N>: phase <N> status is completed.The predicate is a pure read over manifest state (refreshed in § 0
orient); it never caches PR state. A phase counts toward the goal only
once its PR is merged — loom pr discover is the source of truth, the
manifest status its reconciled reflection.
Besides driving a phase graph, /ev-goal can drive a runbook
migration — the decentralized work-distribution mode (project
2026-06-30-distributed-project-store, Phases 6–8). Instead of a
manifest of phases, the inventory is MIGRATE:<dict-id> annotations in
the code referencing a runbook authored by /loom-runbook.
/ev-goal --runbook=<path> [--dict-id=<id>] [--batch=<N>] (instead of a project slug)./loom-migrate per batch (it plucks a bounded
batch, transforms it, opens one PR); re-enter on the PR-activity wake,
same as the phase loop.loom runbook scan <root> --dict=<path> [--dict-id=<id>] returns zero sites — the migration is worked off.
This replaces the all-merged manifest read for this mode.v1 runs one /loom-migrate at a time per dict-id; decentralized
claim/lease for concurrent runs is Phase 8.
/ev-goal runs the standard auto-mode posture (per
docs/AGENT-CONVENTIONS.md: divergent decisions → guild-plan,
convergent → evaluator panels, autonomous defaults auto-decided;
default budget 3 rounds × 3 decisions at the driver surface). The
single difference from a headless run: when that posture exhausts its
budget on a decision — the point at which /ev-run and the loop
bodies would write UNRESOLVED.md and stop — /ev-goal instead:
AskUserQuestion with the unresolved decision, the candidate
options the panel weighed, and a recommendation. The Claude Code
notification system surfaces this to the operator's device.goal-loop-escalated with {slug, phase, decision, resolution: 'operator'}, and resumes the drive
loop.AskUserQuestion is the only escalation channel in v1. No Slack, no
push, no async parking for check-ins. Crash recovery (a sub-agent dying
mid-phase) still uses RECOVERY-STATUS.json per
docs/AGENT-CONVENTIONS.md — that is orthogonal to escalation.
Driver-level additions to the manifest event stream, mirroring the
existing auto-mode-* vocabulary:
goal-loop-entered — {slug, until, decision_budget, round_budget}goal-loop-iteration — {slug, phase, outcome}goal-loop-converged — {slug, phases_completed, iterations}goal-loop-escalated — {slug, phase, decision, resolution}Each is appended with the same bare command existing skills use for
skill-side events — loom events append <slug> --event=<name> --detail=<json> (run as Bash("loom events append …")); there is no
dedicated verb. Event names are an open kebab-case set, so no allowlist
needs editing, but the four are typed in plugins/loom/cli/lib/types.ts
alongside the auto-mode-* events for compile-time callers.
The existing auto-mode-entered / auto-mode-converged /
auto-mode-budget-exhausted events still fire from the loop bodies and
panels underneath; the goal-loop-* events record the driver wrapping
them.
/ev-goal adds no work step the loop
bodies don't already own. If a behavior belongs in execution, it goes
in ev-loop-*, not here./ev-run's § 3,
cited not copied. Drift between the two is a bug.loom pr discover on re-entry.AskUserQuestion, not a silent default./loom-plan.--until predicate → stop and ask before driving./ev-run's § Grill-me drift handling, but
resolved via the auto-mode panel first; escalate only on budget
exhaust./ev-run §3 closed); escalate./loom-archive and stop (the success path,
not a failure).What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub krambuhl/agents --plugin ev4 skills in this plugin
/ev-loop-confidenceExecution loop for tiered-transform work. Runs a phase as a sequence of tiers, each tier processing a batch of files under a tier contract, gated by evaluator verdicts and pre-flight checks. Writes tactical retros between tiers. Dispatches to the bin/loom CLI directly; composes /guild-validate; composes no other loop. Use when a phase is a bulk transform, audit, or find-replace-style operation across many files./ev-loop-interactiveExecution loop for human-paired work. Runs a phase as a sequence of deliverables, each with its own unit contract and evaluator checkpoint. Supports sequential (ordered) and free (user picks next) deliverable ordering. Dispatches to the bin/loom CLI directly; composes /guild-validate; composes no other loop. Use when a phase is exploratory, creative, or otherwise not a bulk transform./ev-Other plugins' skills for the same job