Loop

Execute multiple Algorithm cycles with iteration-to-iteration learning and review.

1|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/davdunc/pai-framework --skill loop-davdunc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Loop
Source: https://github.com/davdunc/pai-framework/tree/main/skills/Loop
Command: npx skills add https://github.com/davdunc/pai-framework --skill loop-davdunc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of getting a better result when one execution is not enough, by running multiple full Algorithm cycles that build on prior learnings and are reviewed between iterations.

Core Features & Use Cases

  • Multi-pass iterative improvement: Revisit the same target across repeated Algorithm cycles (Observe → Think → Plan → Build → Execute → Verify → Learn) until the result improves.
  • Evolving evaluation criteria: Uses ISC/ISA fields so each iteration refines what “ideal” means and tracks iteration history and cumulative improvements.
  • Optional autonomous mode: Supports an opt-in autoresearch loop with dead-ends tracking and confidence gating to avoid repeatedly retrying failed approaches.

Quick Start

Run iterative improvement on a specific file by invoking /loop with your target path, a clear goal for what “better” means, and a chosen number of iterations.

Frequently Asked Questions about Loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I iteratively improve documentation quality across multiple passes?

Iterative documentation refinement is achieved by executing multiple full Algorithm cycles that build on prior learnings and apply evolving evaluation criteria between each pass.

What is the best way to automate progressive quality gains for research outputs?

Automated research output improvement uses an opt-in autoresearch loop with dead-ends tracking and confidence gating to avoid repeatedly retrying failed approaches across iterations.

How do I set up workflow routing with human review between algorithm cycles?

Workflow routing with human review requires setting the mode to loop, defining a clear goal for improvement, and tracking iteration history alongside evolving ISC criteria.

Can I use iterative improvement cycles to refine skill workflows?

Yes, iterative improvement cycles can refine skill workflows by applying the Observe, Think, Plan, Build, Execute, Verify, and Learn phases repeatedly until the workflow improves.

Does the loop mode support confidence gating to prevent retrying failed approaches?

Yes, the optional autoresearch behavior implements MAD-based confidence gating and maintains a dead-ends ledger to prevent the algorithm from repeatedly retrying failed approaches.

Why does iterative algorithm refinement require evolving evaluation criteria?

Evolving evaluation criteria are required because each iteration refines what the ideal outcome means, allowing the system to track cumulative improvements across the same underlying target.