Skip to content

P-5: Handle Dialogue #5

@spuentesp

Description

@spuentesp

Category: play | Epic: 4 | Priority: high

Summary

Process player dialogue with NPCs or environment. Loads NPC personality,
memories, and facts to generate contextually appropriate responses.
Creates memories for both PC and NPC.

Acceptance Criteria

  • NPC identified from dialogue target
  • NPC personality loaded for response generation
  • Semantic memory search retrieves relevant NPC memories
  • NPC response reflects personality, knowledge, relationships
  • Memory created for NPC about this conversation
  • Memory created for PC if significant information exchanged
  • Relationship changes proposed if applicable
  • Information revelation tracked

Dependencies

This use case depends on:

  • DL-2
  • DL-7
  • DL-10
  • P-3

Implementation

Layer: 2

Files to modify:

  • packages/agents/src/monitor_agents/narrator.py
  • packages/agents/src/monitor_agents/memory_manager.py

NEO4J Operations:

  • neo4j_get_entity (authority: *)
  • neo4j_list_facts (authority: *)

MONGODB Operations:

  • mongodb_get_memories (authority: *)
  • mongodb_create_memory (authority: *)

QDRANT Operations:

  • qdrant_search_memories (authority: *)

Notes:

  • NPC consistency is key
  • Consider mood modifiers
  • Track what information NPCs reveal

Testing Requirements

Minimum coverage: 80%

Unit tests:

  • test_dialogue_npc_identified: target parsed
  • test_npc_memories_retrieved: relevant memories found
  • test_npc_response_personality: response matches personality
  • test_memory_created: NPC memory stored
  • test_dialogue_narration: non-NPC speech handled

Integration tests:

  • test_dialogue_full_flow: dialogue -> response -> memory
  • test_npc_information_tracking: info exchange tracked

References

Documentation:


Generated from /home/sebas/monitor2/docs/use-cases/play/P-5.yml

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedBlocked by unfinished dependenciesplayCore gameplay (P-*)

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions