Memory & Long-Context

March 6, 2026 · View on GitHub

🏥 Quick Return to Emergency Room

You are in a specialist desk.
For full triage and doctors on duty, return here:

Think of this page as a sub-room.
If you want full consultation and prescriptions, go back to the Emergency Room lobby.

Stabilize long windows and multi-session memory.
This map helps you repair drift, collapse, forks, and ghost contexts when conversations or documents stretch far beyond the usual size.


What this page is

  • A beginner-friendly checklist for long contexts and multi-day sessions.
  • Copy-paste guardrails that stop drift and collapse before they spread.
  • Concrete metrics with ΔS and λ_observe so you know if your system is stable.

When to use

  • Dialog grows past 50k–100k tokens and answers degrade.
  • Facts flip after tab refresh or model switch.
  • Citations look right but reasoning goes flat or chaotic.
  • OCR transcripts look fine but capitalization or spacing drift.
  • Multi-day support threads lose task state or rewrite history.

Orientation: quick routes

PageWhat it solvesTypical symptom
memory-coherence.mdMemory fences & continuityThreads repeat or contradict
entropy-collapse.mdAttention melt in long windowsOutputs drift into filler
context-drift.mdLong reasoning driftCorrect early, wrong later
pattern_memory_desync.mdCross-tab & cache hazardsState flips after refresh
ghost-context.mdStale buffers & residueModel recalls “phantom” text
state-fork.mdDivergent memory forksSame task_id, different answers
ocr-parsing-checklist.md, ocr-jitter.mdOCR-specific noiseExported text drifts vs. original
retrieval-traceability.md, data-contracts.mdTraceability & auditCitations break or vanish
chunking-checklist.mdChunk stability at joinsMid-sentence cuts or overlaps

Acceptance targets

  • Retrieval coverage ≥ 0.70 to the intended section
  • ΔS(question, retrieved) ≤ 0.45 and joins ≤ 0.50
  • λ_observe remains convergent across 3 paraphrases
  • No state fork across tabs or agents for the same task_id

60-second fix checklist

  1. Lock metrics — same analyzer & embeddings across sessions.
  2. Enforce memory fences — require task_id, session_id, and snippet_id.
  3. Probe ΔS and λ — run 3 paraphrases × 2 seeds.
  4. Patch drift — realign chunks, re-check OCR, drop ghost spans.
  5. Audit consistency — run traceability logs and verify continuity across restarts.

🔗 Quick-Start Downloads (60 sec)

ToolLink3-Step Setup
WFGY 1.0 PDFEngine Paper1️⃣ Download · 2️⃣ Upload · 3️⃣ Ask “Answer using WFGY +
TXT OS (plain-text OS)TXTOS.txt1️⃣ Download · 2️⃣ Paste into any LLM chat · 3️⃣ Type “hello world” — OS boots instantly

Explore More

LayerPageWhat it’s for
⭐ ProofWFGY Recognition MapExternal citations, integrations, and ecosystem proof
⚙️ EngineWFGY 1.0Original PDF tension engine and early logic sketch (legacy reference)
⚙️ EngineWFGY 2.0Production tension kernel for RAG and agent systems
⚙️ EngineWFGY 3.0TXT based Singularity tension engine (131 S class set)
🗺️ MapProblem Map 1.0Flagship 16 problem RAG failure taxonomy and fix map
🗺️ MapProblem Map 2.0Global Debug Card for RAG and agent pipeline diagnosis
🗺️ MapProblem Map 3.0Global AI troubleshooting atlas and failure pattern map
🧰 AppTXT OS.txt semantic OS with fast bootstrap
🧰 AppBlah Blah BlahAbstract and paradox Q&A built on TXT OS
🧰 AppBlur Blur BlurText to image generation with semantic control
🏡 OnboardingStarter VillageGuided entry point for new users

If this repository helped, starring it improves discovery so more builders can find the docs and tools.
GitHub Repo stars