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.
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.
- 01
Execute Kickoff Prompt
Copy and paste the kickoff prompt into Cursor, Claude Code, or any supported coding environment to initiate the loop.
- 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
- 01
Run 'debt audit' to identify technical debt items in the codebase
- 02
Select one debt item based on priority and impact
- 03
Analyze selected debt item to understand root cause and potential solutions
- 04
Implement fix for selected debt item
- 05
Re-run 'debt audit' to verify issue resolution
- 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
Related loops — Maintenance
Maintenance
Package Audit Fixer
Automatically identifies and fixes package vulnerabilities in your Node.js project by running `npm audit` and applying recommended fixes until the audit is clean.
Maintenance
Upgrade Framework Version
This loop automates the process of upgrading a project's framework to a newer version. It systematically analyzes the current framework, plans the upgrade path, updates dependencies, resolves breaking changes, and ensures all tests pass before completion.
Maintenance
Dependency Update Until Green
Automated loop to safely upgrade project dependencies while ensuring all tests pass after each update. The agent incrementally updates out-of-date packages and runs test checks to prevent breaking changes.