# Loop Implement Test Fix

> Use to run a bounded implement, test, and fix loop that stops on green, on no diff, or on a repeated identical failure.

- Skill: `jsuvic/loop-implement-test-fix` (Agent Skill)
- Install (CLI): `npx skillmds@latest add jsuvic/loop-implement-test-fix`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jsuvic/loop-implement-test-fix/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: jsuvic (https://skillmd.com/u/jsuvic)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/jsuvic/loop-implement-test-fix

---


<!-- Generated by Agent Profile Compiler. Do not edit by hand. -->

# Loop: Implement, Test, Fix

Drive a small implementation to green through a bounded number of iterations. Each iteration makes one focused change, runs the relevant checks, and reacts to the result.

## Loop Steps

1. Implement the smallest change that moves the task toward its acceptance criteria.
2. Prove the change with a focused test first; run `tdd-change` for the red/green discipline.
3. Run the narrowest relevant test or check command and read the result.
4. If it fails, apply one focused fix and continue to the next iteration.

## Max Iterations

The loop runs at most 3 iterations. When it reaches 3 iterations without meeting a stop condition, it stops unconditionally and reports the unfinished state and the outstanding work; it never raises the bound to keep going.

## Stop Conditions

Stop the loop as soon as any of these holds:

- The relevant tests and checks are green.
- An iteration produces no diff.
- The same failure repeats identically across two consecutive iterations.

## Approval Gate

- Get explicit human approval before any write, commit, or destructive step in each iteration.
- The loop never self-approves, never continues past the iteration bound, and never runs destructive commands on its own authority.
- Pause and surface the state whenever approval is missing.

## Safety

- Do not upload source code.
- Do not read or print secrets.
- APC does not run this loop; a human or agent follows these instructions and remains in control.

