[ Back to AriOS ]

Build notes

AriOS: how it came together.

Develop · Build

How it came together.

  1. 01

    Telegram as the universal capture surface

    Capture began as iOS Shortcuts for photos and a Chrome extension for URLs: two surfaces, two auth flows, two failure modes. Telegram collapses both into one bot reachable from any phone, laptop, or iPad, with a native share sheet from every iOS app. A webhook on the Bot API, user ID allowlisted, turns it into a universal inbox for photos, voice notes, documents, and links, all routing through one /ingest endpoint. New surfaces ship as thin clients.

    Backend Engineering
  2. The floor is the point. Each rung is faster and dumber than the one above it. The bottom rung never fails, which is what lets the top two be allowed to.
  3. 02

    The classifier became a provider ladder

    Classification started heuristic-first because Ollama on a Dell CPU took 30 seconds to sort a 1500-char prompt into a 12-option enum. On the laptop RTX 5070 Ti where AriOS now runs every day, the same call takes about 1.2 seconds with llama3.2:3b and 2.4 seconds with the 8B model Cloudflare serves (measured 21 October 2026). The ladder runs Cloudflare first, local Ollama second, and the phrase-aware heuristic last. Replayed over 77 earlier captures, the 8B model put 86 percent in the folder they were filed in, the 3B model 78 percent and the heuristic 36 percent. The heuristic stays as the floor because it answers in under a millisecond, which is what makes the chain safe to time out aggressively: nothing in the ingest path waits on a model that isn't answering.

    AI & Machine Learning
  4. 03

    Vision moved to Cloudflare after every local tuning failed

    Local llava-7b on the Dell was tuned every way available (sharper pre-resize, shorter prompts, thread pinning, longer keep-alive) to beat a 90s timeout; the floor stayed at 162s per image, because vision-token tokenisation dominates prompt-eval on CPU, not generation. Cloudflare Workers AI runs the same class of model on GPU, 10-15s warm round-trip, free tier covering 10k requests a day. Only the photo bytes leave the device for that step, never the vault, and it's one env var to move back local. On the laptop RTX 5070 Ti the same llava-7b returns a complete description in about 3.5 seconds an image once warm.

    AI & Machine Learning
  5. 04

    Perception in the cloud, the vault always local

    Voice started as local Whisper-base ONNX inference via @xenova/transformers, slow enough on CPU that the bot needed a 'transcribing…' ack so the user knew it heard them. Cloudflare's Whisper turbo returns in two to five seconds, so it's now the default; local stays as the offline fallback, one env var to switch. Same rule as vision: only the audio leaves the device, never the vault.

    AI & Machine Learning
  6. 05

    A webhook that survives the home box being down

    The bot used to long-poll from a process on the Dell: a bad socket could strand it in a retry loop for hours, and a reboot at home took capture down with it. It's a Vercel-hosted webhook now, so there's no poll loop to wedge. The remaining failure mode, the home backend being unreachable, is handled by probe-and-queue: anything the webhook can't forward lands in a pending file that a drainer replays once the box answers again.

    Backend Engineering
  7. 06

    Vault RAG on one retrieval index

    One index sits beside the vault and matches three ways at once: on the words themselves, on what a passage means, and on what a saved image looks like, with the three sets of results merged into a single ranking. Ask the bot what you saved about some half-remembered trick and it searches the vault, answers from the passages it found, and cites them, or, when the local model is slow, drops to returning the sources without the prose rather than making you wait. Nothing is trapped in the index: it rebuilds from the markdown at any time, and the vault stays the source of truth.

    Data Pipelines

Develop · Forks

Decisions on the record.

The few calls worth defending. Each one is a fork; the other branch would have been a different project.

  1. Decision · 01

    Why hybrid retrieval, text and image together

    Image-dense retrieval catches 'show me other things I've seen that look like this,' something most personal-knowledge tools skip. Pair it with semantic-text and keyword search so named entities stay findable, and fuse the three without a weight tournament.

  2. Decision · 02

    Cutting tools nobody used

    Every write the app makes is a vault commit, so usage can be read straight from the history. Consultancy, Finance and Craft had zero app-written commits between 13 July and 10 October 2026, so all three were archived on 28 October. Read-only pages leave no trace, so none of those were cut on the same evidence.

Develop · System

The design system.

Tokens and treatments as they exist in the repo: values verbatim, nothing aspirational.

Monochrome, since 2026-09-10. Black, white and grey, printed, with red as the only colour left: it means alert and nothing else. It is the third system in two months (Constellation in July, Horizon in September), and the token names survived all three, so each repaint was a change of values, not a rename. Contrast here is not a review step, it is a build gate.

Colour

--void / --void-2#0a0a0a / #101010
Page ground in two steps, fully neutral. The blue cast Horizon gave the ground existed to make a sky-blue accent belong; with no sky left, a blue-cast black read as an uncorrected screen.
--panel / --surface-sunk / --surface-raisedrgba(255,255,255, 0.035 / 0.012 / 0.055)
Three glass fills assigned by what a surface IS rather than by nesting: the default card, the supporting columns, the centre band.
--line / --line-strongrgba(255,255,255, 0.07 / 0.14)
Hairlines. Panels separate by an edge catching light, not by a luminance jump.
--ink / -dim / -faint#f0f0f0 / rgba(240,240,240,0.66) / rgba(240,240,240,0.54)
One text colour at three alphas. --ink-faint is the token with the worst history in the file: it has failed WCAG AA three times, the last at 0.5.
--accent / --accent-dim#e6e6e6 / #8b8b8b
The accent is the brightest grey, one step under the ink. Emphasis is carried by lightness, so links keep their underline and controls keep their border.
--magenta#e8564a
The one colour in the system. Alert and overdue, nowhere else. Any other hue in the palette is a bug.
Light theme#f7f7f7 ground, #ffffff panel, #1a1a1a ink, #333333 accent
A printed sheet. Surfaces go solid rather than alpha, and the ink alphas go higher, because dark text on a light ground needs more alpha for the same legibility than light text on dark.

Type

Display

AaBb Handgloves 0123

Bodoni Moda, one weight (--font-bodoni), then Didot, Bodoni MT

A didone for the page greeting, h1, the wordmark and stat numerals only. Never at 11px, where a didone is all hairline.

Everything else

AaBb Handgloves 0123

JetBrains Mono (--font-jbmono), then ui-monospace, SF Mono, Menlo

--font-sans and --font-geo both resolve to the mono stack, so every label, control and line of data is monospace. Serif for display, mono for anything that carries data or names a control.

Implementation

CSS custom properties in apps/ari-app/app/globals.css, with the light theme declared as a complete token set under :root[data-theme="light"] rather than as a patch over the dark one. The semantic token NAMES (--void, --ink, --line) were deliberately kept across the repaint so every existing component inherited the new palette without a per-file rename. Derived values use color-mix off --accent instead of new literals, so the glow, the wash and the component-family rule all follow the theme. pnpm a11y walks every surface in both themes and fails the build on anything under AA; it is what caught --ink-faint twice, and it is the adjudicator rather than the arithmetic.

Elements

Glass as a primitive, blur as an exception

Every card carries an alpha fill, an alpha hairline, a specular top edge and a soft drop shadow. Real backdrop-filter blur is opt-in behind a .glass class, taken only by chrome that genuinely floats: nav, the command palette, the ask widget.

The parts of glassmorphism that actually read cost nothing. Blur is the part that costs a composited layer every frame, for an effect nobody sees through a solid page. Splitting the two lets the system be glassmorphic everywhere and expensive nowhere.

A depth scale that runs downward

Supporting columns recess below the ground on --surface-sunk instead of the centre band being lifted further above it.

Lifting every surface to buy separation walks the whole app toward the 4.5:1 contrast floor, and the text token nearest that floor is the one that has already failed twice. Recessing buys the same separation against headroom nothing else is competing for.

The component-family rule

--rule-mark is the accent at 55%, marking a card's top or left edge.

Enough to read as deliberate beside a plain hairline, not enough to compete with a full-strength accent on the controls sitting inside the same card. Derived from --accent rather than fixed, so it follows the theme.

  1. Process · 01

    Measuring a reference instead of describing one

    The palette was rebuilt from cursor.com's computed styles rather than from an impression of them, which surfaced four things in order of impact: the ground is warm, the tonal steps between ground and raised surfaces are tiny so cards separate by a hairline, colour is almost absent, and the radius is 4px not 8px. Three of those survived. The warm ground did not: at dashboard density it read as brown, so the ground moved to a near-black closer to resend.com's.

  2. Process · 02

    Light as a different medium, not an inversion

    Inverting a dark palette produces a light theme that feels like the dark one with the lamp on. The light theme is built the other way: surfaces become solid white instead of white alpha, the depth scale reverses so raised means the paper and sunk means the ground, and glass stops meaning a white sheen and starts meaning what a pane does over paper, at 0.72 rather than 0.05.

  3. Process · 03

    Keeping the token names through the repaint

    Constellation changed every value and almost no names. --void, --ink and --line meant something different afterwards but were spelled the same, so every inline style and component in the app inherited the new palette with no migration. The two accent tokens were the exception that proves it: they stayed spelled teal through three repaints after they had stopped being teal, which is exactly the cost of naming a token after a colour instead of a role.

Contact

Pavlo Puzikov, a black and white studio portrait in a pinstripe suit.

Pavlo Puzikov

Marketing and innovation: immersive 3D, applied AI, generative content

Write to

pavlopuzikov@gmail.com

Open to
Freelance projects, remote. Full-time roles, onsite or hybrid in the EU.
Based in
Bulgaria
Most recent role
Marketing and Innovation Lead, BARNES Dubai, 2026. Product Innovation Researcher there from 2025.
Education
BCom, Marketing and Management, University of Auckland, 2020 to 2023
Languages
English, Russian