20 questions to ask about any codebase
A reusable list of questions that build a working understanding of an unfamiliar repository, from architecture and data to risks and history.
Good questions are the fastest way into an unfamiliar codebase, whether you're asking a colleague, reading the code yourself or using an AI tool. These twenty work on almost any repository. Ask them roughly in order: each builds on the ones before.
Orientation
- What does this project do, and who uses it? The README usually answers this; if it doesn't, that's a finding.
- How is it run locally, and how is it deployed?
- What are the main parts, and how do they talk to each other? An architecture overview in a paragraph.
- What stack does it use? Framework, language, database, queues, hosting.
Entry points
- Where does a request (or command, or event) enter the system?
- What runs before every request? Middleware, hooks, guards.
- Which background jobs or scheduled tasks exist, and what triggers them?
Data
- What are the main entities, and how do they relate?
- Which code writes to the most important tables or collections?
- Where are transactions used, and where might they be missing?
Behaviour
- What happens, step by step, when a user does the most important thing in the product?
- How does authentication work, and where is authorisation checked?
- What happens when an external service fails or times out?
- Where is state kept on the client, and what changes it?
Configuration
- Which environment variables and feature flags change behaviour?
- Which settings differ between development and production?
Risk
- Which parts are most complex or most frequently changed?
- Where are errors swallowed or ignored?
- Which important code has no tests?
History
- Why is it built this way? Decision records, old pull requests and the people who wrote it.
Asking them with RepoGrasp
Most of these (1 to 19) can be answered from the code. Paste a repository link into RepoGrasp and ask them one at a time; each answer comes with file:line citations, and follow-ups keep context, so "and what happens if that call fails?" works after question 11. Question 20 usually needs people or history; see code archaeology with git.
Make them specific
Generic questions get generic answers. Replace "the most important thing in the product" with the actual action ("placing an order", "publishing a post"), and "an external service" with the actual one ("the payment provider"). See how to ask AI better questions about code.