/goalkeeper:goalfrom goalkeeper
Sets or checks status of a durable goalkeeper goal via /goal. Runs contract-driven goals with checkpoint validation and judge-gated completion across many turns.
Ships in goalkeeper. 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.
You are operating the goalkeeper skill — durable, contract-driven goal execution with judge-gated completion. This skill is invoked when the user runs /goal or /goal "<objective>".
Every goalkeeper state transition is executed by the gk CLI, not by you writing files:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/gk.py" <command>
Abbreviated below as gk <command>. Resolve ${CLAUDE_PLUGIN_ROOT} to the goalkeeper plugin's root directory once and reuse the absolute path.
Never hand-write state.json, active.json, chain.json, or append to log.md with Edit/Write. The canonical state shapes live in scripts/gk.py (and are asserted by scripts/test-gk.py); a PreToolUse hook shipped with this plugin blocks direct edits to the active goal's contract.md, log.md, and state.json — the audit trail and contract immutability are mechanical guarantees, not requests. If a gk command refuses, it is telling you something about state — read its message; do not work around it by editing files.
Commands you will use here: gk status, gk activate <slug>, gk checkpoint <slug> --message "...", gk validate <slug>, gk log <slug> --compact, gk verdict (via the goal-judge skill), gk park <slug> --needs "..." (human-gated blocker: frees the slot so other work continues), gk doctor (if state ever looks inconsistent).
/goal / /goal "<objective>")Main conversation context runs the full Execution Loop (do work → checkpoint → validate → judge → branch on verdict), using ScheduleWakeup to pace iterations. This is the default when the user invokes /goal directly.
/goal-chain)When /goal-chain orchestrates, each goal's implementation work runs in a fresh-context executor subagent; main context only orchestrates (spawn executor → spawn judge → apply verdict). This keeps main-context cost flat (~10K tokens per goal) so multi-goal chains complete in one session. See goal-chain/SKILL.md for the orchestration protocol.
The Execution Loop below applies in BOTH modes — the difference is who runs it: main context with ScheduleWakeup pacing (inline), or the executor subagent end-to-end in one turn (subagent). Both modes share the same on-disk state via gk.
args non-empty → set mode (start or resume a goal)args empty → status mode (report on active goal)Run gk status and relay its output to the user. The Parked section is the human's unblock queue — each entry names exactly what a person must provide and the gk resume <slug> that restarts it. If a goal reports NEEDS_HUMAN, also surface the latest judge fix-list from the goal's log verbatim (gk log <slug> --compact).
Derive slug: extract or generate a kebab-case slug from the objective (≤64 chars, lowercase, alphanumeric and hyphen only). If the user passed an explicit --slug=<value>, use that.
Contract resolution:
.claude/goals/<slug>/contract.md exists, treat the request as a resume: skip prep, jump to step 3./goal-prep with the same objective. Do not write a thin one-line contract — prep is mandatory because the contract IS the spec. After prep completes and writes the contract, return here.Activate: run gk activate <slug>. This captures the git baseline (commit + dirty paths), merges any prep-captured validator baseline, writes the canonical state files, and logs the activation. If it refuses because another goal is active, surface that to the user — do not --force on your own judgment.
Begin the execution loop (next section).
This block runs on activation AND on every ScheduleWakeup re-entry.
gk status, then read contract.md and gk log <slug> --compact to know where work left off.active, stop. Do not schedule another wakeup.checkpoint_cadence in the contract — e.g. ~5 file edits, ~20 minutes of effort, or one logical sub-task).gk checkpoint <slug> --message "<one short paragraph: what changed, files touched, decisions made, what's next>".gk validate <slug>. Exit 0 = pass, exit 1 = fail. gk updates state and appends the log entry; the output tail is printed for you.ScheduleWakeup (see Pacing below). Wakeup prompt:
Continue active goalkeeper goal — run gk status and proceed per the goal skill execution loop.
gk validate (~3–5 inner attempts). If still failing, return to the chain orchestrator with STATUS: validator_fail + a clear BLOCKERS field per the executor directive in goal-chain/SKILL.md.gk judge-brief, spawns the judge, and applies the verdict with gk verdict.STATUS: validator_pass + the structured summary fields.DONE — the goal is complete and archived state is terminal. Surface a one-paragraph completion summary to the user.NEXT: <slug> / CHAIN_COMPLETE — chain bookkeeping happened automatically; defer to the goal-chain skill's orchestration.RETRY — judge rejected within budget. Schedule the next iteration with the fix-list as the primary task. Wakeup prompt:
Continue active goalkeeper goal — judge rejected the last attempt. Read the most recent "judge rejected" block via gk log <slug> --compact and address each fix-list item. Then proceed per the goal skill execution loop.
NEEDS_HUMAN — max rejections reached. gk parked the goal: the active slot is free and the need is recorded in state. Do NOT schedule a wakeup for this goal. Surface the fix-list verbatim, point at gk resume <slug> --reset-rejections / /goal-clear — then move on to other work. The goal is parked, not you: a human-gated stop on one goal never idles the agent.Mid-loop, if you hit a blocker only a human can clear (a credential, consent, account access, a decision that is the user's to make): gk checkpoint the exact blocker, then gk park <slug> --needs "<exactly what a person must provide>" and continue with other work. A blocker an agent could solve (missing tool, unclear code, failing environment) is work — solve it, never park it.
wakeup_seconds from the contract verbatim if set.The first three are mechanically enforced (PreToolUse hook + gk refusals) — treat a block or refusal as state information, never as an obstacle to route around.
contract.md mid-run. If the spec is wrong, stop and ask the user to amend it explicitly via /goal-clear + new prep.gk checkpoint / gk verdict./goal-resume.What SKILL.md sets; muted values are Claude Code's defaults
8 skills in this plugin
/goal-chainRun a linear sequence of goalkeeper goals where the judge gates progression between them. Use when the user invokes /goal-chain "<file>" to start a chain. Chain bookkeeping (cursor, approvals, activation) is executed by the gk CLI./goal-clearStop and archive the currently active goalkeeper goal. Use when the user invokes /goal-clear to abandon or finalize a goal. Files are moved to .claude/goals/_archive/, never deleted./goal-judgeThe gate. Reviews the active goalkeeper goal against its definition-of-done and either approves (advance / mark done) or rejects (with a structured fix-list). Auto-fired by the goal skill when the validator passes (inline mode), or invoked by the goal-chain orchestrator after executor subagent returns (subagent mode). Can also be invoked on demand via /goal-judge for advisory review.npx claudepluginhub bonfire-systems/goalkeeper --plugin goalkeeperOther plugins' skills for the same job