[Phase 2.7] Legal Action & Target Generator (generate_legal_intents) for UI & AI #25

Open
opened 2026-11-17 08:14:12 +00:00 by john4064 · 0 comments
Owner

Goal

Expose a deterministic generate_legal_intents(&MatchState, PlayerId) -> Vec<MatchIntent> API so UI highlights, server anticheat validation, bot soak tests, and CodeMaster AI share one source of truth.

Metadata

  • Phase / Step: Phase 2.7
  • Depends On: #8, #9, #10
  • Unlocks: #26, #27, #31, #32, #37
  • Target Crates / Paths: crates/chaotic_core/src/legal_intents.rs
  • Line Budget Plan: Production .rs <= 400 lines, test .rs <= 600 lines, mod.rs < 80 lines (AGENTS.md Section 2.3)

Acceptance Criteria

  • Enumerate valid Move paths (Range/Swift/Defender-aware), Attack strike choices, Mugic casts + valid single casters, Activated abilities, and Priority Pass intents.
  • Guarantee every returned MatchIntent succeeds when passed to apply_match_intent (roundtrip fuzz property).
  • Never leak hidden information (face-down opponent Battlegear or unflipped deck contents) when generating player UI intents.
## Goal Expose a deterministic `generate_legal_intents(&MatchState, PlayerId) -> Vec<MatchIntent>` API so UI highlights, server anticheat validation, bot soak tests, and CodeMaster AI share one source of truth. ## Metadata - **Phase / Step:** Phase 2.7 - **Depends On:** #8, #9, #10 - **Unlocks:** #26, #27, #31, #32, #37 - **Target Crates / Paths:** `crates/chaotic_core/src/legal_intents.rs` - **Line Budget Plan:** Production `.rs` <= 400 lines, test `.rs` <= 600 lines, `mod.rs` < 80 lines (`AGENTS.md` Section 2.3) ## Acceptance Criteria - [ ] Enumerate valid Move paths (`Range`/`Swift`/`Defender`-aware), Attack strike choices, Mugic casts + valid single casters, Activated abilities, and Priority Pass intents. - [ ] Guarantee every returned `MatchIntent` succeeds when passed to `apply_match_intent` (roundtrip fuzz property). - [ ] Never leak hidden information (face-down opponent Battlegear or unflipped deck contents) when generating player UI intents.
Sign in to join this conversation.
No description provided.