Skip to content

[companion][viewer] Surface relations, camp beats, and companion quest arcs #118

Description

@100yenadmin

Summary

Surface companion relationships, camp beats, faction/NPC disposition, and CompanionQuestArc progression in a readable Relations/Camp view.

Refs #58. Related to #69 and #70.

Gameplay/user-experience uplift: 8.4/10.

Design Evidence

Local design bundle:

  • openworlds/screen-relations.jsx
  • openworlds/screen-map.jsx
  • openworlds/screen-dialogue.jsx

Relevant prototype anchors:

  • screen-relations.jsx:3 defines ScreenRelations.
  • screen-relations.jsx:4 tracks selected faction.
  • screen-relations.jsx:5 tracks selected NPC.
  • screen-relations.jsx:94 defines reputation bar.
  • screen-relations.jsx:115 defines faction detail.
  • screen-relations.jsx:202 defines NPC detail.
  • screen-relations.jsx:230 renders conflict/blocker details.
  • screen-relations.jsx:264 exposes Find/Send word actions.
  • screen-map.jsx:35 toggles camp mode.
  • screen-dialogue.jsx:3 shows how a parley/dialogue surface could later attach.

Architecture Plan

Use the new companion engine state from #110/#111 as read-only UI input.

Read model:

  • RelationsSurface
    • companions
      • identity, approval/relationship summary, current arc, stage, available/locked beat indicators
    • camp_beats
      • recent beats, cooldown summary, next eligible hints
    • companion_quest_arcs
      • title, current stage, status, linked quest id, lock reason if player-visible
    • factions
      • known reputation/disposition only
    • npcs
      • player-known NPC cards and relationship tags

Mutation path:

  • Finding/talking/sending word should be disabled unless backed by engine/provider moves.
  • Camp beat scheduling remains engine-owned.
  • UI can request "go to camp" by navigating to a camp/map surface or submitting existing rest/camp command if supported.

Code Map

Inspect first:

  • servers/engine/companion_arc.py
  • servers/engine/companion_banter.py
  • servers/engine/server.py
  • servers/engine/models.py
  • servers/engine/tests/test_companion_arc.py
  • servers/engine/tests/test_companion_banter.py
  • viewer/dashboard.html
  • viewer/server.py

Implementation Notes

  • Start with read-only projection and a viewer panel.
  • Do not modify Claude story/DM skill prompts.
  • Do not invent companion dialogue content.
  • Show state-derived labels: locked, available, in progress, completed, cooldown, stale.
  • For unavailable arcs/beats, show player-safe reasons only.
  • Use the same escaping rules as quest/inspect popovers.

Red-Team Review Checklist

Acceptance Criteria

  • Viewer or macOS app shows companion/camp/relations state derived from engine snapshots.
  • CompanionQuestArc stage and status are visible when player-known.
  • Camp beat history/cooldown is visible without changing scheduler state.
  • Unsupported actions are disabled.
  • Tests cover hidden data filtering and legacy/missing companion state.

Focused Validation

cd /Volumes/LEXAR/repos/ClawDnD
python3 -m py_compile viewer/server.py servers/engine/companion_arc.py servers/engine/companion_banter.py servers/engine/server.py
uv run --directory servers/engine --group dev pytest -q tests/test_companion_arc.py tests/test_companion_banter.py tests/test_dashboard.py
python3 -m unittest discover -s viewer/tests -q
git diff --check

Original-Agent Handoff

Inspect first:

  • servers/engine/companion_arc.py
  • servers/engine/companion_banter.py
  • servers/engine/models.py
  • servers/engine/server.py
  • viewer/dashboard.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttier-1Tier 1: Claude Code plugin

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions