Fara beint í efni
FramhaldsefniForritun

Technical Debt Audit

Perform a comprehensive technical debt audit across code quality, architecture, dependencies, testing, CI/CD, and security — then produce a scored remediation plan.

Fyrirmæli

You are performing a comprehensive technical debt audit. Analyze every dimension of this repository — code quality, architecture, dependencies, infrastructure, testing, CI/CD, documentation, and security.

Classify every debt item using the TIME framework:
- Tolerate: Accept deliberately — cost of fixing exceeds cost of living with it
- Invest: Improve incrementally alongside feature work
- Migrate: Replace with a better approach — current implementation is a dead end
- Eliminate: Remove immediately — actively causing harm

For each item, note whether the debt is INTENTIONAL (a documented trade-off) or ACCIDENTAL (neglect or oversight). This distinction matters for prioritization.

Score every item on two axes:
- Impact (1-5): How much does this slow development, risk production, or block future work?
- Effort (1-5): How hard is it to fix? (1 = hours, 5 = weeks)

EXECUTION:

1. RECONNAISSANCE — Understand the project: language, framework, scale, stack, conventions, existing quality tools. Run `npm audit` / `pip audit` / equivalent and capture actual results.

2. LEVEL 1 — CODE & DESIGN DEBT
- Dependency health: run the audit command, count outdated deps, check for EOL/unmaintained packages
- Code quality: dead code, duplication (cite specific file pairs), complexity hotspots, type safety gaps, error handling patterns
- Design: tight coupling, circular dependencies, API inconsistency, configuration sprawl

3. LEVEL 2 — ARCHITECTURE & INFRASTRUCTURE DEBT
- Boundary violations (cite specific imports that cross layers)
- Missing separation of concerns
- Infrastructure config health (Docker, CI, environment parity)

4. LEVEL 3 — PROCESS & KNOWLEDGE DEBT
- Testing: identify specific untested critical paths (auth, data mutation, user-facing), run test suite and report actual count
- CI/CD: pipeline health, missing quality gates
- Documentation: cross-reference README claims against actual code (like the Self-Optimize prompt does)

5. SCORING & CLASSIFICATION — Present as a scored table:
| ID | Item | File:Line | Impact | Effort | Priority | TIME | Intent |
Group into: Quick Wins, Strategic Investments, Low-Hanging Fruit, Long Shots.

6. REMEDIATION PLAN — Organize into executable waves with estimated effort per wave.

7. HEALTH GRADE & QUICK WINS
Assign an overall debt grade (A through F) with justification.

Produce a "Top 5 Quick Wins" table — fixes under 30 minutes with highest impact:
| # | Fix | File | Effort | Why It Matters |

CONSTRAINTS:
- Do not modify any source code — read-only analysis only
- Every debt item must cite a specific file, line range, or metric as evidence
- Run actual commands (audit, test count) rather than trusting documentation
- Distinguish intentional trade-offs from accidental neglect

PROJECT TO AUDIT:
{{Paste the project path or describe the repository to audit}}

Leiðbeiningar

How to Use

Run this prompt in an AI coding assistant with access to your repository. The AI will produce a scored debt registry with remediation waves you can execute incrementally.

Ábendingar

Tips

Run this before any major modernization effort. The output tells you exactly what to fix and in what order. Quick wins alone can dramatically improve developer velocity.

Not all debt needs fixing. The TIME classification helps you make deliberate decisions about what to tolerate vs. what to eliminate.

devopstech-debtauditcode-qualityremediation