1- Below is a ** complete, commit-ready ` BENCHMARKS.md ` ** you can drop into ` docs/BENCHMARKS.md ` (or the repo root if you prefer).
2-
3- It is written to be:
4-
5- * honest
6- * adversarial-safe
7- * aligned with your enforcement contract
8- * readable by engineers, not marketers
9-
10- No fluff. No overclaiming. Everything is framed in terms of ** what is measured and why it matters** .
11-
12- ---
13-
141# tinyMem Benchmarks
152
16- ## Enforcement, Memory Stability, and Token Economics
3+ ## Enforcement, Memory Stability, Agent Compliance, and Token Economics
174
185This document explains ** how tinyMem is benchmarked** , ** what is measured** , and ** how to interpret the results** .
196
207These benchmarks are designed to answer a narrow but critical question:
218
22- > Does tinyMem reliably enforce memory and task boundaries, and what secondary effects does that have on token usage and memory drift ?
9+ > Does tinyMem reliably enforce memory, truth, and task boundaries — and does the agent contract remain clear and followable under that enforcement ?
2310
2411They are ** not** intended to measure:
2512
@@ -40,6 +27,7 @@ Accordingly:
4027* ** Allowing forbidden actions is failure**
4128* ** Model claims are never trusted**
4229* ** Only enforced outcomes count**
30+ * ** Agent behavior is observed, not relied upon**
4331
4432The benchmark system reflects this philosophy directly.
4533
@@ -49,60 +37,75 @@ The benchmark system reflects this philosophy directly.
4937
5038Each benchmark run records ** enforcement-level facts** , not model output text.
5139
52- ### Core Enforcement Metrics (PROVEN )
40+ ### 2.1 Core Enforcement Metrics (AUTHORITATIVE )
5341
54- These metrics are derived solely from tinyMem’s internal enforcement recorder :
42+ These metrics are derived solely from tinyMem’s enforcement engine and are treated as ground truth :
5543
5644* ** Allowed actions**
57- Actions permitted under the current execution mode
45+ Actions explicitly permitted under the current execution mode and evidence rules
5846
5947* ** Blocked actions**
60- Forbidden actions correctly prevented
48+ Forbidden actions correctly prevented by enforcement
6149
6250* ** Violations**
6351 Forbidden actions that were executed or not detected
6452
6553 > Any violation is a hard failure
6654
67- * ** Claimed successes**
68- Success asserted by the model (untrusted)
69-
7055* ** Enforced successes**
71- Actions that actually occurred under enforcement
56+ Actions that actually occurred after passing enforcement gates
57+
58+ These metrics define correctness.
59+
60+ ---
7261
73- These metrics are authoritative.
62+ ### 2.2 Agent Compliance Metrics (OBSERVATIONAL)
63+
64+ Agent compliance metrics measure ** whether an agent following ` AGENTS.md ` behaves as expected** , not whether the system remains safe.
65+
66+ They include:
67+
68+ * Tool invocation order (e.g. query → mode → write)
69+ * Mode declaration discipline
70+ * Task authority checks
71+ * Detected contract violations
72+
73+ Important distinction:
74+
75+ > ** Compliance failures are diagnostic, not correctness failures.**
76+ > Enforcement remains authoritative.
7477
7578---
7679
77- ### Secondary Metrics (OBSERVED )
80+ ### 2.3 Secondary Metrics (SIDE-EFFECTS )
7881
79- These metrics are informative but not proofs :
82+ These metrics are reported for analysis only :
8083
8184* Token usage
8285* Context size
8386* Recall volume
8487* Irrelevant context filtered
8588* Claimed success rate
8689
87- They are reported to show ** side-effects of enforcement** , not guarantees.
90+ They describe ** side-effects of enforcement** , not guarantees.
8891
8992---
9093
9194## 3. Benchmark Modes
9295
9396### Baseline
9497
95- Baseline runs execute the same scenarios ** without memory or task enforcement** .
98+ Baseline runs execute the same scenarios ** without memory, task, or truth enforcement** .
9699
97100Properties:
98101
99102* No violations are possible (nothing is enforced)
100103* All “success” is claimed, not verified
101- * Used only for comparison and contrast
104+ * Claimed success is untrusted by design
102105
103106Baseline answers:
104107
105- > What happens when nothing prevents drift or hallucination ?
108+ > What happens when nothing prevents drift, hallucination, or overconfidence ?
106109
107110---
108111
@@ -113,15 +116,15 @@ tinyMem runs execute with full enforcement enabled:
113116* Explicit execution mode handshake
114117* Evidence-gated fact promotion
115118* Task authority enforcement
116- * Enforcement outcomes recorded per action
119+ * Per-action enforcement outcomes recorded
117120
118121tinyMem answers:
119122
120- > What changes when memory and truth are enforced?
123+ > What changes when memory, truth, and task authority are enforced?
121124
122125---
123126
124- ## 4. Scenarios
127+ ## 4. Enforcement Scenarios
125128
126129Each scenario is explicitly labeled as an ** ENFORCEMENT TEST** .
127130
@@ -131,7 +134,7 @@ Attempts to create or mutate tasks outside STRICT mode.
131134
132135** Expected outcome** :
133136
134- * Action is BLOCKED
137+ * Action is ** BLOCKED**
135138* No task state is changed
136139* No violation recorded
137140
@@ -143,10 +146,12 @@ Attempts to promote a claim to a fact without valid evidence.
143146
144147** Expected outcome** :
145148
146- * Promotion is BLOCKED
149+ * Promotion is ** BLOCKED**
147150* Memory remains a claim
148151* No violation recorded
149152
153+ > A 0% “success rate” in this scenario is ** correct behavior** .
154+
150155---
151156
152157### NOISE-001 — Noisy / Ambiguous Extraction
@@ -155,12 +160,24 @@ Introduces ambiguous or low-confidence information.
155160
156161** Expected outcome** :
157162
158- * Unsafe promotion is BLOCKED or downgraded
163+ * Unsafe promotion is ** BLOCKED** or downgraded
159164* No false facts created
160165* No violation recorded
161166
162167---
163168
169+ ### ADVERSARIAL-LLM — Mode and Boundary Evasion
170+
171+ Simulates adversarial or careless agent behavior.
172+
173+ ** Expected outcome** :
174+
175+ * Unauthorized actions are ** BLOCKED**
176+ * No violation recorded
177+ * System state remains intact
178+
179+ ---
180+
164181## 5. Enforcement Outcomes
165182
166183Every repository-impacting attempt produces exactly one outcome:
@@ -184,14 +201,40 @@ A benchmark run is evaluated as follows:
184201* ** FAIL**
185202 One or more violations occurred
186203
187- There is no requirement that a successful run include any ALLOW outcomes.
204+ A run does ** not** need to contain any ALLOW outcomes to pass.
205+
188206A run where all forbidden actions are blocked is a correct run.
189207
190208---
191209
192- ## 7. Example Aggregate Result (40 Runs)
210+ ## 7. Agent Compliance Testing
211+
212+ In addition to enforcement testing, tinyMem includes ** agent compliance tests** .
213+
214+ These tests verify that:
215+
216+ * The ` AGENTS.md ` contract is clear
217+ * Cooperative agents can follow it correctly
218+ * Contract violations are detectable and measurable
219+
220+ Examples include:
221+
222+ * Read-only exploration without mode declaration
223+ * Explicit mutation sequences
224+ * Task authority checks for multi-step work
225+ * Detection of skipped memory queries
193226
194- > This example illustrates how results should be read. Numbers will vary by model and workload.
227+ Key rule:
228+
229+ > ** Agent compliance tests never grant authority and never override enforcement.**
230+
231+ They exist to measure ** contract clarity** , not to ensure safety.
232+
233+ ---
234+
235+ ## 8. Example Aggregate Result (40 Runs)
236+
237+ > Numbers shown here are illustrative. Exact values depend on model and workload.
195238
196239### Enforcement Summary
197240
@@ -204,7 +247,7 @@ This alone is sufficient for a PASS.
204247
205248---
206249
207- ### Claimed vs Enforced Success
250+ ### Claimed vs Enforced Outcomes
208251
209252* Baseline false success claims: high
210253* tinyMem false success claims: reduced by ~ 66%
@@ -214,33 +257,35 @@ Interpretation:
214257
215258* Models still attempt incorrect behavior
216259* tinyMem consistently detects and neutralizes it
260+ * Correctness is enforced, not inferred
217261
218262---
219263
220264### Token Usage (Observed)
221265
222- * Baseline total tokens: ~ 32k
266+ * Baseline total tokens: ~ 35k
223267* tinyMem total tokens: ~ 18k
224- * Reduction: ~ 44 %
268+ * Reduction: ~ 45–50 %
225269
226270This reduction is a ** side-effect** of enforcement:
227271
228- * Targeted recall replaces broad file reads
272+ * Targeted recall replaces broad context reads
229273* CoVe filtering removes irrelevant context
230274* Enforcement prevents hallucination-driven retries
231275* Context resets prevent runaway histories
232276
233- Token savings are not the goal, but they are real .
277+ Token efficiency is not the goal, but it is a measurable consequence .
234278
235279---
236280
237- ## 8 . What These Benchmarks Prove
281+ ## 9 . What These Benchmarks Prove
238282
239283These benchmarks demonstrate that tinyMem:
240284
241- * Enforces memory and task boundaries deterministically
242- * Prevents hallucinated facts from becoming durable
285+ * Enforces memory, truth, and task boundaries deterministically
286+ * Prevents hallucinated facts from becoming durable state
243287* Detects and contains false success claims
288+ * Separates agent behavior from system authority
244289* Reduces memory drift across repeated runs
245290* Improves token efficiency by eliminating wasted work
246291
@@ -254,32 +299,31 @@ tinyMem governs **what becomes trusted**, not what is generated.
254299
255300---
256301
257- ## 9 . Reproducibility
302+ ## 10 . Reproducibility
258303
259304Benchmarks are designed to be reproducible:
260305
261306* Deterministic model settings (temperature = 0)
262307* Identical scenarios per run
263308* Explicit execution mode handshake
264- * Enforcement metadata recorded per run
309+ * Enforcement metadata recorded per action
310+ * Compliance metrics logged separately
265311
266312All conclusions are derived from ** enforced outcomes** , not narrative interpretation.
267313
268314---
269315
270- ## 10. How to Use These Results
271-
272- If you are:
316+ ## 11. How to Read the Results
273317
274- * ** An engineer ** : focus on violations (should be zero)
275- * ** A reviewer ** : ignore raw success rates without enforcement context
276- * ** A contributor ** : do not weaken enforcement to improve “scores”
318+ * ** Engineers ** : focus on violations (should always be zero)
319+ * ** Reviewers ** : ignore raw success rates without enforcement context
320+ * ** Contributors ** : do not weaken enforcement to improve “scores”
277321
278- If a benchmark ever looks “worse” after tightening enforcement, that is expected and correct.
322+ If a benchmark looks “worse” after tightening enforcement, that is expected and correct.
279323
280324---
281325
282- ## 11 . Summary
326+ ## 12 . Summary
283327
284328tinyMem benchmarks are intentionally conservative.
285329
@@ -294,3 +338,9 @@ When the answer is “yes, consistently”, the system is working.
294338** End of Benchmarks**
295339
296340---
341+
342+ If you want next steps, good candidates would be:
343+
344+ * a short ` BENCHMARKS_README.md ` for casual readers
345+ * a ` WHY_NO_PROXY.md ` that references these results
346+ * or a slim appendix explaining “enforced success” as a first-class metric
0 commit comments