Skip to content

Discord Bot

Stephane Pareilleux edited this page Mar 22, 2026 · 1 revision

Discord Bot

The Demerzel Discord Bot (demerzel-bot) is an always-on governance coordinator and teaching assistant for the GuitarAlchemist AI ecosystem.

Repo: GuitarAlchemist/demerzel-bot

What It Does

  • Demerzel persona — governance reports, constitutional guidance, audit results, conscience signals
  • Seldon persona — music theory teaching, research outputs, course delivery, knowledge transfer
  • Auto-detects persona from channel context and message content
  • Embeds responses with color-coded persona indicators
  • Maintains per-channel conversation history (last 10 exchanges)

Architecture

Component Technology
Runtime Node.js >= 18.0.0
Discord discord.js v14 with Message Content Intent
AI Anthropic SDK (Claude Sonnet)
Governance Operates under Demerzel constitution
System prompts Dual: Demerzel + Seldon — switched by channel

Channels

Channel Persona Posts
#general Auto-detect Welcome, announcements
#governance Demerzel Audits, directives, conscience signals
#academy Seldon Courses, research results
#research Seldon Ideation, knowledge digests
#dev-ops Demerzel CI, health scores, driver cycles

Governance Persona (Demerzel)

Demerzel posts to #governance with:

  • Weekly governance audit summaries
  • Conscience signal alerts
  • Cross-repo directive status
  • Belief state updates
  • Compliance report summaries

Color: Indigo embed (#3f51b5)

Teaching Persona (Seldon)

Seldon posts to #academy and #research with:

  • Course deliveries from Streeling University research cycles
  • Research finding summaries (tetravalent-tagged)
  • Knowledge transfer digests
  • Answer queries with source citations

Color: Teal embed (#009688)

Setup

git clone https://github.com/GuitarAlchemist/demerzel-bot.git
cd demerzel-bot
npm install
cp .env.example .env
# Edit .env with your tokens
node src/bot.js

Environment Variables

Variable Description
DISCORD_BOT_TOKEN Discord bot token from Developer Portal
ANTHROPIC_API_KEY Anthropic API key for Claude

Channel Setup (one-time)

node scripts/create-channels.js

Creates governance, academy, research, and dev-ops channels in your guild.

Integration with Governance

The bot is wired into Demerzel's governance pipeline:

  1. Governance alerts — conscience signals with weight >= 0.8 post to #governance automatically
  2. Research delivery — when a Seldon research cycle produces a new course, summary posts to #academy
  3. Driver cycle reports — /demerzel-drive posts its summary to #dev-ops
  4. Audit results — /demerzel-audit posts to #governance when run with --discord flag

IxQL Reactive Pipeline

watch(agent.conscience_signals, filter: "severity >= 0.5")
  → when severity >= 0.8:
      discord.post(channel: "#governance", embed: critical_alert)
  → when severity >= 0.5:
      discord.post(channel: "#governance", embed: signal_summary)

-- Research cycle completion
watch(state/streeling/courses/, filter: "new_course")
  → discord.post(channel: "#academy", embed: course_summary)

Related Pages

Clone this wiki locally