Open to senior marketing leadership opportunities across MENA and Europe

Personal Project

Personal Project

Second Brain: Personal AI Operating System

Node.js · Claude Sonnet 4.6 · Haiku 4.5 · Voyage AI · Whisper · WHOOP · Obsidian · MCP · Telegram · Cloudflare

Second Brain: Personal AI Operating System

A Telegram bot backed by Claude, with an Obsidian vault as its long-term memory, now searchable by chunked semantic embeddings and exposed to the Claude app and Claude Code through a hosted MCP server, running 24/7 on a cloud server with scheduled briefings, a SQLite task store, WHOOP health intelligence, voice notes, document and book ingestion, a tool-use agent suite, and branded output generation

AI & Knowledge SystemsNode.jsClaude APIObsidianSemantic SearchMCPAgent SuiteVoice AIHealth IntelligencePersonal Build

Personal Project · Live in Production

~2,300

Curated Vectors

Chunked Voyage AI embeddings, kept clean by excluding 1,437 raw chat-log vectors from retrieval

43+

Bot Commands

Capture, retrieval, tasks, health, research, output, and agents

4

MCP Tools

search_vault, get_note, list_assets, save_note

~$15-25

Monthly Cost

Claude, Voyage, Whisper, Serper, Apify, Hetzner combined

The Problem

The Problem

Every Claude and ChatGPT session starts from zero. The AI knows everything in the conversation and nothing the next time you open it. Ideas, decisions, and project history are scattered across Notion, email drafts, chat logs, and memory with no connection between them.

Three problems exist with AI tools as they stand. First, no persistent memory: every session resets, forcing you to re-explain context that already exists somewhere else. Second, reactive only: the assistant waits to be asked. It never surfaces what you need to know proactively. Third, no capture layer: tasks and insights mentioned in conversation disappear unless you manually file them somewhere.

The result: powerful AI tools that are functionally amnesiac, passive, and lossy. This build fixes all three.

What It Does

What It Does

One message. Full pipeline. Every conversation analyzed, filed, and acted on, automatically.

1

Receive and Authorize

Every message sent to the bot is validated against a single authorized Chat ID. The bot runs 24/7 as a PM2 process on a Hetzner VPS, no laptop required, no manual start.

2

Search the Vault

Before calling Claude, the bot runs a semantic search across the Obsidian vault using Voyage AI embeddings (~2,300 curated chunked vectors, auto-reindexed as new notes are saved and deliberately kept free of raw chat transcripts) and retrieves the most relevant notes by meaning rather than keyword match. Their titles and content seed the Claude prompt as context, giving the AI access to projects, decisions, and prior conversations before it generates a response.

3

Web Search (Conditional)

If the message contains time-sensitive signals such as questions, proper nouns, and keywords like "today", "latest", "price", and "score", the bot calls Serper API with a 24-hour freshness filter and injects the top 3 live results. Memory and live data in one unified response.

4

Claude Responds with Memory

Claude Sonnet 4.6 receives a structured prompt and runs a tool-use agent loop: rather than relying only on pre-injected context, it decides what to retrieve, pulling additional vault notes, live web results, or API spend data through tools as the question demands. The last 6 turns are replayed for true multi-turn awareness, /think replies stream token by token, and long responses are chunked to respect Telegram’s 4000-character message limit.

5

Smart Save Filter

After every response, Claude Haiku 4.5 scores the exchange 1, 2, or 3. Score 1 (low value, casual chatter) is skipped. Score 2 or 3 triggers an automatic save to the vault as a timestamped markdown note with YAML frontmatter. This keeps the vault high-signal rather than full of noise.

6

Deliberate Task Store

Tasks live in a SQLite-backed store with stable IDs, created, due, and completed dates, project, priority, and open/done/cancelled status, with the markdown task log kept as a projection. Auto-extraction from conversation was deliberately retired after producing noisy, sometimes hallucinated tasks. Every /done and /cancel passes a confirmation gate that shows the exact task and never bulk-completes.

Scheduled Agents

Scheduled Agents

Three proactive agents run on a fixed schedule. The system pushes intelligence to you. It does not wait to be asked.

01

Morning Briefing

07:30 daily · Asia/Dubai

Pulls open tasks, recent conversations, and active projects into a structured briefing with three sections: FOCUS TODAY, PROJECTS, and REMINDERS. The briefing is computed deterministically in code from the task log rather than delegated to the model, so nothing in it can be invented. Delivered to Telegram every morning. Also available on demand via /briefing.

02

Afternoon Nudge

15:00 daily · Asia/Dubai

Sends a 2 to 3 line task-aware accountability check at 15:00. Silently skips when there are no open tasks, no empty nudges, no noise. Also available on demand via /nudge.

03

Weekly Review

18:00 Sundays · Asia/Dubai

Synthesizes the week’s conversations, tasks, and projects into four sections: WINS, OPEN LOOPS, PATTERNS, and NEXT WEEK. Delivered to Telegram and saved as a permanent note to the vault. Also available on demand via /review.

Capabilities

Core Capabilities

Built across eight phases, from the original foundation to a full agent suite, measured retrieval, and production infrastructure. Each capability has a distinct purpose.

Persistent Memory

Every worthy exchange scored and saved automatically. Vault context injected into every future Claude call, the assistant compounds in usefulness instead of resetting.

Semantic Search

Voyage AI embeddings, ~2,300 curated chunked vectors, retrieve context by meaning, not keyword match. The count reflects deliberate curation: raw chat-log vectors were excluded so real notes surface first. The index auto-reindexes as new notes are saved and prunes stale vectors, so retrieval stays current without manual work.

Tool-Use Agent Loop

Claude decides what to retrieve instead of guessing from pre-injected context. It calls vault search, web search, and spend tools mid-response, so answers are grounded in exactly the context each question needs.

Proactive Scheduling

Three scheduled agents push intelligence daily and weekly. The system starts conversations, not only answers them.

Voice to Insight

Send a voice note and OpenAI Whisper transcribes it into the same pipeline as text. Speak a question on the move and get back a researched, vault-aware answer.

Research & Competitive Intelligence

/research synthesizes live web results into a briefing, and /competitive crawls any company site through the Apify Website Content Crawler. Both can chain straight into a branded deck or report.

Book Intelligence

Drop in a book PDF and it is chunked into part notes with an index note, fully embedded and searchable. /book scopes Q&A to a single title, /listbooks shows the shelf.

Two-Way Sync & Backups

rclone bisync keeps the vault mirrored two ways with Google Drive, a private GitHub repo holds version history, and nightly Drive backups with 7-day retention mean nothing is ever a single point of failure.

Multi-Step Command Chains

A "then" keyword chains commands in one message: "/research Dubai proptech then deck" produces a research report and a branded deck from a single instruction.

Deliberate Task Store

Auto-extraction was retired after producing noisy, hallucinated tasks. A SQLite store with stable IDs, dates, project, priority, and open/done/cancelled status is now the single source of truth, with a confirmation gate on every /done and /cancel.

WHOOP Health Intelligence

/whoop and /whoop_deep pull recovery, HRV, resting heart rate, sleep, and strain from the WHOOP API into a SQLite time-series. Baselines, deviation, trend, and sleep debt are computed in code, so advice references your own history, never a lone snapshot.

Measured Retrieval Quality

A 30-question evaluation harness with expected-note matching scores retrieval objectively: 90% at baseline, 97% after excluding chat-log noise, 100% after enriching a key canonical note, with regression protection on every index change.

Document Ingestion Pipeline

Send any PDF, PPTX, or DOCX via Telegram. It is parsed, auto-classified by Claude, and filed into the correct PARA folder automatically, with a vault note saved and the original backed up to Google Drive.

Branded Output Generation

The /deck, /report, /brief, and /onepager commands turn vault content into polished documents on a charcoal, gold, and cream branded template, generated on demand from what the system already knows.

Real-Time Web Search

Time-sensitive queries automatically routed through Serper with a 24-hour freshness filter. Live results merged with vault context in one Claude prompt.

Hosted MCP Server

The vault is exposed to the Claude app and Claude Code through a hosted MCP server with four tools, reachable at vault.stevehaddad.io over a permanent Cloudflare tunnel, read and write access from any Claude surface.

Build Timeline

Eight Phases

From a single-purpose bot to a full personal AI operating system. Each phase shipped to production before the next began.

01

Foundation

Telegram bot with semantic search, Voyage AI embeddings, daily briefing, weekly review, task management, session memory, and a 201-conversation ChatGPT history import.

02

Knowledge Library

Auto-reindex on every save, /drive Google Drive reads, an API spend tracker, and a full PDF/PPTX/DOCX ingestion pipeline with Haiku auto-classification and PARA auto-filing on a 15-minute Drive inbox poll.

03

Output Generation

/deck, /report, /brief, and /onepager on a branded charcoal, gold, and cream template with vault context retrieval, Drive delivery, and real bar charts on metric slides via pptxgenjs 4.0.1.

04

Vault MCP Server

A hosted MCP server on Hetzner over Streamable HTTP and a permanent Cloudflare tunnel at vault.stevehaddad.io, bearer-token auth, all four tools live in the Claude app and Claude Code, with the domain migrated to Cloudflare.

05

Hardening & Audit

19 bugs and security issues resolved: a shared spend module, YAML frontmatter protection, a similarity floor on search, chunked embeddings (537 notes, 2,265 vectors), stale-embedding pruning, and session-memory flush on restart.

06

Agent Suite

A tool-use agent loop where Claude pulls context via tools, streaming /think replies, structured outputs, and new commands (/research, /competitive, /decision, /prep, /doc, /proposal, /linkedin, /email), chainable with a "then" keyword.

07

Intelligence & Infrastructure

Voice notes via Whisper, two-way rclone bisync, a private GitHub repo, nightly Drive backups, a healthchecks.io uptime heartbeat, /book scoped Q&A over chunked book PDFs, and Cloudflare WAF hardening.

08

Measurement, Health Intelligence & Data Integrity

WHOOP recovery, sleep, and strain in a SQLite time-series with code-computed 7/28/90-day baselines, a SQLite task store with confirmation gates, a 30-question retrieval eval (90% → 100%), a 39% index cleanup behind a single shared exclusion predicate, and nightly SQLite online-backups.

Phase 8

Measurement, Health Intelligence & Data Integrity

The newest phase is about trusting the system: physiological data with baselines computed in code, a task store that cannot invent work, retrieval quality as a measured number, and an index kept deliberately clean.

01

WHOOP Health Intelligence

/whoop and /whoop_deep pull recovery, HRV, resting heart rate, sleep, and strain from the WHOOP API into a dedicated SQLite time-series holding 90+ days of daily physiological records. 7, 28, and 90-day personal baselines, deviation from baseline, trend, and sleep debt are computed in code, so a recommendation reads "42% recovery, 14 points below your 28-day baseline" instead of a raw number with no context.

02

SQLite Task Store

Auto-extraction produced noisy, sometimes hallucinated tasks, so it was replaced with an intentional store: stable IDs, created, due, and completed dates, project, priority, and open/done/cancelled status, with markdown as a projection. Every /done and /cancel shows the exact task behind a confirmation gate, and cancelled stays distinct from done so task hygiene is never counted as completed work.

03

Retrieval Evaluation Harness

A 30-question evaluation set with expected-note matching measures retrieval quality objectively. Baseline: 90%. After excluding chat-log noise: 97%. After enriching a key canonical note: 100%. "Is retrieval good?" went from an assumption to a measured number with regression protection.

04

Data Integrity

Removed 39% of the vector index — 1,437 raw chat-transcript vectors that buried curated notes in retrieval — and unified the index-exclusion logic into a single source of truth so it can never drift. The WHOOP and task databases joined the nightly backup rotation via the SQLite online-backup API.

System Architecture

System Architecture

Two message paths and three scheduled agents. Every component has a single responsibility.

1

Telegram Interface

User sends message, voice note, file, or slash command

Single authorized Chat ID only

2

Node.js Bot

Message router and pipeline orchestrator

PM2 · Node.js 24 · 24/7 on Hetzner CX23

3

Semantic Vault Search

Most relevant notes retrieved and injected

Voyage AI · ~2,300 curated vectors · auto-reindexed

4

Serper Search

Live results fetched if query is time-sensitive

24-hour freshness filter · top 3 results

5

Claude Sonnet 4.6

Tool-use agent loop · pulls context on demand · last 6 turns replayed

Direct axios · prompt caching · 90s timeout · 3 retries

6

Smart Save Filter

Haiku scores exchange 1/2/3 · saves if score 2 or 3

Low-value chatter stays out of vault

7

SQLite Task Store

Deliberate /task capture · confirmation-gated /done and /cancel

Stable IDs · open/done/cancelled · markdown projection

8

Obsidian Vault

Note saved as markdown with YAML frontmatter

03-Resources/Chats/Telegram/ · PARA structure

9

Google Drive

Original PDFs and images backed up by category

OAuth2 · Blood Tests · Reports · Presentations

Scheduled Agents

Morning Briefing

node-cron 07:30 Asia/Dubai daily

Pulls tasks + recent chats + projects → Telegram

Afternoon Nudge

node-cron 15:00 Asia/Dubai daily

Task-aware ping · skips silently if no open tasks

Weekly Review

node-cron 18:00 Asia/Dubai Sundays

Synthesizes week → Telegram + saved to vault

Two message paths. Three scheduled agents. One system that remembers, acts, and improves.

The Knowledge Vault

The Knowledge Vault

Markdown notes across a PARA structure, embedded as ~2,300 curated chunked vectors with Voyage AI for semantic search. That count reflects deliberate curation, not just growth: 1,437 raw chat-log vectors, 39% of the index, were excluded so retrieval surfaces real notes instead of transcripts. Every note carries YAML frontmatter enabling cross-note linking and the Obsidian visual knowledge graph.

00-Inbox

New captures pending filing

01-Projects

Notes across active projects

02-Areas

Health, People, Work, ongoing responsibilities

03-Resources/Chats/ChatGPT

201 imported conversations

03-Resources/Chats/Telegram

Auto-saved bot exchanges · excluded from the search index

03-Resources/Books

Ingested books · chunked part notes + index

03-Resources/Reports

Generated branded reports and outputs

03-Resources/Daily

Daily notes and archived weekly reviews

04-Archive

Paused projects and legacy vault backup

05-Templates

Daily, Meeting, and Project note templates

Tasks/task-log.md

Markdown projection of the SQLite task store

The vault started empty. Every conversation, document, and decision adds to it. After 90 days of daily use, the AI has genuine context on how you think and what you work on.

Bot Commands

Bot Commands

43+ commands across capture, retrieval, tasks, health intelligence, knowledge, an agent suite, output generation, and scheduled agents. Everything else is automatic.

─────────────────────────────────────
BOT COMMANDS · @Steve_brain_bot
─────────────────────────────────────
FOUNDATION
/save [text] Save any idea or note to the vault
/project [name] Scaffold a new note in 01-Projects/
/find [query] Top 5 full-text vault search results
/health [text] Create an entry in 02-Areas/Health/
/summarize [url] Summarize any URL
/recap Summarize the last 7 days of chats
/today List all notes created today
/graph Show 20 most recently modified notes
/changes Recent vault changes at a glance
/archive [project] Archive a completed project
/delete [note] Delete a vault note · inline confirmation first
TASK LAYER
/task [desc] Add an open task · optional due: YYYY-MM-DD
/done [task] Complete a task · confirmation shows the exact task
/cancel [task] Retire a task without counting it as done
/tasks List all open tasks
HEALTH INTELLIGENCE
/whoop Recovery, HRV, sleep, and strain vs your baselines
/whoop_deep Deep health readout + personalized recommendations
KNOWLEDGE & MEMORY
/memory View and manage long-term MEMORY.md
/drive Read a file from Google Drive by name
/spend Running Claude + Voyage API spend total
/spend_cap Monthly spend cap status · warn + hard-stop limits
/status System health and stats on demand
/ingest Ingest and auto-file the last uploaded doc
/ingest_status List stuck ingestion files and errors
/ingest_retry Move stuck files back to the inbox
/ingest_failures List ingestion error notes
/book [title] Scoped Q&A over a single indexed book
/lesson [book] Practical lessons from a book for your situation
/booksummary Structured summary of an indexed book
/listbooks List every ingested book on the shelf
AGENT SUITE
/think [prompt] Streaming, tool-using deep reasoning
/research [topic] Web synthesis into a briefing
/competitive [co] Apify site crawl + competitive readout
/decision [topic] Decision memo grounded in vault history
/prep [meeting] Meeting brief from vault + web
/reddit [topic] Community insights from live Reddit threads
OUTPUT GENERATION
/doc [topic] Word document (.docx)
/proposal [client] Client proposal draft
/linkedin [topic] LinkedIn post draft
/email [topic] Email draft
/deck [topic] Branded slide deck from vault content
/report [topic] Long-form branded report
/brief [topic] Concise briefing document
/onepager [topic] Single-page branded summary
SCHEDULED AGENTS (on demand)
/briefing Generate morning briefing now
/nudge Generate afternoon nudge now
/review Generate and save weekly review now
Chain any commands with "then" in one message
─────────────────────────────────────
AUTO-CAPTURED (no command needed)
─────────────────────────────────────
Worthy exchanges Scored by Haiku · saved if score 2 or 3
Voice notes Whisper transcribes · runs the full pipeline
PDF / PPTX / DOCX Parsed · auto-classified · filed into PARA
Book PDFs Chunked into part notes + index · searchable
Image uploads Vision analysis + Drive backup + vault note
Web search Live results injected and logged with context
Embedding index Auto-reindexed on save · chat logs excluded · pruned
API spend Every Claude and Voyage call logged and totaled
Nightly backups Task + health SQLite stores · online-backup API
─────────────────────────────────────

Vault MCP Server

Vault MCP Server

The vault is no longer locked inside Telegram. A hosted MCP server at vault.stevehaddad.io, reachable over a permanent Cloudflare tunnel, exposes four tools to the Claude app and Claude Code, so the same knowledge base is searchable and writable from any Claude surface.

search_vault

Semantic search over the vault, returns the most relevant notes by meaning

get_note

Fetch the full content of a specific note by path or title

list_assets

List vault files and attachments across the PARA structure

save_note

Write a new note into the vault from any Claude surface

Connected to both the Claude app and Claude Code. Read the vault, pull a specific note, list assets, or save new notes, all without opening Telegram.

Technical Depth

Technical Depth

Key engineering decisions across eight build phases.

Two Model Tiers, Voyage Embeddings, and Whisper

Claude Sonnet 4.6 handles all conversation, synthesis, and scheduled briefings. Claude Haiku 4.5 handles high-volume, low-stakes tasks: scoring exchanges for vault eligibility and classifying ingested documents. Voyage AI generates the embeddings behind semantic search, and OpenAI Whisper transcribes voice notes. Prompt caching on every Claude call trims repeat token cost. Running on Node.js 24 on a Hetzner CX23, this keeps quality high where it matters and total cost at approximately $15 to $25 per month at moderate daily use.

Smart Save Filter

