🛡️ MindShield v1.2.0 Technical Dev Log

Local AI Persistence, Blueprint v2.0, & Firefox MV3 Architecture

Building client-side reflection mechanisms into modern AI chat interfaces requires balancing zero-friction user experience with robust intent classification. MindShield v1.2.0 introduces a fundamental rework of our local inference runtime, intent triage architecture, cross-platform DOM interception, and Firefox Manifest V3 compliance.

1. Blueprint v2.0: 3-Tier Intent Classification & Flagging

Previous iterations relied on binary pass/flag logic that proved overly restrictive on non-surrender queries. Blueprint v2.0 establishes a nuanced 3-tier triage hierarchy executed locally:

Tier 1: PASS (0ms Delay)

Bypasses all delays for factual lookups, concept breakdowns, comparative analysis, collaborative reviews, and context dumps exceeding 400 characters.

Tier 2: WARNING (Soft Notice)

Renders a glassmorphic amber toast without blocking execution. Targeted at cognitive offloading like basic math (15 * 42), social drafting, and action requests.

Tier 3: FLAGGED (5s Lockout)

Enforces a 5-second reflection timer specifically for direct problem-solving surrender, homework evasion, and puzzle shortcuts.

Contextual Scanning & Regex Improvements

What Is MindShield?

MindShield is a privacy-first browser extension designed to help people maintain critical thinking while using AI. It introduces a brief moment of reflection when a prompt appears to ask AI to perform a simple task the user could reasonably think through themselves.

MindShield does not try to stop people from using AI. Instead, it is designed to make AI use more intentional by distinguishing between requests that benefit from AI assistance and requests that may simply outsource reasoning, problem-solving, or decision-making.

MindShield currently supports AI interfaces including ChatGPT, Claude, Google Gemini, and Grok. Prompt evaluation is performed locally in the browser using an on-device machine-learning model, rather than sending prompts to an external classification server.

Version 1.2.0 focuses on improving this system through a three-tier intent classification system, local AI inference, cross-browser compatibility, and more reliable prompt interception.

2. Local AI Engine Optimization (ONNX / WASM)

Running zero-shot classification via @xenova/transformers locally inside the browser presents strict memory and latency boundaries.

[Native Chat Input] ──> [Capture Event] ──> [Warm Offscreen / Service Worker RAM] 
                                                    │
                                      (DistilBERT-MNLI / ONNX WASM)
                                                    │
                                 ┌──────────────────┴──────────────────┐
                                 ▼                                     ▼
                        < 50ms Triage                        > 400 Chars Auto-Pass

Persistent RAM Caching (Chrome)

Chrome's background service worker previously terminated the offscreen document post-eval, triggering full 28MB model re-downloads and re-compilations on subsequent queries (~10s latency). Implementing chrome.offscreen.hasDocument() checks keeps the offscreen document permanently warm in memory, bringing inference evaluation down to <50ms.

Zero-Shot Label Engineering

Candidate labels and hypothesis templates for distilbert-base-uncased-mnli were recalibrated for high-contrast output:

3. DOM Interception & SPA Route Lifecycle

Handling Single Page Application (SPA) state transitions across ChatGPT, Claude, Gemini, and X.com (Grok) required refactoring event capture strategies:

4. Firefox AMO Compatibility & Security Hardening

Firefox MV3 does not support Chrome's offscreen API. To achieve full cross-browser feature parity, the Firefox build was re-engineered for direct in-process WebAssembly execution within the background module.

Runtime & Build Adaptations


MindShield Resources

Explore the MindShield project, previous development work, source code, release information, and the Firefox extension: