How it works

The cheapest instruction is the one loaded only when it's needed.

This is the model behind every TokenCheat score and rewrite — for developers who want to know why a rule was flagged, moved, or left alone. To just check your file, run the free audit.

instruction architecture — context exposure
The stronger optimization model

Don't ask only how to make the prompt shorter.

Ask which instructions must be active now and which only need to be discoverable later. The cheapest instruction is the one loaded only when needed, in the smallest form that preserves required behavior.

illustrative architecture
Always-on core ............. 420
Skill discovery ............. 90
On-demand workflow ....... 2,100
Deferred references ...... 1,150
Waste / obsolete ........... 240
Typical active exposure ≈ 510 tokens
Illustrative example — not provider-measured usage.
The tokencheat loop

A build pipeline for agent instructions.

Measurement comes first. Safe transformation and behavioral evidence come before distribution.

Collect. Pull the instruction files, skills, and MCP configs your agents actually load — the real always-on surface, not the intended one.

Runtime / Policy / Capability

Separate the framework from the expertise.

LAYER 01

Runtime

Session setup, state, host behavior, checkpoints, artifact paths and operating mechanics. Repeated runtime is a strong structural optimization target when evidence is clear.

LAYER 02

Policy

Cross-cutting safety, evidence, completeness, interaction and output rules. Share or defer policy only when required behavior remains explicit.

LAYER 03

Capability

The domain methodology that makes a skill valuable. tokencheat protects capability aggressively instead of treating every long instruction as waste.

Optimization levels

Not every optimization deserves the same trust.

L0
Audit only
No transformation
L1
Structural deduplication
Low risk
L2
Progressive disclosure
Low–medium risk
L3
Semantic compression
Evaluation required
L4
Lite build
Intentional capability reduction
Evidence before claims

A compiler people can inspect.

Every recommendation should include evidence, confidence, expected context reduction, behavior risk, evaluation requirements and a rollback path. A plan exists before mutation.

Deterministic first

Parsing, hashing, exact duplication and manifests should not spend model tokens.

Estimated ≠ measured

Static context estimates, provider telemetry and behavioral parity are separate evidence classes.

Critical constraints stay locked

Safety boundaries, destructive-operation gates and downstream contracts are not casually compressed.

Reversible builds

Provenance, source commit and optimization plans remain attached to compiled artifacts.