content: author Fenn + the NPC role prompt body

This commit is contained in:
2026-07-10 12:26:04 -05:00
parent 0c3d64d068
commit a2c654c047
3 changed files with 66 additions and 1 deletions

View File

@@ -25,3 +25,17 @@ def test_load_npc_unknown_returns_none(tmp_path, monkeypatch):
def test_content_root_env_override(tmp_path, monkeypatch):
monkeypatch.setenv("CONTENT_ROOT", str(tmp_path))
assert content._content_root() == tmp_path
def test_fenn_resolves_from_repo_content():
# No CONTENT_ROOT env — exercises the walk-up resolver against real content.
npc = content.load_npc("fenn")
assert npc is not None
assert npc["capabilities"]["offerable_quests"] == ["find_the_ledger"]
assert npc["knowledge"] # non-empty authored knowledge list
def test_npc_prompt_body_is_authored():
from app import prompts
body = prompts.system_prompt("npc")
assert "MOVE" in body and len(body) > 200