Explore The gallery: filterable previews of what the output looks like after the pipeline, defaults in view. Not the mechanics - see Examples for those.

INDEX 06 / 14

SHOWCASE // THE PLUGIN IN ACTION

The plugin, worked

A tool call's output is appended to the model's context, and the model reads every line of it. These are the entries where Aphrodite decides what arrives instead.

Anonymized throughout - no names, no secrets, no real sessions; every entry is a real behavior of the pipeline dressed in generic content.

HOW THESE EXAMPLES WERE PRODUCED provenance · what the corpus lines are checked against · the four labels

Every example is a real behavior of the pipeline dressed in generic content: what the agent sends (the raw stream), what it sees back (the enriched preview), how the bytes come home (the retrieval round-trip), and why the thresholds made that decision.

All previews marked as corpus lines are byte-identical to the docs catalog; the rest are faithful fragments.

That catalog is the enriched-preview table in docs/proxy/compression.md together with the preview-form table in the repository README - both are public, so every corpus line can be checked against them, character for character.

Anonymized throughout - no names, no secrets, no real sessions.

THE FOUR PROVENANCE LABELS

"Anonymized" and "illustrative" are not the same claim, so every entry names its own provenance in text beside its title. Colour reinforces the label; it never carries the distinction on its own.

  • Catalog-exact - the preview line is byte-identical to the documented enriched-preview catalog, so it can be checked character for character.
  • Illustrative - authored: a faithful fragment of the shape with varied generic numbers, not a capture and not a catalog line.
  • Captured - recorded from a real run and then anonymized. No entry claims it today; the label exists so a real capture can be published without being called illustrative.
  • Engine-verified - checked against a named engine version, so the behavior is pinned to a release rather than to a reading of the code.

THE FOUR OUTCOMES

An example says how its bytes reached the transcript, because four different mechanisms that render identically are four mechanisms a reader cannot tell apart. The counts are read off the bank.

  • Compressed · 16 - the output crossed the surface's threshold: hashed, stored, and replaced by a preview line plus a marker.
  • Passed through · 2 - under the threshold, or stopped by a skip gate: the bytes reach the transcript unchanged and nothing is stored.
  • Injected · 1 - never a tool result: behavioural text assembled in a fixed order and placed into the prompt.
  • Callback · 1 - a relay call that answers immediately and delivers the real result later, at a callback URL.
ON THIS PAGE 5 SECTIONS

01 // THE EXAMPLES // ONE RECORD SHAPE, FOUR MECHANISMS

20 worked examples

Each entry names the mechanism that carried its bytes - compressed, passed through, injected or delivered by callback - and each one opens to the full output, the retrieval call and answer, the threshold decision and its source.

THE DECISION MATRIX three axes · one row per example · the same three, in the same order, on every card's ribbon
TYPE
The category an entry is filed under, read off the entry's own record. The bank files 15 of them: build · test · terminal · code · grep/search · git · git/gitlog · diff · json/table · error/linter · log · tool-relay · directives · chain-split · thresholds .
OUTCOME
How its bytes reached the transcript - compressed, passed through, injected or delivered by callback - computed from the record rather than typed per example, because four mechanisms that render identically are four mechanisms a reader cannot tell apart.
PROVENANCE
What its words are checked against - catalog-exact, illustrative, captured or engine-verified - printed in text beside the title, because colour reinforces a label and never carries the distinction on its own.

02 // THE REGISTRY // FILTER BY CATEGORY, SEARCH BY KEYWORD

The gallery

Every entry is the same record shape, so the filter is a query over the three axes the matrix names: a chip narrows the bank to one category, and the field searches the full text of every row - the raw stream, the preview, the retrieval call and the error codes included.

FILTER · SEARCH

SEARCH READS: TITLE · CATEGORY · CLAIM · PREVIEW · RAW OUTPUT · RETRIEVAL CALL · ERROR CODES · TOOL NAMES · CONFIGURATION KEYS · FILE EXTENSIONS

SHOWING 20 OF 20

I BUILD COMPRESSED Catalog-exact
I // BUILD
Catalog-exact COMPRESSED

Cargo build with one compile error

The preview leads with the tallies (error lines counted line-by-line, never substring matches) and surfaces the first real error message, so the model can act on the failure without retrieving.

THE ORIGINAL OUTPUT

4 OF 14 LINES
Compiling app-core v0.1.0 (/home/dev/project/crates/app-core)
error[E0432]: unresolved import `app_core::config`
--> crates/app-core/src/lib.rs:4:5
|

10 more lines - inspect the example for the full stream.

WHAT THE AGENT SEES // PREVIEW + MARKER

PREVIEW + MARKER
[build:1E 1W 142L | error[E0432]: unresolved import ...]
Original retained
Compiling app-core v0.1.0 (/home/dev/project/crates/app-core)
[build_output: errors=1;warnings=1;lang=rust]
<<<CCR:f3a1c0d4e5b6a7982c1d0e9f8a7b6c5d4e3f2019|build_output|487>>>
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

The preview leads with the tallies (error lines counted line-by-line, never substring matches) and surfaces the first real error message, so the model can act on the failure without retrieving.

The warning is counted even though the error is the headline.

THE COMMAND

aphrodite_retrieve(hash: "f3a1c0d4e5b6a7982c1d0e9f8a7b6c5d4e3f2019")

THE FULL OUTPUT // EVERY LINE

Compiling app-core v0.1.0 (/home/dev/project/crates/app-core)
error[E0432]: unresolved import `app_core::config`
--> crates/app-core/src/lib.rs:4:5
|
4 | use app_core::config;
| ^^^^^^^^^^^^^^^^ no `config` in the root
 
warning: unused import: `std::collections::HashMap`
--> crates/app-core/src/util.rs:2:5
|
2 | use std::collections::HashMap;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
 
error: could not compile `app-core` (lib) due to 1 previous error

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "f3a1c0d4e5b6a7982c1d0e9f8a7b6c5d4e3f2019")
  • found true
  • source ccr
  • hash f3a1c0d4e5b6a7982c1d0e9f8a7b6c5d4e3f2019
  • content <the full compiler output above, byte-for-byte>

THE THRESHOLD DECISION

Over the surface's threshold: the bytes are hashed (BLAKE3), stored, and the transcript keeps a preview line plus a marker that addresses the original. Retrieval returns the exact original bytes, so the round trip closes with nothing lost.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · build-compile-error

II BUILD PASSED THROUGH Catalog-exact
II // BUILD
Catalog-exact PASSED THROUGH

Clean build is left raw (CLASSIFIER_SKIP)

A build with zero errors and zero warnings is inert: it stays in context untouched and no marker is stored.

THE INPUT

2 OF 2 LINES
Compiling app v0.1.0 (/home/dev/project/crates/app)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.41s

WHAT THE AGENT SEES // UNCHANGED

  • bytes identical to the input above
  • marker none - the output stays raw, no marker stored
  • store no entry

THE PREVIEW THE CLASSIFIER WOULD HAVE WRITTEN - NEVER EMITTED

[build:0E 0W 1L]
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

A build with zero errors and zero warnings is inert: it stays in context untouched and no marker is stored.

The preview above is the complete story the classifier would tell, but the skip gate means even that line is unnecessary - the raw two lines cost less than the machinery.

THE COMMAND

(stays raw - no retrieval call)

THE FULL OUTPUT // EVERY LINE

Compiling app v0.1.0 (/home/dev/project/crates/app)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.41s

THE THRESHOLD DECISION

Under the surface's threshold, or stopped by a skip gate: the output reaches the transcript byte-identical and nothing is stored. Compression is a byte count against a threshold, never a judgment call - which is why the preview below was computed and then never emitted.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · build-clean-skip

