Maintenanceprompt onlyIntermediate

Technical Debt Reduction

A prompt-only coding agent loop that systematically identifies and resolves technical debt items in a codebase through iterative auditing and targeted fixes.

← all loops
refactoringcode-qualitymaintenancetechnical-debtdebt-reduction

Goal

Reduce technical debt

How to Run

Run this loop in your coding environment by providing the kickoff prompt. The agent will self-pace through technical debt identification and resolution.

  1. 01

    Execute Kickoff Prompt

    Copy and paste the kickoff prompt into Cursor, Claude Code, or any supported coding environment to initiate the loop.

  2. 02

    Monitor Progress

    The agent will run the check command, analyze results, apply fixes, and iterate until the exit condition is met or max iterations reached.

Workflow Steps

  1. 01

    Run 'debt audit' to identify technical debt items in the codebase

  2. 02

    Select one debt item based on priority and impact

  3. 03

    Analyze selected debt item to understand root cause and potential solutions

  4. 04

    Implement fix for selected debt item

  5. 05

    Re-run 'debt audit' to verify issue resolution

  6. 06

    If debt resolved, exit loop; else, return to step 2 for next item

Kickoff Prompt

Start the "Technical Debt Reduction" loop.

Goal: Reduce technical debt
Max iterations: 10
Between iterations run: debt audit
Exit when: Selected debt resolved


You are a coding agent focused on technical debt reduction. Begin by running 'debt audit' to identify issues. Select one high-priority debt item, analyze it thoroughly, and implement a targeted fix. After each fix, re-run the audit to confirm resolution. Continue this cycle for up to 10 iterations or until no significant debt remains. Always follow guardrails: preserve functionality, maintain code style, and avoid breaking changes. Document each change made.

Self-pace this loop. After each iteration, run `debt audit` and evaluate the output, and only continue if the exit condition is not met (Selected debt resolved). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.

Guardrails

hardcoded
  • ·Only modify code within the current project scope
  • ·Preserve existing test coverage and functionality
  • ·Avoid large-scale architectural changes unless explicitly requested
  • ·Prioritize low-risk, high-impact debt items
  • ·Maintain code style consistency with existing codebase

Flow Diagram

rendering…

Related loops — Maintenance