JavaRush /Courses /Claude Code SELF /Scope: where the task ends

Scope: where the task ends

Claude Code SELF
Level 15, Lesson 1
Available

1. Scope as a contract with the agent

Oliver starts not with code, but with a question Tommy had never asked himself before:

— So you told the AI, "fix this." But where does the task actually end? How far is it allowed to go?

Tommy opens his mouth — and closes it. He has nothing to say. He goes through in his head what exactly he told Sam, and runs into a hole.

— Well, I... — he fidgets. — I only said WHAT to do. Fix this thing here. As for where to stop — nowhere. Not a word. It never even occurred to me that I had to say that out loud.

— And it did not occur to it either, — Oliver nods. — You gave it one goal — it went straight toward it. And on the way it grabbed everything that seemed like "while we're at it, it will be better." Not because it is malicious. Because there were no boundaries anywhere, and where there are none, they do not exist for it.

— In your own code, you could get away with that, — Oliver continues, — and you were right to do so, by the way. Because in your own code you could already feel where not to poke: your hand would naturally go around it. But here there is no instinct — where would it come from, you are seeing this file for the first time. So what used to guide you on its own here has to be written down by hand. In plain words: up to here — allowed, beyond here — not allowed.

That "up to here, allowed; beyond here, not allowed" is what scope is called — the boundaries of the task. And it is set not in your head, but right in the task definition. Tommy had already spent a week getting used to a proper spec — with "what to do" and "how to prove it." Now, apparently, a third part is being added to that spec, one that was not there before: a forbidden block. Not just "fix sponsor block," but explicitly — work only inside this zone; do not touch the contractor's layout, adjacent modules, or the external contract at all.

Tommy, looking at this, tries to find a familiar analogy so the idea settles all the way through:

— It is a contract, basically. You were invited into someone else's apartment to fix a faucet in the bathroom. That means you fix the faucet — and that's it. You do not go into the bedroom, you do not touch the wallpaper in the kitchen, you do not move the furniture, even if it seems to you that "it would be more convenient this way, I can see it." Maybe it would be more convenient. But they did not ask you about that, and the apartment is not yours. The task boundaries are an agreement between you and the person who invited you. Want to go broader? Ask separately, get a separate "yes." And if you silently go beyond the boundaries because "you're already on your way," that is no longer help, it is a violation, even if your intentions are the best.

— And with an AI agent it's the same, — Oliver picks up. — Only the agent will not even think to ask. A human might at least feel embarrassed about doing too much, but this thing will just plow ahead.

Tommy adds the forbidden block and sums it up himself, clumsily, but still:

— So scope is not "what I want to do." It is "how far am I even allowed to go." A boundary, not a desire. And it has to be put into the spec just as firmly as the task itself, otherwise the agent will decide for me — and it will decide broadly.

— There, — Oliver nods. — Now at least it is clear where your AI is supposed to stop.

2. Topography of someone else's code: where the mines are hidden

Next Oliver gives Tommy what no agent ever would — a map of the terrain in someone else's file. Not philosophy, but concrete land mines.

— Look here, — he pokes at the bit Sam had cheerfully "spruced up." — This indent looks unnecessary. Cosmetic stuff, it does not mean anything, right? But it is holding the block. Remove it — and the whole column shifts to the right, and the sponsor logos will spread across the page like peas. And there you have a broken partner section out of nowhere, and a call from Tony saying "everything fell apart." In someone else's layout, half of what looks like garbage is actually load-bearing. You just do not see the map the author had in mind when they wrote it.

Tommy looks at that indent, then at the neighboring one — and truly does not understand what makes one more important than the other. From the outside they are twins, two identical spaces. In his own code he would immediately know why each one is there. Here — nothing, no intuition, only Oliver's word. And that is a little scary: the whole support of his own instinct, which he had been proud of, just does not switch on here.

— And one more thing, — Oliver goes on. — See how the AI renamed one thing here "for beauty"? In your own code that is a two-second detail. But here that thing sticks out in five places at once, all over the file. And if you rename it not everywhere, but only here — half the page will silently break. No error, no red text, not a single complaint. Just a piece will stop working, and you will sit there guessing why yesterday it was fine and today it is not. And you will not connect "the AI prettified the name" with "the block broke" right away.

Tommy leans back in his chair. The main rule of someone else's apartment feels uncomfortable.

— So in my own place I am a god, — he says. — I know by heart what is load-bearing, what is decorative, what can be torn down, and what holds up the ceiling. But here there is no map at all. Which means, by default, any change is dangerous until I prove otherwise. Not "improve it while I'm at it, since I am already here." But "I touch exactly what they asked for, and I inspect each shift separately, like a sapper."

