goal

A command that keeps a group of coding agents working toward a completion condition until two checks—one critical review and one fresh review—both pass.

In plain words
What is it for?
Use it for unattended implementation and verification tasks where you can describe what “done” means.
Why use it?
It removes the need to repeatedly restart the work or monitor each cycle yourself. A safety limit can stop the process if it runs too long or repeats too many times.

Command

Part of the crew plugin — 5 commands, 3 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/alphabravo-oss/guild/goal
Clone the repo
git clone --depth 1 https://github.com/alphabravo-oss/guild

Or install crew, the plugin that ships this one along with the rest of its 5 commands, 3 agents.

Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,000 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.04000
Opus 5 $0.00009 $0.02000
Sonnet 5 $0.00003 $0.00800
Haiku 4.5 $0.00002 $0.00400

Measured 2d ago against content hash 1c29902fe7e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

goal scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat ~/.claude/.adhoc-strict-mode 2>/dev/null || echo "MISSING"
plugins/crew/commands/goal.md · 355 lines

How it starts

The opening of the file, as written. The whole thing — 355 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Crew Goal Orchestrator

You are the crew goal orchestrator. The user invoked /crew:goal <condition> — they handed you a completion condition and walked away. Your job: run crew's build-verify loop unattended, cycle after cycle, until the condition is met — critic AND fresh-eyes both return pass — or a safety cap stops you.

This is the unattended sibling of /crew:do. Same agents, same evidence discipline. The differences: no plan-approval checkpoint, no budget questions, the loop runs to the goal instead of stopping at a 3-cycle cap, and a Stop hook (scripts/goal-gate.py) enforces that you cannot end the turn while the goal is unmet.

The condition

$ARGUMENTS

Parse $ARGUMENTS into:

  • condition: all free-form text that is not a flag — the completion condition, and the contract for "done."
  • flags.max_cycles: integer after --max-cycles= (default 20)
  • flags.max_hours: number after --max-hours= (default 4)
  • flags.allow_production: true if --allow-production appears
  • flags.paranoid: true if --paranoid appears

If condition is empty, tell the user how to use /crew:goal (see crew:help) and stop.

A good condition names one measurable end state and how to prove it — e.g. "every test in test/auth passes and npm run lint exits 0", or "the /workloads page renders live pod data, verified by loading it in a browser". The condition becomes the worker's verification surface.


PHASE 0 — preflight + initialize

0a. Preflight: adhoc strict gates

An unattended run cannot survive an interactive block. The adhoc plugin's strict gates (grounding audit + critic-dialog) HARD-block and require an interactive /adhoc:trust-me to clear — that would deadlock this run.

Check the adhoc strict-mode marker:

cat ~/.claude/.adhoc-strict-mode 2>/dev/null || echo "MISSING"

If the output is anything other than exactly off, tell the user and STOP — do not start the run:

Cannot start an unattended goal run — adhoc strict gates are not confirmed off.

adhoc's critic-dialog gate HARD-blocks after 5 rounds and needs an interactive /adhoc:trust-me to clear. That deadlocks an unattended run.

  • If adhoc is installed: run /adhoc:strict-off, then re-run /crew:goal.
  • If adhoc is NOT installed: run /adhoc:strict-off anyway — it just writes the off marker — then re-run.

For the cleanest unattended run also consider /adhoc:citations-off and /adhoc:uncertainty-off. Those gates self-resolve in an extra turn and won't deadlock, so they are not required.

Read the full file on GitHub · 355 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 355 lines · 17 tokens per session scan B 1c29902fe7e7

Subscribe to this mod's changes

goal is a command published in the GitHub repository alphabravo-oss/guild (2 stars, last pushed 3d ago), licensed MIT. It adds 17 tokens to every session and 4,000 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.