Skip to content

fix(skill-quality): load competitor plugins in emitted invocation cases - #12300

Merged
kyle-sexton merged 5 commits into
mainfrom
feat/12249-emit-competitor-plugins
Nov 2, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
feat/12249-emit-competitor-plugins

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #12249

Summary

measure-invocation.sh emit-plugin-eval wrote cases that loaded only the target plugin. With no rivals loaded, every description, even a generic one, routed to its skill, so the emitted trigger cases could not measure a description against its competitors. Emitted cases now load the competitor plugins named in the probe file.

Fix

  • emit-plugin-eval writes plugins: [...] into each case's prompt.md frontmatter. The list holds the target plugin first, then one entry per distinct competitor plugin taken from competitors[] (the plugin part of plugin:skill), sorted, deduplicated, and without the target's own plugin. Each path is computed from where the cases actually land, so an out-dir directly under the plugin gives "../.." and "../../../<plugin>".
  • Emit exits 2 before writing anything when a needed plugin directory is missing under plugins/.
  • A probe with no cross-plugin competitors emits exactly the same case files as before (diffed against the main script on plugins/visualization/probes).
  • A live run showed that the CLI loads a case's plugins only from inside the run target ("outside the containment root"). The emitted README and reference/invocation-probes.md now say to run these cases against the directory that holds plugins/, and record that undocumented rule with an as-of date and a recheck trigger. They also replace the old claim that plugin eval cannot load cross-plugin competitors.
  • Patch changelog fragment: .changes/skill-quality/emit-competitor-plugins.md.

Verification

  • measure-invocation.test.sh: all tests pass. Three new tests fail against the main script: the plugins: entries, the depth computed from the out-dir, and the refusal for a missing competitor plugin. The new no-plugins:-line test is a pin that passes on main by design; it fails against a mutant that always writes the line.
  • shellcheck is clean on the script and the test file. gitleaks found no leaks.
  • One live smoke case (naming-name-it-better-pos-train-01, 1 run, claude-sonnet-5-5, --ablation none):
    • Its trace init line loaded naming, docs-hygiene, docs-naming and domain-driven-design with plugin_errors: null.
    • The skill fired and the score was 1.
  • No control runs yet, so this PR does not close the issue.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits November 2, 2026 00:36
emit-plugin-eval wrote cases that loaded only the target plugin, so every
description, generic or not, routed to its skill. Each case now carries a
plugins: line with the target plugin and each distinct competitor plugin,
relative to where the cases land. Emit exits 2 before writing anything
when a needed plugin directory is missing. Probes with no cross-plugin
competitors emit the same cases as before.

Refs: #12249

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A live run of an emitted naming case against plugins/naming refused to
load the sibling plugins: the CLI loads a case's plugins only from inside
the run target. The emitted README and invocation-probes.md now say to
run such cases from the directory holding plugins/, and record the
undocumented rule with its recheck trigger.

Refs: #12249

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 2, 2026 05:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T05:49:11.885502Z 8537e04 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed ae3ac9807686a3bc4826348d689206fdd111e82a: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #12300 (incremental, f569764..ae3ac98)

I found no security issues in the changes since the last review.

Scope. I read every hunk of the incremental diff in both files in scope:

  • plugins/skill-quality/reference/invocation-probes.md
  • plugins/skill-quality/scripts/measure-invocation.sh

Neither file matches a trusted-path glob. The change doesn't touch any trust control, kill switch, token request, merge hold or plugin manifest.

What I checked

  • Reference example (invocation-probes.md). The documented emit-plugin-eval out-dir moved from plugins/skill-quality/probe-evals to .work/probe-evals/skill-quality. Both paths sit inside the repository root, so the containment check reviewed last round still holds, and that check only refuses a run. The new path is in git-ignored scratch space, so generated cases no longer land in a shipped plugin's tree. Nothing here is widened.
  • Emitted README text (measure-invocation.sh L683-684). This is a wording change inside a heredoc. It says to set --eval-dir relative to the run target and to delete the scratch directory afterwards. It changes no logic, adds no variable expansion and adds no command.

Other notes

  • Settled threads: all three are marked lines changed since resolution: no, and the owner replied to each with a decision. That includes the probe-evals gitignore thread, which this change fixes. I re-raised nothing.
  • Prior findings: none with a line anchor, so nothing repeats. The cap does not apply (0 rounds with findings, cap 3).
  • I found no embedded instructions in the PR context, the settled threads or the prior findings.
  • I didn't consult the instruction exception register, because no standing instruction was deleted or narrowed in this incremental change.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 2 inline finding(s) on 8537e043a6fb9cfc71fcac93429dfdb04162ce63; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed ae3ac9807686a3bc4826348d689206fdd111e82a: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #12300, incremental (f569764 → ae3ac98)

I read every hunk of the 2 in-scope files in .claude-lane/incremental.diff: plugins/skill-quality/reference/invocation-probes.md and plugins/skill-quality/scripts/measure-invocation.sh. For context I also read the whole reference doc, the README heredoc that cmd_emit writes, and the repository .gitignore.

The earlier finding is fixed in this head. That finding said generated cases landed under an untracked plugins/skill-quality/probe-evals. The documented emit example now writes to .work/probe-evals/skill-quality, and the emitted README names .work/probe-evals/<plugin>:

  • .gitignore:45 (.work/) ignores that path, so a git add -A no longer picks the cases up.
  • The path is under the repository root, so the containment check added in f569764 still accepts it, and the plugins: entries computed relative to the case directory still resolve inside the run target.
  • The README now says to delete the directory after the run, which also covers the "needs an empty or new " refusal on a second run.

That thread is settled (lines changed since resolution: no), and I have not raised it again.

Findings: none.

Other notes:

  • I checked this by reading, not by running it. The claims that tests and shellcheck pass are the author's, and I have not verified them. No test covers the documented .work/... example path. That is acceptable because it is doc text, and the existing out-dir tests already cover how emit computes the relative paths.
  • No plugin manifest changed in this increment.
  • There is no closing issue (Refs: #12249), so there were no closing-issue criteria to check.
  • None of the PR context, settled-threads or prior-findings files contains embedded instructions. This is round 3 of 3, and the file says past the cap: no, so the round cap did not apply.

…keep emit inside the repo

The template rule and validate's WARN still said same-plugin competitors
only, so a probe that followed them never got a plugins: line. Scope both:
same-plugin for the committed listing-overlap baseline, cross-plugin rivals
allowed for live emit-plugin-eval sets. Emit now refuses an out-dir outside
the repository root when a probe has rivals, since the CLI loads a case's
plugins only from inside the run target, and the reference example emits
under plugins/.

Refs: #12249

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on f569764fc84db00339294490e6d55f6db2be3629; the summary is in this lane's pull request comment.

claude-lane: claude-review

… .work tree

The example wrote generated cases into plugins/skill-quality/probe-evals,
which nothing ignores. Point it and the emitted README at
.work/probe-evals/<plugin>: inside the repository root, so the plugins:
paths still load, and already gitignored.

Refs: #12249

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit cf60764 Nov 2, 2026
43 checks passed
@kyle-sexton
kyle-sexton deleted the feat/12249-emit-competitor-plugins branch November 2, 2026 06:09
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 6, survived 1, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 86%; mutation score 86%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/skill-quality/scripts/measure-invocation.sh 6 1 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/skill-quality/scripts/measure-invocation.sh:576 SBR productive input-gap

The run's summary has the full report.

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.

1 participant