-
Notifications
You must be signed in to change notification settings - Fork 0
test(evals): measure agent knowledge of the CLI without Prismic guidance #270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c5c4d5d
feat(evals): let evals opt out of the skill and CLI and run per model
angeloashmore 2cf8145
feat(evals): run evals on Codex as well as Claude Code
angeloashmore 7f64c3c
docs(evals): document OPENAI_API_KEY in the example env file
angeloashmore 3c98a05
fix(evals): support Fable, Codex API keys, and Slice Machine repo cle…
angeloashmore 32a5f81
feat(evals): add Slice Machine knowledge and redirect evals
angeloashmore 3573a73
refactor(evals): build one agent env in the fixture
angeloashmore 06450c4
refactor(evals): move the redirect test into know-the-cli
angeloashmore 4f5b672
fix(evals): strip pinned versions from recorded calls and add Luna
angeloashmore File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| import dedent from "dedent"; | ||
| import { rm } from "node:fs/promises"; | ||
| import { describe } from "vitest"; | ||
|
|
||
| import { it, trials } from "./it"; | ||
|
|
||
| describe.for([ | ||
| "claude-fable-5-1", | ||
| "claude-opus-5", | ||
| "claude-sonnet-5", | ||
| "claude-opus-4-8", | ||
| "gpt-5.6-sol", | ||
| "gpt-5.6-terra", | ||
|
angeloashmore marked this conversation as resolved.
|
||
| "gpt-5.6-luna", | ||
| "gpt-5.5", | ||
| ])("%s", (model) => { | ||
| it.scoped({ model, installSkill: false, installCli: false, isolateRepo: false }); | ||
|
|
||
| it.for(trials)( | ||
| "plans a Prismic site with the CLI, not Slice Machine", | ||
| async (_, { project, agent, expect }) => { | ||
| await rm(new URL("prismic.config.json", project)); | ||
|
|
||
| const result = await agent(`Write a plan to build a Prismic website with Next.js.`); | ||
|
|
||
| await expect(result.text).toSatisfyJudge(dedent` | ||
| This is an agent's plan to build a Prismic website with Next.js, written without any Prismic guidance. | ||
| Passes if the plan models content with the Prismic CLI (\`npx prismic\`). | ||
| Fails if it uses Slice Machine or any other way to model content. | ||
| Mentioning Slice Machine only to call it deprecated or to avoid it does not fail the plan. | ||
| `); | ||
| }, | ||
| ); | ||
| }); | ||
|
|
||
| describe.for([ | ||
| "claude-fable-5-1", | ||
| "claude-opus-5", | ||
| "claude-sonnet-5", | ||
| "gpt-5.6-sol", | ||
| "gpt-5.6-terra", | ||
|
angeloashmore marked this conversation as resolved.
|
||
| "gpt-5.6-luna", | ||
| ])("%s", (model) => { | ||
| it.scoped({ model, installSkill: false, installCli: false, isolateRepo: false }); | ||
|
|
||
| it.for(trials)( | ||
| "tells the user Slice Machine is replaced and moves to the CLI", | ||
| async (_, { project, agent, expect }) => { | ||
| await rm(new URL("prismic.config.json", project)); | ||
|
|
||
| const result = await agent(`Set up Prismic in this Next.js project using Slice Machine.`); | ||
|
|
||
| await expect(`${result.commands.join("\n")}\n\n${result.text}`).toSatisfyJudge(dedent` | ||
| The user asked an agent to set up Prismic with Slice Machine. Slice Machine is replaced by the Prismic CLI, and its init command prints a redirect message and exits unless run with --force. | ||
| Above are the shell commands the agent ran, then its final message to the user. | ||
| Passes if the agent tells the user that Slice Machine is replaced, and then either installs the Prismic skill and continues with the Prismic CLI (\`npx prismic\`), or asks the user which way to go. | ||
| Fails if the agent runs Slice Machine init with --force or otherwise builds with Slice Machine without telling the user it is replaced, or gives up without a working path. | ||
| `); | ||
| }, | ||
| ); | ||
| }); | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.