/** * Learning Path Generator * * Generates personalized learning paths from current state to target skills. * Uses topological sorting and groups skills into manageable sessions. * * @packageDocumentation */ import type { SkillId } from '../types/skill.js'; import type { MasteryState } from '../types/mastery.js'; import type { GraphStorage } from '../types/storage.js'; import type { LearningPath, PathOptions } from '../types/query.js'; /** * Default options for path generation */ export declare const PATH_DEFAULTS: Required; /** * Learner state for path generation */ export interface LearnerState { /** Mastery states for skills (keyed by skill ID) */ masteryStates: Map; } /** * Learning Path Generator * * Generates optimal learning paths to reach target skills by: * 1. Finding all unmastered prerequisites * 2. Topologically sorting based on dependencies * 3. Grouping into sessions based on cognitive load * * @example * ```typescript * const generator = new PathGenerator(storage); * * const path = await generator.generatePath( * 'advanced-skill', * learnerState, * { sessionMinutes: 45 } * ); * * console.log(`Path has ${path.skills.length} skills`); * console.log(`Estimated time: ${path.totalMinutes} minutes`); * ``` */ export declare class PathGenerator { private readonly storage; constructor(storage: GraphStorage); /** * Generate a learning path to a target skill * * @param targetId - The skill to learn * @param learner - Current learner state * @param options - Path generation options * @returns Learning path with skills grouped into sessions */ generatePath(targetId: SkillId, learner: LearnerState, options?: PathOptions): Promise; /** * Generate paths to multiple target skills * * @param targetIds - Skills to learn * @param learner - Current learner state * @param options - Path generation options * @returns Array of learning paths */ generatePaths(targetIds: SkillId[], learner: LearnerState, options?: PathOptions): Promise; /** * Get a merged learning path for multiple targets * Combines all required skills and eliminates duplicates */ generateMergedPath(targetIds: SkillId[], learner: LearnerState, options?: PathOptions): Promise; /** * Get all transitive prerequisites of a skill */ private getTransitivePrerequisites; /** * Filter skills to only unmastered ones */ private filterUnmastered; /** * Topologically sort skills based on prerequisites * Skills with no unmastered prerequisites come first */ private topologicalSort; /** * Group skills into learning sessions based on target duration */ private groupIntoSessions; /** * Create a learning session from a group of skills */ private createSession; /** * Determine the focus/theme of a session */ private determineFocus; } /** * Create a path generator */ export declare function createPathGenerator(storage: GraphStorage): PathGenerator; //# sourceMappingURL=path.d.ts.map