MolinoPro

20260430_city-agenda-session-engine

Master Codebase Guidebook
Markdown + HTML Dev-Docs Renderer - Frontend Client Module

Default Index
Open README.md
Root: README.mdtrips
Milestones
H1City Agenda Session Engine

Status: active operative snapshot, with first-pass Prisma scaffold now added

Source snapshot:

  • Google Doc Human Layer Plan-Commit-Build secuence_vlatest
  • first tab group 📗 This Week Locked
  • local context from studio, session-stacks, and trips
H2Purpose

This note turns the newer Silk Route, seasonal pulse, and Maestro de Ritmos layer into a buildable Molino model.

It does not replace the current domain. It clarifies the next bridge between:

  • SessionStack
  • SessionPath
  • Trip
  • future dated session execution
  • public narrative and commercial atmosphere
H2Core model

The correct working model is:

CityAgendaWeek -> SessionInstance -> attendees -> cashflow overlays -> Studio content

Current Molino mapping:

  • SessionStack = the atomic reusable session definition
  • SessionPath = a guided sequence or bundle of session stacks
  • Trip = public commercial wrapper and planning surface
  • Offer and Order = downstream commercial snapshots
  • Document and dev-docs = narrative and implementation memory

Target refinement:

  • Trips should increasingly behave as seat allocators into shared session logic
  • weekly city agenda should become the deterministic generator of dated session reality
  • atmosphere should be attached as metadata and tone, not as a second system
H2New entities
H3`CityAgendaWeek`

Purpose:

  • defines the recurring weekly pulse of a city
  • declares which session templates run on which weekday and time
  • becomes the reusable source for future dated session generation

Minimum fields:

  • id
  • citySlug or city reference
  • title
  • summary
  • seasonMode
  • activeFrom
  • activeTo
  • isActive
  • data
H3`CityAgendaSlot`

Purpose:

  • one recurring slot inside a city agenda week
  • points to a session template that should run repeatedly

Minimum fields:

  • id
  • agendaWeekId
  • sessionStackId
  • weekday
  • startTimeLocal
  • defaultDurationMin
  • capacityMin
  • capacityMax
  • sortOrder
  • data
H3`SessionInstance`

Purpose:

  • the real dated occurrence generated from a weekly agenda slot
  • receives Trip, FIT, member, or invited attendees
  • becomes the atomic commercial and operational unit

Implementation note:

  • first pass can likely extend or adapt GroupSession
  • do not invent a duplicate runtime occurrence model unless GroupSession proves too travel-specific

Minimum fields:

  • id
  • sessionStackId
  • agendaWeekId
  • agendaSlotId
  • city
  • date
  • startTime
  • endTime
  • capacityMin
  • capacityMax
  • status
  • data
H2Atmosphere layer

This layer should stay subtle. It belongs in metadata, editorial copy, and planning surfaces. It should not make the public site harder to scan.

Good uses:

  • season labels
  • rhythm labels
  • story focus
  • partner and guild context
  • local network identity

Avoid:

  • replacing plain business language everywhere
  • mystical naming in operational forms
  • decorative copy that weakens booking clarity

Suggested metadata fields for SessionInstance.data:

  • rhythmTag
  • seasonMode
  • storyFocus
  • energyLevel
  • guidePrimaryId
  • apprenticeIds
  • affiliateStops
  • consignedProducts
  • attachedFlows
H2Commercial rule

The main business insight stays:

  • you do not need seven disconnected businesses
  • you need one strong session system with layered revenue around it

That means one dated session instance may later generate:

  • ticket revenue
  • affiliate commissions
  • goods sales
  • content hooks
  • training value
  • future templates or workshops

But those overlays should attach to the same session truth.

H2Next build order
H31. Spec and schema
  • define CityAgendaWeek
  • define CityAgendaSlot
  • decide whether GroupSession becomes the first SessionInstance
  • keep this pass minimal and migration-safe
H32. Generation engine
  • generate dated session instances from weekly agenda slots
  • keep generation deterministic
  • avoid mixing Trip creation with agenda generation in the same first pass
H33. Trip and FIT merge
  • let Trips reserve seats into existing generated instances
  • let FIT booking surfaces prefer existing instances
  • keep Trip as wrapper, not runtime occurrence truth
H34. Session P&L layer
  • add costMin
  • add break-even view
  • add visible margin logic after minimum coverage
H35. Public narrative layer
  • reflect the city pulse on studio/travel
  • later reflect selected shared-session logic on /trips
  • keep tone calm, human, and commercially readable
H2Immediate next action

Completed in this pass:

  • added CityAgendaWeek to Prisma as the recurring city-level weekly agenda
  • added CityAgendaSlot to Prisma as the recurring slot layer under that agenda
  • kept GroupSession as the dated execution model for now
  • added an optional agendaSlotId link from GroupSession back to its source slot
  • added the supporting relations on City, Experience, and SessionStack

Next concrete implementation step:

  • add the first server actions for creating agenda weeks and slots, then decide whether to generate GroupSession rows lazily or in explicit batches

That is now the clean bridge from current session-stack seeding into the real shared-session engine.

H2Reset-safe note

After the first agenda schema pass, the reset/reseed path should stay simple:

  • prisma/seed.ts now restores the broad base seed
  • that base seed also restores:
    • seeded cities
    • seeded studio skill session stacks
    • seeded studio travel session stacks and session path
  • standalone seed scripts still exist for cities, skills, and journeys when a partial refresh is enough

Milestones are still a separate recovery concern. They should likely follow the same long-term pattern as skills and journeys:

  • local rebuild from current source of truth
  • optional ingest endpoint for future Google Sheets or Apps Script feeds

But they should not be folded blindly into the base seed until the milestone source-of-truth decision is explicit.