@thanh01.pmt/curriculum-kit 1.4.47 → 1.4.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -51,6 +51,15 @@ declare const DEFAULT_OVERHEAD_RATIO = 0.15;
51
51
  * during the first working session before achieving their first running "Hello World".
52
52
  */
53
53
  declare const MAX_IN_SESSION_SETUP_MINUTES = 15;
54
+ /**
55
+ * Session-Cut Tolerance (P52/T2.2):
56
+ * When the content budget is reached, the packer searches for the nearest
57
+ * user-visible checkpoint (node with a non-empty user_visible_deliverable)
58
+ * within ±15% of the session's content budget before falling back to a raw
59
+ * minute cut. Motivation: a session that ends mid-step without anything to
60
+ * show kills momentum (P52 plan, Gap 2).
61
+ */
62
+ declare const SESSION_CUT_TOLERANCE = 0.15;
54
63
  /**
55
64
  * 3-Tier Environment Provisioning Models for Complex or Heavy Technology Stacks:
56
65
  * - PRE_INSTALLED_LAB: Environment/IDE/DB is imaged or pre-configured by IT/Lab technician before class.
@@ -1102,12 +1111,35 @@ interface PlanResult {
1102
1111
  declare function normalizePlanningGraph(raw: unknown): PlanningGraph;
1103
1112
  declare function assertAcyclic(nodes: PlanningNode[], edges: DependencyEdge[]): void;
1104
1113
  declare function topoSort(nodes: PlanningNode[], edges: DependencyEdge[]): string[];
1114
+ interface UnitGrouping {
1115
+ key: string;
1116
+ name: string;
1117
+ orderedIds: string[];
1118
+ rationale: string;
1119
+ phaseIds: string[];
1120
+ productCompletion: string;
1121
+ }
1105
1122
  interface PackingSpec {
1106
1123
  contentBudget: number;
1107
1124
  overheadMinutes: number;
1108
1125
  sessionDurationMinutes: number;
1109
1126
  }
1110
1127
  declare function computePackingSpec(constraints: PlanConstraints): PackingSpec;
1128
+ interface PackedEntry {
1129
+ id: string;
1130
+ minutes: number;
1131
+ part: number;
1132
+ totalParts: number;
1133
+ }
1134
+ interface PackedSession {
1135
+ groupId: string;
1136
+ nodeIds: string[];
1137
+ entries: PackedEntry[];
1138
+ knowledgeMinutes: number;
1139
+ practiceMinutes: number;
1140
+ oversized: boolean;
1141
+ }
1142
+ declare function packUnitSessions(group: UnitGrouping, nodeById: Map<string, PlanningNode>, spec: PackingSpec, warnings: string[]): PackedSession[];
1111
1143
  declare function assignDepths(nodeIds: string[], nodeById: Map<string, PlanningNode>, conceptEncounterMap?: Map<string, number>): CurriculumPlan['sessions'][number]['depth_assignments'];
1112
1144
  /**
1113
1145
  * Bruner's Spiral Curriculum progression tracker across the entire course.
@@ -1176,6 +1208,59 @@ declare function extractSessionSlice(plan: CurriculumPlan, lessonCode: string):
1176
1208
  /** Compact plan-slice context block for LESSON/satellite prompts (activity design inputs). */
1177
1209
  declare function buildSessionSliceContext(plan: CurriculumPlan, lessonCode: string): string;
1178
1210
 
