Real reject-cycle, 3 minutes wall-clock. Goalkeeper caught a MAX_RUNTIME_MS = 9999 // TODO sentinel placeholder in a benchmark test where the validator passed both rounds. Round 1: validator green, judge reject on DoD #3 + #7 with a 3-step fix-list. Round 2: real threshold (500ms = 10x measured baseline) with justification, validator green, judge approve. Full transcript with quoted verdicts: docs/demo.md. Long-form writeup on dev.to.
How it differs
| OpenAI Codex /goal | Ralph loop | goalkeeper |
|---|
| Durable goal across many turns | ✓ | ✓ | ✓ |
| Validator back-pressure | optional | core | core |
| Independent judge gate against an explicit Definition of Done | — | — | core |
Anti-placeholder rule (stubs / .todo / it.only auto-reject) | — | informal | enforced |
| Linear chains of role-specific goals with judge-gated handoff | — | — | /goal-chain |
| Auto-pauses after N consecutive rejections | — | — | 5 (configurable) |
| Append-only checkpoint log per goal | — | informal | enforced |
| Spec lives in | CLI prompt | PROMPT.md | contract.md (validated against JSON Schema) |
| Pre-existing validator failures distinguished from goal-caused | — | — | validator_baseline_* |
Inspired by OpenAI Codex /goal and Geoffrey Huntley's Ralph loop, with one key addition: the judge.
Why
Codex /goal runs autonomously until a stop-condition is met. The Ralph loop runs while :; do cat PROMPT.md | claude-code; done and leans on validators (compile, test, lint) to back-pressure the model. Both work, but both have the same failure mode: a passing validator is not the same as a finished feature. Tests can pass on stubs. Linters can pass on .todos. Codex can declare victory the moment its stop-condition string matches.
goalkeeper adds a second gate. After your validator passes, a fresh subagent — independent context, no rationalizations from the executing agent — reviews the diff and the progress log against your written Definition of Done, and either approves or returns a structured fix-list. After 5 rejections it pauses and asks for human help.
Install
Add the goalkeeper marketplace, then install the plugin:
# inside Claude Code
/plugin marketplace add bonfire-systems/goalkeeper
/plugin install goalkeeper@goalkeeper
Skills become available under the goalkeeper: namespace. Invoke as /goalkeeper:goal "<objective>", /goalkeeper:goal-prep, /goalkeeper:goal-judge, etc. (Most users alias the namespace away — see "Aliasing" below.)
Aliasing the namespace
If you primarily use goalkeeper and want shorter commands, add aliases to ~/.claude/settings.json:
{
"aliases": {
"/goal": "/goalkeeper:goal",
"/goal-prep": "/goalkeeper:goal-prep",
"/goal-pause": "/goalkeeper:goal-pause",
"/goal-resume": "/goalkeeper:goal-resume",
"/goal-clear": "/goalkeeper:goal-clear",
"/goal-judge": "/goalkeeper:goal-judge",
"/goal-chain": "/goalkeeper:goal-chain"
}
}
Quick start
/goal-prep "Migrate the test suite from Jest to Vitest"
goalkeeper reads your repo, asks a few targeted questions (objective, definition-of-done, validator command, non-goals), writes .claude/goals/<slug>/contract.md, and offers to start. Once running, it: