agentleFS
eugenelimeugenelim/agent-ready-repo/tests/AGENTS.md

agent-ready-repo / tests

AGENTS.md24 starsChanged 2 months agoApache-2.0View on GitHub

Applies to tests/. Inherits the root AGENTS.md. Scope-specific deltas only. packages/AGENTS.md owns the table of which assertion belongs in which tree. This file owns what living here obliges you to do, and why the boundary is not merely a convention. packages/agentbundle/tests/ is packaged into the agentbundle sdist and re-run against an extracted workspace holding only the package — no contracts/, no packs/, no docs/, no catalogue.toml. A test there that reads a repository path passes locally and fails the sdist…

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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:

    Put the repository-level half in tests/roster/, anchored at Path(__file__).resolve().parents[2].

    line 18
  2. Distinctive:

    Check the reach before relocating one — a test whose paths all sit inside the pack is pack-local and should re-anchor at the pack instead …

    line 24

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

AGENTS.md — tests/

Applies to tests/. Inherits the root AGENTS.md. Scope-specific deltas only.

packages/AGENTS.md owns the table of which assertion belongs in which tree. This file owns what living here obliges you to do, and why the boundary is not merely a convention.

A repository-level assertion cannot live in a package test tree

packages/agentbundle/tests/ is packaged into the agentbundle sdist and re-run against an extracted workspace holding only the package — no contracts/, no packs/, no docs/, no catalogue.toml. A test there that reads a repository path passes locally and fails the sdist artifact gate, which is what gate-export-boundary, build-and-smoke and make build-check are reporting when they raise FileNotFoundError on a path that plainly exists.

Put the repository-level half in tests/roster/, anchored at Path(__file__).resolve().parents[2]. Leave the package-level behaviour in the package suite, exercised against fixtures rather than the real tree.

The same boundary applies downward: a test under packs/<pack>/tests/ may not read above its own pack, and tools/test-lint-pack-test-boundary.py enforces it. Check the reach before relocating one — a test whose paths all sit inside the pack is pack-local and should re-anchor at the pack instead of moving.

Roster steps are named and placed by hand

gate-main collects every roster module through one bulk python -m pytest tests/ -q step (.github/workflows/build-check.yml), so a new file does run on a pull request — but that step reports the failure as its own. Adding tests/roster/test_x.py obliges three further edits, each guarded separately:

  1. a step in .github/workflows/build-check.yml naming the file, placed above that bulk step. Every roster step carries an if: "!cancelled() && steps.python.conclusion == 'success'" guard, so a step below the bulk step does run — it just reports the same failure a second time against a broad target instead of the named one. Placement decides attribution, not whether the step executes;
  2. a matching STEP_DISPOSITION entry in tools/lint-ci-parity.py. LOCAL("test-after-build-check") is the right value for roster, because that target's run-test-suite includes pytest tests/ -q;
  3. an entry in .workspace-prune-protected.toml when the test names a docs/specs/<slug> path as a literal.

Moving a test out of a suite also orphans the imports only it used. Run ruff check . afterwards: the repository lint targets do not cover it.

Essential commands

python3 -m pytest tests/roster/ -q       # ~15 min, and targeted runs never reach it
python3 -m pytest tests/conformance/ -q
python3 tools/test-lint-pack-test-boundary.py

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.