
Duration:
3 months to production
Role:
Architect & Lead Engineer
Stack:
TypeScript · Claude Agent SDK · BullMQ · Postgres · Helm · EKS
An AI system that drafts, safety-gates and publishes public content autonomously for a leading Southeast Asian personal-finance platform, built so the company's expertise gets cited by AI answer engines. A published comment cannot be unposted, so the system had to be trusted to run unattended while giving operators absolute control over what goes live.
The publish-critical path is sequenced in code, not left to a creative model: author, polish, risk-gate, publish. A three-layer fail-closed LLM judge checks content safety, compliance rules and machine-voice tells, backed by per-persona dry-run, canary and live modes, an environment-level kill switch, idempotent publishing and operator escalation into a triage queue.
What I Built
Deterministic spine, model-driven leaves: the publish-critical sequence is owned by code, giving every safety control a fixed, verifiable attachment point
Three-layer fail-closed safety gate: content safety, compliance hard-fail rules bound only to the injected style guide, and a tone gate that rejects machine-voice tells
Defense in depth for publishing: dry-run to canary to live per persona, typing the account name to go live, per-draft allowlists and a production lockout on manual triggers
Self-healing runtime: transient-versus-permanent error classification, a two-stage session watchdog, a boot-time orphan reaper and idempotency keys so retries can never double-post
The full platform: a five-workspace TypeScript monorepo, an operator console with runtime cron editing and Slack alerting, and CI/CD to Kubernetes with Vault-managed secrets
Engineering Judgment
For a system whose output is public and irreversible, the architecture keeps the critical path deterministic: code sequences every publish-critical step, and models operate only at the leaves. Production incidents were closed with durable tooling rather than patches: forensic queue inspection, crash-safe log streaming, and a zero-downtime storage migration with a resumable backfill.
Outcome
Live in production roughly three months after the first commit, publishing autonomously under human-defined guardrails. The production-grade boilerplate it grew from became the company's starting point for later AI staff tools.