Skip to content
ContractSpec
Start here

module.learning-journey

Comprehensive learning journey engine - onboarding, LMS, flashcards, gamification, and AI personalization

domainsmodulev6.0.4stableservernode
@lssm-tech/module.learning-journey
bun add @lssm-tech/module.learning-journey
Package source ↗Manifest ↗

Manifest declarations describe the current workspace; they do not verify registry publication or runtime execution.

Package guide

Website: https://contractspec.io

Canonical adaptive journey runtime for onboarding, drills, coaching, LMS, flashcards, gamification, and AI personalization.

What It Provides

  • Layer: module.
  • Consumers: bundles (library, contractspec-studio), apps (web-landing).
  • src/contracts/ contains contract specs, operations, entities, and registry exports.
  • src/docs/ contains docblocks and documentation-facing exports.

Installation

npm install @lssm-tech/module.learning-journey

or

bun add @lssm-tech/module.learning-journey

Usage

Import the root entrypoint from @lssm-tech/module.learning-journey, or choose a documented subpath when you only need one part of the package surface.

Existing StreakEngine, XPEngine, singleton, root, and engine-subpath exports remain unchanged. The ./engines surface also provides adapters for projecting legacy Date-based learning state and XP receipts into the storage-neutral @lssm-tech/lib.gamification-runtime shapes.

Use ./engines/gamification-progress-adapters to serialize and restore the unchanged JourneyProgressState shape without losing its Date fields. These adapters do not alter legacy timezone, streak, or XP rounding behavior.

Creator training can use ./contracts/competencies and ./runtime/competencies for evidence-backed mastery projections, plus ./contracts/coaching and ./runtime/coaching for contestable assistive coaching proposals. These projections never grant product authority.

Architecture

  • src/contracts/ contains contract specs, operations, entities, and registry exports.
  • src/docs/ contains docblocks and documentation-facing exports.
  • src/engines is part of the package's public or composition surface.
  • src/entities/ contains domain entities and value objects.
  • src/events.ts is package-level event definitions.
  • src/i18n is part of the package's public or composition surface.
  • src/index.ts is the root public barrel and package entrypoint.

Public Entry Points

  • Export . resolves through ./src/index.ts.
  • Export ./contracts resolves through ./src/contracts/index.ts.
  • Export ./contracts/coaching resolves through ./src/contracts/coaching.ts.
  • Export ./contracts/competencies resolves through ./src/contracts/competencies.ts.
  • Export ./contracts/models resolves through ./src/contracts/models.ts.
  • Export ./contracts/journey resolves through ./src/contracts/journey.ts.
  • Export ./contracts/onboarding resolves through ./src/contracts/onboarding.ts.
  • Export ./contracts/operations resolves through ./src/contracts/operations.ts.
  • Export ./contracts/shared resolves through ./src/contracts/shared.ts.
  • Export ./docs resolves through ./src/docs/index.ts.
  • Export ./docs/learning-journey.docblock resolves through ./src/docs/learning-journey.docblock.ts.
  • Export ./engines resolves through ./src/engines/index.ts.
  • Export ./engines/gamification-adapters resolves through ./src/engines/gamification-adapters.ts.
  • Export ./engines/gamification-progress-adapters resolves through ./src/engines/gamification-progress-adapters.ts.
  • Export ./engines/srs resolves through ./src/engines/srs.ts.
  • Export ./runtime resolves through ./src/runtime/index.ts.
  • Export ./runtime/coaching resolves through ./src/runtime/coaching.ts.
  • Export ./runtime/competencies resolves through ./src/runtime/competencies.ts.
  • Export ./runtime/onboarding-runtime resolves through ./src/runtime/onboarding-runtime.ts.
  • The package publishes 41 total export subpaths; keep docs aligned with package.json.

Local Commands

  • bun run dev — contractspec-bun-build dev
  • bun run build — contractspec-bun-build build
  • bun run test — bun test
  • bun run lint — bun lint:fix
  • bun run lint:check — biome check .
  • bun run lint:fix — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
  • bun run typecheck — tsgo --noEmit
  • bun run publish:pkg — bun publish --tolerate-republish --ignore-scripts --verbose
  • bun run publish:pkg:canary — bun publish:pkg --tag canary
  • bun run clean — rimraf dist .turbo
  • bun run build:bundle — contractspec-bun-build transpile
  • bun run build:types — contractspec-bun-build types
  • bun run prebuild — contractspec-bun-build prebuild

Recent Updates

  • Replace eslint+prettier by biomejs to optimize speed.
  • Add full i18n support across all 10 packages (en/fr/es, 460 keys).

Notes

  • SRS/streak/XP engines are pure functions -- keep them side-effect-free.
  • i18n catalogs must stay in sync across all supported locales (en, es, fr).
  • Entity schemas are shared with the UI; breaking changes propagate to all learning surfaces.

Relationships

THIS PACKAGEmodule.learning-journey45 import paths

Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.

7 declarations

Declared capabilities

Module Learning Journey

Comprehensive learning journey engine - onboarding, LMS, flashcards, gamification, and AI personalization

Scripts

  • publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
  • publish:pkg:canarybun publish:pkg --tag canary
  • buildcontractspec-bun-build build
  • build:bundlecontractspec-bun-build transpile
  • build:typescontractspec-bun-build types
  • devcontractspec-bun-build dev
  • cleanrimraf dist .turbo
  • lintbun lint:fix
  • lint:fixnode ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .
  • lint:checknode ../../../../scripts/biome.cjs check .
  • testbun test
  • prebuildcontractspec-bun-build prebuild
  • typechecktsgo --noEmit