{ Prompts4All }

Audit a repository for agent readiness

Agent Audit

Audit how easy it is for a coding agent to do correct work in this repository. Examine the repository, not the instructions for the agent. An agent copies the first pattern that it finds, so the repository must show the correct pattern first.

  1. The way in. Start at the root and use no search. Can you tell what the project is, where its main parts are, and where a change of each usual type goes? List what you had to guess.

  2. Size and noise.

    • Files that are too large to read in one piece (give the number of lines).
    • Generated files, vendored code, build output, fixtures, logs and data files that a search returns before the source. Say if an ignore file excludes them.
  3. Names and copies.

    • One name for two different things, and two names for one thing.
    • Dead code and old versions that look current (old, v2, backup, copy).
    • Two or more ways to do the same job, where only one is current.
  4. Contracts. Find the places where no machine check protects a change: boundaries with no types, any, config as free text, and API shapes with no schema.

  5. Errors. Find failure messages that do not say what to do, errors that the code hides, and scripts that exit with 0 after a failure.

  6. Traps.

    • Commands that look safe but touch production, shared resources or paid services.
    • Generated files with no mark that says "do not edit".
    • Steps that must occur in an order that no tool enforces.
  7. Parallel work. Can two agent sessions work at the same time in two worktrees? Look for fixed ports, a shared local database, and global state.

  8. History. Use git to find the files that change most frequently, and the files that change together but are far apart in the tree. These show where the structure works against the work.

Rules:

  • Give evidence for each finding: paths, counts, and the command that shows it.
  • Do not restructure anything during the audit.
  • Prefer a fix in the repository (delete dead code, add a type, mark a generated file, divide a large file, correct an error message) to a new line in an instruction file.

Output: a scorecard with one row for each of the 8 areas: good, partly, or poor, with the most important finding. Then the ten fixes that give the most value for the least work, in order.