โ† agent army
๐ŸŒฑ
DISCORD โ†’ GITHUB

Bud

Turns a teammate's Discord messages into reviewed pull requests.

Watches one collaborator's messages in a private Discord server, decomposes each into discrete items, and checks feasibility against the live repo before filing GitHub issues. DMs me a per-item โœ… / โŒ gate โ€” approve and it dispatches a GitHub Action that runs Claude Code to open the PR.

// architecture

A second, separate discord.js bot โ€” its own token, locked to one Discord server โ€” that watches a single collaborator and never replies to them. Their stream-of-consciousness messages go to Claude Sonnet, which decomposes them into discrete typed items. For each item, Bud pulls the target repo's file tree and searches/reads the relevant files through the GitHub API, then asks Claude whether it's already built, how hard it is, and where to touch โ€” filing a GitHub issue and DMing me a report. Nothing proceeds without my โœ… on that item; the approval listener is global, so it survives restarts and works on uncached DMs.

Discord msg (1 collaborator)โ†’Claude Sonnet decomposeโ†’GitHub tree + code searchโ†’Claude feasibilityโ†’file issue + approval DMโ†’โœ…โ†’workflow_dispatch โ†’ Claude Codeโ†’PR

// how it works

  1. 1

    Watch one channel

    A dedicated bot (its own token, one server) watches a single collaborator's messages โ€” nobody else โ€” and never shows itself by replying.

  2. 2

    Decompose

    Claude Sonnet breaks each message into discrete typed items โ€” bug or feature, priority, whether it touches the DB schema โ€” each with the original quote attached.

  3. 3

    Probe the codebase

    For each item Bud pulls the target repo's file tree, runs a couple of code searches and reads the relevant files via the GitHub API, then asks Claude if it's already built, how hard it is, and where to touch.

  4. 4

    File + gate

    It opens a labelled GitHub issue and DMs me a report with a โœ… / โŒ per item. The approval listener is global, so it works on uncached DMs and survives a bot restart.

  5. 5

    Dispatch the build

    On โœ… it fires a workflow_dispatch to a GitHub Action wired to run Claude Code โ€” which branches off main, implements the item and opens the PR. On โŒ the item is dropped. Schema-touching items are flagged, not auto-migrated.

// tool calls

  • analyzeMessage()Claude Sonnet decomposes a message into typed items { type, title, priority, schema-change? }
  • GET /git/trees/main?recursive=1pulls the target repo's full file tree (session-cached)
  • GET /search/codecontent search to locate the relevant files per item
  • GET /contents/{path}reads candidate files (truncated) to judge feasibility with Claude
  • POST /issuesfiles a labelled GitHub issue (bug / enhancement)
  • POST /actions/workflows/โ€ฆ/dispatchesthe โœ… action โ€” workflow_dispatch that runs Claude Code โ†’ PR

// approval dm

Bud:Decomposed into 2 items โ€” feasibility checked against the repo:
1 ยท Fix crash on empty save ยท issue #71 ยท low effort โœ… / โŒ
2 ยท Streak counter on home ยท issue #72 ยท โš ๏ธ touches DB schema โœ… / โŒ
โœ…
Bud:dispatched bud-agent.yml โ†’ Claude Code ยท PR incoming

// stack

Node.js (ESM)discord.js v14Claude SonnetGitHub REST + Actionsbetter-sqlite3

// infrastructure

  • โ–ธRuntime: separate always-on Node process
  • โ–ธState: SQLite (items + analyses, status machine)
  • โ–ธAuth: GitHub PAT (repo + workflow scope)
  • โ–ธTarget: a React / Vite / Supabase repo
  • โ–ธBuild step: workflow_dispatch โ†’ Claude Code (in the target repo)

// why it exists

A non-technical collaborator can just describe what they want in plain English, and it comes out the other end as reviewed pull requests โ€” no tickets, no handoffs, no 'can you rewrite that as a spec'.

โ† back to all agents// part of the agent army