@plasius/ai-game 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,63 @@
1
+ # ADR 0013: Adaptive mission contract boundary
2
+
3
+ ## Status
4
+
5
+ Accepted
6
+
7
+ ## Context
8
+
9
+ The Player System needs a portable mission surface that can guide bootstrap
10
+ players, learn from mission responses over time, and expose bounded reward
11
+ metadata without making `@plasius/ai-game` the authority for progression truth.
12
+
13
+ ADR 0061 and TDR-0029 require adaptive mission selection, confidence-scored
14
+ player-model learning, MCC focus influence, and reward envelopes that accelerate
15
+ readiness without skipping gates. Those rules must be consumable by multiple
16
+ packages without pulling site runtime code into the shared contract boundary.
17
+
18
+ ## Decision
19
+
20
+ `@plasius/ai-game` owns the dependency-free adaptive mission contract boundary
21
+ behind `isekai.player-system.missions.enabled`.
22
+
23
+ - Mission definitions remain distinct from guild quests and other external
24
+ contract systems.
25
+ - Mission definitions carry both audio and visual feedback channels so
26
+ completion and failure outputs stay aligned with the Player System design.
27
+ - Objective-state contracts capture bounded progress snapshots rather than raw
28
+ host runtime internals.
29
+ - Player-response contracts explicitly model acceptance, refusal, ignored or
30
+ declined outcomes, pinning, completion, failure, and abandonment as learning
31
+ signals.
32
+ - Player-model influence inputs carry bounded confidence, evidence metadata,
33
+ repeated-signal handling, MCC focus influence, and readiness or stage-gate
34
+ context.
35
+ - Reward envelopes are progression-safe, accelerant-only payloads with explicit
36
+ minimum, maximum, cap, cap semantic, readiness context, gate references, and
37
+ reason codes describing why a reward cannot skip progression.
38
+
39
+ The contract version is `1.0`. Incompatible changes require a new contract
40
+ version and an explicit ADR.
41
+
42
+ ## Alternatives considered
43
+
44
+ 1. Keep adaptive mission contracts inside the site repository. Rejected because
45
+ multiple consumers need one stable shared vocabulary.
46
+ 2. Allow free-form reward payloads and let consumers enforce fairness.
47
+ Rejected because consumer-side reward policing is easy to bypass and would
48
+ weaken progression safety.
49
+ 3. Reuse guild-quest contracts for System missions. Rejected because TDR-0029
50
+ explicitly distinguishes internal System missions from guild-sourced work.
51
+
52
+ ## Consequences
53
+
54
+ The Player System runtime, site adapters, and future packages can share one
55
+ validated mission vocabulary for guidance, learning signals, and bounded reward
56
+ metadata. The package still stays out of authority-owned progression writes and
57
+ host-private tuning logic.
58
+
59
+ ## Validation
60
+
61
+ Tests cover enum guards, confidence-band derivation, immutable mission
62
+ definitions and responses, dual-channel feedback requirements, bounded reward
63
+ caps, progression-safe reason codes, and malformed mission input rejection.
@@ -0,0 +1,43 @@
1
+ # ADR 0014: Player System guidance cue contract boundary
2
+
3
+ - Status: Accepted
4
+ - Date: 2026-07-11
5
+ - Decision Makers: Plasius engineering
6
+
7
+ ## Context
8
+
9
+ The Player System guidance shell needs shared contracts for multimodal cues,
10
+ but the site must not invent cue priority, fallback, or delivery-budget
11
+ semantics independently. Missing audio or narration must leave an accessible
12
+ non-audio path, while payload and frequency assumptions must remain bounded for
13
+ client performance planning.
14
+
15
+ ## Decision
16
+
17
+ `@plasius/ai-game` owns the portable guidance-cue metadata contract under
18
+ `isekai.player-system.guidance-nfr.enabled`. Cues reuse the existing alert
19
+ priority vocabulary and identify their source, matching fallback behavior,
20
+ maximum payload size, and maximum occurrences per minute. The package exposes
21
+ the three supported fallback mappings for voice, narration, and speech
22
+ capture, and validates source/fallback alignment and budget bounds.
23
+
24
+ The package owns contract vocabulary and validation only. Site/runtime
25
+ repositories own feature-flag evaluation, user-facing translations, live
26
+ telemetry, and actual rendering or speech delivery.
27
+
28
+ ## Alternatives considered
29
+
30
+ - Keep cue metadata site-local: rejected because downstream Player System
31
+ consumers would reinterpret fallback and budget semantics independently.
32
+ - Expose raw audio provider details: rejected because provider topology and
33
+ operational details are not portable public contract data.
34
+ - Allow unbounded payload and frequency values: rejected because consumers
35
+ could not enforce predictable shell performance assumptions.
36
+
37
+ ## Consequences
38
+
39
+ - Consumers receive a stable, reusable contract for priority, fallback, and
40
+ bounded delivery assumptions.
41
+ - The shared package does not leak runtime topology or account/player data.
42
+ - Site and runtime implementations must keep their symbolic mappings aligned
43
+ with the published fallback identifiers.
@@ -12,3 +12,5 @@
12
12
  - [ADR-0010: Training contracts are consumed from @plasius/training](./adr-0010-training-contracts-consumed-from-training-package.md)
13
13
  - [ADR-0011: Player System core contract boundary](./adr-0011-player-system-core-contract-boundary.md)
14
14
  - [ADR-0012: Identity projection and target-classification contract boundary](./adr-0012-identity-projection-contract-boundary.md)
15
+ - [ADR-0013: Adaptive mission contract boundary](./adr-0013-adaptive-mission-contract-boundary.md)
16
+ - [ADR-0014: Player System guidance cue contract boundary](./adr-0014-player-system-guidance-cue-contract-boundary.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasius/ai-game",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Game-domain AI contracts for player action validation, NPC actions, gossip, and feedback.",
5
5
  "type": "module",
6
6
  "sideEffects": false,