AI Compass / Knowledge cards
Let Claude work until the goal is met
with /goal
/goal is a command in Claude Code. You give a condition, such as “all tests in test/auth pass”. After each round, a small, fast model checks whether the condition is met. If not, Claude keeps working. So “done” is not decided by the model that does the work. A spec file (specification) describes a feature and is at the same time its checklist.
What it is for
A feature runs without you until it reaches a result you defined beforehand. Whether it has been reached is judged by a separate checking model, not by the agent doing the work.
Steps
- Build the project’s basic skeleton by hand. At the start it is still unclear what “done” means.
- For each feature, create a folder with a spec file and an empty
verificationfolder. The spec also names what is used to check. - Write the condition so that Claude’s own output proves it. According to the docs, the checker only reads the transcript and runs nothing itself. It should include: a measurable end state, the check command, what must not change, and a limit such as “or stop after 20 rounds”.
- Start with
/goaland a reference to the spec./loopis wrong here, because it starts on a schedule. - Optionally, have a clickable HTML draft generated in
mocks/beforehand. It shows whether you described the right thing. - Keep several features in a
queue.mdwith the status todo, building or done. For each feature, a subagent builds on its own branch. A second agent with fresh context checks, assuming there is a bug in it. - Read the pull request yourself and merge it yourself. In the video, the merge to the main branch goes live immediately, so approval there is also the release.
Limits
- According to the docs,
/goaldoes not only end when the condition is met. It also ends when the checker considers the condition unreachable or an error occurs that you must fix. If Claude makes no progress for several rounds, the loop stops and hands back to you. - According to the docs,
/goalruns entirely without questions only in auto mode. Otherwise Claude keeps asking before commands that are not approved. - Long runs use a lot of quota. In the video, the example ran for about 3 hours and was not yet finished. The video gives no figure for the consumption.
- Screenshots do not show time-dependent errors.
- Write permissions only on branches. Merge only after your review.
/cleardeletes an active goal.
Links
- “Done” only with evidence: what a checklist that works as a condition looks like.
- Checkpoints and gates: according to the docs,
/goalis a stop hook that you do not have to write yourself. - Keeping context clean: builder and checker start with fresh context.
Sources
- AI LABS: Every Level Of Claude Code Loop Engineering Explained, 18 August 2026, 3:48, 5:24–8:06, 12:55–19:26. Sponsored by Hedra, plus a paid community
- Claude Code docs: Keep Claude working toward a goal, retrieved 11 October 2026
Status
Checked 11 October 2026 · Maturity new (feature officially documented; the example was shown only by the channel)
Want to try this with your team? That’s what the AI Lab is for. See the AI Lab