claude-memory/graph/solutions/major-domo-cli-modular-refactor-with-6-new-command-modules-de7387.md

1.2 KiB

id type title tags importance confidence created updated
de738797-b12a-4d8e-9402-c58116e1ba02 solution Major Domo CLI modular refactor with 6 new command modules
major-domo
cli
architecture
refactoring
0.8 0.8 2026-02-16T17:20:37.681799+00:00 2026-02-16T17:20:37.681799+00:00

Refactored monolithic cli.py into modular architecture. Extracted shared utilities into cli_common.py (State, console, output helpers). Created 6 new CLI modules: cli_transactions.py (list + simulate compliance checker), cli_injuries.py (list with team/active filters), cli_stats.py (batting/pitching leaderboards), cli_results.py (game results), cli_schedule.py (game schedules). Each module exports a typer.Typer sub-app that gets mounted in main cli.py. Key composite command: 'transactions simulate TEAM moves' validates roster count=26 and sWAR<=salary_cap without making changes. Also fixed team get to show salary_cap in formatted output. Updated SKILL.md with complete CLI docs including flag ordering warning (--env/--json are top-level flags before subcommand), transaction compliance workflow, and all new command examples. Results/schedules API tables are empty - endpoints work but no data loaded yet.