Every exchange is scored 1, 2, or 3 by Haiku before any save decision is made. Score 1 (casual chatter, simple confirmations) is discarded. Score 2 or 3 triggers a vault write. A fail-safe saves on classifier error so no worthy exchange is ever lost. The vault stays high-signal automatically.

From Silent Extraction to an Intentional Task Store

The original design had Haiku silently extract tasks from every saved exchange. In practice, auto-extraction produced noisy, sometimes hallucinated tasks, so it was disabled and replaced with a deliberate SQLite-backed store: stable IDs, created, due, and completed dates, project, priority, and open/done/cancelled status, with the markdown task log kept as a projection. Every /done and /cancel passes a confirmation gate that shows the exact task and never bulk-completes, and cancelled stays distinct from done so task hygiene is never counted as completed work.

Multi-Turn Conversation Memory

The last 6 raw message turns are replayed into every Claude prompt, giving the model true short-term conversational context within a session. In-memory per-process, resets on restart. Vault context provides long-term persistence across sessions.

PARA Vault Migration

The original flat folder structure was migrated to a numbered PARA system (00-Inbox through 05-Templates) with all 14 bot.js write and read paths updated in the same coordinated deployment. A matched-count safety check ran before any old folder was deleted. 270 notes moved without loss.

ChatGPT History Import

A standalone importer reconstructed 201 conversations from a ChatGPT export, skipped 67 thin chats, wrote clean vault notes with a dry-run mode and timestamp collision guard, then removed itself and the export file from the server. Years of prior thinking became searchable context overnight.

axios over Anthropic SDK

The Anthropic SDK throws Premature close errors on the Hetzner host. All Claude API calls use direct axios HTTP with manual headers, a 90-second timeout, and 3 retry attempts. This is the confirmed working pattern for this server environment.

Scheduled Agents via node-cron

Three cron jobs run timezone-pinned to Asia/Dubai: morning briefing at 07:30, afternoon nudge at 15:00, and weekly review at 18:00 on Sundays. Each job is wrapped in try/catch with failure logging. ensureTaskFile() runs once at startup so the task layer is always ready before the first cron fires.

Chunked Semantic Search with Voyage AI

Notes are split into passages and embedded with Voyage AI into a vector index of ~2,300 curated chunked vectors stored in SQLite, with raw chat transcripts excluded at index time. Chunking lets long notes match on the specific passage that is relevant rather than an averaged whole-note vector. Retrieval ranks by cosine similarity above a similarity floor that filters weak matches, the index auto-reindexes whenever a note is saved, and stale vectors are pruned so search stays current with zero manual maintenance.

Multi-Format Ingestion Pipeline

PDF, PPTX, and DOCX uploads are parsed to text, then Claude classifies each document and files it into the correct PARA folder automatically. A vault note is written with structured analysis and the original is backed up to Google Drive, turning any dropped file into searchable, filed knowledge without manual sorting.

Branded Output Generation

The /deck, /report, /brief, and /onepager commands assemble vault content into finished documents rendered on a consistent charcoal, gold, and cream branded template. Generation pulls from indexed notes so outputs reflect what the system already knows rather than starting from a blank page.

Hosted MCP Server over Cloudflare Tunnel

A Model Context Protocol server exposes four tools, search_vault, get_note, list_assets, and save_note, over a permanent Cloudflare tunnel at vault.stevehaddad.io. Both the Claude app and Claude Code connect to it, giving every Claude surface authenticated read and write access to the same vault the Telegram bot uses.

API Spend Tracking

A shared spend.js module logs every Claude and Voyage AI call with token usage and cost, accumulating a running monthly total surfaced on demand via /spend. Spend is observable rather than a surprise at the end of the month, which is what keeps the whole system verifiably inside the $15 to $25 range.

Tool-Use Agent Loop

Conversation moved from static pre-injected context to a tool-use agent loop. Claude is given tools for vault search, web search, and spend lookup, and decides for itself what to pull and when, iterating until it has what it needs. Generators return structured outputs so decks, reports, and documents assemble from typed fields rather than parsed free text.

