Lint Until Clean
Automatically iterates through lint error detection and resolution until the codebase passes linting with zero issues. This loop ensures code quality and consistency by having the agent fix problems as they are identified.
Goal
Remove all lint errors from the codebase
How to Run
Execute this loop in your preferred AI coding agent (Cursor, Claude Code, etc.) by providing the kickoff prompt. The agent will handle the rest.
- 01
Prepare Environment
Ensure you're in a project directory with a valid package.json containing a 'lint' script.
- 02
Run Kickoff Prompt
Provide the kickoff prompt to your AI agent to initiate the loop.
- 03
Let Agent Iterate
Allow the agent to automatically run checks, analyze errors, and apply fixes up to 10 times.
Workflow Steps
- 01
Run Lint Check
Execute npm run lint to identify current lint issues in the codebase.
- 02
Analyze Errors
Parse the lint output to determine which files need fixing and what specific rules are violated.
- 03
Apply Fixes
Modify code to resolve identified lint errors while preserving intended behavior and style.
- 04
Validate Changes
Re-run the lint check to confirm issues have been resolved.
Kickoff Prompt
Start the "Lint Until Clean" loop. Goal: Remove all lint errors from the codebase Max iterations: 10 Between iterations run: npm run lint Exit when: Zero lint issues reported Please run 'npm run lint' to check for errors. For each file with lint issues, make targeted fixes to resolve them. After each round of fixes, re-run the lint command to verify progress. Continue this process until either all lint errors are resolved or you've completed 10 iterations, whichever comes first. Self-pace this loop. After each iteration, run `npm run lint` and evaluate the output, and only continue if the exit condition is not met (Zero lint issues reported). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.
Guardrails
hardcoded- ·Only modify files directly related to lint errors
- ·Avoid changes that alter existing functionality or behavior
- ·Do not run arbitrary shell commands outside of the check command
- ·Preserve existing formatting unless explicitly required for lint compliance
Flow Diagram
Related loops — Quality
Quality
Dead Code Eliminator
Automatically identifies and removes unused code to improve codebase quality and maintainability. This loop performs iterative scans for dead code, removes it gradually, and ensures no regressions are introduced.
Quality
Refactor Safely
This loop systematically refactors your codebase to improve structure while maintaining test coverage. The agent identifies opportunities for cleaner code without breaking existing functionality.
Quality
Code Quality Until A Grade
A prompt-only loop designed to iteratively improve code quality and maintainability until a specified quality gate passes. The agent analyzes the codebase, identifies quality issues, and applies targeted fixes to achieve an 'A' grade quality score.