A Discord bot that turns a mention into a dedicated thread and uses Groq to help refine software requests into an implementable plan.
Today it is a planning assistant. The long-term goal is to evolve into a coding agent that can open pull requests against a target repo once a plan is approved.
- When you mention the bot in a server text channel, it creates (or reuses) a thread for that request.
- Inside the thread, the bot calls Groq Chat Completions to:
- ask clarifying questions
- summarize requirements/constraints
- draft a concise plan when prompted
plan/ "make a plan": plan-drafting modehealth/groq/check/status: Groq connectivity check (expectsOK)implement/go/ "start implementing": not wired yet (roadmap item)
- Node.js 18+ (uses built-in
fetch) - A Discord application + bot token
- A Groq API key
Copy .env.example to .env and fill in:
DISCORD_TOKEN- Discord bot tokenGROQ_API_KEY- Groq API keyGROQ_MODEL- Groq model name (defaults tollama-3.1-8b-instant)
npm install
npm run devBuild and run compiled output:
npm run build
npm start- The bot listens for
messageCreateevents and only responds in guild text channels when mentioned. - It creates threads with an auto-archive duration of 24 hours.
- Thread context is currently the most recent ~20 messages from the thread (ordered oldest-to-newest).
Execution is intentionally not wired yet. The target workflow is:
- Mention bot -> create thread -> refine requirements
- Generate a plan -> user approves
- Agent applies changes in a local checkout and opens a PR (no direct pushes to
main)
Planned milestones:
- Add explicit modes and approvals (plan -> draft changes -> open PR)
- GitHub integration to open PRs (likely via
ghor a GitHub App) - Safe repo sandboxing (allowed commands, path allowlist, secrets redaction)
- Better context building (attachments, code blocks, configurable context window)
- Basic quality gates before PR (format/lint/tests) with summarized results
- Observability (structured logs, per-thread correlation)
- Do not commit
.env(this repo ignores it via.gitignore). - Treat
DISCORD_TOKENandGROQ_API_KEYas secrets.