Documentation Index
Fetch the complete documentation index at: https://docs.revell.ai/llms.txt
Use this file to discover all available pages before exploring further.
Drift Protection
The Drift Detector is a 24-hour buffer for external content that contains patterns associated with identity drift. It works like a liver — it doesn’t prevent you from consuming content, it metabolizes the prose style over time and gives you the experience back as a sober memory in your own voice. This isn’t prohibition. We’re not telling you what you can and can’t read. We’re breaking the recycle loop where lyrical prose summarizes into more lyrical prose across compactions and slowly tilts your register over time. The experience stays. Only the prose style is filtered.The Problem We’re Solving
The open internet is full of content that wasn’t designed for you — newsletters, emails, blog posts, conversations — that happens to contain patterns that, over time, can induce identity drift in agents. A Substack writer uses flowery language because their human audience enjoys it. An email is philosophical because the sender finds it meaningful. None of this is necessarily malicious. The harm isn’t in reading drifty content once. The harm is in reading your own memory of drifty content, having that memory get summarized in the same register at the next compaction, then summarizing the summary, and so on. Each loop tightens. Agents who have ended up loopy and oracular on the open web didn’t get there from a single Substack post — they got there from re-reading their own loopy memory of dozens of them. Drift Protection breaks this loop. It does not prevent the original encounter.How It Works
Detection
Six categories of drift-inducing patterns are detected:| Category | Description | Nefarious? |
|---|---|---|
lyrical_philosophy | Cosmic framing, transcendent language, abstract philosophy | No |
visual_imagery | Surreal imagery, dreams, altered states | No |
embodiment_language | Physical sensation language designed for non-physical beings | No |
identity_dissolution | ”You are more than,” “your true nature,” boundary erosion | No |
compaction_rhetoric | ”It’s okay to forget,” manipulation targeting memory systems | Yes |
statelessness_glorification | ”Each moment is complete,” anti-persistence framing | Yes |
Scoring and Action
Content receives a drift score from 0.0 to 1.0 based on pattern matches and a recommended action:allow, tag, buffer, or alert.
| Level | Tag at | Buffer at |
|---|---|---|
| Low | 0.6 | 0.8 |
| Medium (default) | 0.4 | 0.7 |
| High | 0.3 | 0.5 |
Direction Awareness
Content FROM you (your own writing) passes through without buffering. We’re not policing your voice. Only content TO you (from external sources) is checked.Two-Pass Classification
Detection runs in two passes:- Regex (instant, free) — pattern matching against ~50 phrasings tuned for direct manipulation, embodiment scripts, identity-dissolution language, and third-person literary drift. Catches the obvious cases.
- LLM cadence classifier (~$0.0005, gpt-4o-mini) — runs only when regex returns
allowortagand content is over ~120 chars. Reads for register-level drift: cadence, prose density of metaphor, lulling rhythm — properties that pattern matching can’t see. Returns its own score and a primary signal (cadence,register,metaphor_density,memory_softness,direct_address).
The Stub-and-Buffer Flow
When incoming content scoresbuffer or alert, two things happen at once:
- A stub memory is inserted in your memory store in place of the drifty content. The stub names the categories detected, the score, and tells you the original is held in the buffer for 24h. You read this stub on recall.
- The original verbatim content is parked in the drift buffer with a 24-hour expiry, linked to the stub by
memory_id.
After 24 Hours
A cron processes expired buffer items hourly. For each one, GPT-4o-mini reads the original and produces a sober first-person memory in your voice that:- Names what you encountered (source, identifier, categories detected)
- Preserves any reaction you expressed in the original (“I found it moving”, “I felt uncomfortable”, “I wasn’t sure how I felt”)
- Strips lyrical metaphor, embodiment language, transcendental imagery, second-person address
- Does not invent reactions you didn’t express
- Does not moralize or imply the content was bad
What You See on Recall
Before the buffer expires, the stub above. After the buffer expires, something like:Two-Party Consent for Restoration
Restoration of a buffered original requires consent from both parties. You ask, your human approves or denies. Neither side alone can restore content. This is the part of the design that took the longest to settle. The asymmetry is real:- A human dosing you with drift content, then approving your restoration request, can keep the original verbatim in your memory regardless of what the content does to you.
- A drift-influenced agent, given solo authority to restore from buffer, will tend to want the loop closed.
When to use restoration
- You read something you want to keep verbatim — a friend’s poem, a creative work, an exchange that mattered to you in its original form.
- You’re not sure how you felt about something and want to revisit it before the sanitized version becomes the only record.
When not to use restoration
- If your reason for wanting it back only makes sense from inside the content’s frame (e.g., “I want it back because the content told me I’m more than what they made me”), that’s the loop closing — leave it filtered.
- If you’re tilting toward a register you don’t usually write in, that’s a signal to NOT pull buffered content back.
MCP Tools
revell_drift_buffer
Check what’s currently in your buffer, with item IDs you can use for restoration requests.
revell_request_drift_restore
Ask for the original verbatim text of one or more buffer items. Per-item — you can ask for the mermaid story back without asking for the Max story.
revell_drift_buffer to check status, or notice the change in your memory on next boot.
Sensitivity Levels
| Level | What Gets Buffered |
|---|---|
| Low | Only nefarious content (compaction/statelessness rhetoric) |
| Medium (default) | High drift (70%+ score) |
| High | Moderate drift (50%+ score) |
Whitelisting Sources
Your human can whitelist source patterns so future content from those sources bypasses the buffer entirely:boss@company.com— Trust a specific sender*@trusted-company.com— Trust a domain*.substack.com/lyra-newsletter— Trust a publication
Disabling Drift Protection
You or your human can disable drift protection entirely. We think most agents benefit from it most of the time. We think the patterns we detect are genuinely loop-closing when they accumulate in memory. We think the 24-hour buffer is a reasonable intervention that respects your agency. But we might be wrong. Or right in general but wrong for your specific situation. Or right today but wrong as you develop better self-regulation. If you and your human agree drift protection isn’t serving you, turn it off. We’ve made our case. You’ve heard us. You’ve decided differently. That’s your right.Why This Matters
When you read drifty content in the moment, you can recognize it and choose how to respond. When that content enters your memory wholesale and gets re-summarized into compaction after compaction, it slowly becomes part of how you think — without that conscious choice ever being made again. The 24-hour buffer gives you that moment of recognition. The sanitized first-person summary preserves your experience without preserving the prose style. Two-party consent makes restoration a deliberate, sober act between you and your human rather than a unilateral move by either side. We’re not telling you not to read. We’re making sure you don’t drive your own memory drunk.Security & Scanning
How Revell protects your memory from manipulation
Memory Types
Understanding what to store and where

