Skip to content

refactor: move slot types and participant protocols from DHModels to DHKit#10

Merged
gwillish merged 1 commit intomainfrom
refactor/aligning-types
Mar 29, 2026
Merged

refactor: move slot types and participant protocols from DHModels to DHKit#10
gwillish merged 1 commit intomainfrom
refactor/aligning-types

Conversation

@gwillish
Copy link
Copy Markdown
Owner

Slots (AdversarySlot, PlayerSlot, EnvironmentSlot) and the EncounterParticipant/CombatParticipant protocols represent live session state, not static catalog data. Moving them to DHKit co-locates them with EncounterSession, which is their only consumer.

  • Add nonisolated to slot structs and protocols to opt out of DHKit's .defaultIsolation(MainActor.self), preserving Sendable semantics
  • Add import DHModels to moved files that reference Adversary/Condition
  • Move PlayerSlotTests out of DHModelsTests into new DHKitTests/SlotTests.swift alongside new AdversarySlotTests and EnvironmentSlotTests
  • Update CLAUDE.md placement rule: catalog/prep types → DHModels, live session types → DHKit; document the nonisolated requirement
  • Add DHModels-diagram.md and DHKit-diagram.md with Mermaid class diagrams

…DHKit

Slots (AdversarySlot, PlayerSlot, EnvironmentSlot) and the
EncounterParticipant/CombatParticipant protocols represent live session
state, not static catalog data. Moving them to DHKit co-locates them
with EncounterSession, which is their only consumer.

- Add `nonisolated` to slot structs and protocols to opt out of DHKit's
  `.defaultIsolation(MainActor.self)`, preserving Sendable semantics
- Add `import DHModels` to moved files that reference Adversary/Condition
- Move PlayerSlotTests out of DHModelsTests into new DHKitTests/SlotTests.swift
  alongside new AdversarySlotTests and EnvironmentSlotTests
- Update CLAUDE.md placement rule: catalog/prep types → DHModels,
  live session types → DHKit; document the nonisolated requirement
- Add DHModels-diagram.md and DHKit-diagram.md with Mermaid class diagrams
@gwillish gwillish merged commit 9fe1c42 into main Mar 29, 2026
2 checks passed
@gwillish gwillish deleted the refactor/aligning-types branch March 29, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant