Update README, MEMORY, and TODO to reflect current prototype and track remaining PLAN gaps
CI / headless-tests (push) Successful in 2m6s

This commit is contained in:
zwitschi committed 2026-10-31 12:44:18 +01:00
1 parent 81b5d5ce5a
commit c808165302
3 files changed
+91 -10

No files matched your search

+13 -2
View File
@@ -30,10 +30,21 @@ Session memory for durable decisions, state, and gotchas. Keep concise, remove o
- RefCounted reference cycle: `NPCController` holds an `FSM` that holds a back-reference to its owner, so test suites report "resources still in use at exit". Benign (process exit), but worth breaking later (e.g. `WeakRef` or explicit `dispose()`).
- Headless (dummy renderer) logs "Parameter m is null" from `mesh_get_surface_count`; it does not occur with a real GL driver and does not affect logic.
- Wand screening (Joke Shop) is policy-only; the interaction is not yet in the prototype (see TODO).
## Open Questions
- Tone picker UI design and whether tones should be selectable per interaction.
- Whether the responder avatar should be playable/controllable or purely scripted.
- Localization target languages.
## Plan vs TODO Gaps (2026-10-31 evaluation)
PLAN.md describes features that are neither implemented nor tracked in TODO.md. Recorded here so they are not lost; promote to TODO.md when work begins.
- **Protesters NPC type** — PLAN.md premise lists "protesters" among the crowd, but there is no `PROTESTER` archetype in `Rules.NpcType`, no profile, and no events.
- **Door lock/secure mechanic** — PLAN.md Level 3 lists "Lock or secure the door" as an action; no door-lock mechanic exists.
- **Flashlight interaction** — PLAN.md Level 3 lists "Use a flashlight or radio warning tone at night"; `flashlight` appears in scenario `equipment` lists but has no interaction.
- **"Call someone else" NPC reaction** — PLAN.md Level 2 lists "Call someone else" as a possible NPC response; the `Rules.Reaction` enum has no such outcome.
- **LATE shift phase never fires (bug)** — `violent_emergency_event` is tagged `Rules.Phase.LATE`, but no scenario defines a LATE entry in `shift_phases` (only EARLY/MIDDAY/EVENING). `EventScheduler.pull_due` filters by phase, so the violent-threat event can never spawn.
- **Shift results not persisted** — `Save` autoload exposes `save_shift_result`/`load_shift_results`, but nothing calls them; PLAN.md says shift results use JSON in `user://`.
- **Navigation not implemented** — PLAN.md says `NavigationRegion3D`/`NavigationAgent3D` drive movement; NPCs currently use direct `move_and_slide` toward waypoints (no navmesh).
- **Localized text not in JSON** — PLAN.md says localized dialogue/text live in JSON files; the `Strings` table is currently a GDScript constant, not JSON.
+11 -8
View File
@@ -141,7 +141,10 @@ The unit test runner is the project's own lightweight harness (no editor plugin
| 6 | Security assistance radio (Level 4) |
| R | Emergency radio, hold on-screen button ~1.6s (Level 5) |
| E | Inspect access artifacts / close inspection |
| A / D | Allow / deny entry during inspection |
| W | Handheld wand screening (wand venues only) |
| A / D | Allow / deny entry during inspection or wand check |
| T | Cycle dialogue tone (Professional / Friendly / Firm / Suspicious) |
| Tab | Cycle target among nearby NPCs (aim-free alternative) |
| F | Toggle debug overlay |
## Architecture
@@ -170,7 +173,7 @@ This section follows the structure of the arc42 architecture documentation templ
### 2. Constraints
- The first implementation should be small enough for a playable vertical slice.
- The engine is Godot 4 with GDScript; the prototype has not yet been implemented.
- The engine is Godot 4 with GDScript; a playable prototype vertical slice is implemented.
- Venue-specific policies must be configurable rather than hard-coded into individual NPCs.
- The game must preserve the de-escalation-first design described in [`PLAN.md`](PLAN.md).
- The project uses the repository workflow described in [`AGENTS.md`](AGENTS.md).
@@ -306,9 +309,9 @@ Architecture decisions are recorded as ADRs:
- [`PLAN.md`](PLAN.md) — Game design plan and scenario details.
- [`AGENTS.md`](AGENTS.md) — Development and collaboration workflow.
- [`TODO.md`](TODO.md) — Active checkbox task list, when created.
- [`DONE.md`](DONE.md) — Completed task sections, when created.
- [`MEMORY.md`](MEMORY.md) — Persistent session notes, when created.
- [`TODO.md`](TODO.md) — Active checkbox task list.
- [`DONE.md`](DONE.md) — Completed task sections.
- [`MEMORY.md`](MEMORY.md) — Persistent session notes.
- [`docs/adr/`](docs/adr/) — Architecture Decision Records.
## Development Status
@@ -318,10 +321,10 @@ Implemented so far:
- Godot 4.3 project scaffold, input map, procedural world builder
- Venue-driven simulation core: `ShiftCoordinator`, `VenueScenario`, `EventScheduler`, `NPCController` + FSM, `AccessVerifier`, `EscalationManager`, `RadioSystem`, `IncidentRecorder`, `ReputationEvaluator`, `CrowdSystem`
- Three authored scenarios (Hollywood Boulevard building, The Joke Shop, Late Night TV Studio) with access policies, NPC archetypes, and event pools
- Headless unit tests: 25 passing (access rules, escalation, radio cooldown/battery, NPC reaction determinism, scenario data, full-shift simulation)
- First-person prototype with interaction HUD, access inspection, radio report form (incl. emergency hold-to-confirm), debug overlay, and shift review
- Headless unit tests: 41 passing (access rules, escalation, radio cooldown/battery, NPC reaction determinism, scenario data, full-shift simulation, wand screening, responder dispatch, localization strings)
- First-person prototype with interaction HUD, access inspection, wand screening, radio report form (incl. emergency hold-to-confirm), dispatched responder avatars, dialogue tone picker, aim-free targeting, color-coded escalation feedback, procedural audio cues, debug overlay, and shift review
Not yet implemented: wand-screening interaction, dispatched responder avatar in the world, dialogue tone picker, localization, audio, editor-based tooling.
Not yet implemented: body-camera replay timeline, long (10-15 minute) shift lengths with phase-based lighting, venue selection screen, editor-based GUT integration, and RefCounted cycle cleanup (see `TODO.md`).
### Smoke Test Checklist
+67
View File
@@ -1,5 +1,72 @@
# TODO
## Bug Fixes
### LATE shift phase never fires
- [ ] Add a `Rules.Phase.LATE` entry (e.g. `{"start_s": 900.0}`) to `shift_phases` in `hollywood_building()`, `joke_shop()`, and `tv_studio()` in `src/content/scenario_factory.gd`.
- [ ] Confirm `violent_emergency_event` (tagged `Phase.LATE`, `time_range_s` 760–880) can now be pulled by `EventScheduler.pull_due`.
- [ ] Add a test asserting the LATE-phase event is reachable (e.g. tick a coordinator past 900s and check the event pool is eligible).
## Missing PLAN Features — NPCs and Reactions
### PROTESTER archetype
- [ ] Add `PROTESTER` to `Rules.NpcType` and a `"Protester"` entry to `NPC_TYPE_NAMES` in `src/core/rules.gd`.
- [ ] Add a protester profile in `ScenarioFactory.shared_profiles()` (id `"protester"`, temperament ~0.5, base_compliance ~0.4, reactions favoring ARGUE/IGNORE/RECORD).
- [ ] Add a `TYPE_COLORS` entry for `PROTESTER` in `src/game/npc_avatar.gd`.
- [ ] Add routine protester events (e.g. `"protest_gather"`, intent `"protest"`) to the Hollywood Boulevard and TV Studio event pools.
- [ ] Add a scenario test asserting the protester profile exists and is referenced by an event.
### "Call someone else" NPC reaction
- [ ] Add `CALL_SOMEONE` to `Rules.Reaction` in `src/core/rules.gd`.
- [ ] Handle `CALL_SOMEONE` in `NPCController._update_state_for_reaction` (e.g. transition to `ARGUING` or a new `CALLING` state).
- [ ] Give relevant profiles (influencer, trespasser) a weight for `CALL_SOMEONE` in their `reactions_by_level`.
- [ ] Add a reaction log line in `GameManager._react_to_outcome` and a `Strings` entry.
- [ ] Add a test asserting `CALL_SOMEONE` can be rolled and updates the FSM.
## Missing PLAN Features — Equipment and Environment
### Door lock/secure mechanic
- [ ] Add a door state (locked/unlocked) to `WorldBuilder` (or a small `Door` node) with a visible indicator.
- [ ] Add a player action + key binding (e.g. `L`) to toggle the door lock in `GameManager`.
- [ ] Make `FORCE_ENTRY` reactions fail (or be delayed) while the door is locked; log the consequence.
- [ ] Add a `Strings` entry and a headless test for the lock state transition.
### Flashlight interaction
- [ ] Add a flashlight toggle + key binding (e.g. `G`) in `GameManager`.
- [ ] Attach a `SpotLight3D` to the guard that toggles with the flashlight.
- [ ] Make the flashlight affect NPC perception at night (e.g. widen `AWARE_RADIUS` or raise notice probability when lit).
- [ ] Add a `Strings` entry and a headless test for the perception effect.
## Persistence
### Persist shift results
- [ ] Call `Save.save_shift_result(review)` from `GameManager._on_shift_ended`.
- [ ] Load past results (`Save.load_shift_results()`) and show a short history (count + last grade) on the shift review screen.
- [ ] Add a test that a saved review round-trips through `Save` (or verify manually in the smoke test).
## Navigation
### Navmesh-based NPC movement
- [ ] Add a `NavigationRegion3D` with a baked navmesh covering the sidewalk, steps, and entrance in `WorldBuilder`.
- [ ] Switch `NpcAvatar` from direct `move_and_slide` toward `target_position` to `NavigationAgent3D` path following.
- [ ] Keep the per-intent waypoint and returning-trespasser re-targeting behavior working on the navmesh.
- [ ] Verify NPCs route around the building/steps in a manual smoke test.
## Localization
### Move Strings to JSON
- [ ] Create a `res://` JSON file (e.g. `res://content/strings.en.json`) containing the current `Strings.TABLE` entries.
- [ ] Load the JSON at startup and keep `Strings.lookup`/`Strings.fmt` signatures unchanged.
- [ ] Update `test_strings.gd` to load from the JSON-backed table and confirm all keys still resolve.
## Future Systems (design-level backlog)
- [ ] Body-camera replay timeline in the shift review.