agentleFS
dbt-labsdbt-labs/dbt-agent-skills/evals/AGENTS.md

dbt-agent-skills / evals

AGENTS.md730 starsChanged 9 months agoApache-2.0View on GitHub

This document covers conventions and patterns for working on the skill-eval CLI tool. Data flow: cli.py loads scenarios via models.py, executes via runner.py, grades via grader.py, and reports via reporter.py. We use Typer for the CLI. Use the appropriate output method based on context: User-facing CLI output (command results, prompts): Use typer.echo() Progress logging (during execution): Use logger from logging.py Never use print() for output. New commands go in cli.py: When modifying CLI commands that work with scenarios or skill…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository3 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

26 rules. About 0 are common, 7 are distinctive, and 19 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 19

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the appropriate output method based on context:

    line 26
  2. Very specific:

    Never use print() for output.

    line 48
  3. Distinctive:

    When modifying CLI commands that work with scenarios or skill sets, check if the underlying dataclasses need updates:

    line 68
  4. Very specific:

    Use dataclasses.asdict() to convert dataclasses to dicts for YAML serialization.

    line 79
  5. Very specific:

    Update Grade dataclass in models.py if adding new fields

    line 82
  6. Very specific:

    Update GRADING_PROMPT_TEMPLATE in grader.py if changing what Claude evaluates

    line 83
  7. Very specific:

    Update parse_grade_response() to extract new fields into Grade

    line 84
  8. Very specific:

    Update reporter.py to display new fields

    line 85
  9. Very specific:

    Add command function in cli.py with @app.command()

    line 91
  10. Very specific:

    Use typer.echo() for all output

    line 92
  11. Very specific:

    Add tests in tests/

    line 93
  12. Distinctive:

    Update README.md usage section

    line 94
  13. Very specific:

    Update SkillSet dataclass in models.py

    line 99
  14. Very specific:

    Update load_scenario() to parse the new field

    line 100
  15. Very specific:

    Update Runner.run_scenario() if it affects execution

    line 101
  16. Distinctive:

    Add tests for the new field

    line 102
  17. Very specific:

    Update _parse_json_output() to extract new data from Claude's output

    line 107
  18. Very specific:

    Update metadata.yaml writing in run_scenario()

    line 108
  19. Distinctive:

    Update grader if it should evaluate the new field

    line 109
  20. Distinctive:

    Update reporter if it should display the new field

    line 110
  21. Very specific:

    Update GRADING_PROMPT_TEMPLATE in grader.py

    line 115
  22. Very specific:

    Update parse_grade_response() to handle new fields

    line 116
  23. Very specific:

    Update init_grades_file() for manual grading template

    line 117
  24. Very specific:

    Update reporter.py to show new fields in reports

    line 118
  25. Distinctive:

    Run the ty type checker before committing:

    line 138
  26. Very specific:

    Use list[str] not List[str] (Python 3.11+)

    line 147

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md 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
AGENTS.md

Skill Evaluation Tool - Developer Guide

This document covers conventions and patterns for working on the skill-eval CLI tool.

Architecture Overview

src/skill_eval/
├── cli.py       # Typer CLI commands (run, grade, report, review)
├── models.py    # Data models: Scenario, SkillSet, load_scenario()
├── runner.py    # Execution: Runner class, RunResult, RunTask
├── grader.py    # Auto-grading with Claude CLI
├── reporter.py  # Report generation from grades
├── selector.py  # Interactive TUI selectors for runs/scenarios
└── logging.py   # Loguru configuration with context support

Data flow: cli.py loads scenarios via models.py, executes via runner.py, grades via grader.py, and reports via reporter.py.

CLI Framework: Typer

We use Typer for the CLI.

Output

Use the appropriate output method based on context:

User-facing CLI output (command results, prompts): Use typer.echo()

typer.echo(f"Run directory: {run_dir}")
typer.echo("Error: file not found", err=True)

Progress logging (during execution): Use logger from logging.py

from skill_eval.logging import logger

