What problem does it solve?
This Skill helps code-editing LLM agents reliably converge on “green” lint and test results by turning verifier output into the next prompt and enforcing loop termination.
Core Features & Use Cases
- Verify-then-fix loop for coder agents: Runs a combined verifier command (lint/type/test) and feeds structured results back to the agent to drive the next edit.
- Feedback distillation: Converts stdout/stderr/exit code into a concise, last-edit-anchored message (first failing signal, last traceback frame, ≤2k token target) to prevent context bloat.
- Guardrails that prevent common failure modes: Caps iterations, detects stalls (same error repeating), commits each iteration for auditability, and escalates on environment/tooling failures instead of wasting agent turns.
- Anti-cheat success detection: Verifies that “exit code 0” also means tests truly ran and were not weakened via skips/xfails/disabled tests.
- Use cases: SWE-Bench-style patch loops, CI guardrails, and any “fix until tests pass” workflow where the success criterion is machine-verifiable.
Quick Start
Tell your AI agent to use the Test-Fix Loop policy so it edits, runs the verifier command, summarizes the first actionable failure as feedback, and keeps iterating until the verifier is truly green or the cap is reached.