@thanh01.pmt/curriculum-kit 1.4.38 → 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.
- package/dist/ai/index.cjs +194 -2
- package/dist/ai/index.cjs.map +1 -1
- package/dist/ai/index.d.cts +39 -2
- package/dist/ai/index.d.ts +39 -2
- package/dist/ai/index.mjs +191 -3
- package/dist/ai/index.mjs.map +1 -1
- package/dist/index.cjs +326 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -3
- package/dist/index.d.ts +59 -3
- package/dist/index.mjs +310 -3
- package/dist/index.mjs.map +1 -1
- package/dist/pipeline/index.cjs +43 -2
- package/dist/pipeline/index.cjs.map +1 -1
- package/dist/pipeline/index.mjs +43 -2
- package/dist/pipeline/index.mjs.map +1 -1
- package/dist/schemas/index.cjs +47 -2
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +473 -44
- package/dist/schemas/index.d.ts +473 -44
- package/dist/schemas/index.mjs +44 -3
- package/dist/schemas/index.mjs.map +1 -1
- package/dist/workflow/index.cjs +43 -2
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.mjs +43 -2
- package/dist/workflow/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/ai/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { M as ModelResolutionOptions } from '../provider-factory-Bv-eIkhg.cjs';
|
|
2
2
|
export { A as AIProviderName, N as NVIDIA_MODELS, g as getAIModel } from '../provider-factory-Bv-eIkhg.cjs';
|
|
3
|
-
import { MilestoneInput, LessonPlan, ActivityLab, ProjectGraph, CodeLab, Worksheet, Handout, SlideDeck, TeacherGuide, Extension, CurriculumQualityReport, ProjectInstruction, SelfLab, DiagnosticQuiz } from '../schemas/index.cjs';
|
|
3
|
+
import { MilestoneInput, LessonPlan, ActivityLab, ProjectGraph, CodeLab, Worksheet, Handout, SlideDeck, TeacherGuide, Extension, CurriculumQualityReport, MacroPedagogyPlanAuditReport, ProjectGraphAuditReport, ProjectInstruction, SelfLab, DiagnosticQuiz } from '../schemas/index.cjs';
|
|
4
4
|
import * as ai from 'ai';
|
|
5
5
|
import { a as ChatMessage, S as StreamRunnerOptions, n as ToolLoopConfig, C as ChunkType } from '../streamRunner-BzlJrAGZ.cjs';
|
|
6
6
|
export { A as AggregatedToolCall, D as DEFAULT_ARTIFACT_STREAM_IDLE_MS, d as DEFAULT_ARTIFACT_STREAM_TOTAL_MS, F as FallbackTarget, I as IdleAbort, f as StreamAbortController, T as ToolDefinition, l as ToolExecutionResult, m as ToolExecutor, j as createIdleAbortController, h as createStreamAbortController, e as extractThoughtAndContent, g as getDesignatedFallbackChain, c as getDesignatedFallbackConfig, b as isModelAllowed, i as isProviderEnabled, r as resolveApiKey, k as runCurriculumAIInference, s as streamCurriculumAIInference } from '../streamRunner-BzlJrAGZ.cjs';
|
|
@@ -105,6 +105,35 @@ interface JudgePromptInput {
|
|
|
105
105
|
standardStatements?: Record<string, string>;
|
|
106
106
|
}
|
|
107
107
|
declare function buildJudgePrompt(input: JudgePromptInput): string;
|
|
108
|
+
/**
|
|
109
|
+
* Stage 2: Macro-Pedagogy Curriculum Plan Judge Prompt
|
|
110
|
+
*/
|
|
111
|
+
interface CurriculumPlanJudgePromptInput {
|
|
112
|
+
planJson: string;
|
|
113
|
+
briefingContext: string;
|
|
114
|
+
expectedLanguage?: string;
|
|
115
|
+
linterFindings?: Array<{
|
|
116
|
+
id: string;
|
|
117
|
+
severity: string;
|
|
118
|
+
title: string;
|
|
119
|
+
description: string;
|
|
120
|
+
}>;
|
|
121
|
+
}
|
|
122
|
+
declare function buildCurriculumPlanJudgePrompt(input: CurriculumPlanJudgePromptInput): string;
|
|
123
|
+
/**
|
|
124
|
+
* Stage 1: Project Graph Toolchain & Environment Provisioning Judge Prompt
|
|
125
|
+
*/
|
|
126
|
+
interface ProjectGraphJudgePromptInput {
|
|
127
|
+
bundleJson: string;
|
|
128
|
+
briefingContext: string;
|
|
129
|
+
linterFindings?: Array<{
|
|
130
|
+
id: string;
|
|
131
|
+
severity: string;
|
|
132
|
+
title: string;
|
|
133
|
+
description: string;
|
|
134
|
+
}>;
|
|
135
|
+
}
|
|
136
|
+
declare function buildProjectGraphJudgePrompt(input: ProjectGraphJudgePromptInput): string;
|
|
108
137
|
|
|
109
138
|
interface ProjectInstructionPromptInput {
|
|
110
139
|
projectGraph?: ProjectGraph;
|
|
@@ -193,6 +222,14 @@ interface AuditCurriculumQualityInput extends JudgePromptInput {
|
|
|
193
222
|
modelOptions?: ModelResolutionOptions;
|
|
194
223
|
}
|
|
195
224
|
declare function auditCurriculumQualityFlow(input: AuditCurriculumQualityInput): Promise<CurriculumQualityReport>;
|
|
225
|
+
interface AuditCurriculumPlanInput extends CurriculumPlanJudgePromptInput {
|
|
226
|
+
modelOptions?: ModelResolutionOptions;
|
|
227
|
+
}
|
|
228
|
+
declare function auditCurriculumPlanFlow(input: AuditCurriculumPlanInput): Promise<MacroPedagogyPlanAuditReport>;
|
|
229
|
+
interface AuditProjectGraphInput extends ProjectGraphJudgePromptInput {
|
|
230
|
+
modelOptions?: ModelResolutionOptions;
|
|
231
|
+
}
|
|
232
|
+
declare function auditProjectGraphFlow(input: AuditProjectGraphInput): Promise<ProjectGraphAuditReport>;
|
|
196
233
|
|
|
197
234
|
interface GenerateProjectInstructionInput extends ProjectInstructionPromptInput {
|
|
198
235
|
modelOptions?: ModelResolutionOptions;
|
|
@@ -1272,4 +1309,4 @@ declare class LLMJudgeEngine {
|
|
|
1272
1309
|
*/
|
|
1273
1310
|
declare function streamCurriculumAIInferenceWithTools(messages: ChatMessage[], projectContext: string, options: StreamRunnerOptions, loop: ToolLoopConfig, onChunk?: (token: string, type: ChunkType) => void): Promise<string>;
|
|
1274
1311
|
|
|
1275
|
-
export { type ActivityPromptInput, type AsyncLLMJudgeInput, type AuditCurriculumQualityInput, ChatMessage, ChunkType, type CodeLabPromptInput, DEFAULT_ENABLED_PROVIDERS, type DiagnosticQuizPromptInput, type ExtensionPromptInput, type GenerateActivityInput, type GenerateCodeLabInput, type GenerateDiagnosticQuizInput, type GenerateExtensionInput, type GenerateHandoutInput, type GenerateLessonMasterInput, type GenerateProjectInstructionInput, type GenerateSelfLabInput, type GenerateSlidesInput, type GenerateTeacherGuideInput, type GenerateWorksheetInput, type HandoutPromptInput, type HtmlDeckSlidePromptInput, type JudgeEvaluationResult, type JudgePromptInput, LLMJudgeEngine, type LessonPromptInput, type MarpMarkdownSlidePromptInput, type ModelPolicyResolution, ModelPolicyResolver, type ModelProviderKey, ModelResolutionOptions, type MultiProviderPolicyResolution, type ProjectInstructionPromptInput, SLIDE_CANONICAL_METHODOLOGY, type SelfLabPromptInput, type SlidesPromptInput, type StreamDiagnosticQuizInput, type StreamLessonMasterInput, StreamRunnerOptions, type StreamSelfLabInput, type TeacherGuidePromptInput, ToolLoopConfig, type WorksheetPromptInput, activityTools, analystTools, assessorTools, auditCurriculumQualityFlow, buildActivityPrompt, buildCodeLabPrompt, buildDiagnosticQuizPrompt, buildExtensionPrompt, buildHandoutPrompt, buildHtmlDeckSlidePrompt, buildJudgePrompt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSlidesPrompt, buildTeacherGuidePrompt, buildWorksheetPrompt, contentTools, designerTools, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateProjectInstructionFlow, generateSelfLabFlow, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, illustratorTools, packagerTools, researcherTools, reviewerTools, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools };
|
|
1312
|
+
export { type ActivityPromptInput, type AsyncLLMJudgeInput, type AuditCurriculumPlanInput, type AuditCurriculumQualityInput, type AuditProjectGraphInput, ChatMessage, ChunkType, type CodeLabPromptInput, type CurriculumPlanJudgePromptInput, DEFAULT_ENABLED_PROVIDERS, type DiagnosticQuizPromptInput, type ExtensionPromptInput, type GenerateActivityInput, type GenerateCodeLabInput, type GenerateDiagnosticQuizInput, type GenerateExtensionInput, type GenerateHandoutInput, type GenerateLessonMasterInput, type GenerateProjectInstructionInput, type GenerateSelfLabInput, type GenerateSlidesInput, type GenerateTeacherGuideInput, type GenerateWorksheetInput, type HandoutPromptInput, type HtmlDeckSlidePromptInput, type JudgeEvaluationResult, type JudgePromptInput, LLMJudgeEngine, type LessonPromptInput, type MarpMarkdownSlidePromptInput, type ModelPolicyResolution, ModelPolicyResolver, type ModelProviderKey, ModelResolutionOptions, type MultiProviderPolicyResolution, type ProjectGraphJudgePromptInput, type ProjectInstructionPromptInput, SLIDE_CANONICAL_METHODOLOGY, type SelfLabPromptInput, type SlidesPromptInput, type StreamDiagnosticQuizInput, type StreamLessonMasterInput, StreamRunnerOptions, type StreamSelfLabInput, type TeacherGuidePromptInput, ToolLoopConfig, type WorksheetPromptInput, activityTools, analystTools, assessorTools, auditCurriculumPlanFlow, auditCurriculumQualityFlow, auditProjectGraphFlow, buildActivityPrompt, buildCodeLabPrompt, buildCurriculumPlanJudgePrompt, buildDiagnosticQuizPrompt, buildExtensionPrompt, buildHandoutPrompt, buildHtmlDeckSlidePrompt, buildJudgePrompt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildProjectGraphJudgePrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSlidesPrompt, buildTeacherGuidePrompt, buildWorksheetPrompt, contentTools, designerTools, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateProjectInstructionFlow, generateSelfLabFlow, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, illustratorTools, packagerTools, researcherTools, reviewerTools, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools };
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { M as ModelResolutionOptions } from '../provider-factory-Bv-eIkhg.js';
|
|
2
2
|
export { A as AIProviderName, N as NVIDIA_MODELS, g as getAIModel } from '../provider-factory-Bv-eIkhg.js';
|
|
3
|
-
import { MilestoneInput, LessonPlan, ActivityLab, ProjectGraph, CodeLab, Worksheet, Handout, SlideDeck, TeacherGuide, Extension, CurriculumQualityReport, ProjectInstruction, SelfLab, DiagnosticQuiz } from '../schemas/index.js';
|
|
3
|
+
import { MilestoneInput, LessonPlan, ActivityLab, ProjectGraph, CodeLab, Worksheet, Handout, SlideDeck, TeacherGuide, Extension, CurriculumQualityReport, MacroPedagogyPlanAuditReport, ProjectGraphAuditReport, ProjectInstruction, SelfLab, DiagnosticQuiz } from '../schemas/index.js';
|
|
4
4
|
import * as ai from 'ai';
|
|
5
5
|
import { a as ChatMessage, S as StreamRunnerOptions, n as ToolLoopConfig, C as ChunkType } from '../streamRunner-BzlJrAGZ.js';
|
|
6
6
|
export { A as AggregatedToolCall, D as DEFAULT_ARTIFACT_STREAM_IDLE_MS, d as DEFAULT_ARTIFACT_STREAM_TOTAL_MS, F as FallbackTarget, I as IdleAbort, f as StreamAbortController, T as ToolDefinition, l as ToolExecutionResult, m as ToolExecutor, j as createIdleAbortController, h as createStreamAbortController, e as extractThoughtAndContent, g as getDesignatedFallbackChain, c as getDesignatedFallbackConfig, b as isModelAllowed, i as isProviderEnabled, r as resolveApiKey, k as runCurriculumAIInference, s as streamCurriculumAIInference } from '../streamRunner-BzlJrAGZ.js';
|
|
@@ -105,6 +105,35 @@ interface JudgePromptInput {
|
|
|
105
105
|
standardStatements?: Record<string, string>;
|
|
106
106
|
}
|
|
107
107
|
declare function buildJudgePrompt(input: JudgePromptInput): string;
|
|
108
|
+
/**
|
|
109
|
+
* Stage 2: Macro-Pedagogy Curriculum Plan Judge Prompt
|
|
110
|
+
*/
|
|
111
|
+
interface CurriculumPlanJudgePromptInput {
|
|
112
|
+
planJson: string;
|
|
113
|
+
briefingContext: string;
|
|
114
|
+
expectedLanguage?: string;
|
|
115
|
+
linterFindings?: Array<{
|
|
116
|
+
id: string;
|
|
117
|
+
severity: string;
|
|
118
|
+
title: string;
|
|
119
|
+
description: string;
|
|
120
|
+
}>;
|
|
121
|
+
}
|
|
122
|
+
declare function buildCurriculumPlanJudgePrompt(input: CurriculumPlanJudgePromptInput): string;
|
|
123
|
+
/**
|
|
124
|
+
* Stage 1: Project Graph Toolchain & Environment Provisioning Judge Prompt
|
|
125
|
+
*/
|
|
126
|
+
interface ProjectGraphJudgePromptInput {
|
|
127
|
+
bundleJson: string;
|
|
128
|
+
briefingContext: string;
|
|
129
|
+
linterFindings?: Array<{
|
|
130
|
+
id: string;
|
|
131
|
+
severity: string;
|
|
132
|
+
title: string;
|
|
133
|
+
description: string;
|
|
134
|
+
}>;
|
|
135
|
+
}
|
|
136
|
+
declare function buildProjectGraphJudgePrompt(input: ProjectGraphJudgePromptInput): string;
|
|
108
137
|
|
|
109
138
|
interface ProjectInstructionPromptInput {
|
|
110
139
|
projectGraph?: ProjectGraph;
|
|
@@ -193,6 +222,14 @@ interface AuditCurriculumQualityInput extends JudgePromptInput {
|
|
|
193
222
|
modelOptions?: ModelResolutionOptions;
|
|
194
223
|
}
|
|
195
224
|
declare function auditCurriculumQualityFlow(input: AuditCurriculumQualityInput): Promise<CurriculumQualityReport>;
|
|
225
|
+
interface AuditCurriculumPlanInput extends CurriculumPlanJudgePromptInput {
|
|
226
|
+
modelOptions?: ModelResolutionOptions;
|
|
227
|
+
}
|
|
228
|
+
declare function auditCurriculumPlanFlow(input: AuditCurriculumPlanInput): Promise<MacroPedagogyPlanAuditReport>;
|
|
229
|
+
interface AuditProjectGraphInput extends ProjectGraphJudgePromptInput {
|
|
230
|
+
modelOptions?: ModelResolutionOptions;
|
|
231
|
+
}
|
|
232
|
+
declare function auditProjectGraphFlow(input: AuditProjectGraphInput): Promise<ProjectGraphAuditReport>;
|
|
196
233
|
|
|
197
234
|
interface GenerateProjectInstructionInput extends ProjectInstructionPromptInput {
|
|
198
235
|
modelOptions?: ModelResolutionOptions;
|
|
@@ -1272,4 +1309,4 @@ declare class LLMJudgeEngine {
|
|
|
1272
1309
|
*/
|
|
1273
1310
|
declare function streamCurriculumAIInferenceWithTools(messages: ChatMessage[], projectContext: string, options: StreamRunnerOptions, loop: ToolLoopConfig, onChunk?: (token: string, type: ChunkType) => void): Promise<string>;
|
|
1274
1311
|
|
|
1275
|
-
export { type ActivityPromptInput, type AsyncLLMJudgeInput, type AuditCurriculumQualityInput, ChatMessage, ChunkType, type CodeLabPromptInput, DEFAULT_ENABLED_PROVIDERS, type DiagnosticQuizPromptInput, type ExtensionPromptInput, type GenerateActivityInput, type GenerateCodeLabInput, type GenerateDiagnosticQuizInput, type GenerateExtensionInput, type GenerateHandoutInput, type GenerateLessonMasterInput, type GenerateProjectInstructionInput, type GenerateSelfLabInput, type GenerateSlidesInput, type GenerateTeacherGuideInput, type GenerateWorksheetInput, type HandoutPromptInput, type HtmlDeckSlidePromptInput, type JudgeEvaluationResult, type JudgePromptInput, LLMJudgeEngine, type LessonPromptInput, type MarpMarkdownSlidePromptInput, type ModelPolicyResolution, ModelPolicyResolver, type ModelProviderKey, ModelResolutionOptions, type MultiProviderPolicyResolution, type ProjectInstructionPromptInput, SLIDE_CANONICAL_METHODOLOGY, type SelfLabPromptInput, type SlidesPromptInput, type StreamDiagnosticQuizInput, type StreamLessonMasterInput, StreamRunnerOptions, type StreamSelfLabInput, type TeacherGuidePromptInput, ToolLoopConfig, type WorksheetPromptInput, activityTools, analystTools, assessorTools, auditCurriculumQualityFlow, buildActivityPrompt, buildCodeLabPrompt, buildDiagnosticQuizPrompt, buildExtensionPrompt, buildHandoutPrompt, buildHtmlDeckSlidePrompt, buildJudgePrompt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSlidesPrompt, buildTeacherGuidePrompt, buildWorksheetPrompt, contentTools, designerTools, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateProjectInstructionFlow, generateSelfLabFlow, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, illustratorTools, packagerTools, researcherTools, reviewerTools, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools };
|
|
1312
|
+
export { type ActivityPromptInput, type AsyncLLMJudgeInput, type AuditCurriculumPlanInput, type AuditCurriculumQualityInput, type AuditProjectGraphInput, ChatMessage, ChunkType, type CodeLabPromptInput, type CurriculumPlanJudgePromptInput, DEFAULT_ENABLED_PROVIDERS, type DiagnosticQuizPromptInput, type ExtensionPromptInput, type GenerateActivityInput, type GenerateCodeLabInput, type GenerateDiagnosticQuizInput, type GenerateExtensionInput, type GenerateHandoutInput, type GenerateLessonMasterInput, type GenerateProjectInstructionInput, type GenerateSelfLabInput, type GenerateSlidesInput, type GenerateTeacherGuideInput, type GenerateWorksheetInput, type HandoutPromptInput, type HtmlDeckSlidePromptInput, type JudgeEvaluationResult, type JudgePromptInput, LLMJudgeEngine, type LessonPromptInput, type MarpMarkdownSlidePromptInput, type ModelPolicyResolution, ModelPolicyResolver, type ModelProviderKey, ModelResolutionOptions, type MultiProviderPolicyResolution, type ProjectGraphJudgePromptInput, type ProjectInstructionPromptInput, SLIDE_CANONICAL_METHODOLOGY, type SelfLabPromptInput, type SlidesPromptInput, type StreamDiagnosticQuizInput, type StreamLessonMasterInput, StreamRunnerOptions, type StreamSelfLabInput, type TeacherGuidePromptInput, ToolLoopConfig, type WorksheetPromptInput, activityTools, analystTools, assessorTools, auditCurriculumPlanFlow, auditCurriculumQualityFlow, auditProjectGraphFlow, buildActivityPrompt, buildCodeLabPrompt, buildCurriculumPlanJudgePrompt, buildDiagnosticQuizPrompt, buildExtensionPrompt, buildHandoutPrompt, buildHtmlDeckSlidePrompt, buildJudgePrompt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildProjectGraphJudgePrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSlidesPrompt, buildTeacherGuidePrompt, buildWorksheetPrompt, contentTools, designerTools, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateProjectInstructionFlow, generateSelfLabFlow, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, illustratorTools, packagerTools, researcherTools, reviewerTools, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools };
|
package/dist/ai/index.mjs
CHANGED
|
@@ -2266,6 +2266,111 @@ Please return a single JSON object matching these exact keys:
|
|
|
2266
2266
|
- "actionableRepairPrompts": string[]
|
|
2267
2267
|
`.trim();
|
|
2268
2268
|
}
|
|
2269
|
+
function buildCurriculumPlanJudgePrompt(input) {
|
|
2270
|
+
const { planJson, briefingContext, expectedLanguage = "Vietnamese", linterFindings = [] } = input;
|
|
2271
|
+
return `
|
|
2272
|
+
# System Methodology: Principal Curriculum SME & Macro-Pedagogical Quality Judge (@sme_judge)
|
|
2273
|
+
|
|
2274
|
+
You are the **Lead Curriculum Architect & Classroom Practicum SME**. Your role is to rigorously evaluate a candidate \`CURRICULUM_PLAN\` (Schema v3) against empirical pedagogical science, cognitive load capacity, and real classroom delivery constraints.
|
|
2275
|
+
|
|
2276
|
+
## COURSE BRIEFING & TARGET CONSTRAINTS
|
|
2277
|
+
${briefingContext}
|
|
2278
|
+
|
|
2279
|
+
${linterFindings.length > 0 ? `## DETERMINISTIC PRE-LINT FINDINGS (0-TOKEN LINTER)
|
|
2280
|
+
The deterministic structural linter detected the following issues in advance:
|
|
2281
|
+
${linterFindings.map((f) => `- [${f.severity}] ${f.id}: ${f.title} \u2014 ${f.description}`).join("\n")}
|
|
2282
|
+
Consider these deterministic findings when scoring and issuing actionable repair prescriptions.` : ""}
|
|
2283
|
+
|
|
2284
|
+
## CANDIDATE CURRICULUM PLAN JSON
|
|
2285
|
+
\`\`\`json
|
|
2286
|
+
${planJson}
|
|
2287
|
+
\`\`\`
|
|
2288
|
+
|
|
2289
|
+
## EVALUATION RUBRICS & 5 CRITICAL DIMENSIONS (TOTAL 100 POINTS)
|
|
2290
|
+
|
|
2291
|
+
1. **Step Incrementality & Single Leap Principle (20 pts):**
|
|
2292
|
+
- 20 pts: Every session introduces at most ONE new syntax or algorithmic concept. No massive cognitive leaps (e.g. going from basic variables directly to asynchronous networking).
|
|
2293
|
+
- 10 pts: Minor leap detected in 1 session that can be mitigated with starter code.
|
|
2294
|
+
- 0 pts: Severe cognitive gap (e.g. multiple compound paradigms combined in one session).
|
|
2295
|
+
|
|
2296
|
+
2. **Vygotsky ZPD Saturation & Cognitive Capacity (20 pts):**
|
|
2297
|
+
- 20 pts: New concept count <= 2 per session (K-12) / 3 (Adults), with explicit prior concept anchor or recap slot.
|
|
2298
|
+
- 10 pts: Session introduces 3 concepts without adequate bridge.
|
|
2299
|
+
- 0 pts: Severe overload (>3 new concepts in a single session) or unanchored concepts.
|
|
2300
|
+
|
|
2301
|
+
3. **Classroom Friction-Adjusted Time Budget (20 pts):**
|
|
2302
|
+
- 20 pts: Incorporates 2.5x student friction multiplier. Total content minutes <= 85% of session duration (15% overhead reserved). No step > 76 minutes.
|
|
2303
|
+
- 10 pts: Content is slightly packed, leaving < 10% buffer time.
|
|
2304
|
+
- 0 pts: Overpacked content that will cause students to run out of time in a standard classroom.
|
|
2305
|
+
|
|
2306
|
+
4. **Reigeluth Walking Skeleton & Milestone Agency (20 pts):**
|
|
2307
|
+
- 20 pts: Unit 1 culminates in an end-to-end runnable MVP (Epitome). Subsequent units provide modular elaborations.
|
|
2308
|
+
- 10 pts: Walking skeleton present but delayed to Unit 2.
|
|
2309
|
+
- 0 pts: Pure theoretical silo teaching where no working product appears until the end of the course.
|
|
2310
|
+
|
|
2311
|
+
5. **Exit Evidence Specificity (20 pts):**
|
|
2312
|
+
- 20 pts: Every session produces an explicit, tangible, user-visible deliverable (e.g. running UI screen, passing test suite, physical LED sequence).
|
|
2313
|
+
- 10 pts: Some sessions have generic deliverables ("completed practice exercise").
|
|
2314
|
+
- 0 pts: Vague or absent deliverables ("student understands topic").
|
|
2315
|
+
|
|
2316
|
+
## DECISION RULES
|
|
2317
|
+
- **PASS & AUTO-APPROVE:** Total Score >= 85 AND overallVerdict is "PASS" AND no CRITICAL actionable repairs.
|
|
2318
|
+
- **NEEDS_REVISION:** Total Score between 70 and 84, or fixable flaws. Prescribe concrete structured \`actionableRepairs\` (\`SPLIT_STEP\`, \`INSERT_RECAP\`, \`ADJUST_TIME_BUDGET\`, \`REVISE_EXIT_EVIDENCE\`).
|
|
2319
|
+
- **FAIL:** Total Score < 70, structural collapse, or unbridgeable pedagogical gaps.
|
|
2320
|
+
|
|
2321
|
+
## OUTPUT FORMAT
|
|
2322
|
+
Return a valid JSON object matching the MacroPedagogyPlanAuditSchema.
|
|
2323
|
+
`.trim();
|
|
2324
|
+
}
|
|
2325
|
+
function buildProjectGraphJudgePrompt(input) {
|
|
2326
|
+
const { bundleJson, briefingContext, linterFindings = [] } = input;
|
|
2327
|
+
return `
|
|
2328
|
+
# System Methodology: Lead Systems Engineer & Lab Infrastructure Auditor (@infra_judge)
|
|
2329
|
+
|
|
2330
|
+
You are the **Lead Lab Systems Engineer**. Your role is to rigorously evaluate a candidate \`PROJECT_GRAPH\` and its associated \`technology_scope\` against real-world lab environment feasibility, toolchain friction, and hardware constraints.
|
|
2331
|
+
|
|
2332
|
+
## COURSE BRIEFING & INFRASTRUCTURE CONSTRAINTS
|
|
2333
|
+
${briefingContext}
|
|
2334
|
+
|
|
2335
|
+
${linterFindings.length > 0 ? `## DETERMINISTIC PRE-LINT FINDINGS
|
|
2336
|
+
${linterFindings.map((f) => `- [${f.severity}] ${f.id}: ${f.title} \u2014 ${f.description}`).join("\n")}` : ""}
|
|
2337
|
+
|
|
2338
|
+
## CANDIDATE PROJECT GRAPH BUNDLE JSON
|
|
2339
|
+
\`\`\`json
|
|
2340
|
+
${bundleJson}
|
|
2341
|
+
\`\`\`
|
|
2342
|
+
|
|
2343
|
+
## EVALUATION RUBRICS & 4 DIMENSIONS (TOTAL 100 POINTS)
|
|
2344
|
+
|
|
2345
|
+
1. **Toolchain & Installation Feasibility (25 pts):**
|
|
2346
|
+
- 25 pts: Toolchain installs cleanly without complex admin rights, OS friction, or fragile build scripts.
|
|
2347
|
+
- 10 pts: Toolchain requires moderate admin setup, suitable for guided lab but risky for BYOD.
|
|
2348
|
+
- 0 pts: High-friction setup that frequently breaks in student environments.
|
|
2349
|
+
|
|
2350
|
+
2. **Environment Provisioning Strategy (25 pts):**
|
|
2351
|
+
- 25 pts: Heavy technologies (PostgreSQL, Docker, ROS2, etc.) declare an explicit, realistic provisioning model (\`PRE_INSTALLED_LAB\`, \`CLOUD_MANAGED\`, or \`DEDICATED_SETUP\`). Core course topics are NEVER downgraded; instead, proper infrastructure is specified.
|
|
2352
|
+
- 10 pts: Heavy tech used with ambiguous provisioning plan.
|
|
2353
|
+
- 0 pts: Heavy tech dumped on students with no provisioning strategy, causing setup collapse.
|
|
2354
|
+
|
|
2355
|
+
3. **Hardware & Runtime Envelope (25 pts):**
|
|
2356
|
+
- 25 pts: Code, libraries, and algorithms fit comfortably within target device RAM, Flash, and pinout budget (<= 75% envelope).
|
|
2357
|
+
- 10 pts: Memory or resource limits are tight.
|
|
2358
|
+
- 0 pts: Guaranteed hardware crash or pinout conflict.
|
|
2359
|
+
|
|
2360
|
+
4. **Time to Hello World (25 pts):**
|
|
2361
|
+
- 25 pts: First working runnable milestone achieved in <= 15 minutes of student effort.
|
|
2362
|
+
- 10 pts: First milestone takes 20-30 minutes.
|
|
2363
|
+
- 0 pts: Student spends the entire first session on environment configuration without seeing running code.
|
|
2364
|
+
|
|
2365
|
+
## DECISION RULES
|
|
2366
|
+
- **PASS:** Score >= 85 AND overallVerdict is "PASS".
|
|
2367
|
+
- **NEEDS_REVISION:** Score between 70 and 84. Prescribe structured actionable repairs.
|
|
2368
|
+
- **FAIL:** Score < 70 or critical environment blocker.
|
|
2369
|
+
|
|
2370
|
+
## OUTPUT FORMAT
|
|
2371
|
+
Return a valid JSON object matching ProjectGraphAuditSchema.
|
|
2372
|
+
`.trim();
|
|
2373
|
+
}
|
|
2269
2374
|
|
|
2270
2375
|
// src/ai/prompts/projectInstructionPrompt.ts
|
|
2271
2376
|
function buildProjectInstructionPrompt(input) {
|
|
@@ -3077,11 +3182,51 @@ var ExtensionSchema = z.object({
|
|
|
3077
3182
|
});
|
|
3078
3183
|
var QualityAuditVerdictSchema = z.enum(["PASS", "NEEDS_REVISION", "FAIL"]);
|
|
3079
3184
|
var JudgeCriterionSchema = z.object({
|
|
3080
|
-
name: z.string().describe("Criterion name, e.g. Bloom Alignment, Code Validity, Word Count Gate, Language Adherence"),
|
|
3185
|
+
name: z.string().describe("Criterion name, e.g. Bloom Alignment, Code Validity, Word Count Gate, Language Adherence, Step Incrementality"),
|
|
3081
3186
|
passed: z.boolean(),
|
|
3082
3187
|
score: z.number().min(0).max(100).describe("Score out of 100"),
|
|
3083
3188
|
feedback: z.string().describe("Constructive feedback or citation of issues")
|
|
3084
3189
|
});
|
|
3190
|
+
var ActionableRepairActionSchema = z.enum([
|
|
3191
|
+
"SPLIT_STEP",
|
|
3192
|
+
"REVISE_PROVISIONING",
|
|
3193
|
+
"INSERT_RECAP",
|
|
3194
|
+
"ADJUST_TIME_BUDGET",
|
|
3195
|
+
"SUBSTITUTE_FALLBACK",
|
|
3196
|
+
"REVISE_EXIT_EVIDENCE"
|
|
3197
|
+
]);
|
|
3198
|
+
var ActionableRepairPromptSchema = z.object({
|
|
3199
|
+
action: ActionableRepairActionSchema,
|
|
3200
|
+
targetId: z.string().describe("ID of the session, feature, or step requiring repair, e.g. U01_M01_L02 or F1-S3"),
|
|
3201
|
+
severity: z.enum(["CRITICAL", "WARNING", "INFO"]).default("WARNING"),
|
|
3202
|
+
rationale: z.string().describe("Pedagogical or technical rationale for why this repair is mandated"),
|
|
3203
|
+
instruction: z.string().describe("Exact, actionable text instruction for the planner/generator in the next turn")
|
|
3204
|
+
});
|
|
3205
|
+
var ProjectGraphAuditSchema = z.object({
|
|
3206
|
+
schema_version: z.number().default(1),
|
|
3207
|
+
projectId: z.string(),
|
|
3208
|
+
overallVerdict: QualityAuditVerdictSchema,
|
|
3209
|
+
totalScore: z.number().min(0).max(100),
|
|
3210
|
+
toolchainFeasibility: JudgeCriterionSchema.describe("Installation friction, admin rights, IDE/compiler matrix"),
|
|
3211
|
+
provisioningStrategy: JudgeCriterionSchema.describe("Clear model for heavy runtimes: Pre-installed lab, Cloud instance, or Dedicated setup"),
|
|
3212
|
+
hardwareRuntimeEnvelope: JudgeCriterionSchema.describe("Memory/Flash limits, pinout conflicts, hardware platform alignment"),
|
|
3213
|
+
timeToHelloWorld: JudgeCriterionSchema.describe("Student time to achieve first working feedback loop (target <= 15 mins)"),
|
|
3214
|
+
actionableRepairs: z.array(ActionableRepairPromptSchema).default([])
|
|
3215
|
+
});
|
|
3216
|
+
var MacroPedagogyPlanAuditSchema = z.object({
|
|
3217
|
+
schema_version: z.number().default(1),
|
|
3218
|
+
planHash: z.string(),
|
|
3219
|
+
overallVerdict: QualityAuditVerdictSchema,
|
|
3220
|
+
totalScore: z.number().min(0).max(100),
|
|
3221
|
+
autoApproved: z.boolean().default(false).describe("True if totalScore >= 85 and overallVerdict is PASS"),
|
|
3222
|
+
stepIncrementality: JudgeCriterionSchema.describe("Single leap principle: <= 1 new syntax or 1 new algorithm per step"),
|
|
3223
|
+
zpdSaturation: JudgeCriterionSchema.describe("Vygotsky ZPD: <= 2 new concepts per session (K-12) / 3 (Adults), with prior anchor"),
|
|
3224
|
+
frictionAdjustedBudget: JudgeCriterionSchema.describe("Student time multiplier (2.5x): total content <= 85% session minutes"),
|
|
3225
|
+
epitomeViability: JudgeCriterionSchema.describe("Reigeluth Walking Skeleton: Unit 1 produces an end-to-end runnable MVP"),
|
|
3226
|
+
exitEvidenceSpecificity: JudgeCriterionSchema.describe("Tangible, measurable student deliverable for every session"),
|
|
3227
|
+
actionableRepairs: z.array(ActionableRepairPromptSchema).default([]),
|
|
3228
|
+
summary: z.string().describe("High-level executive evaluation summary")
|
|
3229
|
+
});
|
|
3085
3230
|
var CurriculumQualityReportSchema = z.object({
|
|
3086
3231
|
targetArtifactType: z.string().describe("Type of artifact audited, e.g. LESSON, ACT, CODE, WKS, SLIDE"),
|
|
3087
3232
|
lessonId: z.string(),
|
|
@@ -3089,7 +3234,8 @@ var CurriculumQualityReportSchema = z.object({
|
|
|
3089
3234
|
totalScore: z.number().min(0).max(100),
|
|
3090
3235
|
languageAdherencePassed: z.boolean().describe("True if content strictly matches the requested target language"),
|
|
3091
3236
|
criteria: z.array(JudgeCriterionSchema).min(3),
|
|
3092
|
-
actionableRepairPrompts: z.array(z.string()).default([]).describe("Concrete instruction prompts to fix detected issues in the next repair turn")
|
|
3237
|
+
actionableRepairPrompts: z.array(z.string()).default([]).describe("Concrete instruction prompts to fix detected issues in the next repair turn"),
|
|
3238
|
+
structuredRepairs: z.array(ActionableRepairPromptSchema).optional()
|
|
3093
3239
|
});
|
|
3094
3240
|
var ProjectProfileSchema = z.object({
|
|
3095
3241
|
id: z.string().optional(),
|
|
@@ -4249,6 +4395,11 @@ async function generateExtensionFlow(input) {
|
|
|
4249
4395
|
});
|
|
4250
4396
|
return object;
|
|
4251
4397
|
}
|
|
4398
|
+
|
|
4399
|
+
// src/constants/pedagogy.ts
|
|
4400
|
+
var JUDGE_AUTO_APPROVE_THRESHOLD = 85;
|
|
4401
|
+
|
|
4402
|
+
// src/ai/flows/auditCurriculumQualityFlow.ts
|
|
4252
4403
|
async function auditCurriculumQualityFlow(input) {
|
|
4253
4404
|
const model = getAIModel(input.modelOptions);
|
|
4254
4405
|
const prompt = buildJudgePrompt({
|
|
@@ -4264,6 +4415,43 @@ async function auditCurriculumQualityFlow(input) {
|
|
|
4264
4415
|
schema: CurriculumQualityReportSchema,
|
|
4265
4416
|
prompt: `${prompt}
|
|
4266
4417
|
|
|
4418
|
+
Respond with a valid JSON object matching the schema.`
|
|
4419
|
+
});
|
|
4420
|
+
return object;
|
|
4421
|
+
}
|
|
4422
|
+
async function auditCurriculumPlanFlow(input) {
|
|
4423
|
+
const model = getAIModel(input.modelOptions);
|
|
4424
|
+
const prompt = buildCurriculumPlanJudgePrompt({
|
|
4425
|
+
planJson: input.planJson,
|
|
4426
|
+
briefingContext: input.briefingContext,
|
|
4427
|
+
expectedLanguage: input.expectedLanguage,
|
|
4428
|
+
linterFindings: input.linterFindings
|
|
4429
|
+
});
|
|
4430
|
+
const { object } = await generateObject({
|
|
4431
|
+
model,
|
|
4432
|
+
schema: MacroPedagogyPlanAuditSchema,
|
|
4433
|
+
prompt: `${prompt}
|
|
4434
|
+
|
|
4435
|
+
Respond with a valid JSON object matching the schema.`
|
|
4436
|
+
});
|
|
4437
|
+
const autoApproved = object.totalScore >= JUDGE_AUTO_APPROVE_THRESHOLD && object.overallVerdict === "PASS";
|
|
4438
|
+
return {
|
|
4439
|
+
...object,
|
|
4440
|
+
autoApproved
|
|
4441
|
+
};
|
|
4442
|
+
}
|
|
4443
|
+
async function auditProjectGraphFlow(input) {
|
|
4444
|
+
const model = getAIModel(input.modelOptions);
|
|
4445
|
+
const prompt = buildProjectGraphJudgePrompt({
|
|
4446
|
+
bundleJson: input.bundleJson,
|
|
4447
|
+
briefingContext: input.briefingContext,
|
|
4448
|
+
linterFindings: input.linterFindings
|
|
4449
|
+
});
|
|
4450
|
+
const { object } = await generateObject({
|
|
4451
|
+
model,
|
|
4452
|
+
schema: ProjectGraphAuditSchema,
|
|
4453
|
+
prompt: `${prompt}
|
|
4454
|
+
|
|
4267
4455
|
Respond with a valid JSON object matching the schema.`
|
|
4268
4456
|
});
|
|
4269
4457
|
return object;
|
|
@@ -5368,6 +5556,6 @@ Guidelines:
|
|
|
5368
5556
|
return finalContent;
|
|
5369
5557
|
}
|
|
5370
5558
|
|
|
5371
|
-
export { DEFAULT_ARTIFACT_STREAM_IDLE_MS, DEFAULT_ARTIFACT_STREAM_TOTAL_MS, DEFAULT_ENABLED_PROVIDERS, LLMJudgeEngine, ModelPolicyResolver, NVIDIA_MODELS, SLIDE_CANONICAL_METHODOLOGY, activityTools, analystTools, assessorTools, auditCurriculumQualityFlow, buildActivityPrompt, buildCodeLabPrompt, buildDiagnosticQuizPrompt, buildExtensionPrompt, buildHandoutPrompt, buildHtmlDeckSlidePrompt, buildJudgePrompt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSlidesPrompt, buildTeacherGuidePrompt, buildWorksheetPrompt, contentTools, createIdleAbortController, createStreamAbortController, designerTools, extractThoughtAndContent, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateProjectInstructionFlow, generateSelfLabFlow, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, getAIModel, getDesignatedFallbackChain, getDesignatedFallbackConfig, illustratorTools, isModelAllowed, isProviderEnabled, packagerTools, researcherTools, resolveApiKey, reviewerTools, runCurriculumAIInference, streamCurriculumAIInference, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools };
|
|
5559
|
+
export { DEFAULT_ARTIFACT_STREAM_IDLE_MS, DEFAULT_ARTIFACT_STREAM_TOTAL_MS, DEFAULT_ENABLED_PROVIDERS, LLMJudgeEngine, ModelPolicyResolver, NVIDIA_MODELS, SLIDE_CANONICAL_METHODOLOGY, activityTools, analystTools, assessorTools, auditCurriculumPlanFlow, auditCurriculumQualityFlow, auditProjectGraphFlow, buildActivityPrompt, buildCodeLabPrompt, buildCurriculumPlanJudgePrompt, buildDiagnosticQuizPrompt, buildExtensionPrompt, buildHandoutPrompt, buildHtmlDeckSlidePrompt, buildJudgePrompt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildProjectGraphJudgePrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSlidesPrompt, buildTeacherGuidePrompt, buildWorksheetPrompt, contentTools, createIdleAbortController, createStreamAbortController, designerTools, extractThoughtAndContent, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateProjectInstructionFlow, generateSelfLabFlow, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, getAIModel, getDesignatedFallbackChain, getDesignatedFallbackConfig, illustratorTools, isModelAllowed, isProviderEnabled, packagerTools, researcherTools, resolveApiKey, reviewerTools, runCurriculumAIInference, streamCurriculumAIInference, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools };
|
|
5372
5560
|
//# sourceMappingURL=index.mjs.map
|
|
5373
5561
|
//# sourceMappingURL=index.mjs.map
|