/long-haul:haul-goalfrom long-haul
Converts .longhaul/SPEC.md into a measurable /goal condition with end state, transcript-demonstrable check, constraints, and round cap. Iterates with user until condition is sharp.
Ships in long-haul. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Phase 2 of long-haul. Converts .longhaul/SPEC.md into a completion
condition you can hand to Claude Code's /goal, written to .longhaul/GOAL.md.
This condition is the target the whole haul steers by — get it sharp.
/goal's evaluator is a fast model that, after every turn, reads only the
conversation (it runs no tools) and decides yes/no. A strong condition has all
four parts:
pytest tests/x -q exits 0, bench/run.py prints p95 <= 40ms, git status clean.or stop after N rounds, so a goal that can't be met still terminates. Use ROUNDS from STATE.md (default 8).Keep it ≤ 4000 characters. Pull the end state and check straight from SPEC.md's "Done looks like".
The evaluator only sees chat, so the condition's check must be a named command
whose output appears in the transcript — not "the tests pass" but pytest tests/x -q with its exit line shown. Reject any success signal that isn't: if
proving it needs a tool run, running it and surfacing the output is part of the
loop's job. Emit a copy-pasteable proof line — the exact command — that
haul-loop echoes verbatim each round and haul-ship re-runs at the end. A goal
whose proof never lands loops forever.
When the real artifact isn't locally runnable, the proof line rides on the
committed-test proxy named in SPEC.md (e.g. a static/AST check standing in
for a live Airflow run).
The proof line is only trustworthy if it runs the right code in the right
environment. Record the exact invocation in GOAL.md, not just the command:
which interpreter / venv / conda env (e.g. /opt/miniconda3/envs/dp/bin/python,
not bare python), and — when the haul runs in a git worktree — whether the
worktree actually executes the worktree's code. Editable installs are the classic
trap: an editable pip install -e points at the main repo, so a worktree
executable silently runs old code unless PYTHONPATH=<worktree-root> is set, and
the haul "passes" against code it never changed. If the check imports the package
directly from the tree (most pytest layouts) it's fine — but say which case
applies. A proof that's secretly run in the wrong env is worse than no proof.
If SPEC.md names two tiers (a cheap per-round ratchet check and an
expensive/external/one-shot acceptance gate), the condition carries both,
but they play different roles — and saying so in the /goal text is what stops the
evaluator from declaring victory on the cheap half:
haul-loop captures the baseline/prediction before firing.A pure cheap-and-headless goal has no gate — the ratchet is the whole condition.
If SPEC.md's success signal is missing, fuzzy, or not transcript-demonstrable,
do not paper over it — the goal would loop forever, since the evaluator can
never see the proof. Go back to the user with the AskUserQuestion tool — one
question per call, each offering 2–4 concrete options as tabs (the user can pick
Other to free-type) — until the end state is a single measurable thing with a
check whose output Claude can print. This iteration is the point of the phase;
don't shortcut it to produce a goal you know is unverifiable.
.longhaul/SPEC.md. If the success signal isn't measurable + demonstrable, iterate with the user (above) before drafting..longhaul/GOAL.md (template in ../long-haul/reference/file-formats.md): the condition, the literal /goal … line, the proof line (the exact command the loop echoes each round — with its exact interpreter/env per "Pin how the check is invoked"), the acceptance gate and its pasted-evidence form if "done" has one, and a note on why the check is transcript-demonstrable.GOAL: (one-line restatement) in STATE.md, advance PHASE: haul.You cannot execute a slash command yourself. Present the line and hand off:
Goal condition ready. Review it, then run this yourself to start the haul:
/goal <condition>Once it's active, each turn I'll run one haul-loop round — deciding explore vs exploit and keeping only measured wins — until the condition holds.
Set STATUS: WAITING-USER: approve-goal. Wait for the user to approve (and
possibly edit) and to actually run /goal. Only then does the haul begin.
If invoked standalone (not by the orchestrator), note that once /goal is
active, haul-loop takes each turn until the goal clears, then haul-ship ships.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
long-haul, goal-creation, completion-condition, spec-to-goal
5 skills in this plugin
/haul-loopPhase 3 of long-haul — the per-turn loop. Under an active /goal, each turn run exactly one round: decide explore (a fresh approach off the base commit) vs exploit (refine the incumbent), implement the attempt in a git worktree following the /implement contract, run the goal's stated check, and keep the attempt only if it beats the incumbent — a ratchet that never regresses. Writes R<N>.md, surfaces the check output in chat. Pass --background to detach the whole haul into a nohup'd driver that survives terminal/session close (for overnight/remote runs), logging a structured block per loop to PROGRESS.log. Use as the iteration phase of a long-haul run./haul-shipPhase 4 of long-haul — the finishing move. Fires once the /goal condition is met (the goal auto-clears) or the round cap trips. Reports goal-vs-achieved with the final check output, the explore/exploit path each round took, and the net kept diff; then commits the incumbent on a feature branch and opens a PR. Always confirms the branch and PR body with the user before pushing. Use as the last phase of a long-haul run./haul-specPhase 1 of long-haul. Turn the user's ask into a well-defined spec — a located deliverable, a transcript-demonstrable success signal, the toolbox of skills + MCP the haul may use, constraints, and out-of-scope. If the ask is vague, grill it first. Produces .longhaul/SPEC.md. Use as the first phase of a long-haul run, or standalone to harden a fuzzy ask into something buildable before setting a goal./long-haulAuto-chaining orchestrator for a solo long-horizon goal loop. Sharpen a spec (grill it if vague), forge a /goal completion condition, then haul toward it turn after turn in a git worktree — each turn deciding explore (a fresh approach off the base) vs exploit (refine the incumbent), keeping only measured wins, until the goal holds. Use when the user wants one agent driven relentlessly toward a verifiable target over many turns — not a one-shot edit. Reach for it when the user says "keep working until", "loop until done", "long haul", or hands a spec to be built to completion.npx claudepluginhub ccomkhj/skills --plugin long-haulOther plugins' skills for the same job