— The presumption has flipped, — Oliver confirms. — At home, everything is safe until proven otherwise. Here, everything is dangerous until proven safe.

— So caution here is not nitpicking, — Tommy says. — It is just that I cannot see where the wires are under the plaster.

Oliver snorts, almost approvingly. And again, without sarcasm.

3. Say the task out loud

Tommy turns away from the foreign code — his eyes are done with it. And he sees Oliver pull out a drawer, take a crushed yellow beer can, set it to the right of the monitor, on a worn-out circle in the dust.

— So where did you put the initialization, — Oliver says to the can. — Not here. Not here either. And if you did not invite it at all, then... — he falls silent, clicks the mouse, nods. — Aha. Did not invite it.

The can goes back into the drawer.

— Uncle Oliver, where is Vaska? — Tommy asks. — You had a duck here.

— Threw it out.

— Vaska?!

— That one. — Oliver finally turns around. — For twenty years I talked to it like this. Say the task out loud, and it untangles itself. That is how I was taught, that is how I worked, and I worked pretty well, by the way. But now you have AI. Write two sentences — project is done. That is my whole school.

He nods at the pushed-in drawer.

— I threw it out, but it does not stay thrown out. So now it is a can. Funny, right? A man talking to a can. And it works.

He turns toward the monitor.

— Were you going to look for the initialization, or are we chatting here?

4. Task definition is the same craft

Tommy turns the screen toward Oliver — to show how he now writes a task for the agent. Not "make it pretty," but "do this, do not go further, show the diff." With a boundary, with a forbidden block, with a requirement for proof. And he catches himself speaking to Oliver calmly, as an equal, not fending off jabs like he did all month.

Oliver reads — and falls silent over the text. And while he is reading, Tommy adds a couple more lines to Sam and, without looking, sends them off calmly — as if this had long since become routine. Oliver catches it out of the corner of his eye: there sits yesterday's slacker, pushing the AI around in every possible way without breaking a sweat, and the AI obeys. And something in Oliver slumps.

— You know what is funny, — he says suddenly, and there is no venom in his voice, only something duller. — I thought the world would sweep away people like you first. Slap things together on their knees, slapdash, without thinking — and then they would fall apart. I sat and waited. — He nods at the screen, where Sam is hammering away at Tommy's word. — And it turns out it will sweep away people like me. The ones who do everything by hand, honestly, slowly. I thought I had the edge. And it turns out the edge is yours.

Tommy opens his mouth to answer with a joke — and cannot find one. Oliver is not baiting him and not complaining. He just said out loud what had clearly been sitting there for a long time.

— This is just ordinary task definition, — Oliver says a little later, more evenly, as if bringing himself back onto solid ground. — I wrote tasks for juniors exactly like that for years. What to do, what not to touch, how to deliver it. A boundary is a boundary, whether you set it for a person or for this neural network of yours. No magic. Discipline. — And more quietly, as if to himself: — Maybe it will not sweep me away if I learn too.

— And I thought you were going to start again with "your magic," — Tommy says cautiously, with a snort.

— It is not magic. It is exactly what I respect. — Oliver returns the screen. — The old school is about how to read someone else's work. Where not to trust external neatness, why speed in places like this is more harmful than caution. I spent years collecting that, with my own sweat, back when there were no agents in sight.

Tommy listens and, for the first time, does not brush it off. All month he had taken this for the nitpicking of an old IT guy — and now he hears the craft he himself does not have.

And at the end Oliver says what Tommy absolutely did not expect from him:

— Listen. If this mess in the contractor code takes longer than Tony would like, I will back you up. I will say that is how it is supposed to be. Better slower and clean than fast and planting another mine in someone else's part of the portal.

Tommy looks at him for a second. All month Oliver had been teasing him for his "toys" — and here he is suddenly ready to back him up, and not for the AI, but for exactly the fact that Tommy decided to do things carefully.

— Not "let's cut corners together," — Tommy says slowly.

— No. We will do it cleanly. Just without rushing.

And from that "we will do it" it warms up inside differently than from the usual office "wow" about his animation.

1
Task
Claude Code SELF, level 15, lesson 1
Locked
Task with a forbidden block 🚧
Task with a forbidden block 🚧
1
Task
Claude Code SELF, level 15, lesson 1
Locked
Mine map for a foreign file 🗺️
Mine map for a foreign file 🗺️
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION