goal-chain
Run 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.…
The 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
$ npx -y skills add bonfire-systems/goalkeeper --skill goal-judge --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/goal-judgeContext preview
The summary Claude sees to decide when to auto-load this skill.
The 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
name: goal-judge description: The 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.
You are operating the **goal-judge** skill — the gate that decides whether a goal is actually done, not just superficially passing the validator. The judge is what differentiates goalkeeper from a naive auto-loop.
The gk CLI (`python3 "${CLAUDE_PLUGIN_ROOT}/scripts/gk.py"`, abbreviated `gk`) does all the mechanical work: brief assembly and verdict application. Your job is spawning the judge and relaying its output faithfully.
1. **Inline mode** — the `/goal` skill's execution loop auto-fires the judge when the validator passes. 2. **Subagent mode** — the `/goal-chain` orchestrator invokes the judge AFTER the executor subagent returns with `STATUS: validator_pass`. The executor never invokes the judge itself. 3. **Advisory on-demand** — user runs `/goal-judge` directly for a non-binding read on an in-progress goal (does not advance state).
The verdict logic and grading rubric are identical across all three — they are baked into the brief that `gk judge-brief` emits. Only the invocation context differs.
gk judge-brief <slug> [--executor-summary <file>]
This emits the complete, self-contained judge prompt: contract verbatim, compacted log, diff scope (git baseline, pre-existing dirty paths, validator baseline subtraction), the deduped file list to read end-to-end, the filtered diff (lockfiles/build outputs/IDE files excluded, plus contract `diff_excludes`), and the verdict-format instructions — including the requirement that **every MET verdict cites file:line evidence**.
In subagent mode (chain-driven), first write the executor's structured return (STATUS / SUMMARY / VALIDATOR_OUTPUT_TAIL / FILES_CHANGED) to a scratch file and pass it via `--executor-summary` — the brief marks it as a leading hint the judge must independently verify.
Do not edit, trim, or "improve" the brief. Comparable verdicts across runs require identical prompt shape — that is the whole reason assembly is mechanical.
Read `judge_mode` from the contract (default `subagent`); an explicit `--mode=` arg overrides — and is recorded, not trusted: `gk judge-brief` mints a single-use judge token stamping the mode actually run, and `gk verdict` consumes that token. A verdict without a prior brief is refused, a consumed token cannot be reused, and an inline-minted token cannot deliver a gate-quality approval on a contract that requires `subagent`. Pass `--mode=inline` to judge-brief when running inline so the record is honest.
**subagent (the gate-quality mode, default):** spawn a fresh **general-purpose** subagent via the Agent tool with the brief as its entire prompt. Independent context is the point — it catches placeholders and shortcuts the executing agent rationalized away. Never use inline mode for chain gating or final completion.
**inline (advisory only):** do the brief's task yourself in this turn, re-reading everything fresh; do not consult prior conversation reasoning about the work.
For a final chain link, or when the user asks for extra rigor: spawn 2–3 judge subagents in parallel, each given the same brief plus one added lens directive —
Approve only if ALL approve; on any reject, merge the fix-lists into one deduplicated list and apply as a single reject verdict. Default remains the single judge — the panel is for gates where a wrong approve is expensive.
Pipe the judge's **complete structured response** (VERDICT / REASONS / FIX_LIST / NOTES, verbatim) into gk:
gk verdict <slug> approve <<'EOF' ... EOF gk verdict <slug> reject <<'EOF' ... EOF
gk updates state, appends the log entry (reasons and fix-list verbatim), handles the rejection threshold, and — when a chain is active — records the link approval and advances the cursor atomically. Read its output:
Durable contract-driven goal execution for Claude Code. A subagent judge gates completion against an explicit Definition of Done.
Repo: bonfire-systems/goalkeeper
Run 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.…
Stop and archive the currently active goalkeeper goal. Use when the user invokes /goal-clear to abandon or finalize a goal. Files are moved to…
Pause the currently active goalkeeper goal without losing state. Use when the user invokes /goal-pause. The goal can later be resumed with /goal-resume.
Interactively draft a goalkeeper contract before executing. Use this skill when the user invokes /goal-prep "<rough idea>", or when /goal is called for a slug…
Resume a paused or needs_human goalkeeper goal. Use when the user invokes /goal-resume after they've manually unblocked the goal (e.g. fixed a problem the…
The mission-level supervisor. One level above goals. Reads the user's mission charter and the most-recently-completed goal's artifacts, then decides whether to…