@thanh01.pmt/curriculum-kit 1.4.37 → 1.4.39

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.
@@ -1128,6 +1128,12 @@ var init_provider_factory = __esm({
1128
1128
  }
1129
1129
  });
1130
1130
 
1131
+ // src/parsers/lessonFlowParser.ts
1132
+ var init_lessonFlowParser = __esm({
1133
+ "src/parsers/lessonFlowParser.ts"() {
1134
+ }
1135
+ });
1136
+
1131
1137
  // src/ai/flows/generateLessonMasterFlow.ts
1132
1138
  init_provider_factory();
1133
1139
  var LearningObjectiveRowSchema = z.object({
@@ -1650,11 +1656,51 @@ var ExtensionSchema = z.object({
1650
1656
  });
1651
1657
  var QualityAuditVerdictSchema = z.enum(["PASS", "NEEDS_REVISION", "FAIL"]);
1652
1658
  var JudgeCriterionSchema = z.object({
1653
- name: z.string().describe("Criterion name, e.g. Bloom Alignment, Code Validity, Word Count Gate, Language Adherence"),
1659
+ name: z.string().describe("Criterion name, e.g. Bloom Alignment, Code Validity, Word Count Gate, Language Adherence, Step Incrementality"),
1654
1660
  passed: z.boolean(),
1655
1661
  score: z.number().min(0).max(100).describe("Score out of 100"),
1656
1662
  feedback: z.string().describe("Constructive feedback or citation of issues")
1657
1663
  });
1664
+ var ActionableRepairActionSchema = z.enum([
1665
+ "SPLIT_STEP",
1666
+ "REVISE_PROVISIONING",
1667
+ "INSERT_RECAP",
1668
+ "ADJUST_TIME_BUDGET",
1669
+ "SUBSTITUTE_FALLBACK",
1670
+ "REVISE_EXIT_EVIDENCE"
1671
+ ]);
1672
+ var ActionableRepairPromptSchema = z.object({
1673
+ action: ActionableRepairActionSchema,
1674
+ targetId: z.string().describe("ID of the session, feature, or step requiring repair, e.g. U01_M01_L02 or F1-S3"),
1675
+ severity: z.enum(["CRITICAL", "WARNING", "INFO"]).default("WARNING"),
1676
+ rationale: z.string().describe("Pedagogical or technical rationale for why this repair is mandated"),
1677
+ instruction: z.string().describe("Exact, actionable text instruction for the planner/generator in the next turn")
1678
+ });
1679
+ z.object({
1680
+ schema_version: z.number().default(1),
1681
+ projectId: z.string(),
1682
+ overallVerdict: QualityAuditVerdictSchema,
1683
+ totalScore: z.number().min(0).max(100),
1684
+ toolchainFeasibility: JudgeCriterionSchema.describe("Installation friction, admin rights, IDE/compiler matrix"),
1685
+ provisioningStrategy: JudgeCriterionSchema.describe("Clear model for heavy runtimes: Pre-installed lab, Cloud instance, or Dedicated setup"),
1686
+ hardwareRuntimeEnvelope: JudgeCriterionSchema.describe("Memory/Flash limits, pinout conflicts, hardware platform alignment"),
1687
+ timeToHelloWorld: JudgeCriterionSchema.describe("Student time to achieve first working feedback loop (target <= 15 mins)"),
1688
+ actionableRepairs: z.array(ActionableRepairPromptSchema).default([])
1689
+ });
1690
+ z.object({
1691
+ schema_version: z.number().default(1),
1692
+ planHash: z.string(),
1693
+ overallVerdict: QualityAuditVerdictSchema,
1694
+ totalScore: z.number().min(0).max(100),
1695
+ autoApproved: z.boolean().default(false).describe("True if totalScore >= 85 and overallVerdict is PASS"),
1696
+ stepIncrementality: JudgeCriterionSchema.describe("Single leap principle: <= 1 new syntax or 1 new algorithm per step"),
1697
+ zpdSaturation: JudgeCriterionSchema.describe("Vygotsky ZPD: <= 2 new concepts per session (K-12) / 3 (Adults), with prior anchor"),
1698
+ frictionAdjustedBudget: JudgeCriterionSchema.describe("Student time multiplier (2.5x): total content <= 85% session minutes"),
1699
+ epitomeViability: JudgeCriterionSchema.describe("Reigeluth Walking Skeleton: Unit 1 produces an end-to-end runnable MVP"),
1700
+ exitEvidenceSpecificity: JudgeCriterionSchema.describe("Tangible, measurable student deliverable for every session"),
1701
+ actionableRepairs: z.array(ActionableRepairPromptSchema).default([]),
1702
+ summary: z.string().describe("High-level executive evaluation summary")
1703
+ });
1658
1704
  var CurriculumQualityReportSchema = z.object({
1659
1705
  targetArtifactType: z.string().describe("Type of artifact audited, e.g. LESSON, ACT, CODE, WKS, SLIDE"),
1660
1706
  lessonId: z.string(),
@@ -1662,7 +1708,8 @@ var CurriculumQualityReportSchema = z.object({
1662
1708
  totalScore: z.number().min(0).max(100),
1663
1709
  languageAdherencePassed: z.boolean().describe("True if content strictly matches the requested target language"),
1664
1710
  criteria: z.array(JudgeCriterionSchema).min(3),
1665
- actionableRepairPrompts: z.array(z.string()).default([]).describe("Concrete instruction prompts to fix detected issues in the next repair turn")
1711
+ actionableRepairPrompts: z.array(z.string()).default([]).describe("Concrete instruction prompts to fix detected issues in the next repair turn"),
1712
+ structuredRepairs: z.array(ActionableRepairPromptSchema).optional()
1666
1713
  });
1667
1714
  var ProjectProfileSchema = z.object({
1668
1715
  id: z.string().optional(),
@@ -19717,6 +19764,20 @@ function buildDomainLexiconGuardrail(techStack, hardwarePlatform) {
19717
19764
  }
19718
19765
  init_errors();
19719
19766
 
19767
+ // src/parsers/lessonEntity.ts
19768
+ init_lessonFlowParser();
19769
+ z.object({
19770
+ lessonId: z.string(),
19771
+ title: z.string(),
19772
+ pedagogyModel: z.string().default("5e"),
19773
+ estimatedDuration: z.string().default(""),
19774
+ learningObjectives: z.array(LearningObjectiveRowSchema).default([]),
19775
+ activitySequence: z.array(ActivitySeqRowSchema).default([]),
19776
+ /** Header→cell rows straight from the A4 Assessment Map table (headers vary by template). */
19777
+ assessmentMap: z.array(z.record(z.string())).default([]),
19778
+ tieredScaffolding: z.object({ bronze: z.string().default(""), silver: z.string().default(""), gold: z.string().default("") }).default({ bronze: "", silver: "", gold: "" })
19779
+ });
19780
+
19720
19781
  // src/services/lessonProductionService.ts
19721
19782
  var __filename$1 = typeof import.meta?.url === "string" && typeof fileURLToPath === "function" ? fileURLToPath(import.meta.url) : "";
19722
19783
  var _resolvedDir = __filename$1 ? path4.dirname(__filename$1) : typeof __dirname !== "undefined" ? __dirname : process.cwd();