Explain the Project as a Whole

In the last exercise, you cut attack chains in agent setups that weren’t yours. Your escape room builder now has a list-rooms command and a play-test fix on top of everything your agent built before them, and you reviewed each change before you committed it. Could you also explain the project to someone who’s never seen it?

In this lesson, you’ll learn what explaining a project as a whole requires, test your own picture of it with one change, and find where that picture is thin.

Know What Explaining the Whole Means

Your agent typed most of your escape room builder’s code, so you can’t know it line by line the way you’d know code you wrote. You don’t need to. What you need is a mental model of the project: your own picture of what’s where, how it fits together, and why it’s built that way.

A working mental model lets you answer five kinds of questions without opening the code first:

  • The parts: The project’s responsibilities, such as checking a room, storing play-tests, and reporting on them, with a file or function as a landmark for each. For example, src/check-room.js decides a room’s verdict, and check-room.js prints it.
  • How data moves and where it’s stored: A room file goes in and a verdict comes out. Play-tests live in playtests/<room file name>.json, never in the room file.
  • The decisions and why: The code checks structure, and difficulty stays the designer’s estimateMinutes, because a formula would look more certain than the guesses behind it.
  • The risky parts: Where a mistake or an attack would do the most harm, such as code that writes files or text that comes from outside the project.
  • Where a change would go: Which parts a new request touches, and which it leaves alone.

What each line does isn’t on the list. Someone taking over the builder needs these answers first, and once they know where to look, they can read the lines that matter.

Watch out: having reviewed and approved every diff your agent made doesn’t give you this model, because each review checked one piece against one task, and how the pieces connect isn’t in any single diff.

Since the project began, you’ve documented the parts, how a room moves, and the decisions in your docs/map.md. Here’s the play-test half of “How a Room Moves” in the reference version’s map:

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Become a Member to join the conversation.