educational-automation.ts•22.2 kB
/**
* EuConquisto Composer MCP Server - Educational Automation Interface
*
* @version 0.1.0
* @created 2025-06-08
* @updated 2025-06-08
* @author EuConquisto Development Team
*
* @description TypeScript interfaces for educational content automation,
* including course generation, learning analytics, and adaptive learning systems.
*
* @testStatus PENDING
* @coverage 0%
*
* @dependencies
* - TypeScript 5.0+
* - Node.js types
* - content-elements.ts
* - mcp-server.ts
*
* @supersedes N/A
* @supersededBy N/A
*/
import { ContentElementType, ContentComposition, ValidationResult } from './content-elements';
import { User } from './authentication';
// Core Educational Automation Interfaces
export interface EducationalAutomationEngine {
generateCourse(specification: CourseSpecification): Promise<GeneratedCourse>;
createLessonPlan(requirements: LessonRequirements): Promise<Lesson>;
generateAssessment(parameters: AssessmentParameters): Promise<Assessment>;
optimizeLearningPath(userId: string, courseId: string): Promise<OptimizedLearningPath>;
generateContent(prompt: ContentPrompt): Promise<GeneratedContent>;
analyzeProgress(userId: string, courseId: string): Promise<ProgressAnalysis>;
recommendContent(userId: string, preferences: LearningPreferences): Promise<ContentRecommendation[]>;
}
// Course Generation Interfaces
export interface CourseSpecification {
title: string;
description: string;
subject: string;
level: EducationLevel;
duration: Duration;
objectives: LearningObjective[];
targetAudience: TargetAudience;
prerequisites: Prerequisite[];
topics: string[];
deliveryMethod: DeliveryMethod;
assessmentStrategy: AssessmentStrategy;
resources: ResourceRequirement[];
constraints: CourseConstraint[];
}
export interface LearningObjective {
id: string;
description: string;
level: BloomLevel;
domain: LearningDomain;
measurable: boolean;
assessmentCriteria: string[];
timeAllocation: number;
priority: 'high' | 'medium' | 'low';
}
export interface TargetAudience {
demographics: AudienceDemographics;
priorKnowledge: string[];
learningPreferences: LearningPreferences;
accessibility: AccessibilityRequirements;
motivation: MotivationFactors;
}
export interface AudienceDemographics {
ageRange: {
min: number;
max: number;
};
education: string[];
profession: string[];
location: string[];
language: string[];
}
export interface LearningPreferences {
styles: LearningStyle[];
pace: LearningPace;
interactivity: InteractivityLevel;
multimedia: MultimediaPreference;
feedback: FeedbackPreference;
socialLearning: boolean;
selfDirected: boolean;
}
export interface AccessibilityRequirements {
visualImpairment: boolean;
hearingImpairment: boolean;
motorImpairment: boolean;
cognitiveSupport: boolean;
screenReader: boolean;
closedCaptions: boolean;
altText: boolean;
keyboardNavigation: boolean;
}
export interface MotivationFactors {
intrinsic: string[];
extrinsic: string[];
goals: string[];
barriers: string[];
incentives: string[];
}
export interface Prerequisite {
id: string;
type: 'knowledge' | 'skill' | 'experience' | 'certification';
description: string;
level: string;
optional: boolean;
alternatives: string[];
}
export interface Duration {
total: number; // in minutes
sessions: number;
sessionLength: number;
flexibility: 'fixed' | 'flexible' | 'self-paced';
timeframe: string; // e.g., "4 weeks", "2 months"
}
export interface DeliveryMethod {
format: 'online' | 'blended' | 'classroom' | 'self-study';
platform: string[];
synchronous: boolean;
asynchronous: boolean;
mobile: boolean;
offline: boolean;
}
export interface AssessmentStrategy {
types: AssessmentType[];
frequency: AssessmentFrequency;
weightings: AssessmentWeighting[];
feedback: FeedbackStrategy;
remediation: boolean;
certification: boolean;
}
export interface ResourceRequirement {
type: 'textbook' | 'software' | 'hardware' | 'subscription' | 'material';
name: string;
description: string;
required: boolean;
cost?: number;
alternatives: string[];
}
export interface CourseConstraint {
type: 'time' | 'budget' | 'technology' | 'policy' | 'accessibility';
description: string;
impact: 'low' | 'medium' | 'high';
workaround?: string;
}
// Generated Course Interfaces
export interface GeneratedCourse {
id: string;
specification: CourseSpecification;
structure: CourseStructure;
content: CourseContent;
assessments: Assessment[];
resources: CourseResource[];
analytics: CourseAnalytics;
metadata: ContentMetadata;
}
export interface CourseStructure {
modules: CourseModule[];
learningPath: LearningPath;
dependencies: ModuleDependency[];
milestones: Milestone[];
checkpoints: Checkpoint[];
}
export interface CourseModule {
id: string;
title: string;
description: string;
objectives: LearningObjective[];
lessons: Lesson[];
duration: number;
order: number;
optional: boolean;
prerequisites: string[];
}
export interface LearningPath {
id: string;
name: string;
description: string;
nodes: PathNode[];
edges: PathEdge[];
adaptiveRules: AdaptiveRule[];
}
export interface PathNode {
id: string;
type: 'lesson' | 'assessment' | 'milestone' | 'branch' | 'merge';
contentId: string;
position: {
x: number;
y: number;
};
conditions: NodeCondition[];
}
export interface PathEdge {
id: string;
fromNode: string;
toNode: string;
condition?: string;
weight: number;
type: 'sequential' | 'conditional' | 'optional';
}
export interface AdaptiveRule {
id: string;
condition: string;
action: AdaptiveAction;
priority: number;
active: boolean;
}
export interface AdaptiveAction {
type: 'recommend' | 'require' | 'skip' | 'repeat' | 'branch' | 'remediate';
target: string;
parameters: Record<string, any>;
}
export interface ModuleDependency {
moduleId: string;
dependsOn: string[];
type: 'prerequisite' | 'corequisite' | 'recommended';
}
export interface Milestone {
id: string;
title: string;
description: string;
criteria: CompletionCriteria;
rewards: Reward[];
moduleIds: string[];
}
export interface Checkpoint {
id: string;
title: string;
moduleId: string;
position: number;
criteria: CompletionCriteria;
feedback: string;
}
// Lesson Planning Interfaces
export interface LessonRequirements {
topic: string;
objectives: LearningObjective[];
duration: number;
audience: TargetAudience;
resources: string[];
constraints: LessonConstraint[];
style: TeachingStyle;
}
export interface LessonConstraint {
type: 'time' | 'technology' | 'resources' | 'space';
description: string;
value?: any;
}
export interface TeachingStyle {
approach: 'instructor-led' | 'student-centered' | 'collaborative' | 'experiential';
interactivity: InteractivityLevel;
multimedia: boolean;
gamification: boolean;
storytelling: boolean;
}
export interface Lesson {
id: string;
title: string;
description: string;
objectives: LearningObjective[];
duration: number;
activities: LessonActivity[];
resources: LessonResource[];
assessment?: Assessment;
notes: InstructorNotes;
}
export interface LessonActivity {
id: string;
type: ActivityType;
title: string;
description: string;
duration: number;
instructions: string;
materials: string[];
grouping: GroupingStrategy;
technology: TechnologyRequirement[];
assessment: ActivityAssessment;
content: ContentElementType;
}
export interface LessonResource {
id: string;
type: ResourceType;
title: string;
description?: string;
location: string;
format: string;
access: AccessLevel;
licensing: string;
}
export interface InstructorNotes {
preparation: string[];
timing: string[];
variations: string[];
troubleshooting: string[];
extensions: string[];
}
// Assessment Generation Interfaces
export interface AssessmentParameters {
type: AssessmentType;
objectives: LearningObjective[];
difficulty: DifficultyLevel;
duration: number;
questionCount: number;
questionTypes: QuestionType[];
adaptivity: boolean;
feedback: FeedbackLevel;
rubric: boolean;
}
export interface Assessment {
id: string;
title: string;
description: string;
type: AssessmentType;
instructions: string;
questions: Question[];
rubric?: AssessmentRubric;
settings: AssessmentSettings;
analytics: AssessmentAnalytics;
}
export interface Question {
id: string;
type: QuestionType;
stem: string;
options?: QuestionOption[];
correctAnswer: string | string[];
explanation: string;
difficulty: DifficultyLevel;
bloomLevel: BloomLevel;
points: number;
timeLimit?: number;
hints: string[];
feedback: QuestionFeedback;
}
export interface QuestionOption {
id: string;
text: string;
correct: boolean;
feedback?: string;
}
export interface QuestionFeedback {
correct: string;
incorrect: string;
partial?: string;
hint?: string;
}
export interface AssessmentRubric {
id: string;
title: string;
description: string;
criteria: RubricCriterion[];
scale: RubricScale;
scoring: ScoringMethod;
}
export interface RubricCriterion {
id: string;
name: string;
description: string;
weight: number;
levels: RubricLevel[];
}
export interface RubricLevel {
id: string;
name: string;
description: string;
score: number;
indicators: string[];
}
export interface RubricScale {
type: 'numeric' | 'letter' | 'descriptive';
min: number;
max: number;
levels: string[];
}
export interface AssessmentSettings {
timeLimit?: number;
attempts: number;
randomizeQuestions: boolean;
randomizeOptions: boolean;
showCorrectAnswers: boolean;
immediateResults: boolean;
passingScore: number;
retakePolicy: RetakePolicy;
}
export interface RetakePolicy {
allowed: boolean;
maxAttempts: number;
cooldownPeriod: number;
scoringMethod: 'highest' | 'latest' | 'average';
}
// Content Generation Interfaces
export interface ContentPrompt {
type: ContentType;
topic: string;
objective: LearningObjective;
audience: TargetAudience;
constraints: ContentConstraint[];
style: ContentStyle;
examples?: string[];
}
export interface ContentConstraint {
type: 'length' | 'complexity' | 'format' | 'language' | 'accessibility';
value: any;
description: string;
}
export interface ContentStyle {
tone: 'formal' | 'informal' | 'conversational' | 'academic';
voice: 'active' | 'passive';
perspective: 'first' | 'second' | 'third';
complexity: LanguageComplexity;
examples: boolean;
analogies: boolean;
}
export interface GeneratedContent {
element: ContentElementType;
alternatives: ContentElementType[];
metadata: ContentMetadata;
quality: QualityMetrics;
}
export interface ContentMetadata {
prompt: string;
model: string;
timestamp: string;
version: string;
parameters: Record<string, any>;
processing: ProcessingMetrics;
}
export interface ProcessingMetrics {
duration: number;
iterations: number;
confidence: number;
alternatives: number;
}
export interface QualityMetrics {
relevance: number;
clarity: number;
accuracy: number;
engagement: number;
accessibility: number;
overall: number;
}
// Learning Analytics Interfaces
export interface ProgressAnalysis {
userId: string;
courseId: string;
moduleProgress: ModuleProgress[];
overallProgress: OverallProgress;
performance: PerformanceMetrics;
engagement: EngagementMetrics;
predictions: LearningPrediction[];
recommendations: LearningRecommendation[];
}
export interface ModuleProgress {
moduleId: string;
status: ProgressStatus;
completion: number;
timeSpent: number;
activitiesCompleted: number;
totalActivities: number;
scores: ScoreMetrics;
mastery: MasteryLevel;
}
export interface OverallProgress {
completion: number;
timeSpent: number;
sessionsCompleted: number;
totalSessions: number;
streak: number;
lastActivity: string;
estimatedCompletion: string;
}
export interface PerformanceMetrics {
averageScore: number;
highestScore: number;
lowestScore: number;
improvement: number;
consistency: number;
strengths: string[];
weaknesses: string[];
}
export interface EngagementMetrics {
activeTime: number;
interactions: number;
resourceViews: number;
forumPosts: number;
questionsAsked: number;
helpSeeking: number;
dropoffPoints: string[];
}
export interface LearningPrediction {
type: 'completion' | 'performance' | 'difficulty' | 'engagement';
confidence: number;
timeframe: string;
value: any;
factors: string[];
}
export interface LearningRecommendation {
type: 'content' | 'activity' | 'pace' | 'support' | 'review';
priority: 'high' | 'medium' | 'low';
description: string;
rationale: string;
actions: RecommendedAction[];
expectedOutcome: string;
}
export interface RecommendedAction {
action: string;
target: string;
parameters: Record<string, any>;
effort: 'low' | 'medium' | 'high';
impact: 'low' | 'medium' | 'high';
}
// Adaptive Learning Interfaces
export interface OptimizedLearningPath {
userId: string;
courseId: string;
path: AdaptivePath;
rationale: string;
confidence: number;
alternatives: AlternativePath[];
metadata: PathMetadata;
}
export interface AdaptivePath {
nodes: AdaptiveNode[];
edges: AdaptiveEdge[];
estimatedDuration: number;
difficulty: DifficultyLevel;
personalizations: Personalization[];
}
export interface AdaptiveNode {
id: string;
contentId: string;
type: NodeType;
adaptations: NodeAdaptation[];
conditions: AdaptiveCondition[];
metadata: Record<string, any>;
}
export interface AdaptiveEdge {
from: string;
to: string;
condition: AdaptiveCondition;
probability: number;
metadata: Record<string, any>;
}
export interface NodeAdaptation {
type: 'content' | 'presentation' | 'interaction' | 'assessment';
modification: string;
reason: string;
impact: AdaptationImpact;
}
export interface AdaptiveCondition {
field: string;
operator: string;
value: any;
logic?: 'and' | 'or' | 'not';
}
export interface Personalization {
aspect: 'content' | 'pace' | 'difficulty' | 'style' | 'support';
modification: string;
reason: string;
evidence: string[];
}
export interface AlternativePath {
path: AdaptivePath;
score: number;
pros: string[];
cons: string[];
}
export interface PathMetadata {
created: string;
algorithm: string;
version: string;
parameters: Record<string, any>;
confidence: number;
}
// Utility Types and Enums
export type EducationLevel = 'elementary' | 'middle' | 'high' | 'undergraduate' | 'graduate' | 'professional';
export type BloomLevel = 'remember' | 'understand' | 'apply' | 'analyze' | 'evaluate' | 'create';
export type LearningDomain = 'cognitive' | 'affective' | 'psychomotor';
export type LearningStyle = 'visual' | 'auditory' | 'kinesthetic' | 'reading';
export type LearningPace = 'slow' | 'moderate' | 'fast' | 'variable';
export type InteractivityLevel = 'low' | 'medium' | 'high';
export type MultimediaPreference = 'text' | 'visual' | 'audio' | 'video' | 'interactive';
export type FeedbackPreference = 'immediate' | 'delayed' | 'on-demand' | 'minimal';
export type AssessmentType = 'formative' | 'summative' | 'diagnostic' | 'peer' | 'self';
export type AssessmentFrequency = 'continuous' | 'periodic' | 'milestone' | 'final';
export type FeedbackStrategy = 'immediate' | 'delayed' | 'adaptive' | 'peer' | 'instructor';
export type ActivityType = 'reading' | 'video' | 'discussion' | 'practice' | 'project' | 'simulation';
export type GroupingStrategy = 'individual' | 'pair' | 'small-group' | 'large-group' | 'flexible';
export type ResourceType = 'text' | 'multimedia' | 'interactive' | 'reference' | 'tool';
export type AccessLevel = 'public' | 'restricted' | 'private';
export type DifficultyLevel = 'beginner' | 'intermediate' | 'advanced' | 'expert';
export type QuestionType = 'multiple-choice' | 'true-false' | 'fill-blank' | 'essay' | 'matching' | 'ordering';
export type FeedbackLevel = 'none' | 'basic' | 'detailed' | 'adaptive';
export type ScoringMethod = 'points' | 'percentage' | 'rubric' | 'pass-fail';
export type ContentType = 'text' | 'image' | 'video' | 'audio' | 'interactive' | 'simulation';
export type LanguageComplexity = 'simple' | 'moderate' | 'complex' | 'academic';
export type ProgressStatus = 'not-started' | 'in-progress' | 'completed' | 'mastered';
export type MasteryLevel = 'none' | 'developing' | 'proficient' | 'advanced' | 'expert';
export type NodeType = 'content' | 'assessment' | 'milestone' | 'branch' | 'merge';
export type AdaptationImpact = 'low' | 'medium' | 'high';
// Complex Interfaces
export interface ScoreMetrics {
current: number;
average: number;
best: number;
trend: 'improving' | 'stable' | 'declining';
distribution: Record<string, number>;
}
export interface CompletionCriteria {
type: 'score' | 'time' | 'activities' | 'mastery' | 'custom';
value: any;
operator: 'gte' | 'gt' | 'lte' | 'lt' | 'eq';
}
export interface Reward {
type: 'badge' | 'points' | 'certificate' | 'unlock' | 'recognition';
name: string;
description: string;
icon?: string;
value?: number;
}
export interface NodeCondition {
field: string;
operator: string;
value: any;
weight?: number;
}
export interface TechnologyRequirement {
type: 'software' | 'hardware' | 'platform' | 'connection';
name: string;
version?: string;
required: boolean;
}
export interface ActivityAssessment {
type: 'observation' | 'product' | 'performance' | 'self' | 'peer';
criteria: string[];
rubric?: string;
points?: number;
}
export interface AssessmentWeighting {
type: AssessmentType;
weight: number;
required: boolean;
}
export interface AssessmentAnalytics {
difficulty: number;
discrimination: number;
reliability: number;
validity: number;
statistics: QuestionStatistics[];
}
export interface QuestionStatistics {
questionId: string;
difficulty: number;
discrimination: number;
responses: ResponseDistribution;
timeToAnswer: number;
commonErrors: string[];
}
export interface ResponseDistribution {
[optionId: string]: {
count: number;
percentage: number;
};
}
export interface CourseContent {
modules: CourseModule[];
supplements: SupplementaryContent[];
glossary: GlossaryEntry[];
references: Reference[];
}
export interface SupplementaryContent {
id: string;
type: 'reading' | 'video' | 'podcast' | 'tool' | 'case-study';
title: string;
description: string;
url?: string;
content?: ContentElementType;
tags: string[];
difficulty: DifficultyLevel;
estimatedTime: number;
}
export interface GlossaryEntry {
term: string;
definition: string;
pronunciation?: string;
examples: string[];
relatedTerms: string[];
category: string;
}
export interface Reference {
id: string;
type: 'book' | 'article' | 'website' | 'video' | 'podcast';
title: string;
authors: string[];
publisher?: string;
year?: number;
url?: string;
doi?: string;
isbn?: string;
description?: string;
}
export interface CourseResource {
id: string;
type: ResourceType;
title: string;
description?: string;
location: string;
format: string;
size?: number;
license: string;
accessibility: AccessibilityFeatures;
}
export interface AccessibilityFeatures {
altText: boolean;
captions: boolean;
transcript: boolean;
screenReaderCompatible: boolean;
keyboardNavigable: boolean;
highContrast: boolean;
}
export interface CourseAnalytics {
enrollment: EnrollmentMetrics;
engagement: EngagementSummary;
performance: PerformanceSummary;
feedback: FeedbackSummary;
completion: CompletionMetrics;
}
export interface EnrollmentMetrics {
total: number;
active: number;
completed: number;
dropped: number;
demographics: Record<string, number>;
trends: TimeSeries[];
}
export interface EngagementSummary {
averageTimeSpent: number;
resourceViews: number;
interactions: number;
forumActivity: number;
dropoffPoints: DropoffPoint[];
}
export interface PerformanceSummary {
averageScore: number;
passRate: number;
distribution: ScoreDistribution;
improvements: ImprovementMetrics;
correlations: PerformanceCorrelation[];
}
export interface FeedbackSummary {
rating: number;
responses: number;
comments: string[];
sentiment: SentimentAnalysis;
improvements: string[];
}
export interface CompletionMetrics {
rate: number;
averageTime: number;
milestones: MilestoneMetrics[];
predictors: CompletionPredictor[];
}
export interface TimeSeries {
date: string;
value: number;
}
export interface DropoffPoint {
location: string;
rate: number;
reasons: string[];
}
export interface ScoreDistribution {
bins: ScoreBin[];
mean: number;
median: number;
mode: number;
standardDeviation: number;
}
export interface ScoreBin {
range: [number, number];
count: number;
percentage: number;
}
export interface ImprovementMetrics {
overall: number;
byModule: Record<string, number>;
bySkill: Record<string, number>;
trajectory: TimeSeries[];
}
export interface PerformanceCorrelation {
factor: string;
correlation: number;
significance: number;
}
export interface SentimentAnalysis {
positive: number;
negative: number;
neutral: number;
themes: string[];
}
export interface MilestoneMetrics {
milestoneId: string;
completionRate: number;
averageTime: number;
difficulty: number;
}
export interface CompletionPredictor {
factor: string;
weight: number;
accuracy: number;
}
export interface ContentRecommendation {
contentId: string;
type: ContentType;
title: string;
description: string;
relevanceScore: number;
rationale: string[];
personalizations: Personalization[];
metadata: RecommendationMetadata;
}
export interface RecommendationMetadata {
algorithm: string;
confidence: number;
timestamp: string;
factors: RecommendationFactor[];
}
export interface RecommendationFactor {
name: string;
weight: number;
value: any;
impact: 'positive' | 'negative' | 'neutral';
}