Delivery and AI transformation leader. 15+ years running large programs; I also build and run the AI systems below.

Most AI work is shown as a demo. This is a personal portfolio of some of the projects I have built, and what happened after.

These are personal projects, built and run on my own to show my skills in applied AI: they are not client work. Each one is documented from its own repository, with the problem, the scope, the architecture, the design decisions and the results.

Photo of Jorge Roberts
6initiatives documented
4in production
433LLM requests in 30 days
2.0Mtokens in 30 days

Initiatives

Personal projects. The selected ones first; everything else is under All.

Bot · since 2026-07 · In production

HealthBot

Personal health coach on Telegram that logs food, training and sleep from natural language or photos, and produces daily, weekly and monthly plans using LLMs, RAG over cited evidence and deterministic guards on every number.

  • Cascading monthly, weekly and daily reports that adjust nutrition, sleep, training and supplementation targets on their own; 67 reports generated and stored.
  • RAG over 589 videos and 17,588 chunks, with one vector index per source and principles distilled across sources.
  • 70 deterministic guard tests, each built from a real case that had slipped into production.
  • Food vision redesigned so the model only identifies and estimates weight while code does the math; the same meal gives the same number by photo and by text.
  • End-to-end traces (bot, gateway, provider) of every run and every report.
  • Retrieval eval with a frozen dataset that found an entire source never reached the reports; the fix raised hit@5 from 0.64 to 0.74.
Scale
589 videos and 17,588 indexed chunks; bot, API and an Android app
LLM, 30 days
120 requests, 350,507 tokens
Verified
2026-10-30
CI
passing (2026-11-20)

rag · vision · structured-extraction · llm-reports · deterministic-guards · tier-escalation · observability · node · sqlite · sqlite-vec · express · telegram · python · docker · opentelemetry

Technical overview
  • Platform: Node.js on Docker; Telegram bot over long polling (node-telegram-bot-api), an Express HTTP API (fail-closed Bearer auth with attempt limits) for the Android app and the Health Connect receiver, and a cron scheduler in local time.
  • Data: SQLite with better-sqlite3 (38 tables) and sqlite-vec for three vector indexes, one per corpus source; migrations at startup.
  • LLM: text goes through the self-hosted gateway with its own key and policy (llm-policy.yaml), via @homelab/llm-client. Tiers: tier-2 for chat, tier3-tools for the daily briefing, tier3-reasoning for weekly and monthly reports, tier-vision for food photos. Embeddings with NVIDIA NIM and backup vision with Google Gemini.
  • RAG: producer-consumer ingestion of YouTube transcripts (Python + Node), embeddings, per-source retrieval and distilled principles; eval with a frozen dataset (hit@5).
  • Integrations: Telegram, Health Connect (through the Android app), YouTube (transcripts), LLM Gateway.
  • Observability: end-to-end OpenTelemetry (bot, gateway, provider) into Jaeger and Langfuse.
  • Quality: 70 deterministic guard tests built from real cases, plus custom calibration tools for photos, macros and RAG.
  • Deploy: a service in the homelab docker-compose, script-only deploys, with a tagged rollback image.
Problem and scope

Problem

Following a nutrition and training plan requires logging a lot (meals, water, loads, weight, sleep) and, above all, cross-checking that data to decide what to adjust. Commercial apps log but do not reason, and a generic LLM chat reasons but does not remember, makes up numbers and has no access to the watch data.

HealthBot is a personal health coach: you talk to it in natural language on Telegram (or send a photo of the plate), it logs what applies, and every day it builds a plan against the real history, with evidence cited from a corpus of science communication. The design premise is that the LLM contributes judgement, but every number that can be calculated or verified is calculated and verified by code.

Scope

  • Logging by natural language, commands and photos: food, water, weight and measurements, workouts (sets, reps, load, RIR, drop sets and supersets), supplements, subjective check-in, lab results.
  • Watch data ingestion through Health Connect (sleep, HRV, heart rate, steps, calories, exercise sessions).
  • Macro estimation from text and from photos (plate or nutrition label).
  • Cascading monthly → weekly → daily reports that adjust targets.
  • Dynamic routine with deterministic load progression and mesocycles.
  • RAG over transcripts from Huberman Lab, Dr. La Rosa and a backup source, with distilled principles.
  • Read and write HTTP API for the app.
  • End-to-end traces of every run.
Architecture and decisions

Diagram

