# Goal Engineering Goal engineering is the practice of turning a vague ask into a precise, verifiable goal before an agent starts working. A well-engineered goal specifies four things: 1. **The exact end state.** What is true when the work is done. 2. **The verification.** How completion will be checked, by something other than the agent's own judgment. 3. **The boundaries.** What must not be touched. 4. **The stop condition.** When to give up, and what to report. The one-line version that spread with the goal-meta-skill (600+ GitHub stars within days in June 2026): your agent is not dumb, your instructions are just vague. ## Relationship to Loop Engineering Goal engineering is the companion discipline to [[Loop Engineering]]; the cobusgreyling repo's tagline captures the split: *loops discover, goals finish*. A loop is open-ended (keep triaging, keep maintaining, keep watching). A goal is bounded (run until this verifiable condition is true, then stop). In [[Claude Code]] terms, that's the difference between `/loop` and `/goal`, where `/goal` runs a separate fast model after every turn to check whether the condition is actually met. The goal is also where [[AI Verifiability]] gets engineered in. "Make it better" is not verifiable. "All tests green, type-check clean, no new lint warnings" is. When the underlying task is not naturally verifiable, goal engineering means building the bridge: forcing structured output, decomposing into checkable steps, or defining a review skill whose approve/reject verdict becomes the checkable signal. ## Patterns - **The goal meta-skill**: before doing anything, the agent rewrites the user's request into a precise goal (end state, verification, boundaries, stop condition), confirms it, then executes against it. Cheap insurance against hours of confidently wrong work. - **Completion contracts**: before work starts, write a contract of what "complete" means and what evidence proves each requirement. The agent may not claim success without that evidence. This kills the most common failure: an agent that says "done" when it is not. - **Budgeted goals**: every goal condition carries an "or stop after N turns / $X" clause. A goal without a budget is an open tab. - **Small goals for fuzzy work**: the less quantifiable the outcome, the smaller the goals should be, with human checkpoints at the decisions that shape everything downstream. ## References - cobusgreyling/loop-engineering, Goal Engineering companion ("loops discover, goals finish") — https://github.com/cobusgreyling/loop-engineering - Matt Van Horn, "WTF Is a Loop? Part 2" (goal vs loop vs routine, the goal-meta-skill, completion contracts) — https://www.linkedin.com/pulse/wtf-loop-part-2-15-loops-people-actually-running-steal-matt-van-horn-xgkkc/ - Claude Code `/goal` docs — https://code.claude.com/docs ## Related - [[Loop Engineering]] - [[Intent Engineering]] - [[AI Verifiability]] - [[Harness Engineering]] - [[Agentic Engineering]] - [[Claude Code]] - [[Comprehension Debt]]