III TEST COMPRESSED Catalog-exact
III // TEST
Catalog-exact COMPRESSED

Test suite run, all green

Test output gets its own semantic arm (detected by running/test line prefixes even when the classifier only reached the generic terminal bucket).

THE ORIGINAL OUTPUT

2 OF 2 LINES
running 220 tests
test result: ok. 220 passed; 0 failed; 1 ignored; 0 measured; finished in 0.31s

WHAT THE AGENT SEES // PREVIEW + MARKER

PREVIEW + MARKER
[test:220 pass 0 fail 1 ignored | 0.31s]
Original retained
running 220 tests
[test: passed=220;failed=0;ignored=1;duration=0.31s]
<<<CCR:b9d2e7410a3f5c8e6d4b2a907c1e3f5a8d0c2b476|test|96>>>
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

Test output gets its own semantic arm (detected by running/test line prefixes even when the classifier only reached the generic terminal bucket).

Pass/fail/ignored tallies plus the duration in the preview mean a green run rarely needs retrieval.

THE COMMAND

aphrodite_retrieve(hash: "b9d2e7410a3f5c8e6d4b2a907c1e3f5a8d0c2b476")

THE FULL OUTPUT // EVERY LINE

running 220 tests
test result: ok. 220 passed; 0 failed; 1 ignored; 0 measured; finished in 0.31s

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "b9d2e7410a3f5c8e6d4b2a907c1e3f5a8d0c2b476")
  • found true
  • source ccr
  • hash b9d2e7410a3f5c8e6d4b2a907c1e3f5a8d0c2b476
  • content <the full test output, byte-for-byte>

THE THRESHOLD DECISION

Over the surface's threshold: the bytes are hashed (BLAKE3), stored, and the transcript keeps a preview line plus a marker that addresses the original. Retrieval returns the exact original bytes, so the round trip closes with nothing lost.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · test-suite-pass

IV TEST COMPRESSED Illustrative
IV // TEST
Illustrative COMPRESSED

Test suite run with a failure

On failure the preview swaps the duration for the FAIL'ing test name - the single fact the next action (open the test, fix the assertion) needs.

THE ORIGINAL OUTPUT

4 OF 4 LINES
running 48 tests
test config::tests::loads_overrides ... FAILED
 
test result: FAILED. 47 passed; 1 failed; 0 ignored; finished in 0.12s

WHAT THE AGENT SEES // PREVIEW + MARKER

PREVIEW + MARKER
[test:47 pass 1 fail 0 ignored | FAIL config::tests::loads_overrides]
Original retained
running 48 tests
[test: passed=47;failed=1;ignored=0;fail=config::tests::loads_overrides]
<<<CCR:c5e8a1d3f6b9c2e4a7d0b3f6e9c2a5d8b1e4f730|test|143>>>
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

On failure the preview swaps the duration for the FAIL'ing test name - the single fact the next action (open the test, fix the assertion) needs.

Fragment with varied numbers; not in the docs catalog.

THE COMMAND

aphrodite_retrieve(hash: "c5e8a1d3f6b9c2e4a7d0b3f6e9c2a5d8b1e4f730")

THE FULL OUTPUT // EVERY LINE

running 48 tests
test config::tests::loads_overrides ... FAILED
 
test result: FAILED. 47 passed; 1 failed; 0 ignored; finished in 0.12s

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "c5e8a1d3f6b9c2e4a7d0b3f6e9c2a5d8b1e4f730")
  • found true
  • source ccr
  • hash c5e8a1d3f6b9c2e4a7d0b3f6e9c2a5d8b1e4f730
  • content <the full test output, byte-for-byte>

THE THRESHOLD DECISION

Over the surface's threshold: the bytes are hashed (BLAKE3), stored, and the transcript keeps a preview line plus a marker that addresses the original. Retrieval returns the exact original bytes, so the round trip closes with nothing lost.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · test-suite-fail

V TERMINAL COMPRESSED Catalog-exact
V // TERMINAL
Catalog-exact COMPRESSED

Shell command output with its exit code

Terminal output over the terminal threshold (1024 bytes) compresses to a line that keeps the exit code and line count.

THE ORIGINAL OUTPUT

4 OF 4 LINES
cargo build --release 2>&1 | tail -n 20
Compiling app v0.1.0
Finished `release` profile target(s) in 18.03s
EXIT:0

WHAT THE AGENT SEES // PREVIEW + MARKER

PREVIEW + MARKER
[terminal:14L exit code: 0]
Original retained
cargo build --release 2>&1 | tail -n 20
[terminal: lines=14;exit=0;cmd=cargo build --release]
<<<CCR:d7b4f2a8e1c5d9b3f6a2e8c4b7d1f5a9e3c6b028|terminal|612>>>
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

Terminal output over the terminal threshold (1024 bytes) compresses to a line that keeps the exit code and line count.

Under the session rules the exit code - not the prose - is the source of truth, so the model branches on exit=0 without retrieving.

THE COMMAND

aphrodite_retrieve(hash: "d7b4f2a8e1c5d9b3f6a2e8c4b7d1f5a9e3c6b028")

THE FULL OUTPUT // EVERY LINE

cargo build --release 2>&1 | tail -n 20
Compiling app v0.1.0
Finished `release` profile target(s) in 18.03s
EXIT:0

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "d7b4f2a8e1c5d9b3f6a2e8c4b7d1f5a9e3c6b028")
  • found true
  • source ccr
  • hash d7b4f2a8e1c5d9b3f6a2e8c4b7d1f5a9e3c6b028
  • content <the full terminal output, byte-for-byte>

THE THRESHOLD DECISION

Over the surface's threshold: the bytes are hashed (BLAKE3), stored, and the transcript keeps a preview line plus a marker that addresses the original. Retrieval returns the exact original bytes, so the round trip closes with nothing lost.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · terminal-exit-code

VI TERMINAL COMPRESSED Illustrative
VI // TERMINAL
Illustrative COMPRESSED

Failing shell command keeps its context

Same shape, nonzero exit: the preview still shows only line count and exit code.

THE ORIGINAL OUTPUT

3 OF 3 LINES
./scripts/migrate.sh
ERROR: migration 004 failed: relation "audit_log" already exists
EXIT:1

WHAT THE AGENT SEES // PREVIEW + MARKER

PREVIEW + MARKER
[terminal:9L exit code: 1]
Original retained
./scripts/migrate.sh
[terminal: lines=9;exit=1;cmd=./scripts/migrate.sh]
<<<CCR:e2f9a5c8b1d4e7f0a3c6b9d2e5f8a1c4b7d0e3f951|terminal|204>>>
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

Same shape, nonzero exit: the preview still shows only line count and exit code.

The lesson is the session rule it encodes - never infer success by scanning human-readable text; a nonzero exit code is the retrieval trigger.

Fragment with varied numbers; not in the docs catalog.

THE COMMAND

aphrodite_retrieve(hash: "e2f9a5c8b1d4e7f0a3c6b9d2e5f8a1c4b7d0e3f951")

THE FULL OUTPUT // EVERY LINE

./scripts/migrate.sh
ERROR: migration 004 failed: relation "audit_log" already exists
EXIT:1

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "e2f9a5c8b1d4e7f0a3c6b9d2e5f8a1c4b7d0e3f951")
  • found true
  • source ccr
  • hash e2f9a5c8b1d4e7f0a3c6b9d2e5f8a1c4b7d0e3f951
  • content <the full terminal output, byte-for-byte>

THE THRESHOLD DECISION

Over the surface's threshold: the bytes are hashed (BLAKE3), stored, and the transcript keeps a preview line plus a marker that addresses the original. Retrieval returns the exact original bytes, so the round trip closes with nothing lost.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · terminal-nonzero

VII CODE COMPRESSED Catalog-exact
VII // CODE
Catalog-exact COMPRESSED

Rust source file structure map

The hook/FFI pipeline layout: marker line first, then the structure-map preview (function count, struct count, first signature), then a [meta:] line.

THE ORIGINAL OUTPUT

4 OF 11 LINES
//! Cache entry bookkeeping.
use std::collections::BTreeMap;
 
pub struct Entry { pub key: String, pub size: usize }

7 more lines - inspect the example for the full stream.

WHAT THE AGENT SEES // PREVIEW + MARKER

PREVIEW + MARKER
[code:3fns|2structs fn main() 414L]
Original retained
<<<CCR:a8c3f6e9d2b5a8c1f4e7d0b3a6c9f2e5d8b1a4c773|source_code|842>>>
[code:3fns|2structs pub fn new(&str) -> Self 26L]
[meta:lang=rust;fns=3;structs=2;impls=1]
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

The hook/FFI pipeline layout: marker line first, then the structure-map preview (function count, struct count, first signature), then a [meta:] line.

Code types sit in the Code tier, so their threshold is the base multiplied by code_multiplier (3.0) - source code gets more headroom before compression than logs of the same size.

THE COMMAND

aphrodite_retrieve(hash: "a8c3f6e9d2b5a8c1f4e7d0b3a6c9f2e5d8b1a4c773")

THE FULL OUTPUT // EVERY LINE

//! Cache entry bookkeeping.
use std::collections::BTreeMap;
 
pub struct Entry { pub key: String, pub size: usize }
 
impl Entry {
pub fn new(key: &str) -> Self { ... }
pub fn weight(&self) -> usize { ... }
}
 
pub fn evict(store: &mut BTreeMap<String, Entry>, budget: usize) -> usize { ... }

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "a8c3f6e9d2b5a8c1f4e7d0b3a6c9f2e5d8b1a4c773")
  • found true
  • source ccr
  • hash a8c3f6e9d2b5a8c1f4e7d0b3a6c9f2e5d8b1a4c773
  • content <the full source file, byte-for-byte>

THE THRESHOLD DECISION

Over the surface's threshold: the bytes are hashed (BLAKE3), stored, and the transcript keeps a preview line plus a marker that addresses the original. Retrieval returns the exact original bytes, so the round trip closes with nothing lost.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · code-rust-module

VIII CODE COMPRESSED Illustrative
VIII // CODE
Illustrative COMPRESSED

Python module structure map

Per-language code templates swap the fields: classes instead of structs for Python.

THE ORIGINAL OUTPUT

4 OF 12 LINES
import json
from pathlib import Path
 
class Manifest:

8 more lines - inspect the example for the full stream.

WHAT THE AGENT SEES // PREVIEW + MARKER

PREVIEW + MARKER
[code_python:2fns|1classes def load(self) 12L]
Original retained
<<<CCR:b1d4e7a0c3f6b9d2e5a8c1f4b7d0e3a6c9f2b5d812|code_python|340>>>
[code_python:2fns|1classes def load(self) 12L]
[meta:lang=python;fns=2;classes=1]
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

Per-language code templates swap the fields: classes instead of structs for Python.

The first signature in the preview is a real callable signature, so the model can reason about the API without opening the file.

Fragment; not in the docs catalog.

THE COMMAND

aphrodite_retrieve(hash: "b1d4e7a0c3f6b9d2e5a8c1f4b7d0e3a6c9f2b5d812")

THE FULL OUTPUT // EVERY LINE

import json
from pathlib import Path
 
class Manifest:
def __init__(self, path):
self.path = Path(path)
 
def load(self):
return json.loads(self.path.read_text())
 
def write_manifest(manifest, target):
target.write_text(json.dumps(manifest, indent=2))

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "b1d4e7a0c3f6b9d2e5a8c1f4b7d0e3a6c9f2b5d812")
  • found true
  • source ccr
  • hash b1d4e7a0c3f6b9d2e5a8c1f4b7d0e3a6c9f2b5d812
  • content <the full source file, byte-for-byte>

THE THRESHOLD DECISION

Over the surface's threshold: the bytes are hashed (BLAKE3), stored, and the transcript keeps a preview line plus a marker that addresses the original. Retrieval returns the exact original bytes, so the round trip closes with nothing lost.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · code-python-module

IX GREP/SEARCH COMPRESSED Catalog-exact
X GIT COMPRESSED Catalog-exact
X // GIT
Catalog-exact COMPRESSED

git status with a dirty tree

The semantic detector upgrades the generic terminal bucket to the git arm by line prefixes (On branch / modified:), then the preview tallies modified/added/deleted/untracked and names the first files.

THE ORIGINAL OUTPUT

4 OF 8 LINES
On branch main
Changes not staged for commit:
modified: src/main.rs
modified: src/lib.rs

4 more lines - inspect the example for the full stream.

WHAT THE AGENT SEES // PREVIEW + MARKER

PREVIEW + MARKER
[git:2M 2A 1D 3?? | src/x.rs src/y.rs +5 more]
Original retained
On branch main
[git: modified=2;untracked=2]
<<<CCR:d0e3f6a9c2b5d8e1f4a7c0d3b6e9f2a5c8b1d4e704|git|173>>>
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

The semantic detector upgrades the generic terminal bucket to the git arm by line prefixes (On branch / modified:), then the preview tallies modified/added/deleted/untracked and names the first files.

The exact tree shape is a retrieve away.

THE COMMAND

aphrodite_retrieve(hash: "d0e3f6a9c2b5d8e1f4a7c0d3b6e9f2a5c8b1d4e704")

THE FULL OUTPUT // EVERY LINE

On branch main
Changes not staged for commit:
modified: src/main.rs
modified: src/lib.rs
 
Untracked files:
src/new_module.rs
tests/fixture.txt

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "d0e3f6a9c2b5d8e1f4a7c0d3b6e9f2a5c8b1d4e704")
  • found true
  • source ccr
  • hash d0e3f6a9c2b5d8e1f4a7c0d3b6e9f2a5c8b1d4e704
  • content <the full git status, byte-for-byte>

THE THRESHOLD DECISION

Over the surface's threshold: the bytes are hashed (BLAKE3), stored, and the transcript keeps a preview line plus a marker that addresses the original. Retrieval returns the exact original bytes, so the round trip closes with nothing lost.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · git-status

XI GIT/GITLOG COMPRESSED Illustrative
XI // GIT/GITLOG
Illustrative COMPRESSED

git log recent commits

The gitlog arm carries the first-to-last commit arc (short hash + subject on each end) - the shape of history, not the content of it.

THE ORIGINAL OUTPUT

4 OF 11 LINES
commit 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b
Author: Dev <[email protected]>
Date: (anonymized)
 

7 more lines - inspect the example for the full stream.

WHAT THE AGENT SEES // PREVIEW + MARKER

PREVIEW + MARKER
[gitlog:2 commits | abc1234 fix... → def5678 feat...]
Original retained
commit 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b
[gitlog: commits=2]
<<<CCR:e5b8c1d4f7a0e3b6c9d2f5a8b1e4c7f0a3d6b9e245|gitlog|391>>>
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

The gitlog arm carries the first-to-last commit arc (short hash + subject on each end) - the shape of history, not the content of it.

The example content here is generic; real author identities from any session are never reproduced.

THE COMMAND

aphrodite_retrieve(hash: "e5b8c1d4f7a0e3b6c9d2f5a8b1e4c7f0a3d6b9e245")

