Skip to main content

How Sentinel detects your documents, focus events, writing modes, and paste events.

Document Tracking

Starting and stopping Sentinel

Sentinel is WritersProof's background monitoring daemon. Control it from:

  • The menu bar icon → Start Sentinel / Stop Sentinel
  • The dashboard → Start / Stop button
  • The CLI: writersproof-cli start

The first time Sentinel starts, if no watch path has been configured, WritersProof opens a file picker so you can choose a file or folder to witness. You can add more paths any time in Monitoring Settings ↗.

Focus detection internals

Sentinel uses two mechanisms in parallel to know which document is active:

AXObserver (primary)

macOS Accessibility API callback. Fires instantly on focus change, app switch, or document transition. Zero polling overhead. Works for all apps that implement accessibility correctly.

Polling fallback (200 ms)

A background timer checks the active document every 200 ms. Catches tab switches in Electron apps (VS Code, Obsidian, Typora) that do not implement AXObserver. Debounced to avoid spurious transitions.

When you switch documents or apps, Sentinel records the elapsed focus time for the previous document, then starts tracking the new one. Short focus bursts under 2 seconds are ignored to avoid noise from accidental window activations.

Document detection methods

MethodUsed forDetail
AXDocument attributeNative macOS appsAccessibility API exposes a file URL directly. Exact, reliable, no guessing. Works for Pages, TextEdit, BBEdit, Word, Nova, etc.
Title inferenceElectron appsWindow title is parsed to extract a document name. Creates a title:// session identifier. Migrates to the real path automatically when you save the file.
File descriptor scanApps exposing neitherChecks open file descriptors for recently accessed documents. Last resort; may not identify the correct file when multiple documents are open simultaneously.

Supported applications

These apps are explicitly tested and known to work with Sentinel's detection logic:

PagesMicrosoft WordTextEditBBEditUlyssesScrivenerObsidianTyporaVS CodeNovaZedSublime TextiA WriterBearNotion (desktop)Day OneDraftsHighland 2+ others via title inference or file descriptor scan

Blocked applications

WritersProof automatically ignores these app categories entirely — no keystroke counting, no focus recording, no evidence:

TerminaliTerm2WarpAlacrittyHyper1PasswordBitwardenLastPassKeychain AccessFinderSystem SettingsWritersProofSystem dialogs (Save, Open, permission prompts)

You can view and customize the blocked-app list in Monitoring Settings ↗.

Writing modes

Sentinel classifies your current activity based on keystroke timing patterns. Classification is probabilistic and recorded in evidence — no mode affects your certification tier or evidence validity.

ModeSignal patternTypical behavior
ComposingCV(IKI) > 0.3, burst gaps > 2 sVariable typing speed with natural pauses for thought. Deletion ratio low relative to output.
EditingHigh deletion-to-keystroke ratio, frequent arrow/Home/End keysShort bursts interspersed with navigation. Often revisiting earlier text.
TranscribingCV(IKI) < 0.15, zero-variance windows > 500 msUnusually even inter-keystroke timing. Consistent cadence with minimal pauses or variation.
CV(IKI) is the coefficient of variation of inter-keystroke intervals — standard deviation divided by mean. A lower value means more metronomic typing; higher means more natural variation.

Status badges

BadgeMeaning
🟢 ActiveDocument is in the foreground and receiving keystrokes.
🟡 StaleNo keystrokes for over one hour. Session open but idle.
⚪ PausedTracking manually paused, or Sentinel was stopped.
🔵 ArchivedSession closed with a final checkpoint. Evidence complete.
🔴 ErrorFile deleted or moved while the session was active.

Paste detection

WritersProof detects paste events using three independent signals, each assigned a partial confidence score. The overall paste confidence is the weighted combination of how many signals fired:

  • ▸Keyboard shortcut. ⌘V or ⌃V detected in the keystroke stream.
  • ▸Clipboard change notification. NSPasteboard change count incremented immediately before the character-count jump.
  • ▸Character-count jump. Document character count increased by more than a threshold in a single interval without proportional keystroke activity.

When a paste is detected, a checkpoint is created capturing the document state before and after. The pasted content is not recorded — only the timestamp and character-count delta.

Pasted content that is identified as images, tables, or media does not penalize the evidence score. Only text paste events are counted in typing activity metrics.

Cloud sync detection

WritersProof detects files managed by iCloud Drive, Dropbox, OneDrive, and Google Drive by checking file extended attributes and path patterns. Cloud-synced files are tracked normally. If a sync modifies a file mid-session, the checkpoint hash reflects the changed content and WritersProof records an unexpected size-change warning in evidence.

Sleep and wake behavior

Sentinel responds to macOS sleep and wake notifications. On sleep, the active session is paused and the current evidence is checkpointed. On wake, the session resumes. Session state is preserved through sleep — no evidence is lost, and the elapsed time during sleep is correctly excluded from focus duration calculations.

What gets recorded

DataDescriptionWhy recorded
Keystroke countsTotal keystrokes per document. Never which keys.Volume of writing activity.
Timing gaps (IKI)Millisecond intervals between keystrokes.Writing mode detection, fingerprint, entropy.
Timing zonesKeystrokes bucketed into speed zones (fast/medium/slow/pause).Behavioral fingerprint dimensions.
Document hashesSHA-256 of the file at each checkpoint.Proves document state at a given time.
Focus eventsApp name, document URL, focus start/end timestamps.Establishes when and where writing occurred.
VDF proofsOutputs of the verifiable delay function.Evidences minimum real time elapsed; sequential work resists backdating.
Paste eventsTimestamp and character-count delta.Records non-keystroke content additions.
Privacy: All data stays on your Mac. WritersProof never transmits keystroke data, timing information, or document content to any server. The only network activity is optional beacon anchoring — and even then, only a cryptographic hash is sent.