Side project
Multi-agent Operations Harness
Defines an organization as code and runs role-based AI agents on scheduled routines—publishing, image rendering, security checks, daily reports. Bots only propose; a human approval is required before anything with side effects runs.
Process
- Plan
Framed the problem: one person running several products needs somewhere to hand off repeated work—safely.
- Design
Org in one code source; propose, approve, and execute split into separate hands.
- Build
About 30 TypeScript routines, an approval daemon, a card-rendering pipeline.
- Ship
Every change is gated by sync --check: generated files and the scheduler registry must match the source, or the run fails.
- Improve
Added expiry and drift self-checks after a token expired silently.
Overview
Org structure, agent identities, and owned repositories live in one TypeScript source. Subagent definitions and the ops-console screens are generated from it. About 30 scheduled routines cover content publishing, security and dependency/CVE checks, batch review, and a daily standup. 900+ commits since 2026.07.
Why I built it
Running several products alone needs somewhere to hand off repeated work. But if an agent that reads the open web can also issue commands, a sentence planted on a trend page would execute without a human in the loop.
So the design splits proposing from approving, and keeps every list—routines, APIs, costs, products—in code that the console only reads.
System
Single source → sync scripts write generated files into the ops-console repository. Generated files are never edited by hand; a --check mode exits non-zero on drift.
Routines run on the Mac scheduler; long-lived daemons run under launchd (11 units). Alerts go to per-task channels so frequent ones don’t bury rare ones. A missing webhook falls back to the main channel and logs that it did.
See this in the system diagram
Approval gate
Bot proposes → a human reacts ✅ → a daemon executes. A webhook can post under any name, so the sender is unverified; a reaction carries the account id of whoever pressed it.
Human text in the channel is never a command. A bot’s own ✅ is ignored. Rejection wins over approval. Malformed proposals are dropped rather than read loosely.
The executor polls every 20 seconds and runs each job in a fresh temp directory with no git, ssh, curl, or web access, and zero MCP servers—after confirming that a tool allowlist did not block MCP tools.
Content pipeline
Post → card images rendered from HTML/CSS with Playwright → Instagram carousel via the Graph API → short-form video from the same cards. Illustrations come from a local model on a Mac mini, so image cost dropped to zero.
Cards are served from the file server under content-hashed names: about 176MB per deploy was eating hosting storage, and a 30-day immutable cache means a fixed name would keep serving the old image.
Stack
TypeScript (ESM), tsx, Claude Code subagents and scheduled tasks, Playwright, sharp, mysql2, launchd, Discord webhooks.
Notes
Hard parts: an Instagram token expired silently and posting stopped for three weeks—now every credential has an expiry date and a warning window sized to its lifetime, checked daily. The agent instruction file grew past the CLI prompt limit and every translation and script call failed at once; it was split into per-task documents.
What held: nothing with outside effects leaves without a human approval, and the org, routines, API list, and cost list read from the same source in code and on screen.