Substrate-based context compaction for Claude Code. Inspectable signal weights, local-only, MCP-ready. Alternative to /compact + hook-based capture (claude-mem, etc.).
Drift inferred · capture-to-capture
No drift recorded — single capability capture; advisories appear once its surface changes.
transport stdio · http counts 3 tools · 0 res
· 0 prompts
permission surface via code analysis
tools
-
compact_session
-
search_pairs
-
substrate_info
prompt-surface
shipped agent-instruction files + hidden-content / dangerous-code findings —
quoted from the analyzed source
analyzed commit 96328ee · analyzer v30 · 4d ago
skills & prompt files 1
- agent-rules zzallirog-weighted-compact-96328ee/CLAUDE.md
danger signals1
- dynamic code execution eval()/exec() zzallirog-weighted-compact-96328ee/weighted_compact/tool.py :1094
<div class="r-k" data-i18n="cheat.recon.eval.label">Run eval (bottom)</div>
evidence-backed
findings quoted directly from the published source artifact — not inferred
code files: 61
filesystem 27
- fs (weak) zzallirog-weighted-compact-96328ee/scripts/sonnet_rejudge.py :286
with open(args.input, encoding='utf-8') as f: - fs (weak) zzallirog-weighted-compact-96328ee/tests/test_baselines.py :65
with open(config.pairs_path(), "w", encoding="utf-8") as f: - fs (weak) zzallirog-weighted-compact-96328ee/tests/test_extract_pairs.py :55
with open(pairs_path) as f: - fs (weak) zzallirog-weighted-compact-96328ee/tests/test_schema_extraction.py :16
from pathlib import Path - fs zzallirog-weighted-compact-96328ee/weighted_compact/auto_label.py :196
with open(LABELS_FILE) as f: - fs zzallirog-weighted-compact-96328ee/weighted_compact/build_queue.py :24
with open(path) as f: - fs zzallirog-weighted-compact-96328ee/weighted_compact/cli.py :25
from pathlib import Path - fs zzallirog-weighted-compact-96328ee/weighted_compact/config.py :27
from pathlib import Path - fs zzallirog-weighted-compact-96328ee/weighted_compact/density_features.py :57
with open(PAIRS, encoding='utf-8') as f: - fs zzallirog-weighted-compact-96328ee/weighted_compact/eval.py :45
with open(p) as f: - fs zzallirog-weighted-compact-96328ee/weighted_compact/extract_pairs.py :94
with open(path, encoding="utf-8", errors="replace") as f: - fs zzallirog-weighted-compact-96328ee/weighted_compact/feature_extract.py :61
with open(path, encoding="utf-8", errors="replace") as f: - fs zzallirog-weighted-compact-96328ee/weighted_compact/importance.py :133
with open(LABELS, encoding='utf-8') as f: - fs zzallirog-weighted-compact-96328ee/weighted_compact/label_pairs.py :56
with open(PAIRS) as f: - fs zzallirog-weighted-compact-96328ee/weighted_compact/metrics.py :19
from pathlib import Path - fs zzallirog-weighted-compact-96328ee/weighted_compact/recap.py :39
from pathlib import Path - fs zzallirog-weighted-compact-96328ee/weighted_compact/recon_qa/context.py :16
from pathlib import Path - fs zzallirog-weighted-compact-96328ee/weighted_compact/recon_qa/fidelity.py :112
with open(RECON_SET, encoding='utf-8') as f: - fs zzallirog-weighted-compact-96328ee/weighted_compact/rem_decay.py :37
from pathlib import Path - fs zzallirog-weighted-compact-96328ee/weighted_compact/schema_extraction/bank_builder.py :16
from pathlib import Path - fs zzallirog-weighted-compact-96328ee/weighted_compact/schema_extraction/episode_boundary.py :33
from pathlib import Path - fs zzallirog-weighted-compact-96328ee/weighted_compact/schema_extraction/pipeline.py :13
from pathlib import Path - fs zzallirog-weighted-compact-96328ee/weighted_compact/schema_extraction/report.py :12
from pathlib import Path - fs zzallirog-weighted-compact-96328ee/weighted_compact/span_features.py :46
with open(ANNOTATIONS, encoding='utf-8') as f: - fs zzallirog-weighted-compact-96328ee/weighted_compact/tool.py :33
from pathlib import Path - fs zzallirog-weighted-compact-96328ee/weighted_compact/topic_segments.py :97
with open(PAIRS, encoding='utf-8') as f: - fs zzallirog-weighted-compact-96328ee/weighted_compact/train.py :200
with open(BOOTSTRAP_LOG, 'w') as f:
shell / exec 1
- shell (weak) zzallirog-weighted-compact-96328ee/tests/test_extract_pairs.py :13
import subprocess
network 6
- net (weak) zzallirog-weighted-compact-96328ee/scripts/sonnet_rejudge.py :35
import urllib.error - net zzallirog-weighted-compact-96328ee/weighted_compact/cli.py :24
import socket - net zzallirog-weighted-compact-96328ee/weighted_compact/recon_qa/_constants.py :54
"""Lazy-import requests so consumers of recon_qa don't pay for it at import.""" - net zzallirog-weighted-compact-96328ee/weighted_compact/recon_qa/fidelity.py :26
from urllib.parse import urlparse, urlunparse - net zzallirog-weighted-compact-96328ee/weighted_compact/schema_extraction/pipeline.py :12
import urllib.error - net zzallirog-weighted-compact-96328ee/weighted_compact/schema_extraction/synthesizer.py :11
import urllib.request
secrets 2
- secrets (weak) zzallirog-weighted-compact-96328ee/scripts/sonnet_rejudge.py :280
api_key = os.environ.get('OPENROUTER_API_KEY') - secrets zzallirog-weighted-compact-96328ee/weighted_compact/baselines/compact_simulator.py :88
api_key = os.environ.get('ANTHROPIC_API_KEY')
tool registrations 3
- search_pairs zzallirog-weighted-compact-96328ee/weighted_compact/mcp_server.py :312
- compact_session zzallirog-weighted-compact-96328ee/weighted_compact/mcp_server.py :347
- substrate_info zzallirog-weighted-compact-96328ee/weighted_compact/mcp_server.py :431
declared dependencies 14
- mcp@>=1.0.0
- fastapi@>=0.115
- uvicorn@>=0.32
- pydantic@>=2.9
- numpy@>=1.26
- click@>=8.1
- pyyaml@>=6.0
- scikit-learn@>=1.5
- sentence-transformers@>=3.0
- rank-bm25@>=0.2.2
- anthropic@>=0.40
- pytest@>=8.3
- ruff@>=0.7
- httpx@>=0.27