==================================================
 STORYGEN AI — STORY EXPORT
==================================================
Story ID:           23
Title:              CLaaS Mentor v4 Agentic
Owner:              John Tan Yi Keong - Digital Innovation Consultant <john.tan@educlaas.com>
App Type:           Agentic AI App
Input Type:         file
Status:             features_generated
Source File:        CLaaS_Mentor_v4_Story_Forge.pdf
Created:            2026-04-29 06:55:19 UTC
Updated:            2026-04-29 07:04:08 UTC
Features Generated: 2026-04-29 07:04:08 UTC
Total Clusters:     9
Total Features:     19

--- 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 — Agentic AI Learning Companion

## Overview
This is an **Agentic AI App**. The CLaaS Mentor platform deploys a network of autonomous AI agents that continuously observe each learner's behavior, motivation, progress, and skill gaps, then proactively intervene with personalized nudges, curated resources, course recommendations, and gamified rewards — escalating to human mentors only when complexity, sentiment, or risk thresholds warrant it. The goal is to keep learners engaged, on-pace, and aligned with their long-term career goals without requiring constant human oversight.

## Actors
- **Learner**: The end user pursuing skill development; configures preferences, consumes recommendations, books mentor sessions, and acts on nudges.
- **Human Mentor**: Subject-matter expert who handles escalated chats and one-on-one coaching sessions on Mondays, Wednesdays, and Fridays (2-hour blocks).
- **Learning Platform Administrator**: Configures gamification rules, escalation thresholds, content libraries, and monitors agent performance.
- **Personalized Motivation Agent**: Autonomously detects engagement slumps and dispatches context-aware motivational messages, running A/B tests to refine its strategy.
- **Learning Resource Curator Agent**: Autonomously assesses skill gaps and recommends ranked, accessibility-aware learning resources.
- **Smart Reminder & Progress Monitor Agent**: Continuously calculates progress velocity, flags at-risk milestones, and dispatches personalized reminders.
- **Hybrid Mentoring Chatbot Agent**: Provides 24/7 NLP-driven guidance, evaluates complexity/sentiment, and escalates to human mentors when needed.
- **Gamification Agent**: Detects achievement-eligible events, awards points/badges, updates leaderboards, and triggers celebrations.
- **Intelligent Course Recommender Agent**: Matches learners' skills passports and goals to optimal course sequences and refines its model with outcome data.

## Goals
- Increase learner engagement, retention, and on-time completion through proactive, personalized agent interventions.
- Close skill gaps faster via curated, semantically-matched learning resources.
- Optimize human mentor capacity by handling routine queries with AI and escalating only complex/emotionally-charged cases.
- Continuously improve agent decisions through A/B testing, feedback loops, and ML model retraining.
- Empower learners with full control over notification, privacy, accessibility, and learning preferences.

## User Story
As a **learner enrolled in a CLaaS career program**, I want **a team of AI agents to monitor my progress, motivate me, recommend the right resources and courses, and seamlessly connect me to a human mentor when I need deeper help**, so that **I stay engaged, complete my milestones on time, and reach my long-term career goals with personalized support tuned to my preferences**.

## Detailed Workflow

### 1. Learner Onboarding & Preference Capture
1. Learner completes the **Preference Settings Configuration** across six categories: Notification, Communication, Learning, Privacy, Accessibility, and System preferences.
2. Preferences are persisted to the learner profile and become the source of truth for every downstream agent (notification channels, quiet hours, content format, language, accessibility needs, etc.).

### 2. Personalized Motivation Agent (continuous loop)
3. Agent ingests engagement telemetry (logins, time-on-task, content consumption) and **compares current activity to the learner's historical baseline**.
4. **Slump detector** classifies severity as *mild / moderate / severe* when sustained low activity is observed.
5. **Message generator** retrieves the learner's motivations, goals, and past responsive content; selects a context-appropriate template; personalizes with name and specifics.
6. **Notification dispatcher** routes the message via the learner's preferred channel at an optimized send time, including a clear CTA (e.g., "Resume Module 3").
7. **Experimentation framework** randomly assigns learners to message variants and tracks open, click-through, and 7-day re-engagement rates.
8. **Impact tracker** computes conversion per variant and feeds high-performing strategies back into the template library.