flowchart LR
  user[User] -->|chat and photos| tg[Telegram]
  tg --> bot[Bot and handlers]
  app[HealthApp Android] -->|API with token| api[HTTP API]
  hc[Phone Health Connect] --> app
  bot --> guards[Deterministic guards]
  api --> guards
  cron[Report scheduler] --> guards
  guards --> db[(SQLite + vector indexes)]
  bot --> rag[RAG over video corpus]
  cron --> rag
  api --> rag
  rag --> db
  bot --> gw[LLM Gateway]
  cron --> gw
  api --> gw
  rag -.->|embeddings, direct for now| emb[Embeddings provider]
  bot -.->|backup vision, direct for now| vis[Vision provider]
  bot --> otel[OpenTelemetry traces]
  gw --> models[Local and free models by tier]

Design decisions

  • The prompt asks, the guard guarantees. Everything that can be checked against the user's text or a plausible range is checked in code; the LLM is left with judgement. Every guard was born from a real case and has its test.
  • The model identifies and weighs; the code calculates. A photo says what is there, not how much it weighs: vision returns items and grams, and calories come from the same function the text path uses.
  • Machine-readable directives with a fallback extraction. Reports emit AJUSTE, RUTINA and MESOCICLO; if the model does not emit them inline, a narrow call extracts them from the analysis already written.
  • A cascade with a single writer per field. Monthly and weekly write the adjustment; the daily report only reads it with COALESCE. The last one to run wins.
  • Real rotation instead of a calendar. What to train today comes from the workout history, with detection of breaks.
  • One vector index per source. Distances across indexes are not comparable; kept apart, each source can change embedding model without breaking the others.
  • Thin client. The app has no logic and no LLM keys: if the app and the bot can disagree on a number, the calculation is in the wrong place.
  • Reject rather than send garbage. A report that fails validation is retried or not sent.
  • Dates in a single module. The container runs in UTC and the day is always calculated in local time, in one place.
Results
  • In daily use since July 2026, with 67 cascade reports generated and stored (49 daily, 15 weekly, 3 monthly) and target adjustments applied automatically.
  • Corpus of 589 videos and 17,588 chunks indexed in three vector indexes, one per source.
  • 70 automated guard tests, each built from a real case that had slipped into production.
  • The same meal gives the same number by photo and by text: vision stopped estimating calories and only identifies and weighs.
  • Logging food by text from the app went from up to 2 minutes to under a second by skipping the general classifier.
Evidence

src/shared/macros.js, line 301

