HADI MOUMENI

Meridian

Every focus blocker I’ve tried works the same way: a fixed list of sites on a fixed schedule. So it fights me when I’m heads-down with a dozen tabs open, then goes perfectly quiet the evening I open one “quick” feed and lose half an hour to it. I wanted the opposite. Meridian learns what my focus actually looks like from the way I browse, then steps in a few minutes before it falls apart instead of after. It scores how engaged I really am with a tab, not just how long it’s been open, and the whole thing runs and stays on my machine. The only thing it ever talks to is a local model, and only if I bother to run one.

Highlights

  • The predictor is a logistic regression I wrote from scratch, no ML library. It starts from rough priors (mornings are better, tab-hopping is worse) and updates its weights a little after every session, so over time it drifts from a generic guess toward me. All the weights are in the settings, and I can reset them if it picks up something dumb.
  • It labels its own training data. A simple heuristic decides whether a session was focused (long, engaged, not much switching, on a work site) and the model learns from that, so I never tag anything by hand.
  • The blocking happens before the drift, not after. Every five minutes it scores the last half hour into a focus probability, and if that drops too low it quietly sends the usual time-sinks to a hold page. When focus comes back the block lifts on its own, and there’s a one-tap override for when I actually mean to be there.
  • It measures engagement instead of assuming it. Mouse, scroll and keys count as attention; a tab left open while I’m in another window doesn’t, and going idle pauses the clock.
  • The weekly report is written locally by whatever Ollama model I have installed, the same free local-model setup I used for The Wire, or a plain template if nothing’s running. Nothing about my browsing leaves the laptop.

Tech Stack

  • JavaScript, Manifest V3 - The extension, a service worker plus the pages
  • Logistic regression (from scratch) - Sigmoid, online training, heuristic auto-labelling, all by hand
  • IndexedDB - Local store for visits, summaries, blocked attempts and reports
  • declarativeNetRequest - The predictive redirect rules
  • chrome.alarms + chrome.idle - Session tracking, the five-minute prediction, weekly scheduling
  • Ollama - Local model for the weekly report, with a template fallback

Notes

  • The whole idea is that it models me, not a blocklist. A fixed list of bad sites is just someone else’s guess about my attention, and one trained on my own sessions is at least mine. It gets less wrong the longer I use it.
  • Measuring real engagement was the thing that made it click. An hour with a tab open while I was in another window isn’t focus, and once the model knew that, the score stopped rewarding it.
  • Blocking early is the part that actually matters. Catching me after I’ve already opened the feed is just nagging, and I can do that myself for free.
  • Keeping it fully local mattered more to me than any single feature. Browsing history is about as personal as data gets, so there’s no account and no server, and I can export or wipe all of it in one click.
  • I might give the report some memory across weeks so it can talk about trends, and let the block threshold tune itself based on how often I override it.

Check it out: Meridian