# 5. AI Study Companion / Emotional Intelligence

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*

---

## 5. AI Study Companion / Emotional Intelligence

### 5.1 Mood Tracking Configuration
**What it does:** Configures the AI study companion's mood tracking: the mood check-in frequency, the mood scale, the mood input methods, and the mood history retention.

**Sub-features:**
- Mood check-in frequency (per session, daily, on-demand)
- Mood scale (emoji scale, 1-5, labeled moods)
- Mood input methods (tap, text, voice)
- Mood history retention (per student, per period)
- Mood trend view (mood over time, per subject)
- Available on web
- Event logging (action performed)
- Audit logging of mood tracking configuration

**Super Admin User Journey:**
1. Super Admin opens AI Feature Configuration → AI Study Companion → Mood Tracking.
2. Sets the mood check-in frequency (per session, daily, on-demand).
3. Configures the mood scale (emoji scale, 1-5, labeled moods).
4. Defines the mood input methods (tap, text, voice).
5. Sets the mood history retention and enables the mood trend view.
6. Saves; the configuration applies to all study companion sessions.
7. Each configuration change is event-logged and audit-logged.

**Rules & Edge Cases:**
- A skipped mood check-in is recorded as skipped (not as a neutral mood); it does not skew the trend.
- A student with no mood data shows no trend (not a default mood).
- The mood history is retained per the configured period; older data is aggregated, not deleted, for trend continuity.
- Configuration changes are audit-logged with the setting, the change, and the timestamp.

### 5.2 Burnout Detection Thresholds
**What it does:** Configures the burnout detection thresholds: the burnout indicators, the threshold per indicator, the composite burnout score, and the detection window.

**Sub-features:**
- Burnout indicators (study hours, sleep proxy, mood decline, performance drop, session abandonment)
- Threshold per indicator (trigger level)
- Composite burnout score (weighted combination of indicators)
- Detection window (7-day, 14-day rolling)
- Burnout severity levels (mild, moderate, severe)
- Available on web
- Event logging (action performed)
- Audit logging of burnout detection thresholds

**Super Admin User Journey:**
1. Super Admin opens AI Feature Configuration → AI Study Companion → Burnout Detection.
2. Sets the burnout indicators (study hours, sleep proxy, mood decline, performance drop, session abandonment).
3. Configures the threshold per indicator (trigger level).
4. Defines the composite burnout score (weighted combination of indicators).
5. Sets the detection window (7-day, 14-day rolling) and the severity levels (mild, moderate, severe).
6. Saves; the thresholds apply to all students.
7. Each configuration change is event-logged and audit-logged.

**Rules & Edge Cases:**
- A single indicator at threshold does not trigger a burnout alert; the composite score must cross the severity threshold.
- A student with insufficient data in the window is not assessed for burnout (no false positives from sparse data).
- A burnout alert is raised at most once per severity level per detection window (no repeated alerts for the same state).
- Configuration changes are audit-logged with the threshold, the change, and the timestamp.

### 5.3 Break Suggestion Rules
**What it does:** Configures the break suggestion rules: the break triggers, the break duration, the break content, and the break frequency limits.

**Sub-features:**
- Break triggers (continuous study time, mood decline, performance drop in session)
- Break duration (short 5 min, medium 10 min, long 20 min)
- Break content (stretch, breathing exercise, motivational message, free break)
- Break frequency limits (max breaks per hour, per session)
- Break acceptance tracking (accepted, dismissed, ignored)
- Available on web
- Event logging (action performed)
- Audit logging of break suggestion rules

**Super Admin User Journey:**
1. Super Admin opens AI Feature Configuration → AI Study Companion → Break Suggestions.
2. Sets the break triggers (continuous study time, mood decline, performance drop in session).
3. Configures the break duration (short 5 min, medium 10 min, long 20 min).
4. Defines the break content (stretch, breathing exercise, motivational message, free break).
5. Sets the break frequency limits (max breaks per hour, per session) and enables the acceptance tracking.
6. Saves; the rules apply to all study sessions.
7. Each configuration change is event-logged and audit-logged.

**Rules & Edge Cases:**
- A break suggestion at the frequency limit is suppressed for the remainder of the window; it is not queued.
- A dismissed break is not re-suggested for the same trigger within the same session.
- A break suggestion never interrupts an active assessment or live session; it is deferred to the next safe point.
- Configuration changes are audit-logged with the rule, the change, and the timestamp.

### 5.4 Counselor Connection Triggers
**What it does:** Defines the triggers for connecting a student to a counselor: the trigger conditions, the connection routing, the consent requirements, and the follow-up tracking.

**Sub-features:**
- Trigger conditions (severe burnout, sustained negative mood, self-reported distress, student request)
- Connection routing (counselor queue, assigned counselor, parent-informed)
- Consent requirements (student consent, parent consent for minors)
- Follow-up tracking (counselor session scheduled, completed, outcome)
- Trigger history (all triggers with resolution)
- Available on web
- Event logging (action performed)
- Audit logging of counselor connection triggers

**Super Admin User Journey:**
1. Super Admin opens AI Feature Configuration → AI Study Companion → Counselor Connection.
2. Sets the trigger conditions (severe burnout, sustained negative mood, self-reported distress, student request).
3. Configures the connection routing (counselor queue, assigned counselor, parent-informed).
4. Defines the consent requirements (student consent, parent consent for minors).
5. Sets the follow-up tracking and enables the trigger history.
6. Saves; the triggers apply to all students.
7. Each configuration change is event-logged and audit-logged.

**Rules & Edge Cases:**
- A student-requested counselor connection always succeeds; it is never blocked by consent or routing constraints.
- A minor's counselor connection requires parent consent before the session; the request is held, not dropped, until consent.
- Every trigger is recorded in the trigger history with the resolution; the history is immutable.
- Configuration changes are audit-logged with the rule, the change, and the timestamp.

### 5.5 Motivational Content Mapping
**What it does:** Configures the motivational content mapping: the content types, the mood-to-content mapping, the content frequency, and the content effectiveness tracking.

**Sub-features:**
- Motivational content types (quotes, success stories, videos, audio, images)
- Mood-to-content mapping (content per mood state)
- Content frequency (max motivational items per session, per day)
- Content effectiveness tracking (engagement, mood improvement after content)
- Content library management (add, retire, feature content)
- Available on web
- Event logging (action performed)
- Audit logging of motivational content mapping

**Super Admin User Journey:**
1. Super Admin opens AI Feature Configuration → AI Study Companion → Motivational Content.
2. Sets the motivational content types (quotes, success stories, videos, audio, images).
3. Configures the mood-to-content mapping (content per mood state).
4. Defines the content frequency (max motivational items per session, per day).
5. Sets the content effectiveness tracking and manages the content library (add, retire, feature).
6. Saves; the mapping applies to all study companion sessions.
7. Each configuration change is event-logged and audit-logged.

**Rules & Edge Cases:**
- A mood state with no mapped content falls back to the default motivational content; it is never an empty state.
- A retired content item is not served to new sessions; in-progress sessions finish with it.
- The content frequency limit prevents motivational overload; excess items are not queued.
- Configuration changes are audit-logged with the mapping, the change, and the timestamp.
