Merge remote-tracking branch 'origin/main' into copy

This commit is contained in:
2026-02-15 23:53:00 +01:00
5 changed files with 915 additions and 0 deletions
+95
View File
@@ -0,0 +1,95 @@
# Sprint 7: Talk — Audio Tasks
**Goal:** Complete interaction UI layer and activate basic dialogue system with NPC conversations.
**Branch:** `audio`
**Agents:** Inigo (sound design)
## Carry-over from Sprint 6
None — no Sprint 6 audio tickets.
## New Tickets
| # | Title | Blocked by |
|---|-------|------------|
| #440 | 6 interaction audio assets — cursor hover, weapon mode, fog recognition, implant, dialogue, confrontation dip | — |
Use `db/connectors/ticket show <id>` for full details.
## Key Decisions
- `decisions/perception.md` — D-056 (cursor states), D-059 (fog entity visualization), D-060 (cognitive delay), D-061 (dialogue box), D-063 (confrontation styling)
- `decisions/content.md` — D-048 (neural insert overlay)
## Notes
### #440: 6 interaction audio assets
**What exists:**
- Audio manager foundation (client, Sprint 3-4)
- D-018 three-range sound model
- Insert-styled UI aesthetic (D-048, D-056)
**What the ticket needs:**
- **6 audio assets** for new interaction states introduced in Sprint 6-7:
1. **Cursor hover (entity):** Subtle tick/ping when cursor transitions to entity hover state (D-056). Insert-tech sound — clean, precise, synthetic. ~50-100ms, quiet (background confirmation).
2. **Weapon mode (future):** Harder click/lock sound when cursor enters weapon aim state. Mechanical, deliberate. ~100-150ms. Deferred to future sprint (no weapon selection in Sprint 7), but design now for consistency.
3. **Fog recognition:** Soft chime when cognitive delay completes and entity transitions from grey blob → recognized (D-060). Organic resolve feeling — "ah, that's Kael". ~200-300ms, warm tone.
4. **Implant/Insert open:** Smooth hum/activation when insert UI opens (radial menu, inventory, stance toggle). Neural lattice powering up. ~150-250ms, rising tone.
5. **Dialogue start:** Quiet ambient dip when dialogue box appears (D-061). NOT a sound effect — an audio mix shift. Background audio reduces -6dB to -8dB, dialogue takes focus. Reverses when dialogue ends.
6. **Confrontation dip:** Deeper ambient dip when confrontation dialogue begins (D-063). Background audio reduces -10dB to -12dB, slight muffling (low-pass filter). Character's focus narrows — world recedes.
**Audio aesthetic:**
- Insert-related sounds (cursor, implant): synthetic, precise, clinical. Neural tech interface.
- Recognition sound: organic, warm. Human cognition, not machine beep.
- Ambient dips: subtle mix changes, not hard cuts. World doesn't disappear, just recedes.
**Integration points:**
- Client #429 (cursor states) triggers hover sound
- Client #431 (fog recognition) triggers recognition chime
- Client #433 (radial menu), #438 (inventory), #439 (stance toggle) trigger implant open sound
- Client #434 (dialogue box) triggers dialogue dip and confrontation dip
- Audio manager plays sounds via autoload (`AudioManager` singleton, if exists, or direct AudioStreamPlayer nodes)
**Gotchas:**
- Ambient dip is NOT a sound file — it's a mix parameter change (AudioBus volume adjustment in Godot)
- Confrontation dip uses low-pass filter (AudioEffectLowPassFilter on ambient bus) for muffling
- Recognition chime timing: fires DURING cognitive delay (monologue IS the recognition per D-060), not after
- All sounds should be non-intrusive — UI feedback, not foreground events
- Insert sounds reinforce diegetic nature of UI (cursor, radial menu, inventory are all insert-rendered)
**File format:**
- `.ogg` or `.wav` (Godot-compatible)
- Sample rate: 44.1kHz or 48kHz
- Mono for point-source sounds (cursor, recognition), stereo for ambient shifts (dialogue dip)
**Deliverables:**
- 5 audio files: `cursor_hover.ogg`, `weapon_aim.ogg`, `fog_recognition.ogg`, `implant_open.ogg`
- 1 implementation spec: `audio/docs/dialogue-ambient-dip.md` (how to configure AudioBus for dialogue and confrontation dips)
## Dependency Chain
```
#440 (6 audio assets) → standalone
```
## Sprint 7 Audio Load
Sprint 7 has **1 audio ticket** — 6 sound assets + 1 implementation spec. Estimated 8-12 hours (2-3 hours per asset design + iteration).
Asset priority order:
1. Cursor hover (most frequent, Sprint 7 critical)
2. Fog recognition (Sprint 7 critical, new mechanic)
3. Implant open (Sprint 7 critical, radial menu/inventory)
4. Dialogue dip (Sprint 7, dialogue box foundation)
5. Confrontation dip (Sprint 7, but low-frequency event)
6. Weapon aim (future sprint, design now for consistency)
If time is constrained, defer weapon aim sound to Sprint 8 or later.
## PR Workflow
When ready to submit, create a PR with `tea` CLI. All flags are required to avoid TTY prompts:
```bash
tea pr create --repo jpmschweitzer/settled-reach --login schweitz --title "feat(audio): 6 interaction audio assets" --description "See docs/sprints/sprint-7/audio.md" --base main --head audio
```
+271
View File
@@ -0,0 +1,271 @@
# Sprint 7: Talk — Client Tasks
**Goal:** Complete interaction UI layer and activate basic dialogue system with NPC conversations.
**Branch:** `client`
**Agents:** Stig (dev), Tyre (arch), Hoshe (QA)
## Carry-over from Sprint 6
| # | Title | Status | Notes |
|---|-------|--------|-------|
| #429 | Cursor state machine — 4 states, Araminta spec, 150ms transitions | backlog | Blocks #432 entity interaction list |
| #430 | Fog shader rebuild — 5-layer, CanvasGroup Layer 5, animated noise | backlog | Blocks #431 fog entity visualization; CRITICAL — full shader rewrite |
| #432 | Entity interaction vertical list — insert-styled, z-layer 6 | backlog | Blocked by #429; integration with server verb system |
| #433 | World radial menu — 2 spokes v0.1 (Observe + Insert) | backlog | Standalone ticket, no blockers |
| #438 | Inventory UI — 3x3 grid, 1-9 hotkeys | backlog | Wire data from ObserverSnapshot v6 (Sprint 6 done) |
| #439 | Stance toggle UI — keybind + HUD indicator | backlog | Wire data from ObserverSnapshot v6 (Sprint 6 done) |
## New Tickets
| # | Title | Blocked by |
|---|-------|------------|
| #431 | Fog entity visualization — sound pings, recognized/unrecognized, cognitive delay anim | #430, #423 (server) |
| #434 | Dialogue box — max 20% height, max-width, NPC speech + options + monologue | — |
Use `db/connectors/ticket show <id>` for full details.
## Key Decisions
- `decisions/perception.md` — D-056 (cursor states), D-057 (entity interaction list), D-058 (world radial menu), D-059 (fog shader), D-060 (cognitive delay), D-061 (dialogue box), D-049 (z-level rendering stack)
- `decisions/architecture.md` — D-042 (UI microcopy format), D-066 (dual-scale grid)
## Notes
### #429: Cursor state machine (Sprint 6 carry-over)
**What exists:**
- Default cursor (basic mouse pointer)
- Entity hover detection in `client/scripts/rendering/world_renderer.gd`
- D-033 entity color system (relationship-based)
**What the ticket needs:**
- Four cursor states per D-056:
- **Default:** Four thin inward-pointing ticks, white-blue #c8d0e0, bloom shader
- **Entity hover:** Ticks expand outward (150ms), corner brackets, D-033 color shift
- **Object hover:** Ticks rotate 45° to X-shape, muted grey #8b8ba0
- **Weapon aim:** Hard transition, ticks extend, center gap widens, warm white #f0e8d8, no bloom
- Transition timing: 150ms linear for all state changes
- z-layer 7 (above insert overlay)
- LOS-based triggering (cursor state changes on line-of-sight, not just proximity)
**Integration points:**
- Blocks #432 (interaction list anchors to cursor position)
- Uses D-033 entity color data from ObserverSnapshot
- Weapon aim mode: deferred to future sprint (no weapon selection in Sprint 7)
**Gotchas:**
- Cursor is diegetic (insert's own interface per D-056) — it's NOT a traditional OS cursor
- Bloom effect: PointLight2D or CanvasItemMaterial shader
- State transitions must be smooth (no jarring snaps)
### #430: Fog shader rebuild (Sprint 6 carry-over, CRITICAL)
**What exists:**
- `client/scripts/rendering/fog_renderer.gd` — current TileMapLayer-based fog (Sprint 2)
- Basic vision cone rendering
- D-011 fog of perception foundation
**What the ticket needs:**
- COMPLETE REBUILD per D-059 — replace TileMapLayer approach with CanvasGroup + fragment shader
- Five fog layers:
1. **Clear (vision cone):** Soft gradient edge over 6-8 sim tiles (= 3-4 visual tiles per D-066), PointLight2D approach
2. **Light fog (peripheral):** Desaturated 40-50%, brightness -30%, animated Perlin noise (8-10s cycle)
3. **Deep fog (explored):** Near-monochrome + 10% zone temperature tint, slower noise (15-20s cycle)
4. **Unexplored + maps:** Geometric wireframe outlines #333340, insert aesthetic
5. **Unexplored, no maps:** Solid near-black #12141a
- CanvasGroup on Layer 5 per D-049 z-stack
- Fragment shader for noise animation (use OpenSimplex or Perlin noise function)
- Performance target: <1ms/frame total fog rendering
**Integration points:**
- Blocks #431 (fog entity visualization renders on top of fog shader)
- Uses FogState autoload (`client/scripts/autoloads/fog_state.gd`)
- Vision cone data from ObserverSnapshot
**Gotchas:**
- This is a LARGE rewrite — current fog system is discarded completely
- Test performance early (Godot profiler) — noise shaders can be expensive
- Zone temperature tint data: hardcoded per location for v0.1 (bar=warm, hub=cool, corridor=neutral)
- Unexplored vs explored state tracked in FogState autoload
### #432: Entity interaction vertical list (Sprint 6 carry-over)
**What exists:**
- Interaction prompt system (`client/scripts/protocol/interaction_prompt.gd` from Sprint 5)
- ObserverSnapshot.nearby_interactions field (populated by server two-phase verb computation, Sprint 6 #422)
- D-057 vertical list spec
**What the ticket needs:**
- Vertical list UI (2-4 verb options max) anchored to entity position
- Insert-styled rendering (geometric aesthetic per D-048, D-056)
- New option highlighting: gradient glow background when verb appears for first time
- z-layer 6 (insert overlay layer)
- Click verb → send PlayerAction::Interact with target entity + verb name
- Diegetic test: list disappears when insert is off
**Integration points:**
- Blocked by #429 (cursor states define hover detection that triggers list)
- Uses server ObserverSnapshot.nearby_interactions data (Sprint 6 #422 done)
- Verb data includes: verb name, display text, tooltip (optional)
**Gotchas:**
- Anchoring to entity position: use screen-space transform from world coordinates
- Max 3 visible options in dialogue context (different from world interaction which shows 2-4)
- Highlight new options without moving geometry (UX constraint per D-057)
### #433: World radial menu (Sprint 6 carry-over)
**What exists:**
- Right-click detection in input_mapper.gd autoload
- Insert overlay rendering foundation
**What the ticket needs:**
- Radial menu with 4 spokes per D-058 (v0.1: 2 spokes only)
- Spokes: Observe (eye icon), Insert (phone icon); deferred: Comms, Wait
- Insert-styled: geometric lines, thin spokes, nearly transparent
- z-layer 6 (insert overlay)
- Interaction modes: drag-release (power users) and click-click (newcomers)
- Right-click world tile → menu opens at cursor position
**Integration points:**
- Standalone (no blockers)
- Uses insert visual aesthetic (D-048, D-056)
- Observe action: future integration with perception modes (not Sprint 7)
- Insert action: opens insert UI (future integration)
**Gotchas:**
- Drag-release: detect drag distance + direction, select spoke on release
- Click-click: first click opens, second click on spoke selects
- Menu must close on Esc or click outside
- v0.1 only 2 spokes (Observe + Insert), but structure supports 4-6 spokes for future
### #438: Inventory UI (Sprint 6 carry-over)
**What exists:**
- `client/scripts/autoloads/game_state.gd` — receives ObserverSnapshot
- ObserverSnapshot v6 with player_inventory field (Sprint 6 #449 done)
- D-065 inventory spec (3x3 grid, 1-9 hotkeys)
**What the ticket needs:**
- 3x3 grid UI, bottom-right screen position
- Item icons rendered from ObserverSnapshot.player_inventory data
- 1-9 number key direct access (highlight selected slot)
- Empty slots not displayed (icons appear when items carried per D-065)
- Insert-styled rendering (geometric frames, D-048)
- z-layer 6 (insert overlay)
**Integration points:**
- Wire data from ObserverSnapshot v6 (already exists, Sprint 6 #449)
- Item icon assets: placeholder colored squares for v0.1 (real sprites deferred)
- Selection feedback: highlight border on selected slot
**Gotchas:**
- ObserverSnapshot.player_inventory is Vec<VisibleItem> (item_id, icon_path, name)
- Icons appear dynamically as items are carried (grid is NOT always 9 slots visible)
- Number keys 1-9 map to grid positions (top-left to bottom-right, row-major)
### #439: Stance toggle UI (Sprint 6 carry-over)
**What exists:**
- `client/scripts/autoloads/game_state.gd` — receives ObserverSnapshot
- ObserverSnapshot v6 with player_stance field (Sprint 6 #449 done)
- D-053 stance system (Sprint/Walk/Careful/Crouch)
**What the ticket needs:**
- HUD indicator showing current stance (text label + icon)
- Position: top-left or top-right (TBD, not bottom where dialogue appears)
- Keybind: C key or Ctrl key to cycle stances
- Stance labels: Sprint/Walk/Careful/Crouch (or per OQ-25 resolution if answered)
- Insert-styled rendering
- z-layer 7 (UI layer, always visible)
**Integration points:**
- Wire data from ObserverSnapshot v6 (already exists)
- Keybind sends PlayerAction::ToggleStance to server
- Visual feedback: stance name + movement speed indication
**Gotchas:**
- OQ-25 (stance name "Careful" or "Sneak") is low-priority open question — use "Careful" for now
- Stance affects movement speed visibly — player should see slower/faster movement after toggle
- UI updates on ObserverSnapshot.player_stance change (not client prediction)
### #431: Fog entity visualization
**What exists:**
- Fog shader foundation (#430, blocked until that ticket completes)
- Sound propagation events in ObserverSnapshot (D-018 three-range model)
- D-033 entity color system
**What the ticket needs:**
- Sound pings per D-059: 2-3 thin concentric expanding rings (sonar-style), insert white-blue
- Recognized entity rendering: D-033 color glow + faint silhouette + 0.8s breathing pulse + ±0.5 tile position drift
- Unrecognized entity rendering: neutral grey #555566 blob, no silhouette
- Recognition transition governed by server cognitive delay (#423)
- Render layer: on top of fog shader, below insert overlay (between Layer 5 and Layer 6)
**Integration points:**
- Blocked by #430 (fog shader), #423 (server cognitive delay)
- Uses ObserverSnapshot.pending_recognitions data (server #423 provides this)
- Uses D-033 entity color for recognized entities
- Sound events from ObserverSnapshot.sound_events
**Gotchas:**
- Cognitive delay visualization: grey blob → color + silhouette transition over ~0.3s
- Position drift is client-side interpolation (server provides approximate position, not exact)
- Sound ping animation: spawn sprite, expand + fade over 1.5s, then remove
- Recognized silhouette: use simplified sprite (just identifying feature like "vest" or "apron")
### #434: Dialogue box
**What exists:**
- Monologue display system (`client/scripts/rendering/` — Sprint 3-4)
- D-061 dialogue box spec
- D-062 invisible locked options
- D-064 walk-away mechanic
**What the ticket needs:**
- Dialogue UI at bottom screen, max 20% height, max-width (exact pixel value per OQ-29 or reasonable default)
- Layout: NPC speech top, player response options below, left-aligned
- Max 3 response options visible
- NO portraits (NPC is on screen)
- Monologue floats ABOVE dialogue box (z-layer 7) — spatial separation
- Walk-away: WASD during dialogue → fade over 300ms, no close button
- z-layer 6 (insert overlay — dialogue box is diegetic)
**Integration points:**
- Server dialogue system (future sprint #305) will populate dialogue data
- For Sprint 7: build UI skeleton, test with mock NPC dialogue data
- Walk-away sends PlayerAction::DialogueEnd to server
- Monologue continues above dialogue (both can be visible simultaneously)
**Gotchas:**
- OQ-29 (dialogue max-width pixel value) is low-priority — use 60-70% screen width as reasonable default
- NO close button — only way to exit is walk-away (WASD) or select dialogue option
- Response options are buttons/selectable text, not just labels
- Auto-pause integration: future sprint (single-player pause when dialogue active)
## Dependency Chain
```
Carry-over critical path:
#429 (cursor states) → #432 (interaction list)
#430 (fog shader rebuild) → #431 (fog entity viz)
Parallel standalone:
#433 (world radial menu)
#438 (inventory UI)
#439 (stance UI)
#434 (dialogue box)
Server dependency:
#423 (server cognitive delay) → #431 (fog entity viz)
```
## Sprint 7 Client Load
Sprint 7 has **8 client tickets** (6 carry-overs + 2 new), making it the heaviest client sprint yet. Focus on:
1. **Finishing Sprint 6 UI carry-overs** (cursor, fog, interaction list, radial menu, inventory, stance)
2. **Fog shader rebuild (#430)** is the largest technical risk — complete rebuild, performance-sensitive
3. **Dialogue box (#434)** lays foundation for Sprint 8 dialogue system activation
If #430 (fog shader) proves too complex, scale back noise animation (simpler shader) or defer #431 to Sprint 8.
## PR Workflow
When ready to submit, create a PR with `tea` CLI. All flags are required to avoid TTY prompts:
```bash
tea pr create --repo jpmschweitzer/settled-reach --login schweitz --title "feat(client): Sprint 7 — UI completion (cursor, fog, interaction, radial, inventory, stance, dialogue)" --description "See docs/sprints/sprint-7/client.md" --base main --head client
```
+84
View File
@@ -0,0 +1,84 @@
# Sprint 7: Talk — Copy Tasks
**Goal:** Complete interaction UI layer and activate basic dialogue system with NPC conversations.
**Branch:** `copy`
**Agents:** Mellanie (author), Paula (narrative), Gestalt (systems)
## Carry-over from Sprint 6
None — all Sprint 6 copy tickets completed.
## New Tickets
| # | Title | Blocked by |
|---|-------|------------|
| #443 | Archetype evidence presentation spec — detective case file vs smuggler notebook | — |
Use `db/connectors/ticket show <id>` for full details.
## Key Decisions
- `decisions/content.md` — D-065 (inventory spec), D-034 (THE FRIEND pattern)
- `decisions/perception.md` — D-033 (entity color as relationship)
- `decisions/scope.md` — D-027 (vertical slice criteria)
## Notes
### #443: Archetype evidence presentation spec
**What exists:**
- D-065 inventory spec (3x3 grid, 1-9 hotkeys, all characters get 9 slots)
- D-034 THE FRIEND pattern (contradiction discovery as wow moment #3)
- Smuggler character profile (wiki, NPC-format brief from Sprint 5 #383)
- Detective character profile (wiki, NPC-format brief from Sprint 5 #383)
- Inventory UI (client #438, Sprint 6/7) — will render items in grid
**What the ticket needs:**
- Design specification document at `docs/design/archetype-evidence-presentation.md`
- **Detective version:** Case file aesthetic — institutional, analytical, organized
- Evidence item presentation: formal labels, clinical descriptions
- Contradiction markers: flagged discrepancies, red highlight on conflicting data
- Visual language: clean, structured, Commission-approved formatting
- Example items: badge, datapad, evidence tags, contraband samples
- **Smuggler version:** Personal notebook aesthetic — informal, pragmatic, survival-focused
- Evidence item presentation: handwritten notes, practical labels, street terminology
- Contradiction markers: crossed-out notes, question marks, personal uncertainty
- Visual language: rough, lived-in, annotated by hand
- Example items: manifest copy, access token, comm log (from Sprint 6 #441)
- UI copy for both archetypes (item names, descriptions, tooltip text)
- Spec must inform visual design (for future sprite work) and copy tone
**Integration points:**
- Informs client inventory UI rendering (future: item sprites will follow this aesthetic)
- Informs copy team authoring of item descriptions (tone, voice, formatting)
- Builds on D-065 inventory mechanics (both archetypes use same 3x3 grid, different presentation)
- Supports D-034 THE FRIEND contradiction discovery (how contradictions appear in case file vs notebook)
**Gotchas:**
- This is a design spec, not implementation — no code, no sprites yet
- Focus on: tone, voice, labeling conventions, contradiction presentation, archetype differentiation
- Smuggler notebook should feel personal (this is YOUR notebook), detective case file should feel institutional (this is COMMISSION evidence)
- Contradiction presentation is key: detective sees "DISCREPANCY FLAGGED", smuggler sees "wait, that doesn't add up" handwritten note
- Reference D-033 entity color as relationship model — evidence is also relationship-dependent (what detective flags as suspicious, smuggler sees as normal)
## Dependency Chain
```
#443 (evidence spec) → standalone, design document
```
## Sprint 7 Copy Load
Sprint 7 has only **1 copy ticket** — light workload. #443 is a design specification (not authoring), estimated 4-6 hours.
If capacity allows, copy team can preview Sprint 8 content work:
- Line pool authoring (once server #308 spec is complete)
- Dialogue content for v0.1 NPCs
- Monologue pool expansion
## PR Workflow
When ready to submit, create a PR with `tea` CLI. All flags are required to avoid TTY prompts:
```bash
tea pr create --repo jpmschweitzer/settled-reach --login schweitz --title "docs(copy): archetype evidence presentation spec" --description "See docs/sprints/sprint-7/copy.md" --base main --head copy
```
+287
View File
@@ -0,0 +1,287 @@
# Sprint 7: Talk — Joint Integration
**Goal:** Complete interaction UI layer and activate basic dialogue system with NPC conversations.
**Teams:** Server, Client, Copy, Audio
**Agents:** All implementation agents (Dudley, Stig, Tyre, Hoshe, Mellanie, Paula, Gestalt, Inigo)
## Sprint Overview
Sprint 7 is the completion sprint for Sprint 6's unfinished UI work (6 carry-over tickets) and the foundation sprint for the dialogue system. Sprint 1-5 built the simulation, bridge, rendering, content loading, and FRIEND NPCs. Sprint 6 delivered movement stances, tile occupancy, verbs, and inventory mechanics (server-side). Sprint 7 completes the UI layer that makes those mechanics visible and playable, and begins dialogue system implementation.
After Sprint 7, players can:
- See cursor states change based on hover target (entity/object/world)
- Interact with entities via vertical lists and world radial menu
- See fog breathe with animated noise and recognize entities through cognitive delay
- View inventory and stance in HUD
- Begin basic NPC conversations through the dialogue box
## Team Distribution
| Team | Ticket Count | Load |
|------|--------------|------|
| Server | 5 tickets | Medium (cognitive delay, line pool spec, YAML loader, interaction memory schema, eavesdrop) |
| Client | 8 tickets | **HEAVY** (6 Sprint 6 carry-overs + 2 new; fog shader is major rewrite) |
| Copy | 1 ticket | Light (archetype evidence spec, design document) |
| Audio | 1 ticket | Light (6 audio assets for interaction states) |
**Total: 15 tickets**
## Pre-Sprint Requirements
No blocking decisions or schema work. All Sprint 6 server work is complete:
- ObserverSnapshot v6 (player_stance, player_inventory) — done (#449)
- Two-phase verb computation — done (#422)
- Stance system — done (#417)
- Smuggler inventory — done (#424)
Sprint 7 can proceed immediately.
## Critical Path
```
Server track (dialogue foundation):
#308 (line pool spec) → #326 (YAML loader) → enables future #305 (dialogue system)
Server track (fog cognitive delay):
#423 (cognitive delay) → Client #431 (fog entity viz)
Client track (UI carry-overs):
#429 (cursor states) → #432 (interaction list)
#430 (fog shader rebuild) → #431 (fog entity viz)
Client track (parallel standalone):
#433 (world radial menu)
#438 (inventory UI) — wire data from ObserverSnapshot v6
#439 (stance UI) — wire data from ObserverSnapshot v6
#434 (dialogue box) — foundation for future dialogue system
Copy track:
#443 (evidence spec) — standalone design doc
Audio track:
#440 (6 audio assets) — supports client UI (#429, #431, #433, #434)
```
**Critical integration point:** Server #423 (cognitive delay) must land before client #431 (fog entity visualization) can integrate. Client #430 (fog shader rebuild) is also a blocker for #431.
**Largest risk:** Client #430 (fog shader rebuild) is a complete rewrite of the fog rendering system. High risk of performance regressions or visual artifacts. Requires early performance testing.
## Cross-Team Integration Points
### Server → Client: Cognitive delay data (#423 → #431)
**Server deliverable (#423):** Add `pending_recognitions` field to ObserverSnapshot:
- List of entities in fog that are in recognition delay state
- Data per pending entity: approximate position (±0.5 tile drift), delay_remaining_ticks, trigger_type (normal/urgent)
- Recognition transitions: grey blob → recognized (with color + silhouette) when delay expires
**Client consumer (#431):** Fog entity visualization reads `pending_recognitions` and renders:
- Unrecognized: grey blob #555566, no silhouette, breathing animation
- Recognition transition: grey → D-033 color + faint silhouette over ~0.3s
- Recognized: full D-033 color glow + silhouette feature + breathing pulse
**Timeline:** Server #423 should land mid-sprint (after #308, parallel to #326). Client #431 is blocked by both #423 (server) and #430 (client fog shader).
**Coordination:** Dudley (server) defines wire format for pending_recognitions. Stig (client) consumes format and renders fog entities per Araminta's D-059/D-060 spec.
### Server → Client: Line pool spec (#308 → future dialogue work)
**Server deliverable (#308):** Line pool format specification document at `docs/architecture/line-pool-format.md`:
- YAML structure for dialogue.yaml and monologue.yaml files
- Tag definitions (access, trust, situation, topic, mood, character, trigger, prerequisite)
- File naming conventions and directory structure
- ID format: `{template}_{d|m|e}_{###}`
**No direct client dependency in Sprint 7.** This spec enables:
- Server #326 (YAML loader) — Sprint 7
- Copy team line authoring — Sprint 8+
- Server #305 (dialogue selection pipeline) — Sprint 8+
**Timeline:** Server #308 should land early (week 1) to unblock #326 and enable copy team preview of authoring workflow.
### Client → Audio: UI interaction sounds (#429, #431, #433, #434 → #440)
**Client deliverables:** Four UI systems that trigger audio:
- #429 (cursor states): cursor hover on entity → play cursor_hover.ogg
- #431 (fog recognition): entity recognition complete → play fog_recognition.ogg
- #433 (radial menu), #438 (inventory), #439 (stance): insert UI opens → play implant_open.ogg
- #434 (dialogue box): dialogue starts → ambient dip (-6dB to -8dB)
**Audio deliverable (#440):** 6 audio assets (5 .ogg files + 1 ambient dip implementation spec)
**Timeline:** Audio assets can be authored in parallel with client UI work. Integration happens when client tickets land — Stig adds audio calls to UI event handlers.
**Coordination:** Inigo (audio) delivers assets to `client/audio/` directory. Stig (client) integrates audio calls into cursor state machine, fog rendering, radial menu, dialogue box.
## Sprint Completion Proof
At the end of Sprint 7, the following must be observable in-game:
### Cursor and Interaction UI
1. **Cursor states work:** Hover over empty tile → default ticks. Hover over NPC → entity hover (ticks expand, D-033 color). Hover over object → X-shape grey cursor. All transitions 150ms smooth.
2. **Entity interaction list renders:** Hover over NPC with multiple verbs → vertical list appears (2-4 options max), anchored to entity, insert-styled. Click verb → PlayerAction::Interact sent to server.
3. **World radial menu works:** Right-click world tile → radial menu opens with 2 spokes (Observe + Insert). Drag-release or click-click to select. Renders on z-layer 6.
4. **Audio feedback:** Cursor hover plays subtle tick/ping. Radial menu open plays implant hum.
### Fog System
5. **Fog shader renders:** Launch game, observe 5-layer fog system:
- Clear cone with soft gradient edge (no hard line)
- Light fog (peripheral) with animated Perlin noise (8-10s cycle), desaturated colors
- Deep fog (previously explored) with zone temperature tint, slower noise (15-20s cycle)
- Fog breathes — noise animation cycles, fog feels alive
6. **Fog entity visualization works:**
- Sound events: thin concentric expanding rings (sonar-style), white-blue, fade over 1.5s
- Unrecognized entity: grey blob #555566, no silhouette, breathing animation
- Cognitive delay: grey blob → D-033 color + silhouette transition over ~0.3s
- Recognized entity: full D-033 color glow + faint silhouette + breathing pulse + ±0.5 tile position drift
7. **Cognitive delay timing:** Observe sound in fog → grey blob appears → monologue fires ("Those footsteps... that's Kael's walk") → 0.6s later → blob transitions to green (known/friendly) with vest silhouette. Timing feels like character recognition, not UI update.
8. **Audio feedback:** Fog recognition plays warm organic chime when transition completes.
### HUD and Inventory
9. **Inventory UI renders:** Smuggler character → bottom-right 3x3 grid appears. Icons for 3 items (manifest copy, access token, comm log). Detective character → 2 items (or empty if no items carried). Press 1-9 keys → item selection feedback (highlight border).
10. **Stance toggle UI renders:** Top-left or top-right stance indicator shows current stance (Sprint/Walk/Careful/Crouch). Press C → stance cycles → indicator updates. Visual feedback: stance name + movement speed indication.
11. **Audio feedback:** Inventory or stance UI opens → implant activation hum.
### Dialogue System Foundation
12. **Dialogue box renders:** Bottom screen, max 20% height, left-aligned. No portrait. Layout: NPC speech top, player response options below. Max 3 options visible. Test with mock NPC dialogue data (hardcoded test strings).
13. **Walk-away mechanic works:** During dialogue, press WASD → dialogue fades over 300ms, no close button required.
14. **Monologue above dialogue:** Monologue floats above dialogue box (z-layer 7). Both visible simultaneously — character can think one thing while NPC says another.
15. **Audio feedback:** Dialogue starts → ambient audio dips -6dB to -8dB (background recedes). Dialogue ends → ambient returns to 0dB.
### Server Systems
16. **Cognitive delay system active:** Server logs show CognitiveDelay component tracking pending recognitions. KnowledgeEvent emitted after delay expires (0.6s base, 0.3s urgent). ObserverSnapshot.pending_recognitions populated correctly.
17. **Line pool spec complete:** `docs/architecture/line-pool-format.md` exists and is readable by copy team. YAML structure documented, tag definitions clear, file conventions specified.
18. **YAML loader functional:** Server loads dialogue.yaml and monologue.yaml files at startup. Hot-reload works (file change → server reloads pool). Query API: `query_lines(access, situation, topic, mood)` returns filtered Vec<Line>.
19. **InteractionMemory schema designed:** `docs/architecture/interaction-memory-schema.md` exists. FactId format, interaction state enum, metadata fields documented. Aligns with D-041 KnowledgeGraph BTreeMap pattern.
20. **ListeningFocus implemented:** Server tracks stationary_ticks. After 30 ticks (~3s) of being stationary, eavesdrop positioning bonus applies (boost sound perception range).
### Integration
21. **All systems compose:** Cursor + fog + interaction list + radial menu + inventory + stance + dialogue all work simultaneously. No system breaks another.
22. **No performance regressions:** Fog shader <1ms/frame. Client framerate stable at 60 FPS. Server tick budget <100ms (Active tier at 10 tps per D-026).
23. **Audio integration complete:** All 6 interaction sounds play at correct trigger points. Ambient dip works for dialogue (no audio glitches or clipping).
### Validation Tests
**Simulation (server):**
```bash
# Cognitive delay system tests
cargo test simulation::perception::cognitive_delay
# Line pool loader tests
cargo test content::line_pool
# ListeningFocus tests
cargo test simulation::interaction::listening_focus
```
**Client rendering:**
```bash
# Godot client launches without errors
cd client && godot --headless --quit
# Fog shader compilation (manual test: launch game, observe fog rendering with no console errors)
# Performance test: Godot profiler shows fog rendering <1ms/frame
```
**Audio integration:**
```bash
# Manual test: trigger each audio event, verify sound plays
# - Cursor hover on entity
# - Fog recognition complete
# - Radial menu open
# - Dialogue start (ambient dip)
```
## Test Plan Alignment (D-030)
Sprint 7 is in **Phase 3** (simulation depth) with continued **Phase 2** (integration) coverage.
Key test requirements:
**Phase 2 (integration):**
- Cognitive delay pipeline: perception event → cognitive delay → KnowledgeEvent → ObserverSnapshot.pending_recognitions → client fog entity rendering
- UI event flow: cursor hover → audio trigger, radial menu open → audio trigger, dialogue start → ambient dip
**Phase 3 (simulation depth):**
- Cognitive delay timing: 0.6s base, 0.3s urgent (verify tick counts at 10 tps)
- Line pool filtering: 4-layer filtering (access → situation → topic/mood → selection)
- ListeningFocus: stationary_ticks increments correctly, resets on movement, eavesdrop bonus applies at threshold
Hoshe's involvement: QA review on #430 (fog shader — large rewrite, performance regression risk), #423 (cognitive delay — new perception pipeline component), #326 (YAML loader — hot-reload complexity).
## Integration Risks
**Risk:** Fog shader rebuild (#430) is a complete rewrite. High risk of performance regressions (noise shaders are expensive) or visual artifacts (layer blending, z-fighting).
**Mitigation:** Stig implements #430 on feature branch, tests in isolation before merging. Performance target: <1ms/frame (monitor with Godot profiler). If performance regresses, scale back noise animation complexity (reduce cycle count, simplify Perlin shader, or use pre-baked noise texture). Visual artifacts: test z-layer ordering carefully (fog on Layer 5, entities on Layer 3, fog entities between Layer 5 and Layer 6).
**Risk:** Cognitive delay system (#423) introduces new timing-sensitive logic. Risk of edge cases (e.g., entity moves out of fog during delay, recognition fires for wrong entity).
**Mitigation:** Dudley adds integration tests for cognitive delay edge cases. Verify: delay cancellation on entity exit, delay restart on re-observation, correct entity mapping in pending_recognitions. Use CauseChain (D-030 sub-decision #4) for debugging provenance.
**Risk:** Client has 8 tickets (6 carry-overs + 2 new), making it the heaviest client sprint. High ticket count = coordination overhead and potential for incomplete work.
**Mitigation:** Prioritize critical path: #429 (cursor) → #432 (interaction list), #430 (fog shader) → #431 (fog entity viz). Standalone tickets (#433 radial menu, #438 inventory, #439 stance, #434 dialogue box) can be deferred to Sprint 8 if time is constrained. Fog shader (#430) is the largest technical risk — if it proves too complex, scale back or defer #431.
**Risk:** YAML loader hot-reload (#326) adds file watching complexity. Risk of file watch bugs (platform-specific, permission issues, polling overhead).
**Mitigation:** Use notify crate (well-tested Rust file watcher) or simple timestamp polling. Hot-reload is dev-only feature (not production runtime), so failures are non-critical. Fall back to manual restart if hot-reload is unstable.
**Risk:** Audio integration (#440) across 4 client systems (cursor, fog, radial, dialogue). Risk of audio timing bugs (sounds cut off, overlap incorrectly, or don't play).
**Mitigation:** Inigo delivers audio assets with clear trigger point documentation. Stig tests each audio trigger in isolation before integration. Use Godot AudioManager autoload (if it exists) for centralized audio management. Ambient dip uses AudioBus volume control (declarative, less error-prone than manual AudioStreamPlayer management).
## Definition of Done
Sprint 7 is complete when:
1. All 15 tickets marked `done` in database
2. All server code committed to `server` branch and tested
3. All client code committed to `client` branch and tested
4. All copy docs committed to `copy` branch
5. All audio assets committed to `audio` branch
6. PRs created for all four teams
7. Sprint completion proof checklist verified (all 23 observable criteria met)
8. Team Leader reviews in-game playtest: cursor states, fog shader, interaction UI, inventory/stance HUD, dialogue box foundation all working without desyncs, performance regressions, or audio glitches
## PR Coordination
Four team PRs will be created:
1. **Server team PR**:
- Branch: `server`
- Scope: Cognitive delay system, line pool spec, YAML loader, interaction memory schema, ListeningFocus
- Review focus: Cognitive delay timing accuracy, line pool spec clarity for copy team, YAML loader hot-reload stability, interaction memory schema alignment with D-041
2. **Client team PR**:
- Branch: `client`
- Scope: Cursor states, fog shader rebuild, entity interaction list, world radial menu, inventory UI, stance UI, fog entity visualization, dialogue box
- Review focus: Fog shader performance (<1ms/frame), cursor state transitions (smooth 150ms), UI z-layer correctness, audio integration (no glitches)
3. **Copy team PR**:
- Branch: `copy`
- Scope: Archetype evidence presentation spec
- Review focus: Spec clarity, archetype differentiation (detective institutional vs smuggler personal), contradiction presentation design
4. **Audio team PR**:
- Branch: `audio`
- Scope: 6 interaction audio assets
- Review focus: Audio aesthetic alignment with insert-styled UI, ambient dip implementation correctness, file format compatibility
All PRs target `main` branch. Server PR should merge first (provides cognitive delay data for client #431). Client, copy, and audio can merge in parallel after server lands.
## Notes for Team Leader
Sprint 7 is the UI completion and dialogue foundation sprint. After 6 sprints of simulation and mechanics, this is the sprint where the game becomes visibly playable:
- **Cursor states make interaction legible:** The cursor tells you what you're looking at before you click. Entity hover (D-033 color + brackets) vs object hover (X-shape grey) vs world (default ticks). Interaction intent is visible.
- **Fog breathes:** The shader rebuild (D-059) replaces flat fog with animated, knowledge-graph-driven fog. Fog entities pulse, recognized entities glow, sound pings expand. This is asymmetric information made visual.
- **HUD is complete:** Inventory grid, stance indicator, interaction lists, radial menu. The player can see what they're carrying, how they're moving, what they can do.
- **Dialogue box is ready:** The foundation for NPC conversations. Sprint 8 will activate the dialogue system; Sprint 7 builds the UI container.
Sprint 7 delivers D-027 criterion #2: "Observed a routine, noticed a deviation, felt compelled to investigate." The fog entity visualization (recognized vs unrecognized), cognitive delay (monologue-driven recognition), and interaction UI (verb lists, radial menu) compose into the observation-investigation loop.
Quality bar: All UI systems must compose without breaking each other. Cursor + fog + interaction + inventory + stance + dialogue running simultaneously with no performance regressions, no z-layer conflicts, no audio glitches. Integration is the success metric.
Sprint 7 is also the heaviest client sprint (8 tickets). If fog shader (#430) proves too complex, scale back or defer. The goal is completion, not perfection — fog can be polished in Sprint 8 if needed.
+178
View File
@@ -0,0 +1,178 @@
# Sprint 7: Talk — Server Tasks
**Goal:** Complete interaction UI layer and activate basic dialogue system with NPC conversations.
**Branch:** `server`
**Agents:** Dudley (dev), Tyre (arch), Hoshe (QA)
## Carry-over from Sprint 6
None — all Sprint 6 server tickets completed.
## New Tickets
| # | Title | Blocked by |
|---|-------|------------|
| #423 | Cognitive delay system for fog recognition | — |
| #308 | Line pool format specification | — |
| #326 | YAML content loader — hot-reload for previewer | #308 |
| #442 | InteractionMemory KG schema design | — |
| #426 | ListeningFocus — eavesdrop positioning via stationary_ticks | — |
Use `db/connectors/ticket show <id>` for full details.
## Key Decisions
- `decisions/perception.md` — D-060 (cognitive delay), D-059 (fog entity visualization)
- `decisions/content.md` — D-028 (dialogue architecture), D-035 (tag taxonomy)
- `decisions/architecture.md` — D-041 (knowledge graph data model)
- `decisions/scope.md` — D-053 (movement stance system)
## Notes
### #423: Cognitive delay system for fog recognition
**What exists:**
- `server/src/perception/observation.rs` — observation event system
- `server/src/knowledge/events.rs` — KnowledgeEvent and KnowledgeEventQueue
- `server/src/knowledge/graph.rs` — KnowledgeGraph component with confidence tiers
- `server/src/perception/interpretation.rs` — entity recognition logic
**What the ticket needs:**
- New `CognitiveDelay` component to track pending recognition timers (entity_id, delay_until_tick, trigger_type)
- Recognition trigger types: normal (0.6s base), urgent (0.3s on observe_anomaly)
- System that drains cognitive delay queue and emits KnowledgeEvent when delay expires
- Integration point: observation.rs emits sound/perception events → cognitive delay system buffers them → emits delayed KnowledgeEvent after timer
- Client-facing: ObserverSnapshot receives pending_recognitions list (entity positions in fog without identity until delay expires)
**Integration points:**
- Blocks client #431 (fog entity visualization) — client needs pending_recognitions data
- Uses existing KnowledgeEvent pipeline
- Monologue system should fire DURING delay, not after (monologue IS the recognition per D-060)
**Gotchas:**
- Delay values are tunable constants — start with D-060 values (0.6s base, 0.3s urgent), expect playtesting adjustments
- Urgent context detection: observe_anomaly trigger from monologue system (already exists in server/src/simulation/monologue.rs)
- Must respect tick-based timing (10 ticks/sec per D-031) — 0.6s = 6 ticks delay
### #308: Line pool format specification
**What exists:**
- `content/` directory skeleton (created in Sprint 5, #385)
- `content/_schema/` — YAML schema definitions (#386)
- `content/global/enums/` — D-035 enum files (access, trust, situation, topic, mood)
- D-035 tag taxonomy in decisions/content.md
- D-028 dialogue architecture (4-layer filtering)
**What the ticket needs:**
- Formal specification document at `docs/architecture/line-pool-format.md`
- Define YAML structure for dialogue files (structural tags: id, text, role, access, trust, situation; selection tags: topic, mood, tags)
- Define YAML structure for monologue files (adds: character, trigger, prerequisite)
- File naming conventions: `dialogue.yaml`, `monologue-smuggler.yaml`, `monologue-detective.yaml`
- Directory structure: `content/campaigns/{campaign}/systems/{system}/{location}/dialogue.yaml`
- Tag validation rules (access is required list, trust is required enum, situation is optional list, etc.)
- ID format specification: `{template}_{d|m|e}_{###}` for machine-parseability
**Integration points:**
- Blocks #326 (YAML content loader needs this spec)
- References D-035 (tag taxonomy), D-028 (4-layer dialogue architecture), D-032 (separate monologue pools)
- Used by copy team for authoring
**Gotchas:**
- This is a specification document, not code — no Rust implementation in this ticket
- Must be clear enough for copy team (Mellanie, Paula) to author against
- Define how prerequisite maps to KG state (which confidence levels gate which lines)
### #326: YAML content loader — hot-reload for previewer
**What exists:**
- `server/src/content/` module directory (exists but minimal)
- Content directory structure (#385 done)
- YAML schema definitions (#386 done)
- `make validate-content` CLI (#392 done)
**What the ticket needs:**
- Rust system parsing dialogue.yaml and monologue.yaml files into in-memory LinePool structures
- LinePool struct: indexed by tags (BTreeMap for determinism per D-041)
- Hot-reload capability: watch content files, reload on change (for line previewer authoring workflow)
- Integration with existing content loading infrastructure
- Query API: `query_lines(access_tier, situation, topic, mood) -> Vec<Line>`
- Load at startup, reload on file change
**Integration points:**
- Blocked by #308 (needs format spec)
- Blocks line previewer workflow (deferred to future sprint, but hot-reload is the foundation)
- Blocks #305 (dialogue selection pipeline, future sprint)
- Uses existing content/ directory structure
- Must support D-028 4-layer filtering architecture
**Gotchas:**
- Use BTreeMap not HashMap (D-041 determinism requirement)
- Hot-reload is dev-only feature (not production runtime)
- File watching: use notify crate or simple timestamp polling
- Pool indexing strategy: pre-index by access tier (hard filter) for performance
### #442: InteractionMemory KG schema design
**What exists:**
- `server/src/knowledge/types.rs` — KnowledgeGraph, EntityKnowledge, FactKnowledge
- `server/src/knowledge/graph.rs` — knowledge update systems
- D-041 knowledge graph data model
- D-064 walk-away KG recording requirement
**What the ticket needs:**
- Design FactKnowledge schema extension for interaction tracking
- FactId format for interaction memory: `interaction_{entity_a}_{entity_b}_{timestamp}`
- Interaction state enum: Initiated, Completed, WalkedAway, Confrontation
- Metadata fields: conversation_topic, confrontation_flag, walk_away_tick, incomplete_flag
- Query patterns: "did I start talking to X?", "did I walk away mid-confrontation?", "when did I last talk to X?"
- Integration with dialogue system (future): dialogue start → emit Initiated fact, dialogue end → update to Completed, walk-away → update to WalkedAway
**Integration points:**
- Extends D-041 KnowledgeGraph FactKnowledge map
- Used by walk-away mechanic (#427, future sprint)
- Used by confrontation system (D-063, D-064)
- Queryable by monologue system (affects future dialogue triggers)
**Gotchas:**
- This is schema design, not full implementation — define the data structure and query API
- Document in `docs/architecture/interaction-memory-schema.md`
- Must align with D-041 BTreeMap<FactId, FactKnowledge> pattern
- Interaction memory is per-character (player character only for v0.1, NPCs in future)
### #426: ListeningFocus — eavesdrop positioning via stationary_ticks
**What exists:**
- `server/src/simulation/movement.rs` — Velocity, Position components, movement systems
- `server/src/simulation/stance.rs` — MovementStance component (Sprint/Walk/Careful/Crouch)
- D-053 stance system with stationary detection
- TilePresence component (posture layers)
**What the ticket needs:**
- New `ListeningFocus` component (stationary_ticks: u32, eavesdrop_target: Option<StableId>)
- System that increments stationary_ticks when Velocity is zero
- Eavesdrop threshold: 30 ticks (~3 seconds at 10 tps) of being stationary
- Integration with perception: when stationary_ticks > threshold AND in range of conversation → boost sound perception range
- Reset stationary_ticks to 0 on any movement
**Integration points:**
- Builds on D-053 stance system (Careful stance might reduce eavesdrop threshold)
- Uses existing sound propagation system (D-018 three-range sound model)
- Affects observation events (perception/observation.rs)
**Gotchas:**
- Eavesdrop is not automatic — requires deliberate positioning (player must stop moving)
- Stationary in Sprint stance doesn't trigger eavesdrop (too high-alert, not listening)
- Position must be within ~3-5 tiles of conversation source
- Sound propagation already exists; this ticket adds positioning bonus
## Dependency Chain
```
#308 (line pool spec) → #326 (YAML loader)
#423 (cognitive delay) → standalone, feeds client #431
#442 (InteractionMemory schema) → standalone, design document
#426 (ListeningFocus) → standalone, positioning mechanic
```
## PR Workflow
When ready to submit, create a PR with `tea` CLI. All flags are required to avoid TTY prompts:
```bash
tea pr create --repo jpmschweitzer/settled-reach --login schweitz --title "feat(server): Sprint 7 — cognitive delay, line pool spec, YAML loader, interaction memory, eavesdrop" --description "See docs/sprints/sprint-7/server.md" --base main --head server
```