token-saver / src
AGENTS.md164 starsChanged 6 months agoApache-2.0View on GitHub
- Apply the root Google Python style policy. Use absolute module imports and document public contracts, including output shape, redaction, and failure behavior. Runtime error isolation must record only content-free diagnostics. - Keep processors focused on transforming command output. Keep subprocess execution and platform JSON in adapters, persistence in the tracker, and presentation in CLI/stats code. The engine coordinates these contracts. - Preserve CompressionEngine.compress() and core.compress() compatibility when moving implementation details. Existing callers and user processors must continue to work…
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
- tests/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
4 rules. About 1 is common, 2 are distinctive, and 1 is very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈2
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
- Distinctive: line 6
Keep processors focused on transforming command output.
- Distinctive: line 12
Treat unavailable diagnostics/persistence as best effort: they must not prevent the user's command output from being returned.
- Common: line 18
Run redaction before accepting any fallback path that could disclose the original text.
- Very specific: line 21
Keep configuration precedence: defaults, global file, project file, environment.
≈ “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
Runtime boundaries
- Apply the root Google Python style policy. Use absolute module imports and document public contracts, including output shape, redaction, and failure behavior. Runtime error isolation must record only content-free diagnostics.
- Keep processors focused on transforming command output. Keep subprocess execution and platform JSON in adapters, persistence in the tracker, and presentation in CLI/stats code. The engine coordinates these contracts.
- Preserve
CompressionEngine.compress()andcore.compress()compatibility when moving implementation details. Existing callers and user processors must continue to work without platform-specific dependencies. - Treat unavailable diagnostics/persistence as best effort: they must not prevent the user's command output from being returned. Do not silently turn a failed command into a successful result.
- On a known nonzero exit status, only processors that opt into failure handling may use specialized compression. Keep the generic fallback and critical-line recovery behavior covered by precision tests.
- Run redaction before accepting any fallback path that could disclose the original text. Redaction must also survive processor chaining, size gates, and error recovery; recovered lines must not reintroduce secrets.
- Keep configuration precedence: defaults, global file, project file,
environment. Project configuration must not control
user_processors_dir,disabled_processors, orredaction_allowlist. Validate values at the configuration boundary and update the README when defaults change. - Token counts derived from
chars_per_tokenare estimates. Do not label them exact model usage or billing savings. - Reuse
data_dir()and platform helpers for paths. Preserve Linux, macOS, and Windows behavior; tests must not depend on the developer's actual config, processor directory, or savings database.
For orchestration changes, start with tests/test_engine.py,
tests/test_core.py, tests/test_precision.py, and
tests/test_compression_ratchet.py. Run CLI/config/tracker tests when those
boundaries change. Read src/processors/AGENTS.md before editing processors.
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.

