feat: GM Workbench sync tools — rumor, random table, loot parcel (#144, #147, #149) #220

Merged
claude-bot merged 1 commit from feat/144-147-149-workbench-tools into feat/v3.10-gm-workbench 2026-07-19 16:26:19 +00:00
Contributor

Three campaign-grounded GM Workbench generators on the #136 generic engine — each a single ToolDef in GENERATOR_TOOLS (sync, JSON-mode), persisting a GenerationResult (#138). Batched into one PR because they share generation_service.py and the planning-page surfacing.

Tools

  • rumor (#144) — a batch of tavern-ready hooks, each tagged true / false / distorted, grounded in the campaign's open plot threads + any picked wiki lore (never generic filler). Lands via "Add as plot thread" → a rumored, GM-private PlotThread.
  • random_table (#147) — a d6/d12/d20 roll table for any prompt, optionally lore-grounded. Lands via "Save as lore entry" (document) through the reusable WorkbenchResultActions bar with a rendered markdown table.
  • loot_parcel (#149) — an itemized parcel scaled to source/party; item fields (name/qty/est_value/currency/notes) shaped to LootEntry. Lands per item via "Save as artifact" (LoreEntry) or "Add to ledger" (#112 loot ledger, now shipped).

Notes

  • No new API surface, models, or migrations — every landing action reuses an existing endpoint (createThread / createLoot / createLoreEntry).
  • Tolerant parse_output for each (never raises; degrades a malformed reply gracefully), mirroring #141.
  • Panels are surfaced on the GM-gated planning page (whole page redirects non-GMs) alongside the #141 description tool, ahead of the #138 history scratchpad.
  • Implemented by two parallel delegates (backend/frontend, disjoint file sets), then reviewed + verified here.

Verification (Docker)

  • Backend 712 passed (incl. 18 new tests across test_workbench_{rumor,random_table,loot}.py — happy path, 422 validation, GM-only 403, parser tolerance)
  • Frontend 372 passed / 38 files (19 new); prod build OK
  • ruff check + ruff format --check clean; eslint 0 errors

Closes #144. Closes #147. Closes #149.

Three campaign-grounded GM Workbench generators on the #136 generic engine — each a single `ToolDef` in `GENERATOR_TOOLS` (sync, JSON-mode), persisting a `GenerationResult` (#138). Batched into one PR because they share `generation_service.py` and the planning-page surfacing. ## Tools - **rumor (#144)** — a batch of tavern-ready hooks, each tagged `true` / `false` / `distorted`, grounded in the campaign's open plot threads + any picked wiki lore (never generic filler). Lands via **"Add as plot thread"** → a `rumored`, GM-private `PlotThread`. - **random_table (#147)** — a d6/d12/d20 roll table for any prompt, optionally lore-grounded. Lands via **"Save as lore entry"** (`document`) through the reusable `WorkbenchResultActions` bar with a rendered markdown table. - **loot_parcel (#149)** — an itemized parcel scaled to source/party; item fields (`name`/`qty`/`est_value`/`currency`/`notes`) shaped to `LootEntry`. Lands per item via **"Save as artifact"** (`LoreEntry`) or **"Add to ledger"** (#112 loot ledger, now shipped). ## Notes - No new API surface, models, or migrations — every landing action reuses an existing endpoint (`createThread` / `createLoot` / `createLoreEntry`). - Tolerant `parse_output` for each (never raises; degrades a malformed reply gracefully), mirroring #141. - Panels are surfaced on the **GM-gated** planning page (whole page redirects non-GMs) alongside the #141 description tool, ahead of the #138 history scratchpad. - Implemented by two parallel delegates (backend/frontend, disjoint file sets), then reviewed + verified here. ## Verification (Docker) - Backend **712 passed** (incl. 18 new tests across `test_workbench_{rumor,random_table,loot}.py` — happy path, 422 validation, GM-only 403, parser tolerance) - Frontend **372 passed** / 38 files (19 new); prod build OK - `ruff check` + `ruff format --check` clean; eslint 0 errors Closes #144. Closes #147. Closes #149.
Three campaign-grounded GM Workbench generators on the #136 generic engine,
each a single ToolDef in GENERATOR_TOOLS (sync, JSON-mode), persisting a
GenerationResult (#138):

- rumor (#144): a batch of tavern-ready hooks, each tagged true/false/distorted,
  grounded in open plot threads + picked wiki lore. Lands via "Add as plot
  thread" → a rumored, GM-private PlotThread.
- random_table (#147): a d6/d12/d20 roll table for any prompt, optionally
  lore-grounded. Lands via "Save as lore entry" (document) through the reusable
  WorkbenchResultActions bar with a rendered markdown table.
- loot_parcel (#149): an itemized parcel scaled to source/party, item fields
  shaped to LootEntry. Lands per item via "Save as artifact" (LoreEntry) or
  "Add to ledger" (#112 loot ledger).

All landing actions reuse existing endpoints — no new API surface, models, or
migrations. Tolerant parsers degrade gracefully rather than raise. Panels are
surfaced on the GM-gated planning page alongside the #141 description tool.

Backend 712 passed; frontend 372 passed; ruff + eslint clean; build OK.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
claude-bot merged commit 9fa185a6ee into feat/v3.10-gm-workbench 2026-07-19 16:26:19 +00:00
claude-bot deleted branch feat/144-147-149-workbench-tools 2026-07-19 16:26:20 +00:00
Sign in to join this conversation.
No description provided.