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?
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
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.
- The strict-routing switchFind · Easy · honojs-hono
Related topics: Code structure
Practice is optional. Solving a puzzle doesn't complete a lesson, and lessons never change a puzzle's points.
References
- Viewing the Commit History (Pro Git)
- Modules and Packages (Node.js documentation)