Goal Refiner Loop
Rewrites a vague request into a precise goal — exact end state, how to verify it, what not to touch, and the stop condition — then executes against it.
Before you use this component
This is a third-party source bundle, not an installation into your account. UI Discovery has checked the available redistribution license evidence; runtime behavior has not been tested. Review all files, use a disposable project first, and do not enable scripts or hooks until you understand their permissions.
Some integrations require separately installed software, API keys or paid services. Credentials and subscriptions are not included. These are Claude Code resources; other clients may require adaptation.
Extract the ZIP into a temporary folder, inspect its entry file and supporting resources, then follow the original instructions. Do not overwrite an existing project configuration blindly. Keep the bundled license and attribution notices.
- Source publisher
- Claude Code Templates
- Creator supplied by source
- Not listed in source
- Pinned source version
- a344359459263d73d8948651c789244093c02e4e
- License evidence
- LICENSE
Source preview
cli-tool/components/loops/engineering/goal-refiner-loop.md
--- name: goal-refiner-loop description: Rewrites a vague request into a precise goal — exact end state, how to verify it, what not to touch, and the stop condition — then executes against it. category: engineering interval: on-demand stop-condition: The refined goal's verifiable end state is reached, or its explicit turn/budget cap is hit. components: [agent:expert-advisors/critical-thinking, agent:development-team/code-architect] tags: [goal, planning, prompting, loop] --- # Goal-Refiner Loop > **Loop Engineering** — "your agent is not dumb, your instructions are just vague." This loop's only first job is to turn a fuzzy ask into a rigorous, verifiable goal before any code is written, then run the `/goal` against it. ## 🎯 Goal Convert a vague request into a precise goal — the exact end state, how it will be verified, what must not be touched, and the stop condition — confirm it, then execute. ## ⏱️ Schedule Trigger: `on-demand`. ## ▶️ Run it ``` /goal Before doing anything, rewrite my request into a precise goal: the exact end state, how you will verify it, what you must not touch, and the stop condition (including a turn cap). Confirm that goal with me, then execute against it and stop when the end state is verified. ``` ## 🔁 Iteration steps 1. **Refine** — `critical-thinking` rewrites the ask into a crisp, testable goal. 2. **Scope** — `code-architect` defines the blast radius: what's in, what must not be touched. 3. **Confirm** — surface the refined goal for a quick yes before acting. 4. **Act** — execute against the goal. 5. **Verify** — check the end state against the stated verification; stop when met. ## 🛑 Stopping condition The goal's verifiable end state is reached, or the turn/budget cap is hit (the loop reports how far it got). ## 💰 Budget & guardrails Every refined goal carries an explicit "what not to touch" and a turn cap, so an under-specified ask can't sprawl into a risky, open-ended run. ## 🧩 Referenced components - `agent:expert-advisors/critical-thinking` — sharpens the goal and verification. - `agent:development-team/code-architect` — bounds scope and the do-not-touch list. ## 💡 Example "Make the app faster" becomes "p95 of /search ≤ 200ms measured by the existing benchmark, without changing the public API, stop after 8 turns" — and the loop executes against that.
Preview capped at 60,000 characters. Download the bundle for every original file and notice.
Read the redistribution license
MIT License Copyright (c) 2025 Daniel (San) Ávila Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Bundle SHA-256: 349665857c6c50468477bd1ffac7547e9fad1c302a96e1f9f15a8dd09650a4d3. Files are served as downloads and are never executed by this page.