Skip to content

feat(cli): tag cli evals with area and journey phase - #501

Open
Coly010 wants to merge 2 commits into
mainfrom
columferry/cli-2700-tag-the-six-existing-cli-evals-with-area
Open

Coly010 wants to merge 2 commits into
mainfrom
columferry/cli-2700-tag-the-six-existing-cli-evals-with-area

Conversation

@Coly010

@Coly010 Coly010 commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Current Behavior

19 of the 25 cli evals already set area and journeyPhase in their PROMPT.md frontmatter, but the six original local-stack evals don't. evalFrontmatterSchema also strips both keys, so none of them reach the exported results or Braintrust, and the coverage grid and dashboard have nothing to slice by.

Expected Behavior

  • The six local-stack evals are tagged area: local-stacks. The four build-* evals are journeyPhase: design and the two resolve-* evals are journeyPhase: resolve. Every cli eval now carries both keys.
  • area and journeyPhase are optional, closed-set fields on the eval metadata schema, normalised the same way as stage/topic:
    • journeyPhase: the KPI 2 phases design, deploy, observe, detect, resolve. These don't match stage, which is why it's a separate field.
    • area: the 10 CLI areas from the coverage grid.
  • Both are passed through to eval-results.json (via toEvalResult), to Braintrust row metadata as area / journey_phase, and back out of fetch-braintrust.ts.
  • Evals without the keys are unchanged.
  • The "the schema strips them" notes are removed from three eval READMEs, since they're no longer true.

A couple of things I'd like a second opinion on from the AI team, since this touches packages/core and apps/framework:

  1. I made area a closed enum like topic, because it catches typos. It's CLI-specific at the minute though, so if another suite wants areas later it'd need extending. Happy to loosen it to a string, or rename it to something like cliArea, if you'd prefer.
  2. This is the "official optional journeyPhase field" we asked about. If you'd rather own the shape of it, I'm more than happy to adjust 🙂

The new fields will only show up in Braintrust and the published results once this merges and the next CLI run uploads.

Related Issue(s)

Fixes CLI-2700

Tag the six local-stack evals with `area` and `journeyPhase`, so every
cli-suite eval now carries both. Add the two keys as optional, closed-set
fields on the eval metadata schema, which previously stripped them, and
pass them through to exported results and Braintrust row metadata.

Fixes CLI-2700
@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
evals Ignored Ignored Preview Nov 12, 2026 9:48am UTC

Request Review

@jgoux jgoux 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.

Thanks for this. The six local-stack evals are tagged as described, and all 26 evals/cli prompts now carry enum-valid area/journeyPhase values. No other suite sets these keys, so nothing else starts failing validation. The fields reach eval-results.json and Braintrust metadata, and the core and framework tests for this change pass, as does pnpm -r typecheck.

There's one small inline consistency note; it doesn't block merging. One FYI: fetch-braintrust.ts only assembles benchmark-suite rows today, so its new area/journey_phase mapping won't show up for CLI evals until that fetcher covers the cli suite.

On your two questions: a closed area enum fits how topic works, and widening it when a second suite needs areas seems fine. A separate journeyPhase field next to stage makes sense because the two sets don't line up.

Comment on lines +67 to +68
area: promptData?.area,
journeyPhase: promptData?.journeyPhase,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3 (non-blocking): these two fields only come from promptData, but stage/product/topic/suite/interface above all fall back to the recorded result. The result file does record these tags now: run-eval.ts writes ...ev.metadata into result.json, and rawEvalResultSchema keeps area/journeyPhase.

So if a saved result is exported after its PROMPT.md is deleted or renamed (readPrompt() returns undefined), its tags are dropped silently while its stage and topic survive. The same gap exists in upload-braintrust.ts (area: promptData?.area, journey_phase: promptData?.journeyPhase).

The normal CI path isn't affected, because export and upload run in the same checkout as the eval run. Suggest matching the neighbouring fields for consistency:

area: promptData?.area ?? parsedResult.area,
journeyPhase: promptData?.journeyPhase ?? parsedResult.journeyPhase,

(and ?? result.area / ?? result.journeyPhase in the upload row), plus an export test where only the recorded result carries the tags.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good shout, thanks! both now fall back to the recorded result in export-results.ts and upload-braintrust.ts, with an export test where only the result carries the tags

This branch was successfully deployed

1 active (outdated) deployment
Preview — b3f973e5 Deployed Nov 11, 2026 by vercel[bot]
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