Skip to content

workflows: the three roles run on their agent definitions - #46

Merged
lneto merged 1 commit into
masterfrom
implement-agent-types
Nov 27, 2026
Merged

lneto merged 1 commit into
masterfrom
implement-agent-types

Conversation

@lneto

@lneto lneto commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

The groomer, the implementer, the fix, the reviewer and the verifier of implement-issue and review-pr run as Claude Code's built-in workflow agent, whose every request carries tools and listings these roles do not need.

implement.js and review.js now launch them as the agents .agents/agents/ defines, each on the model and at the effort it took before, as D176 B on #6 settled: lunatik-groomer, lunatik-implementer for the implementer and the fix, and lunatik-reviewer for the reviewer and the verifier. Each still loads both AGENTS.md files and CLAUDE.local.md, and Claude Code appends to each body the same notes it gives the built-in agent, the one that keeps the user's and the project's details out of requests to outside services among them, so the bodies need no line more.

A first request carries 31 KB of tool definitions where it carried 94 KB, a 21 KB skill listing and the list of deferred tools. A reviewer and a groomer launched as the new types on sonnet started at 39,925 and 39,964 tokens on a one-paragraph task, where the built-in reviewer and implementer of the run before started at 66,105 and 64,206 on opus over their prompts and a built-in groomer at 66,193 on fable; the implementer's definition lists the same tools, and its first request is read with tools/usage.sh once a run takes it. The groomer's WebFetch of the sub-agents page returned its title.

A launch resolves the types where the project links them under .claude/agents/, as luainkernel/lunatik#2743 and luainkernel/luaebpf#62 do. The Skill tool is not among their tools, so a prompt names a skill by its file, as the groomer's and the implementer's now name review-pr's.
#6, which it does not close.
Closes #40
Closes #41

implement.js names lunatik-groomer for the groomer, lunatik-implementer for
the implementer and the fix, and lunatik-reviewer for the verifier, and
review.js names lunatik-reviewer for its reviewer, each on the model and at
the effort it took before, as D176 B on #6 settled.
They ran as the built-in workflow agent, whose first request carries 94 KB
of tool definitions, the 21 KB skill listing and the list of deferred
tools; a defined one's carries 31 KB of tools and neither list, over the
same AGENTS.md files and CLAUDE.local.md.

The definitions list no Skill tool, so the github line of the groomer's and
the implementer's prompts names review-pr's skill by its file.

Closes #40.
#6, which it does not close.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lneto lneto added complexity: small One line or one file, with a trivial or existing test workflow-reviewed reviewed end to end by a review workflow labels Nov 27, 2026
@lneto

lneto commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Note

This comment was written by an LLM, not a human.

What #6 requires, as the review read the change meeting it:

  • Met: D176 B (harness: workflows, context and memory cost fewer tokens #6, Update): "implement.js and review.js name them as agentType" implement.js:442 groom names 'lunatik-groomer', implement.js:451 implement names 'lunatik-implementer' and review.js:403 review/reread names 'lunatik-reviewer' Case: No suite runs workflow scripts. Pilot wf_e4e24882-d91 shows lunatik-reviewer and lunatik-groomer resolving with their tool lists; lunatik-implementer was not run.
  • Met: D176 B: "the fix taking the implementer's" implement.js:469: the fix call names agentType 'lunatik-implementer', with fixer, which falls back to the implementer's model and effort Case: No case can fail: no suite runs the workflow scripts.
  • Met: D176 B: "the verifier the reviewer's" implement.js:524: the verify call names agentType 'lunatik-reviewer' Case: No case can fail: no suite runs the workflow scripts. The type resolves, per the pilot's lunatik-reviewer agent.
  • Met: D176 B: "with the model and the effort the launch gives" (and D174 B: "The verifier runs on opus at high") role() and review.js's model and effort are unchanged and still spread after agentType. The verifier keeps model 'opus', effort 'high' (implement.js:524), as D174 B settles. Case: Pilot: model 'sonnet' passed with agentType ran claude-sonnet-5-5. No case reads the effort.
  • Differs: D176 B: "Not verified: that a deferred tool, WebFetch or TaskStop, can be named in tools:; the pull request shows each role's first request before and after, and a fetch from the groomer" The body shows these figures:
  • the reviewer: 66,105 before and 39,925 after;
  • the groomer: 66,193 before and 39,964 after;
  • the implementer: 64,206 before (added by this review);
  • the tool definitions: 94,136 before and 30,652 after;
  • the groomer's WebFetch result.
    The pilot lists WebFetch and TaskStop as direct tools, with nothing deferred. The implementer's (and the fix's) first request after, and the verifier's, are not shown: the body says the implementer's is read once a run takes it. Case: No case: this is a measurement in the transcripts, not a test.
  • Met: implement-issue: the groomer and implementer prompts name review-pr's skill without its path #40 Fix: "name the file, ${a.repo}/${H}.agents/skills/review-pr/SKILL.md, ... in the pull request that sets the agentType" implement.js:89-90: both github strings, curl and gh, name ${a.repo}/${H}.agents/skills/review-pr/SKILL.md. That file spells both forms (SKILL.md:22-26). Case: No case can fail: the string is prompt text. A grep of both scripts finds no other skill named by name.
  • Met: agents: check what the defined roles lose of the built-in agent's prompt #41 Fix: "read the built-in prompt's notes against the new one, and add to the bodies the lines a role needs that the loaded AGENTS.md files and CLAUDE.local.md do not already carry" The review read the systemPrompt of both prompt_snapshots and diffed them. The defined body gets the same Notes block, privacy note included, and its own StructuredOutput note. It lacks only "end your turn. No acknowledgment needed", and the pilot agents took no turn after StructuredOutput. Nothing is added to the bodies, which the body states. Case: No case: this is a reading of the transcripts.
  • Met: D176 B: "Each project links the three under .claude/agents/" Met outside this diff by harness: link the groomer, implementer and reviewer agents lunatik#2743 and harness: link the groomer, implementer and reviewer agents luaebpf#62, both merged; both masters list the three under .claude/agents. The implement-issue card states it at SKILL.md:83-86. Case: No case: the links are files in the two projects, outside this tree.

