Spec files are ephemeral (/tmp fine); the server DB is the durable
record — encounter docs carry hpFormula/ac/init, so past builds can be
reconstructed by querying live data, not from kept files.
Vetting before any write (vetSpec):
- monster/npc with neither maxHp nor hpFormula = hard reject (exit 3);
silent 10 HP defaults caused real damage. --allow-defaults escape
hatch warns loudly.
- character type in build spec = hard reject. PCs are added only from
campaign roster verbatim; tooling never invents or edits PC stats.
- missing ac or initMod/initiative = warning, build continues.
- duplicate participant names in one encounter = warning.
Flag parsing: --flags split from args, usage updated.
UNTESTED work in progress. Do not assume correct.
Scope: SERVER BACKEND ONLY (SQLite/Express, REACT_APP_STORAGE=server).
Does NOT work with Firebase SDK mode — no HTTP backend there, different
transport/auth. Skill + doc explicitly call this out.
- .agents/skills/ttrpg-encounter-builder/: harness-agnostic skill
(pi/claude/codex via .agents/skills + symlinks). SKILL.md + helper
script that batch-writes encounters via REST, rolls initiative, verifies.
- docs/ENCOUNTER_BUILDER.md: add Path normalization section, Build flow
(API/scripts) section with REST endpoint table, object templates,
recipe. Server-mode-only caveat noted.
Helper script syntax-checked + campaign lookup verified against running
instance, but full seed flow not regression-tested against test suite.