THE FULL OUTPUT // EVERY LINE

commit 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b
Author: Dev <[email protected]>
Date: (anonymized)
 
fix: clamp preview width at the char boundary
 
commit 9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b
Author: Dev <[email protected]>
Date: (anonymized)
 
feat: add per-type preview templates

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "e5b8c1d4f7a0e3b6c9d2f5a8b1e4c7f0a3d6b9e245")
  • found true
  • source ccr
  • hash e5b8c1d4f7a0e3b6c9d2f5a8b1e4c7f0a3d6b9e245
  • content <the full git log, byte-for-byte>

THE THRESHOLD DECISION

Over the surface's threshold: the bytes are hashed (BLAKE3), stored, and the transcript keeps a preview line plus a marker that addresses the original. Retrieval returns the exact original bytes, so the round trip closes with nothing lost.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · git-log

XII DIFF COMPRESSED Catalog-exact
XII // DIFF
Catalog-exact COMPRESSED

A diff of changed files

Diff previews name the changed files and the plus/minus tallies.

THE ORIGINAL OUTPUT

4 OF 15 LINES
diff --git a/src/main.rs b/src/main.rs
index 3f2a1b0..9c8d7e6 100644
--- a/src/main.rs
+++ b/src/main.rs

11 more lines - inspect the example for the full stream.

WHAT THE AGENT SEES // PREVIEW + MARKER

PREVIEW + MARKER
[diff:2F +7/-3 12L | src/main.rs Cargo.toml +N more]
Original retained
diff --git a/src/main.rs b/src/main.rs
[diff: files=2;plus=7;minus=3]
<<<CCR:f8a1d4c7b0e3f6a9c2d5b8e1f4a7c0d3b6e9f2a806|diff|452>>>
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

Diff previews name the changed files and the plus/minus tallies.

The model reviews shape first (how many files, how big) and retrieves only when it must read the actual hunks - e.g. before writing a review comment.

THE COMMAND

aphrodite_retrieve(hash: "f8a1d4c7b0e3f6a9c2d5b8e1f4a7c0d3b6e9f2a806")

THE FULL OUTPUT // EVERY LINE

diff --git a/src/main.rs b/src/main.rs
index 3f2a1b0..9c8d7e6 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -12,7 +12,9 @@ fn main() {
- let threads = 4;
+ let threads = num_cpus::get();
+
+ assert!(threads > 0);
diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@
+[dependencies]
+num_cpus = "1"

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "f8a1d4c7b0e3f6a9c2d5b8e1f4a7c0d3b6e9f2a806")
  • found true
  • source ccr
  • hash f8a1d4c7b0e3f6a9c2d5b8e1f4a7c0d3b6e9f2a806
  • content <the full diff, byte-for-byte>

THE THRESHOLD DECISION

Over the surface's threshold: the bytes are hashed (BLAKE3), stored, and the transcript keeps a preview line plus a marker that addresses the original. Retrieval returns the exact original bytes, so the round trip closes with nothing lost.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · diff-patch

XIII JSON/TABLE COMPRESSED Catalog-exact
XIII // JSON/TABLE
Catalog-exact COMPRESSED

A JSON API response

JSON lists show item counts, JSON objects show key counts.

THE ORIGINAL OUTPUT

4 OF 5 LINES
[
{"id": 1, "status": "ok", "duration_ms": 42},
{"id": 2, "status": "ok", "duration_ms": 17},
{"id": 3, "status": "degraded", "duration_ms": 210}

1 more line - inspect the example for the full stream.

WHAT THE AGENT SEES // PREVIEW + MARKER

PREVIEW + MARKER
[json:5items 3L]
Original retained
[
[json: items=3]
<<<CCR:a2c5e8b1d4f7a0c3e6b9d2a5c8e1f4b7d0c3e6f987|json|148>>>
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

JSON lists show item counts, JSON objects show key counts.

Note the deliberate exclusion: a wrapper envelope carrying output/exit_code/success keys is NOT re-tagged as json - its raw-JSON preview survives, because that envelope is the tool contract the model needs to read.

THE COMMAND

aphrodite_retrieve(hash: "a2c5e8b1d4f7a0c3e6b9d2a5c8e1f4b7d0c3e6f987")

THE FULL OUTPUT // EVERY LINE

[
{"id": 1, "status": "ok", "duration_ms": 42},
{"id": 2, "status": "ok", "duration_ms": 17},
{"id": 3, "status": "degraded", "duration_ms": 210}
]

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "a2c5e8b1d4f7a0c3e6b9d2a5c8e1f4b7d0c3e6f987")
  • found true
  • source ccr
  • hash a2c5e8b1d4f7a0c3e6b9d2a5c8e1f4b7d0c3e6f987
  • content <the full JSON, byte-for-byte>

THE THRESHOLD DECISION

Over the surface's threshold: the bytes are hashed (BLAKE3), stored, and the transcript keeps a preview line plus a marker that addresses the original. Retrieval returns the exact original bytes, so the round trip closes with nothing lost.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · json-payload

XIV ERROR/LINTER COMPRESSED Illustrative
XIV // ERROR/LINTER
Illustrative COMPRESSED

Linter / compiler diagnostics

The error arm puts the first error message itself into the preview - the one string that lets the model start fixing without a round-trip.

THE ORIGINAL OUTPUT

4 OF 9 LINES
warning: variable does not need to be mutable
--> src/store.rs:38:9
|
38 | let mut total = 0;

5 more lines - inspect the example for the full stream.

WHAT THE AGENT SEES // PREVIEW + MARKER

PREVIEW + MARKER
[error:could not compile `store` (lib) due to 1 previous error]
Original retained
warning: variable does not need to be mutable
[error: code=1;loc=src/store.rs:38]
<<<CCR:b3d6e9c2f5a8b1d4e7c0f3a6d9c2f5e8b1d4a7c063|error|296>>>
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

The error arm puts the first error message itself into the preview - the one string that lets the model start fixing without a round-trip.

Linter output (rustc/clippy/eslint/tsc shapes) lands in this arm via the classifier's first-line and tool-name detection.

Fragment; not in the docs catalog.

THE COMMAND

aphrodite_retrieve(hash: "b3d6e9c2f5a8b1d4e7c0f3a6d9c2f5e8b1d4a7c063")

THE FULL OUTPUT // EVERY LINE

warning: variable does not need to be mutable
--> src/store.rs:38:9
|
38 | let mut total = 0;
| ---- help: remove `mut`
 
warning: 1 warning emitted
 
error: could not compile `store` (lib) due to 1 previous error

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "b3d6e9c2f5a8b1d4e7c0f3a6d9c2f5e8b1d4a7c063")
  • found true
  • source ccr
  • hash b3d6e9c2f5a8b1d4e7c0f3a6d9c2f5e8b1d4a7c063
  • content <the full diagnostics, byte-for-byte>

THE THRESHOLD DECISION

Over the surface's threshold: the bytes are hashed (BLAKE3), stored, and the transcript keeps a preview line plus a marker that addresses the original. Retrieval returns the exact original bytes, so the round trip closes with nothing lost.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · linter-output

XV LOG COMPRESSED Illustrative
XV // LOG
Illustrative COMPRESSED

A running server's log tail

Log detection is marker-based: bracketed INFO/WARN/ERROR/DEBUG levels or timestamp-shaped lines.

THE ORIGINAL OUTPUT

4 OF 5 LINES
[INFO] server listening on 127.0.0.1:8080
[DEBUG] connection accepted from 10.0.0.4
[WARN] slow query: 1240ms /api/report
[ERROR] upstream timeout after 30s

