Three last tools for finding your way around code, starting with the one already in the file.
Comments
Text in a file meant for people, which the program ignores. In JavaScript it starts with //. The useful ones say why the code is the way it is, which the code itself can't tell you.
Because the program ignores comments, nothing keeps them honest, and agents read them as fact. A stale comment misleads the next agent as well as you. Cut the ones that only repeat the line below, and keep the reasons.
Say it to your agent
“Delete comments that only restate the code. Keep one wherever a decision would surprise a reader, and write why: for example, // capped at 3 retries because the provider limits us to 5 calls a second. Change nothing else.”