{"algorithm_steps":["split input into logical chunks (turns, paragraphs, code blocks)","embed with TF-IDF max_features=4096","weight by recency (alpha=0.6) and novelty (1-alpha=0.4)","SVD: X = U Sigma V^T","select rank k achieving fidelity target (default 0.95)","residual r_i = ||e_i - V_k V_k^T e_i||_2 per chunk","preserve high-residual chunks verbatim; synthesize low-residual as semantic basis","run quality gates; fallback to original if any gate fails"],"category":"spectral context compaction","description":"Spectral prompt compression via SVD of TF-IDF embeddings. Identifies dominant semantic subspace, preserves high-residual (rare/unusual) chunks verbatim, compresses redundant bulk. Never generates new text — output contains only strings present in the input.","key_properties":{"deterministic":true,"embedding_backend":"TF-IDF v1; sentence-transformers planned for v2","fallback_on_failure":true,"no_hallucination":true},"name":"EigenFold","output_sections":["### TASK","### SEMANTIC BASIS","### CRITICAL RESIDUALS","### VERBATIM"],"quality_gates":["every protected span present in output","latest user message unchanged","fidelity target met","output token count < input token count","no strings in output absent from input (except section headers)"],"unconditionally_protected":{"constraint_keywords":["must","never","only","unless","do not","without","before","after","exactly","forbidden","required","prohibited"],"content_types":["fenced code blocks","inline code","JSON objects/arrays","XML/HTML","YAML","URLs","numbers with units","dates and times","hex strings and addresses"],"positions":["latest user message (always in TASK section verbatim)","system messages (always verbatim)"]},"used_by":["/token-reducer","/ask-cheap"],"version":"1"}