# Prism Coder v15.0.0 — Drift Detection + Evidence-First Protocol

**Released:** 2026-05-10

## The headline

AI agents can now detect when they've drifted from your stated goals mid-session, self-correct, and route alerts to the Synalux portal — using three direct Prism MCP calls, no scripts, no cron, no hooks.

## What ships

### 🔄 Proactive session drift detection

```
session_save_ledger   → snapshot current state
session_cognitive_route → on_track / minor_drift / major_drift
session_compact_ledger + session_load_context → reset if needed
```

When `major_drift` is detected, an alert is posted to `synalux.ai/api/v1/prism/memory` so the drift is visible across sessions and devices.

**Real example it caught:** A training session promised BFCL ≥90% for three AI models. The agent spent 3+ hours debugging audio bugs instead. Drift check surfaced: "Training goal unmet. Layer3 corpus missing from all training sets. 0 BFCL scores measured." Session immediately re-aligned.

Skill: `~/.agent/skills/session-drift-detection/SKILL.md`  
Tests: 10 behavioral test cases in `skills/session-drift-detection/tests.md`

### 🛡 Evidence-first behavioral protocol

Hard gates that supersede all other agent instructions:

1. No positive claim (`done/fixed/working/90%+`) without observable evidence
2. Diagnose before asserting causes (run oscillator test before guessing audio output device)
3. Write regression test before pushing any bug fix
4. Training quality gate: BFCL ≥90% before "training done"
5. 60-min drift check for long sessions

Evidence gate table maps every claim type to required proof artifact.

Skill: `~/.agent/skills/evidence-first-protocol/SKILL.md`

### 🔊 TTS audio protection (prism-aac)

- `PROTECT_PLAY_MS=600ms`: rapid autoSpeak calls are gracefully dropped instead of killing each other
- `interrupt` parameter replaces shared flag (fixes Speak button being silenced by concurrent tile taps)
- `volume=0` guard with console.warn
- 10 unit tests covering all failure classes
- SSML `rate × 2` formula (capped at 1.4) confirmed working

### 🔍 Search keyboard routing (prism-aac)

- Search opens with keyboard visible immediately
- On-screen keys route to search input via `searchKeyBridge.ts`

### 📬 Inbox wired (prism-aac + synalux-private)

- `/api/v1/prism-aac/inbox/poll` returns real Gmail unread + unclaimed SMS
- Per-message TTS on arrival
- Reply button on schedule message tasks

### 🏪 Marketplace catalog fixed (synalux-private)

`marketplace_modules` table created and applied to production Supabase.

### 13 stub fixes (synalux-private)

Accounting providers, Zoom, Telegram/WhatsApp, e-sign, feature-flags, SMS, and more.

## Migration

No breaking changes to MCP tools or protocol. Update via:

```bash
npm install -g prism-mcp-server@15.0.0
npx prism-mcp-server --version  # should print 15.0.0
```

## What's next (v15.x)

- BFCL ≥90% verified on 72B, 32B, 2B models (in training)
- Layer3 runtime inference server with 3-layer pipeline
- OpenAI-compatible `/v1/chat/completions` with layer routing
