Skip to content

L07 Repository maps and snapshots

15 minSuggested first: C1 or equivalent

Outcome

Identify the right starting files in a new repository and explain why the commit matters.

Learn

A repository holds source code and usually documentation, configuration, and tests. Start from your question: the README orients you, a manifest such as package.json names the public entry points, and source or tests are evidence of behavior.

A snapshot freezes one revision. A branch can move on after a lesson is written; a commit SHA never does. Every puzzle on codebases is pinned to one.

Worked example

You want to trace this package's public API. Which file do you open first, and which gives you a concrete input to follow?

A small packageText
package.json          Public export points to src/public.ts
README.md             What the package is for
src/public.ts         Source entry
tests/receipt.test.ts Expected receipt behavior
Predict first, then show the worked explanation

The manifest maps the public export to src/public.ts, so begin there to trace the public API. Use the test to find a concrete input and its assertion. Record file paths relative to this revision, not to your own machine.

Practice and check

Guided practice

Practice, not scored

The README says the package's entry is src/index.ts, but the manifest names src/public.ts. Which file decides what a user's import loads?

Choose one answer

Exit check

Counts toward completion

You want another learner to find the same line next month. Which reference is best?

Choose one answer

Common mistake

Treating familiar folder names as proof. Verify the actual manifest or import chain.

Practice on a real repository

Open the puzzle below and note the repository and snapshot it shows before you try it.

Related topics: Code structure

Practice is optional. Solving a puzzle doesn't complete a lesson, and lessons never change a puzzle's points.

References