agentleFS
Human-Agent-SocietyHuman-Agent-Society/reef/tests/AGENTS.md

reef / tests

AGENTS.md7.7k starsChanged 52 days agoApache-2.0View on GitHub

Choose the suite that owns the behavior under test. Extend an existing relevant module before adding another. Keep new test modules out of the tests/ root. Keep component tests with their owner even when they use a dispatcher or a service fixture. A test belongs in reef_service/ when it checks the service contract or the service's coordination of several components. Use markers for unit, integration, acceptance, and sandbox; do not add a second directory hierarchy for those categories. A mock-based…

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

9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

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

    Keep component tests with their owner even when they use a dispatcher or a service fixture.

    line 26
  2. Very specific:

    Use markers for unit, integration, acceptance, and sandbox.

    line 30
  3. Very specific:

    Keep fixtures in the nearest applicable conftest.py.

    line 36
  4. Distinctive:

    Do not introduce imports from collected test modules.

    line 38
  5. Very specific:

    Import test helpers through tests.<owner>.

    line 40
  6. Distinctive:

    Keep test data beside its consuming suite.

    line 42
  7. Distinctive:

    Update imports, resource paths, fixture scope, CI selection, and documented commands together.

    line 47
  8. Very specific:

    Update it when moving a listed module or adding a wheel-compatible contract.

    line 53
  9. Very specific:

    Run python .github/scripts/check_test_layout.py from the repository root.

    line 57

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 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

Test organization

Choose the suite that owns the behavior under test. Extend an existing relevant module before adding another. Keep new test modules out of the tests/ root.

Directory map

DirectoryResponsibility
artifact/, storage/, surface/Artifact repositories, record persistence, and artifact delivery
core/, scenario/Shared value contracts, scenario lifecycle, dispatcher coordination, and commit recovery
runtime/, inference/, train/Runtime coordination, inference integrations, and the training pipeline
sandbox/Shared execution, environment contracts, isolation, file transfer, and cleanup
slime_backend/, tinker_backend/Contracts specific to a training backend
record2record/, record2task/, task2batch/The corresponding stages of the training pipeline
evaluation/, harness/, observability/Candidate evaluation, harness execution, and tracking
reef_recipe/Shared recipe contracts and built-in recipes from reef/recipe/
recipes/<recipe>/Cookbook methods and their examples; use the method name for beta recipes too
reef_service/HTTP contracts, deployment, and service workflows across components
cli/, reef_client/CLI behavior and the separate reef_client package
contributing/Repository policy, documentation, and checks across shipped examples
plugin_contracts/, packaging/Plugin boundaries and installed-package verification
smoke/Opt-in runs against real harnesses and external services
support/Shared fixtures and helpers; no collected test modules

Keep component tests with their owner even when they use a dispatcher or a service fixture. A test belongs in reef_service/ when it checks the service contract or the service's coordination of several components.

Use markers for unit, integration, acceptance, and sandbox; do not add a second directory hierarchy for those categories. A mock-based test stays with its component, even when the real component needs a GPU.

Fixtures and imports

  • Keep fixtures in the nearest applicable conftest.py. Reuse scoped support modules for helpers shared across suites.
  • Do not introduce imports from collected test modules. Extract the shared helper when adding a new consumer; avoid unrelated helper rewrites.
  • Import test helpers through tests.<owner>. Pytest uses importlib mode, so test directories do not shadow production or third-party packages.
  • Keep test data beside its consuming suite. Harness golden trees are exact fixtures; their instruction files are data, not repository instructions.

Moving and verifying tests

Update imports, resource paths, fixture scope, CI selection, and documented commands together. Compare collected test IDs through an old-to-new path map, including parameters and markers. Keep assertions and fixture contents intact during a directory-only migration.

packaging/wheel-tests.txt lists the modules run against installed wheels. Update it when moving a listed module or adding a wheel-compatible contract. These tests run outside the checkout and must not import Reef from source. The source and sandbox jobs still collect all of tests/.

Run python .github/scripts/check_test_layout.py from the repository root. The check rejects misplaced test modules and invalid wheel-suite entries; it also runs through pre-commit in CI. Update this map and the check together when adding an owner directory.

Apply placement rules to new tests. Keep moves of existing tests in focused cleanup changes rather than unrelated feature PRs.

Download now (ZIP)

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 25 mentionsOct 2026: 13 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the Human-Agent-Society/reef repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about Human-Agent-Society/reef

The biggest 5 of 38 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 38

Talked about on GitHub, YouTube, the web and Bluesky (38 times).

On GitHub · 22

17 more on GitHub

On YouTube · 11

6 more on YouTube
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 28,693 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 repository2 other files it gives its agents.

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.