Orchestrated Loop: work until acceptance criteria pass

    1

    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

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    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.

    IDCriterionResultEvidence
    C1Umlauts and ß become ae/oe/ue/ss, upper and lower casepass3 umlaut tests OK; decomposed umlaut (u + combining diaeresis) gives mueller; probe_round2.py: BAD: 0
    C2Punctuation dropped, output only a-z, 0-9 and single dashespassprobe_all.py: C2 PASS
    C3No leading or trailing dashpassprobe_all.py: C3 PASS
    C4No double dashespassprobe_all.py: C4 PASS
    C5At most 50 characterspassprobe_all.py: C5 PASS
    C6Never cuts a word in half (one word over 50 is cut hard, D1)passprobe_all.py: C6 PASS
    C7Empty or whitespace-only input gives ""passprobe_all.py: C7 PASS
    C8Existing tests still passpassunittest: Ran 11 tests, OK
    C9 (should)README documents the rulespassREADME has a ## slugify section
    C10 (should)slugify(slugify(x)) == slugify(x)passprobe_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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Terminal / Shell
    Read Files
    Write Files

    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.

    Listed15 days ago

    What's inside

    Frequently Asked Questions

    Criteria are written down and frozen before any project file changes. A separate Judge starts from those criteria, reruns every check itself and adds probes of its own. No evidence means fail, and a doubt is a fail until a probe settles it. The Orchestrator may turn a Judge pass into a fail with its own evidence, never the reverse.

    It is instructions only and follows the SKILL.md standard. It was tested in Claude Code, where the Judge runs as a fresh subagent. Agents without subagents run the Judge as a separate pass. The agent needs to run shell commands and read and write files in your project.

    Yes. Plan, log, decisions and results are written to .loop/<run-id>/ after every role, not only at the end. A new session reads them, reruns the Judge first and then continues. In testing, this caught a stored record that claimed a pass the code no longer met.

    The SKILL.md with the four roles, the file formats and the shape of the final report, plus a worked example: a real two-round run on a small Python repo with all state files, the Judge's probe scripts and the resulting code.

    None. Describe the task as usual and name a round limit if you like. The agent turns your request into numbered criteria in CRITERIA.md before changing anything, checks the repo for hints first, and lists how it read unclear parts so you can confirm them.

    It is ideal for complex refactors and multi-step bug fixes, but it is not recommended for simple one-line changes or tasks that lack a clear, testable definition of success.

    New in Agents & Orchestration

    Free