# quality loops

> Iterative quality enforcement for LLM outputs using structured critique-rewrite patterns and numeric scoring gates.

quality loops is a free AI agent skill on Agensi by kktestdev, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [kktestdev](https://www.agensi.io/creators/supakit-kitjanabumrungsak)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Uses: 1
- Version: 1.0
- Last updated: 2026-10-20
- Security: scan passed (2026-10-20); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/quality-loops
- Tags: ai-agents, prompt-engineering, llm-ops, code-review, quality-assurance

## About this skill

This skill implements structured iteration loops for high-stakes outputs where a model's first draft is insufficient. It enforces a strict separation between the generator and the critic, ensuring work is not shipped until it clears a measurable, numeric quality bar. By using defined patterns like Multi-Critic and Adversarial Critique, it prevents circular arguments, hallmarked errors, and superficial "looks good to me" approvals.

### What it does
- **Enforced Scoring** requires every iteration to have a numeric progress metric rather than vague prose feedback.
- **Generator-Critic Separation** ensures the model that writes the content is not the same instance that approves it.
- **Multi-Dimension Auditing** tracks independent scores for correctness, style, and safety without letting one high score mask a failure in another.
- **Adversarial Stress-Testing** identifies edge cases and security exploits by actively attacking the draft until no unrebutted objections remain.
- **Stall Detection** monitors for repeated failed rewrites, triggering escalation rather than infinite, unproductive loops.

### How it works
1. **Pattern Selection** Choose between Generate-Critique-Rewrite, Score-and-Retry, Multi-Critic, Adversarial Critique, or Judge Ensemble based on the complexity of the task.
2. **Loop Initialization** Define a specific numeric target value and a maximum iteration budget using the `loop-ledger` tool.
3. **Critic Pass** Run independent critics or automated scorers to identify specific issues and generate a progress score.
4. **Targeted Rewriting** The generator iterates on the draft, specifically addressing the issues list provided by the critic.
5. **Gate Exit** The process terminates only when the numeric threshold is cleared, the budget is exhausted, or the `critique-gate` plugin halts the session.

### Frameworks & tools
Built for use with `loop-ledger` and the `critique-gate` plugin. It utilizes standard GitHub-flavored Markdown for reporting and works across LLM providers supporting tool-calling and system prompt overrides.

### Why this beats prompting it yourself
Generic "critique this" prompts often result in polite, superficial feedback that fails to improve the actual content. This skill forces numeric accountability and prevents the model from closing a task before the quality bar is demonstrably met.

### Use cases
- **Technical Postmortems** refining incident reports until they meet clarity and completeness scores.
- **Security Audits** running adversarial loops to find exploits in design documents or code.
- **PR Reviews** scoring code changes independently for style, logic, and performance before merging.
- **Legal/Policy Drafting** ensuring documents survive a judge ensemble where multiple critics must reach consensus.

### Known limitations
Requires a numeric metric to function; it cannot iterate on purely subjective tasks that lack a scorable dimension. It is not intended for exploring multiple design variations.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the quality loops skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this differ from just asking an LLM to 'check its own work'?

Unlike simple prompting, this skill utilizes the `loop-ledger` tool to enforce a numeric quality gate, preventing the AI from approving its own work through superficial feedback or circular logic. It ensures the generator and critic remain independent, so the output must demonstrably improve to pass.

### Which AI models and platforms are compatible with this skill?

Quality Loops is designed for any LLM provider that supports tool-calling and system prompt overrides, and it integrates directly with the `critique-gate` plugin for automated session management.

### What exactly is included in the purchase of this skill?

You receive the complete logic for five iteration patterns (such as Multi-Critic and Adversarial), the `loop-ledger` configuration schema, and the `critique-gate` integration parameters ready for deployment.

### Can I use Quality Loops for purely subjective or creative writing tasks?

No, this skill requires at least one measurable, scorable dimension (like a logic score or style rubric) to function; it is not recommended for purely open-ended creative tasks where quality cannot be quantified.

### How does the system prevent the agent from getting stuck in an endless loop of rewrites?

The skill includes a 'Stall Detection' feature that monitors for repeated failed attempts or flat progress scores, triggering an automatic escalation or halt rather than wasting tokens on infinite loops.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
