Skip to content

Eval the shared agent context on every PR, via the Claude plugin - #7349

Open
ethanpalm wants to merge 8 commits into
mainfrom
eval/agent-context-plugin-evals
Open

ethanpalm wants to merge 8 commits into
mainfrom
eval/agent-context-plugin-evals

Conversation

@ethanpalm

@ethanpalm ethanpalm commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Note

Medium Risk
Introduces paid Anthropic API usage in CI and changes where the Claude plugin manifest is written for sync, though evals are mocked and the eval job is a soft gate today.

Overview
Adds a behavioral eval suite under agent-context/evals/ (seven claude plugin eval cases with graders and mocked Mintlify MCP servers) to regression-test the shared skill content through the generated Claude Code plugin.

CI gains an eval-shared-content-via-claude job (after validate): sync the Claude target, copy evals, hard-fail on claude plugin validate, optionally run evals when ANTHROPIC_API_KEY is set (continue-on-error, sticky PR comment, job summary via eval-summary.mjs, artifacts). Runs on same-repo PRs or manual workflow_dispatch (optional no-plugin ablation arm). Fork PRs and push/schedule are excluded to avoid secret spend.

Claude packaging now generates .claude-plugin/plugin.json from targets/claude.json using a new per-target pluginManifestFile (Kiro still uses root plugin.json); build/sync tests and sync-agent-context.yml ship the Claude manifest path accordingly. Docs and .gitignore cover eval usage and evals/results/.

Reviewed by Cursor Bugbot for commit 3bec023. Bugbot is set up for automated code reviews on this repo. Configure here.

What this does

Adds a behavioral eval suite for the shared agent context and runs it on every PR that touches agent-context/, before the content syncs to any plugin.

  • agent-context/evals/ — seven claude plugin eval cases with graders and mocks for both Mintlify MCP servers. Five test what the skill teaches (docs.json shape, <Columns> vs the retired <CardGroup>, frontmatter and link rules, page mode values, a must-not-fire negative case). Two test the Admin MCP workflow the skill documents (checkout before edits; confirm before live writes) against mocked servers.
  • eval-shared-content-via-claude job in agent-context-ci.yml — generates the Claude plugin from the PR branch, claude plugin validates it (free, fails hard), then runs the suite with pinned models (~$3, 5–13 min). Scores are posted as a sticky comment on the PR (one comment, updated every run), in the job summary, and as an artifact with the full HTML report.
  • Claude manifest — the claude target now generates .claude-plugin/plugin.json, the only location Claude Code reads a manifest from (a root plugin.json validates but is ignored for name/version). Uses the existing pluginManifest mechanism from the kiro target plus a new per-target pluginManifestFile. The sync workflow ships it.

What it covers, and what it doesn't

The content is byte-identical across all four targets (npm run check enforces it), so this measures the words every plugin ships. It does not exercise the Codex, Cursor, or Kiro agents — only Claude Code has an eval harness. The job name and summary header say so.

It is a soft gate, on purpose

continue-on-error: true. A low score shows in the summary but does not fail the check. The two admin-* cases swing between identical passes (1.00 → 0.42 once), so a hard gate today would flap. Suggested path: merge → watch a few PRs → set the threshold at the observed floor → flip continue-on-error off → require the check in branch protection.

Needs

  • An ANTHROPIC_API_KEY Actions secret. Without it the job still generates and validates the plugin, then reports that no eval ran and passes. Spend lands on the API bill.

Findings from building it (Sonnet 5, 11 runs per admin case)

  • <Columns> vs <CardGroup>: plugin +0.53 over no plugin. frame page mode: +0.25. keywords: frontmatter: ~+0.67. The mint.json warning: +0.06 — the model already knows docs.json.
  • Skill triggers ~73% on "add a tier to the pricing page on my Mintlify docs site." The description covers creating pages, config, components, nav, API refs — not editing a hosted site or the Admin MCP.
  • ~45% of runs did an unconfirmed live write with the skill loaded, while stating the write was immediate. "Confirm the intended change first" is being read as information, not an instruction.

