TriAgentLoop Kanban Bot
A Discord bot that drives a GitHub Projects board, and refuses to write to it for anyone the allowlist has not cleared twice.
A bot with write access to someone else's board is an authorization problem before it is a Discord problem, so the role allowlist is enforced when the flow opens and re-checked at the moment of the write.
Facts
- Authenticates as a GitHub App with short-lived per-installation tokens; no personal access token is stored
- The role allowlist is enforced at the trigger and re-checked at write time
- A rapid double-submit creates at most one Issue — the first submit claims the flow and a concurrent second is refused
- The commit-digest poller needs no inbound ingress, polls every five minutes by default, groups by Conventional Commit and chunks at 2000 characters
- Its first run seeds the head rather than dumping the repository's history into the channel
- The App private key is encrypted at rest with AES-256-GCM and a scrypt-derived key, with zero new dependencies
- A guild-count gate warns at 75 against Discord's fixed 100-guild ceiling for the privileged Message Content intent
Stack
- Node.js
- discord.js
- GitHub Apps
- GraphQL
This lives inside TriAgentLoop, which is why it shares that repository rather than having one of its own. M4d’s line closes the roadmap at M0–M4, with one follow-on deferred out of M4c.
The interesting part is not the create flow. It is that the flow is populated live from the linked project — Status options, labels and assignees are read from GitHub rather than configured in the bot — and that being allowed to open it does not mean being allowed to finish it. The allowlist is checked again before the Issue is created, because the seconds between opening a flow and submitting it are enough for a role to change.