The First Five Minutes: Reading the Repo
How to Prepare ended at the first minute of the round: read the whole prompt and say how big the job is. This page covers the minutes right after that, before any code changes. Everything you do later depends on them, because you can't scope a prompt or review a diff in code you don't understand. Interviewers watch this stretch closely, since it shows whether you start from facts or from guesses.
The running example for the fundamentals is a made-up repo, toolshed: a neighbourhood tool-lending library where
members borrow drills and ladders. It's a FastAPI backend with a small React front end and a pytest suite.
Read the Prompt, Then the README
Read the README before you open any code, because it tells you how the authors expect the repo to be run. Interview repos are small, and their README often says exactly how to start the app, how to run the tests and which parts to ignore. Skipping it costs more time than reading it, usually when you hit a setup step it would have told you about.
Read with three questions in mind. How do I run it? How do I test it? Where does the code for my task probably live? Then take a quick look at the shape of the repo with a couple of commands:
ls app/ tests/
git log --oneline -5 # recent work often points at the area the task touches
In toolshed, that shows app/routes/, app/services/, app/models.py, a web/ folder for the front end and a
tests/ folder with one file per service. That's enough to guess where things go. Spend no more than two minutes
here; you're building a rough map, not memorising the repo.
Run the Tests Before You Change Anything
Run the test suite before your first edit, and say what you saw. It tells you three things you'll need all session: the command that runs the tests, how long they take and whether anything was already failing. That last one matters most. If a test fails before you touch anything and you don't know it, you'll later spend ten minutes believing you broke it.
$ pytest -q
........F..........
FAILED tests/test_reminders.py::test_overdue_email - KeyError: 'SMTP_HOST'
1 failed, 18 passed in 1.9s
Say it out loud: "18 pass, one fails before I've changed anything, and it's a missing environment variable for email, not a code bug. I'll leave it and mention it." Interviewers sometimes leave a failing test on purpose to see whether you notice. If the suite takes more than a minute, find the command that runs a single file, since you'll be running tests after every AI edit.
At work you rarely do this, because CI tells you the state of the main branch. In the interview there's no CI to trust, and your first run is the baseline every later run is compared against.
Find the Entry Point and Trace One Request
Pick the one request closest to your task and follow it from the edge of the system to the database. A web API has an obvious entry point: the route. A front end starts at the component the user clicks, and a CLI at the command handler. Following one real path teaches you the repo's layers, its naming and its error handling faster than reading files at random.
In toolshed, if the task is about loans, trace "borrow a tool". Open the route that handles it and follow each call
one level down, noting the file and function as you go:
app/routes/loans.py:POST /loansparses the body and callscreate_loan.app/services/loans.py:create_loanchecks the tool is available and the member has fewer than three loans.app/models.py:Loanhastool_id,member_id,due_atandreturned_at.- Errors are raised as
LoanErrorand turned into a 409 by a handler inapp/main.py.
Four lines like these tell you where business rules live (the service, not the route), how errors are handled and
what the data looks like. They also tell you how a new feature should fit in: a new rule goes in the service, a new
error is a LoanError, a new field goes in the model. Copying the patterns you find is the cheapest way to look like
you know the codebase.
Ask the AI for a Map, Then Check It
The AI is a fast first reader, but its map is a draft until you've checked part of it. It can summarise a repo in seconds, which saves you opening every file. It can also describe files that don't exist, miss a piece of middleware that changes everything, or repeat what an outdated README says. A broad question gets a broad answer you can't check, so ask for something specific and forbid edits:
Weak: "Explain this codebase."
Better: "List the files involved when a member borrows a tool, from the HTTP route to the database write. For each, give the function name and one line on what it does. Also tell me where errors become HTTP responses. Don't change anything."
Then open two of the files it named and confirm two claims. Pick claims that would matter if they were wrong, such as where a rule is enforced, not which file imports which. If both hold, trust the rest of the map for now. If one is wrong, say so and ask again with the correction, because a wrong map leads to prompts that edit the wrong file.
"It says the three-loan limit is in the route, but it's actually in
create_loan. I'll keep that in mind; the rest of the map matches what I traced."
How you ask depends on the format. With your own agent, it can read the repo itself, so a question like the one above is enough. With a company panel that only sees what you paste, paste the route and the service file and ask it to explain how they connect. In a take-home, nobody hears you check the map, so write the three or four facts you confirmed at the top of your notes. They become the start of your README.
Say What You Found in Thirty Seconds
End the reading phase with a short summary out loud, before any questions or code. It proves to the interviewer that you understand the repo, and it gives them a moment to correct you before you build on a wrong assumption. It also marks a clear switch from reading to planning, which helps you keep to time.
"It's a FastAPI app. Routes are thin, the rules live in
app/services, and errors areLoanError, mapped to 409 inmain.py. Tests run in about two seconds, and one email test was already failing on a missing variable. The task is about loans, so I'll be working inservices/loans.pyand its test file."
Keep the whole reading phase to about ten minutes of a 60-minute round: two for the prompt and README, one for the tests, five for the trace and the AI's map, and the rest to check and summarise. If you're still reading at minute fifteen, stop and work from what you know; you'll learn the rest as you go. Larger codebases and rounds that are only about reading get their own page, Understanding Unfamiliar Code.
You now know the repo, but not yet what the task really asks for. The next page, Turning a Ticket into Acceptance Criteria, handles that.
Key Takeaways
- Read the README first; it usually says how to run, test and navigate the repo.
- Run the full test suite before any edit, and say how many pass and what was already failing.
- Trace one real request from the entry point to the database, and copy the patterns you find.
- Ask the AI for a specific map with no edits, then check two claims that would matter if wrong.
- Close the reading phase with a 30-second summary out loud, about ten minutes into a 60-minute round.
Practice it in a real repo: AI coding rounds.