### 3. Learning Resource Curator Agent (on demand + scheduled)
9. Agent **assesses skill gaps** from the latest assessment results and skills passport delta.
10. Pulls preferences (format, accessibility) and past resource ratings from the profile.
11. **Resource search service** queries the library by skill tags; filters by format, duration, and quality.
12. **Semantic recommender** uses NLP to match gap descriptions to resources and applies collaborative filtering from similar learners' choices.
13. **Ranking algorithm** combines relevance, quality, and learner-fit to produce a top 5–10 list.
14. Recommendations are surfaced in the Resource UI with previews; learner can save, consume, or dismiss.
15. **Consumption tracker** logs access, completion, and prompts for a 1–5 helpfulness rating, feeding the recommender back.

### 4. Smart Reminder & Progress Monitor Agent (daily cadence)
16. Agent calculates current **progress velocity** vs. required pace based on enrollment target dates.
17. **Milestone tracker** flags upcoming assessments/projects with >30% probability of being missed.
18. **Message generator** crafts a personalized reminder calibrated to risk level with concrete action items.
19. **Notification dispatcher** delivers via preferred channel, respecting quiet hours and frequency caps; logs delivery state.
20. **Response tracker** measures post-reminder behavior and updates frequency/timing/content strategy per learner.

### 5. Hybrid Mentoring Interface (AI ↔ Human)
21. Learner initiates a chatbot session; the **AI chatbot engine** processes the query via NLP and answers from the knowledge base.
22. **Sentiment analyzer** scores complexity, emotion (frustrated/confused/satisfied), and AI confidence.
23. **Escalation engine** triggers a hand-off when: complexity score > threshold, sentiment is negative, AI confidence is low, or topic is critical. It identifies an available human mentor by expertise.
24. For booked sessions, the learner uses the **Calendly-style booking flow**: views Mon/Wed/Fri 2-hour slots, picks a time, system validates availability, creates the booking via Microsoft Graph/Teams/Outlook, and sends 24h + 1h reminders. Reschedule/cancel allowed up to 24h prior.
25. **Conversation logger** stores the full transcript, generates a session summary, and tags topics/competencies for downstream analytics and recommender training.

### 6. Gamification Agent (event-driven)
26. Agent listens for achievement-eligible events (module completion, streaks, ratings).
27. **Rules evaluator** computes points earned and checks badge criteria.
28. **Ledger service** credits points and issues badges with full audit trail.
29. **Leaderboard service** refreshes global, cohort, and peer rankings (respecting privacy settings).
30. **Notification service** triggers a celebration via in-app/email with badge visuals.
31. **Profile updater** persists gamification state and timeline.

### 7. Intelligent Course Recommender Agent (periodic + on goal change)
32. Agent reads the learner's **skills passport and career goals**.
33. **Course matcher** filters the catalog by competency coverage and prerequisites.
34. **Relevance scorer** predicts completion probability and time-to-mastery from a trained ML model.
35. **Sequencer** proposes ordered course paths optimizing for time-to-goal and difficulty progression.
36. **Enrollment tracker** logs enrollments, monitors progress, and captures grades and satisfaction.
37. **Model trainer** retrains the recommender on fresh outcome data on a recurring schedule.

## Acceptance Criteria

