strat-gameplay-webapp/backend/app/core
Cal Corum e165b449f5 CLAUDE: Refactor offensive decisions - replace approach with action field
Backend refactor complete - removed all deprecated parameters and replaced
with clean action-based system.

Changes:
- OffensiveDecision model: Added 'action' field (6 choices), removed
  deprecated 'hit_and_run' and 'bunt_attempt' boolean fields
- Validators: Added action-specific validation (squeeze_bunt, check_jump,
  sac_bunt, hit_and_run situational constraints)
- WebSocket handler: Updated submit_offensive_decision to use action field
- Terminal client: Updated CLI, REPL, arg parser, and display for actions
- Tests: Updated all 739 unit tests (100% passing)

Action field values:
- swing_away (default)
- steal (requires steal_attempts parameter)
- check_jump (requires runner on base)
- hit_and_run (requires runner on base)
- sac_bunt (cannot use with 2 outs)
- squeeze_bunt (requires R3, not with bases loaded, not with 2 outs)

Breaking changes:
- Removed: hit_and_run boolean → use action="hit_and_run"
- Removed: bunt_attempt boolean → use action="sac_bunt" or "squeeze_bunt"
- Removed: approach field → use action field

Files modified:
- app/models/game_models.py
- app/core/validators.py
- app/websocket/handlers.py
- terminal_client/main.py
- terminal_client/arg_parser.py
- terminal_client/commands.py
- terminal_client/repl.py
- terminal_client/display.py
- tests/unit/models/test_game_models.py
- tests/unit/core/test_validators.py
- tests/unit/terminal_client/test_arg_parser.py
- tests/unit/terminal_client/test_commands.py

Test results: 739/739 passing (100%)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 15:07:54 -06:00
..
__init__.py CLAUDE: Complete Week 4 - State Management & Persistence 2025-10-22 12:01:03 -05:00
ai_opponent.py CLAUDE: Session 1 cleanup complete - Parts 4-6 2025-11-14 13:54:34 -06:00
cache.py CLAUDE: Implement Phase 3A - X-Check data models and enums 2025-11-01 15:32:09 -05:00
CLAUDE.md CLAUDE: Update REPL for new GameState and standardize UV commands 2025-11-04 09:59:13 -06:00
dice.py CLAUDE: Fix all unit test failures and implement 100% test requirement 2025-11-04 19:35:21 -06:00
game_engine.py CLAUDE: Clean up stale TODO comments from Phase 3E completion 2025-11-14 08:12:08 -06:00
play_resolver.py CLAUDE: Fix all unit test failures and implement 100% test requirement 2025-11-04 19:35:21 -06:00
roll_types.py CLAUDE: Complete Week 6 - granular PlayOutcome integration and metadata support 2025-10-29 20:29:06 -05:00
runner_advancement.py CLAUDE: Fix runner_advancement for new GameState structure 2025-11-04 16:03:46 -06:00
state_manager.py CLAUDE: Fix game recovery for new GameState structure 2025-11-04 15:26:00 -06:00
substitution_manager.py CLAUDE: Phase 3F - Substitution System Testing Complete 2025-11-06 15:25:53 -06:00
substitution_rules.py CLAUDE: Phase 3F - Substitution System Testing Complete 2025-11-04 22:34:17 -06:00
validators.py CLAUDE: Refactor offensive decisions - replace approach with action field 2025-11-14 15:07:54 -06:00
x_check_advancement_tables.py CLAUDE: Fix critical X-Check bugs and improve dice rolling 2025-11-02 23:09:16 -06:00