← Work

nutri. — running a production app inside an agentic stack

A nutrition-tracking PWA I design, build and operate entirely inside Claude Code. The interesting part isn't the app — it's the operating system that keeps an AI agent effective and safe on a real codebase with no second reviewer.

nutri. is a nutrition-tracking PWA in daily use — React, Supabase, no backend team, no co-maintainer. That’s the surface. The part worth writing about is how an AI agent and I operate on the codebase together, and the guardrails that make that safe when there is no second reviewer to catch a bad merge.

The AI surface, with receipts

Four AI features are live in production. Each links to a build write-up that carries its own proof — screenshots, scored baselines, or a verification run against the live database:

Conventions are the substrate

Two normative files load every session: a working-agreement (CLAUDE.md) and a permanent standards file (BIBLIA.md). They are not READMEs — they encode invariants the agent cannot violate: every nutrient stored per 100 g, totals computed in SQL views and never copied, a medical sodium floor that is non-negotiable and non-configurable. An agent is only as good as the context it is forced to re-read; convention files are the highest-leverage artifact in an agentic codebase.

Structural guardrails over guidelines

A guideline that says “check your branch” does not survive a race between two sessions sharing one working tree. A pre-commit hook that hard-rejects any commit to main does. Same for correctness: a change is not done because it looks right — it is done when 156 tests, lint and build pass. The gate is a machine, not a promise.

MCP in both directions

Schema changes go through the Supabase MCP connector: the agent writes a numbered, incremental migration, applies it against the live project, and verifies with a query before it is closed. Twenty-one migrations have shipped this way, with the numbering and the post-apply check as the audit trail.

The same pattern covers observability: the Sentry project was provisioned through its MCP connector — project, DSN and the CSP change shipped agent-side in a single session — so production errors feed back into the loop instead of dying in a user’s console.

The connector now runs the other way too: nutri exposes its own remote MCP server, so Claude operates the app in natural language against production — with row-level security as the only authorization layer and the same domain validators the UI uses. That build (OAuth 2.1, the tool-design decisions, and its zero-net-alteration verification against the live database) is its own write-up: A remote MCP server where RLS is the only authorization layer.

The product

Most of it sits behind a login wall, so these are the screens a reviewer would otherwise never see.

nutri. Today screen: calorie gauge, macro bars, sodium floor, water and logged meals
Today — targets, macros, a sodium floor that stays red below 1,500 mg, water and the day's meals.
nutri. AI data: a text description turned into a structured per-100g nutrition estimate with USDA match chips
AI data — a description becomes a structured per-100 g estimate with USDA match chips. It degrades across three models (Gemini → Mistral); a dubious value is flagged, never written silently.
nutri. dashboard at desktop width: left nav rail, period filters, water bar and per-nutrient KPI cards with sparklines
Dashboard at desktop width — the same product, responsive from phone to widescreen. Per-nutrient KPIs with sparklines over the period and a daily-average roll-up.
nutri. dashboard tables at desktop width: top foods by calories and the micronutrients table scored against targets with a sodium warning
Top foods by contribution, and the micros table scored against targets — with the same non-negotiable sodium floor flagged in red.

What it maps to at scale

Solo, this is a discipline. On a team, every piece here is a platform surface: convention files become shared skills, the pre-commit hook becomes CI policy, MCP access becomes governed infrastructure, and the eval harness becomes the evaluation practice the whole org measures against. Running the n=1 version is how I learned where the seams are.

Repo: github.com/vryahn/nutri · Live: nutri.vryahn.com/about (public tour; the app itself is login-gated)