### Functional
- Learners can configure all 6 preference categories, and every agent must read these preferences before acting.
- Motivation Agent detects slumps within 48 hours of sustained drop and classifies severity correctly in ≥90% of validated cases.
- Resource Curator returns top 5–10 ranked recommendations with metadata, previews, and accessibility tags.
- Progress Monitor flags any milestone with >30% miss probability and sends at least one personalized reminder before the deadline.
- Chatbot resolves routine queries 24/7; escalation to a human mentor triggers when complexity, sentiment, or confidence thresholds are crossed.
- Mentor booking honors Mon/Wed/Fri 2-hour slots, integrates with Microsoft Graph/Teams/Outlook, and sends 24h + 1h reminders.
- Gamification events are processed within 5 seconds of the triggering activity, with leaderboards updated and celebrations dispatched.
- Course Recommender produces a sequenced learning path respecting all prerequisites and aligned to stated career goals.

### Agent Guardrails & Escalation
- **Notification frequency cap**: No agent may send more than the learner-configured maximum messages per day; quiet hours are strictly enforced.
- **Sentiment guardrail**: If sentiment analysis detects severe distress (e.g., burnout, crisis language), chatbot must immediately escalate to a human mentor and suppress automated nudges for 24 hours.
- **Confidence threshold**: Chatbot must escalate when AI confidence < defined threshold rather than fabricate an answer.
- **A/B test safety**: Experimental message variants must be capped at a configurable percentage of the learner population and auto-rolled-back if conversion drops below baseline.
- **Privacy enforcement**: Leaderboards, profile visibility, and data sharing must respect per-learner privacy settings; agents must not expose data the learner has opted out of.
- **Human override**: Mentors and admins can pause any agent for a specific learner or globally; learners can unsubscribe from any agent's nudges without affecting platform access.
- **Stop conditions**: Reminder agent stops once the at-risk milestone is completed; motivation agent pauses on repeated non-engagement (after N variants tested) and escalates to a human mentor.
- **Audit trail**: Every agent action (message sent, badge awarded, escalation, recommendation) is logged with timestamp, rationale, and inputs for review.

### Quality & Learning
- A/B test results must demonstrate measurable lift (e.g., ≥5%) in 7-day re-engagement before a variant is promoted.
- Course Recommender model is retrained at least monthly using new completion and satisfaction data; success-prediction accuracy is monitored and reported.
- Resource Curator incorporates learner ratings within 24 hours into subsequent recommendations.

## Assumptions & Constraints
- Microsoft Graph API / Teams / Outlook are available and provisioned for calendar integration.
- A populated knowledge base, course catalog, and resource library with rich metadata and skill tags exist.
- Learners have an established **skills passport** and stated career goals.
- Human mentor availability is restricted to Mon/Wed/Fri, 2-hour blocks per mentor per day.
- NLP, sentiment analysis, and recommendation ML models are either available as services or built in-house and meet enterprise data-privacy standards.
- All agent communications adhere to the platform's data privacy, accessibility (WCAG), and regional language requirements.
- Sufficient historical engagement data exists per learner to compute meaningful baselines; cold-start learners use cohort-level defaults.

--- FEATURE LIST SUMMARY ---
This solution enables learners to be continuously coached by a network of autonomous AI agents that monitor engagement, motivation, skill gaps, and progress, intervening with nudges, resources, course paths, and gamified rewards while escalating to human mentors only when warranted. Primary actors are the Learner, Human Mentor, Learning Platform Administrator, and six specialized AI agents. The flow runs from preference capture through continuous agent observation, on-demand resource curation, progress reminders, hybrid chatbot/mentor booking, gamification, and course recommendation. Master Data Configuration holds users, roles, preferences, content libraries, gamification rules, and escalation thresholds. Total 18 features delivering proactive personalization, hybrid AI-human mentoring, and continuously learning recommendation engines.

Feature Clusters & Features:
• Master Data Configuration
  - 1. User, Role & Mentor Directory — Central registry of learners, mentors, admins, expertise tags, and availability windows used across every agent and workflow.
  - 2. Learner Preference Settings — Captures the six preference categories (notification, communication, learning, privacy, accessibility, system) that all agents must honor before acting.
  - 3. Content, Course & Knowledge Library — Master catalog of resources, courses, skill tags, prerequisites, and knowledge-base articles consumed by curator, recommender, and chatbot agents.
  - 4. Gamification Rules & Escalation Thresholds — Admin-configured points, badge criteria, leaderboard rules, frequency caps, sentiment and confidence thresholds governing every agent.
• Learner Onboarding
  - 5. Skills Passport & Career Goal Capture — Records the learner's current competencies, target roles, and goals that drive personalization across recommender and curator agents.
• Continuous Engagement Monitoring
  - 6. Engagement Slump Detection & Motivation Nudges — Personalized Motivation Agent detects activity drops, classifies severity, and dispatches optimized motivational messages with CTAs.
  - 7. A/B Experimentation & Impact Tracking — Randomly assigns learners to message variants, measures re-engagement lift, and promotes winning strategies safely.
• Skill Gap Resource Curation
  - 8. Skill Gap Assessment & Resource Recommendation — Learning Resource Curator Agent identifies gaps and returns ranked, accessibility-aware top 5–10 resource lists.
  - 9. Resource Consumption & Rating Feedback — Logs learner access, completion, and 1–5 helpfulness ratings, feeding the recommender within 24 hours.
• Progress & Milestone Management
  - 10. Progress Velocity & Milestone Risk Tracking — Smart Reminder Agent computes pace, flags milestones with >30% miss probability, and triggers personalized reminders.
  - 11. Reminder Dispatch & Response Optimization — Delivers cadence-aware reminders honoring quiet hours and frequency caps, then refines timing and content from response data.
• Hybrid Mentoring
  - 12. 24/7 AI Chatbot Guidance — Hybrid Mentoring Chatbot Agent answers routine learner queries from the knowledge base using NLP with confidence scoring.
  - 13. Sentiment-Based Escalation to Human Mentor — Evaluates complexity, sentiment, and confidence to hand off the conversation to a matched human mentor when thresholds are crossed.
  - 14. Mentor Booking & Calendar Integration — Calendly-style booking on Mon/Wed/Fri 2-hour slots integrated with Microsoft Graph/Teams/Outlook with 24h + 1h reminders.
  - 15. Conversation Logging & Session Summary — Stores transcripts, generates topic-tagged summaries, and feeds analytics and recommender model training.
• Gamification & Rewards
  - 16. Achievement Detection, Points & Badge Awarding — Gamification Agent evaluates events, credits the ledger, awards badges, and triggers in-app/email celebrations.
  - 17. Leaderboard & Profile Updates — Refreshes global, cohort, and peer leaderboards while respecting per-learner privacy settings.
• Course Pathway Recommendation
  - 18. Personalized Course Sequencing & Model Retraining — Intelligent Course Recommender Agent matches skills passport to courses, sequences a path, tracks outcomes, and retrains monthly.
• Agent Orchestration & Governance
  - 19. Agent Action Audit, Guardrails & Human Override — Centralized audit log, frequency caps, stop conditions, and admin/learner controls to pause or unsubscribe from any agent.

--- FEATURE LIST (19 features across 9 clusters) ---

#1 | Cluster: Master Data Configuration | Feature: User, Role & Mentor Directory
  Description: Central registry of all platform users, roles, and mentor expertise/availability metadata. Acts as the authoritative source for authentication, escalation routing, and booking.
  Workflow:
    1. Admin creates learner, mentor, and admin accounts with roles and permissions.
    2. Mentor expertise tags and Mon/Wed/Fri availability blocks are recorded.
    3. Role-based access policies are mapped to platform features.
    4. Directory is consumed by booking, escalation, and audit services.
    5. Updates propagate to all agents in real time.
  Table:       users_roles
  Columns:     id (bigint, pk), full_name (varchar 200), email (varchar 200), role (enum: learner|mentor|admin), expertise_tags (jsonb), availability_windows (jsonb), status (varchar 20), created_at (timestamp)
  Actor:       Learning Platform Administrator
  AI Agent:    None
  ----
