@thanh01.pmt/curriculum-kit 1.4.43 → 1.4.45
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 +66 -470
- package/dist/ai/index.cjs.map +1 -1
- package/dist/ai/index.d.cts +77 -77
- package/dist/ai/index.d.ts +77 -77
- package/dist/ai/index.mjs +64 -469
- package/dist/ai/index.mjs.map +1 -1
- package/dist/index.cjs +478 -837
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +124 -58
- package/dist/index.d.ts +124 -58
- package/dist/index.mjs +470 -829
- package/dist/index.mjs.map +1 -1
- package/dist/pipeline/index.cjs +99 -484
- package/dist/pipeline/index.cjs.map +1 -1
- package/dist/pipeline/index.mjs +97 -483
- package/dist/pipeline/index.mjs.map +1 -1
- package/dist/schemas/index.d.cts +1064 -1064
- package/dist/schemas/index.d.ts +1064 -1064
- package/dist/standards/index.d.cts +2 -2
- package/dist/standards/index.d.ts +2 -2
- package/dist/{standardsCoverageGate-49pJq5t8.d.cts → standardsCoverageGate-CLnq0d0s.d.cts} +12 -12
- package/dist/{standardsCoverageGate-49pJq5t8.d.ts → standardsCoverageGate-CLnq0d0s.d.ts} +12 -12
- package/dist/templates/ACT_template.md +18 -9
- package/dist/templates/ALIGNMENT_MATRIX_template.md +5 -0
- package/dist/templates/ART_DIRECTION_template.md +7 -0
- package/dist/templates/ASSET_MANIFEST_template.md +5 -0
- package/dist/templates/BASELINE_STANDARD.md +5 -0
- package/dist/templates/BELL_RINGER_template.md +13 -13
- package/dist/templates/CHANGELOG_template.md +3 -0
- package/dist/templates/CHOICE_BOARD_template.md +8 -5
- package/dist/templates/CODE_template.md +5 -6
- package/dist/templates/CONTENT_CONTINUITY_template.md +6 -0
- package/dist/templates/CONTENT_STYLE_GUIDE_template.md +4 -5
- package/dist/templates/CURRICULUM_FRAMEWORK_template.md +5 -6
- package/dist/templates/DEPENDENCY_MAP_template.md +3 -4
- package/dist/templates/EXIT_TICKET_template.md +8 -8
- package/dist/templates/EXT_template.md +3 -0
- package/dist/templates/GLOSSARY_template.md +1 -2
- package/dist/templates/GRAPHIC_ORGANIZER_template.md +8 -8
- package/dist/templates/GUIDE_template.md +5 -6
- package/dist/templates/HANDOUT_template.md +5 -6
- package/dist/templates/HANDOVER_DOCUMENT_template.md +8 -0
- package/dist/templates/KNOWLEDGE_EXPOSITION_template.md +16 -6
- package/dist/templates/LAB_TEMPLATE.md +78 -0
- package/dist/templates/LEARNER_PROFILE_template.md +4 -5
- package/dist/templates/LESSONS_LEARNED_template.md +8 -0
- package/dist/templates/LESSON_5E_template.md +24 -9
- package/dist/templates/LESSON_EDP_template.md +26 -10
- package/dist/templates/LESSON_GENERAL_template.md +22 -8
- package/dist/templates/OUTPUT_CONSTRAINTS_template.md +7 -0
- package/dist/templates/PACKAGING_SPEC_template.md +8 -0
- package/dist/templates/PILOT_FEEDBACK_template.md +6 -0
- package/dist/templates/PROJECT_BRIEF_template.md +8 -0
- package/dist/templates/PROJECT_STATUS_template.md +9 -0
- package/dist/templates/QUIZ_template.md +7 -0
- package/dist/templates/QUIZ_v4.6_template.md +4 -5
- package/dist/templates/REFERENCE_PACK_template.md +4 -0
- package/dist/templates/REVIEW_GAME_template.md +11 -8
- package/dist/templates/RUBRIC_template.md +2 -3
- package/dist/templates/SCIENCE_LAB_template.md +11 -5
- package/dist/templates/SECTION_LANGUAGE_CONTRACT_template.md +44 -0
- package/dist/templates/SELF_LAB_template.md +174 -0
- package/dist/templates/SLIDE_template.md +23 -0
- package/dist/templates/STATION_ROTATION_template.md +11 -11
- package/dist/templates/TASK_CARDS_template.md +8 -8
- package/dist/templates/TIERED_PRACTICE_template.md +14 -10
- package/dist/templates/UPDATE_ROADMAP_template.md +7 -0
- package/dist/templates/WKS_template.md +5 -6
- package/dist/workflow/index.cjs +250 -672
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.d.cts +1 -1
- package/dist/workflow/index.d.ts +1 -1
- package/dist/workflow/index.mjs +248 -670
- package/dist/workflow/index.mjs.map +1 -1
- package/docs/refs/templates/ACT_template.md +18 -9
- package/docs/refs/templates/ALIGNMENT_MATRIX_template.md +5 -0
- package/docs/refs/templates/ART_DIRECTION_template.md +7 -0
- package/docs/refs/templates/ASSET_MANIFEST_template.md +5 -0
- package/docs/refs/templates/BASELINE_STANDARD.md +5 -0
- package/docs/refs/templates/BELL_RINGER_template.md +13 -13
- package/docs/refs/templates/CHANGELOG_template.md +3 -0
- package/docs/refs/templates/CHOICE_BOARD_template.md +8 -5
- package/docs/refs/templates/CODE_template.md +5 -6
- package/docs/refs/templates/CONTENT_CONTINUITY_template.md +6 -0
- package/docs/refs/templates/CONTENT_STYLE_GUIDE_template.md +4 -5
- package/docs/refs/templates/CURRICULUM_FRAMEWORK_template.md +5 -6
- package/docs/refs/templates/DEPENDENCY_MAP_template.md +3 -4
- package/docs/refs/templates/EXIT_TICKET_template.md +8 -8
- package/docs/refs/templates/EXT_template.md +3 -0
- package/docs/refs/templates/GLOSSARY_template.md +1 -2
- package/docs/refs/templates/GRAPHIC_ORGANIZER_template.md +8 -8
- package/docs/refs/templates/GUIDE_template.md +5 -6
- package/docs/refs/templates/HANDOUT_template.md +5 -6
- package/docs/refs/templates/HANDOVER_DOCUMENT_template.md +8 -0
- package/docs/refs/templates/KNOWLEDGE_EXPOSITION_template.md +16 -6
- package/docs/refs/templates/LAB_TEMPLATE.md +78 -0
- package/docs/refs/templates/LEARNER_PROFILE_template.md +4 -5
- package/docs/refs/templates/LESSONS_LEARNED_template.md +8 -0
- package/docs/refs/templates/LESSON_5E_template.md +24 -9
- package/docs/refs/templates/LESSON_EDP_template.md +26 -10
- package/docs/refs/templates/LESSON_GENERAL_template.md +22 -8
- package/docs/refs/templates/OUTPUT_CONSTRAINTS_template.md +7 -0
- package/docs/refs/templates/PACKAGING_SPEC_template.md +8 -0
- package/docs/refs/templates/PILOT_FEEDBACK_template.md +6 -0
- package/docs/refs/templates/PROJECT_BRIEF_template.md +8 -0
- package/docs/refs/templates/PROJECT_STATUS_template.md +9 -0
- package/docs/refs/templates/QUIZ_template.md +7 -0
- package/docs/refs/templates/QUIZ_v4.6_template.md +4 -5
- package/docs/refs/templates/REFERENCE_PACK_template.md +4 -0
- package/docs/refs/templates/REVIEW_GAME_template.md +11 -8
- package/docs/refs/templates/RUBRIC_template.md +2 -3
- package/docs/refs/templates/SCIENCE_LAB_template.md +11 -5
- package/docs/refs/templates/SECTION_LANGUAGE_CONTRACT_template.md +44 -0
- package/docs/refs/templates/SELF_LAB_template.md +174 -0
- package/docs/refs/templates/SLIDE_template.md +23 -0
- package/docs/refs/templates/STATION_ROTATION_template.md +11 -11
- package/docs/refs/templates/TASK_CARDS_template.md +8 -8
- package/docs/refs/templates/TIERED_PRACTICE_template.md +14 -10
- package/docs/refs/templates/UPDATE_ROADMAP_template.md +7 -0
- package/docs/refs/templates/WKS_template.md +5 -6
- package/package.json +1 -1
package/dist/pipeline/index.cjs
CHANGED
|
@@ -4,15 +4,17 @@ var ai = require('ai');
|
|
|
4
4
|
var google = require('@ai-sdk/google');
|
|
5
5
|
var openai = require('@ai-sdk/openai');
|
|
6
6
|
var deepseek = require('@ai-sdk/deepseek');
|
|
7
|
-
var
|
|
7
|
+
var fs2 = require('fs');
|
|
8
8
|
var path = require('path');
|
|
9
9
|
var zod = require('zod');
|
|
10
|
+
var url = require('url');
|
|
10
11
|
var pLimit = require('p-limit');
|
|
11
12
|
var fsPromises = require('fs/promises');
|
|
12
13
|
|
|
14
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
13
15
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
16
|
|
|
15
|
-
var
|
|
17
|
+
var fs2__default = /*#__PURE__*/_interopDefault(fs2);
|
|
16
18
|
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
17
19
|
var pLimit__default = /*#__PURE__*/_interopDefault(pLimit);
|
|
18
20
|
var fsPromises__default = /*#__PURE__*/_interopDefault(fsPromises);
|
|
@@ -40,7 +42,7 @@ ${cc.technicalDepth}`;
|
|
|
40
42
|
const dataRows = cc.comparisonTable.rows.map((r) => `| ${r.join(" | ")} |`).join("\n");
|
|
41
43
|
str += `
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
**Comparison & Trade-off Analysis**
|
|
44
46
|
${headerRow}
|
|
45
47
|
${dividerRow}
|
|
46
48
|
${dataRows}`;
|
|
@@ -84,7 +86,8 @@ ${learningObjectivesStr}
|
|
|
84
86
|
|
|
85
87
|
---
|
|
86
88
|
|
|
87
|
-
## 1. ENGAGE (Hook & High-Stakes Scenario)
|
|
89
|
+
## 1. ENGAGE (Hook & High-Stakes Scenario)
|
|
90
|
+
> **Duration:** 10-15 mins
|
|
88
91
|
|
|
89
92
|
### Real-World Context: "${lesson.hookTitle || "The Incident"}"
|
|
90
93
|
${lesson.hookScenario}
|
|
@@ -93,13 +96,15 @@ ${lesson.hookQuestions && lesson.hookQuestions.length > 0 ? lesson.hookQuestions
|
|
|
93
96
|
|
|
94
97
|
---
|
|
95
98
|
|
|
96
|
-
## 2. EXPLORE & EXPLAIN (Core Technical Concepts & Principles)
|
|
99
|
+
## 2. EXPLORE & EXPLAIN (Core Technical Concepts & Principles)
|
|
100
|
+
> **Duration:** 30-40 mins
|
|
97
101
|
|
|
98
102
|
${coreConceptsStr}
|
|
99
103
|
|
|
100
104
|
---
|
|
101
105
|
|
|
102
|
-
## 3. GUIDED PRACTICE (Visual Architecture & Annotated Code)
|
|
106
|
+
## 3. GUIDED PRACTICE (Visual Architecture & Annotated Code)
|
|
107
|
+
> **Duration:** 20-25 mins
|
|
103
108
|
|
|
104
109
|
### System Architecture & Data Flow (Mermaid Diagram)
|
|
105
110
|
${mermaidBlock}
|
|
@@ -113,7 +118,8 @@ ${guidedPractice.codeSnippet}
|
|
|
113
118
|
|
|
114
119
|
---
|
|
115
120
|
|
|
116
|
-
## 4. ELABORATE & INDEPENDENT PRACTICE (Technical Challenge & Scaffolding)
|
|
121
|
+
## 4. ELABORATE & INDEPENDENT PRACTICE (Technical Challenge & Scaffolding)
|
|
122
|
+
> **Duration:** 15-20 mins
|
|
117
123
|
|
|
118
124
|
### Engineering Challenge: "${lesson.independentPractice?.title || "System Optimization Challenge"}"
|
|
119
125
|
${lesson.independentPractice?.description || "Implement the core logic and test against simulated edge cases."}
|
|
@@ -124,7 +130,8 @@ ${lesson.independentPractice?.description || "Implement the core logic and test
|
|
|
124
130
|
|
|
125
131
|
---
|
|
126
132
|
|
|
127
|
-
## 5. EVALUATE (Summary, Assessment & Metacognition)
|
|
133
|
+
## 5. EVALUATE (Summary, Assessment & Metacognition)
|
|
134
|
+
> **Duration:** 5-10 mins
|
|
128
135
|
|
|
129
136
|
### Exit Ticket (Bloom: Apply / Analyze)
|
|
130
137
|
> **Scenario Question:** ${lesson.exitTicket.questionStem}
|
|
@@ -217,12 +224,16 @@ ${hardwareItems}
|
|
|
217
224
|
|
|
218
225
|
## [REQUIRED] Active Learning Workflow
|
|
219
226
|
|
|
220
|
-
### Phase 1: Planning & Design
|
|
227
|
+
### Phase 1: Planning & Design
|
|
228
|
+
> **Duration:** ${phase1.durationMinutes} mins
|
|
229
|
+
|
|
221
230
|
- **Student Task:** ${phase1.studentTask}
|
|
222
231
|
- **Teacher Action:** ${phase1.teacherAction}
|
|
223
232
|
${phase1.inquiryQuestions.map((q) => ` - *Inquiry Question:* ${q}`).join("\n")}
|
|
224
233
|
|
|
225
|
-
### Phase 2: Implementation & Discovery
|
|
234
|
+
### Phase 2: Implementation & Discovery
|
|
235
|
+
> **Duration:** ${phase2.durationMinutes} mins
|
|
236
|
+
|
|
226
237
|
- **Student Task:** ${phase2.studentTask}
|
|
227
238
|
- **Teacher Action:** ${phase2.teacherAction}
|
|
228
239
|
|
|
@@ -230,7 +241,9 @@ ${phase2.codeOrCommands.map((c) => `\`\`\`text
|
|
|
230
241
|
${c}
|
|
231
242
|
\`\`\``).join("\n\n")}
|
|
232
243
|
|
|
233
|
-
### Phase 3: Debugging & Testing
|
|
244
|
+
### Phase 3: Debugging & Testing
|
|
245
|
+
> **Duration:** ${phase3.durationMinutes} mins
|
|
246
|
+
|
|
234
247
|
- **Testing:** ${phase3.testingSteps}
|
|
235
248
|
- **Error Analysis:** ${phase3.errorAnalysis}
|
|
236
249
|
|
|
@@ -285,22 +298,28 @@ This lab focuses on the practical implementation of core technical concepts, bri
|
|
|
285
298
|
|
|
286
299
|
## \u{1F4DD} Lab Tasks (3-Tier Differentiation)
|
|
287
300
|
|
|
288
|
-
### \u{1F949} Bronze (Foundational)
|
|
301
|
+
### \u{1F949} Bronze (Foundational)
|
|
302
|
+
> **Duration:** ${tasks.bronze.mins} mins
|
|
303
|
+
|
|
289
304
|
**Objective:** ${tasks.bronze.objective}
|
|
290
305
|
- **Task:** ${tasks.bronze.task}
|
|
291
306
|
- **Requirement:** ${tasks.bronze.requirement}
|
|
292
307
|
|
|
293
|
-
### \u{1F948} Silver (Application)
|
|
308
|
+
### \u{1F948} Silver (Application)
|
|
309
|
+
> **Duration:** ${tasks.silver.mins} mins
|
|
310
|
+
|
|
294
311
|
**Objective:** ${tasks.silver.objective}
|
|
295
312
|
- **Task:** ${tasks.silver.task}
|
|
296
313
|
- **Requirement:** ${tasks.silver.requirement}
|
|
297
314
|
|
|
298
|
-
### \u{1F947} Gold (Enrichment/Creative)
|
|
315
|
+
### \u{1F947} Gold (Enrichment/Creative)
|
|
316
|
+
> **Duration:** ${tasks.gold.mins} mins
|
|
317
|
+
|
|
299
318
|
**Objective:** ${tasks.gold.objective}
|
|
300
319
|
- **Task:** ${tasks.gold.task}
|
|
301
320
|
- **Requirement:** ${tasks.gold.requirement}
|
|
302
321
|
|
|
303
|
-
## \u{1F4BB} Technical Reference
|
|
322
|
+
## \u{1F4BB} Technical Reference
|
|
304
323
|
<!-- [SME_MANDATE] -->
|
|
305
324
|
> Any code provided in this section is verified for syntax accuracy and runtime execution.
|
|
306
325
|
|
|
@@ -438,7 +457,9 @@ ${instruction.verificationChecklist.map((c) => `- [ ] ${c}`).join("\n")}
|
|
|
438
457
|
function serializeSelfLabToMarkdown(lab) {
|
|
439
458
|
const renderChallenge = (c, label) => {
|
|
440
459
|
const tasksList = c.tasks.map((t) => `- ${t}`).join("\n");
|
|
441
|
-
return `### ${label}: ${c.title}
|
|
460
|
+
return `### ${label}: ${c.title}
|
|
461
|
+
> **Duration:** ~${c.estimatedMinutes} mins
|
|
462
|
+
|
|
442
463
|
**Objective:** ${c.objective}
|
|
443
464
|
|
|
444
465
|
#### Tasks & Implementation Details:
|
|
@@ -603,8 +624,8 @@ function resolveApiKey(keyName, explicitKey) {
|
|
|
603
624
|
path__default.default.resolve(currentDir, "../..", ".env")
|
|
604
625
|
];
|
|
605
626
|
for (const envPath of envPaths) {
|
|
606
|
-
if (
|
|
607
|
-
const content =
|
|
627
|
+
if (fs2__default.default.existsSync(envPath)) {
|
|
628
|
+
const content = fs2__default.default.readFileSync(envPath, "utf-8");
|
|
608
629
|
for (const line of content.split("\n")) {
|
|
609
630
|
const trimmed = line.trim();
|
|
610
631
|
if (trimmed && !trimmed.startsWith("#") && trimmed.startsWith(keyName + "=")) {
|
|
@@ -2482,467 +2503,61 @@ zod.z.object({
|
|
|
2482
2503
|
}),
|
|
2483
2504
|
phases: zod.z.array(PhaseInputSchema).default([])
|
|
2484
2505
|
});
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
---
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
### 5. Artifact Contract
|
|
2541
|
-
- **ACT must expand:** {{ACT_CONTRACT}}
|
|
2542
|
-
- **GUIDE must support:** {{GUIDE_CONTRACT}}
|
|
2543
|
-
- **SLIDE must visualize:** {{SLIDE_CONTRACT}}
|
|
2544
|
-
- **HANDOUT must provide:** {{HANDOUT_CONTRACT}}
|
|
2545
|
-
- **WKS must practice:** {{WKS_CONTRACT}}
|
|
2546
|
-
- **QUIZ must assess:** {{QUIZ_CONTRACT}}
|
|
2547
|
-
- **EXT must extend:** {{EXT_CONTRACT}}
|
|
2548
|
-
|
|
2549
|
-
---
|
|
2550
|
-
|
|
2551
|
-
## [REQUIRED] B. Lesson Flow
|
|
2552
|
-
|
|
2553
|
-
### 1. ENGAGE \u2014 {{ENGAGE_DURATION}} mins
|
|
2554
|
-
- **Hook Scenario:** {{HOOK_SCENARIO}}
|
|
2555
|
-
- **Open Question:** {{HOOK_OPEN_QUESTION}}
|
|
2556
|
-
- **Transition:** {{HOOK_TRANSITION}}
|
|
2557
|
-
|
|
2558
|
-
### 2. EXPLORE \u2014 {{EXPLORE_DURATION}} mins
|
|
2559
|
-
- **Activity Reference:** {{EXPLORE_ACTIVITY_REF}}
|
|
2560
|
-
- **Student Discovery:** {{EXPLORE_STUDENT_DISCOVERY}}
|
|
2561
|
-
|
|
2562
|
-
### 3. EXPLAIN \u2014 {{EXPLAIN_DURATION}} mins
|
|
2563
|
-
- **Definitions:**
|
|
2564
|
-
{{EXPLAIN_DEFINITIONS}}
|
|
2565
|
-
- **Visual Illustration (REQUIRED):**
|
|
2566
|
-
{{EXPLAIN_VISUAL_ILLUSTRATION}}
|
|
2567
|
-
|
|
2568
|
-
### 4. ELABORATE \u2014 {{ELABORATE_DURATION}} mins
|
|
2569
|
-
- **Tiered Scaffolding:**
|
|
2570
|
-
- \u{1F949} **Bronze:** {{DIFFERENTIATION_BRONZE}}
|
|
2571
|
-
- \u{1F948} **Silver:** {{DIFFERENTIATION_SILVER}}
|
|
2572
|
-
- \u{1F947} **Gold:** {{DIFFERENTIATION_GOLD}}
|
|
2573
|
-
|
|
2574
|
-
> **ACT Contract**: Detailed operational instructions must expand the Activity Sequence above and must not change the planned evidence target.
|
|
2575
|
-
|
|
2576
|
-
### 5. EVALUATE \u2014 {{EVALUATE_DURATION}} mins
|
|
2577
|
-
- **Exit Ticket:** {{EXIT_TICKET_CONTENT}}
|
|
2578
|
-
- **Closing:** {{CLOSING_REMARKS}}
|
|
2579
|
-
|
|
2580
|
-
> **QUIZ Contract**: Detailed assessment criteria and rubrics must assess the evidence and success criteria defined in the Lesson Design Plan.
|
|
2581
|
-
|
|
2582
|
-
---
|
|
2583
|
-
|
|
2584
|
-
## [OPTIONAL] Teacher Notes
|
|
2585
|
-
- **Common Pitfalls:**
|
|
2586
|
-
{{COMMON_PITFALLS}}
|
|
2587
|
-
- **Troubleshooting:**
|
|
2588
|
-
{{TROUBLESHOOTING_ROWS}}
|
|
2589
|
-
|
|
2590
|
-
---
|
|
2591
|
-
|
|
2592
|
-
## [REQUIRED] Artifact Linkage (Master Index)
|
|
2593
|
-
> List all satellite files used in this lesson.
|
|
2594
|
-
|
|
2595
|
-
| Artifact File | Role in the Classroom | When to Use |
|
|
2596
|
-
|---|---|---|
|
|
2597
|
-
| \`GUIDE_{{LESSON_ID}}.md\` | Detailed Teaching Script | Teacher preparation |
|
|
2598
|
-
| \`SLIDE_{{LESSON_ID}}.md\` | Presentation Content | Throughout the session |
|
|
2599
|
-
| \`HANDOUT_{{LESSON_ID}}.md\` | Theory Summary for Students | During EXPLAIN phase |
|
|
2600
|
-
| \`ACT_{{LESSON_ID}}.md\` | Detailed Learning Activity Operations | During EXPLORE / ELABORATE / checkpoint phases |
|
|
2601
|
-
| \`WKS_{{LESSON_ID}}.md\` | Individual Worksheet | Wrap-up or Homework |
|
|
2602
|
-
| \`QUIZ_{{LESSON_ID}}.md\` | Assessment Rubric | During EVALUATE phase |
|
|
2603
|
-
| \`EXT_{{LESSON_ID}}.md\` | Enrichment Materials | For "Gold" students |
|
|
2604
|
-
`.trim();
|
|
2605
|
-
|
|
2606
|
-
// src/templates/actTemplate.ts
|
|
2607
|
-
var ACT_TEMPLATE = `
|
|
2608
|
-
---
|
|
2609
|
-
id: "{{ID}}"
|
|
2610
|
-
title: "{{TITLE}}"
|
|
2611
|
-
type: "ACT"
|
|
2612
|
-
created_by: "Curriculum OS Builder"
|
|
2613
|
-
phase: "{{PHASE}}"
|
|
2614
|
-
deliverable: "P3-T2"
|
|
2615
|
-
version: "{{VERSION}}"
|
|
2616
|
-
date: "{{DATE}}"
|
|
2617
|
-
template_contract: "artifact-template-v1"
|
|
2618
|
-
template_required_sections:
|
|
2619
|
-
- "Computational Thinking Focus"
|
|
2620
|
-
- "Materials & Setup"
|
|
2621
|
-
- "Constraints & Safety"
|
|
2622
|
-
- "Active Learning Workflow"
|
|
2623
|
-
- "3-Tier Differentiation"
|
|
2624
|
-
- "Reflection"
|
|
2625
|
-
---
|
|
2626
|
-
<!-- INJECT_BODY -->
|
|
2627
|
-
|
|
2628
|
-
# INQUIRY-BASED ACTIVITY: {{TITLE}}
|
|
2629
|
-
_Milestone: {{MILESTONE_ID}} | Module: {{MODULE_NAME}} | Lesson: {{LESSON_ID}}_
|
|
2630
|
-
|
|
2631
|
-
## [REQUIRED] Computational Thinking Focus
|
|
2632
|
-
- **Problem Statement (Real-world Scenario):** {{PROBLEM_STATEMENT}}
|
|
2633
|
-
- **Decomposition:**
|
|
2634
|
-
{{DECOMPOSITION_STEPS}}
|
|
2635
|
-
- **Algorithm Design:** {{ALGORITHM_DESIGN}}
|
|
2636
|
-
|
|
2637
|
-
## [REQUIRED] Materials & Setup
|
|
2638
|
-
- **Reference Material:** Students should use the **HANDOUT** for this lesson as their primary technical reference (lifeline).
|
|
2639
|
-
- **Hardware/Software:**
|
|
2640
|
-
<!-- [HARDWARE_BOM] -->
|
|
2641
|
-
{{HARDWARE_ITEMS}}
|
|
2642
|
-
<!-- [/HARDWARE_BOM] -->
|
|
2643
|
-
- **Software:** {{SOFTWARE_ITEMS}}
|
|
2644
|
-
- **Consumables:** {{CONSUMABLES}}
|
|
2645
|
-
- **Other Resources:** {{OTHER_RESOURCES}}
|
|
2646
|
-
|
|
2647
|
-
## [REQUIRED] Constraints & Safety
|
|
2648
|
-
- \u26A0\uFE0F **Technical/Safety:** {{SAFETY_WARNING}}
|
|
2649
|
-
- \u{1F4A1} **Design Constraint:** {{DESIGN_CONSTRAINT}}
|
|
2650
|
-
|
|
2651
|
-
## [REQUIRED] Active Learning Workflow
|
|
2652
|
-
|
|
2653
|
-
### Phase 1: Planning & Design \u2014 {{PHASE1_DURATION}} mins
|
|
2654
|
-
- **Student Task:** Hand-draw (or draft in words) the algorithm flowchart or connection architecture before touching the computer/devices.
|
|
2655
|
-
- **Teacher Action:** Walk around to check the logic of each group. Ask inquiry questions:
|
|
2656
|
-
{{PHASE1_INQUIRY_QUESTIONS}}
|
|
2657
|
-
|
|
2658
|
-
### Phase 2: Implementation & Discovery \u2014 {{PHASE2_DURATION}} mins
|
|
2659
|
-
- **Student Task:** Apply the knowledge from the **HANDOUT** to realize the plan designed in Phase 1. Encourage self-inquiry and documentation lookup.
|
|
2660
|
-
- **Teacher Action:** Avoid "hand-holding." Only intervene if a group has been stuck for more than 5 minutes.
|
|
2661
|
-
{{PHASE2_GUIDANCE_BLOCK}}
|
|
2662
|
-
|
|
2663
|
-
### Phase 3: Debugging & Testing \u2014 {{PHASE3_DURATION}} mins
|
|
2664
|
-
- **Testing:** Students run their system.
|
|
2665
|
-
- **Error Analysis:** Ask students to record any error codes or unexpected behaviors and compare them with the Troubleshooting table in the Handout.
|
|
2666
|
-
{{PHASE3_TESTING_STEPS}}
|
|
2667
|
-
|
|
2668
|
-
## [REQUIRED] 3-Tier Differentiation
|
|
2669
|
-
> MUST design tasks in 3 tiers to support diverse learner groups. Bronze is the minimum requirement for all students.
|
|
2670
|
-
- \u{1F949} **Bronze (Foundational):** {{DIFFERENTIATION_BRONZE}}
|
|
2671
|
-
- \u{1F948} **Silver (Application):** {{DIFFERENTIATION_SILVER}}
|
|
2672
|
-
- \u{1F947} **Gold (Enrichment/Creative):** {{DIFFERENTIATION_GOLD}}
|
|
2673
|
-
|
|
2674
|
-
## [REQUIRED] Reflection
|
|
2675
|
-
- **Discussion Question:** {{REFLECTION_QUESTION}}
|
|
2676
|
-
`.trim();
|
|
2677
|
-
|
|
2678
|
-
// src/templates/codeLabTemplate.ts
|
|
2679
|
-
var CODE_LAB_TEMPLATE = `
|
|
2680
|
-
---
|
|
2681
|
-
id: "{{ID}}"
|
|
2682
|
-
title: "{{TITLE}}"
|
|
2683
|
-
type: "LAB"
|
|
2684
|
-
created_by: "Curriculum OS Builder"
|
|
2685
|
-
phase: "{{PHASE}}"
|
|
2686
|
-
deliverable: "P3-T2"
|
|
2687
|
-
version: "{{VERSION}}"
|
|
2688
|
-
date: "{{DATE}}"
|
|
2689
|
-
---
|
|
2690
|
-
<!-- INJECT_BODY -->
|
|
2691
|
-
|
|
2692
|
-
# \u{1F468}\u200D\u{1F4BB} CODE LAB: {{TITLE}}
|
|
2693
|
-
_Milestone: {{MILESTONE_ID}} | Tech Stack: {{TECH_STACK}}_
|
|
2694
|
-
|
|
2695
|
-
## \u{1F3AF} Overview
|
|
2696
|
-
This lab focuses on the practical implementation of core technical concepts, bridging theory into working, robust, and testable code.
|
|
2697
|
-
|
|
2698
|
-
## \u{1F6E0}\uFE0F Environment & Setup
|
|
2699
|
-
- **Language / Framework:** {{LANGUAGE_FRAMEWORK}}
|
|
2700
|
-
- **IDE / Editor:** {{IDE_EDITOR}}
|
|
2701
|
-
- **Required Libraries:** {{REQUIRED_LIBRARIES}}
|
|
2702
|
-
- **Hardware / Connection Setup:** {{HARDWARE_ENV_CONNECTION}}
|
|
2703
|
-
|
|
2704
|
-
## \u{1F4DD} Lab Tasks (3-Tier Differentiation)
|
|
2705
|
-
|
|
2706
|
-
### \u{1F949} Bronze (Foundational) \u2014 {{BRONZE_MINS}} mins
|
|
2707
|
-
**Objective:** {{BRONZE_OBJECTIVE}}
|
|
2708
|
-
- **Task:** {{BRONZE_TASK}}
|
|
2709
|
-
- **Requirement:** {{BRONZE_REQUIREMENT}}
|
|
2710
|
-
|
|
2711
|
-
### \u{1F948} Silver (Application) \u2014 {{SILVER_MINS}} mins
|
|
2712
|
-
**Objective:** {{SILVER_OBJECTIVE}}
|
|
2713
|
-
- **Task:** {{SILVER_TASK}}
|
|
2714
|
-
- **Requirement:** {{SILVER_REQUIREMENT}}
|
|
2715
|
-
|
|
2716
|
-
### \u{1F947} Gold (Enrichment/Creative) \u2014 {{GOLD_MINS}} mins
|
|
2717
|
-
**Objective:** {{GOLD_OBJECTIVE}}
|
|
2718
|
-
- **Task:** {{GOLD_TASK}}
|
|
2719
|
-
- **Requirement:** {{GOLD_REQUIREMENT}}
|
|
2720
|
-
|
|
2721
|
-
## \u{1F4BB} Technical Reference ([SME_MANDATE])
|
|
2722
|
-
<!-- [SME_MANDATE] -->
|
|
2723
|
-
> Any code provided in this section is verified for syntax accuracy and runtime execution.
|
|
2724
|
-
|
|
2725
|
-
### Starter Code Template
|
|
2726
|
-
\`\`\`{{CODE_LANGUAGE}}
|
|
2727
|
-
{{STARTER_CODE}}
|
|
2728
|
-
\`\`\`
|
|
2729
|
-
|
|
2730
|
-
### Solution Code
|
|
2731
|
-
\`\`\`{{CODE_LANGUAGE}}
|
|
2732
|
-
{{SOLUTION_CODE}}
|
|
2733
|
-
\`\`\`
|
|
2734
|
-
<!-- [/SME_MANDATE] -->
|
|
2735
|
-
|
|
2736
|
-
## \u{1F50D} Troubleshooting & Debugging Matrix
|
|
2737
|
-
| Issue | Potential Cause | Solution |
|
|
2738
|
-
| :--- | :--- | :--- |
|
|
2739
|
-
{{TROUBLESHOOTING_ROWS}}
|
|
2740
|
-
|
|
2741
|
-
## \u{1F3C1} Submission & Verification Checklist
|
|
2742
|
-
{{CHECKLIST_ITEMS}}
|
|
2743
|
-
`.trim();
|
|
2744
|
-
|
|
2745
|
-
// src/templates/quizTemplate.ts
|
|
2746
|
-
var QUIZ_TEMPLATE = `
|
|
2747
|
-
---
|
|
2748
|
-
id: "{{ID}}"
|
|
2749
|
-
title: "{{TITLE}}"
|
|
2750
|
-
type: "QUIZ"
|
|
2751
|
-
language: "{{LANGUAGE}}"
|
|
2752
|
-
total_questions: {{TOTAL_QUESTIONS}}
|
|
2753
|
-
passing_score_pct: {{PASSING_SCORE_PCT}}
|
|
2754
|
-
---
|
|
2755
|
-
|
|
2756
|
-
# \u{1F9E0} Diagnostic & Active Recall Quiz: {{TITLE}}
|
|
2757
|
-
|
|
2758
|
-
> \u23F1\uFE0F **Recommended Time:** ~10-15 mins
|
|
2759
|
-
> \u{1F3AF} **Passing Score:** {{PASSING_SCORE_PCT}}%
|
|
2760
|
-
> \u{1F4A1} **Purpose:** Test your conceptual understanding, catch hidden misconceptions, and evaluate architectural trade-offs.
|
|
2761
|
-
|
|
2762
|
-
---
|
|
2763
|
-
|
|
2764
|
-
{{QUESTIONS_SECTION}}
|
|
2765
|
-
|
|
2766
|
-
---
|
|
2767
|
-
|
|
2768
|
-
## \u{1F511} Comprehensive Answer Key & Deep Explanation (Expand after completing)
|
|
2769
|
-
<details>
|
|
2770
|
-
<summary><b>\u{1F449} Click to View Full Explanations & Common Pitfall Analysis</b></summary>
|
|
2771
|
-
|
|
2772
|
-
{{ANSWER_KEY_SECTION}}
|
|
2773
|
-
</details>
|
|
2774
|
-
`.trim();
|
|
2775
|
-
|
|
2776
|
-
// src/templates/selfLabTemplate.ts
|
|
2777
|
-
var SELF_LAB_TEMPLATE = `
|
|
2778
|
-
---
|
|
2779
|
-
id: "{{ID}}"
|
|
2780
|
-
title: "{{TITLE}}"
|
|
2781
|
-
type: "SELF_LAB"
|
|
2782
|
-
language: "{{LANGUAGE}}"
|
|
2783
|
-
difficulty: "{{DIFFICULTY}}"
|
|
2784
|
-
estimated_minutes: {{ESTIMATED_MINUTES}}
|
|
2785
|
-
tech_stack: {{TECH_STACK}}
|
|
2786
|
-
---
|
|
2787
|
-
|
|
2788
|
-
# \u{1F680} Self-Paced Hands-On Lab: {{TITLE}}
|
|
2789
|
-
|
|
2790
|
-
> \u23F1\uFE0F **Estimated Duration:** ~{{ESTIMATED_MINUTES}} mins
|
|
2791
|
-
> \u{1F3AF} **Difficulty Level:** {{DIFFICULTY_UPPER}}
|
|
2792
|
-
> \u{1F9F0} **Tech Stack:** {{TECH_STACK_STR}}
|
|
2793
|
-
> \u{1F4A1} **Self-Learner Notice:** You are in full control of this lab. Follow the progressive challenges below. If you get stuck at any point, use the **Progressive Hints System** to get unstuck without ruining the learning experience!
|
|
2794
|
-
|
|
2795
|
-
---
|
|
2796
|
-
|
|
2797
|
-
## \u{1F4CB} Mission Briefing & Environment Setup
|
|
2798
|
-
{{MISSION_BRIEFING}}
|
|
2799
|
-
|
|
2800
|
-
### \u{1F6EB} Preflight Checklist
|
|
2801
|
-
{{PREFLIGHT_CHECKLIST}}
|
|
2802
|
-
|
|
2803
|
-
---
|
|
2804
|
-
|
|
2805
|
-
## \u{1F3AF} Progressive Challenges (3-Tier Differentiation)
|
|
2806
|
-
|
|
2807
|
-
### \u{1F949} Challenge 1: Foundational Core (Bronze) \u2014 ~{{BRONZE_MINS}} mins
|
|
2808
|
-
**Objective:** {{BRONZE_OBJECTIVE}}
|
|
2809
|
-
|
|
2810
|
-
#### Tasks & Implementation Details:
|
|
2811
|
-
{{BRONZE_TASKS}}
|
|
2812
|
-
|
|
2813
|
-
#### \u{1F9EA} Self-Verification Command:
|
|
2814
|
-
\`\`\`bash
|
|
2815
|
-
{{BRONZE_VERIFY_COMMAND}}
|
|
2816
|
-
\`\`\`
|
|
2817
|
-
*Expected Terminal Output:*
|
|
2818
|
-
\`\`\`text
|
|
2819
|
-
{{BRONZE_EXPECTED_OUTPUT}}
|
|
2820
|
-
\`\`\`
|
|
2821
|
-
|
|
2822
|
-
#### \u{1F4A1} Progressive Hints (Expand only if stuck):
|
|
2823
|
-
<details>
|
|
2824
|
-
<summary><b>\u{1F4A1} Hint Level 1: Conceptual Clue (H\u01B0\u1EDBng t\u01B0 duy)</b></summary>
|
|
2825
|
-
|
|
2826
|
-
{{BRONZE_HINT_1}}
|
|
2827
|
-
</details>
|
|
2828
|
-
|
|
2829
|
-
<details>
|
|
2830
|
-
<summary><b>\u{1F50D} Hint Level 2: Structural Skeleton (Khung code m\u1EABu)</b></summary>
|
|
2831
|
-
|
|
2832
|
-
\`\`\`{{CODE_LANGUAGE}}
|
|
2833
|
-
{{BRONZE_HINT_2}}
|
|
2834
|
-
\`\`\`
|
|
2835
|
-
</details>
|
|
2836
|
-
|
|
2837
|
-
<details>
|
|
2838
|
-
<summary><b>\u{1F6A8} Hint Level 3: Full Solution & Explanation (L\u1EDDi gi\u1EA3i tr\u1ECDn v\u1EB9n)</b></summary>
|
|
2839
|
-
|
|
2840
|
-
\`\`\`{{CODE_LANGUAGE}}
|
|
2841
|
-
{{BRONZE_HINT_3_CODE}}
|
|
2842
|
-
\`\`\`
|
|
2843
|
-
|
|
2844
|
-
**Why this solution works:**
|
|
2845
|
-
{{BRONZE_HINT_3_EXPLANATION}}
|
|
2846
|
-
</details>
|
|
2847
|
-
|
|
2848
|
-
---
|
|
2849
|
-
|
|
2850
|
-
### \u{1F948} Challenge 2: Logic & Error Handling (Silver) \u2014 ~{{SILVER_MINS}} mins
|
|
2851
|
-
**Objective:** {{SILVER_OBJECTIVE}}
|
|
2852
|
-
|
|
2853
|
-
#### Tasks & Implementation Details:
|
|
2854
|
-
{{SILVER_TASKS}}
|
|
2855
|
-
|
|
2856
|
-
#### \u{1F9EA} Self-Verification Command:
|
|
2857
|
-
\`\`\`bash
|
|
2858
|
-
{{SILVER_VERIFY_COMMAND}}
|
|
2859
|
-
\`\`\`
|
|
2860
|
-
*Expected Terminal Output:*
|
|
2861
|
-
\`\`\`text
|
|
2862
|
-
{{SILVER_EXPECTED_OUTPUT}}
|
|
2863
|
-
\`\`\`
|
|
2864
|
-
|
|
2865
|
-
#### \u{1F4A1} Progressive Hints (Expand only if stuck):
|
|
2866
|
-
<details>
|
|
2867
|
-
<summary><b>\u{1F4A1} Hint Level 1: Conceptual Clue (H\u01B0\u1EDBng t\u01B0 duy)</b></summary>
|
|
2868
|
-
|
|
2869
|
-
{{SILVER_HINT_1}}
|
|
2870
|
-
</details>
|
|
2871
|
-
|
|
2872
|
-
<details>
|
|
2873
|
-
<summary><b>\u{1F50D} Hint Level 2: Structural Skeleton (Khung code m\u1EABu)</b></summary>
|
|
2874
|
-
|
|
2875
|
-
\`\`\`{{CODE_LANGUAGE}}
|
|
2876
|
-
{{SILVER_HINT_2}}
|
|
2877
|
-
\`\`\`
|
|
2878
|
-
</details>
|
|
2879
|
-
|
|
2880
|
-
<details>
|
|
2881
|
-
<summary><b>\u{1F6A8} Hint Level 3: Full Solution & Explanation (L\u1EDDi gi\u1EA3i tr\u1ECDn v\u1EB9n)</b></summary>
|
|
2882
|
-
|
|
2883
|
-
\`\`\`{{CODE_LANGUAGE}}
|
|
2884
|
-
{{SILVER_HINT_3_CODE}}
|
|
2885
|
-
\`\`\`
|
|
2886
|
-
|
|
2887
|
-
**Why this solution works:**
|
|
2888
|
-
{{SILVER_HINT_3_EXPLANATION}}
|
|
2889
|
-
</details>
|
|
2890
|
-
|
|
2891
|
-
---
|
|
2892
|
-
|
|
2893
|
-
### \u{1F947} Challenge 3: Edge Cases & Optimization (Gold) \u2014 ~{{GOLD_MINS}} mins
|
|
2894
|
-
**Objective:** {{GOLD_OBJECTIVE}}
|
|
2895
|
-
|
|
2896
|
-
#### Tasks & Implementation Details:
|
|
2897
|
-
{{GOLD_TASKS}}
|
|
2898
|
-
|
|
2899
|
-
#### \u{1F9EA} Self-Verification Command:
|
|
2900
|
-
\`\`\`bash
|
|
2901
|
-
{{GOLD_VERIFY_COMMAND}}
|
|
2902
|
-
\`\`\`
|
|
2903
|
-
*Expected Terminal Output:*
|
|
2904
|
-
\`\`\`text
|
|
2905
|
-
{{GOLD_EXPECTED_OUTPUT}}
|
|
2906
|
-
\`\`\`
|
|
2907
|
-
|
|
2908
|
-
#### \u{1F4A1} Progressive Hints (Expand only if stuck):
|
|
2909
|
-
<details>
|
|
2910
|
-
<summary><b>\u{1F4A1} Hint Level 1: Conceptual Clue (H\u01B0\u1EDBng t\u01B0 duy)</b></summary>
|
|
2911
|
-
|
|
2912
|
-
{{GOLD_HINT_1}}
|
|
2913
|
-
</details>
|
|
2914
|
-
|
|
2915
|
-
<details>
|
|
2916
|
-
<summary><b>\u{1F50D} Hint Level 2: Structural Skeleton (Khung code m\u1EABu)</b></summary>
|
|
2917
|
-
|
|
2918
|
-
\`\`\`{{CODE_LANGUAGE}}
|
|
2919
|
-
{{GOLD_HINT_2}}
|
|
2920
|
-
\`\`\`
|
|
2921
|
-
</details>
|
|
2922
|
-
|
|
2923
|
-
<details>
|
|
2924
|
-
<summary><b>\u{1F6A8} Hint Level 3: Full Solution & Explanation (L\u1EDDi gi\u1EA3i tr\u1ECDn v\u1EB9n)</b></summary>
|
|
2925
|
-
|
|
2926
|
-
\`\`\`{{CODE_LANGUAGE}}
|
|
2927
|
-
{{GOLD_HINT_3_CODE}}
|
|
2928
|
-
\`\`\`
|
|
2929
|
-
|
|
2930
|
-
**Why this solution works:**
|
|
2931
|
-
{{GOLD_HINT_3_EXPLANATION}}
|
|
2932
|
-
</details>
|
|
2933
|
-
|
|
2934
|
-
---
|
|
2935
|
-
|
|
2936
|
-
## \u{1F50D} Self-Learner Troubleshooting Matrix
|
|
2937
|
-
| Symptom / Error Message | Root Cause | Exact Fix |
|
|
2938
|
-
| :--- | :--- | :--- |
|
|
2939
|
-
{{TROUBLESHOOTING_ROWS}}
|
|
2940
|
-
|
|
2941
|
-
---
|
|
2942
|
-
|
|
2943
|
-
## \u{1F3C1} Final Lab Submission & Mastery Checklist
|
|
2944
|
-
{{FINAL_CHECKLIST}}
|
|
2945
|
-
`.trim();
|
|
2506
|
+
function stripTemplateFrontmatter(raw) {
|
|
2507
|
+
let body = raw;
|
|
2508
|
+
if (body.startsWith("---")) {
|
|
2509
|
+
const end = body.indexOf("\n---", 3);
|
|
2510
|
+
if (end !== -1) body = body.slice(end + 4);
|
|
2511
|
+
}
|
|
2512
|
+
return body.split("\n").filter((l) => l.trim() !== "<!-- INJECT_BODY -->").join("\n").replace(/^\s*\n/, "").trimEnd();
|
|
2513
|
+
}
|
|
2514
|
+
var KIT_TEMPLATE_FALLBACK_DIRS = [
|
|
2515
|
+
// Packaged with the npm bundle (dist/templates) — resolves from node_modules.
|
|
2516
|
+
"templates",
|
|
2517
|
+
// Repo checkout layouts.
|
|
2518
|
+
"docs/refs/templates"
|
|
2519
|
+
];
|
|
2520
|
+
var _moduleDir = (() => {
|
|
2521
|
+
try {
|
|
2522
|
+
if (typeof ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)) }) !== "undefined" && typeof (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)) === "string") {
|
|
2523
|
+
return path__default.default.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href))));
|
|
2524
|
+
}
|
|
2525
|
+
} catch {
|
|
2526
|
+
}
|
|
2527
|
+
return typeof __dirname !== "undefined" ? __dirname : process.cwd();
|
|
2528
|
+
})();
|
|
2529
|
+
function candidateDirs(explicitDir) {
|
|
2530
|
+
const dirs = [];
|
|
2531
|
+
if (process.env.CURRICULUM_TEMPLATES_DIR) dirs.push(process.env.CURRICULUM_TEMPLATES_DIR);
|
|
2532
|
+
dirs.push(path__default.default.resolve(process.cwd(), "_templates"));
|
|
2533
|
+
for (const rel of KIT_TEMPLATE_FALLBACK_DIRS) {
|
|
2534
|
+
dirs.push(path__default.default.resolve(_moduleDir, rel));
|
|
2535
|
+
dirs.push(path__default.default.resolve(process.cwd(), rel));
|
|
2536
|
+
dirs.push(path__default.default.resolve(process.cwd(), "packages/curriculum-kit", rel));
|
|
2537
|
+
}
|
|
2538
|
+
return dirs;
|
|
2539
|
+
}
|
|
2540
|
+
function findTemplatePath(templateName, explicitDir) {
|
|
2541
|
+
for (const dir of candidateDirs()) {
|
|
2542
|
+
const p = path__default.default.join(dir, templateName);
|
|
2543
|
+
if (!fs2__default.default.existsSync(p)) continue;
|
|
2544
|
+
try {
|
|
2545
|
+
fs2__default.default.accessSync(p, fs2__default.default.constants.R_OK);
|
|
2546
|
+
return p;
|
|
2547
|
+
} catch {
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
return null;
|
|
2551
|
+
}
|
|
2552
|
+
function loadAuthoringTemplate(templateName, templatesDir) {
|
|
2553
|
+
const p = findTemplatePath(templateName);
|
|
2554
|
+
if (!p) return "";
|
|
2555
|
+
try {
|
|
2556
|
+
return stripTemplateFrontmatter(fs2__default.default.readFileSync(p, "utf-8"));
|
|
2557
|
+
} catch {
|
|
2558
|
+
return "";
|
|
2559
|
+
}
|
|
2560
|
+
}
|
|
2946
2561
|
|
|
2947
2562
|
// src/ai/prompts/lessonMasterPrompt.ts
|
|
2948
2563
|
function buildLessonMasterPrompt(input) {
|
|
@@ -2996,7 +2611,7 @@ Build a deep, rigorous, and highly pedagogical Master Lesson Plan (LESSON) that
|
|
|
2996
2611
|
# MANDATORY TEMPLATE STRUCTURE
|
|
2997
2612
|
You MUST generate structured data that will render directly into this exact Markdown template:
|
|
2998
2613
|
---
|
|
2999
|
-
${
|
|
2614
|
+
${loadAuthoringTemplate("LESSON_5E_template.md") ?? "[TEMPLATE FILE NOT FOUND: LESSON_5E_template.md]"}
|
|
3000
2615
|
---
|
|
3001
2616
|
|
|
3002
2617
|
# INPUT PARAMETERS
|
|
@@ -3074,7 +2689,7 @@ Transform the exact pedagogical flow and activities from the Master Lesson Plan
|
|
|
3074
2689
|
# MANDATORY TEMPLATE STRUCTURE
|
|
3075
2690
|
You MUST generate data aligned with this Markdown template:
|
|
3076
2691
|
---
|
|
3077
|
-
${
|
|
2692
|
+
${loadAuthoringTemplate("ACT_template.md") ?? "[TEMPLATE FILE NOT FOUND: ACT_template.md]"}
|
|
3078
2693
|
---
|
|
3079
2694
|
|
|
3080
2695
|
# CANONICAL MASTER LESSON CONTEXT (SOURCE OF TRUTH)
|
|
@@ -3169,7 +2784,7 @@ Generate complete, verified source code that satisfies the lesson objectives and
|
|
|
3169
2784
|
# MANDATORY TEMPLATE STRUCTURE
|
|
3170
2785
|
You MUST generate data aligned with this Markdown template:
|
|
3171
2786
|
---
|
|
3172
|
-
${
|
|
2787
|
+
${loadAuthoringTemplate("LAB_TEMPLATE.md") ?? "[TEMPLATE FILE NOT FOUND: LAB_TEMPLATE.md]"}
|
|
3173
2788
|
---
|
|
3174
2789
|
|
|
3175
2790
|
# CANONICAL LESSON CONTEXT (SOURCE OF TRUTH)
|
|
@@ -3667,7 +3282,7 @@ Build a complete, engaging Self-Paced Hands-On Lab (SELF_LAB) for autonomous lea
|
|
|
3667
3282
|
# MANDATORY TEMPLATE STRUCTURE
|
|
3668
3283
|
You MUST generate data aligned with this Markdown template:
|
|
3669
3284
|
---
|
|
3670
|
-
${
|
|
3285
|
+
${loadAuthoringTemplate("SELF_LAB_template.md") ?? "[TEMPLATE FILE NOT FOUND: SELF_LAB_template.md]"}
|
|
3671
3286
|
---
|
|
3672
3287
|
|
|
3673
3288
|
# INPUT PARAMETERS
|
|
@@ -3804,7 +3419,7 @@ Use this mapping to determine which Bloom level each question truly targets. Mat
|
|
|
3804
3419
|
# MANDATORY TEMPLATE STRUCTURE
|
|
3805
3420
|
You MUST generate data aligned with this Markdown template:
|
|
3806
3421
|
---
|
|
3807
|
-
${
|
|
3422
|
+
${loadAuthoringTemplate("QUIZ_v4.6_template.md") ?? "[TEMPLATE FILE NOT FOUND: QUIZ_v4.6_template.md]"}
|
|
3808
3423
|
---
|
|
3809
3424
|
|
|
3810
3425
|
# INPUT PARAMETERS
|