The matrix the change is held to:

Matrix, operation by agent type by outcome:

  • groom call (implement.js:442) as lunatik-groomer: resolves, gets 9 tools (Bash, Read, Edit, Write, WebFetch, WebSearch, TaskStop, Monitor, StructuredOutput), none deferred, AGENTS.md loaded, and WebFetch works ("# Create custom subagents"). Shown by pilot wf_e4e24882-d91, agent ad67e992c9b355463.
  • review call (review.js:403, REVIEW and REREAD) as lunatik-reviewer: resolves, same tools, AGENTS.md loaded. Shown by the same pilot, agent a6cf82abe8fe15fce.
  • verify call (implement.js:524) as lunatik-reviewer: same type as the reviewer, so it resolves by the pilot. Its own first request was not measured.
  • implement call (implement.js:451) and fix call (implement.js:469) as lunatik-implementer: not run. The definition's name: lunatik-implementer matches the string. The link is on luainkernel/lunatik and luainkernel/luaebpf master, and its tools: list is the same as the pilot's types, so its tool definitions are the 30,652 characters the pilot measured. Its first request was not measured.
  • model and effort with agentType: the pilot passed model sonnet and ran claude-sonnet-5-5, so the launch's model overrides the definition, which names none. Effort override was not observed.
  • unresolved type (a checkout without the links): not exercised. Every project that runs these scripts links the types (lunatik#2743, luaebpf#62).

What I measured from the transcripts, and it reproduces the body's figures:

  • Tool definitions (prompt_snapshot tools): 30,652 characters for the defined type against 94,136 for the built-in.
  • The skill listing is 21,030 characters, and the defined type carries no skill listing and no deferred-tools record.
  • First requests: 39,925 and 39,964 tokens for the pilot agents, against 66,105 (review), 64,206 (implement) and 62,737 (verify) for the built-in agents of wf_fdb2a2af-1e8.

#41: the system-prompt diff between the built-in and the defined agent has two differences:

  • line 1, the definition's body;
  • the StructuredOutput note. The defined version lacks "end your turn. No acknowledgment needed", and neither pilot agent took a turn after StructuredOutput.

The Notes block, privacy note included, is appended verbatim, and the instructions attachment (80.5k, with both AGENTS.md files, CLAUDE.local.md and MEMORY.md) is the same in both.

No suite runs the workflow scripts. functional.sh names no file, so nothing runs on the host. node --check passes for both scripts. advisory.sh, harness-mixed.sh, author-email.sh, machine-leak.sh, pr-body.sh (corrected body) and title.sh are clean, and the packet's "# Checks" section was empty.

@lneto

lneto commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Note

This comment was written by an LLM, not a human.

The implementer's first request after the change, which the body left to a later run: a pilot, wf_cbe83a29-525, launched lunatik-implementer on opus from the Lunatik checkout, and it resolved with Bash, Read, Edit, Write, WebFetch, WebSearch, TaskStop, Monitor and StructuredOutput, none deferred, AGENTS.md loaded. Its first request carried 39,728 tokens on a task of about 400 characters, where the built-in implementer of wf_fdb2a2af-1e8 started at 64,206 on opus over a task of 8.1k characters. The fix takes the same type, so its first request differs from this one by its task alone.

@lneto
lneto merged commit 5a58a25 into master Nov 27, 2026
2 checks passed
lneto added a commit to luainkernel/luaebpf that referenced this pull request Nov 27, 2026
The `harness/` mount moves to luainkernel/harness@5a58a25, which carries
luainkernel/harness#46: implement-issue and review-pr launch the groomer
as `lunatik-groomer`, the implementer and the fix as `lunatik-implementer`,
and the reviewer and the verifier as `lunatik-reviewer`, the definitions
this checkout links under `.claude/agents/`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lneto added a commit to luainkernel/lunatik that referenced this pull request Nov 27, 2026
The `harness/` mount moves to luainkernel/harness@5a58a25, which carries
luainkernel/harness#46: implement-issue and review-pr launch the groomer
as `lunatik-groomer`, the implementer and the fix as `lunatik-implementer`,
and the reviewer and the verifier as `lunatik-reviewer`, the definitions
this checkout links under `.claude/agents/`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lneto
lneto deleted the implement-agent-types branch November 27, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

complexity: small One line or one file, with a trivial or existing test workflow-reviewed reviewed end to end by a review workflow

Projects

None yet

1 participant