#2 | Cluster: Master Data Configuration | Feature: Learner Preference Settings
  Description: Captures and stores all learner preference categories that govern how every downstream agent communicates and personalizes content. Enforced as a hard precondition before any agent action.
  Workflow:
    1. Learner opens preference center on first login.
    2. Configures six categories: notification, communication, learning, privacy, accessibility, system.
    3. Sets quiet hours, channels, frequency caps, language, format.
    4. Preferences are persisted as the source of truth.
    5. All agents read preferences before acting.
  Table:       learner_preferences
  Columns:     id (bigint, pk), learner_id (bigint, fk), notification_prefs (jsonb), communication_prefs (jsonb), learning_prefs (jsonb), privacy_prefs (jsonb), accessibility_prefs (jsonb), system_prefs (jsonb), updated_at (timestamp)
  Actor:       Learner
  AI Agent:    None
  ----
#3 | Cluster: Master Data Configuration | Feature: Content, Course & Knowledge Library
  Description: Master catalog of all learning content, courses, and knowledge articles enriched with skill tags and accessibility metadata. Forms the retrieval backbone for curator, recommender, and chatbot agents.
  Workflow:
    1. Admin ingests resources, courses, and knowledge-base articles with metadata.
    2. Each item is tagged with skills, prerequisites, format, duration, accessibility.
    3. Quality scores and ratings are tracked.
    4. Library is indexed for semantic search.
    5. Curator, recommender, and chatbot agents query the library.
  Table:       content_catalog
  Columns:     id (bigint, pk), type (enum: resource|course|kb_article), title (varchar 255), skill_tags (jsonb), prerequisites (jsonb), format (varchar 50), duration_min (int), accessibility_tags (jsonb), quality_score (decimal 3,2)
  Actor:       Learning Platform Administrator
  AI Agent:    None
  ----
#4 | Cluster: Master Data Configuration | Feature: Gamification Rules & Escalation Thresholds
  Description: Configurable rules engine for gamification awards, agent guardrails, and escalation thresholds. Provides admins one place to tune agent behavior without code changes.
  Workflow:
    1. Admin defines points per event type and badge criteria.
    2. Configures leaderboard scopes and privacy filters.
    3. Sets sentiment, complexity, and AI-confidence thresholds.
    4. Sets frequency caps and A/B exposure limits.
    5. Rules are versioned and consumed by all agents.
  Table:       platform_rules
  Columns:     id (bigint, pk), rule_type (varchar 50), config (jsonb), version (int), effective_from (timestamp), updated_by (bigint, fk), active (boolean)
  Actor:       Learning Platform Administrator
  AI Agent:    None
  ----
#5 | Cluster: Learner Onboarding | Feature: Skills Passport & Career Goal Capture
  Description: Records each learner's current competencies and long-term career aspirations to drive personalization. Acts as the input contract for the course recommender and resource curator.
  Workflow:
    1. Learner completes baseline skills assessment.
    2. Stated career goals and target roles are recorded.
    3. Skills passport is generated with proficiency levels.
    4. Goals are linked to required competency map.
    5. Passport is exposed to recommender and curator agents.
  Table:       skills_passport
  Columns:     id (bigint, pk), learner_id (bigint, fk), competencies (jsonb), proficiency_levels (jsonb), career_goals (jsonb), target_roles (jsonb), last_updated (timestamp)
  Actor:       Learner
  AI Agent:    Intelligent Course Recommender Agent
  ----
#6 | Cluster: Continuous Engagement Monitoring | Feature: Engagement Slump Detection & Motivation Nudges
  Description: Continuously detects engagement drops and dispatches personalized motivational nudges through the learner's preferred channel. Targets re-engagement before the slump worsens.
  Workflow:
    1. Agent ingests login, time-on-task, and consumption telemetry.
    2. Compares activity vs. learner historical baseline.
    3. Slump detector classifies severity as mild/moderate/severe.
    4. Generator personalizes a context-aware message with CTA.
    5. Dispatcher sends via preferred channel at optimized time.
  Table:       motivation_events
  Columns:     id (bigint, pk), learner_id (bigint, fk), severity (enum: mild|moderate|severe), baseline_metrics (jsonb), message_id (bigint), channel (varchar 30), sent_at (timestamp), cta (varchar 255)
  Actor:       Personalized Motivation Agent
  AI Agent:    Personalized Motivation Agent
  ----
#7 | Cluster: Continuous Engagement Monitoring | Feature: A/B Experimentation & Impact Tracking
  Description: Runs controlled experiments on motivation message variants, measuring lift and safely promoting winners. Includes automatic rollback if a variant underperforms.
  Workflow:
    1. Framework assigns learners to message variants within exposure cap.
    2. Tracks open, click-through, and 7-day re-engagement.
    3. Computes lift per variant vs. control.
    4. Auto-rolls back variants dropping below baseline.
    5. Promotes winners to template library.
  Table:       ab_experiments
  Columns:     id (bigint, pk), experiment_name (varchar 150), variant (varchar 50), learner_id (bigint, fk), exposure_pct (decimal 5,2), conversion_rate (decimal 5,2), status (enum: running|promoted|rolled_back), created_at (timestamp)
  Actor:       Personalized Motivation Agent
  AI Agent:    Personalized Motivation Agent
  ----
#8 | Cluster: Skill Gap Resource Curation | Feature: Skill Gap Assessment & Resource Recommendation
  Description: Identifies skill gaps and produces a ranked, accessibility-aware list of recommended learning resources. Uses semantic NLP and collaborative filtering for relevance.
  Workflow:
    1. Agent reads latest assessment and skills passport delta.
    2. Pulls preferences and past resource ratings.
    3. Searches library by skill tags and filters by format/accessibility.
    4. Semantic recommender matches gap descriptions to resources.
    5. Ranking algorithm returns top 5–10 list with previews.
  Table:       resource_recommendations
  Columns:     id (bigint, pk), learner_id (bigint, fk), skill_gap (varchar 150), resource_id (bigint, fk), rank (int), relevance_score (decimal 5,2), generated_at (timestamp), status (enum: shown|saved|consumed|dismissed)
  Actor:       Learner
  AI Agent:    Learning Resource Curator Agent
  ----
#9 | Cluster: Skill Gap Resource Curation | Feature: Resource Consumption & Rating Feedback
  Description: Captures consumption signals and learner ratings on recommended resources. Closes the feedback loop so the curator agent improves recommendations daily.
  Workflow:
    1. Tracker logs resource access and completion events.
    2. Prompts learner for 1–5 helpfulness rating.
    3. Stores ratings against resource and learner profile.
    4. Feeds back into recommender within 24 hours.
    5. Updates resource quality scores in catalog.
  Table:       resource_feedback
  Columns:     id (bigint, pk), learner_id (bigint, fk), resource_id (bigint, fk), accessed_at (timestamp), completed (boolean), rating (int 1-5), comments (text)
  Actor:       Learner
  AI Agent:    Learning Resource Curator Agent
  ----
#10 | Cluster: Progress & Milestone Management | Feature: Progress Velocity & Milestone Risk Tracking
  Description: Continuously calculates each learner's pace against enrollment targets and flags at-risk milestones. Acts as the trigger for personalized reminder workflows.
  Workflow:
    1. Agent calculates current velocity vs. required pace.
    2. Identifies upcoming assessments and projects.
    3. Computes miss probability per milestone.
    4. Flags any milestone with >30% miss probability.
    5. Triggers reminder generation pipeline.
  Table:       milestone_risk
  Columns:     id (bigint, pk), learner_id (bigint, fk), milestone_id (bigint, fk), required_pace (decimal 5,2), current_velocity (decimal 5,2), miss_probability (decimal 5,2), flagged_at (timestamp), status (varchar 30)
  Actor:       Smart Reminder & Progress Monitor Agent
  AI Agent:    Smart Reminder & Progress Monitor Agent
  ----
#11 | Cluster: Progress & Milestone Management | Feature: Reminder Dispatch & Response Optimization
  Description: Delivers personalized milestone reminders honoring channel and cadence preferences. Learns optimal timing and tone from each learner's response history.
  Workflow:
    1. Generator crafts reminder calibrated to risk level with action items.
    2. Dispatcher delivers via preferred channel respecting quiet hours.
    3. Frequency caps and stop conditions are enforced.
    4. Response tracker measures post-reminder behavior.
    5. Strategy is refined per learner based on outcomes.
  Table:       reminder_dispatch_log
  Columns:     id (bigint, pk), learner_id (bigint, fk), milestone_id (bigint, fk), channel (varchar 30), sent_at (timestamp), delivery_status (varchar 20), response_action (varchar 50), response_time_min (int)
  Actor:       Smart Reminder & Progress Monitor Agent
  AI Agent:    Smart Reminder & Progress Monitor Agent
  ----
#12 | Cluster: Hybrid Mentoring | Feature: 24/7 AI Chatbot Guidance
  Description: Provides round-the-clock NLP-driven guidance answering routine learner queries from the knowledge base. Confidence-scored to avoid fabricated answers.
  Workflow:
    1. Learner initiates a chatbot session.
    2. NLP engine interprets the query and intent.
    3. Knowledge base is searched for relevant content.
    4. Response is composed with confidence score.
    5. Reply is delivered in learner's language and accessibility format.
  Table:       chatbot_interactions
  Columns:     id (bigint, pk), learner_id (bigint, fk), session_id (varchar 60), query (text), response (text), confidence_score (decimal 5,2), language (varchar 10), created_at (timestamp)
  Actor:       Learner
  AI Agent:    Hybrid Mentoring Chatbot Agent
  ----
#13 | Cluster: Hybrid Mentoring | Feature: Sentiment-Based Escalation to Human Mentor
  Description: Evaluates conversation sentiment, complexity, and AI confidence to escalate to a matched human mentor when needed. Includes safety override for distress signals.
  Workflow:
    1. Sentiment analyzer scores complexity, emotion, and confidence.
    2. Escalation engine compares scores to thresholds.
    3. On trigger, identifies an available mentor by expertise.
    4. Severe distress immediately escalates and suppresses nudges 24h.
    5. Hand-off context and transcript are passed to mentor.
  Table:       escalation_events
  Columns:     id (bigint, pk), session_id (varchar 60), learner_id (bigint, fk), complexity_score (decimal 5,2), sentiment (varchar 30), confidence (decimal 5,2), trigger_reason (varchar 100), assigned_mentor_id (bigint, fk), escalated_at (timestamp)
  Actor:       Hybrid Mentoring Chatbot Agent
  AI Agent:    Hybrid Mentoring Chatbot Agent
  ----
#14 | Cluster: Hybrid Mentoring | Feature: Mentor Booking & Calendar Integration
  Description: Calendly-style booking experience for one-on-one mentor sessions integrated with Microsoft Graph, Teams, and Outlook. Honors mentor availability rules and sends timely reminders.
  Workflow:
    1. Learner views Mon/Wed/Fri 2-hour mentor slots.
    2. Selects time and confirms booking.
    3. System validates availability and creates booking via Microsoft Graph.
    4. Teams meeting and Outlook invites are issued.
    5. 24h and 1h reminders are sent; reschedule 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), teams_meeting_url (varchar 500), status (enum: booked|rescheduled|cancelled|completed), reminders_sent (jsonb)
  Actor:       Learner
  AI Agent:    Hybrid Mentoring Chatbot Agent
  ----
#15 | Cluster: Hybrid Mentoring | Feature: Conversation Logging & Session Summary
  Description: Persists transcripts and AI-generated summaries with topic and competency tagging. Provides analytics input and training data for downstream recommender models.
  Workflow:
    1. Logger captures full chatbot and mentor session transcripts.
    2. Generates AI-powered session summary.
    3. Tags topics, competencies, and sentiment.
    4. Stores artifacts against learner profile.
    5. Feeds analytics and recommender model training.
  Table:       session_summaries
  Columns:     id (bigint, pk), session_id (varchar 60), learner_id (bigint, fk), transcript_url (varchar 500), summary (text), topic_tags (jsonb), competency_tags (jsonb), created_at (timestamp)
  Actor:       Hybrid Mentoring Chatbot Agent
  AI Agent:    Hybrid Mentoring Chatbot Agent
  ----
