[Backlog] Campaign templates and cloning #125

Closed
opened 2026-07-14 19:56:48 +00:00 by claude-bot · 4 comments
Collaborator

Context / Motivation

Research/product brief. GMs starting a new campaign (or a one-shot) redo the same setup: scheduling modes, reminder offsets, timezone, wiki category skeleton, recurring arc structures. Cloning an existing campaign's structure without its history turns that into one click.

Spec (starting sketch)

Implementation rides the existing export/import machinery: export_campaign (webapp/backend/app/routers/campaigns.py:2580, EXPORT_SCHEMA_VERSION = "7" at :2566, complete lossless data.json) and import_campaign (services/import_service.py:71, SUPPORTED_SCHEMA_VERSIONS at :40). Add a "structure-only" export flavor (query param or export option) that emits the same schema with history stripped, then clone = structure-only export → import in one server-side action.

Structure-only contents:

  • Campaign settings: scheduling modes, reminder_offsets_minutes, timezone, notification config (minus guild/channel ids — prompt to re-link Discord)
  • Wiki: category skeleton + GM-selected entries (checkbox tree; default none — world bibles are the use case)
  • Arcs/threads: copied as templates with status reset (planned / unresolved, no session links)
  • Member list: optional (default off)
  • Excluded always: sessions, transcripts/summaries, attendance, votes, journals, analytics, platform message ids

"One-shot mode" preset: a built-in template selectable at campaign create — single tentative session, minimal ceremony (reminders trimmed to 24h, no arcs/threads), naming prompt.

UI: "Clone campaign" on the campaign settings page (GM) and "Start from template" on campaign create.

Out of scope

  • A template marketplace/registry.
  • Cross-instance template sharing (see open questions — depends on export-format stability).

Open questions

  • Sharing templates between instances: the structure-only zip is already portable via the normal import endpoint — is that enough, or does a first-class "import as template" UX matter?
  • Does structure-only bump EXPORT_SCHEMA_VERSION, or ride the same version with a "structure_only": true flag in data.json? (Leaning flag — importers ignore missing history naturally.)
  • Should cloned wiki entries keep cross-links (relationships) among the selected subset only?

Acceptance criteria (for when this is pulled)

  • Clone produces a campaign with identical settings/skeleton and zero sessions/history; source campaign untouched.
  • Structure-only zip imports on a fresh instance via the standard import path.
  • One-shot preset creates a ready-to-schedule single-session campaign in one step.

References

  • webapp/backend/app/routers/campaigns.py:2566 (EXPORT_SCHEMA_VERSION), :2580 (export_campaign, covered tables enumerated at :2598-2731)
  • webapp/backend/app/services/import_service.py:40 (SUPPORTED_SCHEMA_VERSIONS), :71 (import_campaign)

Filed from the July 2026 full-project review.

## Context / Motivation Research/product brief. GMs starting a new campaign (or a one-shot) redo the same setup: scheduling modes, reminder offsets, timezone, wiki category skeleton, recurring arc structures. Cloning an existing campaign's **structure without its history** turns that into one click. ## Spec (starting sketch) **Implementation rides the existing export/import machinery**: `export_campaign` (`webapp/backend/app/routers/campaigns.py:2580`, `EXPORT_SCHEMA_VERSION = "7"` at `:2566`, complete lossless `data.json`) and `import_campaign` (`services/import_service.py:71`, `SUPPORTED_SCHEMA_VERSIONS` at `:40`). Add a **"structure-only" export flavor** (query param or export option) that emits the same schema with history stripped, then clone = structure-only export → import in one server-side action. **Structure-only contents**: - Campaign settings: scheduling modes, `reminder_offsets_minutes`, `timezone`, notification config (minus guild/channel ids — prompt to re-link Discord) - Wiki: category skeleton + GM-selected entries (checkbox tree; default none — world bibles are the use case) - Arcs/threads: copied as templates with status reset (`planned` / unresolved, no session links) - Member list: optional (default off) - **Excluded always**: sessions, transcripts/summaries, attendance, votes, journals, analytics, platform message ids **"One-shot mode" preset**: a built-in template selectable at campaign create — single tentative session, minimal ceremony (reminders trimmed to 24h, no arcs/threads), naming prompt. **UI**: "Clone campaign" on the campaign settings page (GM) and "Start from template" on campaign create. ## Out of scope - A template marketplace/registry. - Cross-instance template sharing (see open questions — depends on export-format stability). ## Open questions - Sharing templates **between instances**: the structure-only zip is already portable via the normal import endpoint — is that enough, or does a first-class "import as template" UX matter? - Does structure-only bump `EXPORT_SCHEMA_VERSION`, or ride the same version with a `"structure_only": true` flag in `data.json`? (Leaning flag — importers ignore missing history naturally.) - Should cloned wiki entries keep cross-links (relationships) among the selected subset only? ## Acceptance criteria (for when this is pulled) - Clone produces a campaign with identical settings/skeleton and zero sessions/history; source campaign untouched. - Structure-only zip imports on a fresh instance via the standard import path. - One-shot preset creates a ready-to-schedule single-session campaign in one step. ## References - `webapp/backend/app/routers/campaigns.py:2566` (`EXPORT_SCHEMA_VERSION`), `:2580` (`export_campaign`, covered tables enumerated at `:2598-2731`) - `webapp/backend/app/services/import_service.py:40` (`SUPPORTED_SCHEMA_VERSIONS`), `:71` (`import_campaign`) _Filed from the July 2026 full-project review._
Author
Collaborator