1 more line - inspect the example for the full stream.

WHAT THE AGENT SEES // PREVIEW + MARKER

PREVIEW + MARKER
[log:1E 1W 5L]
Original retained
[INFO] server listening on 127.0.0.1:8080
[log: entries=5;errors=1;warnings=1]
<<<CCR:c4f7a0d3e6b9c2f5a8d1e4c7f0a3d6b9e2c5f8a137|log|187>>>
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

Log detection is marker-based: bracketed INFO/WARN/ERROR/DEBUG levels or timestamp-shaped lines.

The preview tallies entries, errors and warnings - a quiet log is visible at a glance, and the interesting lines are one retrieve away.

THE COMMAND

aphrodite_retrieve(hash: "c4f7a0d3e6b9c2f5a8d1e4c7f0a3d6b9e2c5f8a137")

THE FULL OUTPUT // EVERY LINE

[INFO] server listening on 127.0.0.1:8080
[DEBUG] connection accepted from 10.0.0.4
[WARN] slow query: 1240ms /api/report
[ERROR] upstream timeout after 30s
[INFO] retry scheduled in 2s

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "c4f7a0d3e6b9c2f5a8d1e4c7f0a3d6b9e2c5f8a137")
  • found true
  • source ccr
  • hash c4f7a0d3e6b9c2f5a8d1e4c7f0a3d6b9e2c5f8a137
  • content <the full log tail, byte-for-byte>

THE THRESHOLD DECISION

Over the surface's threshold: the bytes are hashed (BLAKE3), stored, and the transcript keeps a preview line plus a marker that addresses the original. Retrieval returns the exact original bytes, so the round trip closes with nothing lost.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · server-log

XVI TOOL-RELAY CALLBACK Illustrative
XVI // TOOL-RELAY
Illustrative CALLBACK

Tool relay: async call with a callback URL

A callback_url turns the synchronous relay call into a fire-and-forget: an immediate queued reply, then the real result POSTed to the callback (https only, 5s timeout, no auth on the callback POST).

THE EXCHANGE

01 THE REQUEST
POST /tool/relay
{
"tool": "aphrodite_compress",
"params": { "content": "<bulk build log>", "type": "build_output" },
"callback_url": "https://hermes.internal/callback"
}
02 IMMEDIATE REPLY
{"success": true, "queued": true}
03 LATER, POST HTTPS://HERMES.INTERNAL/CALLBACK
{"tool": "aphrodite_compress", "result": {"hash": "d5a8c1f4b7e0d3a6c9f2b5e8a1d4c7f0b3e6a9d231", "type": "build_output", "size": 1467, "marker": "<<<CCR:...>>>"}}

WHAT THE AGENT SEES // THE QUEUED REPLY

PREVIEW + MARKER
[process:pid=4821 up=6m 14L]
Original retained
{"tool": "aphrodite_compress", "queued": true}
[process: pid=4821;queued=1]
<<<CCR:d6b9e2c5f8a1d4b7e0c3f6a9d2e5b8c1f4a7d0e358|json|299>>>
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

A callback_url turns the synchronous relay call into a fire-and-forget: an immediate queued reply, then the real result POSTed to the callback (https only, 5s timeout, no auth on the callback POST).

Only the aphrodite_* relay tools are accepted; anything else is an error.

The result itself is compact metadata, so it stays raw through the hook pipeline.

THE COMMAND

aphrodite_retrieve(hash: "d6b9e2c5f8a1d4b7e0c3f6a9d2e5b8c1f4a7d0e358")

THE FULL OUTPUT // EVERY LINE

POST /tool/relay
{
"tool": "aphrodite_compress",
"params": { "content": "<bulk build log>", "type": "build_output" },
"callback_url": "https://hermes.internal/callback"
}
 
--- immediate reply ---
{"success": true, "queued": true}
 
--- later, POST https://hermes.internal/callback ---
{"tool": "aphrodite_compress", "result": {"hash": "d5a8c1f4b7e0d3a6c9f2b5e8a1d4c7f0b3e6a9d231", "type": "build_output", "size": 1467, "marker": "<<<CCR:...>>>"}}

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "d6b9e2c5f8a1d4b7e0c3f6a9d2e5b8c1f4a7d0e358")
  • found true
  • source ccr
  • hash d6b9e2c5f8a1d4b7e0c3f6a9d2e5b8c1f4a7d0e358
  • content <the relayed result envelope, byte-for-byte>

THE THRESHOLD DECISION

A fire-and-forget relay call: the request answers immediately with a queued reply, and the real result arrives later, POSTed to the callback URL. Two deliveries, one call - which is why the exchange below is three stages and not one stream.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · tool-relay-async-callback

XVII DIRECTIVES INJECTED Illustrative
XVII // DIRECTIVES
Illustrative INJECTED

The per-turn directive block

Directives are short behavioral .md files injected verbatim every turn, placed at the top of the injected context ahead of nudges and the recall catalog.

THE ASSEMBLY ORDER

