Decompose: CONV-004: Discord Bot Integration #134
Labels
No labels
blocked:children
blocked:commit-ready-failed
blocked:depends-231
blocked:depends-236
blocked:depends-237
blocked:depends-238
blocked:depends-239
blocked:gate-fetch
blocked:gate-fetch
blocked:gate-lint
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:no-changes
blocked:no-procedure
blocked:preflight
blocked:verify-failed
bug
enhancement
feature-request
high-priority
in-progress
lint-cleanup
needs-decompose
needs-triage
ops-retry
ops-task
phase-5
quickfix
security/medium
self-building
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/mesh-seed#134
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: CONV-004: Discord Bot Integration
Original: #134
Overview
Discord bot that bridges Discord channels to mesh intents. This decomposition splits the work into 5 dependency-ordered phases.
P1: Discord Bot Foundation
Goal: Get a Discord bot process running alongside the mesh stack, with token management, connection lifecycle, and presence/heartbeat.
Approach candidates:
discord.pylibrary, managed as a container alongside existing docker servicesdocker/api_gateway.pyFlask process as a background thread (simpler deployment, coupling risk)cli/commands/discord_bot.py) that can run as a sidecarOutputs:
docker/discord_bot.py— Discord client process with startup/shutdown lifecycleconfig/discord.yaml— Discord token config (loaded from env, not committed)substrate/secrets_manager.py)docker/docker-compose.yml) — optional sidecar or managed processAcceptance criteria:
Files touched:
docker/discord_bot.py,config/discord.yaml(create),docker/docker-compose.yml(amend),substrate/secrets_manager.py(possibly extend for Discord token)P2: Intent Bridge — Discord to Mesh Translation
Goal: Translate incoming Discord messages into mesh intents that the existing intent routing infrastructure can process. Map Discord threads to mesh threads.
Approach candidates:
runtime/discord_ingress.pymodule that implements theMeshIntentprotocol used byruntime/intent_router.pyruntime/ingress_coordinator.pywith a Discord-specific handlersubstrate/backplane.pyAPI for intent submission — the ingress pattern is already established by the REST API indocker/api_gateway.pyOutputs:
runtime/discord_ingress.py— Discord-to-mesh intent translation modulesubstrate/ledger.pyorsubstrate/task_store.py)tests/unit/test_discord_ingress.pyandtests/integration/test_discord_ingress.pyAcceptance criteria:
conversational,research,write) are all routable from DiscordFiles touched:
runtime/discord_ingress.py(create),runtime/__init__.py(amend),tests/unit/test_discord_ingress.py(create),tests/integration/test_discord_ingress.py(create)P3: Commands & @Mentions
Goal: Support @mention direct invocation and slash commands (
/write,/research,/chat,/status) that map to specific mesh intent types.Approach candidates:
@botmention → generic chat intent (the message body is the prompt)discord.pyapp_commands/ hybrid commands/write→ intent typewrite,/research→research,/chat→ default conversational/status→ query mesh node health and report back/write --style academic --length 500)Outputs:
docker/discord_bot.pyAcceptance criteria:
@bot ping→ mesh intent processes the text, response sent back/write <prompt>triggers a write intent, result delivered as Discord message/research <query>triggers a research intent/chat <message>triggers a conversational intent/statusreturns mesh health summary (shows connected workers, queue depth)Files touched:
docker/discord_bot.py(amend — add command handlers),config/discord.yaml(amend — command config),tests/unit/test_discord_commands.py(create)P4: Response Delivery
Goal: Format mesh results for Discord delivery — handle the 2000-char message limit, multi-message for long responses, rich embeds, typing indicators, and file attachments.
Approach candidates:
Outputs:
runtime/discord_ingress.pyor separateruntime/discord_response.pyAcceptance criteria:
Files touched:
runtime/discord_ingress.py(amend),runtime/discord_response.py(create),runtime/__init__.py(amend),tests/unit/test_discord_response.py(create)P5: Permissions & Governance
Goal: Role-based access control, channel restrictions, rate limiting per user. Ensure the bot follows Discord governance best practices.
Approach candidates:
config/discord.yaml/research, unlimited/chat)Outputs:
runtime/discord_permissions.pyAcceptance criteria:
/researchrequiresresearcherrole;/writerequiresauthorrole/config,/allow channel) gated to admin role onlyFiles touched:
runtime/discord_permissions.py(create),config/discord.yaml(amend),docker/discord_bot.py(amend — wire permission checks),tests/unit/test_discord_permissions.py(create)Related
Decomposed from Mark/mesh-seed#134
Auto-triage: needs decompose
Marked
triage-approved+needs-decompose. decompose-executor will pick this up and break it into implementable sub-issues.CONV-004: Discord Bot Integrationto Decompose: CONV-004: Discord Bot IntegrationThis issue has been decomposed into the following sub-issues:
/write, `/resEach sub-issue awaits triage pipeline assessment before queue routing.
Decomposed into #231, #232, #233, #234, #235. Closing parent; sub-issues tracked separately.