ai-assistant-discord-bot/ENHANCEMENT_ADD_PROJECT.md
Claude Discord Bot 48c93adade Add /add-project command for dynamic project setup
New Features:
- /add-project slash command for adding projects without restart
- Clones git repository with shallow clone (--depth 1)
- Updates config.yaml atomically with rollback on failure
- Live config reload (no bot restart needed)
- Administrator permission required
- Comprehensive validation and error handling

Implementation:
- config.py: add_project() and save() methods
- commands.py: add_project command (193 lines)
- 12 new tests covering all scenarios
- Full documentation in COMMANDS_USAGE.md

Test Results: 30/30 passing (100%)

Usage:
  /add-project
    project_name: my-project
    git_url: https://git.manticorum.com/cal/my-project.git
    model: sonnet

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 19:47:47 +00:00

1.0 KiB

Enhancement: /add-project Slash Command Implementation

Status: Complete
Date: 2026-02-13
Deployed to: discord-coordinator (10.10.0.230)

Summary

Implemented /add-project slash command for dynamic project configuration without manual config editing or bot restarts. Command allows administrators to add new project configurations by providing a git repository URL and project details.

Test Results

All 30 tests passing (18 existing + 12 new):

  • test_add_project_success
  • test_add_project_duplicate_channel
  • test_add_project_invalid_name
  • test_add_project_directory_exists
  • test_add_project_git_clone_failure
  • test_add_project_git_timeout
  • test_add_project_not_git_repo
  • test_add_project_config_rollback
  • test_add_project_permission_check
  • test_add_project_error_handler
  • test_add_project_with_target_channel
  • test_config_structure

Deployment Instructions

Bot will automatically register the new command on next startup.

Implementation Complete

All code changes deployed, tested, and documented.