JavaRush /Courses /Claude Code SELF /No spec, no result

No spec, no result

Claude Code SELF
Level 8, Lesson 1
Available

1. Why “just make it happen by itself” is not a spec

“Sam, listen.” Tommy bursts in with burning eyes, almost in the same tone as yesterday with the radar. “Make my requests get written somewhere automatically, you can do that, right?”

Sam does not ride the wave of enthusiasm — he calmly starts chopping the dream into boring pieces:

“What event should it react to? When you sent the request — or when the edit was applied? Those are two different moments. What should be written to the file — your entire text, or just the time? The agent’s reply too? Which file? As a line, as a table — in what format?”

“Well… just make it write itself. Well… whatever I asked for.” Tommy opens his mouth at the first question and gets stuck. There is no clear answer to a single one; every option disappears into fog.

“Here we go again,” he exhales. Familiar from yesterday: this is not a task, this is a mood. Sam is not being difficult — he literally cannot start until Tommy sorts out those boring “what / when / where” questions himself. Magic still requires a spec.

There is nothing else to do, so he goes to Alex. Alex does not bother with theory and answers lazily, in the spirit of the day:

“For that, there is its own little paper, a hook spec — HOOK_SPEC. Three fields: which event, which action, and where to write.”

And that is it. The explanation ends there — Tommy is expected to carry the rest himself.

2. Three fields in the spec: event, action, and where to write

Documents again? What is this even — Tommy really did get up on the wrong side of the bed today:

“Alex, did your mom not drop you into a vat of bureaucrats as a kid? Where does this love of paperwork come from? First reports, then requests, now specs.”

“You’ll understand when you grow up,” Alex snaps back.

Tommy sighs and quietly agrees to keep moving:

“And ‘where to write’ means where, exactly? Which file?”

“Into a regular text log outside.” Alex nods. “A simple file, sitting next to the project, updated automatically. Not a database, not storage, just lines one after another.”

That is enough. Tommy puts the spec together himself, with his own hands:

# HOOK_SPEC
EVENT:   I sent a request to the agent
ACTION:  record the time and the request itself
WHERE:   requests.log

“Three lines — and I never have to guess again.” Tommy admires the spec as if he has pulled off a scam. requests.log is something you can rely on: instead of guessing “which block was it yesterday,” you open the file and read — here, at 19:30, I asked to bring back the previous ticker version. “And most importantly, I won’t have to lift a finger, and it writes itself. Now that is what I call a spec for lazy people.”

From “make it happen on its own” to a hook spec. Top — a mood: “Make my requests get recorded somewhere on their own”; to any question the answer is “well… just so it writes itself”, and the agent has nothing to start from. Below — the questions; for each you pick one thing and drop the rest, and every choice becomes a HOOK_SPEC field. Which event: I sent a request, not the edit was applied — these are different moments; EVENT: I sent a request to the agent. What to write: the time and the request itself, not the whole conversation and not the agent’s reply; ACTION: record the time and the request itself. Where and in what form: a text file, line by line, not a database and not a table; WHERE: requests.log. “Well… just so it writes itself” is a mood; every field decided is a task, and the agent has something to start from From “make it happen on its own” to a hook spec mood “Make my requests get recorded somewhere on their own” to any question — “well… just so it writes itself”. The agent has nothing to start from Question You decide: one thing, drop the rest # HOOK_SPEC Which event? What to write? Where and in what form? request sent or editapplied — different moments all the text? just the time?the agent’s reply too? which file? linesor a table? ✓ I sent a request ✓ the time and the request ✓ a text file, line by line edit applied whole conversationagent’s reply databasetable EVENT: ACTION: WHERE: I sent a request to the agent record the time and the request requests.log “Well… on its own” — a mood. Every field decided — a task: the agent has something to start from

3. Not the whole conversation, but requests plus notes

As always, Tommy wants more:

“And let’s just write the entire conversation, every word — mine and the agent’s. That way we definitely won’t lose anything.”

For the first time today, Alex puts his foot down — not as a friend, but as someone who has already been through this:

“And why do you need the whole stream? Think about it. If you write down everything verbatim — every ‘yeah,’ ‘no, not like that,’ ‘and now make it blue’ — in a day you will have not a log, but a dump heap. Finding that one good version in it will be just as hard as searching session history is now. A full transcript quickly turns into junk where meaning drowns.”

“Fair enough.” Tommy actually got stuck in exactly that kind of stream this morning: the session history was there, every word was in place — and it was useless, because the needed thing was impossible to find. He basically already has a full transcript. And it is useless for exactly that reason: it is full.

“Got it.” He gives in. “The more you write, the harder it is to find. Some kind of paradox.”

