Platform + Ops

Domain event plan

One list of SectionCreated, SessionCompleted, AssignmentSubmitted, etc. with triggers and consumers.

  • Track 30 events across onboarding, sessions, AI, ops, and glossary flows
  • Note which service emits/consumes each event before wiring Supabase/Convex hooks

SectionCreated

Phase 1

Trigger: User creates Section via preset or manual form

Payload

section_id, owner_id, title, space_id, timestamp

Handlers

  • Analytics: track new sections
  • Notification: invite collaborators (optional)

Notes: Cheap win—fire from existing adapter without UI changes.

SessionCompleted

Phase 1

Trigger: User closes session room or marks session as done

Payload

session_id, session_kind, outcomes, next_steps, timestamp

Handlers

  • SessionMemory: append outcomes
  • AI: generate recap suggestion
  • Dashboard: update “continue session”

Notes: Feeds session memory + AI context.

AssignmentSubmitted

Phase 2

Trigger: Student submits assignment or upload

Payload

assignment_id, submission_id, owner_id, status, timestamp

Handlers

  • Notification: alert facilitators
  • Analytics: progress tracking

GlossaryTermApproved

Phase 2

Trigger: Reviewer approves glossary candidate

Payload

term_id, concept_id, language, reviewer_id, timestamp

Handlers

  • TranslationSession: update active glossaries
  • Supabase: sync term to shared repo

AIJobCompleted

Phase 3

Trigger: AI orchestration cell finishes run

Payload

job_id, input_node_ids, output_node_id, status, duration

Handlers

  • AuditLog: append run details
  • TaskPanel: create follow-up tasks
  • Notification: ping requester

PresetApplied

Phase 1

Trigger: User spins up a preset workspace or section

Payload

preset_slug, target_space_id, created_node_ids, owner_id, timestamp

Handlers

  • Analytics: preset adoption chart
  • Notification: share onboarding tips
  • AuditLog: record skeleton

ResourcePinned

Phase 1

Trigger: User pins/unpins a resource in workspace timeline

Payload

resource_id, space_id, action, user_id, timestamp

Handlers

  • Supabase: persist pin state
  • Notification: optional share to collaborators

SignalPromoted

Phase 2

Trigger: Signal is moved to featured/spotlight

Payload

signal_id, promoter_id, impact_axes, confidence, timestamp

Handlers

  • Timeline: refresh hero slot
  • Analytics: track promotion reasons
  • Email digest: include highlight

WorkspaceSwitched

Phase 1

Trigger: User switches between personal/learning/studio spaces

Payload

user_id, from_space, to_space, device, timestamp

Handlers

  • Analytics: stickiness metrics
  • FeatureFlags: re-evaluate toggles
  • RecentSpaces: update history

SnapshotImported

Phase 1

Trigger: Admin runs Supabase/seed import

Payload

snapshot_id, owner_id, node_counts, duration, status

Handlers

  • AuditLog: capture import
  • Notification: email success/failure
  • Cache: refresh in-memory snapshot

DiscussionResolved

Phase 2

Trigger: Facilitator marks discussion thread as resolved

Payload

discussion_id, resolved_by, resolution_summary, timestamp

Handlers

  • Assignments: mark linked tasks done
  • Notifications: ping participants
  • Analytics: completion rate

DiscussionPostAdded

Phase 1

Trigger: Participant adds a reply or top-level post

Payload

discussion_id, post_id, author_id, space_id, timestamp

Handlers

  • Notifications: mention watchers
  • Analytics: engagement heatmap
  • SessionMemory: surface highlights

SignalArchived

Phase 2

Trigger: Signal gets archived or hidden from feeds

Payload

signal_id, archived_by, reason, timestamp

Handlers

  • Timeline: remove from hero
  • Resource buckets: refresh counts
  • Snapshot: mark as inactive

WorkspaceCreated

Phase 1

Trigger: User spins up a new workspace/space from gallery

Payload

space_id, space_type, owner_id, features, timestamp

Handlers

  • FeatureFlags: initialize defaults
  • Analytics: track adoption
  • Email: send onboarding tips

AssignmentGraded

Phase 2

Trigger: Facilitator records a grade/feedback

Payload

