Skip to content

fix(framework): skip directories with no PROMPT.md during eval discovery - #304

Merged
czenko merged 1 commit into
mainfrom
framework/skip-dirs-without-prompt
Sep 17, 2026
Merged

czenko merged 1 commit into
mainfrom
framework/skip-dirs-without-prompt

Conversation

@czenko

@czenko czenko commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Problem

evals/docs/ belongs to the docs team in CODEOWNERS, so I went to add a Claude Code skill there, at evals/docs/.claude/skills/. Eval discovery stopped working for the whole repo.

discoverEvals walks evals/<suite>/ and treats every directory it finds as an eval, then opens that directory's PROMPT.md. A directory that is not an eval has no PROMPT.md, so the first one throws and nothing is discovered. Not just the docs suite. Nothing.

Error: ENOENT: no such file or directory, open '.../evals/docs/.claude/PROMPT.md'
    at discoverEvals (apps/framework/harness/run-eval.ts:160:9)

A leftover solutions/ directory in an eval folder does the same thing, which is a trap an author can hit without touching this file.

Solution

  • Skip a directory with no PROMPT.md. One line in discoverEvals, before the read. A directory that is not an eval stops being read as one, and the suite it sits in keeps working.

Why this is its own PR: apps/ belongs to the AI team, evals/docs/ belongs to docs. This line is the only part of #259 that needs an AI review, so splitting it leaves the skill itself inside the docs team's own scope. Merge this one first.

Manual testing

  1. Put a directory that is not an eval inside a suite.

    mkdir -p evals/docs/.scratch-probe
  2. Discover the docs evals.

    pnpm eval:dry -- --suite docs --experiment-suite docs

    All seven build-docs-* evals are planned. On main the same command fails with the ENOENT above.

  3. Typecheck and run the harness unit tests.

    pnpm typecheck && pnpm --filter @supabase-evals/framework test

    Clean, 8 passed.

Not covered by a test: discoverEvals is not exported and reads the filesystem directly, so a unit test means refactoring more of this file than the fix changes.

Everything under evals/<suite>/ was read as an eval, so any other directory
there threw and stopped discovery for the whole repo.
@czenko
czenko requested a review from a team as a code owner September 17, 2026 00:27
@vercel

vercel Bot commented Sep 17, 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 Sep 17, 2026 12:28am UTC

Request Review

@czenko
czenko merged commit 95ef230 into main Sep 17, 2026
7 checks passed
czenko added a commit that referenced this pull request Sep 17, 2026
Closes DOCS-1228

Merge [#304](#304) first. It keeps
a skill folder under `evals/docs/` from stopping eval discovery. This
PR's checks pass either way, because no check on a PR runs discovery,
but every eval run does.

## Problem

Four `build-docs-*` evals exist and each was designed from scratch. The
most recent cost three false reds and one false green, all of them
mistakes an earlier author had already made or could have warned about.
The only authoring guidance that exists is a five-step how-to buried in
`build-docs-001/README.md`.

## Solution

- **The skill.** `evals/docs/.claude/skills/docs-eval-planning/`:
`SKILL.md` plus four references. It sits inside `evals/docs/`, which
CODEOWNERS gives to the docs team, so the skill and the evals it plans
have the same owner.
- **Six phases.** Enter plan mode and read `CONTRIBUTING.md`, gather the
evidence, pick the one claim the page has to transmit, draft the prompt,
design the checks, write the plan, and feed the catalog once the
baseline lands.
- **`references/sources.md`** lists every evidence source. The Access
column reads `Public` or `Supabase`, and a contributor without a
connector drops that source and keeps going. Planning from the public
sources alone is a supported outcome. What is not optional is recording
which sources the inventory came from, because one built from public
sources alone reads as complete when it is not.
- **`references/check-rules.md`** is ordered by what a violation costs.
The first three are observability, behavior over structure, and positive
controls a literal cannot satisfy.
- **`references/flakiness.md`** is mined from review feedback on
twenty-one PRs, with a citation per entry. Nine of those PRs were
outside the set I started from, including #108, which carries a
`CHANGES_REQUESTED` review, and #192, where the CI reproducibility work
happened.
- **`references/prompt-rules.md`** carries the prompt discipline. The
file, frontmatter, and README conventions live in `SKILL.md` itself.

**Not asserted here:** the skill is deliberately not installable into an
eval sandbox. A run must never load it, or an eval that measures a docs
page would be measuring this skill instead.

## Manual testing

1. Confirm the skill is discovered and its description reads correctly.

   ```bash
   ls evals/docs/.claude/skills/docs-eval-planning
   ```

2. Confirm every relative link resolves and every path the skill names
exists.

   ```bash
grep -oE '\(references/[a-z-]+\.md\)'
evals/docs/.claude/skills/docs-eval-planning/SKILL.md
   ```

3. Confirm the skill folder does not break eval discovery, with #304
applied.

   ```bash
   pnpm eval:dry -- --suite docs --experiment-suite docs
   ```

Plans all seven docs evals. Without #304 the same command fails with
`ENOENT: ... evals/docs/.claude/PROMPT.md`.

4. Typecheck and run the harness unit tests.

   ```bash
   pnpm typecheck && pnpm --filter @supabase-evals/framework test
   ```

   Clean, 8 passed.

5. Confirm Biome does not process the skill, since it ships no markdown
formatter.

   ```bash
   ./node_modules/.bin/biome check evals/docs/.claude
   ```

   `No files were processed in the specified paths.`
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