“Not a paradox, just common sense.” Alex does not back off. “You do not need a verbatim movie; you need to quickly find later, ‘here we decided to do it this way.’ So we do not write everything, but the requests plus short key notes — what we ultimately agreed on, which decision we made. Not ‘the whole movie,’ but a table of contents with bookmarks. You can always watch the movie in session history if you really need to. But the table of contents is what you do not have right now.”

Not the whole movie, but a table of contents with bookmarks. Left — the transcript, the whole movie, every word: your requests and the agent’s replies mixed together — “make the number bigger”, “no, go back”, “ok, now make it blue”, “no, not like that, bring back the dark”, “oh, that’s it! the client likes it” — the decision drowns among everything else; the more you write, the harder it is to find. Middle — selection: we write the request — what you asked — and a note — what you settled on; we don’t write the agent’s replies, “ok” and “no, not like that”, every single word. Right — the decision log, a table of contents with bookmarks: time and request, and under the decisions — bookmarks “decided: time — hours and minutes” and the highlighted “decided: dark background, client likes it” next to the request “bring back the dark background” at 19:30; open it — you see right away what was decided. Into the log go requests and short notes; the whole movie, if you really need it, stays in the session history Not the whole movie, but a table of contents with bookmarks Transcript the whole movie — every word You: make the number bigger Agent: Done — the price is bigger. You: no, go back Agent: Reverted the size. You: ok, now make it blue Agent: Done — the background is blue. You: no, not like that, bring back the dark Agent: Done — background dark again. You: oh, that’s it! the client likes it Agent: Great, keeping it. ⋮ The more you write, the harder it is to find Selection what goes into the log ✓ We write • the request — what you asked • a note — what you settled on ✗ We don’t write • the agent’s replies • “ok”, “no, not like that” • every single word Decision log a table of contents with bookmarks 18:4019:0519:3020:10 “show hours and minutes” “make the number bigger” “bring back the dark background” “now make it blue” decided: time — hours and minutes decided: dark background, client likes it ⋮ Open it — you see right away what was decided Into the log — requests and short notes “what we settled on”. The whole movie, if you really need it, stays in the session history

“Now that is a decision log,” Tommy agrees. “Open it, see: I asked for this, we decided that. No rereading everything in a row. If I had had that this morning, I would have found that ticker block in ten seconds.”

4. One project, not all the magic in the world

Tommy is already getting carried away:

“If we can hang auto-actions on it — let’s attach everything at once! Let it collect the radar summary, format it, check it, and do ten more wonders. Might as well squeeze out the maximum. What do you think?”

He rattles off five ideas in a row, and each one seems brilliant to him. Alex slows him down — not out of spite, but so the first win comes out clean:

“Stop, do not scatter. If you pile on five such ‘it does it by itself’ things at once, you will not really feel any of them, and if something goes wrong, you will not know which of the five is to blame. Today we are doing one thing, but in a way that lets you live through it end to end.”

flowchart TB
  subgraph S["All at once"]
    direction LR
    S1["Log, summary,
formatting, checks"] --> S2["Something went wrong"] --> S3["Which one
is to blame?"] end subgraph O["One at a time"] direction LR O1["Only the log"] --> O2["Request —
a line in the file:
you see it live"] --> O3["It works —
lived it through"] --> O4["The next
“on its own”"] end S ~~~ O

“Why the log specifically?” Tommy does not understand why his summary is any worse.

“Because it is the most visual of them all.” Alex does not back off. “With the others, you will see the result sometime later. But with the log — right now, with your own eyes: sent a message — there is a line in the file, sent another — another line. You are literally watching it work by itself. For a first try, that is the most important thing — to see the magic live, not take it on faith. And it fits your live things perfectly — radar, ticker: later it will be useful to remember what you ordered there and when. The benefit is not made up — it fits your morning pain exactly.”

Alex saves the other wishes — auto-summary, the rest of the small miracles — for later, like dessert, once Tommy gets into the groove after the first win. And as if by the way, very quietly, he drops:

“The habit of recording what happened and when will come in very handy one day. For now it is just useful. But remember that you now have such a tool.”

“Yeah, convenient.” Tommy nods absentmindedly, another point for the genius of laziness, and immediately moves on to something else: “Listen, how does it actually work? So I can generally understand what to expect from it.”

1
Task
Claude Code SELF, level 8, lesson 1
Locked
Hook spec with three columns 📋
Hook spec with three columns 📋
1
Task
Claude Code SELF, level 8, lesson 1
Locked
What to write in the log, and what not to 🗂️
What to write in the log, and what not to 🗂️
1
Task
Claude Code SELF, level 8, lesson 1
Locked
Butler hook spec 🔔
Butler hook spec 🔔
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION