← Series

Building a Slack Engineering Agent
How a multi-tenant Slack agent turns an @-mention into a pull request: the end-to-end path, the Postgres-backed task queue, the single policy gate that keeps an autonomous agent safe, and the ports-and-adapters spine that holds it together.
Part 110 minPart 29 minPart 37 minPart 48 min
A Slack Mention Becomes a Pull Request
Slack engineering agent flow from @mention to PR: resolve channel scope, enqueue work, run the agent, and capture review by reaction.
Postgres Is the Only Backend You Need
Postgres job queue design for Slack agent tasks: claim rows with SKIP LOCKED, recover crashes, schedule safely, and skip Redis or SQS.
One Policy Gate for an Autonomous Agent
Letting an LLM open PRs is risky. Autonomous agent guardrails need one beforeToolCall gate, a per-project allowlist, and audit logs.
Ports and Adapters, Earned Not Cargo-Culted
Ports and adapters architecture can rot into ceremony. Use two adapters, typed errors, DTOs, and parity tests to keep seams useful.