Hacker News

Subscribe to Hacker News feed
Hacker News RSS
Updated: 28 min 9 sec ago

Rational Magic (2023)

Mon, 02/16/2026 - 9:50am
Categories: Hacker News

Show HN: A "content compiler" that turns LLM output into validated artifacts

Mon, 02/16/2026 - 9:49am

Most AI tools generate text. Very few generate finished artifacts you can ship.

I expected the hard part to be prompt engineering. It wasn't. The hard part is what happens after generation: enforcing structural invariants so the output is actually usable -- every section present, no "coming soon" placeholders, no layout that falls apart at export time.

I ended up treating LLM output the way a compiler treats source code: intent goes in, validated artifacts come out, deterministic rules sit between the model and the user.

Live at https://gixo.ai -- sample outputs on the homepage, no signup required. This post is about the engineering, not the product.

--

STYLE GUIDES AS COMPILER RULES

Every content type has a typed style guide -- required sections, structural constraints, quality checklists, which elements are mandatory vs. negotiable. Transformations between types (blog post to video script, guide to checklist) carry a Confidence score and explicit LostElements so the user knows what the conversion costs.

The LLM is the code generator. The style guide is the type system. Output that doesn't satisfy the constraints fails -- a presentation deck missing its title slide or section dividers triggers bounded regeneration rather than silent acceptance.

WHY BLAZOR SERVER?

SignalR gives me real-time push for free, and server rendering means I access the database and message bus directly -- no separate API gateway.

The tradeoff: every user holds an open WebSocket. For a content tool where users are actively editing, the connection is already there and I use it for everything -- progress updates, collaboration, AI streaming.

The non-obvious gotcha: when a Blazor Server component calls its own /api/ endpoint, the request doesn't carry the browser's cookies. I had to write a DelegatingHandler that forwards the auth cookie from the inbound HttpContext onto the outgoing request. Without it, every internal API call returns 401. I struggled to find clear documentation for this pattern.

AUTHORIZATION WITHOUT [AUTHORIZE] SPRAWL

Once you have dozens of controllers, policy decorators become invisible. I replaced them with a single middleware scoped to API routes that separates two concepts:

1. Permission (role-based): "Is this user allowed to do this?" 2. Entitlement (subscription-based): "Has this user paid for this?"

If the entitlement service isn't registered in production, the middleware denies access rather than silently making paid routes free. Fail-closed on billing -- you only add that after you discover the alternative.

THE OPS LESSON THAT COST ME A WEEKEND

Azure App Service recycles containers. If your DataProtection keys live in memory, every restart invalidates every auth cookie. The symptom: infinite login redirect loop plus a SignalR disconnect storm. I lost a weekend to this. Fix: persist keys to durable storage outside the container.

Separately: I applied rate limiting globally and immediately broke every real-time feature. It now excludes WebSocket paths.

HONEST TRADEOFFS I HAVEN'T FIXED

Auth is overengineered. Multiple generations of authentication coexist -- cookie sessions, JWT flows, two identity enrichment paths. An internal audit calls it "overengineered in practice." I haven't consolidated because the current system works and touching auth is terrifying.

CI doesn't gate on tests. Build-and-deploy, not build-test-deploy. There are multiple test projects, but they don't gate deployment yet.

Observability is incomplete. Structured logging is solid. Distributed tracing is on the list, not in the code.

--

Happy to answer questions about the architecture, the tradeoffs, or any of the things I got wrong.

Comments URL: https://news.ycombinator.com/item?id=47035701

Points: 1

# Comments: 0

Categories: Hacker News

Claude Code Templates

Mon, 02/16/2026 - 9:46am

Article URL: https://www.aitmpl.com/agents

Comments URL: https://news.ycombinator.com/item?id=47035652

Points: 2

# Comments: 0

Categories: Hacker News

Qwen 3.5

Mon, 02/16/2026 - 9:43am
Categories: Hacker News

Show HN: Kai – A Telegram bot that turns Claude Code into a personal dev asst

Mon, 02/16/2026 - 8:47am

I built Kai because I wanted Claude Code's full capabilities - shell access, file editing, git, web search - available from my phone, without being tied to a terminal.

Kai is a Telegram bot that wraps a persistent Claude Code process. You send messages in Telegram, and Claude responds with full tool access: it can read and edit files, run commands, manage git branches, search the web, and work across multiple projects. Responses stream back in real time. Everything runs on your own machine.

*How I actually use it:* I point Kai at a project workspace and use it as a dev assistant. It has the full context of whatever repo it's looking at - it can read and write code, check git status, run tests, make commits. Switching between projects is a Telegram command. I can be away from my desk and tell it "fix the failing CI on the web repo" or "add input validation to the signup form" and it just does it.

*Background:* I originally ran an instance of an open-source bot framework, but shut it down after a few days due to security concerns. I rebuilt from scratch on top of Claude Code's CLI, which handles sandboxing and tool execution properly.

*No AI API keys required:* Kai doesn't call the Anthropic API directly - it wraps a logged-in Claude Code session, so there are no API keys to manage and no per-token costs beyond your existing Claude Code subscription. The original design eliminated all API keys after security problems with another bot framework that managed them insecurely. Now that Kai runs on a trustworthy local foundation, optional service integrations are safe.

*Privacy angle:* Kai runs locally - on a Mac mini in my case. Conversations, credentials, and project files never leave the machine. There's no server component, no cloud relay. Your Telegram messages go to your machine, and Claude Code handles the rest through Anthropic's API directly.

*External services without MCP:* Kai has a declarative HTTP service layer for connecting to any REST API. You define services in a YAML config - URL, method, auth type - and Kai makes the HTTP calls directly. No plugins, no third-party server processes, no executable code. API keys stay in your `.env` and are never touched by intermediary code. Ships with a Perplexity config for web search, but the same pattern works for weather APIs, notification services (Pushover, ntfy), home automation, translation, or anything else with a REST endpoint. Entirely optional - Kai works fine without it.

*Some things it can do:*

- Connect to external REST APIs via declarative config (search, weather, notifications, etc.) - Transcribe voice messages locally (whisper.cpp) and respond with voice (Piper TTS) - Run scheduled jobs and reminders - Receive GitHub webhooks (push, PR, issue notifications) - Stream responses in real time (message updates every 2s) - Switch between workspaces and models via Telegram commands

It's a single Python package, about 1700 lines across 11 modules. Runs as a launchd/systemd service. Setup is: clone, pip install, set two env vars (Telegram token + your user ID), and `make run`.

Repo: https://github.com/dcellison/kai

Happy to answer any questions about the setup or architecture.

Comments URL: https://news.ycombinator.com/item?id=47034875

Points: 1

# Comments: 0

Categories: Hacker News

Atom – Hydrogen Quantum Orbital Visualizer

Mon, 02/16/2026 - 8:44am

Article URL: https://www.kavang.com/atom

Comments URL: https://news.ycombinator.com/item?id=47034853

Points: 1

# Comments: 0

Categories: Hacker News

Pages