Goal Engineering โ€” Run until verifiably done

Grok Build /goal ยท update_goal ยท G0โ†’G3 ยท 6 patterns ยท goal-audit CLI

๐Ÿ”„ Loop Engineering v1.5.0 just shipped โ€” loops discover work; goals finish it. Stack cookbook โ†’

Run until
verifiably done

Goal engineering replaces one-shot prompts with persistent objectives. Grok Build works across turns until the condition holds โ€” and reports progress without flooding your chat.

Golden Path โ†’ Read the Essay API Reference Loop Engineering

Try: npx @cobusgreyling/goal doctor . --suggest    /goal All tests pass โ€” goal-verifier before done

"A goal is a bounded objective with a verifiable completion condition โ€” not an open-ended chat, not a cron job."
โ€” Goal Engineering
"Loops discover work. Goals finish it."
โ€” Loop Engineering companion
"The implementer must never grade its own homework."
โ€” Maker / checker split

Grok Build CLI

The /goal API

Slash command for humans. update_goal tool for the agent.

grok build โ€” goal mode
/goal Migrate auth to v2. Done when tests pass and no legacy imports.
/goal status
/goal pause
/goal resume
/goal clear

# Agent telemetry (not chat spam)
update_goal(message: "12/18 auth tests passing")
update_goal(completed: true, message: "Verifier PASS โ€” migration done")
update_goal(blocked_reason: "Need sandbox OAuth credentials")

Full API reference โ†’ ยท Goal vs Loop โ†’

Anatomy

What one goal looks like

Set the objective once. Grok persists until done, blocked, or cleared.

๐ŸŽฏ /goal โ†’ ๐Ÿ“‹ GOAL.md โ†’ โš™๏ธ Implementer โ†’ โœ“ Verifier โ†’ ๐Ÿ“ก update_goal โ†’ โœ… Done

Building blocks

Four primitives

Every reliable goal run needs these four capabilities.

๐ŸŽฏ

Objective

One sentence + done condition

โœ“

Verifier

Independent completion check

๐Ÿ“‹

State

GOAL.md survives compaction

๐Ÿ›ก

Budget

Turn caps + kill switches

Grok Build /goal Claude /goal Codex /goal

Copy & run

Production patterns

Each pattern includes an example /goal line, verifier strategy, and GOAL.md fields.

Start here

Tests Green

CI red โ†’ green with verifier gates. The most common first goal.

Read pattern โ†’
6
Patterns
G0โ†’G3
Readiness
3
Skills
100
Audit max

2 minutes

Get started

terminal โ€” minimal goal
git clone https://github.com/cobusgreyling/goal-engineering.git
cd your-project
cp -r goal-engineering/starters/minimal-goal/.grok/skills/goal-verifier .grok/skills/
cp goal-engineering/starters/minimal-goal/GOAL.md.example GOAL.md

npx @cobusgreyling/goal-audit . --suggest

# In Grok Build
/goal Read GOAL.md. Work the objective. goal-verifier before completed: true.

Play with it

Pattern Picker & Readiness Simulator

What are you trying to finish?

CI / tests red
Module / API migration
Ship a scoped feature
Fix a specific bug
Safe refactor
Raise test coverage

Goal Readiness Simulator (mirrors goal-audit)

0
/ 100
G0 โ€” Ad hoc โ€” add GOAL.md + verifier

The go-to for Grok Build /goal

Link here when you teach, blog, or ship goal-driven agent workflows.

Star on GitHub Contribute