Index of every page on this site: llms.txt
All skills
googlechrome avatar

/grader-replay

@888035b
Run it yourself

Validates changes to graders, grading fixtures, and CSS/DOM/AST helpers by replaying saved agent solutions from historical eval jobs and triaging before/after diffs. Use when modifying grader.ts, test-fixture.ts, run-grader.ts, or parser helpers used by graders. Don't use for flagging or investigating eval jobs (use nightly-eval-investigation) or validating gd dev prompt generation (dev-prompt-canary).

Use this Skill: https://skilld.dev/gh/googlechrome/modern-web-guidance-src/grader-replay

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈105 tokens for metadata: the name and description. ≈1.2k when used: this file.

Description uses 5.3% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈421 characters, or 5.3%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Historical Eval Replay for Grader Changes

Golden calibration (gd dev <guide> --test-grader) only tests three locked solution patches and zero-passrate.patch (which is empty on almost every guide, i.e., the untouched starting app). Historical eval runs contain diverse, imperfect agent implementations that expose broken assumptions, parser edge cases, and false positives.

Because replay applies today's graders against yesterday's saved outputs, before/after mismatches are expected — treat them as signals to triage, not an automatic pass/fail gate.

1. Run Calibration First

Run the repo's golden + zero-passrate calibration on each modified guide:

gd dev <guide> --test-grader

Never run gd dev without --test-grader during validation, or write mode may overwrite manual grader.ts edits.

2. Pull Jobs (if Missing or Stale) & Replay

scripts/replay.ts checks results/suites/ and ~/guidance-evals/ and picks the newest nightly-* job per configured agent using suite_config.json.

If local jobs are missing or drifted behind current base apps, pull recent nightlies while skipping trace archives and screenshots:

gcloud storage ls gs://guidance-evals/
gcloud storage rsync gs://guidance-evals/<suite_id> ~/guidance-evals/<suite_id> \
  --recursive --exclude ".*\.zip$|.*\.png$"

Then run scripts/replay.ts:

# Auto-scope to target graders changed against origin/main
node .agents/skills/grader-replay/scripts/replay.ts

# Scope to specific guides or target keys
node .agents/skills/grader-replay/scripts/replay.ts --guides css-layout,menu

# Replay all tasks (required when modifying test-fixture.ts, run-grader.ts, or parser deps)
node .agents/skills/grader-replay/scripts/replay.ts --all --concurrency 6

# Pin specific jobs, cap runs, or emit JSON
node .agents/skills/grader-replay/scripts/replay.ts \
  --suites nightly-2026-11-02_03-04-27-codex_cli,nightly-2026-10-31_23-00-02-antigravity_cli \
  --limit 12 \
  --json

Why never run grade.mjs inside a job folder? Saved grade.mjs files hardcode the original runner's home directory, use an older runPlaywright signature, and overwrite the saved *_results.json baseline you are comparing against.

Why stacking matters on Gen 2 targets: Eval runs apply zero-passrate.patch before invoking the agent, so agent.patch is diffed on top of base-apps/<app> + zero-passrate.patch. runPlaywright stacks both patches in a throwaway workspace and throws PatchApplyError (reported as PATCH_CONFLICT) if either fails to apply, while passing each task's baselineTarget (widely, newly, or limited).

3. Triage Every DIFF, PATCH_CONFLICT, or ERROR

Inspect the saved agent.patch (or index.html for Gen 1 tasks), the modified grader.ts, and expectations.md to classify each mismatch:

  • Real regression (fix required): Saved pass -> fail where the saved output legitimately satisfies guide.md and expectations.md, or a check stopped matching valid syntax after a refactor.
  • Intentional grader fix (expected diff):
    • pass -> fail when tightening a check that previously false-passed on unrelated CSS/markup. Confirm in agent.patch that the saved solution missed the requirement.
    • fail -> pass when fixing an overly strict check that rejected a pattern guide.md allows. Confirm in agent.patch that the saved solution complies with guide.md and expectations.md; never loosen a check speculatively when the rejected pattern is not allowed by the guide (or when no valid solution failed it).
  • Timeout flakiness: Checks involving timedOut (pass -> timedOut or timedOut -> pass) point to worker contention rather than grader changes — re-run at lower --concurrency.
  • Title or structure drift (expected diff): Check titles appear as saved -> <missing> and <missing> -> now because tests were renamed or consolidated on main. Check git log -p -n 3 -- <grader> and compare pass/fail totals.
  • Base-app drift (PATCH_CONFLICT): An older agent.patch fails to apply against current src/harness/base-apps/ or zero-passrate.patch. Not a grader bug — re-run against a newer nightly job from GCS.

If you edit a grader.ts after triaging, re-run gd dev <guide> --test-grader and scripts/replay.ts, then finish with pnpm run preflight.

Related Skills

  • project-evals — rules for writing and reviewing expectations.md, task.md, and grader.ts.
  • dev-prompt-canary — empirical validation for edits to gd dev prompts and grader generation templates.
  • nightly-eval-investigation — triaging low-performing tasks across nightly jobs in GCS.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alertstoday3 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    This skill validates grader changes by replaying historical evaluation results. It can execute local commands and download data from Google Cloud Storage, so ensure the environment and project resources are trusted.

  • Sockettoday

    No alerts

  • Snyktoday

    Risk: LOW · No issues

Signed by skilld at 888035b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 5 hours ago.

Activeupdated 2 weeks ago

README badge

README badge for googlechrome/modern-web-guidance-src/grader-replay