Voice Notes via Whisper

Telegram voice notes are downloaded, sent to OpenAI Whisper-1 for transcription, and fed into the exact same pipeline as a typed message, so a spoken question flows through semantic search, the agent loop, smart-save scoring, with no separate path.

Research and Competitive Intelligence

/research fans a topic out through Serper and synthesizes the results into a briefing. /competitive drives the Apify Website Content Crawler over a target company site and turns the crawl into a structured competitive readout. Either can chain into a branded deck or report in the same message.

Book Intelligence

A book PDF is parsed, split into sequential part notes, and given an index note that ties the parts together. Every part is embedded, so /book scopes retrieval and Q&A to one title while /listbooks enumerates the shelf. Long-form reading becomes queryable knowledge rather than a static file.

Two-Way Sync, Backups, and Version Control

rclone bisync mirrors the vault two ways with Google Drive so edits from any device converge. A private GitHub repo (stylo-dev-dxb/second-brain) holds the code and vault history, and a 2am cron pushes nightly backups to Drive with 7-day retention. No single machine or service is a point of failure.

Uptime Monitoring and WAF Hardening

The bot pings a healthchecks.io check on a heartbeat, so a silent crash raises an alert instead of going unnoticed. Cloudflare WAF rules sit in front of the MCP tunnel and site, hardening the public surface after the migration off Namecheap DNS.

Computed Health Baselines over WHOOP Data

/whoop and /whoop_deep pull recovery, HRV, resting heart rate, sleep, and strain from the WHOOP API into a dedicated SQLite time-series holding 90+ days of daily physiological records. 7, 28, and 90-day personal baselines, deviation from baseline, trend, and sleep debt are computed in code, so a recommendation reads "42% recovery, 14 points below your 28-day baseline" instead of a raw number with no context. Reasoning is grounded in computed signals, never a single unreferenced snapshot.

Retrieval Evaluation Harness

A 30-question evaluation set with expected-note matching measures retrieval quality objectively. The baseline scored 90%. Excluding chat-log noise lifted it to 97%, and enriching a key canonical note brought it to 100%. "Is retrieval good?" went from an assumption to a measured number, with regression protection on every future index change.

One Exclusion Predicate, Zero Index Drift

Raw chat transcripts made up 39% of the vector index and buried curated notes in retrieval, so 1,437 of those vectors were removed and the index-exclusion logic was unified into a single shared predicate, so the build and reindex paths can never drift apart. The WHOOP and task databases also joined the nightly backup rotation via the SQLite online-backup API.

Tech Stack

Tech Stack

The complete stack running in production, from the VPS up to the delivery and reliability layers.

Infrastructure

  • ·Hetzner CX23 VPS
  • ·Node.js 24
  • ·PM2 · 3 processes
  • ·GitHub (private repo)

Bot & Messaging

  • ·Telegram
  • ·node-telegram-bot-api 0.66.0

AI & Reasoning

  • ·Claude Sonnet 4.6 · axios
  • ·Claude Haiku 4.5 · axios
  • ·OpenAI Whisper-1
  • ·Prompt caching

Search & Retrieval

  • ·Voyage AI voyage-3-lite
  • ·~2,300 curated vectors · SQLite
  • ·Serper web search
  • ·Apify Website Content Crawler
  • ·30-question retrieval eval harness

Health & Tasks

  • ·WHOOP API
  • ·SQLite health time-series · 90+ days
  • ·Computed 7/28/90-day baselines
  • ·SQLite task store · stable IDs

Ingestion & Output

  • ·pdf-parse
  • ·officeparser
  • ·pptxgenjs 4.0.1
  • ·docx

Integration & Delivery

  • ·@modelcontextprotocol/sdk · Streamable HTTP
  • ·Cloudflare tunnel · DNS · WAF
  • ·rclone bisync
  • ·Google Drive OAuth2

