Tests Green
CI red โ green with verifier gates. The most common first goal.
Read pattern โ
๐ Loop Engineering v1.5.0 just shipped โ loops discover work; goals finish it. Stack cookbook โ
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.
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
Slash command for humans. update_goal tool for the agent.
/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")
Anatomy
Set the objective once. Grok persists until done, blocked, or cleared.
Building blocks
Every reliable goal run needs these four capabilities.
One sentence + done condition
Independent completion check
GOAL.md survives compaction
Turn caps + kill switches
Copy & run
Each pattern includes an example /goal line, verifier strategy, and GOAL.md fields.
CI red โ green with verifier gates. The most common first goal.
Read pattern โAPI migration with import scan + test lock.
Read pattern โScoped feature with acceptance criteria checklist.
Read pattern โRepro โ fix โ regression test. Handoff from loop triage.
Read pattern โBehavior-preserving refactor with full test lock.
Read pattern โRaise coverage to threshold on scoped paths.
Read pattern โ2 minutes
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
Link here when you teach, blog, or ship goal-driven agent workflows.