From e2e70edda1b09dfccdb25efa29f1239f69a2aa51 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Fri, 13 Feb 2026 14:35:08 -0600 Subject: [PATCH] store: Discord bot dynamic configuration with live reload --- ...c-configuration-with-live-reload-8bd768.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 graph/solutions/discord-bot-dynamic-configuration-with-live-reload-8bd768.md diff --git a/graph/solutions/discord-bot-dynamic-configuration-with-live-reload-8bd768.md b/graph/solutions/discord-bot-dynamic-configuration-with-live-reload-8bd768.md new file mode 100644 index 00000000000..79aa3fb1f59 --- /dev/null +++ b/graph/solutions/discord-bot-dynamic-configuration-with-live-reload-8bd768.md @@ -0,0 +1,30 @@ +--- +id: 8bd768ce-365c-4e25-b93a-ff4d67554141 +type: solution +title: "Discord bot dynamic configuration with live reload" +tags: [discord-bot, python, discord.py, live-reload, configuration, pattern, claude-coordinator] +importance: 0.7 +confidence: 0.8 +created: "2026-02-13T20:35:08.512896+00:00" +updated: "2026-02-13T20:35:08.512896+00:00" +--- + +Implemented /add-project command for Claude Discord Coordinator that adds projects without restarting bot. + +Key pattern: +- Config.add_project() adds to in-memory config +- Config.save() writes atomically (temp file + os.replace) +- No bot restart needed - config reloaded live + +Files: +- config.py: add_project() and save() methods +- commands.py: /add-project slash command with git clone + validation +- Rollback on failure: delete cloned dir, don't save config + +Git auth: credential.helper=store with ~/.git-credentials for automated cloning + +Benefits: +- Self-service project setup via Discord +- No manual config editing +- No service restarts +- Atomic config updates prevent corruption