==================================================
 STORYGEN AI — STORY EXPORT
==================================================
Story ID:           21
Title:              CLaaS Mentor v4
Owner:              John Tan Yi Keong - Digital Innovation Consultant <john.tan@educlaas.com>
App Type:           Conventional App
Input Type:         file
Status:             features_generated
Source File:        CLaaS_Mentor_v4_Story_Forge.pdf
Created:            2026-04-29 05:51:29 UTC
Updated:            2026-04-29 05:53:34 UTC
Features Generated: 2026-04-29 05:53:34 UTC
Total Clusters:     7
Total Features:     18

--- ORIGINAL INPUT ---
Serial No Module	Feature Cluster	Feature	Description	Workflow
1 CLaaS Mentor Learner Preference Settings Learner Preference Settings Configuration Allows learners to customize their notification preferences, 
communication channels, learning preferences, privacy settings, and 
UI/UX preferences
Settings Categories:
1. Notification Preferences - Frequency, channels, quiet hours, notification types
2. Communication Preferences - Contact method, mentor communication, language
3. Learning Preferences - Content format, session duration, difficulty
4. Privacy Settings - Profile visibility, leaderboard, data sharing
5. Accessibility Settings - Text size, high contrast, screen reader, subtitles
6. System Preferences - Default dashboard, time zone
2 CLaaS Mentor Personalized Motivation Engine (Mentor)Analyze Engagement Patterns	Delivers context-aware motivational messages to boost retention and 
persistence during engagement slumps
1. Analyze engagement patterns
2. Detect motivation slumps
3. Generate motivational content
4. Deliver via preferred channel
5. Run a/b tests
6. Track impact and refine
3 CLaaS Mentor Personalized Motivation Engine (Mentor)Detect Motivation Slumps	Slump detector	Slump detector → compare current engagement against learner's historical... → flag 
learners with sustained low activity... → classify severity (mild, moderate, severe)
4 CLaaS Mentor Personalized Motivation Engine (Mentor)Generate Motivational Content	Message generator	Message generator → retrieve learner profile (motivations, goals, past... → select 
message template based on context... → personalize content with learner name, 
specific...
5 CLaaS Mentor Personalized Motivation Engine (Mentor)Deliver Via Preferred Channel	Notification dispatcher	Notification dispatcher → route message to learner's preferred channels... → optimize 
send time based on learner's... → include clear call-to-action (resume course, join...
6 CLaaS Mentor Personalized Motivation Engine (Mentor)Run A/B Tests	Experimentation framework	Experimentation framework → randomly assign learners to message variants... → 
track response metrics (open rate, click-through,... → measure impact on 7-day re-
engagement rate
7 CLaaS Mentor Personalized Motivation Engine (Mentor)Track Impact And Refine	Impact tracker	Impact tracker → monitor learner behavior post-message (login within... → compute 
conversion rate per message variant → identify high-performing strategies
8 CLaaS Mentor Learning Resource Curator (Mentor) Assess Learner Gaps	Provides personalized resource recommendations to close specific skill 
gaps and accelerate development
1. Assess learner gaps
2. Retrieve learner preferences
3. Query resource library
4. Perform semantic matching
5. Rank candidate resources
6. Present recommendations
7. Track consumption and ratings
9 CLaaS Mentor Learning Resource Curator (Mentor) Retrieve Learner Preferences	Preference manager	Preference manager → query learner profile for content preferences... → check 
accessibility requirements → retrieve past resource ratings and consumption...
10 CLaaS Mentor Learning Resource Curator (Mentor) Query Resource Library	Resource search service	Resource search service → search library metadata by skill tags,... → filter by 
format, duration, and quality... → retrieve candidate resources (videos, articles, 
interactive...
11 CLaaS Mentor Learning Resource Curator (Mentor) Perform Semantic Matching	Semantic recommender	Semantic recommender → use NLP to match gap descriptions... → compute 
relevance scores based on semantic... → apply collaborative filtering using similar 
learners'...
12 CLaaS Mentor Learning Resource Curator (Mentor) Rank Candidate Resources	Ranking algorithm	Ranking algorithm → combine relevance score, resource quality rating,... → prioritize 
high-impact, learner-appropriate resources → generate top 5-10 recommendations
13 CLaaS Mentor Learning Resource Curator (Mentor) Present Recommendations	Resource UI	Resource UI → display recommendations with metadata (title, format,... → provide 
preview or summary → allow learner to save, consume, or...
14 CLaaS Mentor Learning Resource Curator (Mentor) Track Consumption And Ratings	Consumption tracker	Consumption tracker → log when learner accesses resource → track completion 
status and time spent → prompt learner to rate helpfulness (1-5...
15 CLaaS Mentor Smart Reminder & Progress Monitor 
(Mentor)
Calculate Progress Velocity	Monitors progress velocity and sends proactive, personalized 
reminders to ensure on-time completion
1. Calculate progress velocity
2. Compare with required pace
3. Identify at-risk milestones
4. Generate personalized reminder
5. Deliver via preferred channel
6. Track response and adjust
16 CLaaS Mentor Smart Reminder & Progress Monitor 
(Mentor)
Compare With Required Pace	Pace analyzer	Pace analyzer → retrieve target completion date from enrollment... → calculate 
required velocity to meet deadline → compute gap between actual and required...
17 CLaaS Mentor Smart Reminder & Progress Monitor 
(Mentor)
Identify At-Risk Milestones	Milestone tracker	Milestone tracker → query upcoming milestones (assessments, project 
submissions,... → check if current velocity supports on-time... → flag milestones with 
>30% probability of...
18 CLaaS Mentor Smart Reminder & Progress Monitor 
(Mentor)
Generate Personalized Reminder	Message generator	Message generator → retrieve learner preferences (notification channel, quiet... → 
customize message based on risk level... → include specific action items (complete 
Module...
19 CLaaS Mentor Smart Reminder & Progress Monitor 
(Mentor)
Deliver Via Preferred Channel	Notification dispatcher	Notification dispatcher → route message to selected channels (email,... → respect 
quiet hours and frequency limits → track delivery status (sent, delivered, opened)
20 CLaaS Mentor Smart Reminder & Progress Monitor 
(Mentor)
Track Response And Adjust	Response tracker	Response tracker → monitor learner actions post-reminder (login, content... → 
measure reminder effectiveness (conversion rate) → update reminder strategy 
(frequency, timing, content)...
21 CLaaS Mentor Hybrid Mentoring Interface (AI-Human)Start Chatbot Session	Facilitates 24/7 AI chatbot support with seamless escalation to human 
mentors based on complexity and sentiment
1. Start chatbot session
2. Provide guidance
3. Evaluate complexity and sentiment
4. Escalate to human mentor
5. Schedule human session
6. Log transcript and summary
22 CLaaS Mentor Hybrid Mentoring Interface (AI-Human)Book Mentor Session (Calendly-style) Enables learners to book one-on-one mentoring sessions with human 
mentors based on their weekly availability (Monday, Wednesday, 
Friday, 2-hour slots each day)
1. Display mentor availability calendar (Mon/Wed/Fri 2-hour slots)
2. Learner selects preferred time slot
3. System validates availability
4. Create booking with calendar invites (Microsoft Graph API/Teams/Outlook)
5. Send reminder notifications (24h and 1h before)
6. Allow reschedule/cancel up to 24 hours before session
23 CLaaS Mentor Hybrid Mentoring Interface (AI-Human)Provide Guidance	AI chatbot engine	AI chatbot engine → process learner query using NLP → retrieve relevant knowledge 
base articles, FAQs,... → generate contextual response
24 CLaaS Mentor Hybrid Mentoring Interface (AI-Human)Evaluate Complexity And Sentiment Sentiment analyzer	Sentiment analyzer → analyze query text for complexity markers... → detect 
sentiment (frustrated, confused, satisfied) using... → compute confidence score on 
AI's ability...
25 CLaaS Mentor Hybrid Mentoring Interface (AI-Human)Escalate To Human Mentor	Escalation engine	Escalation engine → if complexity score > threshold OR... → check escalation rules 
(immediate for critical... → identify available mentor based on expertise,...
26 CLaaS Mentor Hybrid Mentoring Interface (AI-Human)Schedule Human Session	Scheduling service	Scheduling service → present mentor's available slots to learner → learner selects 
preferred time → create mentoring session record (session_id, learner_id,...
27 CLaaS Mentor Hybrid Mentoring Interface (AI-Human)Log Transcript And Summary	Conversation logger	Conversation logger → capture full chat transcript (timestamped messages,... → 
generate session summary (key issues, resolution... → tag topics and competencies 
discussed
28 CLaaS Mentor Gamification Engine (Mentor) Track Achievements	Delivers gamified learning experience with points, badges, 
leaderboards, and milestone celebrations
1. Track achievements
2. Apply rules engine
3. Award points and badges
4. Update leaderboards
5. Trigger celebration
6. Persist to profile
29 CLaaS Mentor Gamification Engine (Mentor) Apply Rules Engine	Rules evaluator	Rules evaluator → retrieve gamification rules for event type → calculate points 
earned based on activity... → check badge eligibility criteria (e.g., "Complete...
30 CLaaS Mentor Gamification Engine (Mentor) Award Points And Badges	Ledger service	Ledger service → credit points to learner's gamification account → issue badge if 
criteria met → create badge assignment record (learner_id, badge_id,...
31 CLaaS Mentor Gamification Engine (Mentor) Update Leaderboards	Leaderboard service	Leaderboard service → refresh global, cohort, and peer group... → cache updated 
rankings for fast retrieval → identify rank changes (promotions, demotions)
32 CLaaS Mentor Gamification Engine (Mentor) Trigger Celebration	Notification service	Notification service → generate celebration message based on achievement... → 
deliver via in-app notification, email, or... → include visual elements (badge image, 
leaderboard...
33 CLaaS Mentor Gamification Engine (Mentor) Persist To Profile	Profile updater	Profile updater → store gamification state in learner profile... → update achievement 
timeline → maintain audit trail of all point...
34 CLaaS Mentor Intelligent Course Recommender (Mentor)Read Skills Passport And Goals	Generates optimized course recommendations and sequences aligned 
to learner profiles and long-term career goals
1. Read skills passport and goals
2. Match to available courses
3. Score relevance and success likelihood
4. Propose sequences
5. Track enrollment and completion
6. Refine recommendation model
35 CLaaS Mentor Intelligent Course Recommender (Mentor)Match To Available Courses	Course matcher	Course matcher → query course catalog for relevant courses → filter by competency 
coverage, prerequisite compatibility,... → compute skill coverage score (how much...
36 CLaaS Mentor Intelligent Course Recommender (Mentor)Score Relevance And Success Likelihood Relevance scorer	Relevance scorer → calculate relevance score based on skill... → apply success 
prediction model (inputs: learner... → predict probability of course completion and...
37 CLaaS Mentor Intelligent Course Recommender (Mentor)Propose Sequences	Sequencer	Sequencer → generate optimal course sequences respecting prerequisites → 
optimize for time-to-goal completion → balance difficulty progression (easier to 
harder)
38 CLaaS Mentor Intelligent Course Recommender (Mentor)Track Enrollment And Completion	Enrollment tracker	Enrollment tracker → log learner course enrollments (course_id, enrollment_date,... → 
monitor course progress and completion → capture final grade and satisfaction rating
39 CLaaS Mentor Intelligent Course Recommender (Mentor)Refine Recommendation Model	Model trainer	Model trainer → collect enrollment, completion, and satisfaction data → retrain ML 
recommendation model with new... → improve success prediction accuracy

--- USER STORY ---
# CLaaS Mentor Module — Personalized Learner Engagement & Mentoring Platform

## Overview
This is a **Conventional App** that provides learners with a comprehensive, personalized mentoring experience through configurable preferences, automated motivation and reminders, curated learning resources, hybrid AI/human mentoring, gamification, and intelligent course recommendations. The system addresses learner disengagement, missed milestones, and unclear learning paths by combining rule-based automation with structured human mentor interactions, all driven by explicit user actions and configured business rules.

## Actors
- **Learner**: Configures personal preferences, consumes recommended resources, responds to reminders, books mentor sessions, earns gamification rewards, and enrolls in recommended courses.
- **Human Mentor**: Provides availability windows (Mon/Wed/Fri, 2-hour slots), conducts one-on-one sessions, handles escalations from the chatbot, and reviews learner progress.
- **System Administrator**: Maintains gamification rules, escalation thresholds, course catalog, resource library, and notification templates.
- **Content Curator**: Tags and maintains the resource library metadata used for recommendations.

## Goals
- Increase learner engagement, retention, and on-time course completion.
- Provide 24/7 mentoring support with seamless escalation to human mentors when needed.
- Personalize the learning journey through preferences, recommendations, and gamification.
- Enable structured, calendar-based booking for human mentor sessions.
- Continuously improve recommendations and reminder strategies based on tracked outcomes.

## User Story
As a **learner**, I want to configure my preferences, receive personalized motivation, reminders, and resource recommendations, interact with an AI chatbot or book a human mentor, and track my achievements through gamification, **so that I stay engaged, close my skill gaps, and complete my courses on time aligned to my career goals**.

## Detailed Workflow

### 1. Learner Preference Settings
1. Learner navigates to **Preferences** screen with six tabs: Notifications, Communication, Learning, Privacy, Accessibility, System.
2. Learner sets notification frequency, channels (email/SMS/in-app), and quiet hours.
3. Learner selects communication preferences (preferred contact method, mentor communication style, language).
4. Learner chooses learning preferences (content format, session duration, difficulty).
5. Learner sets privacy (profile visibility, leaderboard opt-in, data sharing) and accessibility (text size, high contrast, screen reader, subtitles).
6. Learner picks system preferences (default dashboard, time zone) and clicks **Save**. System validates and persists settings.

### 2. Personalized Motivation Engine
1. Scheduled job analyzes engagement patterns by comparing current activity (logins, content consumption) against learner's historical baseline.
2. Slump detector flags learners with sustained low activity and classifies severity (mild, moderate, severe).
3. Message generator retrieves learner profile, selects a template based on context, and personalizes content (name, specific course/goal references).
4. Notification dispatcher routes the message via the learner's preferred channel, optimizes send time, and includes a clear CTA (e.g., "Resume Course").
5. A/B testing framework randomly assigns learners to message variants and tracks open rate, CTR, and 7-day re-engagement rate.
6. Impact tracker monitors post-message behavior and surfaces high-performing variants in an admin report.

### 3. Learning Resource Curator
1. System assesses learner skill gaps from assessment results and Skills Passport.
2. Preference manager retrieves content preferences, accessibility requirements, and past resource ratings.
3. Resource search service queries the library by skill tags, format, duration, and quality.
4. Semantic recommender uses NLP to match gap descriptions to resources and applies collaborative filtering from similar learners.
5. Ranking algorithm combines relevance, quality, and learner-fit scores; produces top 5–10 results.
6. Resource UI displays recommendations with metadata, previews, and **Save / Consume / Dismiss** actions.
7. Consumption tracker logs access, completion, and time spent, then prompts a 1–5 helpfulness rating.

### 4. Smart Reminder & Progress Monitor
1. System calculates the learner's progress velocity (modules/week).
2. Pace analyzer retrieves the target completion date and computes required velocity and gap.
3. Milestone tracker flags upcoming milestones with >30% probability of being missed.
4. Message generator creates a personalized reminder with specific action items, respecting learner preferences.
5. Notification dispatcher delivers via selected channels, honoring quiet hours and frequency limits, and tracks delivery status.
6. Response tracker monitors post-reminder actions, measures conversion rate, and updates reminder strategy parameters.

### 5. Hybrid Mentoring Interface (AI Chatbot + Human Mentor)
1. Learner opens the Mentoring screen and starts a chatbot session.
2. AI chatbot engine processes the query via NLP, retrieves knowledge base articles/FAQs, and generates a contextual response.
3. Sentiment analyzer evaluates query complexity, detects sentiment (frustrated/confused/satisfied), and computes a confidence score.
4. If complexity score exceeds threshold OR sentiment is negative OR escalation rules trigger, the escalation engine identifies an available mentor based on expertise.
5. **Mentor Booking (Calendly-style):**
   - System displays the mentor's availability calendar (Mon/Wed/Fri, 2-hour slots).
   - Learner selects a preferred slot; system validates availability in real time.
   - System creates a booking via Microsoft Graph API (Teams/Outlook), generating calendar invites for both parties.
   - Reminder notifications sent 24h and 1h before the session.
   - Learner can reschedule/cancel up to 24 hours before the session.
6. After the session, the conversation logger captures the full transcript, generates a summary (key issues, resolution, next steps), and tags topics/competencies.

### 6. Gamification Engine
1. System tracks learner achievement events (module completed, assessment passed, streak maintained).
2. Rules evaluator retrieves gamification rules, calculates points earned, and checks badge eligibility.
3. Ledger service credits points and issues badges, creating an assignment record.
4. Leaderboard service refreshes global, cohort, and peer group rankings and caches them.
5. Notification service triggers a celebration message via in-app/email/push with badge image and leaderboard update.
6. Profile updater persists gamification state, updates the achievement timeline, and maintains an audit trail.

### 7. Intelligent Course Recommender
1. System reads the learner's Skills Passport and stated career goals.
2. Course matcher queries the catalog and filters by competency coverage and prerequisite compatibility.
3. Relevance scorer computes a relevance score and applies a success-prediction model.
4. Sequencer proposes optimal course sequences respecting prerequisites and balancing difficulty progression.
5. Learner reviews recommended sequences and enrolls; enrollment tracker logs the action.
6. System captures completion, grade, and satisfaction; model trainer periodically retrains the recommendation model.

## Acceptance Criteria

### Preferences
- All six preference categories are configurable and persisted per learner.
- Changes take effect immediately for downstream modules (notifications, accessibility, etc.).
- Quiet hours are honored across all notification channels.

### Motivation Engine
- Slump detection runs at least daily and classifies severity into mild/moderate/severe.
- Each motivational message is personalized with at least the learner's name and one contextual reference.
- A/B test variants are tracked with open rate, CTR, and 7-day re-engagement metrics visible in admin reports.

### Resource Curator
- Recommendations return between 5 and 10 ranked resources.
- Filters respect accessibility requirements (e.g., subtitles required → only subtitled videos shown).
- Consumption and 1–5 rating are captured for every accessed resource.

### Smart Reminder
- Milestones with >30% miss probability are flagged and trigger a reminder.
- Reminders are delivered only via preferred channels and outside quiet hours.
- Conversion rate per reminder is tracked and visible in reporting.

### Hybrid Mentoring
- Chatbot responds within 3 seconds for 95% of queries.
- Escalation triggers automatically when complexity score > threshold OR sentiment is negative OR keywords match critical-escalation rules.
- Mentor booking only allows Mon/Wed/Fri 2-hour slots and prevents double-booking.
- Calendar invites are sent via Microsoft Graph (Teams/Outlook) to both learner and mentor.
- Reminders sent at 24h and 1h before the session; reschedule/cancel allowed up to 24h prior.
- Full transcript and summary are stored after every chatbot and human session.

### Gamification
- Points and badges are awarded based on configurable rules without manual intervention.
- Leaderboards refresh within 60 seconds of an event.
- Learners who opted out of leaderboards in privacy settings are excluded from public rankings.
- Audit trail records every points/badge transaction.

### Course Recommender
- Recommendations align to the learner's Skills Passport and stated career goals.
- Proposed sequences respect all prerequisites.
- Recommendation model is retrained on a defined cadence (e.g., monthly) using new enrollment/completion/satisfaction data.

## Assumptions & Constraints
- Learner profiles, Skills Passport, and course catalog already exist in the CLaaS platform.
- Microsoft Graph API (Teams/Outlook) is available for calendar integration; mentors use Microsoft 365.
- Human mentor availability is fixed at Mon/Wed/Fri with 2-hour slots per day; expansion would require admin configuration changes.
- Notification channels (email, SMS, in-app, push) are provided by an existing notification service.
- NLP, sentiment analysis, and recommendation ML models are provided as services and are out of scope for UI design but exposed via APIs.
- Gamification rules, escalation thresholds, and reminder strategies are configured by administrators, not learners.
- All learner data handling complies with the organization's privacy policy and learner-set privacy preferences.

--- FEATURE LIST SUMMARY ---
This solution enables learners to stay engaged and complete courses on time through a personalized mentoring platform combining preferences, automated motivation, smart reminders, hybrid AI/human mentoring, gamification, and intelligent course recommendations. Primary actors are Learners, Human Mentors, System Administrators, and Content Curators. The flow runs from administrator setup of master data, through learner preference configuration, into ongoing engagement loops (motivation, resources, reminders, mentoring, gamification) and culminates in course recommendations and outcome tracking. The Master Data Configuration cluster holds users, roles, gamification rules, escalation thresholds, notification templates, course catalog, and resource library metadata. The list contains 18 rows covering capabilities such as hybrid mentoring with calendar booking, gamification, and adaptive recommendations.

Feature Clusters & Features:
• Master Data Configuration
  - 1. User and Role Management — Central registry of learners, mentors, admins, and curators with role-based access used across every module.
  - 2. Notification Templates and Channels — Library of message templates and configured delivery channels reused by motivation, reminder, and gamification flows.
  - 3. Gamification Rules Catalog — Admin-managed rules for points, badges, and streaks that drive automatic reward calculations.
  - 4. Escalation and Reminder Configuration — Threshold and strategy parameters that govern chatbot escalations and reminder cadence.
  - 5. Course Catalog and Resource Library — Master catalog of courses and tagged learning resources used by recommenders and curators.
• Learner Onboarding and Preferences
  - 6. Learner Preference Settings — Six-tab preference screen where learners configure notifications, communication, learning, privacy, accessibility, and system options.
• Personalized Engagement
  - 7. Engagement Slump Detection — Daily job that compares activity against historical baseline and classifies disengagement severity.
  - 8. Personalized Motivation Messaging — Generates and dispatches contextual motivational nudges through preferred channels with A/B variant tracking.
  - 9. Learning Resource Recommendations — Ranks and presents 5–10 curated resources matching skill gaps, preferences, and accessibility needs.
  - 10. Resource Consumption Tracking — Logs access, completion, time spent, and 1–5 helpfulness ratings on each resource.
• Progress Monitoring and Reminders
  - 11. Progress Velocity and Milestone Tracking — Calculates pace, target gap, and flags milestones with greater than 30 percent miss probability.
  - 12. Smart Reminder Dispatch — Delivers personalized reminders honoring quiet hours and preferred channels and tracks conversion outcomes.
• Hybrid Mentoring
  - 13. AI Chatbot Mentoring — Provides 24/7 NLP-driven responses with sentiment and complexity scoring for learner queries.
  - 14. Human Mentor Booking — Calendly-style booking on Mon/Wed/Fri 2-hour slots with Microsoft Graph calendar invites and reschedule rules.
  - 15. Session Transcript and Summary Capture — Stores full chatbot and human session transcripts with summaries, topics, and competency tags.
• Gamification and Rewards
  - 16. Points, Badges, and Leaderboards — Awards points and badges automatically and refreshes global, cohort, and peer leaderboards within 60 seconds.
• Course Pathways and Outcomes
  - 17. Intelligent Course Recommendation and Sequencing — Recommends prerequisite-aware course sequences aligned to Skills Passport and career goals.
  - 18. Enrollment Outcome Tracking and Model Retraining — Captures completion, grade, satisfaction and periodically retrains the recommendation model.

--- FEATURE LIST (18 features across 7 clusters) ---

#1 | Cluster: Master Data Configuration | Feature: User and Role Management
  Description: Central registry of all platform users with role-based access control. Drives authorization across preferences, mentoring, gamification, and admin functions.
  Workflow:
    1. Admin creates user accounts for learners, mentors, admins, and curators.
    2. Admin assigns roles and permissions per user.
    3. System validates uniqueness of email and role rules.
    4. Profile and authentication records are persisted.
    5. Roles drive access to all downstream modules.
  Table:       users
  Columns:     id (bigint, pk), email (varchar 255, unique), full_name (varchar 200), role (varchar 50), status (varchar 20), created_at (timestamp), updated_at (timestamp)
  Actor:       System Administrator
  AI Agent:    None
  ----
#2 | Cluster: Master Data Configuration | Feature: Notification Templates and Channels
  Description: Library of reusable message templates and channel configurations. Used by every notification-driven feature including motivation and reminders.
  Workflow:
    1. Admin defines message templates for motivation, reminders, and gamification events.
    2. Admin configures channels (email, SMS, in-app, push) and provider credentials.
    3. Templates support placeholders for learner name, course, and CTA.
    4. Admin activates or retires templates.
    5. Downstream modules reference templates by code.
  Table:       notification_templates
  Columns:     id (bigint, pk), code (varchar 50, unique), channel (varchar 20), subject (varchar 255), body (text), placeholders (json), active (boolean), updated_at (timestamp)
  Actor:       System Administrator
  AI Agent:    None
  ----
#3 | Cluster: Master Data Configuration | Feature: Gamification Rules Catalog
  Description: Admin-managed rules that govern point awards, badge eligibility, and streaks. Provides configurable, no-code control over the gamification engine.
  Workflow:
    1. Admin opens gamification rules screen.
    2. Admin defines events (module completed, assessment passed, streak).
    3. Admin sets points, badge criteria, and streak thresholds.
    4. Admin activates rules with effective dates.
    5. Rules are referenced by the gamification engine on every event.
  Table:       gamification_rules
  Columns:     id (bigint, pk), event_code (varchar 50), points (int), badge_code (varchar 50), criteria (json), active (boolean), effective_from (date), effective_to (date)
  Actor:       System Administrator
  AI Agent:    None
  ----
#4 | Cluster: Master Data Configuration | Feature: Escalation and Reminder Configuration
  Description: Centralized configuration of escalation thresholds and reminder strategy parameters. Allows business rules to be tuned without code changes.
  Workflow:
    1. Admin defines complexity, sentiment, and keyword thresholds for escalation.
    2. Admin sets reminder frequency, quiet-hour defaults, and milestone miss probability cutoff.
    3. Admin assigns mentor expertise tags for routing.
    4. Configuration is versioned and audited.
    5. Engines load these rules at runtime.
  Table:       engagement_config
  Columns:     id (bigint, pk), config_key (varchar 100), config_value (json), category (varchar 50), updated_by (bigint, fk), updated_at (timestamp)
  Actor:       System Administrator
  AI Agent:    None
  ----
#5 | Cluster: Master Data Configuration | Feature: Course Catalog and Resource Library
  Description: Master catalog of courses and curated learning resources with rich metadata. Underpins resource recommendations and course sequencing.
  Workflow:
    1. Curator imports or creates courses and resources.
    2. Curator tags each item with skills, format, duration, difficulty, and accessibility flags.
    3. Curator sets quality and prerequisite metadata.
    4. Items are published to the catalog.
    5. Recommenders query the catalog for matching content.
  Table:       learning_assets
  Columns:     id (bigint, pk), asset_type (varchar 20), title (varchar 255), skills (json), format (varchar 30), duration_min (int), difficulty (varchar 20), accessibility (json), quality_score (decimal), prerequisites (json)
  Actor:       Content Curator
  AI Agent:    None
  ----
#6 | Cluster: Learner Onboarding and Preferences | Feature: Learner Preference Settings
  Description: Single screen where learners configure notifications, communication, learning, privacy, accessibility, and system preferences. All downstream personalization honors these settings in real time.
  Workflow:
    1. Learner opens Preferences screen with six tabs.
    2. Learner sets notification frequency, channels, and quiet hours.
    3. Learner selects communication, learning, privacy, accessibility, and system options.
    4. Learner clicks Save.
    5. System validates and persists; downstream modules pick up changes immediately.
  Table:       learner_preferences
  Columns:     id (bigint, pk), learner_id (bigint, fk), category (varchar 30), preference_key (varchar 50), preference_value (json), updated_at (timestamp)
  Actor:       Learner
  AI Agent:    None
  ----
#7 | Cluster: Personalized Engagement | Feature: Engagement Slump Detection
  Description: Daily analysis that identifies learners whose engagement has dropped versus their baseline. Classifies severity to drive proportional motivational responses.
  Workflow:
    1. Scheduled daily job loads recent learner activity.
    2. System compares current activity against historical baseline.
    3. Slump detector flags learners with sustained low activity.
    4. Severity classifier assigns mild, moderate, or severe.
    5. Flags are queued for the motivation engine.
  Table:       engagement_slumps
  Columns:     id (bigint, pk), learner_id (bigint, fk), detected_on (date), severity (varchar 20), baseline_score (decimal), current_score (decimal), processed (boolean)
  Actor:       System (scheduled job)
  AI Agent:    None
  ----
#8 | Cluster: Personalized Engagement | Feature: Personalized Motivation Messaging
  Description: Generates and delivers personalized motivational nudges based on slump severity and learner context. Tracks variant performance to continually improve message effectiveness.
  Workflow:
    1. Engine retrieves learner profile and active slump severity.
    2. Template selector chooses message template and personalizes content.
    3. A/B framework assigns variant.
    4. Dispatcher sends via preferred channel honoring quiet hours.
    5. Impact tracker monitors open, click, and 7-day re-engagement metrics.
  Table:       motivation_messages
  Columns:     id (bigint, pk), learner_id (bigint, fk), template_id (bigint, fk), variant (varchar 10), channel (varchar 20), sent_at (timestamp), opened (boolean), clicked (boolean), reengaged_7d (boolean)
  Actor:       Learner
  AI Agent:    None
  ----
#9 | Cluster: Personalized Engagement | Feature: Learning Resource Recommendations
  Description: Surfaces 5–10 ranked resources matched to the learner's skill gaps, preferences, and accessibility needs. Helps learners close gaps with the most relevant content.
  Workflow:
    1. System assesses skill gaps from assessments and Skills Passport.
    2. Resource service queries library by skills, format, duration, and quality.
    3. Semantic recommender and collaborative filter produce candidates.
    4. Ranking algorithm returns 5–10 results respecting accessibility filters.
    5. UI displays cards with Save, Consume, Dismiss actions.
  Table:       resource_recommendations
  Columns:     id (bigint, pk), learner_id (bigint, fk), asset_id (bigint, fk), relevance_score (decimal), rank (int), generated_at (timestamp), action (varchar 20)
  Actor:       Learner
  AI Agent:    None
  ----
#10 | Cluster: Personalized Engagement | Feature: Resource Consumption Tracking
  Description: Captures access, completion, time-spent, and helpfulness ratings for every accessed resource. Provides feedback signal to improve future recommendations.
  Workflow:
    1. Learner opens a recommended resource.
    2. Tracker logs access timestamp and time spent.
    3. On completion, system records completion event.
    4. Learner is prompted for a 1–5 helpfulness rating.
    5. Rating feeds back into ranking and recommender models.
  Table:       resource_consumption
  Columns:     id (bigint, pk), learner_id (bigint, fk), asset_id (bigint, fk), accessed_at (timestamp), completed (boolean), time_spent_sec (int), rating (int)
  Actor:       Learner
  AI Agent:    None
  ----
#11 | Cluster: Progress Monitoring and Reminders | Feature: Progress Velocity and Milestone Tracking
  Description: Computes pace versus target and flags milestones at high risk of being missed. Provides the trigger signal for proactive reminders.
  Workflow:
    1. System calculates current progress velocity (modules/week).
    2. Pace analyzer retrieves target completion date and required velocity.
    3. Gap is computed and miss probability estimated for upcoming milestones.
    4. Milestones with >30% miss probability are flagged.
    5. Flags are queued for reminder dispatch.
  Table:       milestone_risk
  Columns:     id (bigint, pk), learner_id (bigint, fk), milestone_id (bigint), required_velocity (decimal), current_velocity (decimal), miss_probability (decimal), flagged (boolean), evaluated_at (timestamp)
  Actor:       System (scheduled job)
  AI Agent:    None
  ----
#12 | Cluster: Progress Monitoring and Reminders | Feature: Smart Reminder Dispatch
  Description: Delivers timely, channel-aware reminders that respect quiet hours and frequency limits. Tracks conversion outcomes to refine reminder strategy over time.
  Workflow:
    1. Reminder generator builds personalized message with action items.
    2. Dispatcher selects channels per learner preferences.
    3. Quiet hours and frequency caps are enforced.
    4. Delivery status is tracked.
    5. Response tracker records post-reminder actions and conversion rate.
  Table:       reminders
  Columns:     id (bigint, pk), learner_id (bigint, fk), milestone_id (bigint), channel (varchar 20), sent_at (timestamp), delivered (boolean), action_taken (boolean), action_at (timestamp)
  Actor:       Learner
  AI Agent:    None
  ----
#13 | Cluster: Hybrid Mentoring | Feature: AI Chatbot Mentoring
  Description: Provides 24/7 conversational mentoring via NLP with sentiment and complexity analysis. Detects when a query should escalate to a human mentor.
  Workflow:
    1. Learner opens Mentoring screen and starts chatbot session.
    2. NLP engine processes query and retrieves knowledge base content.
    3. System generates contextual response within 3 seconds.
    4. Sentiment and complexity are scored.
    5. If thresholds breach, escalation engine flags for human handoff.
  Table:       chatbot_sessions
  Columns:     id (bigint, pk), learner_id (bigint, fk), started_at (timestamp), ended_at (timestamp), complexity_score (decimal), sentiment (varchar 20), escalated (boolean)
  Actor:       Learner
  AI Agent:    None
  ----
#14 | Cluster: Hybrid Mentoring | Feature: Human Mentor Booking
  Description: Calendly-style booking flow restricted to mentor Mon/Wed/Fri 2-hour slots with Microsoft Graph calendar integration. Sends invites and reminders and enforces reschedule rules.
  Workflow:
    1. System identifies an available mentor by expertise.
    2. Mentor's Mon/Wed/Fri 2-hour slots are displayed.
    3. Learner selects a slot; system validates availability and prevents double-booking.
    4. Microsoft Graph creates Teams/Outlook invites for both parties.
    5. 24h and 1h reminders are sent; reschedule/cancel allowed up to 24h prior.
  Table:       mentor_bookings
  Columns:     id (bigint, pk), learner_id (bigint, fk), mentor_id (bigint, fk), slot_start (timestamp), slot_end (timestamp), status (varchar 20), graph_event_id (varchar 100), created_at (timestamp)
  Actor:       Learner
  AI Agent:    None
  ----
#15 | Cluster: Hybrid Mentoring | Feature: Session Transcript and Summary Capture
  Description: Stores complete transcripts plus auto-generated summaries and topic tags for every session. Enables continuity across chatbot and human mentoring touchpoints.
  Workflow:
    1. Conversation logger captures full chatbot or human session transcript.
    2. Summary generator extracts key issues, resolution, and next steps.
    3. Tagger assigns topics and competencies.
    4. Records are stored against the learner profile.
    5. Mentor can review prior sessions in their dashboard.
  Table:       session_transcripts
  Columns:     id (bigint, pk), session_type (varchar 20), session_ref_id (bigint), learner_id (bigint, fk), transcript (text), summary (text), tags (json), created_at (timestamp)
  Actor:       Learner
  AI Agent:    None
  ----
#16 | Cluster: Gamification and Rewards | Feature: Points, Badges, and Leaderboards
  Description: Automatically awards points and badges per configured rules and updates global, cohort, and peer leaderboards. Reinforces engagement through visible recognition while honoring privacy opt-outs.
  Workflow:
    1. System captures achievement events (module completion, assessment passed, streak).
    2. Rules evaluator awards points and checks badge eligibility.
    3. Ledger credits points and issues badges with audit trail.
    4. Leaderboard service refreshes within 60 seconds, excluding opted-out learners.
    5. Notification service sends celebration message with badge image.
  Table:       gamification_ledger
  Columns:     id (bigint, pk), learner_id (bigint, fk), event_code (varchar 50), points (int), badge_code (varchar 50), awarded_at (timestamp), source_ref (varchar 100)
  Actor:       Learner
  AI Agent:    None
  ----
#17 | Cluster: Course Pathways and Outcomes | Feature: Intelligent Course Recommendation and Sequencing
  Description: Recommends and sequences courses aligned to the learner's Skills Passport and career goals, respecting prerequisites. Helps learners follow an optimal path toward their target competencies.
  Workflow:
    1. System reads Skills Passport and stated career goals.
    2. Course matcher filters catalog by competency coverage and prerequisites.
    3. Relevance scorer and success-prediction model rank candidates.
    4. Sequencer proposes prerequisite-respecting course sequences.
    5. Learner reviews and enrolls in chosen sequence.
  Table:       course_recommendations
  Columns:     id (bigint, pk), learner_id (bigint, fk), course_id (bigint, fk), sequence_no (int), relevance_score (decimal), success_probability (decimal), generated_at (timestamp), enrolled (boolean)
  Actor:       Learner
  AI Agent:    None
  ----
#18 | Cluster: Course Pathways and Outcomes | Feature: Enrollment Outcome Tracking and Model Retraining
  Description: Tracks enrollment, completion, grade, and satisfaction outcomes and feeds them into periodic retraining of the recommendation model. Ensures recommendations improve continuously based on real results.
  Workflow:
    1. Enrollment tracker logs each enrollment action.
    2. System captures completion status, grade, and satisfaction rating.
    3. Outcome data is aggregated into training datasets.
    4. Model trainer runs on a defined cadence (e.g., monthly).
    5. Updated model is deployed to the recommender.
  Table:       enrollment_outcomes
  Columns:     id (bigint, pk), learner_id (bigint, fk), course_id (bigint, fk), enrolled_at (timestamp), completed_at (timestamp), grade (varchar 10), satisfaction (int), used_in_training (boolean)
  Actor:       System Administrator
  AI Agent:    None
  ----

==================================================
 END OF STORY EXPORT
==================================================
