Category
Technical Notes
- ·3 min read
Lefthook for a Static Site: Four Hooks That Earn Their Keep
A static Astro site doesn't need Husky-grade ceremony. But it does have four failure modes worth catching before they reach `main`: a broken type, a leaked key, a post without a `directory:` field, and a build that silently breaks production. Here's the lefthook.yml I landed on, and why each hook is there.

- ·3 min read
Raw SQL migrations: when they're enough, and the four cracks that force Alembic
Clipdex ships migrations as numbered `.sql` files applied by a Taskfile loop. That's been the right call for a teaching artifact. Here are the four specific cracks that will eventually force a move to Alembic — and the test for when 'eventually' becomes 'now'.

- ·3 min read
SMS Is a Lossy Channel: An Architect's Guide to OTPs, Alerts, and Graceful Degradation
SMS looks like a reliable transport because it usually works. Architecturally, it's a best-effort store-and-forward network with no end-to-end SLA. Here's what every engineer should design for before wiring OTPs, alerts, or 2FA to a text message.

- ·3 min read
The question generator, the cron job, and shipping it locally
Grounded question generation is one prompt away. Wrap the project with a local cron, a one-line backup, and a popular-guests landing query — and the podcast index runs on its own.

- ·3 min read
The React side: guest pages, search UI, and codegen'd types
A Vite + React SPA with three real pages — popular guests, guest detail, search — wired to FastAPI through codegen'd TypeScript types from a shared Pydantic schema. No UI framework, three pages, type-safe end to end.

- ·3 min read
Search without embeddings: Postgres tsvector, LLM rerank, and 30-second clips
For a few hundred podcast episodes, Postgres full-text search plus an LLM rerank beats embedding-based RAG on both quality and operational simplicity. No vector DB, no embedding pipeline.

- ·3 min read
Building a provider-switching LLM client: one interface, three providers, task-tier routing
A small adapter package lets you swap Anthropic, OpenAI, and local Ollama via an env var, route cheap classification to Haiku and synthesis to Opus, and add prompt caching without touching call sites.

- ·3 min read
Entity resolution for guests: fuzzy matching first, LLM disambiguation second
The same person shows up as 'Bibhusan Bista', 'Bibhusan B.', and 'B. Bista' across three episodes. Don't ask the LLM first — try cheap deterministic matching, then escalate only the ambiguous cases.

- ·3 min read
Structured extraction with Pydantic + Claude: guests, topics, and quotes from raw transcripts
Schema-first prompting with Pydantic + Anthropic tool use, a Haiku triage pass that gates Sonnet extraction, prompt caching for the system block, and a single retry that feeds the validation error back into the prompt.

- ·3 min read
Ingesting YouTube transcripts: yt-dlp for subs, Whisper when subs don't exist
YouTube's Data API gives you channel discovery but not third-party caption text — that endpoint is OAuth-only in practice. The honest pipeline is yt-dlp in subs-only mode for captions, and local Whisper as a deeper fallback when no captions exist at all.
