Skip to content

AgentOrchestratedCodebaseAudit

Dennis Lee edited this page Aug 19, 2026 · 1 revision

title: Agent-Orchestrated Codebase Audit radar_quadrant: Techniques radar_ring: Assess radar_position: inner

Agent-Orchestrated Codebase Audit

When an AI coding agent is turned loose on "find ways to simplify this codebase," the common failure mode is a flood of stylistic nitpicks — renamed variables, reordered imports — with no distinction between trivial polish and a change that would actually matter. This technique is a structured prompt, published by developer Aaron Francis, that constrains an agent to a read-only audit and forces it to prioritize substance over style.

How it works

The prompt runs the agent through four phases. First, a coverage inventory: the agent maps every subsystem in the codebase, noting who owns it, its key files and interfaces, and its current status, so nothing gets silently skipped. Second, bounded reviews: for each subsystem, the agent proposes at most two meaningful simplifications — collapsing scattered boolean flags into a state machine, removing duplicated logic, that kind of structural change — rather than an open-ended list. Third, validation: every proposed finding is cross-checked against the actual code to reject anything vague, already-fixed, or duplicated across subsystems. Fourth, an "audit the audit" pass, where a second read-only agent independently checks the first agent's work for gaps, redundant findings, and whether the findings are ranked by actual impact rather than by how easy they were to spot.

Crucially, the exercise is audit-only: the agent produces a prioritized report, and no code changes are made during the process itself. That separation is what keeps the agent from taking a shortcut and "fixing" something instead of properly assessing whether it's worth fixing.

References

Radar Assessment

This sits in Assess, inner position. It is a copy-pasteable prompt with no dependencies, so the cost of a first trial is essentially zero — point it at an existing repository and read the report. Inner position reflects that immediacy. It has not yet been run in this wiki owner's own workflow, so there is no confirmation that its four-phase structure actually produces higher-signal findings than a simpler one-shot "review this code" prompt; that comparison is the remaining gate to Trial.

Clone this wiki locally