01 THE ENVELOPE
pre_llm_call, turn 14, injected context (budget 2600 chars):
02 THE DIRECTIVES
[directives: focus | foresight]
Aphrodite directives - one primary action per turn; resolve the markers
the next action depends on; prefetch what turn 15 will need.
03 THE NUDGES AND THE RECALL CATALOG
[nudge: 3 unresolved markers from turn 13]
[recall: 2 entries match this turn's files]
04 THE DROP RULE
Sections drop bottom-up when over budget; directives and nudges never drop.

WHAT THE AGENT SEES // THE BLOCK HEADER

THE PREVIEW LINE
[directives: focus | foresight]
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

Directives are short behavioral .md files injected verbatim every turn, placed at the top of the injected context ahead of nudges and the recall catalog.

The active set starts as [focus, foresight] and can be swapped mid-session via aphrodite_directive('swap', 'explore') - no config edit.

The recall catalog is the first section sacrificed when the 2600-char flow budget is tight.

THE COMMAND

(stays raw - no retrieval call)

THE FULL OUTPUT // EVERY LINE

pre_llm_call, turn 14, injected context (budget 2600 chars):
 
[directives: focus | foresight]
Aphrodite directives - one primary action per turn; resolve the markers
the next action depends on; prefetch what turn 15 will need.
 
[nudge: 3 unresolved markers from turn 13]
[recall: 2 entries match this turn's files]
 
Sections drop bottom-up when over budget; directives and nudges never drop.

THE THRESHOLD DECISION

Not a tool result at all: short behavioural files are assembled in a fixed order and injected into the prompt every turn, ahead of nudges and the recall catalog. Sections drop bottom-up when the flow budget is tight; directives and nudges never drop.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · directive-injection

XVIII CHAIN-SPLIT COMPRESSED Illustrative
XVIII // CHAIN-SPLIT
Illustrative COMPRESSED

Chain splitting a compound command

Opt-in (chain_split=false by default, because invisible segment markers pollute redirected stdout).

THE ORIGINAL OUTPUT

4 OF 6 LINES
cd project && cargo build --release && cargo test 2>&1
Compiling app v0.1.0
Finished `release` profile target(s) in 18.03s
 

2 more lines - inspect the example for the full stream.

WHAT THE AGENT SEES // PREVIEW + MARKER

PREVIEW + MARKER
[chain:3 | cargo build --release && cargo test ...]
Original retained
cd project && cargo build --release && cargo test
[chain: segments=3]
<<<CCR:e7c0f3a6d9b2e5c8f1a4d7b0c3f6e9a2d5b8c1f479|terminal|398>>>
--- per-segment markers ---
<<<CCR:f8a1...|build_output|210>>>
<<<CCR:a9b2...|test|188>>>
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

Opt-in (chain_split=false by default, because invisible segment markers pollute redirected stdout).

With it on, a command with enough segments is rewritten so each segment's output compresses into its own marker - the model sees one build preview and one test preview instead of one blob.

Constructs that would corrupt control flow (heredocs, loops spanning segments) are left untouched.

Fragment; not in the docs catalog.

THE COMMAND

aphrodite_retrieve(hash: "e7c0f3a6d9b2e5c8f1a4d7b0c3f6e9a2d5b8c1f479")

THE FULL OUTPUT // EVERY LINE

cd project && cargo build --release && cargo test 2>&1
Compiling app v0.1.0
Finished `release` profile target(s) in 18.03s
 
running 220 tests
test result: ok. 220 passed; 0 failed; 1 ignored; 0.31s

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "e7c0f3a6d9b2e5c8f1a4d7b0c3f6e9a2d5b8c1f479")
  • found true
  • source ccr
  • hash e7c0f3a6d9b2e5c8f1a4d7b0c3f6e9a2d5b8c1f479
  • content <the full combined output, byte-for-byte>

THE THRESHOLD DECISION

Over the surface's threshold: the bytes are hashed (BLAKE3), stored, and the transcript keeps a preview line plus a marker that addresses the original. Retrieval returns the exact original bytes, so the round trip closes with nothing lost.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · chain-split

XIX THRESHOLDS COMPRESSED Illustrative
XIX // THRESHOLDS
Illustrative COMPRESSED

What stays raw vs compressed at the defaults

The tier lesson: whether a given output compresses depends on which surface sees it.

THE ORIGINAL OUTPUT

4 OF 12 LINES
Defaults in play (aphrodite.toml):
tool_threshold_token = 512 (token proxy: compress above 512 bytes)
tool_threshold_cache = 4096 (cache proxy: compress above 4096 bytes)
terminal_threshold = 1024 (terminal hook: compress above 1024 bytes)

8 more lines - inspect the example for the full stream.

WHAT THE AGENT SEES // PREVIEW + MARKER

PREVIEW + MARKER
[text:3L 50B | some unrecognizable prose here]
Original retained
<<<CCR:b0c3f6e9a2d5b8e1c4f7a0d3b6e9c2f5a8d1e4b090|text|604>>>
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

The tier lesson: whether a given output compresses depends on which surface sees it.

The token proxy is aggressive (512), the cache proxy tolerant (4096), terminal output has its own gate (1024), code gets 3x headroom, and the generic fallback preview is the only thing a text blob shows.

Essential tools (read_file, memory, skill_view...) and the aphrodite_* tools themselves are always raw regardless of size.

THE COMMAND

aphrodite_retrieve(hash: "b0c3f6e9a2d5b8e1c4f7a0d3b6e9c2f5a8d1e4b090")

THE FULL OUTPUT // EVERY LINE

Defaults in play (aphrodite.toml):
tool_threshold_token = 512 (token proxy: compress above 512 bytes)
tool_threshold_cache = 4096 (cache proxy: compress above 4096 bytes)
terminal_threshold = 1024 (terminal hook: compress above 1024 bytes)
inline_threshold = 2048 (above this, store instead of inline zlib)
code_multiplier = 3.0 (code tier: base threshold x 3)
engine_threshold_pct = 45 (context compression engages at 45% fill)
 
Same 600-byte module docstring:
- through the token proxy (512): COMPRESSED to a marker
- through the cache proxy (4096): stays RAW
- as source code (tier 512 x 3.0 = 1536): stays RAW

THE RETRIEVAL // THE CALL AND THE ANSWER

aphrodite_retrieve(hash: "b0c3f6e9a2d5b8e1c4f7a0d3b6e9c2f5a8d1e4b090")
  • found true
  • source ccr
  • hash b0c3f6e9a2d5b8e1c4f7a0d3b6e9c2f5a8d1e4b090
  • content <the full text, byte-for-byte>

THE THRESHOLD DECISION

Over the surface's threshold: the bytes are hashed (BLAKE3), stored, and the transcript keeps a preview line plus a marker that addresses the original. Retrieval returns the exact original bytes, so the round trip closes with nothing lost.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · threshold-tiers

XX THRESHOLDS PASSED THROUGH Catalog-exact
XX // THRESHOLDS
Catalog-exact PASSED THROUGH

Below threshold: raw; at threshold: marker

A one-line grep result is far under every threshold: it passes through untouched, no marker, no storage.

THE INPUT

1 OF 1 LINES
src/preview.rs:12:pub fn build_preview(content: &str, kind: Kind) -> String {

WHAT THE AGENT SEES // UNCHANGED

  • bytes identical to the input above
  • marker none - the output stays raw, no marker stored
  • store no entry

THE PREVIEW THE CLASSIFIER WOULD HAVE WRITTEN - NEVER EMITTED

[grep:4 hits in 3 files | src/preview.rs:12 ...]
INSPECT EXAMPLE full output · retrieval call and answer · threshold decision · configuration · sources

THE CLAIM // IN FULL

A one-line grep result is far under every threshold: it passes through untouched, no marker, no storage.

The same search across a large tree (the grep-search example) crosses the line and becomes a marker.

Compression is never a judgment call - it is a byte count against the surface's threshold.

THE COMMAND

(stays raw - no retrieval call)

THE FULL OUTPUT // EVERY LINE

src/preview.rs:12:pub fn build_preview(content: &str, kind: Kind) -> String {

THE THRESHOLD DECISION

Under the surface's threshold, or stopped by a skip gate: the output reaches the transcript byte-identical and nothing is stored. Compression is a byte count against a threshold, never a judgment call - which is why the preview below was computed and then never emitted.

THE CONFIGURATION IN PLAY

These are the numbers every decision on this page is made against, read from the example bank rather than typed into the markup.

  • tool_threshold_token = 512
  • tool_threshold_cache = 4096
  • terminal_threshold = 1024
  • inline_threshold = 2048
  • code_multiplier = 3
  • engine_threshold_pct = 45
  • preview_max_chars = 120

SRC: Source/Content/Showcase/Examples.json · marker-vs-skippable

HOW TO READ THESE EXAMPLES the tape colours · the one answer every retrieval gives · the read rules · what the two views hold

A teal tape marks a corpus-exact preview; a blood-red one marks a faithful fragment.

Every retrieval answers the same way:

→ { found: true, source: "ccr", content: the original bytes, byte-for-byte }

Reads are workspace-confined and capped at 10 MiB; a hash resolves only by exact match - truncated hashes never resolve.

Every entry is the same argument in a different costume: the raw output arrives line by line, the preview is computed once the last line has finished, and the marker underneath it is the address of everything the raw stream did not have to buy.

03 // THE DEFAULTS // APHRODITE.TOML

The defaults every decision reads

Every decision in the bank is a byte count compared against one of seven numbers, read from aphrodite.toml and overridable from the environment. Nothing in the gallery is a judgment call, so nothing in it needs a reader's interpretation either.

THE DEFAULTS // APHRODITE.TOML the seven numbers every decision was made against

tool_threshold_token = 512 tool_threshold_cache = 4096 terminal_threshold = 1024 inline_threshold = 2048 code_multiplier = 3 engine_threshold_pct = 45 preview_max_chars = 120

These seven numbers decide every example that precedes them.

It is the reason compression is never a judgment call: it is a byte count against the surface's threshold, and the essential tools plus the aphrodite_* tools themselves are always raw regardless of size.

04 // THE TRAVERSALS // AGENT-VIEW vs SYSTEM-PATH, STEP BY STEP

The traversals

The five pipelines are worked examples; these are the pipes they run through.

Each traversal steps through its hook or endpoint in two synchronized views - what the agent sees, what the system does - and every step carries its source anchor.

PLAY steps one run through both views, one step at a time.

TRAVERSAL A // TRANSFORM_TOOL_RESULT
THE RESULT ARRIVES 01 / 08

Step 1 of 8: THE RESULT ARRIVES.

STEP 01 / 08 THE RESULT ARRIVES hooks.md:69-75 ↗
AGENT-VIEW CONVERSATION
user: build it and show me what's wrong
» tool result: 48,213 characters arrive raw in the transcript
· at this point the agent sees the full bytes, nothing special
SYSTEM-PATH BACKEND
telemetry first: status, error type/message, arguments and duration recorded into the tool-event ring (feeds the error-loop and phase detectors)
empty results are skipped here
STEP 02 / 08 FILE REFERENCES TRACKED hooks.md:92-94 ↗
AGENT-VIEW CONVERSATION
nothing changes yet - the output is untouched
SYSTEM-PATH BACKEND
read_file and search_files results are recorded for aphrodite_files and the recall catalog BEFORE the skip gates
· they feed the catalog even when never compressed
STEP 03 / 08 THE SKIP GATES hooks.md:76-84 ↗
AGENT-VIEW CONVERSATION
essential tools stay raw:
skill_view, skills_list, skill_manage, memory,
session_search, read_file, read_terminal
SYSTEM-PATH BACKEND
gates in order: empty result; essential set; Aphrodite's own tools and headroom helpers (compressing aphrodite_retrieve would replace resolved content with another marker)
· below the tool threshold (default 4,096 chars; 0 disables the gate)
· raw stays raw when it matters
STEP 04 / 08 CLASSIFY hooks.md:85-88 ↗
AGENT-VIEW CONVERSATION
the output now has a name - and the name decides everything downstream
» [build:1E 1W 142L | error[E0432]: unresolved import ...]
SYSTEM-PATH BACKEND
the content-type detector assigns a type; generic text/log/plain results get a semantic upgrade (git status, ls, test, grep) so the preview carries high-signal shape
· preview shapes: the enriched preview catalog, docs/proxy/compression.md:228-241
STEP 05 / 08 THRESHOLD + EMA hooks.md:139-146 ↗
AGENT-VIEW CONVERSATION
invisible - the agent never tunes this by hand
SYSTEM-PATH BACKEND
the per-type threshold (EMA auto-tuned by what past turns saved) decides compress vs. pass-through
· env overrides TOML overrides the default
STEP 06 / 08 STORE CHANGELOG v1.3.2 ↗
AGENT-VIEW CONVERSATION
still just the output - but the receipt is being written
SYSTEM-PATH BACKEND
the content is hashed (BLAKE3) and stored in the inline session store
→ durable backend: SQLite at ~/.hermes/aphrodite/ccr.db (docs/install/macos-linux.md:129)
the marker's hash is the address of the original bytes, taken over the ORIGINAL, never a wrapper's extracted view (the v1.3.2 losslessness law)
STEP 07 / 08 THE SWAP hooks.md:89-91 ↗
AGENT-VIEW CONVERSATION
the tool output is now a preview line plus a marker - roughly fifteen tokens
» [build:1E 1W 142L | error[E0432]: unresolved import ...]
» <<<CCR:abc12345|build_error|48213>>>
· the 48,213 characters are gone from the transcript - retrievable by hash
SYSTEM-PATH BACKEND
Hermes swaps the tool output for the marker; the transcript carries hash, type, size instead of the bytes
the third field is the UTF-8 byte count of the bytes the hash addresses - 48,213 here, the same number as the character count because a compiler log is ASCII, and the same number a retrieval puts back
the hash is a BLAKE3 digest, so the marker carries at least its first eight hex digits; a shorter one is a display truncation and would not resolve
STEP 08 / 08 DECIDE / RETRIEVE retrieve.md ↗
AGENT-VIEW CONVERSATION
the agent - not the engine - spends the budget: call aphrodite_retrieve only if the preview did not answer the question
» aphrodite_retrieve(hash: "abc12345...")
→ { found: true, source: "ccr", content: the original bytes, truncated: false }
SYSTEM-PATH BACKEND
retrieval returns the exact original bytes, byte-exact by construction; the loop closes with nothing lost
→ no zstd on this path; backends store and return content verbatim as UTF-8 strings, so a trailing newline survives (retrieve.md:184-212)
TRAVERSAL B // TRANSFORM_TERMINAL_OUTPUT
THE OUTPUT ARRIVES 01 / 05

Step 1 of 5: THE OUTPUT ARRIVES.

STEP 01 / 05 THE OUTPUT ARRIVES hooks.md:98-101 ↗
AGENT-VIEW CONVERSATION
user: run the tests again
» the terminal's stdout and its exit code arrive as one blob
· short output would stay right here, verbatim
SYSTEM-PATH BACKEND
telemetry: the command and return code are recorded; a non-zero exit code marks the event as a failure and feeds the error-loop detector
STEP 02 / 05 CHAIN SPLIT FIRST hooks.md:102-106 ↗
AGENT-VIEW CONVERSATION
if pre_tool_call marked the segments, each one is about to get its own receipt
» cd x && cargo build && cargo test → three compact previews, not one blob
SYSTEM-PATH BACKEND
when chain splitting is enabled and the output carries the segment markers, each segment is compressed into its own marker - unconditional, BEFORE the threshold gate, so marked output never leaks raw. Per-segment error hints merge into previews
STEP 03 / 05 THE THRESHOLD GATE hooks.md:107-108 ↗
AGENT-VIEW CONVERSATION
short output stays exactly as it was
SYSTEM-PATH BACKEND
unmarked output below the terminal threshold (default 1,024 characters; 0 disables the gate) passes through untouched
STEP 04 / 05 CLASSIFY hooks.md:109-111 ↗
AGENT-VIEW CONVERSATION
a failed run is named terminal - the type keeps errors visible longest
» [terminal:29L exit code: 101]
· the exit code reads 101, not 0: this is the failing run the traversal follows, and the summary line reports the failure the type was chosen for
SYSTEM-PATH BACKEND
output containing 'exit code:' or 'Error:' is typed terminal; other output gets the normal content-type detection with the same semantic upgrade as tool results
STEP 05 / 05 STORE + THE NUDGE LOOP hooks.md:111-112,114-121 ↗
AGENT-VIEW CONVERSATION
next turn opens with a nudge, not a surprise
» <<<CCR:3f9a2c7e|terminal|1683>>>
→ a poll-worker status nudge for the failed task surfaces at the next pre_llm_call
SYSTEM-PATH BACKEND
above-threshold content is hashed, stored (inline session store, backed by the durable ~/.hermes/aphrodite/ccr.db), and replaced by a marker
the failure recorded in step 1 surfaces as a poll-worker status nudge at the next pre_llm_call
TRAVERSAL C // THE RETRIEVAL ROUND-TRIP
THE CALL 01 / 04

Step 1 of 4: THE CALL.

STEP 01 / 04 THE CALL retrieve.md:41-43 ↗
AGENT-VIEW CONVERSATION
the agent hands back the marker it kept - or just the hash
» aphrodite_retrieve(hash: "abc12345...")
· truncated hashes never resolve - exact match only
SYSTEM-PATH BACKEND
the hash argument is normalized before lookup: a type/size marker-body suffix and surrounding whitespace are stripped, so a hash echoed back in full marker form still resolves
→ normalize_hash - strip |type|size suffix, trim (POST /retrieve with hash, query?, offset?, limit?)
STEP 02 / 04 LOOKUP retrieve.md:196-212 ↗
AGENT-VIEW CONVERSATION
one answer either way: found or not
→ { found: true, source: "ccr", content: "original content...", truncated: false }
SYSTEM-PATH BACKEND
the inline session store is checked first (inline_ccr.get); on a miss, ccr_get on the CCR backend (SQLite/In-memory via a blocking thread)
→ durable backend: SQLite at ~/.hermes/aphrodite/ccr.db (docs/install/macos-linux.md:129)
the success path always reports source 'ccr' regardless of which store served the content
STEP 03 / 04 PAGINATION retrieve.md:184-192 ↗
AGENT-VIEW CONVERSATION
a window, or the whole thing
→ [lines 101-200/1421] header + truncated: true
limit: 0 asks for the FULL document with no cap - the round-trip contract
SYSTEM-PATH BACKEND
any explicit limit, including one above 10,000, is clamped to a 10,000-line server cap; a windowed result carries a lines a-b/total header and truncated: true, so a caller can tell truncated from genuinely short
STEP 04 / 04 BYTE-EXACT retrieve.md:184-188 ↗
AGENT-VIEW CONVERSATION
the original bytes return unchanged - a trailing newline included
→ the body hashes back to the marker's own hash
SYSTEM-PATH BACKEND
a full-document retrieval returns the exact original bytes: the lossy lines/join round-trip is skipped entirely
→ no zstd on this path: backends store and return content verbatim as UTF-8 strings, so retrieval is byte-exact by construction
TRAVERSAL G // THE PROXY LANE
POST /V1/CHAT/COMPLETIONS 01 / 06

Step 1 of 6: POST /V1/CHAT/COMPLETIONS.

STEP 01 / 06 POST /V1/CHAT/COMPLETIONS 02-chat-compression.md ↗
AGENT-VIEW CONVERSATION
an ordinary OpenAI-compatible client - no Aphrodite plugin required
» POST /v1/chat/completions (headers + body)
· a cache hit answers early with X-Aphrodite-Cache: HIT
SYSTEM-PATH BACKEND
the request cache is checked first (cache_key_from_body; skipped when stream is true) - a hit returns early with X-Aphrodite-Cache: HIT
STEP 02 / 06 UPSTREAM 02-chat-compression.md ↗
AGENT-VIEW CONVERSATION
the request is forwarded unchanged
· the response comes back with headers and body
SYSTEM-PATH BACKEND
forwarded with at most 3 connection retries
STEP 03 / 06 SSE BYPASS 02-chat-compression.md ↗
AGENT-VIEW CONVERSATION
a streaming answer streams, untouched
· no compression on the SSE path - long-running streams are never killed mid-answer
SYSTEM-PATH BACKEND
a text/event-stream content-type passes through as a raw stream - NO compression on the SSE path
STEP 04 / 06 COMPRESS EACH MESSAGE.CONTENT 02-chat-compression.md ↗
AGENT-VIEW CONVERSATION
large assistant/tool text comes back as preview + marker
» [code:3fns|2structs fn main() 414L]
» <<<CCR:hash|type|size>>>
SYSTEM-PATH BACKEND
each choice.message.content (string) is classified, its threshold is threshold_for(type).max(base) scaled by the x-headroom-budget multiplier (clamped 0.50..1.0); over-threshold content is BLAKE3-hashed, deduped via ccr_get, stored, and swapped for the marker; the ratio feeds the EMA
STEP 05 / 06 TOOL_CALLS NEVER CHANGELOG v1.3.2 ↗
AGENT-VIEW CONVERSATION
the client's tool calls keep working - always
· tool_calls[].function.arguments arrives exactly as the client sent it
SYSTEM-PATH BACKEND
the loop reads message.content only: tool_calls[].function.arguments is client-executable JSON, not model-facing prose, and is never compressed. The v1.3.2 fix - before it, every OpenAI-tools client broke through the proxy
STEP 06 / 06 TWO PIPELINES, SHARED WIRES 02-chat-compression.md ↗
AGENT-VIEW CONVERSATION
same marker format, whichever lane compressed it
» <<<CCR:hash|type|size>>> resolves the same way on both lanes
SYSTEM-PATH BACKEND
the proxy path never calls the staged transform pipeline (transforms::detect, stage2, struct_extract) - those run only on the Hermes hook path
→ the two pipelines share the BLAKE3 compute_key and the marker wire format, but nothing else
TRAVERSAL H // THE CHAIN SPLIT
THE PENDING CALL 01 / 04

Step 1 of 4: THE PENDING CALL.

STEP 01 / 04 THE PENDING CALL hooks.md:59-65 ↗
AGENT-VIEW CONVERSATION
the agent asks for one compound command: cd x && cargo build && cargo test
· the transcript shows the call exactly as it was sent
SYSTEM-PATH BACKEND
pre_tool_call fires before the tool executes and may rewrite the pending call
STEP 02 / 04 FEATURE CHECK hooks.md:63-65 ↗
AGENT-VIEW CONVERSATION
off by default - opt-in only
· APHRODITE_CHAIN_SPLIT=1 or chain_split = true
SYSTEM-PATH BACKEND
chain splitting is enabled by APHRODITE_CHAIN_SPLIT=1 or chain_split = true (default off), and only when the command has at least chain_split_min_segments segments
STEP 03 / 04 THE REWRITE hooks.md:63-64 ↗
AGENT-VIEW CONVERSATION
the command looks the same - the markers are invisible
» the executed command carries segment markers the transcript never renders
SYSTEM-PATH BACKEND
pre_tool_call rewrites the chained command with invisible segment markers; the rewrite is what lets the output be split later
STEP 04 / 04 PER-SEGMENT MARKERS hooks.md:102-106 ↗
AGENT-VIEW CONVERSATION
several compact previews instead of one large blob
» [terminal:14L exit code: 0]
» <<<CCR:hash|type|size>>> (one per segment)
SYSTEM-PATH BACKEND
transform_terminal_output compresses each segment into its own CCR marker, unconditionally and before the threshold gate; per-segment error hints merge into the previews
THE CONTEXT ENGINE // WHAT IT DOES NOT DO

Compress returns the transcript unchanged

The registered engine is opt-in ( APHRODITE_CONTEXT_ENGINE=1 ; the TOML key defaults true) and requires Hermes >= 0.20.2 - the first release with pre_tool_call modify.

What it does: records token usage from each response.

What it never does: should_compress always returns false (it defers to Hermes' own accounting), and compress returns the transcript unchanged - non-destructive, because the transform hooks already shrank the tool output.

It never forces a compaction, never rewrites messages, and never touches the inline store.

SRC: docs/plugin/context-engine.md:38-48
THE PREFETCH REFUSAL // v1.6.6

Some paths are never read

aphrodite_prefetch would happily warm the store from any path - so the guard names the paths that must never be read and refuses them outright:

WHAT THE AGENT ASKS FOR THE REQUEST
.env
auth.json
~/.ssh
the Hermes home
any non-file path
WHAT THE SYSTEM RETURNS THE ANSWER
ReadOutcome::Refused
refuse_reason: "..."

the file is not opened, not hashed,
not stored - the prefetch returns
a refusal instead of the content

The same release hardened setup the same way: the Hermes-home plugin directory is report-only - no symlink removal, no writes, no deletes - and the dylib arm refuses installs when the in-tree checksums are missing.

SRC: CHANGELOG.md:3-37 (v1.6.6) · the Aphrodite/v1.6.6 release note

05 // GO DEEPER // THE SURFACES THESE EXAMPLES EXERCISE

Where each mechanism lives

GO DEEPER