agentleFS
thebharathkumarthebharathkumar/agent-flight-recorder/skills/agent-eval-scaffold/SKILL.md

agent-eval-scaffold

Skill0 starsChanged 4 months agoMITView on GitHub

Generate an evals directory for an agent repo with a

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create an empty evals/golden/ directory.

    line 35

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Agent Eval Scaffold

Generates a self-contained evals/ directory in the target repo. The harness runs dataset cases through the user's agent deterministically and compares normalized output against committed golden files. CI fails the PR when goldens drift.

Procedure

  1. Locate the agent entrypoint: the function or graph invocation that takes an input and returns a result. If ambiguous, ask the user which callable the evals should exercise.
  2. Materialize evals/ in the target repo from the bundled templates:
    • templates/harness.py to evals/harness.py, then rewrite the line marked EDIT ME to import the real entrypoint. run_case(case) must call the agent with the case input and return a JSON-serializable result; adapt the call signature here.
    • templates/conftest.py to evals/conftest.py (seed pinning plus the --update-golden flag; it also puts the repo root on sys.path).
    • templates/test_golden.py to evals/test_golden.py unchanged.
    • templates/smoke.jsonl to evals/datasets/smoke.jsonl, then replace the sample cases with 3 to 5 real ones based on the project's README or existing tests. Fields: id, input, optional expected substring.
    • templates/evals-README.md to evals/README.md.
    • Create an empty evals/golden/ directory.
  3. Copy templates/evals-ci.yml to .github/workflows/evals.yml and adjust the dependency install step to match the project (requirements file, uv, poetry, whatever it uses).
  4. Determinism check: LLM-backed agents must run with temperature 0 and a pinned model, or better, a recorded or stubbed model for CI. If some output fields still vary, strip them in normalize() in evals/harness.py and note it in evals/README.md. Do not loosen the golden comparison itself.
  5. Seed goldens: pytest evals/ --update-golden, then immediately run pytest evals/ twice. Two consecutive clean passes prove determinism; if the second pass fails, fix normalize() before continuing. Commit evals/ including golden/.
  6. Show the user the failure mode: change one byte in a golden file, run pytest evals/, show the drift failure, restore the file.

Files

  • templates/harness.py: run_case and normalize, the one file users edit.
  • templates/conftest.py: seeds and the --update-golden option.
  • templates/test_golden.py: parametrized golden comparison.
  • templates/smoke.jsonl: dataset format example.
  • templates/evals-README.md: docs dropped into the generated directory.
  • templates/evals-ci.yml: PR gate workflow.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.