# 3. Smart Study Planner

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

---

## 3. Smart Study Planner

### 3.1 Scheduling Algorithm Configuration
**What it does:** Configures the smart study planner's scheduling algorithm: the prioritization logic, the time-slot allocation, the subject balancing, and the deadline awareness.

**Sub-features:**
- Prioritization logic (deadline, importance, weakness-weighted)
- Time-slot allocation (fixed slots, flexible windows)
- Subject balancing (even distribution, weakness-first)
- Deadline awareness (exam dates, assignment due dates)
- Algorithm parameters (slot length, buffer time, max subjects per day)
- Available on web
- Event logging (action performed)
- Audit logging of scheduling algorithm configuration

**Super Admin User Journey:**
1. Super Admin opens AI Feature Configuration → Smart Study Planner → Scheduling Algorithm.
2. Sets the prioritization logic (deadline, importance, weakness-weighted).
3. Configures the time-slot allocation (fixed slots, flexible windows).
4. Sets the subject balancing (even distribution, weakness-first).
5. Enables deadline awareness and sets the algorithm parameters (slot length, buffer time, max subjects per day).
6. Saves; the algorithm applies to all generated study plans.
7. Each configuration change is event-logged and audit-logged.

**Rules & Edge Cases:**
- A plan never schedules more subjects per day than the max-subjects parameter allows.
- A deadline-aware plan places the highest-priority task in the earliest feasible slot before the deadline.
- A conflict (two tasks, one slot) is resolved by the prioritization logic; the lower-priority task is moved, not dropped.
- Configuration changes are audit-logged with the parameter, the change, and the timestamp.

### 3.2 Pomodoro Technique Settings
**What it does:** Configures the Pomodoro technique settings: the focus interval, the short break, the long break, and the sessions-per-long-break count.

**Sub-features:**
- Focus interval length (default 25 minutes)
- Short break length (default 5 minutes)
- Long break length (default 15 minutes)
- Sessions per long break (default 4)
- Per-grade-band Pomodoro profiles (shorter intervals for younger students)
- Available on web
- Event logging (action performed)
- Audit logging of Pomodoro settings

**Super Admin User Journey:**
1. Super Admin opens AI Feature Configuration → Smart Study Planner → Pomodoro.
2. Sets the focus interval length (default 25 minutes).
3. Configures the short break length (default 5 minutes) and the long break length (default 15 minutes).
4. Sets the sessions per long break (default 4).
5. Defines per-grade-band Pomodoro profiles (shorter intervals for younger students).
6. Saves; the settings apply to all Pomodoro-based study sessions.
7. Each configuration change is event-logged and audit-logged.

**Rules & Edge Cases:**
- A grade band with no specific profile uses the global Pomodoro settings.
- The long break is scheduled after the configured number of focus sessions; it is not scheduled mid-cycle.
- A focus interval shorter than the short break is rejected (invalid profile).
- Configuration changes are audit-logged with the setting, the change, and the timestamp.

### 3.3 Time Budget Defaults
**What it does:** Configures the time budget defaults: the daily study time budget, the per-subject time allocation, the weekly budget, and the budget flexibility.

**Sub-features:**
- Daily study time budget (default per grade band)
- Per-subject time allocation (percentage or fixed minutes)
- Weekly time budget (total study hours per week)
- Budget flexibility (over/under allowance percentage)
- Budget per subscription plan (higher plans get more guided time)
- Available on web
- Event logging (action performed)
- Audit logging of time budget defaults

**Super Admin User Journey:**
1. Super Admin opens AI Feature Configuration → Smart Study Planner → Time Budget.
2. Sets the daily study time budget (default per grade band).
3. Configures the per-subject time allocation (percentage or fixed minutes).
4. Sets the weekly time budget (total study hours per week).
5. Defines the budget flexibility (over/under allowance percentage) and the per-plan budget.
6. Saves; the defaults apply to all generated study plans.
7. Each configuration change is event-logged and audit-logged.

**Rules & Edge Cases:**
- A plan's total scheduled time never exceeds the weekly budget plus the flexibility allowance.
- A per-subject allocation that sums to more than 100% is rejected with the reason.
- A student with no plan-specific budget uses the grade-band default, then the plan default.
- Configuration changes are audit-logged with the setting, the change, and the timestamp.

### 3.4 Distraction-Free Mode Rules
**What it does:** Configures the distraction-free mode rules: the mode triggers, the notifications suppressed, the allowed interruptions, and the mode duration.

**Sub-features:**
- Mode triggers (auto on focus session start, manual)
- Notifications suppressed (non-critical app notifications, social)
- Allowed interruptions (parent alert, emergency, scheduled break)
- Mode duration (per focus session, per study block)
- Mode reporting (distraction count, focus time preserved)
- Available on web
- Event logging (action performed)
- Audit logging of distraction-free mode rules

**Super Admin User Journey:**
1. Super Admin opens AI Feature Configuration → Smart Study Planner → Distraction-Free Mode.
2. Sets the mode triggers (auto on focus session start, manual).
3. Configures the notifications suppressed (non-critical app notifications, social).
4. Defines the allowed interruptions (parent alert, emergency, scheduled break).
5. Sets the mode duration and enables the mode reporting.
6. Saves; the rules apply to all focus sessions.
7. Each configuration change is event-logged and audit-logged.

**Rules & Edge Cases:**
- An allowed interruption (parent alert, emergency) always breaks the distraction-free mode; it is never suppressed.
- A suppressed notification is queued and delivered after the mode ends (not lost).
- The mode duration is bounded by the focus session; it does not extend beyond the scheduled block.
- Configuration changes are audit-logged with the rule, the change, and the timestamp.

### 3.5 Dynamic Plan Adjustment Rules
**What it does:** Defines the rules for dynamically adjusting a study plan: the adjustment triggers, the re-planning scope, the student confirmation, and the adjustment limits.

**Sub-features:**
- Adjustment triggers (missed session, completed early, new deadline, performance change)
- Re-planning scope (remaining days, current week, single day)
- Student confirmation (auto-apply, propose-and-confirm)
- Adjustment limits (max reschedules per week, min task stability)
- Adjustment history (all changes with reason)
- Available on web
- Event logging (action performed)
- Audit logging of dynamic plan adjustment rules

**Super Admin User Journey:**
1. Super Admin opens AI Feature Configuration → Smart Study Planner → Dynamic Adjustment.
2. Sets the adjustment triggers (missed session, completed early, new deadline, performance change).
3. Configures the re-planning scope (remaining days, current week, single day).
4. Defines the student confirmation mode (auto-apply, propose-and-confirm).
5. Sets the adjustment limits (max reschedules per week, min task stability) and enables the adjustment history.
6. Saves; the rules apply to all active study plans.
7. Each configuration change is event-logged and audit-logged.

**Rules & Edge Cases:**
- A plan exceeding the max reschedules per week stops auto-adjusting and flags for human review.
- A propose-and-confirm adjustment is not applied until the student confirms; it expires if not confirmed within the window.
- Every adjustment is recorded in the adjustment history with the trigger and the reason; the history is immutable.
- Configuration changes are audit-logged with the rule, the change, and the timestamp.
