/** * Zone of Proximal Development (ZPD) Calculator * * Implements Vygotsky's Zone of Proximal Development theory to identify * skills that are "just right" for a learner - challenging but achievable. * * @packageDocumentation */ import type { SkillNode, SkillId } from '../types/skill.js'; import type { MasteryState } from '../types/mastery.js'; import type { GraphStorage } from '../types/storage.js'; import type { ZPDResult, ZPDOptions } from '../types/query.js'; /** * Default options for ZPD calculation */ export declare const ZPD_DEFAULTS: Required>; /** * Learner profile for ZPD calculation */ export interface LearnerProfile { /** Mastery states for skills (keyed by skill ID) */ masteryStates: Map; /** Estimated learner ability level (0-1, derived from average mastery) */ abilityLevel?: number; } /** * ZPD Calculator * * Calculates the Zone of Proximal Development for a learner based on: * 1. Current mastery states * 2. Prerequisite graph structure * 3. Skill difficulty levels * * A skill is in the ZPD if: * - All prerequisites are mastered * - The skill is not yet mastered * - The skill difficulty is within tolerance of learner ability */ export declare class ZPDCalculator { private readonly storage; constructor(storage: GraphStorage); /** * Calculate ZPD for a learner * * @param learner - Learner profile with mastery states * @param options - Calculation options * @returns ZPD result with ready skills and blocked skills * * @example * ```typescript * const calculator = new ZPDCalculator(storage); * * const learner = { * masteryStates: new Map([ * ['skill-1', { skillId: 'skill-1', mastery: 0.9, ... }], * ['skill-2', { skillId: 'skill-2', mastery: 0.3, ... }], * ]) * }; * * const zpd = await calculator.calculate(learner); * console.log('Ready to learn:', zpd.ready.map(s => s.name)); * ``` */ calculate(learner: LearnerProfile, options?: ZPDOptions): Promise; /** * Get the next recommended skill to learn * * @param learner - Learner profile * @param options - ZPD options * @returns The highest priority skill to learn next, or null if none available */ getNextSkill(learner: LearnerProfile, options?: ZPDOptions): Promise; /** * Check if a specific skill is in the learner's ZPD * * @param skillId - Skill to check * @param learner - Learner profile * @returns Object with inZPD status and blocking prerequisites if any */ isInZPD(skillId: SkillId, learner: LearnerProfile): Promise<{ inZPD: boolean; blocking: string[]; }>; /** * Calculate learner ability level from mastery states */ private calculateAbilityLevel; /** * Sort skills by learning priority */ private sortByPriority; } /** * Create a ZPD calculator */ export declare function createZPDCalculator(storage: GraphStorage): ZPDCalculator; //# sourceMappingURL=zpd.d.ts.map