assignment_id, submission_id, grader_id, score, timestamp

Handlers

  • Notifications: inform student
  • Analytics: gradebook update
  • AI: learn rubric preferences

SessionPinned

Phase 1

Trigger: User pins a session to dashboard or nav

Payload

session_id, user_id, pin_context, timestamp

Handlers

  • Dashboard: reorder pinned area
  • Supabase: persist pin
  • Analytics: measure session stickiness

SnapshotExported

Phase 1

Trigger: Admin exports a snapshot JSON/SQL for backups

Payload

snapshot_id, owner_id, node_counts, format, timestamp

Handlers

  • Storage: upload artifact
  • AuditLog: add entry
  • Notification: DM status

GlossaryTermFlagged

Phase 2

Trigger: Interpreter flags a problematic glossary term

Payload

term_id, session_id, flag_reason, flagger_id, timestamp

Handlers

  • Glossary review queue
  • Notification: ping reviewer
  • AI: add to disambiguation dataset

SessionStarted

Phase 1

Trigger: Facilitator or participant launches a session room

Payload

session_id, session_kind, space_id, started_by, timestamp

Handlers

  • SessionMemory: stamp start time
  • Analytics: live usage counter
  • Notification: inform co-facilitators

SessionChainLinked

Phase 3

Trigger: User links current session to a previous one (continues_from)

Payload

session_id, previous_session_id, link_reason, user_id, timestamp

Handlers

  • Timeline: render chain
  • SessionMemory: inherit context
  • Analytics: chain depth tracking

ResourceTagged

Phase 1

Trigger: Tag or topic added to a resource

Payload

resource_id, tag, user_id, timestamp

Handlers

  • Search index: refresh facets
  • Notifications: ping followers of tag
  • Analytics: topic heatmap

CompositionPublished

Phase 2

Trigger: Composition is promoted to a resource or shared link

Payload

composition_id, resource_id, publisher_id, space_id, timestamp

Handlers

  • Resource feed: add entry
  • Notifications: share with collaborators
  • AuditLog: record publishing action

TaskCompleted

Phase 1

Trigger: User marks a task complete (assignment, session follow-up, ops queue)

Payload

task_id, parent_id, completed_by, timestamp

Handlers

  • Analytics: progress chart
  • SessionMemory: close follow-up
  • Notification: inform assignee/owner

AIInsightSaved

Phase 2

Trigger: User saves an AI-generated insight card

Payload

insight_id, source_nodes, session_id, saved_by, timestamp

Handlers

  • Snapshot: include in exports
  • Notifications: share with team
  • Analytics: AI adoption metrics

CalendarEventSynced

Phase 2

Trigger: Section/session timeline syncs to an external calendar

Payload

event_id, session_id, calendar_provider, status, timestamp

Handlers

  • AuditLog: record sync
  • Notifications: confirm to user
  • Error queue: retry failures

WorkspaceArchived

Phase 3

Trigger: Owner archives or pauses a workspace

Payload

space_id, archived_by, reason, timestamp

Handlers

  • FeatureFlags: disable beta toggles
  • Storage: move to cold tier
  • Notifications: inform members

PresetUpdated

Phase 2

Trigger: Admin edits a preset definition (fields, default facets, grid)

Payload

preset_slug, updated_by, changes, timestamp

Handlers

  • Snapshot: regenerate references
  • Notifications: alert preset subscribers
  • AuditLog: capture diff

SignalLinkedToSession

Phase 1

Trigger: Signal is explicitly linked to a session/assignment

Payload

signal_id, target_id, target_type, linked_by, timestamp

Handlers

  • SessionMemory: surface during prep
  • Timeline: show context chip
  • Analytics: track signal utilization

AttachmentUploaded

Phase 1

Trigger: User uploads a file/transcript to a session or PRD

Payload

attachment_id, parent_id, mime_type, uploader_id, timestamp

Handlers

  • Virus scan queue
  • Link to attachment board
  • Notifications: inform collaborators

FeatureFlagToggled

Phase 1

Trigger: Admin toggles a feature flag or cohort rollout

Payload

flag_key, new_state, changed_by, timestamp

Handlers

  • AuditLog: capture change
  • Notification: DM affected owners
  • Analytics: correlate with errors