Files
wehub-resource-sync bb5c75ce05
Component Security Validation / Security Audit (push) Has been cancelled
Deploy to Cloudflare Pages / deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:38:58 +08:00

1 line
2.4 KiB
JSON

{"content": "---\nname: goal-refiner-loop\ndescription: 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.\ncategory: engineering\ninterval: on-demand\nstop-condition: The refined goal's verifiable end state is reached, or its explicit turn/budget cap is hit.\ncomponents: [agent:expert-advisors/critical-thinking, agent:development-team/code-architect]\ntags: [goal, planning, prompting, loop]\n---\n\n# Goal-Refiner Loop\n\n> **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.\n\n## 🎯 Goal\nConvert 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.\n\n## ⏱️ Schedule\nTrigger: `on-demand`.\n\n## ▶️ Run it\n```\n/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.\n```\n\n## 🔁 Iteration steps\n1. **Refine** — `critical-thinking` rewrites the ask into a crisp, testable goal.\n2. **Scope** — `code-architect` defines the blast radius: what's in, what must not be touched.\n3. **Confirm** — surface the refined goal for a quick yes before acting.\n4. **Act** — execute against the goal.\n5. **Verify** — check the end state against the stated verification; stop when met.\n\n## 🛑 Stopping condition\nThe goal's verifiable end state is reached, or the turn/budget cap is hit (the loop reports how far it got).\n\n## 💰 Budget & guardrails\nEvery 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.\n\n## 🧩 Referenced components\n- `agent:expert-advisors/critical-thinking` — sharpens the goal and verification.\n- `agent:development-team/code-architect` — bounds scope and the do-not-touch list.\n\n## 💡 Example\n\"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.\n"}