Back/Engineering/Cursor/Claude
IntermediateEngineeringCursorClaudeDevin

How to Systematically Reduce Technical Debt Using AI Agents

Use AI to analyze test logs, identify and prioritize technical debt, and generate a task list for AI agents like Cursor or Devin to systematically fix issues. This creates a repeatable process for improving codebase health.

From How I AI

How I AI: Zach Davis's 3 Workflows for Enterprise Engineering with AI

with Claire Vo

How to Systematically Reduce Technical Debt Using AI Agents

Tools Used

Cursor

AI-first code editor

Claude

Anthropic AI assistant

Devin

AI software engineer by Cognition Labs

02Step-by-Step Guide
1

Identify Problem Areas

Run your test suite and pipe the output to a log file to capture all console logs and errors. For example, run yarn test > test_output.log.

2

Analyze Logs with AI

Feed the generated log file to a large language model like Claude for analysis. Ask it to identify the most problematic areas, categorize them, and rank them by severity.

Prompt:
Analyze this test log file and create a prioritized task list for reducing test noise. Categorize issues by type and severity. Output in markdown checklist format.
3

Create a Prioritized Task List

Use the AI's output to create a prioritized list of tasks in a markdown checklist file. Store this file in a dedicated directory, for example, agents/migrations, to track progress.

4

Assign Tasks to AI Agents

Use AI coding assistants like Cursor or Devin to address the identified issues. Assign one task at a time to an agent to ensure focused and manageable changes.

5

Review and Merge Changes

Once an AI agent completes a task, a human engineer should review the generated code. After approval, merge the change into the codebase and mark the corresponding task as complete on your checklist.

Start shipping
better products.

Join 100,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.

Free to start
No credit card
SOC 2 certified
Enterprise ready
How to Systematically Reduce Technical Debt Using AI Agents | AI Workflows