diff --git a/PRODUCTION_COGS.md b/PRODUCTION_COGS.md new file mode 100644 index 0000000..cad7a11 --- /dev/null +++ b/PRODUCTION_COGS.md @@ -0,0 +1,102 @@ +# Production Cogs vs Work-in-Progress + +## Current Production Cogs (from `paperdynasty.py:47-53`) + +The following cogs are loaded in production: + +```python +COGS = [ + 'cogs.owner', + 'cogs.admins', + 'cogs.economy', + 'cogs.players', # ← PRODUCTION gauntlet commands are HERE + 'cogs.gameplay', +] +``` + +### Production Command Structure + +**Gauntlet Commands** (in `cogs/players.py`): +- `/gauntlets start` - Line 942-1029 +- `/gauntlets reset` - Line 1031-1081 +- `/gauntlets status` - Other location in same file + +**Key Production Functions:** +- `gauntlets.py` - Core gauntlet logic (draft, post_result, end_run) +- `helpers.py` / `helpers/utils.py` - Helper functions +- `utils.py` - Base utility functions + +## Work-in-Progress: `cogs/players_new/` Package + +**NOT LOADED IN PRODUCTION** - This is a refactored rebuild of the players cog. + +Located in: `cogs/players_new/` + +Structure: +``` +cogs/players_new/ +├── __init__.py # Package loader (not used yet) +├── gauntlet.py # Refactored gauntlet commands +├── player_lookup.py # Player search/display +├── paperdex.py # Collection tracking +├── standings_records.py # Standings/records +├── team_management.py # Team management +├── utility_commands.py # Misc utility commands +└── README.md # Documentation +``` + +### When `players_new` Goes Live + +To activate the refactored cogs, update `paperdynasty.py`: + +```python +COGS = [ + 'cogs.owner', + 'cogs.admins', + 'cogs.economy', + 'cogs.players_new', # ← Load the package instead of 'cogs.players' + 'cogs.gameplay', +] +``` + +The `__init__.py` will automatically load all submodules: +- Gauntlet +- Paperdex +- PlayerLookup +- StandingsRecords +- TeamManagement +- UtilityCommands + +## Recent Bug Fixes (2025-11-10) + +### Production Fixes (Active Now) +✅ `utils.py` & `helpers/utils.py` - `get_roster_sheet()` handles both dict and Team objects +✅ `gauntlets.py` - `end_run()` sends news-ticker messages for 2-loss completions +✅ `cogs/players.py` - Updated to call fixed functions + +### Future-Proofing Fixes (For When WIP Goes Live) +⏭️ `cogs/players_new/gauntlet.py` - Same fixes applied for future activation +⏭️ `cogs/players_new/team_management.py` - Uses `get_context_user()` helper +⏭️ `cogs/economy_new/` - Various hybrid command fixes + +## Testing Checklist for `players_new` Activation + +Before switching to `cogs/players_new`: + +1. **Command Parity**: Verify all commands from `cogs/players` exist and work +2. **Database Compatibility**: Ensure Team object vs dict handling is consistent +3. **News-Ticker Messages**: Test gauntlet draft and completion announcements +4. **Hybrid Commands**: Test both prefix and slash command invocations +5. **Error Handling**: Verify all error messages work with Interaction objects + +## Notes + +- Keep both `cogs/players.py` and `cogs/players_new/` in sync for critical fixes +- When making fixes, check if they apply to both versions +- The refactored package provides better organization but same functionality +- Migration can happen gradually by testing individual submodules first + +--- + +Last Updated: 2025-11-10 +Branch: cogs-to-packages