[Scheduling/GM] Per-occurrence titles for recurring series, with LLM suggestions from the previous session #191
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?
Motivation
Recurring session series (#98) currently apply one static
title_templateto every materialized occurrence, so all weeks read the same ("Weekly Game"). A GM running an ongoing campaign wants each week's session to have its own title (and ideally a short description) — and, after playing a session, would love LLM-suggested titles for next week based on what just happened, which they can accept or override.Flow the GM wants:
Context / what exists to build on
app/models/session_series.py,series_service.py, and thematerialize_session_seriesBeat task (#98). Materialized sessions already have editabletitle(anddescription) columns onsessions— so per-occurrence manual titling is largely a UI affordance today; the new part is the suggestion generation and wiring it to "the next occurrence".app/routers/servicesbehindgenerateNameOptions/saveCanonicalName, frontendCampaignPlanning.jsxNameGeneratorPanel,api/planning.js) already generates candidate names from campaign context via the configured LLM (Ollama/API in Admin → Bot Settings). Reuse that pattern rather than inventing a new LLM path.sessions.summary/transcriptand campaign lore (lore_entries) are the natural inputs for "suggest next week's title from what just happened".session_summarisedpath / recap generation is the obvious place to compute suggestions for the next series occurrence (or compute lazily when the GM opens the upcoming session / series panel).Rough spec
titleand a shortdescriptionfor an individual materialized occurrence in the series UI (SeriesManager/ session detail) — distinct from the seriestitle_template. Detached/edited occurrences keep their own title regardless of later series edits (respect the existing edit-scope model from #98).POST /api/sessions/{id}/title-suggestions(or under the series) that, given a session, uses the previous session in the same series (its summary/transcript, plus recent lore) to return N candidate{title, description}pairs via the configured LLM. Cache like the name generator does.Out of scope
Acceptance criteria
References
series_service.py,materialize_session_seriesNameGeneratorPanel,generateNameOptions,api/planning.js) — the LLM-suggestion pattern to reusesessions.summary/transcript,audio_servicesummary pipeline,lore_entriesSuggested home: the v3.10.0 GM Workbench milestone (this is a generative session-prep feature) — or its own scheduling follow-up. Requested 2026-07-17.
Done — merged to
feat/v3.10-gm-workbenchvia PR #223.series_titlesworkbench tool (params{session_id}): a context builder folds the most recent prior summarised occurrence in the same series into the prompt →{suggestions: [{title, description}]}. Reuses the #136 engine (per "reuse the name generator pattern").SessionResponsenow exposesseries_id+series_occurrence_date(additive; frontend response only — not the bot contract) so the UI can identify series occurrences.SeriesTitleSuggesterpanel: pick an upcoming series occurrence → suggest → "Use this title" writes title+description onto the occurrence via the existingupdateSessionPATCH; an always-present manual entry is the fallback. Empty suggestions (no prior summary / LLM off) degrade to manual with no error.Acceptance criteria:
materialize_session_seriesinserts withon_conflict_do_nothing, so it never clobbers an edited title;SessionUpdatealready carries title+description.Interpretation note: surfaced as a workbench-style panel on the planning page (consistent with the rest of v3.10.0) rather than inline in
SeriesManager— deeper inline series-UI integration is a possible follow-up. No new models/migrations.Verified: backend 735 passed (incl. new
test_workbench_series_titles.py), frontend 397 passed, ruff + eslint clean, build OK. Not yet exercised against a live LLM on dev — pending your dev testing.