#16 | Cluster: Gamification & Rewards | Feature: Achievement Detection, Points & Badge Awarding
  Description: Event-driven engine that detects achievements, awards points and badges, and celebrates the learner. Maintains a complete audit trail for transparency.
  Workflow:
    1. Agent listens for module completion, streaks, and ratings events.
    2. Rules evaluator computes points and checks badge criteria.
    3. Ledger credits points and issues badges with audit trail.
    4. Notification service triggers a celebration in-app/email.
    5. Profile updater persists state within 5 seconds.
  Table:       gamification_ledger
  Columns:     id (bigint, pk), learner_id (bigint, fk), event_type (varchar 50), points_awarded (int), badge_id (bigint, fk), rule_version (int), awarded_at (timestamp), audit_payload (jsonb)
  Actor:       Gamification Agent
  AI Agent:    Gamification Agent
  ----
#17 | Cluster: Gamification & Rewards | Feature: Leaderboard & Profile Updates
  Description: Refreshes leaderboards and learner gamification profiles while strictly honoring privacy settings. Drives social motivation without exposing opted-out data.
  Workflow:
    1. Service refreshes global, cohort, and peer rankings.
    2. Privacy preferences filter learner visibility.
    3. Updates are pushed to learner profiles.
    4. Visualizations are rendered in dashboards.
    5. Historical snapshots are archived.
  Table:       leaderboards
  Columns:     id (bigint, pk), scope (enum: global|cohort|peer), learner_id (bigint, fk), points_total (int), rank (int), visibility (varchar 20), refreshed_at (timestamp)
  Actor:       Gamification Agent
  AI Agent:    Gamification Agent
  ----
#18 | Cluster: Course Pathway Recommendation | Feature: Personalized Course Sequencing & Model Retraining
  Description: Generates a sequenced, prerequisite-aware course pathway aligned to the learner's career goals. Continuously retrains on outcome data to improve prediction accuracy.
  Workflow:
    1. Agent reads skills passport and career goals.
    2. Course matcher filters catalog by competency coverage and prerequisites.
    3. Relevance scorer predicts completion probability and time-to-mastery.
    4. Sequencer proposes ordered course paths to the learner.
    5. Enrollment tracker logs outcomes; model trainer retrains monthly.
  Table:       course_recommendations
  Columns:     id (bigint, pk), learner_id (bigint, fk), course_id (bigint, fk), sequence_position (int), predicted_completion_prob (decimal 5,2), time_to_mastery_days (int), generated_at (timestamp), enrollment_status (varchar 30)
  Actor:       Learner
  AI Agent:    Intelligent Course Recommender Agent
  ----
#19 | Cluster: Agent Orchestration & Governance | Feature: Agent Action Audit, Guardrails & Human Override
  Description: Centralized observability and control plane for all agent actions, guardrails, and human overrides. Ensures compliance, safety, and learner autonomy across the agent network.
  Workflow:
    1. Every agent action logs timestamp, rationale, and inputs.
    2. Guardrails enforce frequency caps, quiet hours, and exposure limits.
    3. Stop conditions auto-pause agents when criteria are met.
    4. Admins and mentors can pause any agent per learner or globally.
    5. Learners can unsubscribe from any agent's nudges.
  Table:       agent_audit_log
  Columns:     id (bigint, pk), agent_name (varchar 80), learner_id (bigint, fk), action_type (varchar 50), rationale (text), inputs (jsonb), guardrail_checks (jsonb), override_status (varchar 30), created_at (timestamp)
  Actor:       Learning Platform Administrator
  AI Agent:    All Agents
  ----

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