logger.info("Starting scenario")
logger.debug("Tool called: Read")
logger.warning("Timeout reached")
logger.success("Completed")

# With context (for parallel runs)
ctx_logger = logger.bind(scenario="my-scenario", skill_set="with-skill")
ctx_logger.info("Starting")  # Shows: [T0/my-scenario/with-skill] Starting

Never use print() for output.

Adding Commands

New commands go in cli.py:

@app.command()
def mycommand(
    arg: str = typer.Argument(..., help="Required argument"),
    flag: bool = typer.Option(False, "--flag", "-f", help="Optional flag"),
) -> None:
    """Command description shown in --help."""
    typer.echo(f"Running with {arg}")

Data Models

Dataclasses (models.py, runner.py)

When modifying CLI commands that work with scenarios or skill sets, check if the underlying dataclasses need updates:

In models.py:

  • Grade - grading result (success, score, tool_usage, notes, etc.)
  • SkillSet - skills, mcp_servers, allowed_tools
  • Scenario - name, path, prompt, skill_sets, description

In runner.py:

  • RunResult - scenario results with output, success, tools_used, skills_invoked, etc.
  • RunTask - task definition for parallel execution (scenario, skill_set, run_dir)

Use dataclasses.asdict() to convert dataclasses to dicts for YAML serialization.

When modifying grading:

  1. Update Grade dataclass in models.py if adding new fields
  2. Update GRADING_PROMPT_TEMPLATE in grader.py if changing what Claude evaluates
  3. Update parse_grade_response() to extract new fields into Grade
  4. Update reporter.py to display new fields

Modifying Features - Checklist

Adding a new CLI subcommand

  1. Add command function in cli.py with @app.command()
  2. Use typer.echo() for all output
  3. Add tests in tests/
  4. Update README.md usage section
  5. Run uv run ty check src/

Adding a new field to skill-sets.yaml

  1. Update SkillSet dataclass in models.py
  2. Update load_scenario() to parse the new field
  3. Update Runner.run_scenario() if it affects execution
  4. Add tests for the new field

Adding new run output/metadata fields

  1. Update RunResult dataclass in runner.py
  2. Update _parse_json_output() to extract new data from Claude's output
  3. Update metadata.yaml writing in run_scenario()
  4. Update grader if it should evaluate the new field
  5. Update reporter if it should display the new field
  6. Add tests

Modifying grading criteria

  1. Update GRADING_PROMPT_TEMPLATE in grader.py
  2. Update parse_grade_response() to handle new fields
  3. Update init_grades_file() for manual grading template
  4. Update reporter.py to show new fields in reports
  5. Add tests

Parallel Execution

We use concurrent.futures.ThreadPoolExecutor for parallel runs:

from concurrent.futures import ThreadPoolExecutor, as_completed

with ThreadPoolExecutor(max_workers=max_workers) as executor:
    future_to_task = {executor.submit(fn, task): task for task in tasks}
    for future in as_completed(future_to_task):
        result = future.result()

See Runner.run_parallel() in runner.py for the full implementation.

Type Checking with ty

Run the ty type checker before committing:

uv run ty check src/

Fix any type errors. Common issues:

  • Mixed dict types need explicit annotations
  • Optional fields need | None types
  • Use list[str] not List[str] (Python 3.11+)

Testing

Tests live in tests/ and use pytest.

Running Tests

uv run pytest                    # all tests
uv run pytest tests/test_cli.py  # specific file
uv run pytest -k "test_grade"    # by name pattern

Test Requirements

Every new feature needs tests. This includes:

  • New CLI commands
  • New options/flags on existing commands
  • Changes to data models
  • New grading/reporting logic

Dependencies

Key dependencies in pyproject.toml:

  • typer - CLI framework
  • pyyaml - YAML parsing
  • claude-code-transcripts - HTML transcript generation
  • loguru - Logging with context support
  • textual - TUI for interactive selection

Dev dependencies:

  • pytest - testing
  • ty - type checking

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.