Skip to content
Book demo

Coding

Technical debt scanner

Scan the codebase on a schedule for code smells and deprecated patterns, then open focused remediation PRs.

technical-debtcode-qualityrefactoringscheduledautomation

[ workflow / coding ]

Technical debt scanner

Technical debt compounds quietly until it blocks new work. This workflow runs a nightly scan for complex functions, deprecated APIs, duplicated logic, and long-lived TODOs. It groups findings by module, prioritizes by churn, and opens small remediation PRs with before/after diffs and test impact.

06 nodes

05 edges

Trigger[trigger]
Nightly schedule

Cron: 02:00 UTC

AI Agent step[scan]
Debt scanner

Complexity · duplication · deprecated APIs

AI Agent step[cluster]
Cluster & prioritize

Group by module, rank by churn

Safety filter[safety]
Scope guard

Max 10 PRs per run

AI Agent step[pr]
Open remediation PRs

One PR per debt cluster

Output / Result[notify]
Slack summary

#tech-debt channel

Workflow prompt

Paste this into Augment to reproduce the workflow end-to-end.

Cosmos, scan the codebase on a nightly schedule for technical debt: high cyclomatic complexity, deprecated API calls, significant code duplication, and TODO/FIXME comments older than 90 days. Cluster findings by module and rank by code-churn frequency (files touched most often in the last 90 days carry highest priority). For the top 10 issues, open a PR per debt cluster with the remediation applied, a short explanation of why the change reduces risk, and a note on which tests cover the affected code. Tag PRs with 'tech-debt' and assign to the owning team based on CODEOWNERS.