Notes ·

Atlas privacy design

Atlas is a personal assistant on a server in my house. It can read my notes and act on my desktop. I designed, directed and shipped it as an AI-assisted project. This note covers four parts of its privacy design: redaction before anything leaves the house, signed approvals, a hash-chained audit log and a policy floor in code. Built and tested at home; not run as a production service.

Redaction

Atlas runs on a local model but can escalate hard questions to a hosted one. The rule for that path: only redacted context goes out, and if redaction can't be guaranteed, nothing goes.

The redactor works in layers:

  1. A sensitivity gate. High-sensitivity segments are replaced with a stub, never sent and never shown to the redaction models. Unknown sensitivity counts as medium.
  2. Rules on the server. About 30 provider-style secret patterns, keyword and shape rules for passwords and passphrases, pattern PII (emails, phones, Luhn-checked cards, IBANs, addresses), and my own known identifiers and contacts from the notes vault. Every alias of a person maps to the same placeholder.
  3. Two models on my PC. A privacy filter and a GLiNER2 PII model, with their results unioned. The PC receives text with secrets already masked, so secrets never leave the server.
  4. A residual check. The rules run again on the redacted output, and any hit withholds the request.

If the PC is off, a model times out, either model fails, or an answer is malformed, the redactor raises EscalationWithheld and the caller tells me instead of sending. The one exception, a rules-only mode for low-sensitivity text, is off by default. The cost is availability: escalation is withheld whenever my PC is off. The placeholder map that restores names in the answer lives only in memory, and its repr hides the values so it can't slip into a log line.

It was measured on synthetic data only. One evaluation set was sealed in a commit before the second round of tuning and run exactly once. All three layers together hit 99.7% PII recall on it, but only 95.7% on secrets, below my 99% target. The misses were dotted or three-word passphrases with no cue, excluded on purpose because those shapes are usually module paths and ordinary identifiers. The shortfall is documented, not tuned away on the sealed set.

Signed approvals

An approval covers a SHA-256 of the tool and its canonical arguments, works once and expires. Right before execution, the queue checks the call again: still approved, unexpired, unused and the same payload. A changed argument is refused. Only an authenticated human channel can resolve an approval, and an empty approver list means nobody can, so nothing the model or a tool writes can approve anything.

The iPhone app adds a stronger channel. Approve and Deny both require Face ID, and a P-256 key that never leaves the phone's Secure Enclave signs the answer. The server verifies that signature against the key enrolled at pairing, over a string that binds the device, the approval id, the decision, the scope and the payload hash, with a timestamp inside 120 seconds. A bad signature is logged and rejected. A payload hash that no longer matches is rejected as changed.

Audit log

Every decision goes to an append-only audit trail: a JSONL file, a SQLite table and, when a vault is configured, the vault's daily log. Each JSONL entry stores the previous entry's hash and a SHA-256 over that hash plus its own canonical body, so verify_chain catches any edited, inserted or removed line. Strings are scrubbed for secrets before they're logged, and approvals keep only the payload hash in the audit. The agent has no tool that can touch the log.

Policy floor

The base rules live in Python, not in config. A YAML file can add rules or tune thresholds, but it can't remove the built-in ones:

  • Always block: destroying disks or system and home folders, turning off security controls, piping downloaded scripts into a shell, and any shell command that touches Atlas's own policy, audit or approval records. Matching also runs on de-obfuscated forms, so quoting tricks and lookalike characters don't get through.
  • Always ask: money, contacting anyone, deleting, secrets, sudo, anything outside the sandbox, and escalation to the hosted model.
  • Taint: once untrusted web, email or shell output enters a turn, any action beyond a read asks me.
  • Web reads: since 13 November 2026, searches and page reads go through without asking unless the URL or query carries private data. That is checked with the redaction rules, the vault's identifiers for people I didn't type myself, and encoded text hidden in a URL.
  • Integrity: the policy file's hash is pinned at startup. If it changes on disk, everything except local reads is blocked until a person restarts the service.

A local classifier model reviews what the floor lets through, but it can only tighten a decision, never loosen one, and it isn't consulted at all once a turn is tainted.

About Atlas · All notes