docs(user): modifier profiles user guide
This commit is contained in:
parent
5f252e2dff
commit
cfc68bba51
2 changed files with 161 additions and 0 deletions
|
|
@ -344,3 +344,32 @@ requiring no changes to the registry contract itself.
|
|||
and incompatible with deterministic module load ordering.
|
||||
|
||||
---
|
||||
|
||||
## Implementation Retrospective
|
||||
|
||||
### Deviations from ADR
|
||||
|
||||
- **ADR-3 hot-swap timing**: Applied immediately on receipt rather than at
|
||||
an explicit turn-boundary gate. WS message serialization per-socket
|
||||
ensures a client's own move and profile swap cannot interleave. True
|
||||
turn-boundary queue deferred to T2.
|
||||
- **ADR-6 check 4 (DEADLOCK)**: Deferred to T2 — requires session
|
||||
simulation which introduces a circular dependency with the engine.
|
||||
- **ADR-3 host authority**: Profile swap allowed from host (white player)
|
||||
only in T1. Two-player consent model deferred to T2.
|
||||
- **Zod v3/v4 mismatch**: Server pins Zod v3; chess package moved to v4.
|
||||
Schemas mirrored locally in the server package with a compile-time
|
||||
key-parity guard.
|
||||
|
||||
### Discovered patterns
|
||||
|
||||
- `MODIFIER_REGISTRY` mirrors `PRESET_REGISTRY`/`LAYOUT_REGISTRY` exactly —
|
||||
confirmed the side-effect import pattern scales cleanly.
|
||||
- `__modifier-profile-integration__` pseudo-preset registered by
|
||||
`applyProfileToSession` integrates `CaptureFlags` and
|
||||
`DirectionAdditions` into the existing hook pipeline without modifying
|
||||
`engine.ts`.
|
||||
- `reconcileProfileSwap` uses retract-then-reapply semantics — idempotent
|
||||
and straightforward to reason about.
|
||||
|
||||
---
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue