major-domo-v2/utils
Cal Corum ea7b356db9 CLAUDE: Refactor draft system to eliminate hard-coded magic numbers
Replace all hard-coded values with centralized config constants for better
maintainability and flexibility:

Added config constants:
- draft_team_count (16)
- draft_linear_rounds (10)
- swar_cap_limit (32.00)
- cap_player_count (26)
- draft_total_picks property (derived: rounds × teams)

Critical fixes:
- FA team ID (498) now uses config.free_agent_team_id in:
  * tasks/draft_monitor.py - Auto-draft validation
  * commands/draft/picks.py - Pick validation and autocomplete
- sWAR cap limit display now uses config.swar_cap_limit

Refactored modules:
- utils/draft_helpers.py - All calculation functions
- services/draft_service.py - Pick advancement logic
- views/draft_views.py - Display formatting

Benefits:
- Eliminates risk of silent failures from hard-coded IDs
- Centralizes all draft constants in one location
- Enables easy draft format changes via config
- Improves testability with mockable config
- Zero breaking changes - fully backwards compatible

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 22:14:17 -05:00
..
__init__.py CLAUDE: Initial commit for discord-app-v2 rebuild 2025-08-15 00:04:50 -05:00
autocomplete.py CLAUDE: Refine injury roll display and cleanup imports 2025-10-16 22:20:13 -05:00
cache.py CLAUDE: Fix type annotations in CacheManager for JSON-serializable types 2025-10-14 00:22:01 -05:00
CLAUDE.md CLAUDE: Add comprehensive CLAUDE.md documentation files for AI agent guidance 2025-10-20 20:30:07 -05:00
decorators.py CLAUDE: Major bot enhancements - Admin commands, player stats, standings, schedules 2025-08-28 15:32:38 -05:00
discord_helpers.py CLAUDE: Refactor scorebug display and add dynamic channel visibility 2025-10-22 16:58:21 -05:00
draft_helpers.py CLAUDE: Refactor draft system to eliminate hard-coded magic numbers 2025-10-24 22:14:17 -05:00
listeners.py Refactored listener logic and added SpoilerListener 2025-10-22 14:59:19 -05:00
logging.py CLAUDE: SUCCESSFUL STARTUP - Discord Bot v2.0 fully operational 2025-08-16 07:36:47 -05:00
random_gen.py CLAUDE: Major bot enhancements - Admin commands, player stats, standings, schedules 2025-08-28 15:32:38 -05:00
scorebug_helpers.py CLAUDE: Refactor scorebug display and add dynamic channel visibility 2025-10-22 16:58:21 -05:00
team_utils.py CLAUDE: Refine injury roll display and cleanup imports 2025-10-16 22:20:13 -05:00
text_utils.py CLAUDE: Add smart text splitting for Discord embed fields 2025-10-21 14:46:24 -05:00
transaction_logging.py CLAUDE: Add automatic transaction logging to #transaction-log channel 2025-10-23 12:24:37 -05:00