JavaRush/Courses/Claude Code SELF/Working with subagent findings

Working with subagent findings

Open

1. The subagent finds what the author missed

Now Tommy does everything himself and cleanly — from the role file to the game uploaded back again. Let’s go through it step by step so we can repeat it exactly.

flowchart LR
  A["You prepare the reviewer:
role, @, brief"] --> B["The reviewer
brings findings"] B --> C["You decide what to take
and add your own"] C --> D["The agent fixes,
you check"] D --> E["You upload it"]

Step 1. Put the subagent role into the project. One file, just like a skill was a file — .claude/agents/reviewer.md:

---
name: reviewer
description: Reviews the game for bugs and rough edges. Use when asked to look at a finished thing with fresh eyes.
---

# Reviewer

Open the game and its code for the first time, without assuming "how it was intended".
Find: bugs, awkward controls, rough edges.
Return a list of findings by item, each with a priority (high / medium / low)
and an exact location (file, what exactly is wrong).
Do not fix the code yourself — just report.

Step 2. Check that the worker started — type the at sign in the prompt:

@

A list drops down — among the project files is our worker with its description:

reviewer (agent)   Reviews the game for bugs and rough edges…   ← in place

Visible by the at sign — that means this session knows about it, so you can work. The file is in place, and a couple of seconds later the worker is available: no restart needed.

If the list is empty — almost always the issue is that the .claude/agents/ folder was not there when we started the conversation. Then restart it, keeping it:

claude --continue

Step 3. Write the brief — a short task for the reviewer, REVIEW_BRIEF, so it does not spill across the whole game:

# REVIEW_BRIEF — Snake v2
CHECK:
  - tail behavior on a sharp turn (something jerks)
  - controls: is there any delay on turns
  - rough edges noticeable to the player after release
YOU MAY SUGGEST: gameplay improvements
DO NOT TOUCH: the core mechanic, the base visual style

Step 4. Delegate — one phrase, and take your hands off the keyboard:

Let reviewer take apart my Snake according to REVIEW_BRIEF and find what to improve.

Tommy leans back and watches the work go without him. The reviewer opens the files by itself, runs the game by itself. A few seconds — and instead of a vague “not great in places,” the chat gets a point-by-point breakdown:

SNAKE REVIEW v2 — according to REVIEW_BRIEF

[HIGH]   Tail bug. game/index.html, function checkCollision():
         the collision check runs on the frame when the tail has not yet
         moved off, → stepping onto the departing tail's cell causes a sudden
         "death", although the cell is freed on that same tick.
         Happens on a long snake + tight turn.
[MEDIUM] Controls. The turn is applied on the next tick, not immediately —
         hence the feeling of delay. The input can be applied in the same frame.
[MEDIUM] The start is too fast: in the first few seconds the player does not
         have time to orient themselves.
[LOW]    Food blends into the background on dark cells — could be highlighted.
[LOW]    No high-score counter — a small, but nice detail.

I did not touch the mechanic or style (per the brief).

Tommy scans from top to bottom — and on the very first line he freezes.

“No way.”

First item, [HIGH], exact location: game/index.html, checkCollision(), tail on a sharp turn. That very bug. Not “something jerks” — file, function, reason. That exact hole that Sam sat with in the morning and kept nodding at, “everything is correct.”

And the nitpicker, which opened his Snake for the first time in its life, pointed at it immediately. First item. In a few seconds.

“And it was sitting there in the uploaded version,” Tommy exhales, slightly uncomfortable. “I proudly threw it into the gallery a week ago. ‘Done.’ And look at that.”

Tommy leans back and stays quiet for a couple of seconds. Alex had recently explained to him about fresh eyes — neatly, point by point, and Tommy had nodded and thought, “yeah, makes sense.” But now this is no longer a lecture. Now it is his bug, his game, and some outsider has pointed at a hole he himself walked past for half a day.

“Other people could have caught it,” he says quietly. “They would open it on a phone — and that would be that. And Sam walked past it a hundred times. Got used to ‘the tail acts weird sometimes, oh well.’”

He rereads the line once more — and instead of getting angry like in the morning, something like respect slips through.

“Not because it is smarter than Sam,” he adds to himself. “Because it is fresh. Sam stared at it for half a day and did not see it — and the reviewer looked for the first time and pointed a finger right at it.”

2. What we take on, what we reject

Besides the bug, the reviewer brought a handful of gameplay improvements. Make the turn more responsive. Slow the start speed down a bit. Highlight the food more brightly. Add a high-score counter.

The first impulse is the old, schoolboy one: if the smart reviewer suggested it, then you have to take it all — it obviously knows better. Tommy is already reaching to tell Sam, “do everything at once” — and then he pulls himself back.

“N-no,” he says out loud. “A list of suggestions is not yet a list of orders.”

It is not up to the reviewer to decide what lands in Snake, but up to him. And he goes through the items one by one like someone weighing each of them.

“Tail bug — fixing it, no questions asked, a shameful hole. More responsive turn — yes, I have been annoyed by that for a long time, I’m taking it. Slower start speed…” he says, mentally estimating, “yeah, taking that too. But ‘make the food brighter’ — stop.”

Tommy looks at his food and realizes that he already likes it.

“This is not a bug. It’s taste. The reviewer has one taste, I have another. Rejecting it. High-score counter — good idea, but not today, we’ll postpone it.”

He takes some things, postpones some things, rejects some things — and for the first time does it with a sense of permission. Before, he was just doing what others wanted: told to do it — did it. And now he is the one who decides what will even get done.

flowchart LR
  N["Reviewer’s
finding"] --> Q{"Is it a bug?"} Q -->|"yes"| Fix["I fix it
first"] Q -->|"no"| W{"Do I need it?"} W -->|"yes, now"| Take["I take it"] W -->|"yes, but not today"| Later["I postpone it"] W -->|"no, it’s taste"| Drop["I reject it"]

He chose — and sends it to be worked on. The main hole first, in plain words, just like Alex taught him to assign tasks:

Sam, fix the tail bug in Snake that the reviewer found.
---
[HIGH]   Tail bug. game/index.html, function checkCollision():
         the collision check runs on the frame when the tail has not yet
         moved off, → stepping onto the departing tail's cell causes a sudden
         "death", although the cell is freed on that same tick.
         Happens on a long snake + tight turn.

The agent goes into Snake’s code and fixes the game logic — the very logic where Sam sat in the morning and failed to notice it.

“‘Done, fixed it,’” Tommy reads in the reply and smirks. “Yeah, sure. Fixed it. We’ll check now.”

He is not going to take it on faith. He opens the game locally, grows the snake to a decent length — the same kind that had caused the jerkiness in the morning — and deliberately makes that sharp turn.

One second. The tail goes through the turn.

Clean. No stutter. Again, even sharper — clean. No bug.

“Theeeere we go,” Tommy draws out with pleasure. “That’s more like it. Not ‘the agent said it fixed it’ — I personally checked it with my own hands.”

flowchart LR
  A["Agent:
“done”"] --> R["Repeat the scenario
where you caught the bug —
again and harder"] R --> C{"Clean?"} C -->|"yes"| OK["Accepted"] C -->|"no"| Back["Back to the agent:
what you see and where"] Back --> Fix["The agent fixes
it again"] --> A

3. Your own refinement on top of the findings

Tommy sends the turn and the start to Sam in the same manner — words, one task. And then he adds something that was not in the nitpicker’s list at all:

“And this part is from me,” he says. “The nitpicker stayed quiet about sound. But I want it.”

Add audio to Snake: a short sound on eating food and background music (web audio).

Sam applies the chosen fixes and hooks up Web Audio. The controls became more responsive, the start softer. And then Tommy opens the game, steers the snake to the first apple — and the speakers deliver a short, pleasant crunch. Catchy music starts up in the background.

“Oh!” Tommy breaks into a grin despite himself. “It has a soundtrack.”

He drives the snake across the screen just to listen. Crunch, crunch with every apple. That very thing he wanted in the morning, for the soul. The nitpicker made Snake cleaner, and this — is his, with his own voice.

4. Check and hand in the result

Tommy sends the updated Snake back into the gallery. To the same place where it already was — only now it is a different Snake. Without the strange bug. With responsive controls. With sound.

He looks at it in the gallery and suddenly catches the vague feeling that had been circling since morning.

“Wait a second,” he says to himself. “A week ago I thought I had finished it. Uploaded it — that’s it, forgotten, moved on to the next one.”

And it turns out it was not finished at all. You could come back to it — find the hole, fix it, add sound, look at it through someone else’s eyes.

“So uploading is not the end,” he says slowly. “It is… some kind of middle. You do 90% of the work, and the second 90% of the work is ahead of you.”

He runs his storefront through his eyes — Snake, landing page, toys — and for the first time sees them not as a stack of finished-and-forgotten crafts. These are things that live. And someone is guiding them. Him.

1
Task
Claude Code SELF,  6 level,  4 lecture
Locked
Role for the second worker 🔦
Role for the second worker 🔦
1
Task
Claude Code SELF,  6 level,  4 lecture
Locked
Run the reviewer by the brief 🔍
Run the reviewer by the brief 🔍
1
Task
Claude Code SELF,  6 level,  4 lecture
Locked
Fix the found bug with the agent's help 🐛
Fix the found bug with the agent's help 🐛
1
Task
Claude Code SELF,  6 level,  4 lecture
Locked
Implement the selected change, wrap the rest 🎚️
Implement the selected change, wrap the rest 🎚️
1
Task
Claude Code SELF,  6 level,  4 lecture
Locked
Add your own feature — sound 🔊
Add your own feature — sound 🔊
1
Task
Claude Code SELF,  6 level,  4 lecture
Locked
Run the second worker through its role 🎯
Run the second worker through its role 🎯
Комментарии
  • популярные
  • новые
  • старые
Для того, чтобы оставить комментарий Вы должны sign in
This page has no comments yet