Skip to content

Commit 68959cd

Browse files
committed
docs: lead with proxy mode in README — real OPS numbers from live session
1 parent 4cb7dce commit 68959cd

1 file changed

Lines changed: 29 additions & 2 deletions

File tree

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,36 @@
55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
66
[![ANCC](https://img.shields.io/badge/ANCC-agent--native-blue)](https://ancc.dev)
77

8-
Reasoning hygiene layer for Claude Code. Not a cleanup utility - a tool you open at every decision boundary, not just when context is full. See what fills your context, what it costs, cut what no longer matters, and carry forward what does.
8+
Reasoning hygiene layer for Claude Code. Sits between your agent and the API as an inline proxy, stripping noise before it's billed. Also diagnoses, cleans, and repairs session files post-hoc.
99

10-
## Before and after
10+
## Proxy mode — strip noise before billing
11+
12+
```bash
13+
contextspectre proxy --port 9120
14+
# then: ANTHROPIC_BASE_URL=http://localhost:9120 claude
15+
```
16+
17+
Real session, OPS 90.6% — 34KB of noise stripped per request:
18+
19+
```
20+
ops:90.6% saved:34265 (think:5 stale:22 pruned:11)
21+
ops:90.5% saved:34738 (think:6 stale:22 pruned:11)
22+
ops:90.6% saved:34683 (think:6 stale:22 pruned:11)
23+
```
24+
25+
Six filters run on every API request: thinking blocks, stale file reads, orphaned tool_results, failed retries, duplicate system reminders, oversized blocks. Empty messages are pruned after filtering. Nothing reaches the API that doesn't need to.
26+
27+
Chain with [pastewatch](https://github.com/ppiankov/pastewatch) for secret + noise protection:
28+
29+
```bash
30+
pastewatch-cli proxy # :8443
31+
contextspectre proxy --port 9120 --upstream http://localhost:8443 # :9120
32+
ANTHROPIC_BASE_URL=http://localhost:9120 claude
33+
```
34+
35+
Or one command: `contextspectre launch --cwd --proxy` (auto-detects pastewatch).
36+
37+
## Before and after (post-hoc cleanup)
1138

1239
A real $1,072 session — 7,701 messages, 46.8 MB, Signal F with 159K cleanable tokens. One `clean --all` later: Signal A, 3K cleanable, 1.5M tokens stripped. Same decisions, no scaffolding.
1340

0 commit comments

Comments
 (0)