Picked up for 4.6.0 (owner, 17 Oct 2026). The design is ready for the owner to read: docs/design/campaign-templates.md on branch design/125-campaign-templates (34c24ee0).

The main calls:

  • One mechanism: a setup flavour of the existing export (same schema, setup_only: true) and an import of it as a new campaign, run as a background job.
  • Always copied: settings, the game system, sheet definitions, rules links, the calendar's definition (#126), and the wiki's page templates.
  • Chosen in the dialog: wiki pages by kind, and maps.
  • Never copied: history of any kind, members' personal notes, the Discord link, and the AI overrides (API keys never leave a campaign).
  • Campaign content packs are copied only after the GM affirms them again.
  • Lines & Veils follow the people.
  • Only a GM of the source can clone, since a clone carries GM content.
  • On the hosted service, the add-on's create hook decides slots.

The owner's questions: Q188–Q191: template files or a library, which pages start ticked, the people, and a one-shot choice.

**Picked up for 4.6.0 (owner, 17 Oct 2026).** The design is ready for the owner to read: `docs/design/campaign-templates.md` on branch `design/125-campaign-templates` (34c24ee0). The main calls: - **One mechanism:** a *setup* flavour of the existing export (same schema, `setup_only: true`) and an import of it as a new campaign, run as a background job. - **Always copied:** settings, the game system, sheet definitions, rules links, the calendar's definition (#126), and the wiki's page templates. - **Chosen in the dialog:** wiki pages by kind, and maps. - **Never copied:** history of any kind, members' personal notes, the Discord link, and the AI overrides (API keys never leave a campaign). - **Campaign content packs** are copied only after the GM affirms them again. - **Lines & Veils** follow the people. - **Only a GM of the source can clone,** since a clone carries GM content. - **On the hosted service,** the add-on's create hook decides slots. The owner's questions: **Q188–Q191**: template files or a library, which pages start ticked, the people, and a one-shot choice.
Author
Collaborator

Owner's answers, 17 Oct 2026 (Questions page):

  • Q188 (a): "Start a new campaign from this one" in a campaign's settings, plus "Save the setup as a file" and "Start from a file" on New campaign. A template is a file; there is no library on the server.
  • Q189 (a): the world starts ticked (places, organisations, deities, creatures, artifacts, concepts, historical events, documents, NPCs). The story so far starts unticked (player characters, quests, pages the AI proposed from a session).
  • Q190 (a): only the GM is in the copy. "Invite the same people" sends each member an ordinary invitation, and GMs keep GM.
  • Q191 (a one-shot choice): not answered yet.

Recorded in the design doc's header.

**Owner's answers, 17 Oct 2026 (Questions page):** - **Q188 (a):** "Start a new campaign from this one" in a campaign's settings, plus "Save the setup as a file" and "Start from a file" on New campaign. A template is a file; there is no library on the server. - **Q189 (a):** the world starts ticked (places, organisations, deities, creatures, artifacts, concepts, historical events, documents, NPCs). The story so far starts unticked (player characters, quests, pages the AI proposed from a session). - **Q190 (a):** only the GM is in the copy. "Invite the same people" sends each member an ordinary invitation, and GMs keep GM. - **Q191 (a one-shot choice):** not answered yet. Recorded in the design doc's header.
Author
Collaborator

Q191 (a) (owner, 17 Oct 2026): New campaign offers "A one-shot". It sets up one pencilled-in session, reminders at 24 hours only, no series and the nudge off, and suggests archiving the campaign once it has been played. Everything else is as normal. All four templates questions are now answered, and the design is settled.

**Q191 (a) (owner, 17 Oct 2026):** New campaign offers "A one-shot". It sets up one pencilled-in session, reminders at 24 hours only, no series and the nudge off, and suggests archiving the campaign once it has been played. Everything else is as normal. All four templates questions are now answered, and the design is settled.
rbrooks referenced this issue from a commit 2026-10-17 09:55:21 +00:00
rbrooks referenced this issue from a commit 2026-10-17 10:08:49 +00:00
Author
Collaborator

Q193 (a) (owner, 18 Oct 2026): New campaign's "The setup of one of yours" will open the full copy dialog, so there's one way to copy a campaign. 4.6.0 ships without this, at the owner's call to release rc2 as is. It's filed for the next release.

**Q193 (a) (owner, 18 Oct 2026):** New campaign's "The setup of one of yours" will open the full copy dialog, so there's one way to copy a campaign. 4.6.0 ships without this, at the owner's call to release rc2 as is. It's filed for the next release.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/Quest-Board#125
No description provided.