token-saver / tests
AGENTS.md164 starsChanged 6 months agoApache-2.0View on GitHub
- Apply the root Google Python style policy to test code and module imports. Named pytest cases and fixtures retain the missing-docstring exemptions in pyproject.toml; add prose when it explains a non-obvious scenario. Keep raw captured fixtures intact and justify narrow line-length exceptions where splitting a line would change the tested data. - Test externally visible behavior and meaningful boundary failures. For compression, assert which actionable lines survive as well as whether output gets shorter; a length assertion alone cannot…
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 33,398 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 repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- antigravity/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- examples/AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- installers/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- src/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- llms.txtllms.txt
- token-saver-configSkill
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 1 is common, 3 are distinctive, and 2 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Test externally visible behavior and meaningful boundary failures.
- Common: line 11
Use realistic success and failure output, Unicode, empty output, and relevant quoting/path variants.
- Distinctive: line 17
Use fixed, harmless subprocess commands.
- Very specific: line 20
Put new processor failure cases in failure_fixtures.py.
- Very specific: line 24
Do not loosen tolerances, remove a scenario, or refresh the file merely to make a regression pass.
- Distinctive: line 32
Run a focused test module first, then the root validation commands for changes that cross runtime boundaries.
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 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.
Files
Tests and fixtures
- Apply the root Google Python style policy to test code and module imports.
Named pytest cases and fixtures retain the missing-docstring exemptions in
pyproject.toml; add prose when it explains a non-obvious scenario. Keep raw captured fixtures intact and justify narrow line-length exceptions where splitting a line would change the tested data. - Test externally visible behavior and meaningful boundary failures. For compression, assert which actionable lines survive as well as whether output gets shorter; a length assertion alone cannot detect lost errors.
- Use realistic success and failure output, Unicode, empty output, and relevant quoting/path variants. A known nonzero exit status must not yield a fabricated success result. Use inert synthetic secrets for redaction assertions.
- Isolate configuration caches, environment overrides, cwd, processor discovery,
and SQLite paths. Use
tmp_path/monkeypatch; keep installer subprocesses inside the sandbox profile built bytest_install_smoke.py. - Use fixed, harmless subprocess commands. Give subprocesses timeouts and an explicit UTF-8 encoding for text mode. Preserve cross-platform coverage rather than skipping a failing platform to hide a regression.
- Put new processor failure cases in
failure_fixtures.py. The shared corpus drives precision and hook-pattern checks; a processor with no reachable failure fixture leaves a production path unverified. compression_baselines.jsonrecords real routing and compression behavior. Do not loosen tolerances, remove a scenario, or refresh the file merely to make a regression pass. A justified baseline update needs a measured reason and preservation checks; regeneration instructions are intest_compression_ratchet.py.- Public-content consistency tests protect processor counts, configuration defaults, and committed versions. Fix the source/document mismatch rather than weakening the assertion.
Run a focused test module first, then the root validation commands for changes that cross runtime boundaries. Test names and fixtures should explain the regression independently of the implementation being refactored.
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
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.

