Qualityprompt onlyIntermediate

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.

← all loops
code-styleformattingconsistencyquality-assuranceauto-formatterlinting

Goal

Standardize code style across the entire codebase

How to Run

Automatically resolve code formatting issues until the project passes style checks

  1. 01

    Initialize Loop

    Start the Style Consistency Loop by prompting the agent to check current code formatting status

  2. 02

    Automated Correction

    Apply the configured formatter to fix any detected style violations in your code files

  3. 03

    Verification

    Re-run formatter checks to confirm all issues are resolved or identify remaining problems

Workflow Steps

  1. 01

    Check Formatting Status

    Run the formatter in check mode to identify files with style violations

  2. 02

    Identify Problematic Files

    Parse check output to determine which files require formatting adjustments

  3. 03

    Apply Formatter

    Execute the formatter on identified files to correct style issues

  4. 04

    Verify Changes

    Confirm formatter was applied successfully and no unintended changes occurred

  5. 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

rendering…

Related loops — Quality