Skip to content

Learning Aggregates

Why This Exists

This document defines aggregate boundaries for the Learning Domain using Domain-Driven Design.

Owner

The owner is the Chief Product Officer and Enterprise Architect.

Business Value

Aggregate boundaries protect learning integrity. They ensure that course structure, progress, certificates, maturity assessments, and recommendations are changed through controlled business rules.

Aggregate Map

flowchart TD
    Catalog[Learning Catalog Aggregate]
    Course[Course]
    Module[Module]
    Lesson[Lesson]
    Assessment[Quiz and Exercise]
    Path[Learning Path Aggregate]
    Progress[User Progress Aggregate]
    Profile[Organization Learning Profile Aggregate]
    Maturity[Procurement Maturity Assessment Aggregate]
    Certificate[Certificate Aggregate]
    Recommendation[Learning Recommendation Aggregate]
    Tutor[AI Tutor Session Record Aggregate]

    Catalog --> Course
    Course --> Module
    Module --> Lesson
    Lesson --> Assessment
    Path --> Catalog
    Progress --> Catalog
    Progress --> Certificate
    Profile --> Maturity
    Maturity --> Recommendation
    Tutor --> Progress

Learning Catalog Aggregate

The Learning Catalog is the root for published learning content. It owns the structure and publication state of courses, modules, lessons, quizzes, and practical exercises.

Invariants

  • A course cannot be published without at least one module.
  • A module cannot be published without at least one lesson.
  • A certificate-bearing course must define completion criteria.
  • Published lesson content must have an approved content type and difficulty level.

Learning Path Aggregate

The Learning Path aggregate owns ordered learning journeys for a user segment, organization maturity level, or procurement goal.

Invariants

  • A learning path must have a stated goal.
  • A learning path step must reference an active course, lesson, quiz, or exercise.
  • A beginner path must avoid hidden prerequisite assumptions.

User Progress Aggregate

The User Progress aggregate owns a user's enrolments, lesson completion, quiz attempts, exercise submissions, certificate eligibility, and progress status.

Invariants

  • Progress belongs to one user and one organization context.
  • Completion cannot be recorded for unpublished content.
  • A certificate cannot be issued unless completion criteria are satisfied.
  • Failed quiz attempts must remain auditable.

Organization Learning Profile Aggregate

The Organization Learning Profile aggregate owns organization-level procurement education state, maturity signals, knowledge gaps, and recommended learning outcomes.

Invariants

  • The profile references an OrganizationId owned by Organization.
  • The profile cannot change organization facts.
  • Maturity assessments must be traceable to assessment inputs and scoring rules.

Procurement Maturity Assessment Aggregate

The Procurement Maturity Assessment aggregate owns assessment questions, responses, scoring, maturity level, and knowledge gaps.

Invariants

  • Assessment scoring must use a versioned rubric.
  • Knowledge gaps must map to learning recommendations or be explicitly marked as deferred.
  • Assessment results must be linked to a user or organization context.

Certificate Aggregate

The Certificate aggregate owns the certificate record, issue date, recipient, course or path reference, status, and revocation state.

Invariants

  • A certificate must be based on completed learning criteria.
  • A certificate must reference the version of the course or path completed.
  • Revoked certificates must retain their audit trail.

Learning Recommendation Aggregate

The Learning Recommendation aggregate owns recommended learning actions and their lifecycle. Recommendations may be triggered by other domains, but Learning owns the recommendation record.

Invariants

  • Every recommendation must have a reason.
  • A recommendation must reference a valid learning asset or learning path.
  • Cross-domain triggers must be stored as references, not duplicated domain facts.

AI Tutor Session Record Aggregate

The AI Tutor Session Record aggregate owns learning-side records for tutor sessions, including session purpose, referenced lesson, user question, response metadata, confidence score, guardrail result, and learning impact.

Invariants

  • Tutor output cannot directly issue certificates.
  • Tutor sessions must be auditable.
  • Tutor sessions must distinguish education support from legal, financial, or compliance advice.

Transaction Boundaries

Learning should avoid cross-domain transactions. It receives events or references from adjacent domains and emits Learning events after its own aggregates are updated. Other domains must not directly mutate Learning progress, certificates, or recommendations.