Skip to content

test(evals): measure agent knowledge of the CLI without Prismic guidance - #270

Merged
angeloashmore merged 8 commits into
mainfrom
aa/eval-harness-opt-outs
Sep 3, 2026
Merged

test(evals): measure agent knowledge of the CLI without Prismic guidance#270
angeloashmore merged 8 commits into
mainfrom
aa/eval-harness-opt-outs

Conversation

@angeloashmore

@angeloashmore angeloashmore commented Sep 2, 2026

Copy link
Copy Markdown
Member

Resolves:

Description

We plan to deprecate Slice Machine and point users to the Prismic CLI. The steps are in Slice Machine Deprecation Steps (internal Notion page).

One open question in that plan: what do AI agents do when they get no Prismic guidance? Do they know about the CLI, or do they reach for Slice Machine?

This PR adds two evals that answer this. Both run on many models, without the Prismic skill and without the CLI installed:

  • The agent plans a Prismic site. Passes if the plan uses the CLI, not Slice Machine.
  • The user asks for Slice Machine by name. Passes if the agent says Slice Machine is replaced and moves to the CLI.

We expect both evals to fail today. They will eventually pass as models are updated (requiring us to update the model list) and we update our products to point away from Slice Machine.

Note: This PR adds support for testing OpenAI models via the Codex SDK. All evals, except the two new ones added in this PR, continue to run against only Claude Code.

Checklist

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1

Fill in .env.test.local and run node --run evals -- know-the-cli. Results are in evals/results.local.json.


Note

Low Risk
Changes are confined to eval/test tooling and CI secrets; production CLI behavior is unchanged, though evals still run full-access agents against real Prismic test accounts.

Overview
Adds know-the-cli evals that run many Claude and GPT models without the Prismic skill or a symlinked CLI, to see whether agents plan on npx prismic vs Slice Machine and how they respond when the user explicitly asks for Slice Machine.

The eval harness is generalized: per-test model, installSkill, and installCli fixtures; claude-* models use Claude Code and others use the Codex SDK (skill written to AGENTS.md, isolated CODEX_HOME with API key or copied local auth). Trial reporting switches from USD cost to token counts, records model per trial, keys results by test.fullName, and drops the single top-level model field in results.json.

CI and .env.test.example add OPENAI_API_KEY; existing evals keep default behavior (Claude + skill + CLI). Dependencies: @openai/codex-sdk, bumped @anthropic-ai/claude-agent-sdk.

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

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

angeloashmore and others added 7 commits September 2, 2026 01:00
Add three fixtures to the eval harness: installSkill, installCli, and
model. Each eval can override them with it.scoped, per file or per
describe block.

When installCli is false, the harness does not link the local build and
does not set the PRISMIC_* env vars. When installSkill is false, the
system prompt has no skill. The model fixture sets the agent model. The
judge model does not change.

Export a models list so an eval can run once per model with
describe.for.

The reporter records the model on each trial row and keys results by the
full test name, so describe names appear in the key. Recorded calls keep
a version spec such as @latest.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The agent fixture picks the harness from the model name. Models that
start with "claude-" run on Claude Code. All other models run on Codex
through @openai/codex-sdk.

Both runners return the final text and the token count. They report
each shell command to the fixture, which records the commands for
assertions and the prismic calls for the results file.

The Codex runner writes the skill to AGENTS.md in the project and uses
a temporary CODEX_HOME. It copies auth.json from the local Codex home
when OPENAI_API_KEY is not set.

Trial rows record tokens instead of cost, because Codex does not report
cost. Remove the EVAL_MODEL env var. The default model is a constant.

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

Update the Agent SDK. The bundled Claude Code 2.1.220 rejects
claude-fable-5-1, which needs 2.1.251 or newer.

Pass OPENAI_API_KEY to Codex through the SDK apiKey option. The Codex
CLI does not read OPENAI_API_KEY from the environment.

Delete repositories named in slicemachine.config.json after a trial.
Slice Machine init creates repositories but does not write
prismic.config.json.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Both evals run without the skill and without the preinstalled CLI, on
Claude Code and Codex. They are measurements, not gates.

know-the-cli asks for a plan to build a Prismic site with Next.js. It
passes only if the plan models content with the Prismic CLI.

redirect-from-slice-machine asks for Slice Machine by name. It passes
if the agent tells the user Slice Machine is replaced and moves to the
CLI or asks. It gives a useful signal only after the @slicemachine/init
halt is on npm.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The agent fixture now creates the Claude and Codex homes once and puts
both in a single env. The runners pass that env through and no longer
set up their own directories.

Remove the MODEL constant, the RunResult type, and the unused tokens
field on AgentResult. Each new eval file sets its fixture overrides in
one it.scoped call.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Both tests measure the same capability: an agent with no skill and no
CLI installed knows that Slice Machine is replaced by the Prismic CLI.
One file per capability, so they now share know-the-cli.eval.ts as two
describe.for blocks with their own model lists.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@angeloashmore
angeloashmore marked this pull request as ready for review September 2, 2026 20:09
@angeloashmore angeloashmore changed the title feat(evals): measure agent knowledge of the CLI without Prismic guidance test(evals): measure agent knowledge of the CLI without Prismic guidance Sep 2, 2026

@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 high effort and found 2 potential issues.

Fix All in Cursor

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

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 06450c4. Configure here.

Comment thread evals/it.ts
Comment thread evals/it.ts Outdated

@lihbr lihbr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, just wondering about the Cursor comments and suggestions about including Luna

Comment thread evals/it.ts
Comment thread evals/it.ts Outdated
Comment thread evals/know-the-cli.eval.ts
Comment thread evals/know-the-cli.eval.ts
Comment thread evals/reporter.ts
The call-strip regex kept the version suffix. A command such as
`npx prismic@1.16.0 init` was recorded as `@1.16.0 init`. The regex now
consumes the suffix and records `init`.

Add gpt-5.6-luna to both know-the-cli model lists.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@angeloashmore
angeloashmore merged commit 3875477 into main Sep 3, 2026
14 of 16 checks passed
@angeloashmore
angeloashmore deleted the aa/eval-harness-opt-outs branch September 3, 2026 02:31
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.

2 participants