export function calcularDesdeItems(parsed, desc, origen = 'texto') {
  // Lo que el usuario conto explicitamente no se estima: se multiplica. Ver
  // cantidadesExplicitas() — "dos huevos" son 2 x 55 g, no lo que el modelo recuerde.
  const explicitas = cantidadesExplicitas(desc);

  const items = (Array.isArray(parsed?.items) ? parsed.items : [])
    .filter(i => Number.isFinite(i?.gramos) && i.gramos > 0)
    // Antes de cualquier cuenta: si el peso es en realidad una cantidad, se corrige.
    .map(i => ({ ...i, gramos: pesoDeUnidades(i?.nombre, i.gramos) }))
    .map(i => {
      const match = explicitas.find(e => referenciasMencionadas(i?.nombre || '')[0]?.id === e.ref.id);
      if (!match) return i;
      const exacto = match.cantidad * match.ref.unit_grams;
      if (Math.abs(exacto - i.gramos) / exacto > 0.1) {
        logger.info({ item: i.nombre, modelo: i.gramos, contado: exacto, cantidad: match.cantidad },
          'el usuario dijo la cantidad: el peso sale de multiplicar, no de estimar');
      }
      return { ...i, gramos: exacto, _contado: true };
    })
The model identifies and estimates weight; the code does the math. If the person stated the amount, the weight comes from multiplying, not from estimating.

Infrastructure · since 2026-06 · In production

LLM Gateway

Self-hosted gateway that routes requests from several apps to local and free models by capability tier, with failover, per-app guardrails and end-to-end tracing.

  • 8 model groups across 5 providers, with no per-call cost.
  • Four model retirements absorbed by changing configuration only, without touching any app.
  • Prompt-injection guardrails, with each app's policy declared and versioned in its own repository.
  • End-to-end traces (app, gateway, provider) that made it possible to measure and fix a silent truncation.
Scale
8 model groups across 5 providers
LLM, 30 days
433 requests, 1,965,099 tokens
Verified
2026-10-30
CI
passing (2026-11-20)

model-routing · failover · guardrails · prompt-injection-defense · observability · python · litellm · postgres · redis · docker · opentelemetry

Technical overview
  • Platform: LiteLLM Proxy (OpenAI-compatible API) on Docker, with a custom Python callback (async_pre_call_hook) that applies each key's policy before routing.
  • Providers and models by tier: local Ollama (qwen2.5:0.5b, llama3.2:1b) for cheap classification; Groq (gpt-oss-20b, gpt-oss-120b, qwen3.6-27b for vision); NVIDIA NIM (llama-3.1-8b, nemotron-3-nano-30b-a3b for function calling, nemotron-3-ultra-550b-a55b for reasoning, llama-3.2-11b-vision, nemotron-3-embed-1b for embeddings); Google Gemini (3.6-flash); OpenRouter (llama-3.3-70b:free).
  • Data: PostgreSQL 16 for virtual keys, policy metadata and spend logs; Redis as response cache (1 h TTL).
  • Governance: one virtual key per app; tools/policy-sync reads the llm-policy.yaml versioned in each repo and applies it to its key (timeout, sanitize, tools, purpose, RPM/TPM). Fallbacks filtered per key; public-only groups return 403 unless explicitly enabled.
  • Observability: OpenTelemetry (OTLP) into a custom collector with a persistent queue, fanning out to Jaeger (local, Badger, 30 days) and Langfuse Cloud.
  • Clients: shared @homelab/llm-client package (Node.js) used by the homelab apps.
  • Quality: guardrail unit tests inside the image and an end-to-end suite with an isolated LiteLLM, Postgres and a custom echo provider, with no quota usage.
  • Deploy: own image built from the repo, a service in the homelab docker-compose; changes are tested on a separate instance and rollback means reverting the config to the previous commit.
Problem and scope

Problem

Several personal bots and apps need LLMs with different requirements (tool use, reasoning, vision, embeddings, sensitive or public data) without paying per call. Talking to each provider directly scatters API keys, makes it impossible to measure usage or quality, and every time a free provider retires a model a different app breaks.

Scope

  • One OpenAI-compatible API for every app.
  • Capability tiers, each with several providers in order and automatic failover.
  • One virtual key per app, with allowed models, limits and its own guardrail policy, declared in the app's repository.
  • Generic prompt-injection guardrails applied at the proxy.
  • Caching, OpenTelemetry traces and usage logging.
Architecture and decisions

Diagram

flowchart LR
  subgraph apps[Apps]
    hb[healthbot]
    ad[ai-digest]
    hub[hub]
    wa[Walle]
  end
  subgraph gw[LLM Gateway]
    g[Guardrails<br/>policy per key]
    r[LiteLLM router<br/>tiers + failover]
    c[(Redis cache)]
    db[(Postgres<br/>keys + usage)]
  end
  hb & ad & hub & wa -->|virtual key| g --> r
  r --- c
  g --- db
  r --> ol[Local Ollama]
  r --> groq[Groq]
  r --> nim[NVIDIA NIM]
  r --> gem[Gemini]
  r --> orr[OpenRouter]
  r -.OTLP.-> otel[OTel Collector] --> jg[Jaeger] & lf[Langfuse]

Design decisions

  • One gateway instead of one SDK per provider: model retirements are fixed in a single file and the apps do not change.
  • Tiers by capability, not by provider: the app asks for "reasoning", not for "NVIDIA".
  • Each app decides its input length: the gateway first truncated silently (breaking prompts without anyone noticing), then rejected with 413; finally the limit moved to each project, which knows the legitimate size of its prompts.
  • The gateway enforces the maximum duration per key: an app cannot ask for more time than its policy allows.
  • Tag escaping by allowlist: every < that could open a tag is escaped, while ->, >99 and <100 pass through.
  • A separate group for public data: allows using providers that log requests without exposing personal data.
  • Guardrails in two layers (ADR 0001): a versioned policy in each app, plus specific controls in each app's code.
Results
  • 8 model groups across 5 providers, all free or local.
  • Survived four silent model retirements (NVIDIA, Groq, OpenRouter) by changing configuration only, without touching the apps.
  • Tracing detected and fixed a silent guardrail truncation that was cutting up to 65% of one app's longest prompt.
  • A single end-to-end trace (app → gateway → provider) in Jaeger and Langfuse.
Evidence
Timeline of a trace with spans from two services, the app and the gateway
Real trace of a daily report: the app opens the trace, the gateway joins it, and the first attempt against a provider fails (red mark) before the router resolves it. The 1.8 minutes belong to the reasoning model that writes the report, which runs in the background.

litellm/guardrails.py, line 116

def _restrict_fallbacks(fallbacks, key_models):
    """Cadena de fallbacks del router limitada a lo que la key puede usar.

    key_models vacio = la key puede usar cualquier grupo, salvo los solo-publicos.
    Devuelve la lista en el mismo formato del router ([{origen: [destinos]}]).
    """
    allowed = set(key_models or [])
    public_key = bool(allowed & PUBLIC_ONLY_GROUPS)
    ok = (lambda m: m in allowed) if allowed else (lambda m: m not in PUBLIC_ONLY_GROUPS)
    out = []
    for item in fallbacks:
        if not isinstance(item, dict):
            continue
        for src, targets in item.items():
            if not ok(src):
                continue
            keep = [t for t in (targets or []) if ok(t) and (public_key or t not in PUBLIC_ONLY_GROUPS)]
            if keep:
                out.append({src: keep})
    return out
The fallback chain is filtered per request: a failure never ends up on a model the key is not allowed to use.

Service · since 2026-10 · In development

AI Digest

Weekly AI newsletter produced by a six-stage agentic pipeline, from reading more than 25 sources to an email with up to 20 validated news items.

  • Six-stage pipeline where code validates and the model only decides what requires judgement.
  • From about 260 items a week to 20 at most, with no URL or figure that is not in the source.
  • A model chosen per stage by measuring against a fixed fixture, not by intuition.
  • Page fetching with SSRF protection, and new sources added only with human approval.
  • 28 network-free tests, including an end-to-end run with a fake LLM.
Scale
25+ sources and up to 20 news items per edition
LLM, 30 days
220 requests, 1,600,463 tokens
Verified
2026-10-29
CI
passing (2026-11-20)

agentic-pipeline · curation · summarization · source-discovery · output-validation · node · nunjucks · readability · docker

Technical overview
  • Platform: Node.js in a short-lived container per run (own image), triggered by cron on Mondays; CLI with a lock, --dry-run, --since and --month.
  • Sources: more than 25 across RSS/Atom feeds, Hugging Face, arXiv and GitHub, declared in a versioned registry (sources.yaml).
  • Processing: Mozilla Readability for full text, downloads with custom SSRF protection (ports 80/443 only, no private IPs, redirects revalidated), date and duplicate filters.
  • LLM: everything through the self-hosted gateway with the app-ai-digest key; tier-2 and tier3-public (a group reserved for public data). Streaming, JSON extraction and schema validation, retries on truncated output and a 45,000-character cap per request.
  • Prompts: a versioned skill per stage (triage, enrich, compose, discover), with the rule that external content always goes inside tags and never in the system prompt.
  • Deterministic validation: URLs and figures checked against the input; per-section limits; degraded mode.
  • Delivery: HTML rendered with Nunjucks, sent over SMTP to fixed recipients, an archive of every edition and failure alerts through the homelab notifier (Telegram).
  • Quality: 28 tests with node --test, network-free, including an end-to-end run against a fixture with a fake LLM.
Problem and scope

Problem

Keeping up with AI means reading many scattered sources, and most of what gets published is noise or repetition. The goal is that every Monday morning a newsletter-style email arrives ("Weekly report") with up to 20 news items from the week, each one linking to the original source with a short take on why it matters.

Editorial focus: news with practical value, not "AI news". It prioritizes new models (capabilities and pricing), papers and benchmarks, practices and methods for working with agents, skills, agent security and repositories. It discards funding rounds, people moves, controversies and corporate announcements with no technical substance.

Secondary goal: make the project a practical example of a closed agentic pipeline, with a versioned skill, tier routing in LiteLLM, output validation and observability.

Scope

Includes: the weekly and monthly jobs, a --dry-run mode in both, manual runs for a week (--since) or a month (--month), and an archive of every edition.

Does not include

  • LinkedIn and X. They offer no feed and scraping them goes against their terms.
  • Paid sources or sources behind a login.
  • Republishing full texts.
  • Adding sources without human approval.
Architecture and decisions

Diagram

flowchart LR
  subgraph weekly[Weekly job]
    c[collect<br/>feeds, HF, arXiv, GitHub] --> t[triage<br/>batch prefilter + selection]
    t --> e[enrich<br/>full text + cited facts]
    e --> co[compose<br/>newsletter as JSON]
    co --> v[validate<br/>URLs, figures, limits]
    v --> r[render + send]
  end
  subgraph monthly[Monthly job]
    d[discover<br/>sources cited by the registry]
  end
  reg[(sources.yaml)] --> c
  r -. links and health .-> d
  d -. candidates, human approval .-> reg
  t & e & co & d -->|own key| gw[LLM Gateway]
  r --> mail[Weekly email]
  r -. failures only .-> n[Notifier]

Design decisions

  • A closed six-stage agentic pipeline, with code wherever things can be verified (fetching, filters, validation, rendering) and the model only where judgement is needed (selection, reading, writing).
  • Validation decides, not the model: no URL or figure reaches the email unless it is in the input.
  • Discovery through citations between registry sources, with no web search and with human approval: it prevents poisoning the registry.
  • A model per stage chosen by measuring against a fixed fixture: the prefilter and compose stages moved to the reasoning model because with the general model the output arrived truncated.
  • Degraded mode: if a stage fails, the edition goes out reduced and says so, instead of not going out at all.
Evidence
First screen of the weekly newsletter with highlights and the models section
Real edition produced by the pipeline: every item with its source, and no URL or figure that is not in the input. It is No. 35 because numbering continues from the reference edition used as a model.

src/validate.js, line 38

function keepSupported(text, pool) {
  let dropped = 0;
  const kept = sentences(text).filter((s) => {
    const ok = significantNumbers(s).every((tok) => [...readings(tok)].some((r) => pool.has(r)));
    if (!ok) dropped++;
    return ok;
  });
  return [kept.join(' '), dropped];
}
Figure validation: a sentence with a number that does not appear in the sources is dropped before sending.

Service · since 2026-06 · Retired

Personal CRM

Personal CRM that consolidated an address book of thousands of contacts and validated it through WhatsApp conversations, with LLM intent classification and a human in the loop.

  • Consolidated about 12,500 contacts from four sources, with LLM-assisted deduplication in 54 reviewable batches.
  • Conversational validation with 15 intents, an output allowlist, a confidence threshold and human escalation.
  • Ran a real event with more than a hundred guests, with invitation, conversational RSVP and final list.
  • Four independent layers against unintended sends plus a fail-closed global kill switch.
Scale
About 12,500 contacts consolidated from 4 sources; one real event run end to end
LLM, 30 days
1 requests, 481 tokens

intent-classification · llm-dedup · human-in-the-loop · confidence-escalation · output-allowlist · speech-to-text · nodejs · sqlite · express · whatsapp-web.js · puppeteer · telegram-bot-api · ollama · docker

Technical overview
  • Platform: Node.js 22 on Docker with Chromium, tick-orchestrated; a Review UI with Express and a SPA for human review.
  • Channels: WhatsApp with two whatsapp-web.js instances (Puppeteer) and a single exit point that checks the kill switch; Telegram with a custom bot (native fetch) for two-way escalations.
  • Contact sources: importers for vCard, WhatsApp export, Instagram and LinkedIn, with normalization and LLM-assisted deduplication in reviewable batches.
  • Data: SQLite with 22 migrations, a state machine with an audit log and rotating backups.
  • LLM: intent and RSVP classification with local models (Ollama), escalating to a more capable model when confidence is low; FAQ suggestions through the self-hosted gateway.
  • Audio: Whisper transcription to classify voice notes.
  • Guardrails: input sanitizing and delimiting, an intent allowlist, a 0.75 confidence threshold with escalation, fixed or approved outgoing texts and a fail-closed kill switch.
Problem and scope

Problem

A personal address book built up over more than ten years (about 12,500 contacts spread across the phone, WhatsApp, Instagram and LinkedIn) is useless for the most basic thing: knowing who you can invite to a gathering. There are duplicates, numbers that changed owner, contacts without a phone and no signal of which relationships are still alive. Cleaning it by hand, contact by contact, does not scale; automating it carelessly means sending the wrong messages to real people from the owner's personal number.

The project set out to solve both at once: consolidate and prioritize the address book, and validate through conversation whether each contact is still current, so that events only go to confirmed people. Always with a human in the loop for the cases the machine cannot handle well.

Scope

  • Contact ingestion and consolidation from several sources, with assisted deduplication.
  • Relevance scoring and segmentation by tier.
  • Conversational validation over WhatsApp ("are you still on this number?") with reply classification.
  • Event management: invitations, conversational RSVP, reminders and final list.
  • Web panel for human review and escalation through Telegram.
Architecture and decisions

Diagram

flowchart LR
  subgraph sources[Sources]
    vcf[vCard] & wa_exp[WhatsApp export] & ig[Instagram] & li[LinkedIn]
  end
  sources --> imp[Importers + normalization]
  imp --> dedup[LLM-assisted dedup]
  dedup --> rev_dedup{{Human review of merges}}
  rev_dedup --> db[(SQLite)]
  db --> score[A/B/C scoring]
  score --> review{{Review UI: approve contacts}}
  review --> tick[Tick-based orchestrator]
  tick --> gates[Gates: approved text, anti-duplicate, rate limit]
  gates --> ks{Global kill switch}
  ks -->|enabled| wa[WhatsApp sender / receiver]
  wa -->|third-party replies| cls[Intent classifier]
  cls --> llm[Local LLM with escalation]
  cls -->|allowlisted intent and high confidence| sm[State machine]
  cls -->|low confidence or sensitive intent| esc[Escalation to Telegram]
  esc --> human{{Owner replies}}
  human --> wa
  sm --> db
  sm --> events[Events: invitation, RSVP, final list]
  events --> gates

Design decisions

  • Unofficial WhatsApp client instead of the official API. The official API required migrating the personal number to a business account and only allows starting conversations with approved templates. The unofficial client was operated with low volume, jitter, warmup, time windows and automatic slowdown on blocking signals.
  • Two-number strategy. The number with history does the validation (contacts recognize it) and hands out the vCard of a new number dedicated to events.
  • Defense in depth against unintended sends. Each layer assumes the previous ones can fail: tick guard, atomic claim by state, check against content already sent and an approved-text gate, plus a fail-closed global kill switch at the single exit point towards WhatsApp.
  • The LLM classifies, it never writes to the contact. The model picks an intent from a closed list; the reply comes from fixed texts or texts approved by the owner.
  • Human in the loop by design. Confidence threshold, intents that always escalate, a review queue and prior approval of contacts and texts.
  • Escalations without personal data. The escalation channel only sees an identifier; the name is resolved in the local database.
  • Every state transition through a single point with an audit log, so it is possible to reconstruct why a contact ended up where it did.
  • Local first, with escalation. Classification with a local model and a retry with a more capable one when confidence is low.
  • Privacy. Own contacts only; third-party data was processed on the owner's server, and neither the database nor the sessions ever entered git.
Results
  • An address book of about 12,500 contacts from four sources was consolidated, with LLM-assisted deduplication in 54 reviewable batches and A/B/C prioritization.
  • The pipeline was used for a real event: more than a hundred guests, invitations with a flyer, conversational RSVP and a final list delivered to the organizer.
  • Protection against unintended sends ended up as four independent layers plus a global brake: a tick-overlap guard, an atomic claim by state, a check against the exact content already sent, an approved-text gate and a fail-closed kill switch covering every exit path.
  • Moving FAQ generation from the local model to the gateway cut response time from 96 seconds to about 4.5 seconds for 9 complete entries.
Evidence

src/shared/kill_switch.js, line 23

export function isOutboundEnabled() {
  try {
    const db = getDb();
    const row = db.prepare(`SELECT enabled FROM system_flags WHERE key = ?`).get(KEY);
    return !!row && row.enabled === 1;
  } catch (err) {
    // Tabla no existe todavía, DB no disponible, lo que sea — fail-closed.
    logger.warn({ module: 'kill_switch', err: err.message }, 'No se pudo leer system_flags — fail-closed (deshabilitado)');
    return false;
  }
}
The only exit point towards contacts: if the flag does not exist or cannot be read, nothing goes out (fail-closed).

Mobile app · since 2026-08 · In production

HealthApp

Native Android app that shows and logs health by area on top of the bot's API, with Health Connect sync, an offline queue and native notifications, and no business logic or LLM on the phone.

  • Native client organized by health area on top of the bot's own API, with no duplicated calculations and no LLM keys on the phone.
  • Replaced two apps with one by absorbing Health Connect sync.
  • Offline write queue with stable request IDs and a read cache, so records are never lost or duplicated without connectivity.
  • Native notifications by polling, with no Firebase or new infrastructure.
  • 36 unit tests for network, queue and transport against a simulated HTTP server.
Scale
Native Android app with 36 tests
CI
passing (2026-11-20)

food-photo-estimation · rag-chat · llm-reports · kotlin · jetpack-compose · material3 · workmanager · health-connect · okhttp

Problem and scope

Problem

A Telegram bot is good for talking and logging, but bad for looking: there are no charts, no status at a glance, and knowing "how am I doing this week" means rereading a wall of text. On top of that, the watch data needed a second app just to sync.

HealthApp is a native client on top of the same backend as the bot, organized by the real areas of the problem, and it is also the only owner of Health Connect reads. It does not replace the bot: Telegram is still where you talk.

Scope

  • Per-area views of what healthbot calculates, with native charts.
  • Deterministic logging (water, weight, measurements, training, supplements) and food logging by photo or text.
  • Health Connect sync to the server (it absorbed healthconnect-bridge).
  • Native notifications that mirror the bot's alerts.
  • Offline operation: write queue and read cache.
Architecture and decisions

Diagram

flowchart LR
  user[User] --> ui[Compose screens by area]
  watch[Watch] --> hc[Health Connect]
  hc --> sync[Sync worker]
  ui --> client[API client with cache]
  ui --> queue[Offline write queue]
  ui --> photo[Photo upload worker]
  queue --> transport[Transport with URL fallback]
  client --> transport
  photo --> transport
  sync --> transport
  notif[Notifications worker] --> transport
  transport -->|token| api[HealthBot API]
  api --> brain[Logic, database and LLM on the server]

Design decisions

  • Thin client, fat server. The server database is the only source of truth, calculations live on the server and the app asks for criteria instead of inventing them.
  • Organized by health area, not by type of view. What you look at together sits together.
  • A single app owns Health Connect. Two apps reading the same data duplicated rows and duplicated friction.
  • Deterministic work does not go through an LLM. "You ate less yesterday, add the difference today" is a subtraction: adding a model brings latency and variability for nothing. The same goes for notification routing.
  • Polling instead of Firebase push. For one user and alerts whose urgency is measured in hours, a periodic worker avoids one more account, project and external service.
  • Acknowledge after showing. Repeating an alert is annoying; losing it makes the system useless.
  • Network fallback only on connection failure. If the server answered, even with an error, no other route is tried.
  • Charts without made-up zeros. A day with no record is not a day at zero.
Results
  • In daily use since August 2026; replaced two apps (viewing and sync) with one.
  • No duplicated calculation between app and bot: the numbers in the app and in Telegram come from the same server function.
  • Offline records that retry on their own, with a stable ID so a retry never duplicates.
  • 36 unit tests for network, offline queue and transport against a simulated HTTP server.
  • Automatic Health Connect sync working after diagnosing, on the real device, two root causes that had kept it from running for 17 days.

Infrastructure · since 2026-06 · In production

Self-hosted platform

Own server that runs every project in containers, with two-factor SSO, VPN remote access, encrypted offsite backups and end-to-end observability.

  • 16 containerized services on a single 8 GB RAM server, separated into three isolated networks.
  • One two-factor login (Google plus custom TOTP) for every internal panel.
  • A minimal public surface (a static site and a token-protected API); everything else is reachable only over VPN.
  • Encrypted local and offsite backups with integrity checks; the snapshot went from 2-3 GB to about 58 MB by backing up only what cannot be rebuilt.
  • End-to-end OpenTelemetry tracing with a custom collector and a persistent queue.
LLM, 30 days
89 requests, 13,103 tokens
Verified
2026-10-30

self-hosted-llm · llm-gateway-hosting · observability · ubuntu · docker · docker-compose · nginx · tailscale · restic · backblaze-b2 · opentelemetry · jaeger · netdata · node

Problem and scope

Problem

A developer with several personal and client projects (bots, APIs, sites, an LLM gateway) needs to run them 24/7 without paying hosting per project, with secure access from anywhere, backups that can actually be restored and visibility into what is happening. Without a common base, each project solved exposure, secrets and backups on its own, and nobody noticed when something stopped working.

Architecture and decisions

Diagram

flowchart LR
  inet((Internet))
  tnet((VPN mesh<br/>Tailscale))
  lan((Home LAN))

  subgraph host[Ubuntu server]
    funnel[Public Funnel]
    serve[VPN-only serve]

    subgraph net_public[public network]
      vw[Vaultwarden]
    end

    hub[SSO hub<br/>Google + TOTP]
    site[Static portfolio site]

    subgraph net_ai[AI network]
      hb[healthbot]
      gw[LLM Gateway<br/>litellm + postgres + redis]
      oll[Ollama]
      otel[OTel Collector]
      jae[Jaeger]
    end

    subgraph outside[Outside Docker]
      walle[OpenClaw / Walle]
      nd[Netdata]
    end

    bk[restic backup]
    disk[(single disk<br/>prod + local backup)]
  end

  b2[(Backblaze B2)]
  lf[Langfuse Cloud]
  prov[Free LLM providers]

  inet --> funnel --> site
  funnel -->|Bearer token| hb
  tnet --> serve --> walle
  tnet --> hub
  tnet --> vw
  tnet --> hb
  lan --> hb

  hub --> gw
  hub --> oll
  hub --> nd
  hb --> gw
  gw --> oll
  gw --> prov

  hb & gw --> otel --> jae
  otel --> lf

  bk --> disk
  bk -->|encrypted| b2

Design decisions

  • A single compose for everything: one server, one owner; it simplifies operations and backups at the cost of coupling life cycles (a careless up recreates everything).
  • Networks separated by function: the apps that consume LLMs cannot see the web services or the client project; the hub is the only bridge, so compromising a web service does not reach the gateway directly.
  • VPN instead of public exposure: all remote access goes through the VPN mesh; the exceptions are a static site and the API the mobile app needs away from home, which has its own token.
  • Custom SSO with a second factor independent from Google: if the Google account is compromised, the TOTP is still required.
  • Back up what cannot be rebuilt, not the working tree: the full history of the repos, the databases and the secrets are backed up; deployed code is rebuilt from git. It took the snapshot from gigabytes to tens of megabytes and made it possible to push everything offsite.
  • Cloud offsite instead of a cold disk: the external disk died; an encrypted object storage provider replaces the offline copy without new hardware.
  • Observability through an intermediate collector: apps export to a single collector that decides destinations (local and cloud), with a persistent queue so traces are not lost if a destination goes down.
Results
  • 16 services running in containers on a single 8 GB RAM server, separated into three isolated networks.
  • Access to every internal panel with a single two-factor login (Google + custom TOTP), with no bypass.
  • A minimal public surface; everything else is reachable only over VPN.
  • Encrypted local + offsite backups with integrity checks; redesigning their scope took each snapshot from 2-3 GB to about 58 MB, and for the first time covered all the code and history of the projects.
  • End-to-end traces (app, gateway, provider) with a custom collector.

Papers

Methods written for other teams to apply, with their evidence and references.

Documento metodológico · v1.0 · octubre de 2026 · 19 pages · ES

De Scrum a Spec-Driven Development

Un método para equipos que ya trabajan con Scrum: cómo aplicarlo, cómo reutilizar sus ceremonias y cómo medir la madurez de la adopción.

Cuando un agente de IA genera la mayor parte del código, el costo de construir cae en órdenes de magnitud, mientras que decidir qué construir y validar lo construido sigue dependiendo de personas. Scrum se diseñó sobre la estructura de costos inversa. El documento presenta Spec-Driven Development en términos operativos: el ciclo de trabajo con sus artefactos y gates, cómo se reconvierte cada ceremonia de Scrum, las métricas que reemplazan a story points y velocity, por qué no es un regreso a la cascada y un modelo de madurez de tres niveles (spec-first, spec-anchored y spec-as-source). Incluye un ejemplo completo en una app móvil, un plan de transición de ocho semanas y un catálogo de modos de falla.

spec-driven development · Scrum · agentes de IA · diseño por contrato · quality gates · modelo de madurez

How to cite

Roberts, J. (2026). De Scrum a Spec-Driven Development (version 1.0).

© 2026 Jorge Roberts. All rights reserved. Authorship is also stored in the PDF metadata.

Posts

What I write about delivery with AI agents. Published on LinkedIn, mirrored here automatically. Also via RSS.

Story points measure volume. Measure validation instead.

2026-11-19

Story points measure volume. Measure validation instead.

Full text

Most teams still plan sprints in story points. Once an AI agent writes most of the code, I think that number stops telling you much.

Generating code got cheap. Checking that it's right didn't.

For 15 years I ran delivery where velocity was a decent proxy. Building was the slow, expensive part, so counting what got built made sense.

Now an agent can produce a feature in an afternoon. A team can double its points and, in the same sprint, pile up rework, drift between spec and code, and review debt that never shows up on the board.

So the question I ask a team has changed. How much of what you built was accepted the first time someone reviewed it?

Across the 70+ AI projects I've worked with this year, these are the numbers I look at, with the bar I set: - first-pass acceptance: 80% or more of agent output approved without rework - rework: under 20% of effort going back into work already marked done - validation latency: finished work waits less than 1 day for a person to check it

None of them reward volume. A team that generates faster than it can verify sees them slip within 2 or 3 sprints, long before velocity says anything is wrong.

When building is nearly free, judgement is the scarce resource. That's what the plan should measure.

If you run teams with agents in the loop: what replaced story points in your planning, if anything did?

#SoftwareDelivery #AIAgents #EngineeringManagement

Human review should follow risk, not volume.

2026-11-17

Human review should follow risk, not volume.

Full text

65% to 78%. That's the number Anthropic chose to report about how its team reviews AI-written code.

Not lines reviewed. Not velocity. The share of pull requests that pass after a single review round.

This week the Claude Code team explained how they review code now that agents write a growing share of it. From a delivery point of view, two decisions stood out to me.

First, human review follows risk, not volume. Low-risk changes can merge without human approval. Medium-risk changes need one person. High-risk changes need two, and sensitive areas like CI always get a human.

Second, review loops are capped. After three rounds, the author is asked to rethink the implementation instead of patching it again. PRs that needed five or more rounds dropped from 8.9% to 1.5%.

That second rule is the one I see missing most often. Endless review rounds are where AI speed quietly turns into rework, and nobody's board shows it.

The takeaway for delivery leaders: decide in advance where human judgement is required, and measure whether work passes the first time.

The person directing the agent is still accountable for the code. Governance just decides where that person's attention goes.

How does your team decide which AI-generated changes still need two human approvals?

#SoftwareDelivery #AIAgents #EngineeringManagement