-
Notifications
You must be signed in to change notification settings - Fork 1
Drift Detection
Drift is when slipstream's mental model of the project disagrees with the project on disk. It is silent by default (Claude will happily call sp_symbol against a stale map and get a wrong-looking answer) and it is the source of a long tail of weird debugging. Drift detection makes it loud.
slipstream flags four kinds of drift:
-
Map drift. The on-disk
map.jsonis older than the most recently modified source file in the project. The map has not been rebuilt since the last edit. - Symbol drift. A symbol that the current map exports has changed shape (signature, kind or location) since the last PreCompact digest captured it. The agent may be acting on a stale memory of the surface.
- Memory drift. An observation references a file path or symbol that no longer exists. A rename or delete left the memory pointing nowhere.
-
Budget drift.
actualTokensinbudget.jsondiffers from the live transcript reading by more than 15 %. The gauge and the truth disagree.
On session start the SessionStart hook (in Claude Code) and the MCP server's connect handler (everywhere else) run the four drift checks and write any findings to the observation store with a drift: tag. The dashboard shows a banner with the count; the statusline gains a drift N segment when N > 0.
Drift does not block work. It is a notice, not an error.
Use sp_observations with a filter:
sp_observations({ tag: "drift" })
Each finding is a single observation with shape:
kind: drift
subtype: map | symbol | memory | budget
detail: human-readable description
refs: [ { file, symbol?, observationId? } ]
firstSeen: ISO timestamp
lastSeen: ISO timestamp
For the deeper version with the path back to the offending observation, the slash command in Claude Code is /slipstream:drift, which renders a table.
Two ways:
-
Resolve the cause. Rebuild the map (
/slipstream:map), rename the missing reference, or paste an updatedactualTokens. The next drift check will not re-flag a finding whose underlying condition is gone. -
Suppress the rule. Add an entry to
.claude/slipstream/drift-ignore.json:
{
"ignore": [
{ "subtype": "memory", "file": "scripts/legacy.ts", "reason": "kept for archive" },
{ "subtype": "budget", "reason": "running outside Claude Code, estimate is fine" }
]
}Entries match by subtype plus any combination of file, symbol or observationId. The reason is shown in the dashboard so a future you understands why a rule is muted.
SarmaLinux . sarmalinux.com . Repository
Start here
Install paths
v0.6.0 features
- Map watcher
- Token forecast
- Replay export
- Configurable redaction
- Drift detection
- Per-skill opt %
- CI mode
- Lessons
Headline features
- MCP tools
- Observation memory & search
- Cross-IDE support
- Lossless compaction
- Memory recall
- Live agent dashboard
- Statusline
- Output style
- Subagents
Token efficiency
Skills
Internals
- Architecture
- Memory system
- Hooks
- Mind map and status
- Configuration and tuning
- Data formats
- Performance and benchmarks
- Design decisions
- Security model
- Testing strategy
Reference
SarmaLinux . sarmalinux.com