prompt logo

prompt

Free

Perform a cold, hard assessment of technical debt in any codebase.

FreeFree tier
Type
Open Source

About prompt

A detailed, opinionated prompt designed to instruct an AI language model to act as a senior staff engineer and codebase archaeologist to perform a rigorous technical debt audit on a codebase. The prompt outlines a structured multi-phase approach: an orientation phase where the AI reads documentation, maps directory structure, reviews git history, and identifies hot spots; followed by an audit phase that sweeps across nine dimensions such as architectural decay, consistency rot, type conformance, and more. Each finding must cite specific file:line references, and the prompt includes a mandatory 'looks bad but is actually fine' section to avoid false positives. The prompt explicitly discourages generic filler, vague claims, or recommending rewrites, and emphasizes actionable, scoped changes grounded in the actual code.

Key Features

Structured two-phase audit process: Orientation and Audit
Nine audit dimensions including architectural decay, consistency rot, type conformance, and more
Requires specific file:line citations for every finding
Includes mandatory 'looks bad but is actually fine' section to reduce false positives
Discourages rewrites, recommends specific scoped changes
No sycophancy or filler statements
Designed for large, long-lived codebases
Grounded in 2026 research on codebase maintenance and agentic code reasoning

Pros & Cons

Pros
  • Encourages evidence-based findings with file:line references, reducing vague complaints
  • Forces the AI to read code before judging, avoiding surface-level pattern matching
  • Includes a section for false positives, making the audit more reliable
  • Explicitly bans filler and sycophancy, leading to honest assessments
  • Structured phases ensure thorough coverage of the codebase
Cons
  • Requires a capable AI model with strong code reading and reasoning abilities to execute effectively
  • The prompt is long and complex, which may confuse less advanced models
  • Relies on the AI's ability to accurately parse large codebases and git history, which may be inconsistent
  • Does not provide automated execution; manual pasting and review are needed

Best For

Auditing technical debt in legacy or large codebasesPreparing codebase health reports for engineering teamsIdentifying architectural decay, circular dependencies, and dead codeImproving code quality through targeted, scoped refactoring recommendationsOnboarding new developers to understand codebase issuesPrioritizing debt remediation efforts based on concrete evidence

FAQ

What is the purpose of this prompt?
It instructs an AI to act as a senior staff engineer to produce a living audit document of technical debt in a codebase, with concrete findings and actionable recommendations.
What phases does the audit include?
The audit has two main phases: Phase 1 (Orient) involves reading docs, mapping structure, reviewing git history, and identifying entry points. Phase 2 (Audit) sweeps across nine dimensions of code decay.
What dimensions are covered in the audit?
The prompt lists nine dimensions including architectural decay, consistency rot, type conformance, dependency hygiene, test debt, observability debt, security debt, performance debt, and documentation debt.
Does the prompt recommend rewrites?
No. The prompt explicitly says 'Do not recommend rewrites. Recommend specific, scoped changes.'
How does the prompt ensure findings are concrete?
It requires every finding to cite the specific file and line number. Vague claims like 'the code generally...' are rejected.