Reliability

  • ·Nightly Drive backups · 7-day retention
  • ·SQLite online-backup · task + health DBs
  • ·healthchecks.io heartbeat
  • ·Matched-count safety checks

What I Built

What I Built

Designed, built, and deployed across eight build phases. Every component below was architected, coded, debugged, and shipped by me.

Designed the full pipeline from Telegram input to vault output across eight build phases

Built the Obsidian vault helper module with search, write, read, append, and link functions

Built the Telegram bot with 43+ commands, voice-note handling, file handling, and message chunking

Engineered the Smart Save Filter using Haiku to score every exchange before any vault write

Replaced silent task extraction, which produced noisy and sometimes hallucinated tasks, with a SQLite-backed task store: stable IDs, created/due/completed dates, project, priority, and a confirmation gate on every /done and /cancel

Implemented multi-turn conversation memory with a 6-turn in-session replay

Built three scheduled agents using node-cron pinned to Asia/Dubai timezone

Migrated the vault from flat folders to a PARA structure with matched-count safety checks

Imported 201 ChatGPT conversations into structured vault notes with a dry-run importer

Integrated Serper web search with keyword-based trigger detection and 24-hour freshness filtering

Implemented Google Drive OAuth2 backup with automatic folder routing by file type

Deployed as a PM2 process on Node.js 24 on a Hetzner CX23 with full and fast-redeploy PowerShell scripts

Built a chunked semantic search layer over the vault using Voyage AI embeddings (~2,300 curated vectors, raw chat transcripts excluded) with automatic reindexing and stale-vector pruning

Built a multi-format ingestion pipeline that parses PDF, PPTX, and DOCX, auto-classifies each file, and files it into the correct PARA folder

Built branded output generation with /deck, /report, /brief, and /onepager on a charcoal, gold, and cream template

Built and deployed a Vault MCP server exposing four tools, connected to the Claude app and Claude Code over a permanent Cloudflare tunnel at vault.stevehaddad.io

Rearchitected conversation into a tool-use agent loop with streaming /think replies and structured outputs for every generator

Added an agent suite: /research web synthesis, /competitive Apify site crawls, /decision, /prep, /doc, /proposal, /linkedin, and /email, chainable with a "then" keyword

Added voice notes transcribed by OpenAI Whisper and routed through the full text pipeline

Built book intelligence: PDF ingestion into chunked part notes with an index note, plus /book scoped Q&A and /listbooks

Added two-way rclone bisync with Google Drive, a private GitHub repo, nightly 2am Drive backups with 7-day retention, and a healthchecks.io uptime heartbeat

Hardened the system through a 19-issue security and reliability audit, added prompt caching and Cloudflare WAF rules, and migrated DNS from Namecheap to Cloudflare

Added Google Drive file read and a shared API spend tracker logging every Claude and Voyage call against a running monthly total

Resolved production issues: Hetzner SDK incompatibility, Google service account quota failure, Telegram library ESM breaking change, Haiku task hallucination, and PARA migration path conflicts

Integrated the WHOOP API with a SQLite health time-series holding 90+ days of daily records, computing 7/28/90-day baselines, deviation, trend, and sleep debt in code

Rebuilt the morning briefing as deterministic code over the task log — FOCUS TODAY, PROJECTS, REMINDERS — so nothing in it can be invented

Built a 30-question retrieval evaluation harness with expected-note matching, lifting measured retrieval quality from 90% to 100%

Cleaned 39% of the vector index (1,437 raw chat-transcript vectors), unified index-exclusion logic into a single shared predicate, and added the task and health databases to nightly backups via the SQLite online-backup API

Every AI session used to start from zero. Now it starts from a curated index of ~2,300 semantically searchable vectors, measured at 100% retrieval on a 30-question eval, reachable from Telegram, the Claude app, and Claude Code alike. The assistant gets more useful every day without any extra effort.

Back to AI Systems