A mental model is an internal representation of a system’s structure and behavior. In unfamiliar code, it means knowing how components connect, what a request does, and where design decisions matter—not merely recognizing filenames or syntax. section 1.0 section 1.2
Build the model before asking AI to generate changes. “Build X for me” can produce working code without understanding; “explain X to me” turns AI into an analyst while preserving architectural judgment and reducing comprehension debt. section 1.3.2 section 1.6
A useful mental model is assembled through concrete questions and artifacts:
- State the system’s purpose in one sentence. section 1.5
- Trace a request or user action across layers, from browser to database or equivalent boundary. section 1.5
- List interfaces, routes, dependencies, and schemas, then redraw important relationships as readable diagrams. section 1.5 section 3.1
- Verify confident explanations and ask for alternative designs with trade-offs. section 1.6
From file opening to a system map
A focused trace follows file opening through six layers and fifteen files: an entry point reaches editorService.openEditor(), which coordinates the editor group, file service, encoding detection, model creation, view construction, and rendering. The same gateway serves the file explorer and Cmd+O, revealing where new providers can plug in without changing higher layers. section 4.2
Figure 1.4 A developer stands at a fork. One path descends to "coder mode," where they say, "build X for me," outsource understanding, and find the ground crumbling. The other path climbs to "engineer mode," where they say, "explain X to me," and build a mental model with each step. The same person, using the same AI, gets two different outcomes depending on which mode they choose.

Use the fork diagram to distinguish coder mode, which leaves merged code, from engineer mode, which builds a durable mental model. section 1.3.2







