[Feature] Rules and bestiary lookup at the table and in Prep #553
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Requested by the owner in the v4.4.0 checkpoint A feedback (#535, GM answers, 2026-09-07): "I also would love it if I could reference rules / search bestiaries, which isn't currently a supported feature in Quest Board but I would love to have added." Alongside it, the same answer names the things a GM needs at the table: the beats and arcs laid out, name generation, and a fast way back into the wiki's history. This issue is the reference half.
What
A search over the rules and creatures of the campaign's game system, reachable from where a GM already works: Prep, the Shelf's search (Ctrl-K), and the live table surface of the redesign. A hit renders as Quest Board already renders game-aware content (a stat block in the structured schema from #130; a rule, condition or action as text with its source), can be put on the Shelf as a card with a GM side and a player-safe side, and carries its licence attribution.
Why it belongs here
Quest Board is already game-aware (v3.9.0: a game-system registry, structured stat blocks, a stat-conversion wizard) and already has the card and search surfaces a lookup would land on. What it lacks is the content and a way to search it. Self-hosting shapes the answer: content must be either bundled under a licence that allows redistribution or fetched from a source the operator can point at, and the lookup must work offline at a table with no dependence on a third party being up.
Open questions the investigation answers first
/askanswers from campaign history.Not in scope
Anything that requires paid or non-redistributable content; a full rules engine; character sheets.
Milestone candidate: v4.5.0 Table & Safety Tools, on top of the v4.4.0 design system. The investigation is filed against this issue as a committed report under
docs/design/, not the gitignored internal folder.Investigation done, committed as
docs/design/rules-reference-investigation-2026-09.md(PR to follow). The short version:Licences allow bundling, for two sources. Pathfinder 2e's remaster line is under the ORC licence (mechanics may be copied into software, commercially, with the ORC Notice and Paizo's attribution; proper nouns, lore and art are reserved). D&D's SRD 5.1 and 5.2.1 are CC-BY-4.0, irrevocably. Machine-readable forms: the Foundry pf2e packs (each record carries
publication.license, so an ORC-only filter is trivial) and Open5e's data (per-document licences;srd-2014andsrd-2024). The Paizo Community Use Policy, which Archives of Nethys and pf2ools rely on, forbids commercial use, so neither is a foundation for a hosted product. The 2026-07 decision not to bundle content was right about that policy and is reversed here only for ORC and CC-BY material.The codebase is close. The registry and versioned stat schemas already hold exactly a Monster Core or SRD creature's headline numbers; the stat-block renderer, the Shelf card and reveal pipeline, the Prep tool registry and the LLM call surface are reusable as they are. Missing: content, a table with a real index (the session
tsvectorsearch is the pattern to copy; the wiki search is a Python substring match that ignoresstats), areferencesnapshot kind on the Shelf, and structured citations.Design: repo import scripts pull pinned upstream commits, filter by licence, drop reserved material (mechanics and rules text in, creature flavour paragraphs out), and write committed packs with a manifest; a
reference_entriestable seeded idempotently like the builtin schemas;GET /api/game-systems/{key}/reference?q=&kind=&level…; a "Look up" Prep tool, a third Ctrl-K section, areferenceShelf card (a condition's text is player-safe by default, a creature's stat block never is), a licences page, the same search inside the v4.4.0 Table mode, and later an ask-the-rules tool with{answer, citations[]}underjson_schema.Phases: 1 data and search (backend-only, can start now beside the redesign); 2 surfaces; 3 table and ask; 4 optional operator packs for OGL third-party books. Milestone candidate v4.5.0 for 2 and 3.
Decisions to confirm with the owner: bundle in the image rather than download-on-demand; start phase 1 now; the reserved-material rule as stated.
Direction confirmed by the owner (2026-09-08): importer-first. Quest Board ships no game content. People load content they have, in formats already in use, and affirm at import (a required checkbox backed by a versioned, server-recorded affirmation) that they are allowed to; starter packs built from ORC and CC-BY sources are release assets fetched on request, never bundled; exports carry licences forward and withhold what may not be shared; and a host can act on rightsholder notices (#555, filed).
Formats in phase 1: the native Quest Board pack (also the export format; a bare JSON array and a CSV for hand-written homebrew), Foundry VTT documents (the common denominator of every system the owner plays: PF2e, D&D 5e, Ryuutama, Discworld, Ember), 5etools homebrew JSON, Dungeon Master's Vault
.orcbrew, and Open5e JSON. Two scopes (instance by an admin, campaign by a GM), campaign wins on a name clash, GM-only visibility by default for campaign packs, sanitised HTML, size caps, a private-address guard on URL fetches.The contract is
docs/design/content-packs-spec.md(PR to follow). Phase 1 is starting now as six lanes: foundation; Foundry adapter; 5etools and orcbrew adapters; Open5e adapter and starter scripts; notices (#555); the minimal Content packs screen. Backend-first, beside the redesign.Phase 1 foundation merged (PR #557,
531c2a9): thecontent_packsandreference_entriestables (migration1c2d3e4f5a6b), the import pipeline with the server-enforced affirmation, format detection, the native.qbpack/ JSON array / CSV adapter, sanitisation and caps, URL fetch with the private-address guard, full-text search with campaign-over-instance precedence and GM-only visibility, export with a withheld list, and every endpoint for members, admins and GMs. 118 new tests; the whole backend suite passes.docs/CONTENT-PACKS.mddocuments the format and the affirmation.Adapter lanes are built and rebasing onto it: Foundry VTT documents (PF2e and 5e maps, generic fallback, licence read from all four publication paths), 5etools JSON and
.orcbrew(EDN), Open5e JSON plus the two starter-pack build scripts. The notices lane (#555) and the Content packs screen are in progress on the same base. The spec is updated with the conventions the build settled (PR #558).Phase 1 (import, search, export, the screen) is on main and deployed to dev (main
d87c08c, dev at https://questboard-dev.rhoving.com/).PRs, in merge order
content_packs+reference_entries(migration1c2d3e4f5a6b), the adapter contract, the import pipeline with the affirmation gate, local search, export with per-record licence withholding, the endpoints.docs/design/content-packs-spec.md.questboard.sniff, which had been claiming every bare JSON array..orcbrewreaders, adapter warnings reaching the importer, a CRLF fix for.orcbrewfiles saved on Windows.kindis inside the sniff window; the writer emitskindfirst and a test pins that).ContentPacksscreen (Admin → Content packs tab; a GM panel on the campaign page), plus the affirmation 422 brought back to the project's one error shape (detailstring, wording underaffirmation).scripts/content/(SRD 5.1/5.2.1 under CC-BY, and the ORC-licensed Pathfinder 2e records with flavour text removed). Starter packs are release assets fetched on request, never bundled.Dev check: migration head
2d3e4f5a6b7capplied,DETECT_ORDER= questboard, foundry, fivetools, orcbrew, open5e, the content-pack and notice routes answer 401 unauthenticated, the frontend bundle carries the screen, no worker or beat errors. An import through the UI on dev still wants a human with an OIDC login; the invented fixtures underwebapp/backend/tests/fixtures/reference/are safe files to try.Decisions worth keeping
.qbpackformat is the native and export shape; a hand-written bare JSON array must putkindfirst (documented indocs/CONTENT-PACKS.md).Still open under this issue