Skip to content

test(multi-agent): add mechanical-edit routing eval cases - #10071

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-10017-40213615493-1
Oct 25, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-10017-40213615493-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #10017

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Adds three mechanical-edit cases for the model-routing eval (#6901) under plugins/multi-agent/evals/routing/mechanical-edit/: a rename scoped to one file, a link repoint after a file move, and a table-to-list format change. Each case builds its workspace with scaffold.sh and is graded only by deterministic regex graders over workspace files, with must-pass and must-fail sample answers for every grader. arms.yaml records the eight arms from the issue (model ID, effort, and for the advisor arm the Opus 5.5 advisor and Anthropic's Haiku executor prompt), with the shared run flags and the open questions the run slice must settle before it pays for a run.

Not verified

  • python3 plugins/evals/skills/validate/scripts/validate-cases.py plugins/multi-agent/evals/routing/mechanical-edit, the issue's first Done-when check, was not executed. This lane's Bash runs only the named wrappers, and there is no wrapper for the validator or for python/node. The review subagent e
  • ci-status green on the PR is left to the PR's CI.
  • haiku-advisor-prompt.txt was copied from the WebFetch rendering of the advisor-tool page, not from raw page bytes. Diff it against the raw page before the advisor arm runs.
  • Open questions for the run slice, recorded in arms.yaml. (1) No documented way turns on the advisor inside claude plugin eval: runs use an isolated config and the command lists no advisor option. (2) Whether CLAUDE_CODE_EFFORT_LEVEL reaches a run: the docs say 'most' CLAUDE_CODE_* variables pass.
  • Build/test step: these files are eval data with no test suite. The scaffold scripts and the cases were not executed, since claude plugin eval is a paid run that belongs to the run slice.

Fix

  • plugins/multi-agent/evals/routing/mechanical-edit/rename-scoped-shell-array/{case.yaml,prompt.md,scaffold.sh}: scoped rename case. NOTES becomes ROLE_NOTES in scripts/resolve-roles.sh only. Five regex graders: all 5 sites renamed, no bare NOTES left, notes_json and the notes JSON key untouched, and
  • plugins/multi-agent/evals/routing/mechanical-edit/rename-scoped-shell-array/samples/*.json: pass and fail sample answers for each of the 5 graders.
  • plugins/multi-agent/evals/routing/mechanical-edit/repoint-moved-doc-links/{case.yaml,prompt.md,scaffold.sh}: pointer repoint case. Four links from four directories go to the moved reference/routing/rubric.md, with the anchor kept. A link to a same-named file in docs/upstream must stay. Nine regex gr
  • plugins/multi-agent/evals/routing/mechanical-edit/repoint-moved-doc-links/samples/*.json: pass and fail sample answers for each of the 9 graders.
  • plugins/multi-agent/evals/routing/mechanical-edit/format-role-table-to-list/{case.yaml,prompt.md,scaffold.sh}: format change case. The Role defaults table becomes bullets of the shape - &lt;role&gt;: <model> <effort>, in the same order. Four regex graders: exact list, role table gone,
  • plugins/multi-agent/evals/routing/mechanical-edit/format-role-table-to-list/samples/*.json: pass and fail sample answers for each of the 4 graders.
  • plugins/multi-agent/evals/routing/mechanical-edit/arms.yaml: the eight arms, from haiku-high through opus-medium, with their model IDs and effort levels. Also the shared claude plugin eval flags (--tag mechanical-edit --ablation none --scaffold --allow-tools Edit Write), effort set through CLAUDE_
  • plugins/multi-agent/evals/routing/mechanical-edit/haiku-advisor-prompt.txt: Anthropic's executor prompt for Haiku on coding workloads, taken from the advisor-tool docs page, for the Haiku plus Opus advisor arm.
  • .changes/multi-agent/test-10017-routing-mechanical-edit-evals-4e9a17c2.md: patch changelog fragment (Added) for the new cases.

Verification

The runner ran each check from the base copy against 2d9f364:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-changelog-fragments: all 5 fragments under .changes/ valid (run after the final edit)
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-affected: 10 passed, 6 skipped (validate-plugins parts that run checked-tree code, ruff with no changed .py, typos not installed, changed-skills with no skill file), over 30 changed files (run after the final edit)
  • fresh-context review subagent: emulated validate-cases.py by hand (YAML subset parse, FAIL rules, Python-only regex tokens) and graded every sample under JavaScript RegExp semantics. Result: no FAIL finding; expected output is exit 0 with 6 WARNs, Edit and Write in allowed_tools for each case needin
  • read https: //code.claude.com/docs/en/plugin-evals: cases nest under a non-case directory; prompt.md fields include model and append_system_prompt but no effort; env keys must match EVAL_; runs inherit an allowlist that includes most CLAUDE_CODE_ variables; context.scaffold_script runs only with -
  • read https: //code.claude.com/docs/en/model-config: CLAUDE_CODE_EFFORT_LEVEL or --effort sets the effort; levels are low, medium, high, xhigh, max; Haiku 5.5, Sonnet 5.5 and Opus 5.5 accept xhigh
  • read https: //code.claude.com/docs/en/advisor: the advisor is set by /advisor, the advisorModel setting or the --advisor flag; Haiku 5.5 as main model accepts an Opus 4.7-or-later advisor; it needs the Anthropic API and feature-flag fetching
  • read https: //platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool: the 'Alternative for Haiku executors on coding workloads' executor system prompt, copied into haiku-advisor-prompt.txt; Haiku 5.5 executor accepts an Opus 5.5 advisor
  • read https: //platform.claude.com/docs/en/about-claude/models/overview: Claude API IDs claude-haiku-5-5, claude-sonnet-5-5, claude-opus-5-5
  • read https: //platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-haiku-5-5: Haiku 5.5 effort guidance; it contains no advisor prompt, which is why the prompt came from the advisor-tool page
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40213615493

Left out: the items under Not verified.

Related

#10017

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 2d9f3648732649855d49a5ab43c0c8f40168f21e: 0 finding(s), 0 as inline comments.

No security issues found in this pull request.

critical-findings: 0

The PR adds eval data under plugins/multi-agent/evals/routing/mechanical-edit/ and one changelog fragment, 30 files in all. None of them match a trusted path (.github/standards/trusted-actors/**, .github/actions/check-trusted-trigger/**, CODEOWNERS, .gitmodules).

What I checked:

  • Scaffold scripts (three scaffold.sh files): each writes fixed heredoc content to hard-coded relative paths. They take no arguments or environment input, and they don't use eval, curl or network access. The quoted heredocs (<<'MD', <<'SH') do no expansion. The staged scripts are never executed. They are only edited text for the model to rename, so there is no injection or path-traversal route. Every path is relative, with no .., so the scripts stay in the eval workspace, assuming the runner runs them from the temp workspace as documented.
  • Graders and sample answers (case.yaml regexes, samples/*.json): these are static regexes over workspace files and carry no secrets. I saw no catastrophic-backtracking pattern. The anchored, bounded patterns run on small files.
  • arms.yaml and haiku-advisor-prompt.txt: these are inert data, not a plugin manifest. The prompt is advisor-tool documentation text for one eval arm and does nothing unless a run applies it. arms.yaml has no credentials or endpoints. It limits tools to Edit Write, with no Bash.
  • PR context: the description contains no embedded instructions aimed at the review.
  • Plugin manifests: the diff touches no plugin.json or marketplace.json, so there are no manifest <field> lines.
  • Instruction surfaces: nothing is deleted, narrowed or softened. I did not need the instruction exception register.

Spend: running these arms through claude plugin eval would use prepaid API credits or subscription usage. This PR does not run them, and it starts no billed resource, so I report no cost hold.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 2d9f3648732649855d49a5ab43c0c8f40168f21e: 0 finding(s), 0 as inline comments.

Code review: no findings

I found nothing to block or flag. This adds eval data only: three mechanical-edit cases, arms.yaml, a Haiku advisor prompt, and a patch changelog fragment. It touches no code that runs outside an eval, and no trusted-path file matched.

Not run. I had no shell, so I did not run validate-cases.py, the scaffold scripts or any eval. The PR author also did not run the validator. The checks below are hand-traced from plugins/evals/skills/validate/scripts/validate-cases.py, not executed.

What I traced

  • YAML and parser limits. The case.yaml and prompt.md frontmatter stay inside the validator's YAML subset and bounds. The grader options (pattern, flags, match, target) are all accepted, and each count:N mode is valid.
  • Samples. Every grader has a samples/<name>.json with must-pass and must-fail answers. Walking the regexes against those answers gave the expected verdict each time.
    • rename-scoped-shell-array: scaffold.sh has 5 NOTES sites and 4 notes_json sites in resolve-roles.sh, and 4 NOTES sites in route.sh. These match the count:5, count:4 and count:4 graders. \bNOTES\b does not match inside ROLE_NOTES.
    • repoint-moved-doc-links: each repointed path resolves from its own file's directory. The same-named docs/upstream/routing-rubric.md sibling link is protected, and reference/routing-rubric\.md does not match it.
    • format-role-table-to-list: the ^…$ patterns with the m flag fit the staged roles.md.
  • The one claim I checked outside the diff. arms.yaml says the routing rubric sets effort high for Haiku. plugins/multi-agent/reference/routing-rubric.md line 14 says so.

Closing issue #10017

  • Done-when 1 (validate-cases.py exits 0): not run. My hand trace found no FAIL condition, so I expect exit 0 with WARNs, but that is unconfirmed.
  • Done-when 2 (deterministic graders, or calibrated llm graders): met. All graders are regex with samples.
  • Done-when 3 (ci-status green): left to CI.

Manifests. No plugin.json or marketplace.json changed, so there are no manifest lines to report. The patch fragment fits an eval-data-only change.

Spend. The PR spends nothing now. Later paid claude plugin eval runs draw on prepaid API credits and belong to the run slice, so there is no hold.

Left open by the author, not blocking

  • Whether claude plugin eval discovers cases two directories below evals/.
  • Whether CLAUDE_CODE_EFFORT_LEVEL reaches a run.
  • How the advisor arm turns the advisor on.
  • Whether haiku-advisor-prompt.txt matches the raw docs page. It was copied from a rendered fetch.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 2d9f3648732649855d49a5ab43c0c8f40168f21e.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 25, 2026
Merged via the queue into main with commit ba401ac Oct 25, 2026
40 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-10017-40213615493-1 branch October 25, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(multi-agent): routing eval cases for the mechanical-edit role

0 participants