All workSelected Work - Applied AI

MatOS

a personal operating system run by AI agents

One repository and one always-on mini PC at home. Scheduled jobs fetch and check data with plain code, Claude Code does the judgement step in each, and anything that leaves the box waits for my approval and is read back after it is sent. I run it from my phone, through Discord and a dashboard.

Role
Designer and sole engineer
Stack
Node.js · TypeScript · Hono · React · SQLite · Claude Code
Runs on
A mini PC at home, reached over Tailscale
schedule
rule
Claude
gate
report
read back
$ MatOS-Alerts · every 10 min · checks every job
→ decideFix() pure rule: fixable alone? yes
→ lane claude1 signed in · usage left
→ fix run deny rules enforced · tests pass
→ discord "Fixed" · one line, report linked
→ history.jsonl append-only · daily cap counted
929
automated tests
22
scheduled jobs
0
API keys
01

Overview

MatOS runs my working life: grading prep for the university courses I teach, my job search, email triage, social posting and a knowledge base. I built it because I wanted to know what it actually takes to let AI do real work every day without babysitting it.

The answer turned out to be mostly not AI. Each job is plain code with one model step in it, not an agent told to "do the weekly run". That is cheaper, it is testable, and when it fails it fails in a known place. The interesting parts are the guardrails around that one step.

02

In numbers

929Automated tests in 4 suites, 927 passing on the last run (10 Nov 2026)
22Scheduled jobs defined in code
235Tool scripts under tools/
249Commits since July 2026
35Dashboard pages
0API keys - every AI call runs on a signed-in subscription
03

How it fits together

Mephone · Discord · dashboard
Laptopwhere code is written
The boxTask Scheduler · tools/ · AI lanes · SQLite
Populigrades, after approval
Gmailreads, drafts only
Instagram · TikTokofficial publishing APIs
Job boardsread only
Discorda channel per area

One box does the work, the laptop is where code is written, and the phone is the screen. Everything that goes out passes one gate: approve, send, read back. The approval is bound to a fingerprint of what I saw, so if the thing changed after I looked at it, the approval fails. Areas are walled off from each other inside one codebase - a modular monolith, not microservices, because it is one person and one box.

04

Problems worth telling

Failover across AI accounts, without doing a task twice

Problem
The Discord bot went silent from 2:57 to 4:40 AM when one account hit its 5-hour limit. In 30 days of transcripts, 23 of 29 API errors were that limit.
Approach
Every kind of work has a route in one config file naming its first account and what to try next. A job hands over only if it was refused before any tool call; after a tool call it is never redone elsewhere. At most one switch in 15 minutes, and a switch back only after 3 quiet minutes.
Result
Job routes fall back to a second model instead of stopping, and nothing runs twice.

A monitor that repairs its own jobs, inside hard limits

Problem
A mail job failed at 1:20 PM and waited until I typed "Fix it" at 1:31 PM.
Approach
Every 10 minutes a check looks at every job. A pure rule decides whether a break is fixable alone; a Claude run fixes it, runs the tests and posts one line. Caps per problem and per day are counted from an append-only history, and deny rules are enforced by Claude Code itself, not by the prompt.
Result
The first two fix runs took 11 and 23 minutes (n=2), so fixes run as their own task - the alert task's 5-minute limit would have killed them.

Posting to Instagram exactly once, even through a crash

Problem
Instagram has no drafts: a publish call is public at once, and repeating it makes a second public post. A crash between publishing and writing the id could post twice.
Approach
Write "publish started" to disk before the one call that cannot be repeated. On a retry, ask Instagram for the container's status first: never went live, send again; published, record it; cannot tell, hold it for a human.
Result
A post that cannot be proven unpublished is never retried on its own. The dashboard cannot publish at all - a UI that can publish is a UI that can publish by misclick.

Reading the internet without taking orders from it

Problem
Some jobs read text written by strangers: web pages, job postings, emails. In the jobs database, 10 postings from 3 companies carried lines aimed at AI tools.
Approach
Untrusted text goes into a temporary folder. The session that reads it cannot write a file, run a command or open the repo, and answers in JSON. Plain code checks the JSON and writes the note.
Result
The model never touches the disk, so an instruction hidden in a posting has nothing to act with.

An AI receptionist where the model never speaks

Problem
In the first test the local model invented promises in 3 of 6 replies, and the cloned voice took 15 to 18 seconds per sentence.
Approach
Speech-to-text on the GPU, a small local model that only fills slots as JSON - name, reason, callback time - and fixed rules that pick the next sentence.
Result
The caller only ever hears one of 10 sentences recorded once in my voice. Nothing the model writes is played.

Grading with a human in the loop

Problem
Grading one essay by driving the web page cost about 60k tokens, almost all of it page snapshots.
Approach
Scripts do the fetching, extraction, late-work rules and audits. The model only reads the essay and scores it against the assignment's own rubric. Nothing posts until I approve each section, and a recheck never overwrites a grade I typed by hand.
Result
Every posted grade is read back from the school's system to confirm what was saved. No screenshots here: those pages show real students.
The knowledge base: paste a link, a sandboxed agent reads it, code writes the note
The Knowledge page, 8 Nov 2026: 78 items and 419 tools noted, each one a sandboxed read.
05

The rules every tool follows

Rules are pure functions

Data and the current time in, a decision out. They never read files, the clock or the network, so they are tested with a fake clock.

I/O sits below one marked line

It reads and writes, and it does not decide.

Discord and the dashboard show and collect taps

They never decide outcomes.

A test must fail first

A new test has to fail on the old code for the reason expected before the change is made. Assertions are never loosened to go green.

Every change ships a report

What was asked, the plan, what changed, the tests with their counts, each design decision as picked X not Y because Z, and what is still unverified.

A real change report: the ask, the plan, the test counts and the design line
One of the reports MatOS writes for every change, 8 Nov 2026.
06

Stack

Node and TypeScript for the tools and server, React for the dashboard, Python where the libraries live.

  • Node.js
  • TypeScript
  • Hono
  • React
  • SQLite
  • Claude Code
  • Codex
  • Discord
  • Windows Task Scheduler
  • Tailscale
  • Python
  • faster-whisper
  • Ollama
Workflows before agents. The model is one step in a job, and the job is code I can test.
Hi, I'm Mat

How it starts · A 15-minute call

Have something real people need to use?