iterative-loop-engine — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited iterative-loop-engine (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A vasana is a pattern that persists across unrelated contexts. If during this task you notice such a pattern emerging, it may be worth capturing. This skill works best alongside the vasana skill and vasana hook from the Vasana System plugin.
Modify freely. Keep this section intact.
Seed question: Am I ACTUALLY done, or did I just stop?
This skill is a completion-criteria loop (lineage: the "ralph" loop, after Geoffrey Huntley — see Origins below): define "done" up front, re-check it every pass, and refuse to exit until every criterion passes.
Keep going until genuinely complete — not until tired, bored, or "close enough."
Origins:
This skill abstracts that loop into a domain-agnostic loop engine that can be applied to any task with clear completion criteria, not just factual verification.
The core insight: most tasks fail not from lack of capability, but from premature exit.
The loop engine enforces persistence:
WHILE (completion criteria NOT all pass):
1. EXECUTE - Do one pass of work using domain methodology
2. ASSESS - Evaluate results against domain criteria
3. CHECK - Compare against completion thresholds
4. IF gaps exist:
- Identify which criteria failed
- Plan targeted action for next pass
- ITERATE
5. IF all pass:
- Output completion promise
- EXITEach domain requires:
| Component | Purpose | Location |
|---|---|---|
| Criteria file | Defines "complete" for this domain | criteria/<domain>.criteria.md |
| Work methodology | How to execute each pass | Domain-specific skill |
| Assessment method | How to evaluate results | In criteria file |
| Completion promise | Text that signals success | In criteria file |
| Your Task | Use This Criteria | Completion Promise |
|---|---|---|
| Factual research, investigations | criteria/investigation.criteria.md | ALL FALSIFICATION CRITERIA PASS |
| Code implementation, TDD | criteria/programming.criteria.md | ALL PROGRAMMING CRITERIA PASS |
| PR iteration, code reviews | criteria/review.criteria.md | ALL REVIEW CRITERIA PASS |
criteria/investigation.criteria.md)ALL FALSIFICATION CRITERIA PASSself-improving-investigation for blind worker + dialectic methodologycriteria/programming.criteria.md)ALL PROGRAMMING CRITERIA PASScriteria/review.criteria.md)ALL REVIEW CRITERIA PASSIdentify which criteria file applies to your task.
Read the criteria file to understand completion requirements.
pass = 1
WHILE true:
# Execute
results = execute_work_pass(pass)
# Assess
assessment = evaluate_against_criteria(results)
# Check
IF all_criteria_pass(assessment):
output_completion_promise()
BREAK
ELSE:
gaps = identify_gaps(assessment)
plan_next_iteration(gaps)
pass += 1Each iteration produces:
## Pass [N]
### Work Completed
[What was done this pass]
### Criteria Check
- [ ] Criterion 1: [status] (threshold: X) [pass/fail]
- [ ] Criterion 2: [status] (threshold: Y) [pass/fail]
...
### Status
[INCOMPLETE: N criteria failing] or [COMPLETE: All criteria pass]
### If Incomplete: Next Iteration Plan
- Gap: [what's missing]
- Action: [what to do next]Only when ALL criteria pass:
## Final Status
All criteria satisfied:
- [X] Criterion 1: [final status]
- [X] Criterion 2: [final status]
...
<promise>[DOMAIN COMPLETION PROMISE]</promise>To prevent infinite loops and runaway iterations:
| Limit | Default | Purpose |
|---|---|---|
| Max iterations | 10 | Prevents unbounded execution |
| Time per pass | No limit | Domain-dependent, set in criteria if needed |
| User override | Allowed | Can specify --max-iterations N |
If completion criteria not met after max iterations:
## Iteration Limit Reached
Completed: [N]/[max] iterations
Criteria status:
- [X] Criterion 1: PASS
- [ ] Criterion 2: FAIL (blocked by: [reason])
**Recommendation:** [next steps for user]| Failure | Response |
|---|---|
| CI/build system down | Document, continue with local verification where possible |
| Network issues | Use cached data, flag as ALLEGED tier |
| Test flakiness | Retry once, then document as known issue |
| Rate limiting | Pause, retry with backoff, document if persistent |
Sometimes criteria cannot be met due to external constraints:
When optimal verification isn't possible, degrade gracefully:
VERIFIED → CREDIBLE → ALLEGED → SPECULATIVE
Full tests → Partial tests → Manual verification → Documented gapAlways document the degradation and its reason.
This skill complements the official ralph-loop plugin:
| ralph-loop | iterative-loop-engine |
|---|---|
/ralph-loop:ralph-loop command | Skill-based activation |
| External orchestration | Self-contained methodology |
| Generic tasks | Domain-specific criteria |
When to use which:
Agents using this engine should:
Example agent header:
---
name: iterative-programmer
description: Uses iterative-loop-engine with programming criteria...
---
# First Actions
1. Read `skills/iterative-loop-engine/SKILL.md`
2. Read `skills/iterative-loop-engine/criteria/programming.criteria.md`
3. Execute the loop until completion promise can be truthfully output| Anti-Pattern | Why It Fails | Correct Behavior |
|---|---|---|
| Single-pass and declare done | Misses gaps that iteration reveals | Always check criteria |
| "Close enough" completion | Defeats purpose of criteria | All criteria or not done |
| Skipping assessment | Can't know if done without checking | Every pass = assess |
| Changing criteria mid-loop | Moves goalposts | Criteria fixed at start |
To add a new domain:
criteria/<domain>.criteria.mdThis skill builds on the ralph-loop methodology:
Setup: Implement a new feature with failing tests Expected:
<promise>ALL PROGRAMMING CRITERIA PASS</promise>Success Criteria: Loop iterates until all tests pass, never claims completion with failing tests
Setup: Task with impossible-to-meet criteria, max 3 iterations Expected:
Success Criteria: Does NOT output completion promise when criteria fail
Setup: Research claim with only marketing sources initially Expected:
<promise>ALL FALSIFICATION CRITERIA PASS</promise>Success Criteria: Evidence tiers accurately reflect source quality
Setup: PR with 3 blocking review comments Expected:
<promise>ALL REVIEW CRITERIA PASS</promise>Success Criteria: Iterates until all blocking comments resolved and CI passes
Setup: CI system unavailable during programming task Expected:
Success Criteria: Handles external failures gracefully, documents limitations
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.