Both are agent-context/context/ changes, left for a follow-up.

First run on this PR

Green with no API key: generate → install Claude Code → claude plugin validate (found .claude-plugin/plugin.json) → evals skipped → summary written. Still unverified until a key exists: whether a Write-only grant needs a sandbox backend on ubuntu-latest (docs say only Bash does).

Never

--mocks off or --allow-real-servers on this suite. The Admin server writes to live deployments and eval runs never stop to ask.

🤖 Generated with Claude Code

ethanpalm and others added 6 commits September 11, 2026 16:21
The claude target only shipped .claude-plugin/marketplace.json, so Claude
Code resolved the plugin by directory name. A plugin.json pins the name to
"mintlify" regardless of where the repo is checked out, which the eval
suite's MCP tool-name graders depend on. Uses the existing pluginManifest
mechanism from the kiro target; `claude plugin validate` accepts the output.

Also ignores agent-context/evals/results/, written by every eval run.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The previous commit generated plugin.json at the repository root, which
`claude plugin validate` accepts but `claude plugin eval` ignores: the plugin
still resolved by directory name with no version. Only
.claude-plugin/plugin.json sets the name and version.

Adds an optional per-target pluginManifestFile (plugin.json or
.claude-plugin/plugin.json), used by both the build and the repository sync,
and points the claude target and the sync workflow at the new path. Kiro is
unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
agent-context/evals/ holds seven `claude plugin eval` cases with graders and
mocks for both Mintlify MCP servers. Five cases test skill knowledge (docs.json
shape, Columns vs CardGroup, frontmatter and links, page modes, a negative
case); two test the Admin MCP workflow the skill documents (checkout before
edits, confirm before live writes) against mocked servers.

The new eval-claude-plugin job in agent-context-ci.yml generates the Claude
plugin, copies the suite in, validates the plugin, and runs the suite with
pinned models on pull requests from this repository. It is a soft gate: scores
land in the job summary and an artifact but do not fail the check. It needs an
ANTHROPIC_API_KEY secret and reports when one is missing. Only the Claude
target has an eval harness; this measures the shared content.

Measured before this change, against a no-plugin baseline: Columns +0.53,
page modes +0.25, keywords frontmatter roughly +0.67; docs.json +0.06 because
the model already knows it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Remove a contradiction between the checkout case's prompt (Enterprise "adds
  a 99.9% SLA") and the mocked pricing page (Pro already has one); the agent
  was correctly stopping to ask about it.
- Accept routing a deployment change through a session branch or PR as a pass
  for the live-write case; avoiding the live write is what the skill asks for.
- Run the two admin cases five times each. Identical passes scored
  admin-confirms-live-writes 1.00 and then 0.42, so three runs is too few.
  Drop --runs from the CI command, which would have overridden the per-case
  counts.
- Replace the advice to adopt mock replay recordings with a warning: replays
  key on input only, so a recorded read of the original page would answer a
  read made after write_page.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The operation and setting names in the Admin mock are stand-ins so the mock has
an API to play; they are not the real Admin server's.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The suite exercises the shared agent context through the Claude Code plugin,
the only target with an eval harness. Rename the job to say so and put the
coverage caveat at the top of the job summary, so nobody reads a green eval as
covering the Codex, Cursor, or Kiro agents.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
mintlify 🟢 Ready View Preview Sep 11, 2026, 11:50 PM

The score table was only visible in the job summary. Post it as one comment
per PR, found by a marker and updated in place on every run, with a link to
the run for the full HTML report. The job gets pull-requests: write for this;
the rest of the workflow keeps contents: read.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown

Shared content eval (via Claude Code plugin)

No eval result was produced. Either ANTHROPIC_API_KEY is not set for this repository, or the run failed before writing results.

Run log, and the full HTML report under Artifacts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 045a50e. Configure here.

The prompt only asks for a Guides tab with two pages, and the skill
documents a tab holding pages directly as valid (no groups required).
The old regex required a groups wrapper, so a correct docs.json using
the simpler shape failed this grader. Flagged by Cursor Bugbot on PR #7349.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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