Declare a variable

Declare a variable in JavaScript — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
Declare a variable to hold the current user ID so the rest of the module can reference it. The…
Declare a variable to hold the current user ID so the rest of the module can reference it. The variable should be named currentUserId, be block scoped, initially null, and include a one-line comment explaining why it is mutable.

Improve — make it easier to accept

+
Before I push this change, make the variable declaration reviewer-friendly: explain when it becomes…
Before I push this change, make the variable declaration reviewer-friendly: explain when it becomes non-null, show the few lines of code that will assign it in the login flow, and flag any race conditions a reviewer should check for. Keep the comment concise and concrete.

Decide — diagnose the stuck moment

+
I declared currentUserId as let currentUserId = null and some tests now fail only under…

I declared currentUserId and tests intermittently fail

I declared currentUserId as let currentUserId = null and some tests now fail only under concurrency. I suspect race conditions between token refresh and route guard. Who owns the sequence I need to coordinate with, what precise questions do I ask them, and what small code change will make the race visible in tests so I can fix it?

Become — change the pattern

+
On this codebase we keep introducing module-level mutable variables like currentUserId and then…

We scatter mutable module state across many files

On this codebase we keep introducing module-level mutable variables like currentUserId and then spend time hunting bugs when state diverges. Where is the real productivity loss — readability, testing, or initialization order — and what habit change and architectural rule would stop us from doing this again?

Next to this one

Other programming language work people do in JavaScript.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.