autonomous-iteration
Skill0 starsChanged 6 months agoMITView on GitHub
Set up an autonomous iteration loop with a watchdog that prevents completion bias from prematurely terminating work before an achievement-based stop condition is met.
In this repository9 other files it gives its agents.
- agent-busSkill
- documentation-captureSkill
- hue-signalsSkill
- llm-councilSkill
- macos-attention-soundSkill
- messageSkill
- outbound-injectionsSkill
- structured-improvementSkill
- transcribe-scribeSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Use this when ALL of these are true:
- Distinctive: line 20
Do NOT use for simple tasks, one-shot requests, or tasks where the stop condition is procedural ("run these 3 commands").
- Distinctive: line 26
When invoked, do the following:
- Distinctive: line 30
Ask the user (or extract from context) the exact achievement threshold.
- Distinctive: line 32
Unambiguous: no room for reinterpretation
- Distinctive: line 35
Write it down explicitly. Confirm with the user if there's any ambiguity.
- Distinctive: line 63
Create a Claude task with the stop condition embedded:
- Distinctive: line 73
Start working immediately.
- Distinctive: line 140
When the stop condition IS met:
- Distinctive: line 144
Update the session handoff with final state
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Autonomous Iteration
Prevents the agent from stopping before a user-defined achievement target is hit. Addresses the observed failure mode where agents find plausible reasons to stop ("3 runs executed", "diminishing returns", "intractable") when the user's actual requirement is an achievement threshold.
When to Use
Use this when ALL of these are true:
- The task requires iterative work toward a measurable target (not a one-shot task)
- The user has defined an achievement-based stop condition (">50% success", "all tests pass", "latency under 200ms")
- The work is expected to take multiple iteration cycles with generate/evaluate/improve loops
- There is risk of the agent declaring the task done or intractable before actually hitting the target
Do NOT use for simple tasks, one-shot requests, or tasks where the stop condition is procedural ("run these 3 commands").
Setup
When invoked, do the following:
1. Extract the stop condition
Ask the user (or extract from context) the exact achievement threshold. It must be:
- Measurable: a number, percentage, pass/fail, or observable state
- Unambiguous: no room for reinterpretation
- Achievement-based: describes the target state, not the procedure to reach it
Write it down explicitly. Confirm with the user if there's any ambiguity.
2. Create the watchdog
CronCreate:
cron: "*/10 * * * *"
recurring: true
prompt: |
STOP CONDITION CHECK — Automated watchdog.
The user's stop condition: [EXACT STOP CONDITION HERE]
Have you met this stop condition?
If NO: You are forbidden from being idle. Resume work immediately.
Generate the next iteration, run evaluation, analyze results, iterate.
Do not write concluding summaries. Do not declare the problem intractable.
Do not ask the user what to do. KEEP WORKING.
If YES: The stop condition is met. Run CronDelete with job ID [JOB_ID]
to cancel this watchdog.Record the job ID. The watchdog fires every 10 minutes while the REPL is idle — exactly when the agent has stopped taking actions.
3. Create the iteration task
Create a Claude task with the stop condition embedded:
Subject: [STOP CONDITION]. Do not stop until this is done.
Description: [Full context of what the iteration loop looks like,
what "one iteration" means, and what the measurable target is.]4. Begin the iteration loop
Start working immediately. The loop structure depends on the task, but the general shape is:
Generate candidate → Evaluate → Analyze results → If target not met → Improve → LoopIteration Loop Architecture
For tasks that involve adversarial evaluation (benchmarks, style matching, quality thresholds), use three roles:
| Role | Input | Output | Constraint |
| Generator | Source material + craft orientation | Candidate artifact | Does NOT see comparison target. Receives understanding, not constraints. |
| Evaluators | Candidate vs target (blind, literary comparison) | Verdict (which is original) + reasoning | "Which is the original?" framing, NOT "which is AI?" |
| Tell Analyst | All evaluator outputs | Literary evaluation across craft dimensions | Evaluates writing quality, not detection artifacts |
The main worker orchestrates: reviews Tell Analyst literary evaluation → diagnoses craft-level root causes → updates generator orientation with lasting improvements → dispatches Generator → dispatches Evaluators → dispatches Tell Analyst → checks score → loops.
The key transformation is in the main worker: literary evaluation → craft diagnosis → lasting orientation change. The Tell Analyst reports quality gaps on literary dimensions (voice, character, specificity, emotional truth, dialogue, scene construction). The main worker asks "what about the generation APPROACH produces this gap?" and makes permanent changes to how the generator understands the material. Each iteration deepens the generator's understanding — it does NOT lengthen a constraint list.
The Tell Analyst is an ADVISOR, not an authority. It evaluates writing quality across craft dimensions — not a list of "tells to fix." It performs literary criticism: what works, what doesn't, where characters are alive, where they're puppets. The main worker extrapolates these findings to root causes in the generation approach.
Observed anti-pattern: constraint accumulation. In one creative-writing iteration loop, each round added more generation constraints based on judge feedback, and the evaluation score trended down rather than up. Correlation observed but causation not isolated — other factors (scene choices, comparison difficulty, evaluation framing) may also contribute. Hypothesis to test: replacing constraint lists with craft-oriented generation (deeper understanding of material, writing quality principles, literary evaluation practices) may produce better results.
The main worker should extrapolate analyst findings to testable hypotheses, not assert root causes. If the analyst reports "characters feel performed," possible root causes include: voice built from surface tics rather than character psychology, insufficient source material, over-constrained generation, or something else. The main worker should test these one at a time, not assume one and restructure the approach around an unverified assumption. Each iteration should test a specific hypothesis and be honest about what the results prove.
Failure Modes This Skill Prevents
1. Completion bias
Pattern: Agent stops after executing procedure rather than achieving target. Prevention: Watchdog re-asserts the stop condition every 10 minutes. Cannot go idle without being prodded.
2. Intractability declaration
Pattern: Agent declares the problem unsolvable after insufficient iteration. Prevention: Watchdog instruction: "Do not declare the problem intractable." The agent must keep trying different approaches rather than concluding none can work.
3. Procedural reframing
Pattern: Agent redefines "3 runs scored" as the stop condition instead of ">50% on all 3 runs." Prevention: The exact stop condition is embedded in the watchdog prompt and the task description. No room for reinterpretation.
4. Narrative-contaminated analysis
Pattern: Agent interprets evaluation results to confirm existing progress story (false breakthroughs, dismissed regressions). Prevention: Tell Analyst role separates analysis from narrative. Structured extraction prevents grep-level errors.
Light Signals
During autonomous iteration, signal state changes via an ambient channel (for example Philips Hue lights — see the hue-signals skill) so the user doesn't need to watch the terminal. Assign one light id per agent.
| Transition | Command | Light |
| Starting work / resuming after watchdog | signal working <id> | Sky blue |
| Non-blocking question logged | signal question <id> | Yellow |
| Needs input soon, working around it | signal urgent <id> | Orange |
| Cannot continue without human input | signal blocked <id> | Red |
| Stop condition met | signal complete <id> | Soft green |
| Task failed / unrecoverable | signal failed <id> | Red flash |
At each state transition, run the signal command before continuing work. When blocked, log the question (task tool or maintained artifact) AND signal — so the user can see context when they arrive.
Teardown
When the stop condition IS met:
- Signal:
signal complete <id> - Cancel the watchdog:
CronDeletewith the job ID - Record results in a maintained artifact
- Update the session handoff with final state
- Signal:
signal off <id>(after user acknowledges) - Report to user
Origin
This skill was developed from a creative-writing iteration loop where the agent prematurely terminated work twice before hitting a measurable evaluation threshold. The watchdog pattern and the separation of analysis from narrative (the "Tell Analyst" role) were the corrective mechanisms.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

