Why do 99% of AI writing and RPG tools get slower, dumber, and more expensive the longer your project gets?

Because they are built as append-only chat wrappers.

By Turn 100 of a novel or game script, a standard chat wrapper is re-sending 100 turns of raw conversation history (50,000+ tokens) on every single API call. That causes three fatal engineering failures:

  1. Attention Dilution ("Lost in the Middle"): The LLM forgets physical inventory transfers from Turn 12 while hallucinating details from Turn 84.
  2. Omniscient Context Bleed: Every character sees the entire shared transcript.
  3. Runaway API Bills.

When I architected SIGHTLINE™ PRO (Build 2026.11), I threw out the chat paradigm entirely and built a Flat-Token Markov State Machine in pure Python 3.11 + native OS WebViews (Microsoft Edge WebView2 on Windows / Apple WKWebView on macOS).

Here is how the engine slashes token consumption by 85–95% while keeping 100-turn book-scale continuity razor-sharp:

1. Constant-Size Markov State Snapshots (~700 Tokens): Instead of re-sending 100 turns of chat history, SIGHTLINE™ compiles each turn into a self-contained markdown state card (Run_XXX_BranchA.md). On Turn 100, each isolated character agent only receives the single current state snapshot (~700 tokens). Turn 100 costs the exact same input tokens as Turn 1.

2. Deterministic O(n+m+z) Aho-Corasick World Bible (<5ms, 0 LLM): Instead of slow vector RAG that pulls irrelevant chunks, World_Bible.md uses a pure-Python Aho-Corasick trie-with-failure-links automaton. It scans your Scene Nudge and active state across thousands of lore keywords in <5 milliseconds, supports 1-hop recursive triggers, sorts by priority, and enforces a hard 600-token budget gate.

3. CoALA 3-Tier Episodic Memory & Hades Salience Queue: When a character’s Private Knowledge grows past 4 clauses, older clauses are deterministically compacted into Episodic_Archive.json as [Closed Paths/Constraints] (so characters never repeat failed plans) and rehydrated only when their exact keywords or Supergiant (Hades) Salience Priority Score trigger.

4. The 0-Token Dormant Green Room (💤) & Asymmetric Routing: Off-screen characters sit in the Dormant Green Room (💤), consuming 0 LLM calls and 0 tokens, while still receiving surgical +💤Δ ripple updates if loud events happen near their location. Pair a fast, pennies-per-million model (Groq / Qwen / Local Ollama) for Character Agents with a reasoning model for the Continuity Auditor.

5. 20+ Deterministic 0-LLM Studio Tools (0.0s Latency): Inline God-mode state edits (@patch), 3-way timeline merges (@craft_merge), 2D visual/acoustic raycasting, Chekhov’s Gun & Sanderson MICE linting, Stuart Turton micro-chronology timetables, and lexical Voice Cadence meters all run in pure deterministic Python at $0.00 token cost.

We also verified the entire build against a 9/9 Defensive QA & 100-Turn (301-Card) Stress Suite (9.55s total compile time), PyCQA Bandit (0 High-Severity Issues), and isolated OS-profile API key storage (~/.sightline_secret_key.json so exported project .zip files never leak keys).

👉 Explore the full architecture, interactive Sherlock Holmes live demo, and 7-Day Free Trial (Windows & Mac): Sightline [https://nikhil2bhardwaj.github.io/sightline/]

(Use code JATAK for 40% OFF Lifetime Ownership—zero subscriptions).

Want to inspect the live JSON state structure and Aho-Corasick World Bible in action?
Click "▤ World Bible", "◈ CoALA Episodic Archive", or "≡ Raw .md" directly inside our browser-embedded Sherlock Holmes Time-Capsule (no download required): Demo [https://nikhil2bhardwaj.github.io/sightline/Sherlock_Holmes_Flowchart.html]