1211
+ /**
1212
+ * P52/T3.2+T3.3 — depth reconcile (plan P52, Gap 3).
1213
+ *
1214
+ * When the bottom-up minute total exceeds the course budget
1215
+ * (total_sessions × contentBudget), the planner historically had only one
1216
+ * way out: stretch time (part-sessions). The reconciler adds the missing
1217
+ * direction: LOWER KNOWLEDGE DEPTH along the Bruner spiral (SIO→CIO→ULO),
1218
+ * never below the ULO floor, never on core concepts (is_core → escalate).
1219
+ *
1220
+ * Pedagogical downgrade priority (least pedagogical loss first):
1221
+ * 1. `advanced` revisits (second pass — review, not first teach)
1222
+ * 2. SIO→CIO on LEAF concepts (no other concept depends on them)
1223
+ * 3. SIO→CIO on non-leaf non-core concepts
1224
+ * 4. CIO→ULO on leaf concepts
1225
+ * 5. CIO→ULO on non-leaf non-core concepts
1226
+ *
1227
+ * After each downgrade round the caller re-runs its fail-closed verifications
1228
+ * (teaching-order audit + ZPD) — the reconciler returns per-node evidence so
1229
+ * that re-audit has the exact change-set, and reports exhausted candidates as
1230
+ * a structured escalation (never a silent phase cut).
1231
+ */
1232
+ interface ReconcileCandidate {
1233
+ nodeId: string;
1234
+ fromDepth: 'ulo' | 'cio' | 'sio';
1235
+ toDepth: 'ulo' | 'cio' | 'sio';
1236
+ minutesSaved: number;
1237
+ reason: string;
1238
+ }
1239
+ interface ReconcileResult {
1240
+ /** true when total fit inside the budget without any downgrade. */
1241
+ unchanged: boolean;
1242
+ /** Applied downgrades in application order (fixed-point evidence). */
1243
+ applied: ReconcileCandidate[];
1244
+ /** Nodes mutated, for targeted re-audit by the caller. */
1245
+ mutatedNodeIds: string[];
1246
+ /** True when candidates were exhausted while still over budget. */
1247
+ escalate: boolean;
1248
+ deficitMinutes: number;
1249
+ }
1250
+ /**
1251
+ * Compute leaf-ness on the CONCEPT level: a concept is a leaf when no other
1252
+ * concept lists it as a prerequisite. Node-level attributes (introduce_aspect
1253
+ * advanced, __ADV ids) map back to their base concept id.
1254
+ */
1255
+ declare function classifyDepthCandidates(nodes: PlanningNode[], edges: DependencyEdge[]): Map<string, boolean>;
1256
+ /**
1257
+ * Apply depth downgrades until total ≤ budget, the candidate pool is empty,
1258
+ * or MAX_ROUNDS is reached (fixed-point with a bounded loop — escalate on
1259
+ * non-convergence). Mutates `nodes` in place (minutes/depth_hint) and returns
1260
+ * the evidence.
1261
+ */
1262
+ declare function reconcilePlanDepth(nodes: PlanningNode[], edges: DependencyEdge[], spec: PackingSpec, budgetMinutes: number): ReconcileResult;
1263
+
1179
1264
  interface ProjectionMeta {
1180
1265
  courseName: string;
1181
1266
  shortDescription?: string;
@@ -1871,4 +1956,4 @@ declare class MisconceptionEvaluator {
1871
1956
  static evaluateQuiz(quiz: DiagnosticQuiz): DimensionScore;
1872
1957
  }
1873
1958
 
1874
- export { AIProviderName, ARTIFACT_DEPENDENCY_ROUTING, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, type ActivityAlignmentResult, ActivityLab, ActivitySeqRow, type ArtifactDependencyRule, type ArtifactProductionSpec, type ArtifactPromptParts, type AssembledTemplate, type AuditBundleInput, BLOOM_ACTION_VERBS, BloomTaxonomyEvaluator, type BuildContextOptions, CURRICULUM_SLASH_COMMANDS, ChunkType, CodeHardwareFeasibilityEvaluator, CodeLab, type ComprehensiveAcademicReport, ConceptPrerequisiteEdge, ConceptSpiralEncounter, ConstructiveAlignmentEvaluator, type ContextInjectionMeta, type ContextRoutingMode, type ContextSourceKey, CoverageGateReport, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_OVERHEAD_RATIO, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DependencyEdge, type DependencyValidationResult, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, ENVIRONMENT_PROVISIONING_MODELS, EXPOSITION_REL, type EnvironmentProvisioningModel, type ExcerptOptions, type ExcerptResult, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type ExtractedJson, type ExtractedStreamChunk, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, type GenerateExpositionOptions, GeneratedSlideArraySchema, GeneratedSlideSchema, HybridBlueprintArraySchema, HybridBlueprintItemSchema, HybridDeckSlideArraySchema, HybridDeckSlideSchema, HybridPipelineError, ICurriculumStorage, JUDGE_AUTO_APPROVE_THRESHOLD, JUDGE_ESCALATE_THRESHOLD, LAYER_IDLE_BUDGET_MS, LAYER_TOTAL_BUDGET_MS, type LayerChunkCallback, type LayerPrefillOptions, type LayerPrefillResult, type LessonEntity, LessonEntitySchema, LessonPlan, MAX_AUTONOMOUS_REPAIR_TURNS, MAX_IN_SESSION_SETUP_MINUTES, MAX_NEW_CONCEPTS_PER_SESSION_ADULT, MAX_NEW_CONCEPTS_PER_SESSION_K12, MasteryGate, MisconceptionEvaluator, ModelResolutionOptions, type PackingSpec, type PedagogicalModel, type PipelineExecutionProgress, PlanConstraints, type PlanOptions, type PlanResult, type PlannerLlmFn, PlanningGraph, PlanningNode, type PrefillProviderEvent, type PreliminaryResearchResult, PrerequisiteDecision, type ProduceLessonOptions, type ProduceLessonResult, type ProjectBriefingData, type ProjectClarification, type ProjectCreationPayload, type ProjectIntentAnalysisResult, ProjectStatusReport, type ProjectionMeta, QualityAuditReport, ResolvedGateSettings, type ResolvedTemplate, SATELLITE_LESSON_PRIORITIES, STUDENT_FRICTION_MULTIPLIER, type SatContextResult, type SatelliteContextInput, SessionZpdStatus, type SlashCommandDefinition, SlideBlueprintArraySchema, SlideBlueprintItemSchema, SlideDeck, type SlideEngine, type SlideProductionWorkflowOptions, type SlideProductionWorkflowResult, SmartResumeContext, type StreamAbortHandle, type StreamBudget, type StreamChunkExtractor, StreamRunnerOptions, type SymbolLedgerResult, type TemplateTranslateRunner, TranslationPolicy, type TranslationTarget, type TranslationTrigger, UnitPlan, type ValidationOptions, WalkingSkeleton, analyzeProjectCreationIntent, assembleTranslatedTemplate, assertAcyclic, assignDepths, auditQualityReport, buildArtifactPrompt, buildConceptPrerequisites, buildCurriculumContext, buildCurriculumPlan, buildDomainLexiconGuardrail, buildExpositionContext, buildExpositionExcerpt, buildHeadingDirective, buildLanguageDirective, buildLessonEntityJson, buildLessonExcerpt, buildMasteryGates, buildSatelliteContext, buildSectionAwareExcerpt, buildSessionSliceContext, buildWalkingSkeleton, checkSessionZpd, closeTruncatedJson, computeConceptSpiralProgression, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createContextMissingError, createStreamAbortSignal, createStreamChunkExtractor, detectProjectPedagogy, dropCyclicConceptEdges, emitUsage, ensureExpositionForLesson, ensureKnowledgeExposition, entityRowAssignedTo, evaluateActivityAlignment, executeCurriculumCommand, executeSlideProductionWorkflow, expositionCacheKey, extractActivityContractRows, extractAssessmentMap, extractConditionalSections, extractDeclaredLanguage, extractEchoSections, extractJsonArray, extractRequiredSections, extractScopeSequenceRows, extractSectionHeadings, extractSessionSlice, extractStreamChunk, extractSymbolLedger, extractTieredScaffoldingBlock, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isActivityAlignmentLogOnly, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadAuthoringTemplate, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderAssignedRowsTable, renderEntitySlotsForType, renderFrameworkFromPlan, resolveArtifactTemplate, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, stripHeadingKey, stripLlmJsonWrappers, stripTemplateFrontmatter, targetLanguageDisplayName, topoSort, translateTemplate, validateArtifactDependencies, validateHybridDeckSlides };
1959
+ export { AIProviderName, ARTIFACT_DEPENDENCY_ROUTING, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, type ActivityAlignmentResult, ActivityLab, ActivitySeqRow, type ArtifactDependencyRule, type ArtifactProductionSpec, type ArtifactPromptParts, type AssembledTemplate, type AuditBundleInput, BLOOM_ACTION_VERBS, BloomTaxonomyEvaluator, type BuildContextOptions, CURRICULUM_SLASH_COMMANDS, ChunkType, CodeHardwareFeasibilityEvaluator, CodeLab, type ComprehensiveAcademicReport, ConceptPrerequisiteEdge, ConceptSpiralEncounter, ConstructiveAlignmentEvaluator, type ContextInjectionMeta, type ContextRoutingMode, type ContextSourceKey, CoverageGateReport, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_OVERHEAD_RATIO, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DependencyEdge, type DependencyValidationResult, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, ENVIRONMENT_PROVISIONING_MODELS, EXPOSITION_REL, type EnvironmentProvisioningModel, type ExcerptOptions, type ExcerptResult, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type ExtractedJson, type ExtractedStreamChunk, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, type GenerateExpositionOptions, GeneratedSlideArraySchema, GeneratedSlideSchema, HybridBlueprintArraySchema, HybridBlueprintItemSchema, HybridDeckSlideArraySchema, HybridDeckSlideSchema, HybridPipelineError, ICurriculumStorage, JUDGE_AUTO_APPROVE_THRESHOLD, JUDGE_ESCALATE_THRESHOLD, LAYER_IDLE_BUDGET_MS, LAYER_TOTAL_BUDGET_MS, type LayerChunkCallback, type LayerPrefillOptions, type LayerPrefillResult, type LessonEntity, LessonEntitySchema, LessonPlan, MAX_AUTONOMOUS_REPAIR_TURNS, MAX_IN_SESSION_SETUP_MINUTES, MAX_NEW_CONCEPTS_PER_SESSION_ADULT, MAX_NEW_CONCEPTS_PER_SESSION_K12, MasteryGate, MisconceptionEvaluator, ModelResolutionOptions, type PackingSpec, type PedagogicalModel, type PipelineExecutionProgress, PlanConstraints, type PlanOptions, type PlanResult, type PlannerLlmFn, PlanningGraph, PlanningNode, type PrefillProviderEvent, type PreliminaryResearchResult, PrerequisiteDecision, type ProduceLessonOptions, type ProduceLessonResult, type ProjectBriefingData, type ProjectClarification, type ProjectCreationPayload, type ProjectIntentAnalysisResult, ProjectStatusReport, type ProjectionMeta, QualityAuditReport, type ReconcileCandidate, type ReconcileResult, ResolvedGateSettings, type ResolvedTemplate, SATELLITE_LESSON_PRIORITIES, SESSION_CUT_TOLERANCE, STUDENT_FRICTION_MULTIPLIER, type SatContextResult, type SatelliteContextInput, SessionZpdStatus, type SlashCommandDefinition, SlideBlueprintArraySchema, SlideBlueprintItemSchema, SlideDeck, type SlideEngine, type SlideProductionWorkflowOptions, type SlideProductionWorkflowResult, SmartResumeContext, type StreamAbortHandle, type StreamBudget, type StreamChunkExtractor, StreamRunnerOptions, type SymbolLedgerResult, type TemplateTranslateRunner, TranslationPolicy, type TranslationTarget, type TranslationTrigger, UnitPlan, type ValidationOptions, WalkingSkeleton, analyzeProjectCreationIntent, assembleTranslatedTemplate, assertAcyclic, assignDepths, auditQualityReport, buildArtifactPrompt, buildConceptPrerequisites, buildCurriculumContext, buildCurriculumPlan, buildDomainLexiconGuardrail, buildExpositionContext, buildExpositionExcerpt, buildHeadingDirective, buildLanguageDirective, buildLessonEntityJson, buildLessonExcerpt, buildMasteryGates, buildSatelliteContext, buildSectionAwareExcerpt, buildSessionSliceContext, buildWalkingSkeleton, checkSessionZpd, classifyDepthCandidates, closeTruncatedJson, computeConceptSpiralProgression, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createContextMissingError, createStreamAbortSignal, createStreamChunkExtractor, detectProjectPedagogy, dropCyclicConceptEdges, emitUsage, ensureExpositionForLesson, ensureKnowledgeExposition, entityRowAssignedTo, evaluateActivityAlignment, executeCurriculumCommand, executeSlideProductionWorkflow, expositionCacheKey, extractActivityContractRows, extractAssessmentMap, extractConditionalSections, extractDeclaredLanguage, extractEchoSections, extractJsonArray, extractRequiredSections, extractScopeSequenceRows, extractSectionHeadings, extractSessionSlice, extractStreamChunk, extractSymbolLedger, extractTieredScaffoldingBlock, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isActivityAlignmentLogOnly, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadAuthoringTemplate, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, packUnitSessions, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, reconcilePlanDepth, renderAssignedRowsTable, renderEntitySlotsForType, renderFrameworkFromPlan, resolveArtifactTemplate, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, stripHeadingKey, stripLlmJsonWrappers, stripTemplateFrontmatter, targetLanguageDisplayName, topoSort, translateTemplate, validateArtifactDependencies, validateHybridDeckSlides };
package/dist/index.d.ts CHANGED
@@ -51,6 +51,15 @@ declare const DEFAULT_OVERHEAD_RATIO = 0.15;
51
51
  * during the first working session before achieving their first running "Hello World".
52
52
  */
53
53
  declare const MAX_IN_SESSION_SETUP_MINUTES = 15;
54
+ /**
55
+ * Session-Cut Tolerance (P52/T2.2):
56
+ * When the content budget is reached, the packer searches for the nearest
57
+ * user-visible checkpoint (node with a non-empty user_visible_deliverable)
58
+ * within ±15% of the session's content budget before falling back to a raw
59
+ * minute cut. Motivation: a session that ends mid-step without anything to
60
+ * show kills momentum (P52 plan, Gap 2).
61
+ */
62
+ declare const SESSION_CUT_TOLERANCE = 0.15;
54
63
  /**
55
64
  * 3-Tier Environment Provisioning Models for Complex or Heavy Technology Stacks:
56
65
  * - PRE_INSTALLED_LAB: Environment/IDE/DB is imaged or pre-configured by IT/Lab technician before class.
@@ -1102,12 +1111,35 @@ interface PlanResult {
1102
1111
  declare function normalizePlanningGraph(raw: unknown): PlanningGraph;
1103
1112
  declare function assertAcyclic(nodes: PlanningNode[], edges: DependencyEdge[]): void;
1104
1113
  declare function topoSort(nodes: PlanningNode[], edges: DependencyEdge[]): string[];
1114
+ interface UnitGrouping {
1115
+ key: string;
1116
+ name: string;
1117
+ orderedIds: string[];
1118
+ rationale: string;
1119
+ phaseIds: string[];
1120
+ productCompletion: string;
1121
+ }
1105
1122
  interface PackingSpec {
1106
1123
  contentBudget: number;
1107
1124
  overheadMinutes: number;
1108
1125
  sessionDurationMinutes: number;
1109
1126
  }
1110
1127
  declare function computePackingSpec(constraints: PlanConstraints): PackingSpec;
1128
+ interface PackedEntry {
1129
+ id: string;
1130
+ minutes: number;
1131
+ part: number;
1132
+ totalParts: number;
1133
+ }
1134
+ interface PackedSession {
1135
+ groupId: string;
1136
+ nodeIds: string[];
1137
+ entries: PackedEntry[];
1138
+ knowledgeMinutes: number;
1139
+ practiceMinutes: number;
1140
+ oversized: boolean;
1141
+ }
1142
+ declare function packUnitSessions(group: UnitGrouping, nodeById: Map<string, PlanningNode>, spec: PackingSpec, warnings: string[]): PackedSession[];
1111
1143
  declare function assignDepths(nodeIds: string[], nodeById: Map<string, PlanningNode>, conceptEncounterMap?: Map<string, number>): CurriculumPlan['sessions'][number]['depth_assignments'];
1112
1144
  /**
1113
1145
  * Bruner's Spiral Curriculum progression tracker across the entire course.
@@ -1176,6 +1208,59 @@ declare function extractSessionSlice(plan: CurriculumPlan, lessonCode: string):
1176
1208
  /** Compact plan-slice context block for LESSON/satellite prompts (activity design inputs). */
1177
1209
  declare function buildSessionSliceContext(plan: CurriculumPlan, lessonCode: string): string;
1178
1210
 
1211
+ /**
1212
+ * P52/T3.2+T3.3 — depth reconcile (plan P52, Gap 3).
1213
+ *
1214
+ * When the bottom-up minute total exceeds the course budget
1215
+ * (total_sessions × contentBudget), the planner historically had only one
1216
+ * way out: stretch time (part-sessions). The reconciler adds the missing
1217
+ * direction: LOWER KNOWLEDGE DEPTH along the Bruner spiral (SIO→CIO→ULO),
1218
+ * never below the ULO floor, never on core concepts (is_core → escalate).
1219
+ *
1220
+ * Pedagogical downgrade priority (least pedagogical loss first):
1221
+ * 1. `advanced` revisits (second pass — review, not first teach)
1222
+ * 2. SIO→CIO on LEAF concepts (no other concept depends on them)
1223
+ * 3. SIO→CIO on non-leaf non-core concepts
1224
+ * 4. CIO→ULO on leaf concepts
1225
+ * 5. CIO→ULO on non-leaf non-core concepts
1226
+ *
1227
+ * After each downgrade round the caller re-runs its fail-closed verifications
1228
+ * (teaching-order audit + ZPD) — the reconciler returns per-node evidence so
1229
+ * that re-audit has the exact change-set, and reports exhausted candidates as
1230
+ * a structured escalation (never a silent phase cut).
1231
+ */
1232
+ interface ReconcileCandidate {
1233
+ nodeId: string;
1234
+ fromDepth: 'ulo' | 'cio' | 'sio';
1235
+ toDepth: 'ulo' | 'cio' | 'sio';
1236
+ minutesSaved: number;
1237
+ reason: string;
1238
+ }
1239
+ interface ReconcileResult {
1240
+ /** true when total fit inside the budget without any downgrade. */
1241
+ unchanged: boolean;
1242
+ /** Applied downgrades in application order (fixed-point evidence). */
1243
+ applied: ReconcileCandidate[];
1244
+ /** Nodes mutated, for targeted re-audit by the caller. */
1245
+ mutatedNodeIds: string[];
1246
+ /** True when candidates were exhausted while still over budget. */
1247
+ escalate: boolean;
1248
+ deficitMinutes: number;
1249
+ }
1250
+ /**
1251
+ * Compute leaf-ness on the CONCEPT level: a concept is a leaf when no other
1252
+ * concept lists it as a prerequisite. Node-level attributes (introduce_aspect
1253
+ * advanced, __ADV ids) map back to their base concept id.
1254
+ */
1255
+ declare function classifyDepthCandidates(nodes: PlanningNode[], edges: DependencyEdge[]): Map<string, boolean>;
1256
+ /**
1257
+ * Apply depth downgrades until total ≤ budget, the candidate pool is empty,
1258
+ * or MAX_ROUNDS is reached (fixed-point with a bounded loop — escalate on
1259
+ * non-convergence). Mutates `nodes` in place (minutes/depth_hint) and returns
1260
+ * the evidence.
1261
+ */
1262
+ declare function reconcilePlanDepth(nodes: PlanningNode[], edges: DependencyEdge[], spec: PackingSpec, budgetMinutes: number): ReconcileResult;
1263
+
1179
1264
  interface ProjectionMeta {
1180
1265
  courseName: string;
1181
1266
  shortDescription?: string;
@@ -1871,4 +1956,4 @@ declare class MisconceptionEvaluator {
1871
1956
  static evaluateQuiz(quiz: DiagnosticQuiz): DimensionScore;
1872
1957
  }
1873
1958
 
1874
- export { AIProviderName, ARTIFACT_DEPENDENCY_ROUTING, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, type ActivityAlignmentResult, ActivityLab, ActivitySeqRow, type ArtifactDependencyRule, type ArtifactProductionSpec, type ArtifactPromptParts, type AssembledTemplate, type AuditBundleInput, BLOOM_ACTION_VERBS, BloomTaxonomyEvaluator, type BuildContextOptions, CURRICULUM_SLASH_COMMANDS, ChunkType, CodeHardwareFeasibilityEvaluator, CodeLab, type ComprehensiveAcademicReport, ConceptPrerequisiteEdge, ConceptSpiralEncounter, ConstructiveAlignmentEvaluator, type ContextInjectionMeta, type ContextRoutingMode, type ContextSourceKey, CoverageGateReport, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_OVERHEAD_RATIO, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DependencyEdge, type DependencyValidationResult, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, ENVIRONMENT_PROVISIONING_MODELS, EXPOSITION_REL, type EnvironmentProvisioningModel, type ExcerptOptions, type ExcerptResult, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type ExtractedJson, type ExtractedStreamChunk, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, type GenerateExpositionOptions, GeneratedSlideArraySchema, GeneratedSlideSchema, HybridBlueprintArraySchema, HybridBlueprintItemSchema, HybridDeckSlideArraySchema, HybridDeckSlideSchema, HybridPipelineError, ICurriculumStorage, JUDGE_AUTO_APPROVE_THRESHOLD, JUDGE_ESCALATE_THRESHOLD, LAYER_IDLE_BUDGET_MS, LAYER_TOTAL_BUDGET_MS, type LayerChunkCallback, type LayerPrefillOptions, type LayerPrefillResult, type LessonEntity, LessonEntitySchema, LessonPlan, MAX_AUTONOMOUS_REPAIR_TURNS, MAX_IN_SESSION_SETUP_MINUTES, MAX_NEW_CONCEPTS_PER_SESSION_ADULT, MAX_NEW_CONCEPTS_PER_SESSION_K12, MasteryGate, MisconceptionEvaluator, ModelResolutionOptions, type PackingSpec, type PedagogicalModel, type PipelineExecutionProgress, PlanConstraints, type PlanOptions, type PlanResult, type PlannerLlmFn, PlanningGraph, PlanningNode, type PrefillProviderEvent, type PreliminaryResearchResult, PrerequisiteDecision, type ProduceLessonOptions, type ProduceLessonResult, type ProjectBriefingData, type ProjectClarification, type ProjectCreationPayload, type ProjectIntentAnalysisResult, ProjectStatusReport, type ProjectionMeta, QualityAuditReport, ResolvedGateSettings, type ResolvedTemplate, SATELLITE_LESSON_PRIORITIES, STUDENT_FRICTION_MULTIPLIER, type SatContextResult, type SatelliteContextInput, SessionZpdStatus, type SlashCommandDefinition, SlideBlueprintArraySchema, SlideBlueprintItemSchema, SlideDeck, type SlideEngine, type SlideProductionWorkflowOptions, type SlideProductionWorkflowResult, SmartResumeContext, type StreamAbortHandle, type StreamBudget, type StreamChunkExtractor, StreamRunnerOptions, type SymbolLedgerResult, type TemplateTranslateRunner, TranslationPolicy, type TranslationTarget, type TranslationTrigger, UnitPlan, type ValidationOptions, WalkingSkeleton, analyzeProjectCreationIntent, assembleTranslatedTemplate, assertAcyclic, assignDepths, auditQualityReport, buildArtifactPrompt, buildConceptPrerequisites, buildCurriculumContext, buildCurriculumPlan, buildDomainLexiconGuardrail, buildExpositionContext, buildExpositionExcerpt, buildHeadingDirective, buildLanguageDirective, buildLessonEntityJson, buildLessonExcerpt, buildMasteryGates, buildSatelliteContext, buildSectionAwareExcerpt, buildSessionSliceContext, buildWalkingSkeleton, checkSessionZpd, closeTruncatedJson, computeConceptSpiralProgression, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createContextMissingError, createStreamAbortSignal, createStreamChunkExtractor, detectProjectPedagogy, dropCyclicConceptEdges, emitUsage, ensureExpositionForLesson, ensureKnowledgeExposition, entityRowAssignedTo, evaluateActivityAlignment, executeCurriculumCommand, executeSlideProductionWorkflow, expositionCacheKey, extractActivityContractRows, extractAssessmentMap, extractConditionalSections, extractDeclaredLanguage, extractEchoSections, extractJsonArray, extractRequiredSections, extractScopeSequenceRows, extractSectionHeadings, extractSessionSlice, extractStreamChunk, extractSymbolLedger, extractTieredScaffoldingBlock, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isActivityAlignmentLogOnly, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadAuthoringTemplate, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderAssignedRowsTable, renderEntitySlotsForType, renderFrameworkFromPlan, resolveArtifactTemplate, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, stripHeadingKey, stripLlmJsonWrappers, stripTemplateFrontmatter, targetLanguageDisplayName, topoSort, translateTemplate, validateArtifactDependencies, validateHybridDeckSlides };
1959
+ export { AIProviderName, ARTIFACT_DEPENDENCY_ROUTING, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, type ActivityAlignmentResult, ActivityLab, ActivitySeqRow, type ArtifactDependencyRule, type ArtifactProductionSpec, type ArtifactPromptParts, type AssembledTemplate, type AuditBundleInput, BLOOM_ACTION_VERBS, BloomTaxonomyEvaluator, type BuildContextOptions, CURRICULUM_SLASH_COMMANDS, ChunkType, CodeHardwareFeasibilityEvaluator, CodeLab, type ComprehensiveAcademicReport, ConceptPrerequisiteEdge, ConceptSpiralEncounter, ConstructiveAlignmentEvaluator, type ContextInjectionMeta, type ContextRoutingMode, type ContextSourceKey, CoverageGateReport, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_OVERHEAD_RATIO, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DependencyEdge, type DependencyValidationResult, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, ENVIRONMENT_PROVISIONING_MODELS, EXPOSITION_REL, type EnvironmentProvisioningModel, type ExcerptOptions, type ExcerptResult, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type ExtractedJson, type ExtractedStreamChunk, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, type GenerateExpositionOptions, GeneratedSlideArraySchema, GeneratedSlideSchema, HybridBlueprintArraySchema, HybridBlueprintItemSchema, HybridDeckSlideArraySchema, HybridDeckSlideSchema, HybridPipelineError, ICurriculumStorage, JUDGE_AUTO_APPROVE_THRESHOLD, JUDGE_ESCALATE_THRESHOLD, LAYER_IDLE_BUDGET_MS, LAYER_TOTAL_BUDGET_MS, type LayerChunkCallback, type LayerPrefillOptions, type LayerPrefillResult, type LessonEntity, LessonEntitySchema, LessonPlan, MAX_AUTONOMOUS_REPAIR_TURNS, MAX_IN_SESSION_SETUP_MINUTES, MAX_NEW_CONCEPTS_PER_SESSION_ADULT, MAX_NEW_CONCEPTS_PER_SESSION_K12, MasteryGate, MisconceptionEvaluator, ModelResolutionOptions, type PackingSpec, type PedagogicalModel, type PipelineExecutionProgress, PlanConstraints, type PlanOptions, type PlanResult, type PlannerLlmFn, PlanningGraph, PlanningNode, type PrefillProviderEvent, type PreliminaryResearchResult, PrerequisiteDecision, type ProduceLessonOptions, type ProduceLessonResult, type ProjectBriefingData, type ProjectClarification, type ProjectCreationPayload, type ProjectIntentAnalysisResult, ProjectStatusReport, type ProjectionMeta, QualityAuditReport, type ReconcileCandidate, type ReconcileResult, ResolvedGateSettings, type ResolvedTemplate, SATELLITE_LESSON_PRIORITIES, SESSION_CUT_TOLERANCE, STUDENT_FRICTION_MULTIPLIER, type SatContextResult, type SatelliteContextInput, SessionZpdStatus, type SlashCommandDefinition, SlideBlueprintArraySchema, SlideBlueprintItemSchema, SlideDeck, type SlideEngine, type SlideProductionWorkflowOptions, type SlideProductionWorkflowResult, SmartResumeContext, type StreamAbortHandle, type StreamBudget, type StreamChunkExtractor, StreamRunnerOptions, type SymbolLedgerResult, type TemplateTranslateRunner, TranslationPolicy, type TranslationTarget, type TranslationTrigger, UnitPlan, type ValidationOptions, WalkingSkeleton, analyzeProjectCreationIntent, assembleTranslatedTemplate, assertAcyclic, assignDepths, auditQualityReport, buildArtifactPrompt, buildConceptPrerequisites, buildCurriculumContext, buildCurriculumPlan, buildDomainLexiconGuardrail, buildExpositionContext, buildExpositionExcerpt, buildHeadingDirective, buildLanguageDirective, buildLessonEntityJson, buildLessonExcerpt, buildMasteryGates, buildSatelliteContext, buildSectionAwareExcerpt, buildSessionSliceContext, buildWalkingSkeleton, checkSessionZpd, classifyDepthCandidates, closeTruncatedJson, computeConceptSpiralProgression, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createContextMissingError, createStreamAbortSignal, createStreamChunkExtractor, detectProjectPedagogy, dropCyclicConceptEdges, emitUsage, ensureExpositionForLesson, ensureKnowledgeExposition, entityRowAssignedTo, evaluateActivityAlignment, executeCurriculumCommand, executeSlideProductionWorkflow, expositionCacheKey, extractActivityContractRows, extractAssessmentMap, extractConditionalSections, extractDeclaredLanguage, extractEchoSections, extractJsonArray, extractRequiredSections, extractScopeSequenceRows, extractSectionHeadings, extractSessionSlice, extractStreamChunk, extractSymbolLedger, extractTieredScaffoldingBlock, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isActivityAlignmentLogOnly, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadAuthoringTemplate, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, packUnitSessions, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, reconcilePlanDepth, renderAssignedRowsTable, renderEntitySlotsForType, renderFrameworkFromPlan, resolveArtifactTemplate, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, stripHeadingKey, stripLlmJsonWrappers, stripTemplateFrontmatter, targetLanguageDisplayName, topoSort, translateTemplate, validateArtifactDependencies, validateHybridDeckSlides };