aif-loop

Execute iterative PLAN, PRODUCE, EVALUATE, CRITIQUE, REFINE loops with quality gates.

2|Updated Aug 22, 2025
One-click install
npx skills add https://github.com/drsapaev/final --skill aif-loop-drsapaev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aif-loop
Source: https://github.com/drsapaev/final/tree/main/.codex/skills/aif-loop
Command: npx skills add https://github.com/drsapaev/final --skill aif-loop-drsapaev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates complex, multi-step refinement processes for artifacts like code, documentation, or specifications, ensuring they meet predefined quality standards through iterative cycles.

Core Features & Use Cases

  • Iterative Refinement: Improves an artifact through a structured loop of planning, producing, evaluating, critiquing, and refining.
  • Quality Gates: Ensures artifacts pass specific criteria before completion, preventing low-quality outputs.
  • Use Case: Generate a complex API specification, then have the Skill critique and refine it against defined rules until it meets all requirements for correctness and completeness.

Quick Start

Use the aif-loop skill to start a new loop for generating an OpenAPI 3.1 specification based on DDD principles.

Frequently Asked Questions about aif-loop

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

FAQPage Schema
How do I iteratively refine generated artifacts using a critique and refine loop?

Iterative refinement of artifacts uses a strict multi-phase loop with PLAN, PRODUCE, EVALUATE, CRITIQUE, and REFINE stages to improve output until quality gates are met or iteration limits are reached.

What are quality gates in LLM agent artifact generation?

Quality gates in artifact generation are predefined criteria that outputs must pass before completion, ensuring the LLM agent prevents low-quality results through structured evaluation and iterative refinement cycles.

How do I automate generate critique refine workflows for API specifications?

Automating generate-critique-refine workflows involves executing a multi-iteration loop that produces an artifact, evaluates it against defined rules, critiques flaws, and refines the output until correctness requirements are satisfied.

Can I use iterative refinement for complex documentation and code generation?

Iterative refinement supports complex documentation and code generation by automating multi-step processes, evaluating outputs against quality standards, and refining artifacts through structured cycles until completeness is achieved.

What happens if an artifact fails quality gates during the AI loop?

When an artifact fails quality gates during the AI loop, the system critiques the identified flaws and triggers another refinement iteration, continuing until criteria are met or maximum iteration limits are reached.

Does the aif-loop skill require external dependencies for artifact generation?

The aif-loop skill operates without external dependencies, using internal references to execute iterative refinement loops for quality-gated artifact generation without requiring additional environment setup.