Tests Green
CI red → green with verifier gates. The most common first goal.
Read pattern →
Loops discover work. Goals finish it. Companion: Loop Engineering (v1.6.0) · Stack cookbook
· llms.txt
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-audit . --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.