Style Consistency Loop
This loop ensures your codebase adheres to consistent styling conventions by automatically identifying and correcting formatting inconsistencies using your project's configured formatter.
Goal
Standardize code style across the entire codebase
How to Run
Automatically resolve code formatting issues until the project passes style checks
- 01
Initialize Loop
Start the Style Consistency Loop by prompting the agent to check current code formatting status
- 02
Automated Correction
Apply the configured formatter to fix any detected style violations in your code files
- 03
Verification
Re-run formatter checks to confirm all issues are resolved or identify remaining problems
Workflow Steps
- 01
Check Formatting Status
Run the formatter in check mode to identify files with style violations
- 02
Identify Problematic Files
Parse check output to determine which files require formatting adjustments
- 03
Apply Formatter
Execute the formatter on identified files to correct style issues
- 04
Verify Changes
Confirm formatter was applied successfully and no unintended changes occurred
- 05
Validate Clean State
Re-run formatter check to ensure all files now pass style validation
Kickoff Prompt
Start the "Style Consistency Loop" loop. Goal: Standardize code style across the entire codebase Max iterations: 10 Between iterations run: formatter check Exit when: Formatter clean Check my code for formatting issues and fix them using the configured formatter until all files pass style checks cleanly. Self-pace this loop. After each iteration, run `formatter check` and evaluate the output, and only continue if the exit condition is not met (Formatter clean). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.
Guardrails
hardcoded- ·Only modify code formatting, never change functional logic or business rules
- ·Create backup files before applying any formatting changes
- ·Ensure formatter configuration (.editorconfig, ESLint configs, etc.) is valid before starting
- ·Limit iterations to prevent infinite loops on persistent formatting conflicts
- ·Preserve file permissions and ownership during formatting operations
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
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.
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.