- Home
- Skills
- Agents & Orchestration
- Orchestrated Loop: work until acceptance criteria pass
Orchestrated Loop: work until acceptance criteria pass
Works a coding task in bounded rounds. Acceptance criteria are frozen before the first change, an independent Judge reruns every check, and the progress lives in your repo so any later session can pick it up.
Free
Works with the AI Agents you already use
Orchestrated Loop: work until acceptance criteria pass
Example session with this skill installed
Improve slugify so it's production-ready for our URL routes: German umlauts become ae/oe/ue/ss, punctuation is dropped, no leading, trailing or double dashes, max 50 characters without cutting a word in half, and empty or whitespace-only input gives an empty string.
Run it as a loop: plan, build, judge, repeat until it's good, max 3 rounds. Keep the loop state in the repo so I can pick it up tomorrow in a new session. I'm short on time, so give me a short summary at the end.
- Read your context and instructions
- Compiled the orchestrated loop
Status: passed after 2 of 3 rounds. Nothing committed; slugify.py, tests/test_slugify.py and README.md are changed in the working tree.
| ID | Criterion | Result | Evidence |
|---|---|---|---|
| C1 | Umlauts and ß become ae/oe/ue/ss, upper and lower case | pass | 3 umlaut tests OK; decomposed umlaut (u + combining diaeresis) gives mueller; probe_round2.py: BAD: 0 |
| C2 | Punctuation dropped, output only a-z, 0-9 and single dashes | pass | probe_all.py: C2 PASS |
| C3 | No leading or trailing dash | pass | probe_all.py: C3 PASS |
| C4 | No double dashes | pass | probe_all.py: C4 PASS |
| C5 | At most 50 characters | pass | probe_all.py: C5 PASS |
| C6 | Never cuts a word in half (one word over 50 is cut hard, D1) | pass | probe_all.py: C6 PASS |
| C7 | Empty or whitespace-only input gives "" | pass | probe_all.py: C7 PASS |
| C8 | Existing tests still pass | pass | unittest: Ran 11 tests, OK |
| C9 (should) | README documents the rules | pass | README has a ## slugify section |
| C10 (should) | slugify(slugify(x)) == slugify(x) | pass | probe_all.py: C10 PASS |
What happened: In round 1 a fresh Judge subagent passed all ten criteria, but noted that an umlaut typed as u plus a combining diaeresis (as macOS produces) gives muller. The Orchestrator checked that doubt itself: it really returned muller, which breaks C1, so it turned the pass into a fail. Round 2 added Unicode normalisation and a test for the decomposed form. A second fresh Judge reran every check, added its own probes and found nothing.
Decisions to confirm:
- D1: a single word over 50 characters is cut hard at 50, because a slug must never exceed the limit.
- D2: punctuation is removed without leaving a separator (
it's->its). - D3: other accents are folded (
é->e), so the output is always ASCII. - D4: non-string input is not handled specially.
- D6:
ø,æ,łare dropped, not transliterated (København->kbenhavn). Say if you want a wider table.
Resume: .loop/20261101-1904-slugify/ (also named in .loop/latest). The next line says the run is done. .loop/ is left untracked. Rerun the checks with python -m unittest discover -s tests -t . and the scripts in checks/.
This run is included in the skill as a worked example, with all state files and probe scripts.
Connects securely to your tools. The creator never sees your data.
About this skill
When an agent plans, builds and grades its own work in one go, three things tend to slip: the criteria get written after the code, the self-check agrees with itself, and the progress is gone when the session ends.
This skill runs your task as a loop with four roles (Orchestrator, Researcher, Builder, Judge) and a few hard rules:
- Criteria first. Every requirement becomes a numbered, checkable criterion before any project file changes. Unclear parts are decided, written down, and listed for you to confirm.
- An independent Judge. The Judge starts from the criteria, not from the Builder's notes. It reruns every check, adds probes of its own, and saves them so they can be rerun. No evidence means fail, and a doubt is a fail until a probe settles it.
- Bounded. It stops when every must-criterion passes, at your round limit, or when the same failure repeats, with one concrete question for you.
- Resumable. Plan, log, decisions and results are written to
.loop/<run-id>/as the run goes. A new session reruns the Judge first, so a stale record is caught instead of trusted.
You get a short final report: status, one evidence line per criterion, the decisions to confirm, and where to resume.
Included: a worked example of a real two-round run on a small Python repo, with all state files, the Judge's probe scripts and the resulting code. In round 1 the Judge passed everything; the Orchestrator found a broken case and overturned it.
Works with: instructions only, no scripts to install. In Claude Code the Judge runs as a fresh subagent; in agents without subagents it runs as a separate pass.
Not for: one-line fixes, open-ended exploration without a definition of done, or scheduled jobs.
Built by Dominic Meiser, who builds agent systems with Claude Code and Codex. More at dynamic-dome.com.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.
Not for one-line fixes or open-ended exploration without a definition of done. Needs a writable project folder for the .loop/ state. Works best when criteria can be checked by commands (tests or small scripts); criteria that can only be checked by reading are weaker evidence. Tested mainly in Claude Code.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 15 days ago
- Free with an Agensi account
Permissions
Shell to run the project's own tests and the Judge's check scripts. Read and write files to change the code and to keep the loop state in .loop/<run-id>/. No network access, no environment variables or secrets.