@thanh01.pmt/curriculum-kit 1.4.34 → 1.4.36
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/LICENSE +21 -0
- package/dist/ai/index.cjs +57 -1
- package/dist/ai/index.cjs.map +1 -1
- package/dist/ai/index.d.cts +2 -2
- package/dist/ai/index.d.ts +2 -2
- package/dist/ai/index.mjs +57 -1
- package/dist/ai/index.mjs.map +1 -1
- package/dist/{gateSettings-DabOqP6_.d.cts → gateSettings-oo5tCUS_.d.cts} +18 -0
- package/dist/{gateSettings-DabOqP6_.d.ts → gateSettings-oo5tCUS_.d.ts} +18 -0
- package/dist/index.cjs +764 -70
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +234 -74
- package/dist/index.d.ts +234 -74
- package/dist/index.mjs +748 -71
- package/dist/index.mjs.map +1 -1
- package/dist/pipeline/index.cjs +57 -1
- package/dist/pipeline/index.cjs.map +1 -1
- package/dist/pipeline/index.mjs +57 -1
- package/dist/pipeline/index.mjs.map +1 -1
- package/dist/schemas/index.cjs +63 -1
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +436 -33
- package/dist/schemas/index.d.ts +436 -33
- package/dist/schemas/index.mjs +58 -2
- package/dist/schemas/index.mjs.map +1 -1
- package/dist/standards/index.d.cts +2 -2
- package/dist/standards/index.d.ts +2 -2
- package/dist/workflow/index.cjs +84 -2
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.d.cts +3 -3
- package/dist/workflow/index.d.ts +3 -3
- package/dist/workflow/index.mjs +84 -2
- package/dist/workflow/index.mjs.map +1 -1
- package/package.json +22 -23
- package/dist/{standardsCoverageGate-DR5YTtlt.d.cts → standardsCoverageGate-49pJq5t8.d.cts} +6 -6
- package/dist/{standardsCoverageGate-DR5YTtlt.d.ts → standardsCoverageGate-49pJq5t8.d.ts} +6 -6
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { MilestoneInput, LessonPlan, CurriculumQualityReport, ActivityLab, CodeLab, SelfLab, DiagnosticQuiz, SlideDeck, Handout, Worksheet, TeacherGuide, Extension, ProjectRoadmap } from '../schemas/index.cjs';
|
|
2
2
|
import { M as ModelResolutionOptions } from '../provider-factory-Bv-eIkhg.cjs';
|
|
3
3
|
import { G as GitPublishOptions, a as GitPublishResult, S as SupabasePublishOptions, b as SupabasePublishResult } from '../supabasePublisher-C627qXFT.cjs';
|
|
4
|
-
import { S as SingleArtifactRequest, a as SingleArtifactResult } from '../gateSettings-
|
|
5
|
-
export { b as CurriculumArtifactType, C as CurriculumGateMode, D as DEFAULT_GATE_SETTINGS, G as GateSettings, R as ResolvedGateSettings, g as gateModeFor, p as parseGateSettings, r as resolveGateSettings } from '../gateSettings-
|
|
4
|
+
import { S as SingleArtifactRequest, a as SingleArtifactResult } from '../gateSettings-oo5tCUS_.cjs';
|
|
5
|
+
export { b as CurriculumArtifactType, C as CurriculumGateMode, D as DEFAULT_GATE_SETTINGS, G as GateSettings, R as ResolvedGateSettings, g as gateModeFor, p as parseGateSettings, r as resolveGateSettings } from '../gateSettings-oo5tCUS_.cjs';
|
|
6
6
|
import * as workflow from 'workflow';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { F as FrameworkPack, C as CoverageGateReport } from '../standardsCoverageGate-
|
|
8
|
+
import { F as FrameworkPack, C as CoverageGateReport } from '../standardsCoverageGate-49pJq5t8.cjs';
|
|
9
9
|
import 'ai';
|
|
10
10
|
|
|
11
11
|
interface GenerateMasterLessonStepInput {
|
package/dist/workflow/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { MilestoneInput, LessonPlan, CurriculumQualityReport, ActivityLab, CodeLab, SelfLab, DiagnosticQuiz, SlideDeck, Handout, Worksheet, TeacherGuide, Extension, ProjectRoadmap } from '../schemas/index.js';
|
|
2
2
|
import { M as ModelResolutionOptions } from '../provider-factory-Bv-eIkhg.js';
|
|
3
3
|
import { G as GitPublishOptions, a as GitPublishResult, S as SupabasePublishOptions, b as SupabasePublishResult } from '../supabasePublisher-C627qXFT.js';
|
|
4
|
-
import { S as SingleArtifactRequest, a as SingleArtifactResult } from '../gateSettings-
|
|
5
|
-
export { b as CurriculumArtifactType, C as CurriculumGateMode, D as DEFAULT_GATE_SETTINGS, G as GateSettings, R as ResolvedGateSettings, g as gateModeFor, p as parseGateSettings, r as resolveGateSettings } from '../gateSettings-
|
|
4
|
+
import { S as SingleArtifactRequest, a as SingleArtifactResult } from '../gateSettings-oo5tCUS_.js';
|
|
5
|
+
export { b as CurriculumArtifactType, C as CurriculumGateMode, D as DEFAULT_GATE_SETTINGS, G as GateSettings, R as ResolvedGateSettings, g as gateModeFor, p as parseGateSettings, r as resolveGateSettings } from '../gateSettings-oo5tCUS_.js';
|
|
6
6
|
import * as workflow from 'workflow';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { F as FrameworkPack, C as CoverageGateReport } from '../standardsCoverageGate-
|
|
8
|
+
import { F as FrameworkPack, C as CoverageGateReport } from '../standardsCoverageGate-49pJq5t8.js';
|
|
9
9
|
import 'ai';
|
|
10
10
|
|
|
11
11
|
interface GenerateMasterLessonStepInput {
|
package/dist/workflow/index.mjs
CHANGED
|
@@ -2385,6 +2385,50 @@ var ScaffoldDecisionEntrySchema = z.object({
|
|
|
2385
2385
|
minutes_saved: z.number().int().nonnegative().default(0),
|
|
2386
2386
|
reason: z.string().min(3)
|
|
2387
2387
|
});
|
|
2388
|
+
var ZpdVerdictSchema = z.enum(["OK", "TOO_MANY_NEW", "NO_ZPD_BRIDGE"]);
|
|
2389
|
+
var SessionZpdStatusSchema = z.object({
|
|
2390
|
+
verdict: ZpdVerdictSchema,
|
|
2391
|
+
new_concept_count: z.number().int().nonnegative().default(0),
|
|
2392
|
+
known_concept_count: z.number().int().nonnegative().default(0),
|
|
2393
|
+
issues: z.array(z.string()).default([])
|
|
2394
|
+
});
|
|
2395
|
+
var ConceptSpiralEncounterSchema = z.object({
|
|
2396
|
+
concept_code: z.string(),
|
|
2397
|
+
session_id: LessonCodeSchema,
|
|
2398
|
+
encounter_index: z.number().int().positive(),
|
|
2399
|
+
bloom_cap: BloomLevelSchema,
|
|
2400
|
+
depth: DepthLevelSchema
|
|
2401
|
+
});
|
|
2402
|
+
var WalkingSkeletonSchema = z.object({
|
|
2403
|
+
epitome_unit_id: z.string().default("U01"),
|
|
2404
|
+
epitome_deliverables: z.array(z.string()).default([]),
|
|
2405
|
+
elaborations: z.array(z.object({
|
|
2406
|
+
unit_id: z.string(),
|
|
2407
|
+
focus_area: z.string(),
|
|
2408
|
+
elaborates_on: z.array(z.string()).default([])
|
|
2409
|
+
})).default([])
|
|
2410
|
+
});
|
|
2411
|
+
var MasteryGateSchema = z.object({
|
|
2412
|
+
phase_or_unit_id: z.string(),
|
|
2413
|
+
gate_name: z.string(),
|
|
2414
|
+
exit_criteria: z.array(z.string()).min(1),
|
|
2415
|
+
next_unit_id: z.string(),
|
|
2416
|
+
remediation: z.object({
|
|
2417
|
+
trigger: z.literal("FAIL_GATE_CRITERIA"),
|
|
2418
|
+
focus_minutes: z.number().int().default(15),
|
|
2419
|
+
action: z.string()
|
|
2420
|
+
})
|
|
2421
|
+
});
|
|
2422
|
+
var ConceptPrerequisiteEdgeSchema = z.object({
|
|
2423
|
+
concept_code: z.string(),
|
|
2424
|
+
requires: z.string(),
|
|
2425
|
+
source: z.enum(["MASTER_TREE", "INFERRED", "CONCEPT_LEVEL_PREREQ"]).default("CONCEPT_LEVEL_PREREQ"),
|
|
2426
|
+
confidence: z.number().min(0).max(1).default(0.8),
|
|
2427
|
+
rationale: z.string().default(""),
|
|
2428
|
+
structure_supported: z.boolean().default(true),
|
|
2429
|
+
needs_review: z.boolean().default(false),
|
|
2430
|
+
hub: z.boolean().default(false)
|
|
2431
|
+
});
|
|
2388
2432
|
var SessionPlanSchema = z.object({
|
|
2389
2433
|
id: LessonCodeSchema,
|
|
2390
2434
|
unit_id: z.string().regex(/^U\d{2}$/),
|
|
@@ -2405,7 +2449,14 @@ var SessionPlanSchema = z.object({
|
|
|
2405
2449
|
scaffold_decisions: z.array(ScaffoldDecisionEntrySchema).default([]),
|
|
2406
2450
|
// What the student can demonstrate after this session — feeds exit tickets.
|
|
2407
2451
|
exit_evidence: z.array(z.string()).min(1),
|
|
2408
|
-
differentiation: z.object({ bronze: z.string(), silver: z.string(), gold: z.string() })
|
|
2452
|
+
differentiation: z.object({ bronze: z.string(), silver: z.string(), gold: z.string() }),
|
|
2453
|
+
// P50: ZPD cognitive load status for this session
|
|
2454
|
+
zpd_status: SessionZpdStatusSchema.default({
|
|
2455
|
+
verdict: "OK",
|
|
2456
|
+
new_concept_count: 0,
|
|
2457
|
+
known_concept_count: 0,
|
|
2458
|
+
issues: []
|
|
2459
|
+
})
|
|
2409
2460
|
});
|
|
2410
2461
|
var TranslationPolicySchema = z.object({
|
|
2411
2462
|
policy: z.enum(["after_artifact", "end_of_unit", "at_publish", "native"]).default("native"),
|
|
@@ -2460,6 +2511,11 @@ z.object({
|
|
|
2460
2511
|
// [2]
|
|
2461
2512
|
sessions: z.array(SessionPlanSchema).min(1),
|
|
2462
2513
|
// [3][4][5][6]
|
|
2514
|
+
// P50: Macro-pedagogical course structures
|
|
2515
|
+
walking_skeleton: WalkingSkeletonSchema.optional(),
|
|
2516
|
+
mastery_gates: z.array(MasteryGateSchema).default([]),
|
|
2517
|
+
concept_spiral_progression: z.array(ConceptSpiralEncounterSchema).default([]),
|
|
2518
|
+
concept_prerequisites: z.array(ConceptPrerequisiteEdgeSchema).default([]),
|
|
2463
2519
|
glossary_scope: z.array(z.object({
|
|
2464
2520
|
session_id: LessonCodeSchema,
|
|
2465
2521
|
terms: z.array(z.string())
|
|
@@ -19045,7 +19101,8 @@ function parseAllSessions(plan, frameworkMarkdown) {
|
|
|
19045
19101
|
prose_objective: s.prose_objective || s.objective || "",
|
|
19046
19102
|
new_keywords: Array.isArray(s.new_keywords) ? s.new_keywords : Array.isArray(s.keywords) ? s.keywords : [],
|
|
19047
19103
|
prerequisite_keywords: Array.isArray(s.prerequisite_keywords) ? s.prerequisite_keywords : [],
|
|
19048
|
-
depth_assignments: Array.isArray(s.depth_assignments) ? s.depth_assignments : []
|
|
19104
|
+
depth_assignments: Array.isArray(s.depth_assignments) ? s.depth_assignments : [],
|
|
19105
|
+
zpd_status: s.zpd_status
|
|
19049
19106
|
}));
|
|
19050
19107
|
}
|
|
19051
19108
|
}
|
|
@@ -19193,12 +19250,16 @@ async function extractCurriculumHorizon(opts) {
|
|
|
19193
19250
|
title: s.title,
|
|
19194
19251
|
keywords: s.new_keywords || []
|
|
19195
19252
|
}));
|
|
19253
|
+
const rawSpirals = Array.isArray(plan?.concept_spiral_progression) ? plan.concept_spiral_progression : [];
|
|
19254
|
+
const sessionSpirals = rawSpirals.filter((e) => e.session_id === targetLessonId);
|
|
19196
19255
|
return {
|
|
19197
19256
|
targetLessonId,
|
|
19198
19257
|
targetLessonIndex: targetIndex + 1,
|
|
19199
19258
|
totalLessons: sessions.length,
|
|
19200
19259
|
targetTitle: currentSession.title,
|
|
19201
19260
|
targetKeywords: currentSession.new_keywords || [],
|
|
19261
|
+
zpdStatus: currentSession.zpd_status,
|
|
19262
|
+
spiralProgression: sessionSpirals,
|
|
19202
19263
|
compactMasterySet: {
|
|
19203
19264
|
masteredKeywords,
|
|
19204
19265
|
masteredConcepts
|
|
@@ -19214,6 +19275,8 @@ function renderHorizonPromptBlock(horizon) {
|
|
|
19214
19275
|
totalLessons,
|
|
19215
19276
|
targetTitle,
|
|
19216
19277
|
targetKeywords,
|
|
19278
|
+
zpdStatus,
|
|
19279
|
+
spiralProgression,
|
|
19217
19280
|
compactMasterySet,
|
|
19218
19281
|
detailedBridge,
|
|
19219
19282
|
boundaryPeek
|
|
@@ -19221,6 +19284,19 @@ function renderHorizonPromptBlock(horizon) {
|
|
|
19221
19284
|
const lines = [
|
|
19222
19285
|
`# \u{1F9ED} CURRICULUM HORIZON & SCAFFOLDING MATRIX (Lesson ${targetLessonIndex}/${totalLessons}: "${targetTitle}" [${targetLessonId}])`
|
|
19223
19286
|
];
|
|
19287
|
+
if (zpdStatus && zpdStatus.verdict !== "OK") {
|
|
19288
|
+
lines.push(
|
|
19289
|
+
`
|
|
19290
|
+
> \u26A0\uFE0F **ZPD COGNITIVE LOAD ALERT (${zpdStatus.verdict}):** ${zpdStatus.issues?.join("; ") || "Scaffolding bridge mandated"}. Introduce minimal new syntax and anchor into known concepts.`
|
|
19291
|
+
);
|
|
19292
|
+
}
|
|
19293
|
+
if (spiralProgression && spiralProgression.length > 0) {
|
|
19294
|
+
const spiralNotes = spiralProgression.map(
|
|
19295
|
+
(sp) => `\`${sp.concept_code}\` (Encounter #${sp.encounter_index}): Bloom Cap [${sp.bloom_cap}], Depth [${sp.depth.toUpperCase()}]`
|
|
19296
|
+
);
|
|
19297
|
+
lines.push(`
|
|
19298
|
+
- **\u{1F300} Bruner Spiral Curricula Guidance:** ${spiralNotes.join(" | ")}`);
|
|
19299
|
+
}
|
|
19224
19300
|
if (compactMasterySet.masteredKeywords.length > 0 || compactMasterySet.masteredConcepts.length > 0) {
|
|
19225
19301
|
const rawKeywords = compactMasterySet.masteredKeywords;
|
|
19226
19302
|
const displayedKeywords = rawKeywords.length > 20 ? rawKeywords.slice(-20) : rawKeywords;
|
|
@@ -19556,6 +19632,12 @@ function findCanonicalFuzzy(norm) {
|
|
|
19556
19632
|
if (norm.includes("worked example") || norm.includes("vi du")) {
|
|
19557
19633
|
return "Worked Micro-Examples";
|
|
19558
19634
|
}
|
|
19635
|
+
if (norm.includes("common mistake") || norm.includes("loi thuong gap") || norm.includes("sai lam") || norm.includes("pitfall")) {
|
|
19636
|
+
return "Common Mistakes";
|
|
19637
|
+
}
|
|
19638
|
+
if (norm.includes("self check") || norm.includes("self-check") || norm.includes("tu kiem tra")) {
|
|
19639
|
+
return "Self-Check Questions";
|
|
19640
|
+
}
|
|
19559
19641
|
return void 0;
|
|
19560
19642
|
}
|
|
19561
19643
|
function truncateByBudget(source, budget) {
|