A Full-Codebase Audit Prompt for Cleaning Up Projects When Frontier AI Models Launch
A practical refactoring prompt workflow shared on X for scanning entire repositories, pruning dead code, and safely reviewing inconsistencies whenever a new fro
On November 11, 2026, X user Lucian (@lucian__03) shared a practical refactoring prompt—restructuring internal code without changing its external behavior—designed to audit an entire software repository and strip out unnecessary code whenever a new frontier AI model launches.

Image source: TechCrunch 쨌 CC BY 2.0 쨌 https://creativecommons.org/licenses/by/2.0 쨌 https://commons.wikimedia.org/wiki/File:Dario_Amodei_at_TechCrunch_Disrupt_2023_01.jpg
When developers focus exclusively on shipping new features, unused files and inconsistent patterns quietly accumulate inside a project. Noting that an Anthropic research product manager reportedly runs the exact same prompt across every project whenever a new model arrives, the author demonstrated how to put the broader context comprehension of newer releases like Fable 5.2 to work on codebase cleanup.
The Original Prompt and Its Core Structure
The verbatim prompt shared by Lucian (@lucian__03) translates as follows:
"Read the entire project and find everything that is wrong, inconsistent, inefficient, or no longer needed. Fix what is certain, and organize the rest into a list."
This single instruction establishes four inspection criteria alongside a two-tier execution rule:
- Four Audit Criteria: It explicitly instructs the model to scan for outright bugs ("wrong"), diverging patterns or styles ("inconsistent"), redundant or slow logic ("inefficient"), and dead code ("no longer needed").
- Two-Tier Action Boundary: Changes that are unambiguous and safe can be applied immediately, while anything requiring architectural judgment or carrying regression risk must be left untouched and surfaced as a structured checklist.
Compared to vague requests like "clean up my code," this framing gives the model a clear boundary between autonomous fixes and human-reviewed recommendations.
Why Periodic Pruning Matters in Vibe Coding Workflows
In vibe coding workflows—where developers guide AI assistants with natural-language intent rather than writing every line manually—fast iteration often creates rapid technical debt. Experimental helper functions, abandoned branches of logic, and temporary workarounds remain in the repository and degrade the model's context accuracy during subsequent feature work.
According to the original author, stepping back every three to four months when a major model leap arrives to aggressively trim legacy code noticeably improves downstream generation quality. However, as another developer (@mozzak_master) pointed out in the reply thread, feeding an entire repository into a model consumes a substantial amount of tokens—the basic text units LLMs process. If a codebase is already well-maintained, token expenditure may outweigh visible changes, making it important to weigh repository size and current cleanliness before running a full-project sweep.
Read-Only Safeguards for Production Environments
Allowing an AI model to autonomously modify files it deems "certain" is risky in a production environment—the live codebase and infrastructure serving real users—where a silent behavioral change can trigger an outage.
To avoid unintended edits on production repositories, the author emphasizes enforcing strict read-only boundaries first:
- Enforce Read-Only Inspection: Disable file-write permissions in your coding agent or remove the "fix what is certain" clause so the model operates strictly in read-only mode, forbidden from modifying files until it delivers a full diagnostic report.
- Review and Apply Incrementally: Inspect the generated list of dead code, inconsistencies, and inefficiencies manually, then apply approved changes in isolated version-control branches with test verification.
Separating discovery from modification lets teams capture the analytical strength of a newly released frontier model without exposing live codebases to unreviewed bulk edits.
Original source
- 루샨 lucian (@lucian__03): Original X post from November 11, 2026