Start with the setup prompt so the agent shows evidence instead of guessing. Run one prompt at a time. Finish with the follow-up, which checks whether several bugs share one cause you can fix once.
| # | Name | Prompt |
|---|---|---|
| Setup | Review this repo's architecture. Don't change any code. For each finding, list the files involved, trace the data flow, give an input that produces a wrong result, say whether it's a confirmed bug or a risk, and suggest a fix. Reproduce every confirmed bug. List anything you assumed about systems outside the repo. | |
| 01 | State machines | Find records whose behavior depends on status flags, booleans, or timestamps. Map their states and transitions. Show invalid states, and transitions spread across unrelated files. |
| 02 | Hidden contracts | Find assumptions between modules, APIs, and tables that no type, schema, test, or validation enforces. Show how each one can break and what fails downstream. |
| 03 | Hidden coupling | Find modules that look independent but share state, tables, environment variables, caches, or event order. Rank them by how dangerous they are. |
| 04 | Duplicate state | Find data stored in more than one place: frontend, backend, database, caches, or outside services. Show how the copies can drift apart and which one is the source of truth. |
| 05 | Partial operations | Find operations that should succeed or fail together but run as separate steps. Show the state left behind when one step fails, and whether anything cleans it up. |
| 06 | Retries | Find operations that can run twice. Show where a retry duplicates charges, emails, records, or jobs, and whether each operation is idempotent. |
| 07 | Misleading names | Compare what names, interfaces, comments, and folders promise with what the code does. Find leaky abstractions, crossed boundaries, and modules that do something other than their name says. |
| 08 | Swallowed errors | Find caught exceptions, silent fallbacks, lost error details, and paths that report success after a partial failure. |
| 09 | Dead weight | Find abstractions, config, compatibility layers, and indirection that serve one use case or a requirement that no longer exists. Estimate what can be removed safely. |
| 10 | Scale | Describe what breaks with 10× the users, data, concurrency, and outside events. Focus on algorithms, contention, and coordination, not generic scaling advice. |
| Follow-up | Do any of these findings share a cause? Show the evidence, and the smallest change that fixes them all. If they don't share one, say so. |