test(evals): measure agent knowledge of the CLI without Prismic guidance - #270
Merged
Conversation
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
marked this pull request as ready for review
September 2, 2026 20:09
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ 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.
lihbr
approved these changes
Sep 2, 2026
lihbr
left a comment
Member
There was a problem hiding this comment.
LGTM, just wondering about the Cursor comments and suggestions about including Luna
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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:
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
Preview
How to QA 1
Fill in
.env.test.localand runnode --run evals -- know-the-cli. Results are inevals/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 prismicvs Slice Machine and how they respond when the user explicitly asks for Slice Machine.The eval harness is generalized: per-test
model,installSkill, andinstallClifixtures;claude-*models use Claude Code and others use the Codex SDK (skill written toAGENTS.md, isolatedCODEX_HOMEwith API key or copied local auth). Trial reporting switches from USD cost to token counts, records model per trial, keys results bytest.fullName, and drops the single top-levelmodelfield inresults.json.CI and
.env.test.exampleaddOPENAI_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
Please use these labels when submitting a review:
⚠️ #issue: Strongly suggest a change.
❓ #ask: Ask a question.
💡 #idea: Suggest an idea.
🎉 #nice: Share a compliment. ↩