Skip to content

docs(evals): plugin eval Phase 0 — enablement, graders, ablation, sandbox hooks, cost (#987) - #1003

Merged
admarble merged 6 commits into
mainfrom
feature/987-feat-evals-adopt-claude-plugin-eval-as-the-skill-l
Sep 8, 2026
Merged

admarble merged 6 commits into
mainfrom
feature/987-feat-evals-adopt-claude-plugin-eval-as-the-skill-l

Conversation

@admarble

@admarble admarble commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Phase 0 of #987 (graph node 07): empirically validate claude plugin eval before any eval case is authored. One committed file — docs/investigations/plugin-eval-phase0.md — answering P0.1–P0.6 with recorded runs.

Phase 0 verdict: GO, with three binding constraints for #993/#994. Total spend $9.78 of the $25 ceiling.

Headline findings:

  • Path target . resolves to the worktree, not the marketplace cache — feat(hooks): warn when the installed plugin cache is stale — plugin-channel installs never auto-update #784 answered; no build gate needed.
  • Deterministic-only grading is viable — 4 of the 6 accepted grader types are deterministic, enumerated from the CLI's validation schema. OQ-6 holds.
  • A sequant PreToolUse guard does not take effect in the eval sandbox. An in-workspace write that the host hook blocks unconditionally (positive control: HOOK_BLOCKED, exit 2) was granted and completed inside the sandbox with HOOK_BLOCKED absent. Hook-dependent assertions are invalid under plugin eval.
  • The broken-skill canary showed every prompt-dictated grader passing against an 8-line stub skill, tool_used: Skill included. Only skill-emitted surfaces discriminate.

Pre-PR AC Verification

AC Source Description Status Evidence
AC-1 Original P0.1 PASS with today's evidence ✅ §1; grep -c 'P0.1' … → 5; probes re-run 2026-09-07T05:38:26Z on CC 2.1.263, reproducing lab-notes §1
AC-2 Original P0.2 target resolution + ablation ✅ §2; ac2.json shows plugins[0].path = the worktree, ablation: with-without, two arms, skill-fired (tool_used: Skill) passing on the with arm
AC-3 Original P0.3 grader vocabulary ✅ §3 enumerates all six accepted types from the CLI's own validation message (regex | tool_order | tool_used | file_exists | llm | baseline), recovered from the binary's schema, and marks the four deterministic ones; verdict-marker-fields asserts on marker fields and passed
AC-4 Original P0.4 scaffold + hooks ✅ §4; --scaffold reached a verdict marker (ac4.json). Hook outcome measured by a dedicated probe (hookfire.json, $0.0886): an in-workspace write granted by the permission layer, under a non-existent SEQUANT_WORKTREE, completed with HOOK_BLOCKED absent — while the same input on the host returns HOOK_BLOCKED exit 2
AC-5 Original P0.5 cost/wall ✅ §5; ac5.json — 3 runs × 2 arms, $4.2577 / 495 s → $0.71 per case-run; P2 decision stated
AC-6 Original P0.6 null-run canary ✅ §6a null run 0.00 both arms; §6b broken skill 0.667 vs 1.000 intact, passRate 0 at threshold 1.0
AC-7 Original clean tree + verdict comment ✅ test ! -d evals && test ! -d evals-phase0 → PASS; verdict comment #issuecomment-5565682014
AC-8 Original cost recorded, under $25 ✅ §8 ledger totals $9.78; 8/8 claude plugin eval commands in the doc carry --max-cost-usd
Derived
AC-9 Publish default every command carries --no-publish; state whether anything published ✅ 8/8 commands carry --no-publish; §8 preamble states it; nothing published to claude.ai
AC-10 Tool-grant blast radius grant recorded, no real GitHub write ✅ §4d — grant was --allow-tools Write only; standalone /qa could not reach gh issue comment; no eval run posted to a real issue
AC-11 Artifact leakage --eval-dir evals-phase0; JSON/report/output outside the repo ✅ every command carries --eval-dir evals-phase0; --json/--output-dir point at /tmp or …/.987-phase0-evidence/; AC-7 confirms no leakage

Mutation verification

AC-6 is the gate-test AC, and it is a mutation test by construction — the canary is the mutation.

Canary mutation (AC-6; not a gate test, so not a Mutation-verified: gate record) — replaced the plugin's skills/qa/SKILL.md (3,735 lines) with an 8-line stub; the phase0-qa case dropped 1.000 → 0.667 and its qa-gaps-marker and qa-trust-boundary-section graders failed (passRate 0 at --threshold 1.0); restored via git checkout and re-verified invariant I-4 (md5 -q across the three qa/SKILL.md copies → 1).

Note the null canary (§6a) is the second half of the same AC and was already red: 0.00 on both arms, with a file-targeted regex grader on a missing file throwing rather than passing vacuously.

Invariants (PLAN §5)

  • I-4 — three qa/SKILL.md copies byte-identical after the mutation was restored: md5 -q … | uniq | wc -l → 1. ✅
  • I-5 — not applicable: this node ships no gate test (docs-only diff); the AC-6 canary mutation is recorded above as narrative. (Runner edit 2026-09-07: the original SEQUANT_MUTATION marker named eval graders as failedTest, which /qa §6i classifies as test_not_in_diff — false evidence — so it was removed rather than left to fail the gate.)
  • I-6 — stop at PR. Not merged, issue not closed. ✅
  • I-9 — every AC's Verify command was run, not reasoned. The AC-7 comment check needed gh issue view --json comments because the plain --comments form errors on the deprecated projectCards GraphQL field; the assertion itself is unchanged (→ 3). ✅

Scope

Committed: docs/investigations/plugin-eval-phase0.md only. No evals/, no plugin.json change, no CI. The throwaway evals-phase0/ was deleted before this PR.

Test plan

Closes #987


Correction (loop iteration 1)

QA caught a real defect in the first push: §4b quoted a Write request from one run spliced to a success result from a different run, and concluded the sandbox "silently rewrote" the path and reported success. The traces say otherwise — the four runs that issued that write got is_error: true / "Permission to use Write has been denied…" from the permission layer, upstream of hooks, so the probe never tested hooks at all.

Rather than downgrade P0.4 to inconclusive, the probe was redesigned to remove the confound (an in-workspace write the permission layer grants, under a non-existent SEQUANT_WORKTREE, which pre-tool.sh:1029 blocks unconditionally) and re-run for $0.0886. The write succeeded inside the sandbox; the identical input on the host returns HOOK_BLOCKED exit 2. P0.4's hook half is now a measured KILL, with the uninstalled-vs-env-starved mechanism named as unseparated rather than glossed.

Also corrected: §3's grader table no longer presents itself as an exhaustive enumeration.

Follow-up (exec re-dispatch)

Closed the last soft spot QA flagged on AC-3. The grader list was previously the observed-working set, because neither source the AC names enumerates the vocabulary. The CLI does not ship a schema file but it validates against one, and its rejection message enumerates the accepted set — recovered from the binary:

: frontmatter must include "type:" (regex | tool_order | tool_used | file_exists | llm | baseline)

That turned a bounded-honesty caveat into a real enumeration, and surfaced two things Phase 0 had missed and #993 will want:

A+ pass (runner, 2026-09-07, commit 1ea869c)

Addresses the QA round-2 notes so this PR can reach READY_FOR_MERGE (docs only):

  • §4b now names CLAUDE_HOOKS_DISABLED (the hook's early exit) as the third mechanism that would produce the observed silence, alongside the uninstalled-hook and env-starvation explanations.
  • §3 states that name is schema-required on every grader but injected by the CLI from the grader's filename, which is why the Shape column omits it.
  • §9 states that the recorded artifacts are host-local and not reproducible from the PR alone, and names what a reviewer can re-derive anywhere (the strings enumeration; the host-side hook control) versus what must be re-bought at §8's costs.

AC-8 note for the record: 8/8 eval-running commands carry --max-cost-usd; the two shown non-running commands (plugin eval --help, plugin eval init --bare) spawn no agent and cannot spend, so no cap was added to them.

… grader name, and artifact reproducibility limits (#987)

Entire-Checkpoint: 4286c2dacb58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant