@plasius/learning 0.2.1 → 0.2.2
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/README.md +12 -1
- package/dist/index.cjs +216 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +215 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/assessment.ts","../src/catalog.ts","../src/contracts.ts","../src/rubric-validation.ts","../src/mission-authoring.ts","../src/validation.ts"],"sourcesContent":["export * from \"./assessment.js\";\nexport * from \"./catalog.js\";\nexport * from \"./contracts.js\";\nexport * from \"./validation.js\";\n","import type {\n AssessmentCheckResultV1,\n AssessmentResultV1,\n AssessmentRubricV1,\n ScoreBandV1,\n} from \"./contracts.js\";\n\nfunction scoreBand(score: number): ScoreBandV1 {\n if (score >= 95) return \"mastered\";\n if (score >= 80) return \"mission-complete\";\n if (score >= 60) return \"nearly-there\";\n return \"keep-exploring\";\n}\n\n/**\n * Calculate a score solely from rubric criteria and objective check results.\n * Missing criteria fail closed; unknown and duplicate result IDs are rejected.\n */\nexport function calculateAssessment(\n rubric: AssessmentRubricV1,\n results: AssessmentCheckResultV1[],\n): AssessmentResultV1 {\n const knownIds = new Set(rubric.criteria.map((criterion) => criterion.id));\n const resultById = new Map<string, AssessmentCheckResultV1>();\n\n for (const result of results) {\n if (!knownIds.has(result.criterionId)) {\n throw new Error(`Unknown assessment criterion: ${result.criterionId}`);\n }\n if (resultById.has(result.criterionId)) {\n throw new Error(`Duplicate assessment result: ${result.criterionId}`);\n }\n resultById.set(result.criterionId, result);\n }\n\n let score = 0;\n const passedCriterionIds: string[] = [];\n const failedCriterionIds: string[] = [];\n const failedMandatoryCriterionIds: string[] = [];\n\n for (const criterion of rubric.criteria) {\n const passed = resultById.get(criterion.id)?.passed === true;\n if (passed) {\n score += criterion.points;\n passedCriterionIds.push(criterion.id);\n continue;\n }\n\n failedCriterionIds.push(criterion.id);\n if (criterion.mandatory) failedMandatoryCriterionIds.push(criterion.id);\n }\n\n return {\n score,\n band: scoreBand(score),\n completed:\n score >= rubric.completionScore && failedMandatoryCriterionIds.length === 0,\n passedCriterionIds,\n failedCriterionIds,\n failedMandatoryCriterionIds,\n };\n}\n","import type {\n AssessmentRubricV1,\n CourseMaterialsManifestV1,\n HardwareItemV1,\n HardwareRequirementManifestV1,\n LearningModuleVersionV1,\n LearningPathVersionV1,\n MissionV1,\n ModuleAgentDefinitionV1,\n ModuleCategoryV1,\n} from \"./contracts.js\";\n\nconst SOFTWARE_HARDWARE: HardwareRequirementManifestV1 = {\n requirementsVersion: \"1.0.0\",\n mode: \"none\",\n hardwareIncluded: false,\n simulatorAvailable: true,\n verificationStatus: \"not-applicable\",\n publicSaleBlocked: false,\n preparationMinutes: 0,\n items: [],\n warnings: [\"No specialist physical equipment is required.\"],\n supportedPlatforms: [\"Current Chromium, Firefox or Safari browser\"],\n};\n\nconst CORE_ROBOT_ITEMS: HardwareItemV1[] = [\n {\n id: \"pico-2-w\",\n label: \"Raspberry Pi Pico 2 W\",\n quantity: 1,\n requirement: \"required\",\n exactSpecification: \"Raspberry Pi Pico 2 W with soldered headers\",\n adultOnly: false,\n stage: \"core\",\n },\n {\n id: \"breadboard\",\n label: \"Solderless breadboard\",\n quantity: 1,\n requirement: \"required\",\n exactSpecification: \"400-point or larger solderless breadboard\",\n adultOnly: false,\n stage: \"core\",\n },\n {\n id: \"usb-data-cable\",\n label: \"USB data cable\",\n quantity: 1,\n requirement: \"required\",\n exactSpecification: \"Data-capable USB cable compatible with the Pico 2 W\",\n adultOnly: false,\n stage: \"core\",\n },\n {\n id: \"jumper-wires\",\n label: \"Jumper wires\",\n quantity: 12,\n requirement: \"required\",\n exactSpecification: \"Insulated male-to-male breadboard jumper wires\",\n adultOnly: false,\n stage: \"core\",\n },\n];\n\nconst ROBOT_WARNING =\n \"Physical publication is blocked until every listed actuator, driver, sensor and power configuration passes an adult bench test.\";\n\nfunction physicalHardware(\n requirementsVersion: string,\n preparationMinutes: number,\n items: HardwareItemV1[],\n platforms: string[],\n): HardwareRequirementManifestV1 {\n return {\n requirementsVersion,\n mode: \"physical-first\",\n hardwareIncluded: false,\n simulatorAvailable: true,\n verificationStatus: \"pending-bench-test\",\n publicSaleBlocked: true,\n preparationMinutes,\n items: [...CORE_ROBOT_ITEMS, ...items],\n warnings: [ROBOT_WARNING, \"An adult must disconnect actuator power before changing wiring.\"],\n supportedPlatforms: platforms,\n };\n}\n\nfunction materials(slug: string, robot = false): CourseMaterialsManifestV1 {\n return {\n version: \"1.0.0\",\n learner: [\n { id: `${slug}-child-guide`, kind: \"child-guide\", audience: \"learner\" },\n { id: `${slug}-mission-cards`, kind: \"mission-cards\", audience: \"learner\" },\n { id: `${slug}-starter`, kind: \"starter-project\", audience: \"learner\" },\n { id: `${slug}-assets`, kind: \"asset-pack\", audience: \"learner\" },\n { id: `${slug}-printable`, kind: \"printable\", audience: \"learner\" },\n ],\n facilitator: [\n { id: `${slug}-facilitator`, kind: \"facilitator-guide\", audience: \"facilitator\" },\n { id: `${slug}-answers`, kind: \"answer-key\", audience: \"facilitator\" },\n { id: `${slug}-tests`, kind: \"protected-tests\", audience: \"facilitator\" },\n ...(robot\n ? [\n {\n id: `${slug}-hardware`,\n kind: \"hardware-guide\" as const,\n audience: \"facilitator\" as const,\n },\n ]\n : []),\n ],\n };\n}\n\nfunction agents(slug: string): ModuleAgentDefinitionV1[] {\n return [\n {\n id: `${slug}-assessor`,\n role: \"assessor\",\n evidenceBound: true,\n maySuggestSingleFix: false,\n mayAssignScore: false,\n mayAwardReward: false,\n mayPublish: false,\n mayControlHardware: false,\n },\n {\n id: `${slug}-debugger`,\n role: \"debugger\",\n evidenceBound: true,\n maySuggestSingleFix: false,\n mayAssignScore: false,\n mayAwardReward: false,\n mayPublish: false,\n mayControlHardware: false,\n },\n {\n id: `${slug}-fix-guide`,\n role: \"fix-guide\",\n evidenceBound: true,\n maySuggestSingleFix: true,\n mayAssignScore: false,\n mayAwardReward: false,\n mayPublish: false,\n mayControlHardware: false,\n },\n {\n id: `${slug}-concept-explainer`,\n role: \"concept-explainer\",\n evidenceBound: true,\n maySuggestSingleFix: false,\n mayAssignScore: false,\n mayAwardReward: false,\n mayPublish: false,\n mayControlHardware: false,\n },\n ];\n}\n\nfunction rubric(slug: string): AssessmentRubricV1 {\n return {\n version: \"1.0.0\",\n completionScore: 80,\n criteria: [\n {\n id: `${slug}-build`,\n label: \"The project is structurally valid and starts successfully.\",\n dimension: \"structure\",\n points: 20,\n mandatory: true,\n visibility: \"visible\",\n },\n {\n id: `${slug}-goal-one`,\n label: \"The first published project behaviour works.\",\n dimension: \"behaviour\",\n points: 20,\n mandatory: true,\n visibility: \"visible\",\n },\n {\n id: `${slug}-goal-two`,\n label: \"The second published project behaviour works.\",\n dimension: \"behaviour\",\n points: 20,\n mandatory: true,\n visibility: \"visible\",\n },\n {\n id: `${slug}-goal-three`,\n label: \"The complete project challenge works.\",\n dimension: \"behaviour\",\n points: 10,\n mandatory: false,\n visibility: \"visible\",\n },\n {\n id: `${slug}-edge-one`,\n label: \"The project handles its first protected edge case.\",\n dimension: \"resilience\",\n points: 10,\n mandatory: false,\n visibility: \"protected\",\n },\n {\n id: `${slug}-edge-two`,\n label: \"The project handles its second protected edge case.\",\n dimension: \"resilience\",\n points: 10,\n mandatory: false,\n visibility: \"protected\",\n },\n {\n id: `${slug}-safety`,\n label: \"The project obeys its mandatory safety and privacy boundary.\",\n dimension: \"safety\",\n points: 10,\n mandatory: true,\n visibility: \"visible\",\n },\n ],\n };\n}\n\nfunction mission(\n slug: string,\n index: number,\n title: string,\n concepts: string[],\n statement: string,\n sideAdventure: string,\n): MissionV1 {\n return {\n id: `${slug}-mission-${index}`,\n title,\n estimatedMinutes: index === 4 ? 25 : 20,\n concepts,\n goals: [\n {\n id: `${slug}-goal-${index}`,\n statement,\n evidence: \"assessment\",\n },\n ],\n sideAdventure,\n };\n}\n\ninterface ModuleInput {\n slug: string;\n title: string;\n category: ModuleCategoryV1;\n summary: string;\n tools: string[];\n concepts: string[];\n tokenSubunits: string;\n hosting?: boolean;\n hardware?: HardwareRequirementManifestV1;\n missionTitles: [string, string, string, string];\n}\n\nfunction module(input: ModuleInput): LearningModuleVersionV1 {\n const isRobot = input.category === \"robot\";\n return {\n id: `junior-coder.${input.slug}`,\n slug: input.slug,\n version: \"1.0.0\",\n contentRevision: \"2026-07-21.1\",\n title: input.title,\n category: input.category,\n summary: input.summary,\n estimatedMinutes: 90,\n tools: input.tools,\n concepts: input.concepts,\n selfContained: true,\n prerequisiteModuleIds: [],\n pricing: {\n state: \"pilot-grant-only\",\n tokenSubunits: input.tokenSubunits,\n includesMaterials: true,\n includesAssessmentRetries: true,\n includesAgents: true,\n includesHostingAllowance: input.hosting ?? false,\n },\n materials: materials(input.slug, isRobot),\n hardware: input.hardware ?? SOFTWARE_HARDWARE,\n missions: input.missionTitles.map((title, index) =>\n mission(\n input.slug,\n index + 1,\n title,\n input.concepts.slice(0, 3),\n `Complete ${title.toLocaleLowerCase(\"en-GB\")} and explain the observed result.`,\n `Invent one safe remix for ${title.toLocaleLowerCase(\"en-GB\")}.`,\n ),\n ),\n assessment: rubric(input.slug),\n agents: agents(input.slug),\n badges: [\n {\n id: `${input.slug}-mission-complete`,\n title: `${input.title} Champion`,\n evidence: \"module-score\",\n tradeable: false,\n tokenConvertible: false,\n },\n ...(isRobot\n ? [\n {\n id: `${input.slug}-physical-builder`,\n title: `${input.title} Physical Builder`,\n evidence: \"adult-physical-signoff\" as const,\n tradeable: false as const,\n tokenConvertible: false as const,\n },\n ]\n : []),\n ],\n };\n}\n\nconst modules: LearningModuleVersionV1[] = [\n module({\n slug: \"robot-maze-dash\",\n title: \"Robot Maze Dash\",\n category: \"game\",\n summary: \"Guide rescue robots through original mazes with visual programs and side-by-side text code.\",\n tools: [\"Visual blocks\", \"JavaScript view\", \"Python view\", \"C++ view\"],\n concepts: [\"sequence\", \"variables\", \"loops\", \"conditions\", \"functions\"],\n tokenSubunits: \"8000\",\n missionTitles: [\"Meet Your Robot\", \"Repeat the Rescue\", \"Choose the Safe Path\", \"Lost Robot Challenge\"],\n }),\n module({\n slug: \"road-hopper-rally\",\n title: \"Road Hopper Rally\",\n category: \"game\",\n summary: \"Build an original road-crossing game with changing lanes and rescue targets.\",\n tools: [\"JavaScript\", \"Educational canvas API\"],\n concepts: [\"events\", \"coordinates\", \"animation\", \"collision\", \"scoring\"],\n tokenSubunits: \"10000\",\n missionTitles: [\"Draw the Rescue Road\", \"Move the Hopper\", \"Add Moving Traffic\", \"Rally Challenge\"],\n }),\n module({\n slug: \"skywing-sprint\",\n title: \"Skywing Sprint\",\n category: \"game\",\n summary: \"Fly a rescue craft through procedurally changing sky gates.\",\n tools: [\"JavaScript\", \"Educational canvas API\"],\n concepts: [\"velocity\", \"gravity\", \"timing\", \"randomness\", \"obstacles\"],\n tokenSubunits: \"10000\",\n missionTitles: [\"Give Skywing Lift\", \"Build a Gate\", \"Score a Safe Flight\", \"Sky Sprint Challenge\"],\n }),\n module({\n slug: \"paddle-pulse\",\n title: \"Paddle Pulse\",\n category: \"game\",\n summary: \"Create a paddle-and-energy-ball arcade game with levels and original power-ups.\",\n tools: [\"JavaScript\", \"Educational canvas API\"],\n concepts: [\"angles\", \"collision response\", \"levels\", \"power-ups\", \"state\"],\n tokenSubunits: \"12000\",\n missionTitles: [\"Move the Pulse Paddle\", \"Bounce the Energy Ball\", \"Build a Target Wall\", \"Power-Up Challenge\"],\n }),\n module({\n slug: \"meteor-shield\",\n title: \"Meteor Shield\",\n category: \"game\",\n summary: \"Protect rescue bases with careful targeting and limited shield energy.\",\n tools: [\"JavaScript\", \"Educational canvas API\"],\n concepts: [\"targeting\", \"projectiles\", \"timers\", \"waves\", \"resources\"],\n tokenSubunits: \"12000\",\n missionTitles: [\"Mark the Rescue Bases\", \"Launch a Shield\", \"Create Meteor Waves\", \"Last Base Challenge\"],\n }),\n module({\n slug: \"rescue-crew-commander\",\n title: \"Rescue Crew Commander\",\n category: \"game\",\n summary: \"Assign safe jobs, routes and priorities to a team of original helper creatures.\",\n tools: [\"Visual blocks\", \"JavaScript\"],\n concepts: [\"state machines\", \"routes\", \"priorities\", \"group behaviour\", \"debugging\"],\n tokenSubunits: \"14000\",\n missionTitles: [\"Meet the Rescue Crew\", \"Give a Crew Job\", \"Choose a Safe Route\", \"Commander Challenge\"],\n }),\n module({\n slug: \"pixel-trail-challenge\",\n title: \"Pixel Trail Challenge\",\n category: \"game\",\n summary: \"Use Python lists and grid movement to grow a safe energy trail.\",\n tools: [\"Python\", \"Pyodide\", \"Educational drawing API\"],\n concepts: [\"lists\", \"grid movement\", \"spawning\", \"collision\", \"score\"],\n tokenSubunits: \"10000\",\n missionTitles: [\"Move the Pixel\", \"Grow the Trail\", \"Place Energy Orbs\", \"Trail Challenge\"],\n }),\n module({\n slug: \"star-defender-squadron\",\n title: \"Star Defender Squadron\",\n category: \"game\",\n summary: \"Build a multi-level space-rescue finale with original entities and enemy patterns.\",\n tools: [\"Python\", \"JavaScript\", \"Educational drawing API\"],\n concepts: [\"entities\", \"projectiles\", \"patterns\", \"health\", \"levels\"],\n tokenSubunits: \"16000\",\n missionTitles: [\"Launch the Squadron\", \"Build a Rescue Wave\", \"Add Shields and Health\", \"Star Defender Finale\"],\n }),\n module({\n slug: \"beacon-bot\",\n title: \"Beacon Bot\",\n category: \"robot\",\n summary: \"Program visible and infrared rescue signals with C++ and a Pico 2 W.\",\n tools: [\"C++\", \"Pico 2 W\", \"Simulator\"],\n concepts: [\"digital output\", \"timing\", \"functions\", \"signals\", \"sensor input\"],\n tokenSubunits: \"8000\",\n hardware: physicalHardware(\"1.0.0\", 30, [\n { id: \"led-pack\", label: \"Visible LEDs\", quantity: 3, requirement: \"required\", exactSpecification: \"5 mm low-current red, amber and green LEDs\", adultOnly: false, stage: \"core\" },\n { id: \"led-resistors\", label: \"LED current-limiting resistors\", quantity: 3, requirement: \"required\", exactSpecification: \"330 ohm, 0.25 W resistors\", adultOnly: false, stage: \"core\" },\n { id: \"ir-pair\", label: \"Infrared emitter and receiver\", quantity: 1, requirement: \"required\", exactSpecification: \"Matched 940 nm IR LED and 3.3 V-compatible digital receiver pair; exact reference model pending bench verification\", adultOnly: true, stage: \"sensor\" },\n ], [\"Pico SDK on Raspberry Pi OS or supported desktop toolchain\"]),\n missionTitles: [\"Blink a Rescue Signal\", \"Build a Signal Function\", \"Send an IR Message\", \"Beacon Challenge\"],\n }),\n module({\n slug: \"servo-creature\",\n title: \"Servo Creature\",\n category: \"robot\",\n summary: \"Give a servo creature safe movements, moods and sensor reactions.\",\n tools: [\"C++\", \"Pico 2 W\", \"Simulator\"],\n concepts: [\"PWM\", \"angles\", \"sequences\", \"limits\", \"interaction\"],\n tokenSubunits: \"10000\",\n hardware: physicalHardware(\"1.0.0\", 40, [\n { id: \"micro-servo\", label: \"Micro servo\", quantity: 1, requirement: \"required\", exactSpecification: \"3.3 V signal-compatible micro servo; exact reference model and external power arrangement pending bench verification\", adultOnly: true, stage: \"servo\" },\n { id: \"servo-power\", label: \"Servo power supply\", quantity: 1, requirement: \"required\", exactSpecification: \"Switched regulated supply sized for the verified servo, with common signal ground\", adultOnly: true, stage: \"servo\" },\n ], [\"Pico SDK on Raspberry Pi OS or supported desktop toolchain\"]),\n missionTitles: [\"Wake the Creature\", \"Make a Movement Sequence\", \"Choose a Mood\", \"Creature Show Challenge\"],\n }),\n module({\n slug: \"dance-rover\",\n title: \"Dance Rover\",\n category: \"robot\",\n summary: \"Build reusable movement functions and a fail-safe rover dance.\",\n tools: [\"C++\", \"Pico 2 W\", \"Simulator\"],\n concepts: [\"motor direction\", \"PWM speed\", \"functions\", \"sequences\", \"emergency stop\"],\n tokenSubunits: \"14000\",\n hardware: physicalHardware(\"1.0.0\", 90, [\n { id: \"dual-motor-driver\", label: \"Dual motor driver\", quantity: 1, requirement: \"required\", exactSpecification: \"3.3 V logic-compatible dual H-bridge; exact reference model pending bench verification\", adultOnly: true, stage: \"rover\" },\n { id: \"geared-motors\", label: \"Matching geared motors\", quantity: 2, requirement: \"required\", exactSpecification: \"Matching low-voltage geared DC motors compatible with the verified driver and supply\", adultOnly: true, stage: \"rover\" },\n { id: \"rover-chassis\", label: \"Rover chassis set\", quantity: 1, requirement: \"required\", exactSpecification: \"Two-wheel chassis with matching wheels and caster or skid\", adultOnly: true, stage: \"rover\" },\n { id: \"motor-power\", label: \"Switched motor power supply\", quantity: 1, requirement: \"required\", exactSpecification: \"Fused or protected switched supply within verified driver and motor ratings\", adultOnly: true, stage: \"rover\" },\n ], [\"Pico SDK on Raspberry Pi OS or supported desktop toolchain\"]),\n missionTitles: [\"Lifted-Wheel Safety Test\", \"Drive and Turn\", \"Build Movement Functions\", \"Rover Dance Challenge\"],\n }),\n module({\n slug: \"obstacle-explorer\",\n title: \"Obstacle Explorer\",\n category: \"robot\",\n summary: \"Use IR sensing, state and watchdogs to navigate and stop safely.\",\n tools: [\"C++\", \"Pico 2 W\", \"Simulator\"],\n concepts: [\"booleans\", \"state\", \"navigation\", \"watchdogs\", \"fail-safe stop\"],\n tokenSubunits: \"14000\",\n hardware: physicalHardware(\"1.0.0\", 60, [\n { id: \"verified-rover\", label: \"Verified Dance Rover build\", quantity: 1, requirement: \"required\", exactSpecification: \"Bench-signed rover matching the published Dance Rover reference build\", adultOnly: true, stage: \"rover\" },\n { id: \"obstacle-sensors\", label: \"Digital IR obstacle sensors\", quantity: 2, requirement: \"required\", exactSpecification: \"3.3 V-compatible digital IR obstacle sensors; exact reference model pending bench verification\", adultOnly: true, stage: \"sensor\" },\n ], [\"Pico SDK on Raspberry Pi OS or supported desktop toolchain\"]),\n missionTitles: [\"Read an Obstacle\", \"Choose a Safe Response\", \"Add a Watchdog\", \"Explorer Maze Challenge\"],\n }),\n module({\n slug: \"rainbow-rescue-rover\",\n title: \"Rainbow Rescue Rover\",\n category: \"robot\",\n summary: \"Recognise local colour targets and send bounded serial commands to a safe rover.\",\n tools: [\"Python\", \"C++\", \"Pico 2 W\", \"Pi Zero 2 W\", \"Camera Module 3\", \"Simulator\"],\n concepts: [\"colour recognition\", \"coordinates\", \"serial protocol\", \"heartbeats\", \"integration\"],\n tokenSubunits: \"18000\",\n hardware: physicalHardware(\"1.0.0\", 120, [\n { id: \"verified-explorer\", label: \"Verified Obstacle Explorer build\", quantity: 1, requirement: \"required\", exactSpecification: \"Bench-signed rover matching the published Obstacle Explorer reference build\", adultOnly: true, stage: \"rover\" },\n { id: \"pi-zero-2-w\", label: \"Raspberry Pi Zero 2 W\", quantity: 1, requirement: \"required\", exactSpecification: \"Raspberry Pi Zero 2 W with supported Raspberry Pi OS image\", adultOnly: true, stage: \"camera\" },\n { id: \"camera-3\", label: \"Raspberry Pi Camera Module 3\", quantity: 1, requirement: \"required\", exactSpecification: \"Raspberry Pi Camera Module 3 with the correct Zero-series camera ribbon\", adultOnly: true, stage: \"camera\" },\n { id: \"pi-storage-power\", label: \"Pi storage and power\", quantity: 1, requirement: \"required\", exactSpecification: \"Supported microSD card and regulated Raspberry Pi power supply\", adultOnly: true, stage: \"camera\" },\n ], [\"Current Raspberry Pi OS\", \"Pico SDK\"]),\n missionTitles: [\"Find a Colour Target\", \"Report Left Centre or Right\", \"Send Safe Serial Commands\", \"Rainbow Rescue Challenge\"],\n }),\n module({\n slug: \"vibe-game-remix-lab\",\n title: \"Vibe Game Remix Lab\",\n category: \"vibe\",\n summary: \"Transform a supplied mini-game through structured, evidence-bound AI suggestions.\",\n tools: [\"Structured prompt builder\", \"Diff review\", \"JavaScript sandbox\"],\n concepts: [\"intent\", \"constraints\", \"diffs\", \"testing\", \"explanation\"],\n tokenSubunits: \"12000\",\n missionTitles: [\"Describe the Remix\", \"Constrain the Change\", \"Review One Diff\", \"Remix Challenge\"],\n }),\n module({\n slug: \"vibe-bug-detective\",\n title: \"Vibe Bug Detective\",\n category: \"vibe\",\n summary: \"Repair an intentionally broken project using assessment evidence and focused suggestions.\",\n tools: [\"Structured prompt builder\", \"Diff review\", \"Assessment runner\"],\n concepts: [\"diagnostics\", \"hypotheses\", \"minimal fixes\", \"regression tests\", \"reflection\"],\n tokenSubunits: \"12000\",\n missionTitles: [\"Read the Evidence\", \"Ask a Focused Question\", \"Inspect a Suggested Fix\", \"Regression Challenge\"],\n }),\n module({\n slug: \"vibe-idea-studio\",\n title: \"Vibe Idea Studio\",\n category: \"vibe\",\n summary: \"Turn a bounded original idea into goals, acceptance tests and a working prototype.\",\n tools: [\"Intent cards\", \"Structured prompt builder\", \"Diff review\", \"Sandbox\"],\n concepts: [\"goals\", \"acceptance tests\", \"iteration\", \"trade-offs\", \"explanation\"],\n tokenSubunits: \"16000\",\n missionTitles: [\"Shape the Idea\", \"Write Success Tests\", \"Build One Step\", \"Prototype Showcase\"],\n }),\n module({\n slug: \"adventure-mission-planner\",\n title: \"Adventure Mission Planner\",\n category: \"web-app\",\n summary: \"Build an accessible planner for fictional quests and activities.\",\n tools: [\"HTML\", \"CSS\", \"JavaScript\", \"Private preview\"],\n concepts: [\"semantic HTML\", \"forms\", \"validation\", \"arrays\", \"local persistence\"],\n tokenSubunits: \"10000\",\n hosting: true,\n missionTitles: [\"Make a Semantic Page\", \"Add a Mission Form\", \"Save Fictional Missions\", \"Accessible Planner Challenge\"],\n }),\n module({\n slug: \"creature-care-dashboard\",\n title: \"Creature Care Dashboard\",\n category: \"web-app\",\n summary: \"Create a responsive dashboard for a fictional digital creature.\",\n tools: [\"HTML\", \"CSS\", \"JavaScript\", \"Private preview\"],\n concepts: [\"components\", \"events\", \"timers\", \"status displays\", \"reduced motion\"],\n tokenSubunits: \"12000\",\n hosting: true,\n missionTitles: [\"Design the Creature Card\", \"Update Creature State\", \"Add a Safe Timer\", \"Care Dashboard Challenge\"],\n }),\n module({\n slug: \"robot-mission-control\",\n title: \"Robot Mission Control\",\n category: \"web-app\",\n summary: \"Build a simulated control and telemetry interface with safety confirmations.\",\n tools: [\"HTML\", \"CSS\", \"JavaScript\", \"Serial simulator\", \"Private preview\"],\n concepts: [\"commands\", \"state machines\", \"confirmations\", \"charts\", \"responsive controls\"],\n tokenSubunits: \"14000\",\n hosting: true,\n missionTitles: [\"Build the Control Panel\", \"Simulate Telemetry\", \"Add Stop Confirmations\", \"Mission Control Challenge\"],\n }),\n];\n\n/**\n * Uniform price for the immutable 1.1.0 pilot catalog.\n *\n * The GBP value is product-copy reference metadata under the published\n * 10p-per-Token economy reference rate. It does not create redemption rights.\n */\nexport const JUNIOR_CODER_MODULE_PRICE_V1_1 = Object.freeze({\n tokenSubunits: \"50000\",\n referencePrice: Object.freeze({\n currency: \"GBP\" as const,\n minorUnits: \"500\",\n basis: \"nominal-reference\" as const,\n cashRedemptionAllowed: false as const,\n }),\n});\n\n/** Initial immutable Junior Coder path manifest for pilot grants and shadow pricing. */\nexport const JUNIOR_CODER_ROBOT_RESCUE_PATH_V1: LearningPathVersionV1 = {\n id: \"junior-coder.robot-rescue-arcade\",\n slug: \"robot-rescue-arcade\",\n version: \"1.0.0\",\n title: \"Junior Coder: Robot Rescue Arcade\",\n description: \"Nineteen self-contained game, robotics, Vibe Coding and web-app projects for young programmers.\",\n catalogState: \"pilot\",\n publicLaunchAtomic: true,\n featureFlag: \"learning.junior-coder.catalog.enabled\",\n modules,\n};\n\n/**\n * Uniformly priced successor to the immutable 1.0.0 pilot catalog.\n *\n * All modules remain independently sellable and retain their existing content,\n * manifests and safeguards. The new module and path versions bind the new price\n * without altering previously published records.\n */\nexport const JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1: LearningPathVersionV1 = {\n ...JUNIOR_CODER_ROBOT_RESCUE_PATH_V1,\n version: \"1.1.0\",\n modules: JUNIOR_CODER_ROBOT_RESCUE_PATH_V1.modules.map((entry) => ({\n ...entry,\n version: \"1.1.0\",\n contentRevision: \"2026-07-28.1\",\n pricing: {\n ...entry.pricing,\n tokenSubunits: JUNIOR_CODER_MODULE_PRICE_V1_1.tokenSubunits,\n referencePrice: JUNIOR_CODER_MODULE_PRICE_V1_1.referencePrice,\n },\n })),\n};\n\n/** Current pilot catalog for server adapters that intentionally follow releases. */\nexport const JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT =\n JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1;\n","/** Version-one module categories supported by the learning catalog. */\nexport type ModuleCategoryV1 = \"game\" | \"robot\" | \"vibe\" | \"web-app\";\n\n/** Commercial states deliberately separate pilot grants from public checkout. */\nexport type CommercialStateV1 = \"pilot-grant-only\" | \"fixed-price\" | \"retired\";\n\n/** The four deterministic assessment dimensions and their product meanings. */\nexport type AssessmentDimensionV1 =\n | \"structure\"\n | \"behaviour\"\n | \"resilience\"\n | \"safety\";\n\nexport type ScoreBandV1 =\n | \"keep-exploring\"\n | \"nearly-there\"\n | \"mission-complete\"\n | \"mastered\";\n\nexport type CourseMaterialAudienceV1 = \"learner\" | \"facilitator\";\n\nexport type CourseMaterialKindV1 =\n | \"child-guide\"\n | \"mission-cards\"\n | \"starter-project\"\n | \"asset-pack\"\n | \"printable\"\n | \"facilitator-guide\"\n | \"answer-key\"\n | \"protected-tests\"\n | \"hardware-guide\";\n\nexport type ModuleAgentRoleV1 =\n | \"assessor\"\n | \"debugger\"\n | \"fix-guide\"\n | \"concept-explainer\";\n\nexport type HardwareModeV1 = \"none\" | \"optional\" | \"physical-first\";\n\nexport type HardwareVerificationStatusV1 =\n | \"not-applicable\"\n | \"pending-bench-test\"\n | \"verified\";\n\n/** A material record contains metadata only; storage and signed URLs are adapter concerns. */\nexport interface CourseMaterialV1 {\n id: string;\n kind: CourseMaterialKindV1;\n audience: CourseMaterialAudienceV1;\n title?: string;\n}\n\n/** Learner and facilitator materials are deliberately separated. */\nexport interface CourseMaterialsManifestV1 {\n version: string;\n learner: CourseMaterialV1[];\n facilitator: CourseMaterialV1[];\n}\n\n/** A physical item disclosed before a Guardian creates a purchase quote. */\nexport interface HardwareItemV1 {\n id: string;\n label: string;\n quantity: number;\n requirement: \"required\" | \"optional\";\n exactSpecification: string;\n adultOnly: boolean;\n stage: \"core\" | \"servo\" | \"rover\" | \"sensor\" | \"camera\";\n}\n\n/** Immutable hardware and preparation disclosure for a module version. */\nexport interface HardwareRequirementManifestV1 {\n requirementsVersion: string;\n mode: HardwareModeV1;\n hardwareIncluded: false;\n simulatorAvailable: boolean;\n verificationStatus: HardwareVerificationStatusV1;\n publicSaleBlocked: boolean;\n preparationMinutes: number;\n items: HardwareItemV1[];\n warnings: string[];\n supportedPlatforms: string[];\n}\n\n/** One short, observable learning goal inside a mission. */\nexport interface LearningGoalV1 {\n id: string;\n statement: string;\n evidence: \"assessment\" | \"explanation\" | \"adult-signoff\";\n}\n\n/** A 15–25 minute unit following learn, predict, build, assess and explain. */\nexport interface MissionV1 {\n id: string;\n title: string;\n estimatedMinutes: number;\n concepts: string[];\n goals: LearningGoalV1[];\n sideAdventure: string;\n}\n\n/** One objective source of points in an assessment rubric. */\nexport interface AssessmentCriterionV1 {\n id: string;\n label: string;\n dimension: AssessmentDimensionV1;\n points: number;\n mandatory: boolean;\n visibility: \"visible\" | \"protected\";\n}\n\n/** The immutable assessment authority for a module challenge. */\nexport interface AssessmentRubricV1 {\n version: string;\n completionScore: 80;\n criteria: AssessmentCriterionV1[];\n}\n\nexport interface AssessmentCheckResultV1 {\n criterionId: string;\n passed: boolean;\n sourceLocation?: {\n fileId?: string;\n blockId?: string;\n startLine?: number;\n endLine?: number;\n };\n}\n\nexport interface AssessmentResultV1 {\n score: number;\n band: ScoreBandV1;\n completed: boolean;\n passedCriterionIds: string[];\n failedCriterionIds: string[];\n failedMandatoryCriterionIds: string[];\n}\n\n/** A constrained module-agent role; score and reward authority are always false. */\nexport interface ModuleAgentDefinitionV1 {\n id: string;\n role: ModuleAgentRoleV1;\n evidenceBound: true;\n maySuggestSingleFix: boolean;\n mayAssignScore: false;\n mayAwardReward: false;\n mayPublish: false;\n mayControlHardware: false;\n}\n\n/** Structured feedback that a deterministic or AI-backed adapter may return. */\nexport interface ModuleAgentFeedbackV1 {\n role: ModuleAgentRoleV1;\n assessmentScore: number;\n passedGoalIds: string[];\n failedGoalIds: string[];\n explanation: string;\n expectedBehaviour: string;\n suggestedExperiment?: string;\n sourceLocation?: AssessmentCheckResultV1[\"sourceLocation\"];\n scoreAuthority: \"deterministic-assessment\";\n}\n\n/** Ordinary Token subunits used as a pilot shadow or fixed price. */\nexport interface ModuleReferencePriceV1 {\n /** Reference copy only; this is never a cash balance or redemption promise. */\n currency: \"GBP\";\n /** Canonical GBP minor units. */\n minorUnits: string;\n basis: \"nominal-reference\";\n cashRedemptionAllowed: false;\n}\n\nexport interface ModulePricingV1 {\n state: CommercialStateV1;\n tokenSubunits: string;\n referencePrice?: ModuleReferencePriceV1;\n includesMaterials: true;\n includesAssessmentRetries: true;\n includesAgents: true;\n includesHostingAllowance: boolean;\n}\n\nexport interface BadgeDefinitionV1 {\n id: string;\n title: string;\n evidence: \"mission-score\" | \"module-score\" | \"adult-physical-signoff\";\n tradeable: false;\n tokenConvertible: false;\n}\n\n/** One immutable, independently sellable module version. */\nexport interface LearningModuleVersionV1 {\n id: string;\n slug: string;\n version: string;\n contentRevision: string;\n title: string;\n category: ModuleCategoryV1;\n summary: string;\n estimatedMinutes: number;\n tools: string[];\n concepts: string[];\n selfContained: true;\n prerequisiteModuleIds: string[];\n pricing: ModulePricingV1;\n materials: CourseMaterialsManifestV1;\n hardware: HardwareRequirementManifestV1;\n missions: MissionV1[];\n assessment: AssessmentRubricV1;\n agents: ModuleAgentDefinitionV1[];\n badges: BadgeDefinitionV1[];\n}\n\n/** A versioned path is a recommendation and never a paid prerequisite chain. */\nexport interface LearningPathVersionV1 {\n id: string;\n slug: string;\n version: string;\n title: string;\n description: string;\n catalogState: \"pilot\" | \"public\" | \"retired\";\n publicLaunchAtomic: true;\n featureFlag: string;\n modules: LearningModuleVersionV1[];\n}\n\n/** Entitlement records bind a subject to an immutable module version. */\nexport interface ModuleEntitlementV1 {\n entitlementId: string;\n subjectAccountId: string;\n moduleId: string;\n moduleVersion: string;\n source:\n | \"pilot-grant\"\n | \"module-allowance-purchase\"\n | \"support-grant\"\n | \"admin-test-grant\";\n state: \"pending\" | \"active\" | \"revoked\";\n economyTransactionId?: string;\n grantedAt: string;\n}\n\nexport interface AttemptEvidenceV1 {\n attemptId: string;\n moduleId: string;\n moduleVersion: string;\n assessment: AssessmentResultV1;\n sourceDigest: string;\n recordedAt: string;\n adultPhysicalSignoff?: {\n signedByActorAccountId: string;\n checklistVersion: string;\n signedAt: string;\n };\n}\n\nexport interface GuardianAiConsentV1 {\n actorAccountId: string;\n subjectAccountId: string;\n policyVersion: string;\n state: \"granted\" | \"withdrawn\";\n recordedAt: string;\n}\n\n/** A static project snapshot is immutable and separately approved for publishing. */\nexport interface PublishedStaticProjectSnapshotV1 {\n snapshotId: string;\n subjectAccountId: string;\n moduleId: string;\n sourceDigest: string;\n randomSlug: string;\n guardianApprovalId: string;\n state: \"pending-review\" | \"published\" | \"expired\" | \"unpublished\";\n expiresAt: string;\n}\n\n/** Canonical learner journey shared by interactive and printable adapters. */\nexport const MISSION_AUTHORING_CONTRACT_VERSION_V1 = \"1.0.0\" as const;\n\nexport type MissionStageKindV1 =\n | \"learn\"\n | \"predict\"\n | \"build\"\n | \"run\"\n | \"assess\"\n | \"inspect\"\n | \"fix\"\n | \"explain\"\n | \"reward\";\n\nexport type MissionArtifactKindV1 =\n | \"starter-code\"\n | \"starter-assets\"\n | \"sample-data\"\n | \"printable\"\n | \"facilitator-note\"\n | \"answer-key\"\n | \"protected-test\";\n\n/** Metadata only: storage and authorized delivery remain adapter concerns. */\nexport interface MissionArtifactReferenceV1 {\n id: string;\n kind: MissionArtifactKindV1;\n audience: CourseMaterialAudienceV1;\n solutionBearing: boolean;\n}\n\nexport interface MissionReadinessCheckV1 {\n id: string;\n prompt: string;\n scored: false;\n}\n\nexport interface MissionStageCardV1 {\n kind: MissionStageKindV1;\n instruction: string;\n artifactIds: string[];\n}\n\nexport interface MissionAuthoringGoalV1 {\n id: string;\n statement: string;\n visibility: \"visible\" | \"protected\";\n criterionIds: string[];\n completionRequired: boolean;\n aiRequired: boolean;\n}\n\nexport type MissionInteractionModeV1 =\n | \"keyboard\"\n | \"pointer\"\n | \"drag\"\n | \"audio\"\n | \"colour\"\n | \"motion\"\n | \"text\"\n | \"shape\"\n | \"symbol\"\n | \"reduced-motion\";\n\nexport interface MissionInteractionRequirementV1 {\n id: string;\n description: string;\n primaryMode: MissionInteractionModeV1;\n alternativeIds: string[];\n}\n\nexport interface MissionAccessibilityAlternativeV1 {\n id: string;\n modes: MissionInteractionModeV1[];\n equivalentOutcome: true;\n description: string;\n}\n\nexport type MissionEvidenceKindV1 =\n | \"assessment-result\"\n | \"learner-explanation\"\n | \"project-snapshot\"\n | \"adult-signoff\";\n\nexport type MissionEvidenceRetentionV1 =\n | \"attempt\"\n | \"entitlement\"\n | \"adult-signoff\";\n\nexport interface MissionEvidenceRequirementV1 {\n id: string;\n goalIds: string[];\n kind: MissionEvidenceKindV1;\n retention: MissionEvidenceRetentionV1;\n containsPersonalData: false;\n}\n\nexport interface MissionSideAdventureV1 {\n id: string;\n prompt: string;\n completionRequired: false;\n}\n\nexport interface MissionRewardBindingV1 {\n id: string;\n badgeId: string;\n goalIds: string[];\n deterministic: true;\n random: false;\n tokenConvertible: false;\n}\n\n/** The only mission projection safe to return to a learner. */\nexport interface LearnerMissionAuthoringV1 {\n estimatedMinutes: number;\n stages: MissionStageCardV1[];\n readinessChecks: MissionReadinessCheckV1[];\n artifacts: MissionArtifactReferenceV1[];\n goals: MissionAuthoringGoalV1[];\n interactions: MissionInteractionRequirementV1[];\n accessibilityAlternatives: MissionAccessibilityAlternativeV1[];\n evidenceRequirements: MissionEvidenceRequirementV1[];\n sideAdventures: MissionSideAdventureV1[];\n rewardBindings: MissionRewardBindingV1[];\n}\n\n/** Protected authoring data must never be projected through learner APIs. */\nexport interface FacilitatorMissionAuthoringV1 {\n artifacts: MissionArtifactReferenceV1[];\n protectedGoals: MissionAuthoringGoalV1[];\n prompts: string[];\n}\n\n/** Additive authoring detail keyed to one immutable catalog mission. */\nexport interface MissionAuthoringBundleV1 {\n version: string;\n moduleId: string;\n moduleVersion: string;\n missionId: string;\n learner: LearnerMissionAuthoringV1;\n facilitator: FacilitatorMissionAuthoringV1;\n}\n\nexport interface MissionAuthoringValidationIssueV1 {\n code:\n | \"bundle-version-mismatch\"\n | \"module-reference-mismatch\"\n | \"mission-reference-mismatch\"\n | \"invalid-duration\"\n | \"missing-stage\"\n | \"duplicate-stage\"\n | \"stage-order\"\n | \"missing-readiness-check\"\n | \"scored-readiness-check\"\n | \"missing-starter-artifact\"\n | \"learner-artifact-leak\"\n | \"facilitator-artifact-leak\"\n | \"unknown-artifact\"\n | \"duplicate-id\"\n | \"missing-visible-goal\"\n | \"missing-protected-goal\"\n | \"invalid-goal-projection\"\n | \"duplicate-goal-id\"\n | \"unknown-criterion\"\n | \"criterion-visibility-mismatch\"\n | \"rubric-total\"\n | \"rubric-dimension-total\"\n | \"duplicate-criterion-id\"\n | \"missing-mandatory-safety\"\n | \"missing-safety-evidence\"\n | \"ai-dependent-completion\"\n | \"inaccessible-interaction\"\n | \"unknown-accessibility-alternative\"\n | \"non-equivalent-accessibility-alternative\"\n | \"missing-evidence\"\n | \"unknown-evidence-goal\"\n | \"personal-data-evidence\"\n | \"missing-side-adventure\"\n | \"mandatory-side-adventure\"\n | \"invalid-reward\";\n message: string;\n path: string;\n}\n\nexport interface LearningValidationIssueV1 {\n code:\n | \"duplicate-module-id\"\n | \"duplicate-module-slug\"\n | \"module-not-self-contained\"\n | \"paid-prerequisite\"\n | \"missing-materials\"\n | \"facilitator-material-leak\"\n | \"learner-material-leak\"\n | \"invalid-token-subunits\"\n | \"invalid-reference-price\"\n | \"rubric-total\"\n | \"rubric-dimension-total\"\n | \"duplicate-criterion-id\"\n | \"missing-mandatory-safety\"\n | \"missing-hardware-items\"\n | \"invalid-agent-authority\"\n | \"missing-missions\";\n message: string;\n moduleId?: string;\n path: string;\n}\n","import type {\n AssessmentDimensionV1,\n AssessmentRubricV1,\n LearningValidationIssueV1,\n} from \"./contracts.js\";\n\nconst DIMENSION_TOTALS: Record<AssessmentDimensionV1, number> = {\n structure: 20,\n behaviour: 50,\n resilience: 20,\n safety: 10,\n};\n\nfunction rubricIssue(\n code: LearningValidationIssueV1[\"code\"],\n message: string,\n path: string,\n moduleId?: string,\n): LearningValidationIssueV1 {\n return { code, message, path, ...(moduleId ? { moduleId } : {}) };\n}\n\n/** Validate the deterministic 20/50/20/10 assessment authority. */\nexport function validateAssessmentRubric(\n rubric: AssessmentRubricV1,\n path = \"assessment\",\n moduleId?: string,\n): LearningValidationIssueV1[] {\n const issues: LearningValidationIssueV1[] = [];\n const criterionIds = new Set<string>();\n const dimensionTotals: Record<AssessmentDimensionV1, number> = {\n structure: 0,\n behaviour: 0,\n resilience: 0,\n safety: 0,\n };\n let rubricTotal = 0;\n\n for (const criterion of rubric.criteria) {\n rubricTotal += criterion.points;\n dimensionTotals[criterion.dimension] += criterion.points;\n if (criterionIds.has(criterion.id)) {\n issues.push(\n rubricIssue(\n \"duplicate-criterion-id\",\n `Duplicate assessment criterion ${criterion.id}.`,\n `${path}.criteria`,\n moduleId,\n ),\n );\n }\n criterionIds.add(criterion.id);\n }\n\n if (rubricTotal !== 100) {\n issues.push(\n rubricIssue(\n \"rubric-total\",\n `Assessment rubric totals ${rubricTotal}; expected 100.`,\n `${path}.criteria`,\n moduleId,\n ),\n );\n }\n\n for (const [dimension, expected] of Object.entries(DIMENSION_TOTALS) as Array<\n [AssessmentDimensionV1, number]\n >) {\n if (dimensionTotals[dimension] !== expected) {\n issues.push(\n rubricIssue(\n \"rubric-dimension-total\",\n `${dimension} criteria total ${dimensionTotals[dimension]}; expected ${expected}.`,\n `${path}.criteria`,\n moduleId,\n ),\n );\n }\n }\n\n if (\n !rubric.criteria.some(\n (criterion) => criterion.dimension === \"safety\" && criterion.mandatory,\n )\n ) {\n issues.push(\n rubricIssue(\n \"missing-mandatory-safety\",\n \"Every module requires a mandatory safety criterion.\",\n `${path}.criteria`,\n moduleId,\n ),\n );\n }\n\n return issues;\n}\n","import {\n MISSION_AUTHORING_CONTRACT_VERSION_V1,\n type LearningModuleVersionV1,\n type MissionArtifactKindV1,\n type MissionAuthoringBundleV1,\n type MissionAuthoringValidationIssueV1,\n type MissionInteractionModeV1,\n type MissionStageKindV1,\n} from \"./contracts.js\";\nimport { validateAssessmentRubric } from \"./rubric-validation.js\";\n\nexport const JUNIOR_CODER_MISSION_STAGE_ORDER_V1 = [\n \"learn\",\n \"predict\",\n \"build\",\n \"run\",\n \"assess\",\n \"inspect\",\n \"fix\",\n \"explain\",\n \"reward\",\n] as const satisfies readonly MissionStageKindV1[];\n\nconst LEARNER_STARTER_KINDS = new Set<MissionArtifactKindV1>([\n \"starter-code\",\n \"starter-assets\",\n \"sample-data\",\n]);\n\nconst LEARNER_FORBIDDEN_KINDS = new Set<MissionArtifactKindV1>([\n \"facilitator-note\",\n \"answer-key\",\n \"protected-test\",\n]);\n\nconst SINGLE_MODE_REQUIRES_ALTERNATIVE = new Set<MissionInteractionModeV1>([\n \"pointer\",\n \"drag\",\n \"audio\",\n \"colour\",\n \"motion\",\n]);\n\nfunction authoringIssue(\n code: MissionAuthoringValidationIssueV1[\"code\"],\n message: string,\n path: string,\n): MissionAuthoringValidationIssueV1 {\n return { code, message, path };\n}\n\nfunction reportDuplicateIds(\n ids: string[],\n path: string,\n): MissionAuthoringValidationIssueV1[] {\n const seen = new Set<string>();\n const issues: MissionAuthoringValidationIssueV1[] = [];\n for (const id of ids) {\n if (seen.has(id)) {\n issues.push(\n authoringIssue(\"duplicate-id\", `Duplicate authored ID ${id}.`, path),\n );\n }\n seen.add(id);\n }\n return issues;\n}\n\n/**\n * Validate learner/facilitator authoring against one immutable catalog module.\n * The complete issue set is returned so authoring tools can fix errors in one pass.\n */\nexport function validateMissionAuthoringBundle(\n bundle: MissionAuthoringBundleV1,\n module: LearningModuleVersionV1,\n): MissionAuthoringValidationIssueV1[] {\n const issues: MissionAuthoringValidationIssueV1[] = [];\n\n if (bundle.version !== MISSION_AUTHORING_CONTRACT_VERSION_V1) {\n issues.push(\n authoringIssue(\n \"bundle-version-mismatch\",\n `Unsupported mission authoring version ${bundle.version}.`,\n \"version\",\n ),\n );\n }\n\n if (bundle.moduleId !== module.id || bundle.moduleVersion !== module.version) {\n issues.push(\n authoringIssue(\n \"module-reference-mismatch\",\n `Bundle ${bundle.moduleId}@${bundle.moduleVersion} does not match ${module.id}@${module.version}.`,\n \"moduleId\",\n ),\n );\n }\n\n if (!module.missions.some((mission) => mission.id === bundle.missionId)) {\n issues.push(\n authoringIssue(\n \"mission-reference-mismatch\",\n `Mission ${bundle.missionId} does not exist in module ${module.id}.`,\n \"missionId\",\n ),\n );\n }\n\n const learner = bundle.learner;\n const facilitator = bundle.facilitator;\n\n if (learner.estimatedMinutes < 15 || learner.estimatedMinutes > 25) {\n issues.push(\n authoringIssue(\n \"invalid-duration\",\n \"A mission must last between 15 and 25 minutes.\",\n \"learner.estimatedMinutes\",\n ),\n );\n }\n\n const stageKinds = learner.stages.map((stage) => stage.kind);\n for (const requiredStage of JUNIOR_CODER_MISSION_STAGE_ORDER_V1) {\n const count = stageKinds.filter((stage) => stage === requiredStage).length;\n if (count === 0) {\n issues.push(\n authoringIssue(\n \"missing-stage\",\n `Mission stage ${requiredStage} is required.`,\n \"learner.stages\",\n ),\n );\n } else if (count > 1) {\n issues.push(\n authoringIssue(\n \"duplicate-stage\",\n `Mission stage ${requiredStage} appears more than once.`,\n \"learner.stages\",\n ),\n );\n }\n }\n if (\n stageKinds.length === JUNIOR_CODER_MISSION_STAGE_ORDER_V1.length\n && stageKinds.some(\n (stage, index) => stage !== JUNIOR_CODER_MISSION_STAGE_ORDER_V1[index],\n )\n ) {\n issues.push(\n authoringIssue(\n \"stage-order\",\n \"Mission stages must follow the canonical learner journey.\",\n \"learner.stages\",\n ),\n );\n }\n\n if (learner.readinessChecks.length === 0) {\n issues.push(\n authoringIssue(\n \"missing-readiness-check\",\n \"At least one unscored readiness check is required.\",\n \"learner.readinessChecks\",\n ),\n );\n }\n if (learner.readinessChecks.some((check) => check.scored !== false)) {\n issues.push(\n authoringIssue(\n \"scored-readiness-check\",\n \"Readiness checks must not affect the deterministic score.\",\n \"learner.readinessChecks\",\n ),\n );\n }\n issues.push(\n ...reportDuplicateIds(\n learner.readinessChecks.map((check) => check.id),\n \"learner.readinessChecks\",\n ),\n );\n\n const learnerArtifactIds = new Set(learner.artifacts.map((artifact) => artifact.id));\n if (!learner.artifacts.some((artifact) => LEARNER_STARTER_KINDS.has(artifact.kind))) {\n issues.push(\n authoringIssue(\n \"missing-starter-artifact\",\n \"At least one learner-safe starter artifact is required.\",\n \"learner.artifacts\",\n ),\n );\n }\n if (\n learner.artifacts.some(\n (artifact) =>\n artifact.audience !== \"learner\"\n || artifact.solutionBearing\n || LEARNER_FORBIDDEN_KINDS.has(artifact.kind),\n )\n ) {\n issues.push(\n authoringIssue(\n \"learner-artifact-leak\",\n \"Learner artifacts cannot contain facilitator or solution-bearing content.\",\n \"learner.artifacts\",\n ),\n );\n }\n if (facilitator.artifacts.some((artifact) => artifact.audience !== \"facilitator\")) {\n issues.push(\n authoringIssue(\n \"facilitator-artifact-leak\",\n \"Facilitator artifacts must remain in the facilitator projection.\",\n \"facilitator.artifacts\",\n ),\n );\n }\n issues.push(\n ...reportDuplicateIds(\n [...learner.artifacts, ...facilitator.artifacts].map((artifact) => artifact.id),\n \"artifacts\",\n ),\n );\n for (const [stageIndex, stage] of learner.stages.entries()) {\n for (const artifactId of stage.artifactIds) {\n if (!learnerArtifactIds.has(artifactId)) {\n issues.push(\n authoringIssue(\n \"unknown-artifact\",\n `Stage references unknown learner artifact ${artifactId}.`,\n `learner.stages[${stageIndex}].artifactIds`,\n ),\n );\n }\n }\n }\n\n if (learner.goals.length === 0) {\n issues.push(\n authoringIssue(\n \"missing-visible-goal\",\n \"At least one visible learner goal is required.\",\n \"learner.goals\",\n ),\n );\n }\n if (facilitator.protectedGoals.length === 0) {\n issues.push(\n authoringIssue(\n \"missing-protected-goal\",\n \"At least one protected facilitator goal is required.\",\n \"facilitator.protectedGoals\",\n ),\n );\n }\n\n const allGoals = [...learner.goals, ...facilitator.protectedGoals];\n const learnerGoalIds = new Set(learner.goals.map((goal) => goal.id));\n const seenGoalIds = new Set<string>();\n for (const goal of allGoals) {\n if (seenGoalIds.has(goal.id)) {\n issues.push(\n authoringIssue(\n \"duplicate-goal-id\",\n `Duplicate goal ID ${goal.id}.`,\n \"goals\",\n ),\n );\n }\n seenGoalIds.add(goal.id);\n }\n if (\n learner.goals.some((goal) => goal.visibility !== \"visible\")\n || facilitator.protectedGoals.some(\n (goal) => goal.visibility !== \"protected\" || goal.completionRequired,\n )\n ) {\n issues.push(\n authoringIssue(\n \"invalid-goal-projection\",\n \"Visible goals belong to learners and protected goals to facilitators.\",\n \"goals\",\n ),\n );\n }\n\n const criterionById = new Map(\n module.assessment.criteria.map((criterion) => [criterion.id, criterion]),\n );\n for (const goal of allGoals) {\n if (goal.criterionIds.length === 0) {\n issues.push(\n authoringIssue(\n \"unknown-criterion\",\n `Goal ${goal.id} must reference a deterministic criterion.`,\n \"goals\",\n ),\n );\n }\n for (const criterionId of goal.criterionIds) {\n const criterion = criterionById.get(criterionId);\n if (!criterion) {\n issues.push(\n authoringIssue(\n \"unknown-criterion\",\n `Goal ${goal.id} references unknown criterion ${criterionId}.`,\n \"goals\",\n ),\n );\n } else if (criterion.visibility !== goal.visibility) {\n issues.push(\n authoringIssue(\n \"criterion-visibility-mismatch\",\n `Goal ${goal.id} cannot expose a ${criterion.visibility} criterion as ${goal.visibility}.`,\n \"goals\",\n ),\n );\n }\n }\n if (goal.completionRequired && goal.aiRequired) {\n issues.push(\n authoringIssue(\n \"ai-dependent-completion\",\n `Completion goal ${goal.id} cannot require AI.`,\n \"goals\",\n ),\n );\n }\n }\n\n for (const rubricIssue of validateAssessmentRubric(module.assessment)) {\n if (\n rubricIssue.code === \"rubric-total\"\n || rubricIssue.code === \"rubric-dimension-total\"\n || rubricIssue.code === \"duplicate-criterion-id\"\n || rubricIssue.code === \"missing-mandatory-safety\"\n ) {\n issues.push(\n authoringIssue(rubricIssue.code, rubricIssue.message, rubricIssue.path),\n );\n }\n }\n\n const alternativeById = new Map(\n learner.accessibilityAlternatives.map((alternative) => [alternative.id, alternative]),\n );\n issues.push(\n ...reportDuplicateIds(\n learner.interactions.map((interaction) => interaction.id),\n \"learner.interactions\",\n ),\n ...reportDuplicateIds(\n learner.accessibilityAlternatives.map((alternative) => alternative.id),\n \"learner.accessibilityAlternatives\",\n ),\n );\n for (const [interactionIndex, interaction] of learner.interactions.entries()) {\n if (\n SINGLE_MODE_REQUIRES_ALTERNATIVE.has(interaction.primaryMode)\n && interaction.alternativeIds.length === 0\n ) {\n issues.push(\n authoringIssue(\n \"inaccessible-interaction\",\n `Interaction ${interaction.id} requires an equivalent alternative.`,\n `learner.interactions[${interactionIndex}]`,\n ),\n );\n }\n for (const alternativeId of interaction.alternativeIds) {\n const alternative = alternativeById.get(alternativeId);\n if (!alternative) {\n issues.push(\n authoringIssue(\n \"unknown-accessibility-alternative\",\n `Interaction ${interaction.id} references unknown alternative ${alternativeId}.`,\n `learner.interactions[${interactionIndex}].alternativeIds`,\n ),\n );\n } else if (\n alternative.equivalentOutcome !== true\n || alternative.modes.length === 0\n || alternative.modes.every((mode) => mode === interaction.primaryMode)\n ) {\n issues.push(\n authoringIssue(\n \"non-equivalent-accessibility-alternative\",\n `Alternative ${alternativeId} must provide an equivalent outcome through another mode.`,\n \"learner.accessibilityAlternatives\",\n ),\n );\n }\n }\n }\n\n if (learner.evidenceRequirements.length === 0) {\n issues.push(\n authoringIssue(\n \"missing-evidence\",\n \"At least one evidence requirement is required.\",\n \"learner.evidenceRequirements\",\n ),\n );\n }\n issues.push(\n ...reportDuplicateIds(\n learner.evidenceRequirements.map((evidence) => evidence.id),\n \"learner.evidenceRequirements\",\n ),\n );\n for (const [evidenceIndex, evidence] of learner.evidenceRequirements.entries()) {\n if (evidence.containsPersonalData !== false) {\n issues.push(\n authoringIssue(\n \"personal-data-evidence\",\n \"Mission evidence cannot request personal data.\",\n `learner.evidenceRequirements[${evidenceIndex}]`,\n ),\n );\n }\n for (const goalId of evidence.goalIds) {\n if (!learnerGoalIds.has(goalId)) {\n issues.push(\n authoringIssue(\n \"unknown-evidence-goal\",\n `Evidence references unknown goal ${goalId}.`,\n `learner.evidenceRequirements[${evidenceIndex}].goalIds`,\n ),\n );\n }\n }\n }\n for (const goal of learner.goals.filter((entry) => entry.completionRequired)) {\n if (\n !learner.evidenceRequirements.some((evidence) => evidence.goalIds.includes(goal.id))\n ) {\n issues.push(\n authoringIssue(\n \"missing-evidence\",\n `Completion goal ${goal.id} requires deterministic evidence.`,\n \"learner.evidenceRequirements\",\n ),\n );\n }\n }\n\n const mandatorySafetyGoals = learner.goals.filter(\n (goal) =>\n goal.completionRequired\n && goal.criterionIds.some((criterionId) => {\n const criterion = criterionById.get(criterionId);\n return criterion?.dimension === \"safety\" && criterion.mandatory;\n }),\n );\n if (\n mandatorySafetyGoals.length === 0\n || !mandatorySafetyGoals.some((goal) =>\n learner.evidenceRequirements.some((evidence) => evidence.goalIds.includes(goal.id)),\n )\n ) {\n issues.push(\n authoringIssue(\n \"missing-safety-evidence\",\n \"A completion-required goal must evidence a mandatory safety criterion.\",\n \"learner.evidenceRequirements\",\n ),\n );\n }\n\n issues.push(\n ...reportDuplicateIds(\n learner.sideAdventures.map((adventure) => adventure.id),\n \"learner.sideAdventures\",\n ),\n );\n if (learner.sideAdventures.length === 0) {\n issues.push(\n authoringIssue(\n \"missing-side-adventure\",\n \"At least one optional side adventure is required.\",\n \"learner.sideAdventures\",\n ),\n );\n }\n if (learner.sideAdventures.some((adventure) => adventure.completionRequired !== false)) {\n issues.push(\n authoringIssue(\n \"mandatory-side-adventure\",\n \"Side adventures must remain optional.\",\n \"learner.sideAdventures\",\n ),\n );\n }\n\n const badgeIds = new Set(module.badges.map((badge) => badge.id));\n issues.push(\n ...reportDuplicateIds(\n learner.rewardBindings.map((reward) => reward.id),\n \"learner.rewardBindings\",\n ),\n );\n for (const [rewardIndex, reward] of learner.rewardBindings.entries()) {\n const rewardInvalid =\n reward.deterministic !== true\n || reward.random !== false\n || reward.tokenConvertible !== false\n || reward.goalIds.length === 0\n || !badgeIds.has(reward.badgeId)\n || reward.goalIds.some((goalId) => !learnerGoalIds.has(goalId));\n if (rewardInvalid) {\n issues.push(\n authoringIssue(\n \"invalid-reward\",\n `Reward ${reward.id} must be deterministic, evidence-bound and non-convertible.`,\n `learner.rewardBindings[${rewardIndex}]`,\n ),\n );\n }\n }\n\n return issues;\n}\n\n/** Fail fast for CI and immutable authoring registration. */\nexport function assertValidMissionAuthoringBundle(\n bundle: MissionAuthoringBundleV1,\n module: LearningModuleVersionV1,\n): void {\n const issues = validateMissionAuthoringBundle(bundle, module);\n if (issues.length === 0) return;\n\n const summary = issues\n .map((entry) => `${entry.code} at ${entry.path}: ${entry.message}`)\n .join(\"\\n\");\n throw new Error(`Invalid mission authoring bundle:\\n${summary}`);\n}\n\n/** Original first-mission exemplar; no protected content appears in learner data. */\nexport const ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1: MissionAuthoringBundleV1 = {\n version: MISSION_AUTHORING_CONTRACT_VERSION_V1,\n moduleId: \"junior-coder.road-hopper-rally\",\n moduleVersion: \"1.1.0\",\n missionId: \"road-hopper-rally-mission-1\",\n learner: {\n estimatedMinutes: 20,\n stages: [\n {\n kind: \"learn\",\n instruction: \"Find the x and y coordinates that place a rescue marker on the road.\",\n artifactIds: [\"road-hopper-rally-m1-art\"],\n },\n {\n kind: \"predict\",\n instruction: \"Predict where the marker will appear before you run the starter project.\",\n artifactIds: [],\n },\n {\n kind: \"build\",\n instruction: \"Complete the two road-lane drawing commands in the starter code.\",\n artifactIds: [\"road-hopper-rally-m1-code\"],\n },\n {\n kind: \"run\",\n instruction: \"Run the private preview and use the keyboard start control.\",\n artifactIds: [\"road-hopper-rally-m1-code\"],\n },\n {\n kind: \"assess\",\n instruction: \"Run the visible and protected deterministic mission checks.\",\n artifactIds: [],\n },\n {\n kind: \"inspect\",\n instruction: \"Compare the highlighted line with the goal that did not pass.\",\n artifactIds: [],\n },\n {\n kind: \"fix\",\n instruction: \"Change one coordinate or drawing command, then run the checks again.\",\n artifactIds: [\"road-hopper-rally-m1-code\"],\n },\n {\n kind: \"explain\",\n instruction: \"Explain how your coordinates changed the road on screen.\",\n artifactIds: [],\n },\n {\n kind: \"reward\",\n instruction: \"Collect the evidence-bound badge when the mission score and safety check pass.\",\n artifactIds: [],\n },\n ],\n readinessChecks: [\n {\n id: \"road-hopper-rally-m1-predict-coordinate\",\n prompt: \"Point to the pair of numbers that controls horizontal and vertical position.\",\n scored: false,\n },\n ],\n artifacts: [\n {\n id: \"road-hopper-rally-m1-code\",\n kind: \"starter-code\",\n audience: \"learner\",\n solutionBearing: false,\n },\n {\n id: \"road-hopper-rally-m1-art\",\n kind: \"starter-assets\",\n audience: \"learner\",\n solutionBearing: false,\n },\n ],\n goals: [\n {\n id: \"road-hopper-rally-m1-starts\",\n statement: \"The starter project is structurally valid and starts.\",\n visibility: \"visible\",\n criterionIds: [\"road-hopper-rally-build\"],\n completionRequired: true,\n aiRequired: false,\n },\n {\n id: \"road-hopper-rally-m1-draws-road\",\n statement: \"Two original road lanes appear at the expected coordinates.\",\n visibility: \"visible\",\n criterionIds: [\"road-hopper-rally-goal-one\"],\n completionRequired: true,\n aiRequired: false,\n },\n {\n id: \"road-hopper-rally-m1-safe-preview\",\n statement: \"The project stays inside the private educational preview boundary.\",\n visibility: \"visible\",\n criterionIds: [\"road-hopper-rally-safety\"],\n completionRequired: true,\n aiRequired: false,\n },\n ],\n interactions: [\n {\n id: \"road-hopper-rally-m1-start-control\",\n description: \"Start the private preview.\",\n primaryMode: \"pointer\",\n alternativeIds: [\"road-hopper-rally-m1-keyboard-start\"],\n },\n ],\n accessibilityAlternatives: [\n {\n id: \"road-hopper-rally-m1-keyboard-start\",\n modes: [\"keyboard\"],\n equivalentOutcome: true,\n description: \"Start the same preview with Enter while the control has focus.\",\n },\n ],\n evidenceRequirements: [\n {\n id: \"road-hopper-rally-m1-assessment\",\n goalIds: [\n \"road-hopper-rally-m1-starts\",\n \"road-hopper-rally-m1-draws-road\",\n \"road-hopper-rally-m1-safe-preview\",\n ],\n kind: \"assessment-result\",\n retention: \"entitlement\",\n containsPersonalData: false,\n },\n {\n id: \"road-hopper-rally-m1-explanation\",\n goalIds: [\"road-hopper-rally-m1-draws-road\"],\n kind: \"learner-explanation\",\n retention: \"attempt\",\n containsPersonalData: false,\n },\n ],\n sideAdventures: [\n {\n id: \"road-hopper-rally-m1-remix\",\n prompt: \"Remix the lane colours while keeping text or shape cues available.\",\n completionRequired: false,\n },\n ],\n rewardBindings: [\n {\n id: \"road-hopper-rally-m1-badge\",\n badgeId: \"road-hopper-rally-mission-complete\",\n goalIds: [\n \"road-hopper-rally-m1-starts\",\n \"road-hopper-rally-m1-draws-road\",\n \"road-hopper-rally-m1-safe-preview\",\n ],\n deterministic: true,\n random: false,\n tokenConvertible: false,\n },\n ],\n },\n facilitator: {\n artifacts: [\n {\n id: \"road-hopper-rally-m1-answer-key\",\n kind: \"answer-key\",\n audience: \"facilitator\",\n solutionBearing: true,\n },\n {\n id: \"road-hopper-rally-m1-protected-tests\",\n kind: \"protected-test\",\n audience: \"facilitator\",\n solutionBearing: true,\n },\n ],\n protectedGoals: [\n {\n id: \"road-hopper-rally-m1-protected-edge\",\n statement: \"The drawing remains bounded when a protected coordinate edge case runs.\",\n visibility: \"protected\",\n criterionIds: [\"road-hopper-rally-edge-one\"],\n completionRequired: false,\n aiRequired: false,\n },\n ],\n prompts: [\n \"Ask the learner to predict one coordinate before offering a hint.\",\n \"Do not reveal protected expected values; point back to the visible goal.\",\n ],\n },\n};\n","import type {\n LearningModuleVersionV1,\n LearningPathVersionV1,\n LearningValidationIssueV1,\n} from \"./contracts.js\";\nimport { validateAssessmentRubric } from \"./rubric-validation.js\";\n\nconst CANONICAL_TOKEN_SUBUNITS = /^(0|[1-9][0-9]*)$/u;\n\nfunction issue(\n code: LearningValidationIssueV1[\"code\"],\n message: string,\n path: string,\n moduleId?: string,\n): LearningValidationIssueV1 {\n return { code, message, path, ...(moduleId ? { moduleId } : {}) };\n}\n\nfunction validateModule(\n module: LearningModuleVersionV1,\n moduleIndex: number,\n): LearningValidationIssueV1[] {\n const issues: LearningValidationIssueV1[] = [];\n const base = `modules[${moduleIndex}]`;\n\n if (!module.selfContained) {\n issues.push(\n issue(\n \"module-not-self-contained\",\n \"Every sellable module must be self-contained.\",\n `${base}.selfContained`,\n module.id,\n ),\n );\n }\n\n if (module.prerequisiteModuleIds.length > 0) {\n issues.push(\n issue(\n \"paid-prerequisite\",\n \"A sellable module cannot require another paid module.\",\n `${base}.prerequisiteModuleIds`,\n module.id,\n ),\n );\n }\n\n if (\n module.materials.learner.length === 0 ||\n module.materials.facilitator.length === 0\n ) {\n issues.push(\n issue(\n \"missing-materials\",\n \"Learner and facilitator material manifests are both required.\",\n `${base}.materials`,\n module.id,\n ),\n );\n }\n\n if (module.materials.learner.some((material) => material.audience !== \"learner\")) {\n issues.push(\n issue(\n \"facilitator-material-leak\",\n \"Learner material contains a facilitator-only record.\",\n `${base}.materials.learner`,\n module.id,\n ),\n );\n }\n\n if (\n module.materials.facilitator.some(\n (material) => material.audience !== \"facilitator\",\n )\n ) {\n issues.push(\n issue(\n \"learner-material-leak\",\n \"Facilitator material contains a learner record.\",\n `${base}.materials.facilitator`,\n module.id,\n ),\n );\n }\n\n if (!CANONICAL_TOKEN_SUBUNITS.test(module.pricing.tokenSubunits)) {\n issues.push(\n issue(\n \"invalid-token-subunits\",\n \"Token subunits must be a canonical non-negative base-10 integer string.\",\n `${base}.pricing.tokenSubunits`,\n module.id,\n ),\n );\n }\n\n const referencePrice = module.pricing.referencePrice;\n if (\n referencePrice\n && (\n referencePrice.currency !== \"GBP\"\n || !CANONICAL_TOKEN_SUBUNITS.test(referencePrice.minorUnits)\n || referencePrice.basis !== \"nominal-reference\"\n || referencePrice.cashRedemptionAllowed !== false\n )\n ) {\n issues.push(\n issue(\n \"invalid-reference-price\",\n \"Reference prices must use canonical GBP minor units, the nominal reference basis and prohibit cash redemption.\",\n `${base}.pricing.referencePrice`,\n module.id,\n ),\n );\n }\n\n issues.push(\n ...validateAssessmentRubric(module.assessment, `${base}.assessment`, module.id),\n );\n\n if (module.hardware.mode === \"physical-first\" && module.hardware.items.length === 0) {\n issues.push(\n issue(\n \"missing-hardware-items\",\n \"Physical-first modules require an exact hardware item list.\",\n `${base}.hardware.items`,\n module.id,\n ),\n );\n }\n\n if (\n module.agents.some(\n (agent) =>\n agent.mayAssignScore !== false ||\n agent.mayAwardReward !== false ||\n agent.mayPublish !== false ||\n agent.mayControlHardware !== false,\n )\n ) {\n issues.push(\n issue(\n \"invalid-agent-authority\",\n \"Module agents cannot own scores, rewards, publishing or hardware control.\",\n `${base}.agents`,\n module.id,\n ),\n );\n }\n\n if (module.missions.length === 0) {\n issues.push(\n issue(\n \"missing-missions\",\n \"A module requires at least one mission.\",\n `${base}.missions`,\n module.id,\n ),\n );\n }\n\n return issues;\n}\n\n/** Return every catalog issue without throwing, suitable for authoring tools. */\nexport function validateLearningPath(\n path: LearningPathVersionV1,\n): LearningValidationIssueV1[] {\n const issues: LearningValidationIssueV1[] = [];\n const moduleIds = new Set<string>();\n const moduleSlugs = new Set<string>();\n\n for (const [index, module] of path.modules.entries()) {\n if (moduleIds.has(module.id)) {\n issues.push(\n issue(\n \"duplicate-module-id\",\n `Duplicate module id ${module.id}.`,\n `modules[${index}].id`,\n module.id,\n ),\n );\n }\n moduleIds.add(module.id);\n\n if (moduleSlugs.has(module.slug)) {\n issues.push(\n issue(\n \"duplicate-module-slug\",\n `Duplicate module slug ${module.slug}.`,\n `modules[${index}].slug`,\n module.id,\n ),\n );\n }\n moduleSlugs.add(module.slug);\n issues.push(...validateModule(module, index));\n }\n\n return issues;\n}\n\n/** Fail fast when a path is not safe to publish or consume. */\nexport function assertValidLearningPath(path: LearningPathVersionV1): void {\n const issues = validateLearningPath(path);\n if (issues.length === 0) return;\n\n const summary = issues\n .map((entry) => `${entry.code} at ${entry.path}: ${entry.message}`)\n .join(\"\\n\");\n throw new Error(`Invalid learning path:\\n${summary}`);\n}\n\nexport { validateAssessmentRubric } from \"./rubric-validation.js\";\nexport {\n JUNIOR_CODER_MISSION_STAGE_ORDER_V1,\n ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1,\n assertValidMissionAuthoringBundle,\n validateMissionAuthoringBundle,\n} from \"./mission-authoring.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOA,SAAS,UAAU,OAA4B;AAC7C,MAAI,SAAS,GAAI,QAAO;AACxB,MAAI,SAAS,GAAI,QAAO;AACxB,MAAI,SAAS,GAAI,QAAO;AACxB,SAAO;AACT;AAMO,SAAS,oBACdA,SACA,SACoB;AACpB,QAAM,WAAW,IAAI,IAAIA,QAAO,SAAS,IAAI,CAAC,cAAc,UAAU,EAAE,CAAC;AACzE,QAAM,aAAa,oBAAI,IAAqC;AAE5D,aAAW,UAAU,SAAS;AAC5B,QAAI,CAAC,SAAS,IAAI,OAAO,WAAW,GAAG;AACrC,YAAM,IAAI,MAAM,iCAAiC,OAAO,WAAW,EAAE;AAAA,IACvE;AACA,QAAI,WAAW,IAAI,OAAO,WAAW,GAAG;AACtC,YAAM,IAAI,MAAM,gCAAgC,OAAO,WAAW,EAAE;AAAA,IACtE;AACA,eAAW,IAAI,OAAO,aAAa,MAAM;AAAA,EAC3C;AAEA,MAAI,QAAQ;AACZ,QAAM,qBAA+B,CAAC;AACtC,QAAM,qBAA+B,CAAC;AACtC,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AA,MACF;AAAA,IACF;AACA,gBAAY,IAAIA,QAAO,IAAI;AAC3B,WAAO,KAAK,GAAG,eAAeA,SAAQ,KAAK,CAAC;AAAA,EAC9C;AAEA,SAAO;AACT;AAGO,SAAS,wBAAwB,MAAmC;AACzE,QAAM,SAAS,qBAAqB,IAAI;AACxC,MAAI,OAAO,WAAW,EAAG;AAEzB,QAAM,UAAU,OACb,IAAI,CAAC,UAAU,GAAG,MAAM,IAAI,OAAO,MAAM,IAAI,KAAK,MAAM,OAAO,EAAE,EACjE,KAAK,IAAI;AACZ,QAAM,IAAI,MAAM;AAAA,EAA2B,OAAO,EAAE;AACtD;","names":["rubric","module","rubric","module","mission","rubricIssue","module"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/assessment.ts","../src/catalog.ts","../src/contracts.ts","../src/rubric-validation.ts","../src/mission-authoring.ts","../src/validation.ts"],"sourcesContent":["export * from \"./assessment.js\";\nexport * from \"./catalog.js\";\nexport * from \"./contracts.js\";\nexport * from \"./validation.js\";\n","import type {\n AssessmentCheckResultV1,\n AssessmentResultV1,\n AssessmentRubricV1,\n ScoreBandV1,\n} from \"./contracts.js\";\n\nfunction scoreBand(score: number): ScoreBandV1 {\n if (score >= 95) return \"mastered\";\n if (score >= 80) return \"mission-complete\";\n if (score >= 60) return \"nearly-there\";\n return \"keep-exploring\";\n}\n\n/**\n * Calculate a score solely from rubric criteria and objective check results.\n * Missing criteria fail closed; unknown and duplicate result IDs are rejected.\n */\nexport function calculateAssessment(\n rubric: AssessmentRubricV1,\n results: AssessmentCheckResultV1[],\n): AssessmentResultV1 {\n const knownIds = new Set(rubric.criteria.map((criterion) => criterion.id));\n const resultById = new Map<string, AssessmentCheckResultV1>();\n\n for (const result of results) {\n if (!knownIds.has(result.criterionId)) {\n throw new Error(`Unknown assessment criterion: ${result.criterionId}`);\n }\n if (resultById.has(result.criterionId)) {\n throw new Error(`Duplicate assessment result: ${result.criterionId}`);\n }\n resultById.set(result.criterionId, result);\n }\n\n let score = 0;\n const passedCriterionIds: string[] = [];\n const failedCriterionIds: string[] = [];\n const failedMandatoryCriterionIds: string[] = [];\n\n for (const criterion of rubric.criteria) {\n const passed = resultById.get(criterion.id)?.passed === true;\n if (passed) {\n score += criterion.points;\n passedCriterionIds.push(criterion.id);\n continue;\n }\n\n failedCriterionIds.push(criterion.id);\n if (criterion.mandatory) failedMandatoryCriterionIds.push(criterion.id);\n }\n\n return {\n score,\n band: scoreBand(score),\n completed:\n score >= rubric.completionScore && failedMandatoryCriterionIds.length === 0,\n passedCriterionIds,\n failedCriterionIds,\n failedMandatoryCriterionIds,\n };\n}\n","import type {\n AssessmentRubricV1,\n CourseMaterialsManifestV1,\n HardwareItemV1,\n HardwareRequirementManifestV1,\n LearningModuleVersionV1,\n LearningPathVersionV1,\n MissionV1,\n ModuleAgentDefinitionV1,\n ModuleCategoryV1,\n} from \"./contracts.js\";\n\nconst SOFTWARE_HARDWARE: HardwareRequirementManifestV1 = {\n requirementsVersion: \"1.0.0\",\n mode: \"none\",\n hardwareIncluded: false,\n simulatorAvailable: true,\n verificationStatus: \"not-applicable\",\n publicSaleBlocked: false,\n preparationMinutes: 0,\n items: [],\n warnings: [\"No specialist physical equipment is required.\"],\n supportedPlatforms: [\"Current Chromium, Firefox or Safari browser\"],\n};\n\nconst CORE_ROBOT_ITEMS: HardwareItemV1[] = [\n {\n id: \"pico-2-w\",\n label: \"Raspberry Pi Pico 2 W\",\n quantity: 1,\n requirement: \"required\",\n exactSpecification: \"Raspberry Pi Pico 2 W with soldered headers\",\n adultOnly: false,\n stage: \"core\",\n },\n {\n id: \"breadboard\",\n label: \"Solderless breadboard\",\n quantity: 1,\n requirement: \"required\",\n exactSpecification: \"400-point or larger solderless breadboard\",\n adultOnly: false,\n stage: \"core\",\n },\n {\n id: \"usb-data-cable\",\n label: \"USB data cable\",\n quantity: 1,\n requirement: \"required\",\n exactSpecification: \"Data-capable USB cable compatible with the Pico 2 W\",\n adultOnly: false,\n stage: \"core\",\n },\n {\n id: \"jumper-wires\",\n label: \"Jumper wires\",\n quantity: 12,\n requirement: \"required\",\n exactSpecification: \"Insulated male-to-male breadboard jumper wires\",\n adultOnly: false,\n stage: \"core\",\n },\n];\n\nconst ROBOT_WARNING =\n \"Physical publication is blocked until every listed actuator, driver, sensor and power configuration passes an adult bench test.\";\n\nfunction physicalHardware(\n requirementsVersion: string,\n preparationMinutes: number,\n items: HardwareItemV1[],\n platforms: string[],\n): HardwareRequirementManifestV1 {\n return {\n requirementsVersion,\n mode: \"physical-first\",\n hardwareIncluded: false,\n simulatorAvailable: true,\n verificationStatus: \"pending-bench-test\",\n publicSaleBlocked: true,\n preparationMinutes,\n items: [...CORE_ROBOT_ITEMS, ...items],\n warnings: [ROBOT_WARNING, \"An adult must disconnect actuator power before changing wiring.\"],\n supportedPlatforms: platforms,\n };\n}\n\nfunction materials(slug: string, robot = false): CourseMaterialsManifestV1 {\n return {\n version: \"1.0.0\",\n learner: [\n { id: `${slug}-child-guide`, kind: \"child-guide\", audience: \"learner\" },\n { id: `${slug}-mission-cards`, kind: \"mission-cards\", audience: \"learner\" },\n { id: `${slug}-starter`, kind: \"starter-project\", audience: \"learner\" },\n { id: `${slug}-assets`, kind: \"asset-pack\", audience: \"learner\" },\n { id: `${slug}-printable`, kind: \"printable\", audience: \"learner\" },\n ],\n facilitator: [\n { id: `${slug}-facilitator`, kind: \"facilitator-guide\", audience: \"facilitator\" },\n { id: `${slug}-answers`, kind: \"answer-key\", audience: \"facilitator\" },\n { id: `${slug}-tests`, kind: \"protected-tests\", audience: \"facilitator\" },\n ...(robot\n ? [\n {\n id: `${slug}-hardware`,\n kind: \"hardware-guide\" as const,\n audience: \"facilitator\" as const,\n },\n ]\n : []),\n ],\n };\n}\n\nfunction agents(slug: string): ModuleAgentDefinitionV1[] {\n return [\n {\n id: `${slug}-assessor`,\n role: \"assessor\",\n evidenceBound: true,\n maySuggestSingleFix: false,\n mayAssignScore: false,\n mayAwardReward: false,\n mayPublish: false,\n mayControlHardware: false,\n },\n {\n id: `${slug}-debugger`,\n role: \"debugger\",\n evidenceBound: true,\n maySuggestSingleFix: false,\n mayAssignScore: false,\n mayAwardReward: false,\n mayPublish: false,\n mayControlHardware: false,\n },\n {\n id: `${slug}-fix-guide`,\n role: \"fix-guide\",\n evidenceBound: true,\n maySuggestSingleFix: true,\n mayAssignScore: false,\n mayAwardReward: false,\n mayPublish: false,\n mayControlHardware: false,\n },\n {\n id: `${slug}-concept-explainer`,\n role: \"concept-explainer\",\n evidenceBound: true,\n maySuggestSingleFix: false,\n mayAssignScore: false,\n mayAwardReward: false,\n mayPublish: false,\n mayControlHardware: false,\n },\n ];\n}\n\nfunction rubric(slug: string): AssessmentRubricV1 {\n return {\n version: \"1.0.0\",\n completionScore: 80,\n criteria: [\n {\n id: `${slug}-build`,\n label: \"The project is structurally valid and starts successfully.\",\n dimension: \"structure\",\n points: 20,\n mandatory: true,\n visibility: \"visible\",\n },\n {\n id: `${slug}-goal-one`,\n label: \"The first published project behaviour works.\",\n dimension: \"behaviour\",\n points: 20,\n mandatory: true,\n visibility: \"visible\",\n },\n {\n id: `${slug}-goal-two`,\n label: \"The second published project behaviour works.\",\n dimension: \"behaviour\",\n points: 20,\n mandatory: true,\n visibility: \"visible\",\n },\n {\n id: `${slug}-goal-three`,\n label: \"The complete project challenge works.\",\n dimension: \"behaviour\",\n points: 10,\n mandatory: false,\n visibility: \"visible\",\n },\n {\n id: `${slug}-edge-one`,\n label: \"The project handles its first protected edge case.\",\n dimension: \"resilience\",\n points: 10,\n mandatory: false,\n visibility: \"protected\",\n },\n {\n id: `${slug}-edge-two`,\n label: \"The project handles its second protected edge case.\",\n dimension: \"resilience\",\n points: 10,\n mandatory: false,\n visibility: \"protected\",\n },\n {\n id: `${slug}-safety`,\n label: \"The project obeys its mandatory safety and privacy boundary.\",\n dimension: \"safety\",\n points: 10,\n mandatory: true,\n visibility: \"visible\",\n },\n ],\n };\n}\n\nfunction mission(\n slug: string,\n index: number,\n title: string,\n concepts: string[],\n statement: string,\n sideAdventure: string,\n): MissionV1 {\n return {\n id: `${slug}-mission-${index}`,\n title,\n estimatedMinutes: index === 4 ? 25 : 20,\n concepts,\n goals: [\n {\n id: `${slug}-goal-${index}`,\n statement,\n evidence: \"assessment\",\n },\n ],\n sideAdventure,\n };\n}\n\ninterface ModuleInput {\n slug: string;\n title: string;\n category: ModuleCategoryV1;\n summary: string;\n tools: string[];\n concepts: string[];\n tokenSubunits: string;\n hosting?: boolean;\n hardware?: HardwareRequirementManifestV1;\n missionTitles: [string, string, string, string];\n}\n\nfunction module(input: ModuleInput): LearningModuleVersionV1 {\n const isRobot = input.category === \"robot\";\n return {\n id: `junior-coder.${input.slug}`,\n slug: input.slug,\n version: \"1.0.0\",\n contentRevision: \"2026-07-21.1\",\n title: input.title,\n category: input.category,\n summary: input.summary,\n estimatedMinutes: 90,\n tools: input.tools,\n concepts: input.concepts,\n selfContained: true,\n prerequisiteModuleIds: [],\n pricing: {\n state: \"pilot-grant-only\",\n tokenSubunits: input.tokenSubunits,\n includesMaterials: true,\n includesAssessmentRetries: true,\n includesAgents: true,\n includesHostingAllowance: input.hosting ?? false,\n },\n materials: materials(input.slug, isRobot),\n hardware: input.hardware ?? SOFTWARE_HARDWARE,\n missions: input.missionTitles.map((title, index) =>\n mission(\n input.slug,\n index + 1,\n title,\n input.concepts.slice(0, 3),\n `Complete ${title.toLocaleLowerCase(\"en-GB\")} and explain the observed result.`,\n `Invent one safe remix for ${title.toLocaleLowerCase(\"en-GB\")}.`,\n ),\n ),\n assessment: rubric(input.slug),\n agents: agents(input.slug),\n badges: [\n {\n id: `${input.slug}-mission-complete`,\n title: `${input.title} Champion`,\n evidence: \"module-score\",\n tradeable: false,\n tokenConvertible: false,\n },\n ...(isRobot\n ? [\n {\n id: `${input.slug}-physical-builder`,\n title: `${input.title} Physical Builder`,\n evidence: \"adult-physical-signoff\" as const,\n tradeable: false as const,\n tokenConvertible: false as const,\n },\n ]\n : []),\n ],\n };\n}\n\nconst modules: LearningModuleVersionV1[] = [\n module({\n slug: \"robot-maze-dash\",\n title: \"Robot Maze Dash\",\n category: \"game\",\n summary: \"Guide rescue robots through original mazes with visual programs and side-by-side text code.\",\n tools: [\"Visual blocks\", \"JavaScript view\", \"Python view\", \"C++ view\"],\n concepts: [\"sequence\", \"variables\", \"loops\", \"conditions\", \"functions\"],\n tokenSubunits: \"8000\",\n missionTitles: [\"Meet Your Robot\", \"Repeat the Rescue\", \"Choose the Safe Path\", \"Lost Robot Challenge\"],\n }),\n module({\n slug: \"road-hopper-rally\",\n title: \"Road Hopper Rally\",\n category: \"game\",\n summary: \"Build an original road-crossing game with changing lanes and rescue targets.\",\n tools: [\"JavaScript\", \"Educational canvas API\"],\n concepts: [\"events\", \"coordinates\", \"animation\", \"collision\", \"scoring\"],\n tokenSubunits: \"10000\",\n missionTitles: [\"Draw the Rescue Road\", \"Move the Hopper\", \"Add Moving Traffic\", \"Rally Challenge\"],\n }),\n module({\n slug: \"skywing-sprint\",\n title: \"Skywing Sprint\",\n category: \"game\",\n summary: \"Fly a rescue craft through procedurally changing sky gates.\",\n tools: [\"JavaScript\", \"Educational canvas API\"],\n concepts: [\"velocity\", \"gravity\", \"timing\", \"randomness\", \"obstacles\"],\n tokenSubunits: \"10000\",\n missionTitles: [\"Give Skywing Lift\", \"Build a Gate\", \"Score a Safe Flight\", \"Sky Sprint Challenge\"],\n }),\n module({\n slug: \"paddle-pulse\",\n title: \"Paddle Pulse\",\n category: \"game\",\n summary: \"Create a paddle-and-energy-ball arcade game with levels and original power-ups.\",\n tools: [\"JavaScript\", \"Educational canvas API\"],\n concepts: [\"angles\", \"collision response\", \"levels\", \"power-ups\", \"state\"],\n tokenSubunits: \"12000\",\n missionTitles: [\"Move the Pulse Paddle\", \"Bounce the Energy Ball\", \"Build a Target Wall\", \"Power-Up Challenge\"],\n }),\n module({\n slug: \"meteor-shield\",\n title: \"Meteor Shield\",\n category: \"game\",\n summary: \"Protect rescue bases with careful targeting and limited shield energy.\",\n tools: [\"JavaScript\", \"Educational canvas API\"],\n concepts: [\"targeting\", \"projectiles\", \"timers\", \"waves\", \"resources\"],\n tokenSubunits: \"12000\",\n missionTitles: [\"Mark the Rescue Bases\", \"Launch a Shield\", \"Create Meteor Waves\", \"Last Base Challenge\"],\n }),\n module({\n slug: \"rescue-crew-commander\",\n title: \"Rescue Crew Commander\",\n category: \"game\",\n summary: \"Assign safe jobs, routes and priorities to a team of original helper creatures.\",\n tools: [\"Visual blocks\", \"JavaScript\"],\n concepts: [\"state machines\", \"routes\", \"priorities\", \"group behaviour\", \"debugging\"],\n tokenSubunits: \"14000\",\n missionTitles: [\"Meet the Rescue Crew\", \"Give a Crew Job\", \"Choose a Safe Route\", \"Commander Challenge\"],\n }),\n module({\n slug: \"pixel-trail-challenge\",\n title: \"Pixel Trail Challenge\",\n category: \"game\",\n summary: \"Use Python lists and grid movement to grow a safe energy trail.\",\n tools: [\"Python\", \"Pyodide\", \"Educational drawing API\"],\n concepts: [\"lists\", \"grid movement\", \"spawning\", \"collision\", \"score\"],\n tokenSubunits: \"10000\",\n missionTitles: [\"Move the Pixel\", \"Grow the Trail\", \"Place Energy Orbs\", \"Trail Challenge\"],\n }),\n module({\n slug: \"star-defender-squadron\",\n title: \"Star Defender Squadron\",\n category: \"game\",\n summary: \"Build a multi-level space-rescue finale with original entities and enemy patterns.\",\n tools: [\"Python\", \"JavaScript\", \"Educational drawing API\"],\n concepts: [\"entities\", \"projectiles\", \"patterns\", \"health\", \"levels\"],\n tokenSubunits: \"16000\",\n missionTitles: [\"Launch the Squadron\", \"Build a Rescue Wave\", \"Add Shields and Health\", \"Star Defender Finale\"],\n }),\n module({\n slug: \"beacon-bot\",\n title: \"Beacon Bot\",\n category: \"robot\",\n summary: \"Program visible and infrared rescue signals with C++ and a Pico 2 W.\",\n tools: [\"C++\", \"Pico 2 W\", \"Simulator\"],\n concepts: [\"digital output\", \"timing\", \"functions\", \"signals\", \"sensor input\"],\n tokenSubunits: \"8000\",\n hardware: physicalHardware(\"1.0.0\", 30, [\n { id: \"led-pack\", label: \"Visible LEDs\", quantity: 3, requirement: \"required\", exactSpecification: \"5 mm low-current red, amber and green LEDs\", adultOnly: false, stage: \"core\" },\n { id: \"led-resistors\", label: \"LED current-limiting resistors\", quantity: 3, requirement: \"required\", exactSpecification: \"330 ohm, 0.25 W resistors\", adultOnly: false, stage: \"core\" },\n { id: \"ir-pair\", label: \"Infrared emitter and receiver\", quantity: 1, requirement: \"required\", exactSpecification: \"Matched 940 nm IR LED and 3.3 V-compatible digital receiver pair; exact reference model pending bench verification\", adultOnly: true, stage: \"sensor\" },\n ], [\"Pico SDK on Raspberry Pi OS or supported desktop toolchain\"]),\n missionTitles: [\"Blink a Rescue Signal\", \"Build a Signal Function\", \"Send an IR Message\", \"Beacon Challenge\"],\n }),\n module({\n slug: \"servo-creature\",\n title: \"Servo Creature\",\n category: \"robot\",\n summary: \"Give a servo creature safe movements, moods and sensor reactions.\",\n tools: [\"C++\", \"Pico 2 W\", \"Simulator\"],\n concepts: [\"PWM\", \"angles\", \"sequences\", \"limits\", \"interaction\"],\n tokenSubunits: \"10000\",\n hardware: physicalHardware(\"1.0.0\", 40, [\n { id: \"micro-servo\", label: \"Micro servo\", quantity: 1, requirement: \"required\", exactSpecification: \"3.3 V signal-compatible micro servo; exact reference model and external power arrangement pending bench verification\", adultOnly: true, stage: \"servo\" },\n { id: \"servo-power\", label: \"Servo power supply\", quantity: 1, requirement: \"required\", exactSpecification: \"Switched regulated supply sized for the verified servo, with common signal ground\", adultOnly: true, stage: \"servo\" },\n ], [\"Pico SDK on Raspberry Pi OS or supported desktop toolchain\"]),\n missionTitles: [\"Wake the Creature\", \"Make a Movement Sequence\", \"Choose a Mood\", \"Creature Show Challenge\"],\n }),\n module({\n slug: \"dance-rover\",\n title: \"Dance Rover\",\n category: \"robot\",\n summary: \"Build reusable movement functions and a fail-safe rover dance.\",\n tools: [\"C++\", \"Pico 2 W\", \"Simulator\"],\n concepts: [\"motor direction\", \"PWM speed\", \"functions\", \"sequences\", \"emergency stop\"],\n tokenSubunits: \"14000\",\n hardware: physicalHardware(\"1.0.0\", 90, [\n { id: \"dual-motor-driver\", label: \"Dual motor driver\", quantity: 1, requirement: \"required\", exactSpecification: \"3.3 V logic-compatible dual H-bridge; exact reference model pending bench verification\", adultOnly: true, stage: \"rover\" },\n { id: \"geared-motors\", label: \"Matching geared motors\", quantity: 2, requirement: \"required\", exactSpecification: \"Matching low-voltage geared DC motors compatible with the verified driver and supply\", adultOnly: true, stage: \"rover\" },\n { id: \"rover-chassis\", label: \"Rover chassis set\", quantity: 1, requirement: \"required\", exactSpecification: \"Two-wheel chassis with matching wheels and caster or skid\", adultOnly: true, stage: \"rover\" },\n { id: \"motor-power\", label: \"Switched motor power supply\", quantity: 1, requirement: \"required\", exactSpecification: \"Fused or protected switched supply within verified driver and motor ratings\", adultOnly: true, stage: \"rover\" },\n ], [\"Pico SDK on Raspberry Pi OS or supported desktop toolchain\"]),\n missionTitles: [\"Lifted-Wheel Safety Test\", \"Drive and Turn\", \"Build Movement Functions\", \"Rover Dance Challenge\"],\n }),\n module({\n slug: \"obstacle-explorer\",\n title: \"Obstacle Explorer\",\n category: \"robot\",\n summary: \"Use IR sensing, state and watchdogs to navigate and stop safely.\",\n tools: [\"C++\", \"Pico 2 W\", \"Simulator\"],\n concepts: [\"booleans\", \"state\", \"navigation\", \"watchdogs\", \"fail-safe stop\"],\n tokenSubunits: \"14000\",\n hardware: physicalHardware(\"1.0.0\", 60, [\n { id: \"verified-rover\", label: \"Verified Dance Rover build\", quantity: 1, requirement: \"required\", exactSpecification: \"Bench-signed rover matching the published Dance Rover reference build\", adultOnly: true, stage: \"rover\" },\n { id: \"obstacle-sensors\", label: \"Digital IR obstacle sensors\", quantity: 2, requirement: \"required\", exactSpecification: \"3.3 V-compatible digital IR obstacle sensors; exact reference model pending bench verification\", adultOnly: true, stage: \"sensor\" },\n ], [\"Pico SDK on Raspberry Pi OS or supported desktop toolchain\"]),\n missionTitles: [\"Read an Obstacle\", \"Choose a Safe Response\", \"Add a Watchdog\", \"Explorer Maze Challenge\"],\n }),\n module({\n slug: \"rainbow-rescue-rover\",\n title: \"Rainbow Rescue Rover\",\n category: \"robot\",\n summary: \"Recognise local colour targets and send bounded serial commands to a safe rover.\",\n tools: [\"Python\", \"C++\", \"Pico 2 W\", \"Pi Zero 2 W\", \"Camera Module 3\", \"Simulator\"],\n concepts: [\"colour recognition\", \"coordinates\", \"serial protocol\", \"heartbeats\", \"integration\"],\n tokenSubunits: \"18000\",\n hardware: physicalHardware(\"1.0.0\", 120, [\n { id: \"verified-explorer\", label: \"Verified Obstacle Explorer build\", quantity: 1, requirement: \"required\", exactSpecification: \"Bench-signed rover matching the published Obstacle Explorer reference build\", adultOnly: true, stage: \"rover\" },\n { id: \"pi-zero-2-w\", label: \"Raspberry Pi Zero 2 W\", quantity: 1, requirement: \"required\", exactSpecification: \"Raspberry Pi Zero 2 W with supported Raspberry Pi OS image\", adultOnly: true, stage: \"camera\" },\n { id: \"camera-3\", label: \"Raspberry Pi Camera Module 3\", quantity: 1, requirement: \"required\", exactSpecification: \"Raspberry Pi Camera Module 3 with the correct Zero-series camera ribbon\", adultOnly: true, stage: \"camera\" },\n { id: \"pi-storage-power\", label: \"Pi storage and power\", quantity: 1, requirement: \"required\", exactSpecification: \"Supported microSD card and regulated Raspberry Pi power supply\", adultOnly: true, stage: \"camera\" },\n ], [\"Current Raspberry Pi OS\", \"Pico SDK\"]),\n missionTitles: [\"Find a Colour Target\", \"Report Left Centre or Right\", \"Send Safe Serial Commands\", \"Rainbow Rescue Challenge\"],\n }),\n module({\n slug: \"vibe-game-remix-lab\",\n title: \"Vibe Game Remix Lab\",\n category: \"vibe\",\n summary: \"Transform a supplied mini-game through structured, evidence-bound AI suggestions.\",\n tools: [\"Structured prompt builder\", \"Diff review\", \"JavaScript sandbox\"],\n concepts: [\"intent\", \"constraints\", \"diffs\", \"testing\", \"explanation\"],\n tokenSubunits: \"12000\",\n missionTitles: [\"Describe the Remix\", \"Constrain the Change\", \"Review One Diff\", \"Remix Challenge\"],\n }),\n module({\n slug: \"vibe-bug-detective\",\n title: \"Vibe Bug Detective\",\n category: \"vibe\",\n summary: \"Repair an intentionally broken project using assessment evidence and focused suggestions.\",\n tools: [\"Structured prompt builder\", \"Diff review\", \"Assessment runner\"],\n concepts: [\"diagnostics\", \"hypotheses\", \"minimal fixes\", \"regression tests\", \"reflection\"],\n tokenSubunits: \"12000\",\n missionTitles: [\"Read the Evidence\", \"Ask a Focused Question\", \"Inspect a Suggested Fix\", \"Regression Challenge\"],\n }),\n module({\n slug: \"vibe-idea-studio\",\n title: \"Vibe Idea Studio\",\n category: \"vibe\",\n summary: \"Turn a bounded original idea into goals, acceptance tests and a working prototype.\",\n tools: [\"Intent cards\", \"Structured prompt builder\", \"Diff review\", \"Sandbox\"],\n concepts: [\"goals\", \"acceptance tests\", \"iteration\", \"trade-offs\", \"explanation\"],\n tokenSubunits: \"16000\",\n missionTitles: [\"Shape the Idea\", \"Write Success Tests\", \"Build One Step\", \"Prototype Showcase\"],\n }),\n module({\n slug: \"adventure-mission-planner\",\n title: \"Adventure Mission Planner\",\n category: \"web-app\",\n summary: \"Build an accessible planner for fictional quests and activities.\",\n tools: [\"HTML\", \"CSS\", \"JavaScript\", \"Private preview\"],\n concepts: [\"semantic HTML\", \"forms\", \"validation\", \"arrays\", \"local persistence\"],\n tokenSubunits: \"10000\",\n hosting: true,\n missionTitles: [\"Make a Semantic Page\", \"Add a Mission Form\", \"Save Fictional Missions\", \"Accessible Planner Challenge\"],\n }),\n module({\n slug: \"creature-care-dashboard\",\n title: \"Creature Care Dashboard\",\n category: \"web-app\",\n summary: \"Create a responsive dashboard for a fictional digital creature.\",\n tools: [\"HTML\", \"CSS\", \"JavaScript\", \"Private preview\"],\n concepts: [\"components\", \"events\", \"timers\", \"status displays\", \"reduced motion\"],\n tokenSubunits: \"12000\",\n hosting: true,\n missionTitles: [\"Design the Creature Card\", \"Update Creature State\", \"Add a Safe Timer\", \"Care Dashboard Challenge\"],\n }),\n module({\n slug: \"robot-mission-control\",\n title: \"Robot Mission Control\",\n category: \"web-app\",\n summary: \"Build a simulated control and telemetry interface with safety confirmations.\",\n tools: [\"HTML\", \"CSS\", \"JavaScript\", \"Serial simulator\", \"Private preview\"],\n concepts: [\"commands\", \"state machines\", \"confirmations\", \"charts\", \"responsive controls\"],\n tokenSubunits: \"14000\",\n hosting: true,\n missionTitles: [\"Build the Control Panel\", \"Simulate Telemetry\", \"Add Stop Confirmations\", \"Mission Control Challenge\"],\n }),\n];\n\n/**\n * Uniform price for the immutable 1.1.0 pilot catalog.\n *\n * The GBP value is product-copy reference metadata under the published\n * 10p-per-Token economy reference rate. It does not create redemption rights.\n */\nexport const JUNIOR_CODER_MODULE_PRICE_V1_1 = Object.freeze({\n tokenSubunits: \"50000\",\n referencePrice: Object.freeze({\n currency: \"GBP\" as const,\n minorUnits: \"500\",\n basis: \"nominal-reference\" as const,\n cashRedemptionAllowed: false as const,\n }),\n});\n\n/** Initial immutable Junior Coder path manifest for pilot grants and shadow pricing. */\nexport const JUNIOR_CODER_ROBOT_RESCUE_PATH_V1: LearningPathVersionV1 = {\n id: \"junior-coder.robot-rescue-arcade\",\n slug: \"robot-rescue-arcade\",\n version: \"1.0.0\",\n title: \"Junior Coder: Robot Rescue Arcade\",\n description: \"Nineteen self-contained game, robotics, Vibe Coding and web-app projects for young programmers.\",\n catalogState: \"pilot\",\n publicLaunchAtomic: true,\n featureFlag: \"learning.junior-coder.catalog.enabled\",\n modules,\n};\n\n/**\n * Uniformly priced successor to the immutable 1.0.0 pilot catalog.\n *\n * All modules remain independently sellable and retain their existing content,\n * manifests and safeguards. The new module and path versions bind the new price\n * without altering previously published records.\n */\nexport const JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1: LearningPathVersionV1 = {\n ...JUNIOR_CODER_ROBOT_RESCUE_PATH_V1,\n version: \"1.1.0\",\n modules: JUNIOR_CODER_ROBOT_RESCUE_PATH_V1.modules.map((entry) => ({\n ...entry,\n version: \"1.1.0\",\n contentRevision: \"2026-07-28.1\",\n pricing: {\n ...entry.pricing,\n tokenSubunits: JUNIOR_CODER_MODULE_PRICE_V1_1.tokenSubunits,\n referencePrice: JUNIOR_CODER_MODULE_PRICE_V1_1.referencePrice,\n },\n })),\n};\n\n/** Current pilot catalog for server adapters that intentionally follow releases. */\nexport const JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT =\n JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1;\n","/** Version-one module categories supported by the learning catalog. */\nexport type ModuleCategoryV1 = \"game\" | \"robot\" | \"vibe\" | \"web-app\";\n\n/** Commercial states deliberately separate pilot grants from public checkout. */\nexport type CommercialStateV1 = \"pilot-grant-only\" | \"fixed-price\" | \"retired\";\n\n/** The four deterministic assessment dimensions and their product meanings. */\nexport type AssessmentDimensionV1 =\n | \"structure\"\n | \"behaviour\"\n | \"resilience\"\n | \"safety\";\n\nexport type ScoreBandV1 =\n | \"keep-exploring\"\n | \"nearly-there\"\n | \"mission-complete\"\n | \"mastered\";\n\nexport type CourseMaterialAudienceV1 = \"learner\" | \"facilitator\";\n\nexport type CourseMaterialKindV1 =\n | \"child-guide\"\n | \"mission-cards\"\n | \"starter-project\"\n | \"asset-pack\"\n | \"printable\"\n | \"facilitator-guide\"\n | \"answer-key\"\n | \"protected-tests\"\n | \"hardware-guide\";\n\nexport type ModuleAgentRoleV1 =\n | \"assessor\"\n | \"debugger\"\n | \"fix-guide\"\n | \"concept-explainer\";\n\nexport type HardwareModeV1 = \"none\" | \"optional\" | \"physical-first\";\n\nexport type HardwareVerificationStatusV1 =\n | \"not-applicable\"\n | \"pending-bench-test\"\n | \"verified\";\n\n/** A material record contains metadata only; storage and signed URLs are adapter concerns. */\nexport interface CourseMaterialV1 {\n id: string;\n kind: CourseMaterialKindV1;\n audience: CourseMaterialAudienceV1;\n title?: string;\n}\n\n/** Learner and facilitator materials are deliberately separated. */\nexport interface CourseMaterialsManifestV1 {\n version: string;\n learner: CourseMaterialV1[];\n facilitator: CourseMaterialV1[];\n}\n\n/** A physical item disclosed before a Guardian creates a purchase quote. */\nexport interface HardwareItemV1 {\n id: string;\n label: string;\n quantity: number;\n requirement: \"required\" | \"optional\";\n exactSpecification: string;\n adultOnly: boolean;\n stage: \"core\" | \"servo\" | \"rover\" | \"sensor\" | \"camera\";\n}\n\n/** Immutable hardware and preparation disclosure for a module version. */\nexport interface HardwareRequirementManifestV1 {\n requirementsVersion: string;\n mode: HardwareModeV1;\n hardwareIncluded: false;\n simulatorAvailable: boolean;\n verificationStatus: HardwareVerificationStatusV1;\n publicSaleBlocked: boolean;\n preparationMinutes: number;\n items: HardwareItemV1[];\n warnings: string[];\n supportedPlatforms: string[];\n}\n\n/** One short, observable learning goal inside a mission. */\nexport interface LearningGoalV1 {\n id: string;\n statement: string;\n evidence: \"assessment\" | \"explanation\" | \"adult-signoff\";\n}\n\n/** A 15–25 minute unit following learn, predict, build, assess and explain. */\nexport interface MissionV1 {\n id: string;\n title: string;\n estimatedMinutes: number;\n concepts: string[];\n goals: LearningGoalV1[];\n sideAdventure: string;\n}\n\n/** One objective source of points in an assessment rubric. */\nexport interface AssessmentCriterionV1 {\n id: string;\n label: string;\n dimension: AssessmentDimensionV1;\n points: number;\n mandatory: boolean;\n visibility: \"visible\" | \"protected\";\n}\n\n/** The immutable assessment authority for a module challenge. */\nexport interface AssessmentRubricV1 {\n version: string;\n completionScore: 80;\n criteria: AssessmentCriterionV1[];\n}\n\nexport interface AssessmentCheckResultV1 {\n criterionId: string;\n passed: boolean;\n sourceLocation?: {\n fileId?: string;\n blockId?: string;\n startLine?: number;\n endLine?: number;\n };\n}\n\nexport interface AssessmentResultV1 {\n score: number;\n band: ScoreBandV1;\n completed: boolean;\n passedCriterionIds: string[];\n failedCriterionIds: string[];\n failedMandatoryCriterionIds: string[];\n}\n\n/** A constrained module-agent role; score and reward authority are always false. */\nexport interface ModuleAgentDefinitionV1 {\n id: string;\n role: ModuleAgentRoleV1;\n evidenceBound: true;\n maySuggestSingleFix: boolean;\n mayAssignScore: false;\n mayAwardReward: false;\n mayPublish: false;\n mayControlHardware: false;\n}\n\n/** Structured feedback that a deterministic or AI-backed adapter may return. */\nexport interface ModuleAgentFeedbackV1 {\n role: ModuleAgentRoleV1;\n assessmentScore: number;\n passedGoalIds: string[];\n failedGoalIds: string[];\n explanation: string;\n expectedBehaviour: string;\n suggestedExperiment?: string;\n sourceLocation?: AssessmentCheckResultV1[\"sourceLocation\"];\n scoreAuthority: \"deterministic-assessment\";\n}\n\n/** Ordinary Token subunits used as a pilot shadow or fixed price. */\nexport interface ModuleReferencePriceV1 {\n /** Reference copy only; this is never a cash balance or redemption promise. */\n currency: \"GBP\";\n /** Canonical GBP minor units. */\n minorUnits: string;\n basis: \"nominal-reference\";\n cashRedemptionAllowed: false;\n}\n\nexport interface ModulePricingV1 {\n state: CommercialStateV1;\n tokenSubunits: string;\n referencePrice?: ModuleReferencePriceV1;\n includesMaterials: true;\n includesAssessmentRetries: true;\n includesAgents: true;\n includesHostingAllowance: boolean;\n}\n\nexport interface BadgeDefinitionV1 {\n id: string;\n title: string;\n evidence: \"mission-score\" | \"module-score\" | \"adult-physical-signoff\";\n tradeable: false;\n tokenConvertible: false;\n}\n\n/** One immutable, independently sellable module version. */\nexport interface LearningModuleVersionV1 {\n id: string;\n slug: string;\n version: string;\n contentRevision: string;\n title: string;\n category: ModuleCategoryV1;\n summary: string;\n estimatedMinutes: number;\n tools: string[];\n concepts: string[];\n selfContained: true;\n prerequisiteModuleIds: string[];\n pricing: ModulePricingV1;\n materials: CourseMaterialsManifestV1;\n hardware: HardwareRequirementManifestV1;\n missions: MissionV1[];\n assessment: AssessmentRubricV1;\n agents: ModuleAgentDefinitionV1[];\n badges: BadgeDefinitionV1[];\n}\n\n/** A versioned path is a recommendation and never a paid prerequisite chain. */\nexport interface LearningPathVersionV1 {\n id: string;\n slug: string;\n version: string;\n title: string;\n description: string;\n catalogState: \"pilot\" | \"public\" | \"retired\";\n publicLaunchAtomic: true;\n featureFlag: string;\n modules: LearningModuleVersionV1[];\n}\n\n/** Entitlement records bind a subject to an immutable module version. */\nexport interface ModuleEntitlementV1 {\n entitlementId: string;\n subjectAccountId: string;\n moduleId: string;\n moduleVersion: string;\n source:\n | \"pilot-grant\"\n | \"module-allowance-purchase\"\n | \"support-grant\"\n | \"admin-test-grant\";\n state: \"pending\" | \"active\" | \"revoked\";\n economyTransactionId?: string;\n grantedAt: string;\n}\n\nexport interface AttemptEvidenceV1 {\n attemptId: string;\n moduleId: string;\n moduleVersion: string;\n assessment: AssessmentResultV1;\n sourceDigest: string;\n recordedAt: string;\n adultPhysicalSignoff?: {\n signedByActorAccountId: string;\n checklistVersion: string;\n signedAt: string;\n };\n}\n\nexport interface GuardianAiConsentV1 {\n actorAccountId: string;\n subjectAccountId: string;\n policyVersion: string;\n state: \"granted\" | \"withdrawn\";\n recordedAt: string;\n}\n\n/** A static project snapshot is immutable and separately approved for publishing. */\nexport interface PublishedStaticProjectSnapshotV1 {\n snapshotId: string;\n subjectAccountId: string;\n moduleId: string;\n sourceDigest: string;\n randomSlug: string;\n guardianApprovalId: string;\n state: \"pending-review\" | \"published\" | \"expired\" | \"unpublished\";\n expiresAt: string;\n}\n\n/** Canonical learner journey shared by interactive and printable adapters. */\nexport const MISSION_AUTHORING_CONTRACT_VERSION_V1 = \"1.0.0\" as const;\n\nexport type MissionStageKindV1 =\n | \"learn\"\n | \"predict\"\n | \"build\"\n | \"run\"\n | \"assess\"\n | \"inspect\"\n | \"fix\"\n | \"explain\"\n | \"reward\";\n\nexport type MissionArtifactKindV1 =\n | \"starter-code\"\n | \"starter-assets\"\n | \"sample-data\"\n | \"printable\"\n | \"facilitator-note\"\n | \"answer-key\"\n | \"protected-test\";\n\n/** Metadata only: storage and authorized delivery remain adapter concerns. */\nexport interface MissionArtifactReferenceV1 {\n id: string;\n kind: MissionArtifactKindV1;\n audience: CourseMaterialAudienceV1;\n solutionBearing: boolean;\n}\n\nexport interface MissionReadinessCheckV1 {\n id: string;\n prompt: string;\n scored: false;\n}\n\nexport interface MissionStageCardV1 {\n kind: MissionStageKindV1;\n instruction: string;\n artifactIds: string[];\n}\n\nexport interface MissionAuthoringGoalV1 {\n id: string;\n statement: string;\n visibility: \"visible\" | \"protected\";\n criterionIds: string[];\n completionRequired: boolean;\n aiRequired: boolean;\n}\n\nexport type MissionInteractionModeV1 =\n | \"keyboard\"\n | \"pointer\"\n | \"drag\"\n | \"audio\"\n | \"colour\"\n | \"motion\"\n | \"text\"\n | \"shape\"\n | \"symbol\"\n | \"reduced-motion\";\n\nexport interface MissionInteractionRequirementV1 {\n id: string;\n description: string;\n primaryMode: MissionInteractionModeV1;\n alternativeIds: string[];\n}\n\nexport interface MissionAccessibilityAlternativeV1 {\n id: string;\n modes: MissionInteractionModeV1[];\n equivalentOutcome: true;\n description: string;\n}\n\nexport type MissionEvidenceKindV1 =\n | \"assessment-result\"\n | \"learner-explanation\"\n | \"project-snapshot\"\n | \"adult-signoff\";\n\nexport type MissionEvidenceRetentionV1 =\n | \"attempt\"\n | \"entitlement\"\n | \"adult-signoff\";\n\nexport interface MissionEvidenceRequirementV1 {\n id: string;\n goalIds: string[];\n kind: MissionEvidenceKindV1;\n retention: MissionEvidenceRetentionV1;\n containsPersonalData: false;\n}\n\nexport interface MissionSideAdventureV1 {\n id: string;\n prompt: string;\n completionRequired: false;\n}\n\nexport interface MissionRewardBindingV1 {\n id: string;\n badgeId: string;\n goalIds: string[];\n deterministic: true;\n random: false;\n tokenConvertible: false;\n}\n\n/** The only mission projection safe to return to a learner. */\nexport interface LearnerMissionAuthoringV1 {\n estimatedMinutes: number;\n stages: MissionStageCardV1[];\n readinessChecks: MissionReadinessCheckV1[];\n artifacts: MissionArtifactReferenceV1[];\n goals: MissionAuthoringGoalV1[];\n interactions: MissionInteractionRequirementV1[];\n accessibilityAlternatives: MissionAccessibilityAlternativeV1[];\n evidenceRequirements: MissionEvidenceRequirementV1[];\n sideAdventures: MissionSideAdventureV1[];\n rewardBindings: MissionRewardBindingV1[];\n}\n\n/** Protected authoring data must never be projected through learner APIs. */\nexport interface FacilitatorMissionAuthoringV1 {\n artifacts: MissionArtifactReferenceV1[];\n protectedGoals: MissionAuthoringGoalV1[];\n prompts: string[];\n}\n\n/** Additive authoring detail keyed to one immutable catalog mission. */\nexport interface MissionAuthoringBundleV1 {\n version: string;\n moduleId: string;\n moduleVersion: string;\n missionId: string;\n learner: LearnerMissionAuthoringV1;\n facilitator: FacilitatorMissionAuthoringV1;\n}\n\nexport interface MissionAuthoringValidationIssueV1 {\n code:\n | \"bundle-version-mismatch\"\n | \"module-reference-mismatch\"\n | \"mission-reference-mismatch\"\n | \"invalid-duration\"\n | \"missing-stage\"\n | \"duplicate-stage\"\n | \"stage-order\"\n | \"missing-readiness-check\"\n | \"scored-readiness-check\"\n | \"missing-starter-artifact\"\n | \"learner-artifact-leak\"\n | \"facilitator-artifact-leak\"\n | \"unknown-artifact\"\n | \"duplicate-id\"\n | \"missing-visible-goal\"\n | \"missing-protected-goal\"\n | \"invalid-goal-projection\"\n | \"duplicate-goal-id\"\n | \"unknown-criterion\"\n | \"criterion-visibility-mismatch\"\n | \"rubric-total\"\n | \"rubric-dimension-total\"\n | \"duplicate-criterion-id\"\n | \"missing-mandatory-safety\"\n | \"missing-safety-evidence\"\n | \"ai-dependent-completion\"\n | \"inaccessible-interaction\"\n | \"unknown-accessibility-alternative\"\n | \"non-equivalent-accessibility-alternative\"\n | \"missing-evidence\"\n | \"unknown-evidence-goal\"\n | \"personal-data-evidence\"\n | \"missing-side-adventure\"\n | \"mandatory-side-adventure\"\n | \"invalid-reward\";\n message: string;\n path: string;\n}\n\nexport interface LearningValidationIssueV1 {\n code:\n | \"duplicate-module-id\"\n | \"duplicate-module-slug\"\n | \"module-not-self-contained\"\n | \"paid-prerequisite\"\n | \"missing-materials\"\n | \"facilitator-material-leak\"\n | \"learner-material-leak\"\n | \"invalid-token-subunits\"\n | \"invalid-reference-price\"\n | \"rubric-total\"\n | \"rubric-dimension-total\"\n | \"duplicate-criterion-id\"\n | \"missing-mandatory-safety\"\n | \"missing-hardware-items\"\n | \"invalid-agent-authority\"\n | \"missing-missions\";\n message: string;\n moduleId?: string;\n path: string;\n}\n","import type {\n AssessmentDimensionV1,\n AssessmentRubricV1,\n LearningValidationIssueV1,\n} from \"./contracts.js\";\n\nconst DIMENSION_TOTALS: Record<AssessmentDimensionV1, number> = {\n structure: 20,\n behaviour: 50,\n resilience: 20,\n safety: 10,\n};\n\nfunction rubricIssue(\n code: LearningValidationIssueV1[\"code\"],\n message: string,\n path: string,\n moduleId?: string,\n): LearningValidationIssueV1 {\n return { code, message, path, ...(moduleId ? { moduleId } : {}) };\n}\n\n/** Validate the deterministic 20/50/20/10 assessment authority. */\nexport function validateAssessmentRubric(\n rubric: AssessmentRubricV1,\n path = \"assessment\",\n moduleId?: string,\n): LearningValidationIssueV1[] {\n const issues: LearningValidationIssueV1[] = [];\n const criterionIds = new Set<string>();\n const dimensionTotals: Record<AssessmentDimensionV1, number> = {\n structure: 0,\n behaviour: 0,\n resilience: 0,\n safety: 0,\n };\n let rubricTotal = 0;\n\n for (const criterion of rubric.criteria) {\n rubricTotal += criterion.points;\n dimensionTotals[criterion.dimension] += criterion.points;\n if (criterionIds.has(criterion.id)) {\n issues.push(\n rubricIssue(\n \"duplicate-criterion-id\",\n `Duplicate assessment criterion ${criterion.id}.`,\n `${path}.criteria`,\n moduleId,\n ),\n );\n }\n criterionIds.add(criterion.id);\n }\n\n if (rubricTotal !== 100) {\n issues.push(\n rubricIssue(\n \"rubric-total\",\n `Assessment rubric totals ${rubricTotal}; expected 100.`,\n `${path}.criteria`,\n moduleId,\n ),\n );\n }\n\n for (const [dimension, expected] of Object.entries(DIMENSION_TOTALS) as Array<\n [AssessmentDimensionV1, number]\n >) {\n if (dimensionTotals[dimension] !== expected) {\n issues.push(\n rubricIssue(\n \"rubric-dimension-total\",\n `${dimension} criteria total ${dimensionTotals[dimension]}; expected ${expected}.`,\n `${path}.criteria`,\n moduleId,\n ),\n );\n }\n }\n\n if (\n !rubric.criteria.some(\n (criterion) => criterion.dimension === \"safety\" && criterion.mandatory,\n )\n ) {\n issues.push(\n rubricIssue(\n \"missing-mandatory-safety\",\n \"Every module requires a mandatory safety criterion.\",\n `${path}.criteria`,\n moduleId,\n ),\n );\n }\n\n return issues;\n}\n","import {\n MISSION_AUTHORING_CONTRACT_VERSION_V1,\n type LearningModuleVersionV1,\n type MissionArtifactKindV1,\n type MissionAuthoringBundleV1,\n type MissionAuthoringValidationIssueV1,\n type MissionInteractionModeV1,\n type MissionStageKindV1,\n} from \"./contracts.js\";\nimport { validateAssessmentRubric } from \"./rubric-validation.js\";\n\nexport const JUNIOR_CODER_MISSION_STAGE_ORDER_V1 = [\n \"learn\",\n \"predict\",\n \"build\",\n \"run\",\n \"assess\",\n \"inspect\",\n \"fix\",\n \"explain\",\n \"reward\",\n] as const satisfies readonly MissionStageKindV1[];\n\nconst LEARNER_STARTER_KINDS = new Set<MissionArtifactKindV1>([\n \"starter-code\",\n \"starter-assets\",\n \"sample-data\",\n]);\n\nconst LEARNER_FORBIDDEN_KINDS = new Set<MissionArtifactKindV1>([\n \"facilitator-note\",\n \"answer-key\",\n \"protected-test\",\n]);\n\nconst SINGLE_MODE_REQUIRES_ALTERNATIVE = new Set<MissionInteractionModeV1>([\n \"pointer\",\n \"drag\",\n \"audio\",\n \"colour\",\n \"motion\",\n]);\n\nfunction authoringIssue(\n code: MissionAuthoringValidationIssueV1[\"code\"],\n message: string,\n path: string,\n): MissionAuthoringValidationIssueV1 {\n return { code, message, path };\n}\n\nfunction reportDuplicateIds(\n ids: string[],\n path: string,\n): MissionAuthoringValidationIssueV1[] {\n const seen = new Set<string>();\n const issues: MissionAuthoringValidationIssueV1[] = [];\n for (const id of ids) {\n if (seen.has(id)) {\n issues.push(\n authoringIssue(\"duplicate-id\", `Duplicate authored ID ${id}.`, path),\n );\n }\n seen.add(id);\n }\n return issues;\n}\n\n/**\n * Validate learner/facilitator authoring against one immutable catalog module.\n * The complete issue set is returned so authoring tools can fix errors in one pass.\n */\nexport function validateMissionAuthoringBundle(\n bundle: MissionAuthoringBundleV1,\n module: LearningModuleVersionV1,\n): MissionAuthoringValidationIssueV1[] {\n const issues: MissionAuthoringValidationIssueV1[] = [];\n\n if (bundle.version !== MISSION_AUTHORING_CONTRACT_VERSION_V1) {\n issues.push(\n authoringIssue(\n \"bundle-version-mismatch\",\n `Unsupported mission authoring version ${bundle.version}.`,\n \"version\",\n ),\n );\n }\n\n if (bundle.moduleId !== module.id || bundle.moduleVersion !== module.version) {\n issues.push(\n authoringIssue(\n \"module-reference-mismatch\",\n `Bundle ${bundle.moduleId}@${bundle.moduleVersion} does not match ${module.id}@${module.version}.`,\n \"moduleId\",\n ),\n );\n }\n\n if (!module.missions.some((mission) => mission.id === bundle.missionId)) {\n issues.push(\n authoringIssue(\n \"mission-reference-mismatch\",\n `Mission ${bundle.missionId} does not exist in module ${module.id}.`,\n \"missionId\",\n ),\n );\n }\n\n const learner = bundle.learner;\n const facilitator = bundle.facilitator;\n\n if (learner.estimatedMinutes < 15 || learner.estimatedMinutes > 25) {\n issues.push(\n authoringIssue(\n \"invalid-duration\",\n \"A mission must last between 15 and 25 minutes.\",\n \"learner.estimatedMinutes\",\n ),\n );\n }\n\n const stageKinds = learner.stages.map((stage) => stage.kind);\n for (const requiredStage of JUNIOR_CODER_MISSION_STAGE_ORDER_V1) {\n const count = stageKinds.filter((stage) => stage === requiredStage).length;\n if (count === 0) {\n issues.push(\n authoringIssue(\n \"missing-stage\",\n `Mission stage ${requiredStage} is required.`,\n \"learner.stages\",\n ),\n );\n } else if (count > 1) {\n issues.push(\n authoringIssue(\n \"duplicate-stage\",\n `Mission stage ${requiredStage} appears more than once.`,\n \"learner.stages\",\n ),\n );\n }\n }\n if (\n stageKinds.length === JUNIOR_CODER_MISSION_STAGE_ORDER_V1.length\n && stageKinds.some(\n (stage, index) => stage !== JUNIOR_CODER_MISSION_STAGE_ORDER_V1[index],\n )\n ) {\n issues.push(\n authoringIssue(\n \"stage-order\",\n \"Mission stages must follow the canonical learner journey.\",\n \"learner.stages\",\n ),\n );\n }\n\n if (learner.readinessChecks.length === 0) {\n issues.push(\n authoringIssue(\n \"missing-readiness-check\",\n \"At least one unscored readiness check is required.\",\n \"learner.readinessChecks\",\n ),\n );\n }\n if (learner.readinessChecks.some((check) => check.scored !== false)) {\n issues.push(\n authoringIssue(\n \"scored-readiness-check\",\n \"Readiness checks must not affect the deterministic score.\",\n \"learner.readinessChecks\",\n ),\n );\n }\n issues.push(\n ...reportDuplicateIds(\n learner.readinessChecks.map((check) => check.id),\n \"learner.readinessChecks\",\n ),\n );\n\n const learnerArtifactIds = new Set(learner.artifacts.map((artifact) => artifact.id));\n if (!learner.artifacts.some((artifact) => LEARNER_STARTER_KINDS.has(artifact.kind))) {\n issues.push(\n authoringIssue(\n \"missing-starter-artifact\",\n \"At least one learner-safe starter artifact is required.\",\n \"learner.artifacts\",\n ),\n );\n }\n if (\n learner.artifacts.some(\n (artifact) =>\n artifact.audience !== \"learner\"\n || artifact.solutionBearing\n || LEARNER_FORBIDDEN_KINDS.has(artifact.kind),\n )\n ) {\n issues.push(\n authoringIssue(\n \"learner-artifact-leak\",\n \"Learner artifacts cannot contain facilitator or solution-bearing content.\",\n \"learner.artifacts\",\n ),\n );\n }\n if (facilitator.artifacts.some((artifact) => artifact.audience !== \"facilitator\")) {\n issues.push(\n authoringIssue(\n \"facilitator-artifact-leak\",\n \"Facilitator artifacts must remain in the facilitator projection.\",\n \"facilitator.artifacts\",\n ),\n );\n }\n issues.push(\n ...reportDuplicateIds(\n [...learner.artifacts, ...facilitator.artifacts].map((artifact) => artifact.id),\n \"artifacts\",\n ),\n );\n for (const [stageIndex, stage] of learner.stages.entries()) {\n for (const artifactId of stage.artifactIds) {\n if (!learnerArtifactIds.has(artifactId)) {\n issues.push(\n authoringIssue(\n \"unknown-artifact\",\n `Stage references unknown learner artifact ${artifactId}.`,\n `learner.stages[${stageIndex}].artifactIds`,\n ),\n );\n }\n }\n }\n\n if (learner.goals.length === 0) {\n issues.push(\n authoringIssue(\n \"missing-visible-goal\",\n \"At least one visible learner goal is required.\",\n \"learner.goals\",\n ),\n );\n }\n if (facilitator.protectedGoals.length === 0) {\n issues.push(\n authoringIssue(\n \"missing-protected-goal\",\n \"At least one protected facilitator goal is required.\",\n \"facilitator.protectedGoals\",\n ),\n );\n }\n\n const allGoals = [...learner.goals, ...facilitator.protectedGoals];\n const learnerGoalIds = new Set(learner.goals.map((goal) => goal.id));\n const seenGoalIds = new Set<string>();\n for (const goal of allGoals) {\n if (seenGoalIds.has(goal.id)) {\n issues.push(\n authoringIssue(\n \"duplicate-goal-id\",\n `Duplicate goal ID ${goal.id}.`,\n \"goals\",\n ),\n );\n }\n seenGoalIds.add(goal.id);\n }\n if (\n learner.goals.some((goal) => goal.visibility !== \"visible\")\n || facilitator.protectedGoals.some(\n (goal) => goal.visibility !== \"protected\" || goal.completionRequired,\n )\n ) {\n issues.push(\n authoringIssue(\n \"invalid-goal-projection\",\n \"Visible goals belong to learners and protected goals to facilitators.\",\n \"goals\",\n ),\n );\n }\n\n const criterionById = new Map(\n module.assessment.criteria.map((criterion) => [criterion.id, criterion]),\n );\n for (const goal of allGoals) {\n if (goal.criterionIds.length === 0) {\n issues.push(\n authoringIssue(\n \"unknown-criterion\",\n `Goal ${goal.id} must reference a deterministic criterion.`,\n \"goals\",\n ),\n );\n }\n for (const criterionId of goal.criterionIds) {\n const criterion = criterionById.get(criterionId);\n if (!criterion) {\n issues.push(\n authoringIssue(\n \"unknown-criterion\",\n `Goal ${goal.id} references unknown criterion ${criterionId}.`,\n \"goals\",\n ),\n );\n } else if (criterion.visibility !== goal.visibility) {\n issues.push(\n authoringIssue(\n \"criterion-visibility-mismatch\",\n `Goal ${goal.id} cannot expose a ${criterion.visibility} criterion as ${goal.visibility}.`,\n \"goals\",\n ),\n );\n }\n }\n if (goal.completionRequired && goal.aiRequired) {\n issues.push(\n authoringIssue(\n \"ai-dependent-completion\",\n `Completion goal ${goal.id} cannot require AI.`,\n \"goals\",\n ),\n );\n }\n }\n\n for (const rubricIssue of validateAssessmentRubric(module.assessment)) {\n if (\n rubricIssue.code === \"rubric-total\"\n || rubricIssue.code === \"rubric-dimension-total\"\n || rubricIssue.code === \"duplicate-criterion-id\"\n || rubricIssue.code === \"missing-mandatory-safety\"\n ) {\n issues.push(\n authoringIssue(rubricIssue.code, rubricIssue.message, rubricIssue.path),\n );\n }\n }\n\n const alternativeById = new Map(\n learner.accessibilityAlternatives.map((alternative) => [alternative.id, alternative]),\n );\n issues.push(\n ...reportDuplicateIds(\n learner.interactions.map((interaction) => interaction.id),\n \"learner.interactions\",\n ),\n ...reportDuplicateIds(\n learner.accessibilityAlternatives.map((alternative) => alternative.id),\n \"learner.accessibilityAlternatives\",\n ),\n );\n for (const [interactionIndex, interaction] of learner.interactions.entries()) {\n if (\n SINGLE_MODE_REQUIRES_ALTERNATIVE.has(interaction.primaryMode)\n && interaction.alternativeIds.length === 0\n ) {\n issues.push(\n authoringIssue(\n \"inaccessible-interaction\",\n `Interaction ${interaction.id} requires an equivalent alternative.`,\n `learner.interactions[${interactionIndex}]`,\n ),\n );\n }\n for (const alternativeId of interaction.alternativeIds) {\n const alternative = alternativeById.get(alternativeId);\n if (!alternative) {\n issues.push(\n authoringIssue(\n \"unknown-accessibility-alternative\",\n `Interaction ${interaction.id} references unknown alternative ${alternativeId}.`,\n `learner.interactions[${interactionIndex}].alternativeIds`,\n ),\n );\n } else if (\n alternative.equivalentOutcome !== true\n || alternative.modes.length === 0\n || alternative.modes.every((mode) => mode === interaction.primaryMode)\n ) {\n issues.push(\n authoringIssue(\n \"non-equivalent-accessibility-alternative\",\n `Alternative ${alternativeId} must provide an equivalent outcome through another mode.`,\n \"learner.accessibilityAlternatives\",\n ),\n );\n }\n }\n }\n\n if (learner.evidenceRequirements.length === 0) {\n issues.push(\n authoringIssue(\n \"missing-evidence\",\n \"At least one evidence requirement is required.\",\n \"learner.evidenceRequirements\",\n ),\n );\n }\n issues.push(\n ...reportDuplicateIds(\n learner.evidenceRequirements.map((evidence) => evidence.id),\n \"learner.evidenceRequirements\",\n ),\n );\n for (const [evidenceIndex, evidence] of learner.evidenceRequirements.entries()) {\n if (evidence.containsPersonalData !== false) {\n issues.push(\n authoringIssue(\n \"personal-data-evidence\",\n \"Mission evidence cannot request personal data.\",\n `learner.evidenceRequirements[${evidenceIndex}]`,\n ),\n );\n }\n for (const goalId of evidence.goalIds) {\n if (!learnerGoalIds.has(goalId)) {\n issues.push(\n authoringIssue(\n \"unknown-evidence-goal\",\n `Evidence references unknown goal ${goalId}.`,\n `learner.evidenceRequirements[${evidenceIndex}].goalIds`,\n ),\n );\n }\n }\n }\n for (const goal of learner.goals.filter((entry) => entry.completionRequired)) {\n if (\n !learner.evidenceRequirements.some((evidence) => evidence.goalIds.includes(goal.id))\n ) {\n issues.push(\n authoringIssue(\n \"missing-evidence\",\n `Completion goal ${goal.id} requires deterministic evidence.`,\n \"learner.evidenceRequirements\",\n ),\n );\n }\n }\n\n const mandatorySafetyGoals = learner.goals.filter(\n (goal) =>\n goal.completionRequired\n && goal.criterionIds.some((criterionId) => {\n const criterion = criterionById.get(criterionId);\n return criterion?.dimension === \"safety\" && criterion.mandatory;\n }),\n );\n if (\n mandatorySafetyGoals.length === 0\n || !mandatorySafetyGoals.some((goal) =>\n learner.evidenceRequirements.some((evidence) => evidence.goalIds.includes(goal.id)),\n )\n ) {\n issues.push(\n authoringIssue(\n \"missing-safety-evidence\",\n \"A completion-required goal must evidence a mandatory safety criterion.\",\n \"learner.evidenceRequirements\",\n ),\n );\n }\n\n issues.push(\n ...reportDuplicateIds(\n learner.sideAdventures.map((adventure) => adventure.id),\n \"learner.sideAdventures\",\n ),\n );\n if (learner.sideAdventures.length === 0) {\n issues.push(\n authoringIssue(\n \"missing-side-adventure\",\n \"At least one optional side adventure is required.\",\n \"learner.sideAdventures\",\n ),\n );\n }\n if (learner.sideAdventures.some((adventure) => adventure.completionRequired !== false)) {\n issues.push(\n authoringIssue(\n \"mandatory-side-adventure\",\n \"Side adventures must remain optional.\",\n \"learner.sideAdventures\",\n ),\n );\n }\n\n const badgeIds = new Set(module.badges.map((badge) => badge.id));\n issues.push(\n ...reportDuplicateIds(\n learner.rewardBindings.map((reward) => reward.id),\n \"learner.rewardBindings\",\n ),\n );\n for (const [rewardIndex, reward] of learner.rewardBindings.entries()) {\n const rewardInvalid =\n reward.deterministic !== true\n || reward.random !== false\n || reward.tokenConvertible !== false\n || reward.goalIds.length === 0\n || !badgeIds.has(reward.badgeId)\n || reward.goalIds.some((goalId) => !learnerGoalIds.has(goalId));\n if (rewardInvalid) {\n issues.push(\n authoringIssue(\n \"invalid-reward\",\n `Reward ${reward.id} must be deterministic, evidence-bound and non-convertible.`,\n `learner.rewardBindings[${rewardIndex}]`,\n ),\n );\n }\n }\n\n return issues;\n}\n\n/** Fail fast for CI and immutable authoring registration. */\nexport function assertValidMissionAuthoringBundle(\n bundle: MissionAuthoringBundleV1,\n module: LearningModuleVersionV1,\n): void {\n const issues = validateMissionAuthoringBundle(bundle, module);\n if (issues.length === 0) return;\n\n const summary = issues\n .map((entry) => `${entry.code} at ${entry.path}: ${entry.message}`)\n .join(\"\\n\");\n throw new Error(`Invalid mission authoring bundle:\\n${summary}`);\n}\n\n/**\n * Original visual-programming mission for Robot Maze Dash. Learner content\n * contains no protected route, answer key or hidden assessment expectation.\n */\nexport const ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1: MissionAuthoringBundleV1 = {\n version: MISSION_AUTHORING_CONTRACT_VERSION_V1,\n moduleId: \"junior-coder.robot-maze-dash\",\n moduleVersion: \"1.1.0\",\n missionId: \"robot-maze-dash-mission-1\",\n learner: {\n estimatedMinutes: 20,\n stages: [\n {\n kind: \"learn\",\n instruction: \"Meet the move, turn-left and turn-right action blocks and read what each command does.\",\n artifactIds: [\"robot-maze-dash-m1-art\"],\n },\n {\n kind: \"predict\",\n instruction: \"Predict where the robot will stop after it follows the blocks from top to bottom.\",\n artifactIds: [],\n },\n {\n kind: \"build\",\n instruction: \"Arrange the action blocks so the rescue robot can reach the beacon.\",\n artifactIds: [\"robot-maze-dash-m1-program\"],\n },\n {\n kind: \"run\",\n instruction: \"Use the Run action button to watch the robot follow your visual program.\",\n artifactIds: [\"robot-maze-dash-m1-program\"],\n },\n {\n kind: \"assess\",\n instruction: \"Run the visible and protected deterministic mission checks.\",\n artifactIds: [],\n },\n {\n kind: \"inspect\",\n instruction: \"Compare the highlighted block with the first goal that did not pass.\",\n artifactIds: [],\n },\n {\n kind: \"fix\",\n instruction: \"Move, add or remove one action block, then run the mission again.\",\n artifactIds: [\"robot-maze-dash-m1-program\"],\n },\n {\n kind: \"explain\",\n instruction: \"Explain how the order of your blocks changed the robot path.\",\n artifactIds: [],\n },\n {\n kind: \"reward\",\n instruction: \"Collect the evidence-bound badge when the score and safety check pass.\",\n artifactIds: [],\n },\n ],\n readinessChecks: [\n {\n id: \"robot-maze-dash-m1-read-order\",\n prompt: \"Point to the first action the robot will follow.\",\n scored: false,\n },\n ],\n artifacts: [\n {\n id: \"robot-maze-dash-m1-program\",\n kind: \"starter-code\",\n audience: \"learner\",\n solutionBearing: false,\n },\n {\n id: \"robot-maze-dash-m1-art\",\n kind: \"starter-assets\",\n audience: \"learner\",\n solutionBearing: false,\n },\n {\n id: \"robot-maze-dash-m1-printable\",\n kind: \"printable\",\n audience: \"learner\",\n solutionBearing: false,\n },\n ],\n goals: [\n {\n id: \"robot-maze-dash-m1-starts\",\n statement: \"The visual program is structurally valid and starts.\",\n visibility: \"visible\",\n criterionIds: [\"robot-maze-dash-build\"],\n completionRequired: true,\n aiRequired: false,\n },\n {\n id: \"robot-maze-dash-m1-reaches-beacon\",\n statement: \"The robot follows the action order and reaches the rescue beacon.\",\n visibility: \"visible\",\n criterionIds: [\n \"robot-maze-dash-goal-one\",\n \"robot-maze-dash-goal-two\",\n ],\n completionRequired: true,\n aiRequired: false,\n },\n {\n id: \"robot-maze-dash-m1-safe-preview\",\n statement: \"The robot stays inside the private maze simulator boundary.\",\n visibility: \"visible\",\n criterionIds: [\"robot-maze-dash-safety\"],\n completionRequired: true,\n aiRequired: false,\n },\n ],\n interactions: [\n {\n id: \"robot-maze-dash-m1-reorder-blocks\",\n description: \"Change the order of visual action blocks.\",\n primaryMode: \"drag\",\n alternativeIds: [\"robot-maze-dash-m1-button-reorder\"],\n },\n {\n id: \"robot-maze-dash-m1-run-control\",\n description: \"Start the private maze simulation.\",\n primaryMode: \"pointer\",\n alternativeIds: [\"robot-maze-dash-m1-keyboard-run\"],\n },\n ],\n accessibilityAlternatives: [\n {\n id: \"robot-maze-dash-m1-button-reorder\",\n modes: [\"keyboard\", \"pointer\"],\n equivalentOutcome: true,\n description: \"Use labelled Move up and Move down buttons instead of dragging a block.\",\n },\n {\n id: \"robot-maze-dash-m1-keyboard-run\",\n modes: [\"keyboard\"],\n equivalentOutcome: true,\n description: \"Start the same simulation by pressing Enter or Space on the Run button.\",\n },\n ],\n evidenceRequirements: [\n {\n id: \"robot-maze-dash-m1-assessment\",\n goalIds: [\n \"robot-maze-dash-m1-starts\",\n \"robot-maze-dash-m1-reaches-beacon\",\n \"robot-maze-dash-m1-safe-preview\",\n ],\n kind: \"assessment-result\",\n retention: \"entitlement\",\n containsPersonalData: false,\n },\n {\n id: \"robot-maze-dash-m1-explanation\",\n goalIds: [\"robot-maze-dash-m1-reaches-beacon\"],\n kind: \"learner-explanation\",\n retention: \"attempt\",\n containsPersonalData: false,\n },\n ],\n sideAdventures: [\n {\n id: \"robot-maze-dash-m1-remix\",\n prompt: \"Invent a different safe route and describe which action block must change first.\",\n completionRequired: false,\n },\n ],\n rewardBindings: [\n {\n id: \"robot-maze-dash-m1-badge\",\n badgeId: \"robot-maze-dash-mission-complete\",\n goalIds: [\n \"robot-maze-dash-m1-starts\",\n \"robot-maze-dash-m1-reaches-beacon\",\n \"robot-maze-dash-m1-safe-preview\",\n ],\n deterministic: true,\n random: false,\n tokenConvertible: false,\n },\n ],\n },\n facilitator: {\n artifacts: [\n {\n id: \"robot-maze-dash-m1-answer-key\",\n kind: \"answer-key\",\n audience: \"facilitator\",\n solutionBearing: true,\n },\n {\n id: \"robot-maze-dash-m1-protected-tests\",\n kind: \"protected-test\",\n audience: \"facilitator\",\n solutionBearing: true,\n },\n ],\n protectedGoals: [\n {\n id: \"robot-maze-dash-m1-protected-bounds\",\n statement: \"The interpreter stops safely at walls, bounds and its action limit.\",\n visibility: \"protected\",\n criterionIds: [\n \"robot-maze-dash-edge-one\",\n \"robot-maze-dash-edge-two\",\n ],\n completionRequired: false,\n aiRequired: false,\n },\n ],\n prompts: [\n \"Ask the learner to point to the first action block before suggesting a change.\",\n \"Use the command reference and visible goal; never reveal the protected route or expected block list.\",\n ],\n },\n};\n\n/** Original first-mission exemplar; no protected content appears in learner data. */\nexport const ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1: MissionAuthoringBundleV1 = {\n version: MISSION_AUTHORING_CONTRACT_VERSION_V1,\n moduleId: \"junior-coder.road-hopper-rally\",\n moduleVersion: \"1.1.0\",\n missionId: \"road-hopper-rally-mission-1\",\n learner: {\n estimatedMinutes: 20,\n stages: [\n {\n kind: \"learn\",\n instruction: \"Find the x and y coordinates that place a rescue marker on the road.\",\n artifactIds: [\"road-hopper-rally-m1-art\"],\n },\n {\n kind: \"predict\",\n instruction: \"Predict where the marker will appear before you run the starter project.\",\n artifactIds: [],\n },\n {\n kind: \"build\",\n instruction: \"Complete the two road-lane drawing commands in the starter code.\",\n artifactIds: [\"road-hopper-rally-m1-code\"],\n },\n {\n kind: \"run\",\n instruction: \"Run the private preview and use the keyboard start control.\",\n artifactIds: [\"road-hopper-rally-m1-code\"],\n },\n {\n kind: \"assess\",\n instruction: \"Run the visible and protected deterministic mission checks.\",\n artifactIds: [],\n },\n {\n kind: \"inspect\",\n instruction: \"Compare the highlighted line with the goal that did not pass.\",\n artifactIds: [],\n },\n {\n kind: \"fix\",\n instruction: \"Change one coordinate or drawing command, then run the checks again.\",\n artifactIds: [\"road-hopper-rally-m1-code\"],\n },\n {\n kind: \"explain\",\n instruction: \"Explain how your coordinates changed the road on screen.\",\n artifactIds: [],\n },\n {\n kind: \"reward\",\n instruction: \"Collect the evidence-bound badge when the mission score and safety check pass.\",\n artifactIds: [],\n },\n ],\n readinessChecks: [\n {\n id: \"road-hopper-rally-m1-predict-coordinate\",\n prompt: \"Point to the pair of numbers that controls horizontal and vertical position.\",\n scored: false,\n },\n ],\n artifacts: [\n {\n id: \"road-hopper-rally-m1-code\",\n kind: \"starter-code\",\n audience: \"learner\",\n solutionBearing: false,\n },\n {\n id: \"road-hopper-rally-m1-art\",\n kind: \"starter-assets\",\n audience: \"learner\",\n solutionBearing: false,\n },\n ],\n goals: [\n {\n id: \"road-hopper-rally-m1-starts\",\n statement: \"The starter project is structurally valid and starts.\",\n visibility: \"visible\",\n criterionIds: [\"road-hopper-rally-build\"],\n completionRequired: true,\n aiRequired: false,\n },\n {\n id: \"road-hopper-rally-m1-draws-road\",\n statement: \"Two original road lanes appear at the expected coordinates.\",\n visibility: \"visible\",\n criterionIds: [\"road-hopper-rally-goal-one\"],\n completionRequired: true,\n aiRequired: false,\n },\n {\n id: \"road-hopper-rally-m1-safe-preview\",\n statement: \"The project stays inside the private educational preview boundary.\",\n visibility: \"visible\",\n criterionIds: [\"road-hopper-rally-safety\"],\n completionRequired: true,\n aiRequired: false,\n },\n ],\n interactions: [\n {\n id: \"road-hopper-rally-m1-start-control\",\n description: \"Start the private preview.\",\n primaryMode: \"pointer\",\n alternativeIds: [\"road-hopper-rally-m1-keyboard-start\"],\n },\n ],\n accessibilityAlternatives: [\n {\n id: \"road-hopper-rally-m1-keyboard-start\",\n modes: [\"keyboard\"],\n equivalentOutcome: true,\n description: \"Start the same preview with Enter while the control has focus.\",\n },\n ],\n evidenceRequirements: [\n {\n id: \"road-hopper-rally-m1-assessment\",\n goalIds: [\n \"road-hopper-rally-m1-starts\",\n \"road-hopper-rally-m1-draws-road\",\n \"road-hopper-rally-m1-safe-preview\",\n ],\n kind: \"assessment-result\",\n retention: \"entitlement\",\n containsPersonalData: false,\n },\n {\n id: \"road-hopper-rally-m1-explanation\",\n goalIds: [\"road-hopper-rally-m1-draws-road\"],\n kind: \"learner-explanation\",\n retention: \"attempt\",\n containsPersonalData: false,\n },\n ],\n sideAdventures: [\n {\n id: \"road-hopper-rally-m1-remix\",\n prompt: \"Remix the lane colours while keeping text or shape cues available.\",\n completionRequired: false,\n },\n ],\n rewardBindings: [\n {\n id: \"road-hopper-rally-m1-badge\",\n badgeId: \"road-hopper-rally-mission-complete\",\n goalIds: [\n \"road-hopper-rally-m1-starts\",\n \"road-hopper-rally-m1-draws-road\",\n \"road-hopper-rally-m1-safe-preview\",\n ],\n deterministic: true,\n random: false,\n tokenConvertible: false,\n },\n ],\n },\n facilitator: {\n artifacts: [\n {\n id: \"road-hopper-rally-m1-answer-key\",\n kind: \"answer-key\",\n audience: \"facilitator\",\n solutionBearing: true,\n },\n {\n id: \"road-hopper-rally-m1-protected-tests\",\n kind: \"protected-test\",\n audience: \"facilitator\",\n solutionBearing: true,\n },\n ],\n protectedGoals: [\n {\n id: \"road-hopper-rally-m1-protected-edge\",\n statement: \"The drawing remains bounded when a protected coordinate edge case runs.\",\n visibility: \"protected\",\n criterionIds: [\"road-hopper-rally-edge-one\"],\n completionRequired: false,\n aiRequired: false,\n },\n ],\n prompts: [\n \"Ask the learner to predict one coordinate before offering a hint.\",\n \"Do not reveal protected expected values; point back to the visible goal.\",\n ],\n },\n};\n","import type {\n LearningModuleVersionV1,\n LearningPathVersionV1,\n LearningValidationIssueV1,\n} from \"./contracts.js\";\nimport { validateAssessmentRubric } from \"./rubric-validation.js\";\n\nconst CANONICAL_TOKEN_SUBUNITS = /^(0|[1-9][0-9]*)$/u;\n\nfunction issue(\n code: LearningValidationIssueV1[\"code\"],\n message: string,\n path: string,\n moduleId?: string,\n): LearningValidationIssueV1 {\n return { code, message, path, ...(moduleId ? { moduleId } : {}) };\n}\n\nfunction validateModule(\n module: LearningModuleVersionV1,\n moduleIndex: number,\n): LearningValidationIssueV1[] {\n const issues: LearningValidationIssueV1[] = [];\n const base = `modules[${moduleIndex}]`;\n\n if (!module.selfContained) {\n issues.push(\n issue(\n \"module-not-self-contained\",\n \"Every sellable module must be self-contained.\",\n `${base}.selfContained`,\n module.id,\n ),\n );\n }\n\n if (module.prerequisiteModuleIds.length > 0) {\n issues.push(\n issue(\n \"paid-prerequisite\",\n \"A sellable module cannot require another paid module.\",\n `${base}.prerequisiteModuleIds`,\n module.id,\n ),\n );\n }\n\n if (\n module.materials.learner.length === 0 ||\n module.materials.facilitator.length === 0\n ) {\n issues.push(\n issue(\n \"missing-materials\",\n \"Learner and facilitator material manifests are both required.\",\n `${base}.materials`,\n module.id,\n ),\n );\n }\n\n if (module.materials.learner.some((material) => material.audience !== \"learner\")) {\n issues.push(\n issue(\n \"facilitator-material-leak\",\n \"Learner material contains a facilitator-only record.\",\n `${base}.materials.learner`,\n module.id,\n ),\n );\n }\n\n if (\n module.materials.facilitator.some(\n (material) => material.audience !== \"facilitator\",\n )\n ) {\n issues.push(\n issue(\n \"learner-material-leak\",\n \"Facilitator material contains a learner record.\",\n `${base}.materials.facilitator`,\n module.id,\n ),\n );\n }\n\n if (!CANONICAL_TOKEN_SUBUNITS.test(module.pricing.tokenSubunits)) {\n issues.push(\n issue(\n \"invalid-token-subunits\",\n \"Token subunits must be a canonical non-negative base-10 integer string.\",\n `${base}.pricing.tokenSubunits`,\n module.id,\n ),\n );\n }\n\n const referencePrice = module.pricing.referencePrice;\n if (\n referencePrice\n && (\n referencePrice.currency !== \"GBP\"\n || !CANONICAL_TOKEN_SUBUNITS.test(referencePrice.minorUnits)\n || referencePrice.basis !== \"nominal-reference\"\n || referencePrice.cashRedemptionAllowed !== false\n )\n ) {\n issues.push(\n issue(\n \"invalid-reference-price\",\n \"Reference prices must use canonical GBP minor units, the nominal reference basis and prohibit cash redemption.\",\n `${base}.pricing.referencePrice`,\n module.id,\n ),\n );\n }\n\n issues.push(\n ...validateAssessmentRubric(module.assessment, `${base}.assessment`, module.id),\n );\n\n if (module.hardware.mode === \"physical-first\" && module.hardware.items.length === 0) {\n issues.push(\n issue(\n \"missing-hardware-items\",\n \"Physical-first modules require an exact hardware item list.\",\n `${base}.hardware.items`,\n module.id,\n ),\n );\n }\n\n if (\n module.agents.some(\n (agent) =>\n agent.mayAssignScore !== false ||\n agent.mayAwardReward !== false ||\n agent.mayPublish !== false ||\n agent.mayControlHardware !== false,\n )\n ) {\n issues.push(\n issue(\n \"invalid-agent-authority\",\n \"Module agents cannot own scores, rewards, publishing or hardware control.\",\n `${base}.agents`,\n module.id,\n ),\n );\n }\n\n if (module.missions.length === 0) {\n issues.push(\n issue(\n \"missing-missions\",\n \"A module requires at least one mission.\",\n `${base}.missions`,\n module.id,\n ),\n );\n }\n\n return issues;\n}\n\n/** Return every catalog issue without throwing, suitable for authoring tools. */\nexport function validateLearningPath(\n path: LearningPathVersionV1,\n): LearningValidationIssueV1[] {\n const issues: LearningValidationIssueV1[] = [];\n const moduleIds = new Set<string>();\n const moduleSlugs = new Set<string>();\n\n for (const [index, module] of path.modules.entries()) {\n if (moduleIds.has(module.id)) {\n issues.push(\n issue(\n \"duplicate-module-id\",\n `Duplicate module id ${module.id}.`,\n `modules[${index}].id`,\n module.id,\n ),\n );\n }\n moduleIds.add(module.id);\n\n if (moduleSlugs.has(module.slug)) {\n issues.push(\n issue(\n \"duplicate-module-slug\",\n `Duplicate module slug ${module.slug}.`,\n `modules[${index}].slug`,\n module.id,\n ),\n );\n }\n moduleSlugs.add(module.slug);\n issues.push(...validateModule(module, index));\n }\n\n return issues;\n}\n\n/** Fail fast when a path is not safe to publish or consume. */\nexport function assertValidLearningPath(path: LearningPathVersionV1): void {\n const issues = validateLearningPath(path);\n if (issues.length === 0) return;\n\n const summary = issues\n .map((entry) => `${entry.code} at ${entry.path}: ${entry.message}`)\n .join(\"\\n\");\n throw new Error(`Invalid learning path:\\n${summary}`);\n}\n\nexport { validateAssessmentRubric } from \"./rubric-validation.js\";\nexport {\n JUNIOR_CODER_MISSION_STAGE_ORDER_V1,\n ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1,\n ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1,\n assertValidMissionAuthoringBundle,\n validateMissionAuthoringBundle,\n} from \"./mission-authoring.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOA,SAAS,UAAU,OAA4B;AAC7C,MAAI,SAAS,GAAI,QAAO;AACxB,MAAI,SAAS,GAAI,QAAO;AACxB,MAAI,SAAS,GAAI,QAAO;AACxB,SAAO;AACT;AAMO,SAAS,oBACdA,SACA,SACoB;AACpB,QAAM,WAAW,IAAI,IAAIA,QAAO,SAAS,IAAI,CAAC,cAAc,UAAU,EAAE,CAAC;AACzE,QAAM,aAAa,oBAAI,IAAqC;AAE5D,aAAW,UAAU,SAAS;AAC5B,QAAI,CAAC,SAAS,IAAI,OAAO,WAAW,GAAG;AACrC,YAAM,IAAI,MAAM,iCAAiC,OAAO,WAAW,EAAE;AAAA,IACvE;AACA,QAAI,WAAW,IAAI,OAAO,WAAW,GAAG;AACtC,YAAM,IAAI,MAAM,gCAAgC,OAAO,WAAW,EAAE;AAAA,IACtE;AACA,eAAW,IAAI,OAAO,aAAa,MAAM;AAAA,EAC3C;AAEA,MAAI,QAAQ;AACZ,QAAM,qBAA+B,CAAC;AACtC,QAAM,qBAA+B,CAAC;AACtC,QAAM,8BAAwC,CAAC;AAE/C,aAAW,aAAaA,QAAO,UAAU;AACvC,UAAM,SAAS,WAAW,IAAI,UAAU,EAAE,GAAG,WAAW;AACxD,QAAI,QAAQ;AACV,eAAS,UAAU;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","mission","rubricIssue","module"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -367,6 +367,11 @@ declare const JUNIOR_CODER_MISSION_STAGE_ORDER_V1: readonly ["learn", "predict",
|
|
|
367
367
|
declare function validateMissionAuthoringBundle(bundle: MissionAuthoringBundleV1, module: LearningModuleVersionV1): MissionAuthoringValidationIssueV1[];
|
|
368
368
|
/** Fail fast for CI and immutable authoring registration. */
|
|
369
369
|
declare function assertValidMissionAuthoringBundle(bundle: MissionAuthoringBundleV1, module: LearningModuleVersionV1): void;
|
|
370
|
+
/**
|
|
371
|
+
* Original visual-programming mission for Robot Maze Dash. Learner content
|
|
372
|
+
* contains no protected route, answer key or hidden assessment expectation.
|
|
373
|
+
*/
|
|
374
|
+
declare const ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1: MissionAuthoringBundleV1;
|
|
370
375
|
/** Original first-mission exemplar; no protected content appears in learner data. */
|
|
371
376
|
declare const ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1: MissionAuthoringBundleV1;
|
|
372
377
|
|
|
@@ -375,4 +380,4 @@ declare function validateLearningPath(path: LearningPathVersionV1): LearningVali
|
|
|
375
380
|
/** Fail fast when a path is not safe to publish or consume. */
|
|
376
381
|
declare function assertValidLearningPath(path: LearningPathVersionV1): void;
|
|
377
382
|
|
|
378
|
-
export { type AssessmentCheckResultV1, type AssessmentCriterionV1, type AssessmentDimensionV1, type AssessmentResultV1, type AssessmentRubricV1, type AttemptEvidenceV1, type BadgeDefinitionV1, type CommercialStateV1, type CourseMaterialAudienceV1, type CourseMaterialKindV1, type CourseMaterialV1, type CourseMaterialsManifestV1, type FacilitatorMissionAuthoringV1, type GuardianAiConsentV1, type HardwareItemV1, type HardwareModeV1, type HardwareRequirementManifestV1, type HardwareVerificationStatusV1, JUNIOR_CODER_MISSION_STAGE_ORDER_V1, JUNIOR_CODER_MODULE_PRICE_V1_1, JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT, JUNIOR_CODER_ROBOT_RESCUE_PATH_V1, JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1, type LearnerMissionAuthoringV1, type LearningGoalV1, type LearningModuleVersionV1, type LearningPathVersionV1, type LearningValidationIssueV1, MISSION_AUTHORING_CONTRACT_VERSION_V1, type MissionAccessibilityAlternativeV1, type MissionArtifactKindV1, type MissionArtifactReferenceV1, type MissionAuthoringBundleV1, type MissionAuthoringGoalV1, type MissionAuthoringValidationIssueV1, type MissionEvidenceKindV1, type MissionEvidenceRequirementV1, type MissionEvidenceRetentionV1, type MissionInteractionModeV1, type MissionInteractionRequirementV1, type MissionReadinessCheckV1, type MissionRewardBindingV1, type MissionSideAdventureV1, type MissionStageCardV1, type MissionStageKindV1, type MissionV1, type ModuleAgentDefinitionV1, type ModuleAgentFeedbackV1, type ModuleAgentRoleV1, type ModuleCategoryV1, type ModuleEntitlementV1, type ModulePricingV1, type ModuleReferencePriceV1, type PublishedStaticProjectSnapshotV1, ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1, type ScoreBandV1, assertValidLearningPath, assertValidMissionAuthoringBundle, calculateAssessment, validateAssessmentRubric, validateLearningPath, validateMissionAuthoringBundle };
|
|
383
|
+
export { type AssessmentCheckResultV1, type AssessmentCriterionV1, type AssessmentDimensionV1, type AssessmentResultV1, type AssessmentRubricV1, type AttemptEvidenceV1, type BadgeDefinitionV1, type CommercialStateV1, type CourseMaterialAudienceV1, type CourseMaterialKindV1, type CourseMaterialV1, type CourseMaterialsManifestV1, type FacilitatorMissionAuthoringV1, type GuardianAiConsentV1, type HardwareItemV1, type HardwareModeV1, type HardwareRequirementManifestV1, type HardwareVerificationStatusV1, JUNIOR_CODER_MISSION_STAGE_ORDER_V1, JUNIOR_CODER_MODULE_PRICE_V1_1, JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT, JUNIOR_CODER_ROBOT_RESCUE_PATH_V1, JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1, type LearnerMissionAuthoringV1, type LearningGoalV1, type LearningModuleVersionV1, type LearningPathVersionV1, type LearningValidationIssueV1, MISSION_AUTHORING_CONTRACT_VERSION_V1, type MissionAccessibilityAlternativeV1, type MissionArtifactKindV1, type MissionArtifactReferenceV1, type MissionAuthoringBundleV1, type MissionAuthoringGoalV1, type MissionAuthoringValidationIssueV1, type MissionEvidenceKindV1, type MissionEvidenceRequirementV1, type MissionEvidenceRetentionV1, type MissionInteractionModeV1, type MissionInteractionRequirementV1, type MissionReadinessCheckV1, type MissionRewardBindingV1, type MissionSideAdventureV1, type MissionStageCardV1, type MissionStageKindV1, type MissionV1, type ModuleAgentDefinitionV1, type ModuleAgentFeedbackV1, type ModuleAgentRoleV1, type ModuleCategoryV1, type ModuleEntitlementV1, type ModulePricingV1, type ModuleReferencePriceV1, type PublishedStaticProjectSnapshotV1, ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1, ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1, type ScoreBandV1, assertValidLearningPath, assertValidMissionAuthoringBundle, calculateAssessment, validateAssessmentRubric, validateLearningPath, validateMissionAuthoringBundle };
|
package/dist/index.d.ts
CHANGED
|
@@ -367,6 +367,11 @@ declare const JUNIOR_CODER_MISSION_STAGE_ORDER_V1: readonly ["learn", "predict",
|
|
|
367
367
|
declare function validateMissionAuthoringBundle(bundle: MissionAuthoringBundleV1, module: LearningModuleVersionV1): MissionAuthoringValidationIssueV1[];
|
|
368
368
|
/** Fail fast for CI and immutable authoring registration. */
|
|
369
369
|
declare function assertValidMissionAuthoringBundle(bundle: MissionAuthoringBundleV1, module: LearningModuleVersionV1): void;
|
|
370
|
+
/**
|
|
371
|
+
* Original visual-programming mission for Robot Maze Dash. Learner content
|
|
372
|
+
* contains no protected route, answer key or hidden assessment expectation.
|
|
373
|
+
*/
|
|
374
|
+
declare const ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1: MissionAuthoringBundleV1;
|
|
370
375
|
/** Original first-mission exemplar; no protected content appears in learner data. */
|
|
371
376
|
declare const ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1: MissionAuthoringBundleV1;
|
|
372
377
|
|
|
@@ -375,4 +380,4 @@ declare function validateLearningPath(path: LearningPathVersionV1): LearningVali
|
|
|
375
380
|
/** Fail fast when a path is not safe to publish or consume. */
|
|
376
381
|
declare function assertValidLearningPath(path: LearningPathVersionV1): void;
|
|
377
382
|
|
|
378
|
-
export { type AssessmentCheckResultV1, type AssessmentCriterionV1, type AssessmentDimensionV1, type AssessmentResultV1, type AssessmentRubricV1, type AttemptEvidenceV1, type BadgeDefinitionV1, type CommercialStateV1, type CourseMaterialAudienceV1, type CourseMaterialKindV1, type CourseMaterialV1, type CourseMaterialsManifestV1, type FacilitatorMissionAuthoringV1, type GuardianAiConsentV1, type HardwareItemV1, type HardwareModeV1, type HardwareRequirementManifestV1, type HardwareVerificationStatusV1, JUNIOR_CODER_MISSION_STAGE_ORDER_V1, JUNIOR_CODER_MODULE_PRICE_V1_1, JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT, JUNIOR_CODER_ROBOT_RESCUE_PATH_V1, JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1, type LearnerMissionAuthoringV1, type LearningGoalV1, type LearningModuleVersionV1, type LearningPathVersionV1, type LearningValidationIssueV1, MISSION_AUTHORING_CONTRACT_VERSION_V1, type MissionAccessibilityAlternativeV1, type MissionArtifactKindV1, type MissionArtifactReferenceV1, type MissionAuthoringBundleV1, type MissionAuthoringGoalV1, type MissionAuthoringValidationIssueV1, type MissionEvidenceKindV1, type MissionEvidenceRequirementV1, type MissionEvidenceRetentionV1, type MissionInteractionModeV1, type MissionInteractionRequirementV1, type MissionReadinessCheckV1, type MissionRewardBindingV1, type MissionSideAdventureV1, type MissionStageCardV1, type MissionStageKindV1, type MissionV1, type ModuleAgentDefinitionV1, type ModuleAgentFeedbackV1, type ModuleAgentRoleV1, type ModuleCategoryV1, type ModuleEntitlementV1, type ModulePricingV1, type ModuleReferencePriceV1, type PublishedStaticProjectSnapshotV1, ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1, type ScoreBandV1, assertValidLearningPath, assertValidMissionAuthoringBundle, calculateAssessment, validateAssessmentRubric, validateLearningPath, validateMissionAuthoringBundle };
|
|
383
|
+
export { type AssessmentCheckResultV1, type AssessmentCriterionV1, type AssessmentDimensionV1, type AssessmentResultV1, type AssessmentRubricV1, type AttemptEvidenceV1, type BadgeDefinitionV1, type CommercialStateV1, type CourseMaterialAudienceV1, type CourseMaterialKindV1, type CourseMaterialV1, type CourseMaterialsManifestV1, type FacilitatorMissionAuthoringV1, type GuardianAiConsentV1, type HardwareItemV1, type HardwareModeV1, type HardwareRequirementManifestV1, type HardwareVerificationStatusV1, JUNIOR_CODER_MISSION_STAGE_ORDER_V1, JUNIOR_CODER_MODULE_PRICE_V1_1, JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT, JUNIOR_CODER_ROBOT_RESCUE_PATH_V1, JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1, type LearnerMissionAuthoringV1, type LearningGoalV1, type LearningModuleVersionV1, type LearningPathVersionV1, type LearningValidationIssueV1, MISSION_AUTHORING_CONTRACT_VERSION_V1, type MissionAccessibilityAlternativeV1, type MissionArtifactKindV1, type MissionArtifactReferenceV1, type MissionAuthoringBundleV1, type MissionAuthoringGoalV1, type MissionAuthoringValidationIssueV1, type MissionEvidenceKindV1, type MissionEvidenceRequirementV1, type MissionEvidenceRetentionV1, type MissionInteractionModeV1, type MissionInteractionRequirementV1, type MissionReadinessCheckV1, type MissionRewardBindingV1, type MissionSideAdventureV1, type MissionStageCardV1, type MissionStageKindV1, type MissionV1, type ModuleAgentDefinitionV1, type ModuleAgentFeedbackV1, type ModuleAgentRoleV1, type ModuleCategoryV1, type ModuleEntitlementV1, type ModulePricingV1, type ModuleReferencePriceV1, type PublishedStaticProjectSnapshotV1, ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1, ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1, type ScoreBandV1, assertValidLearningPath, assertValidMissionAuthoringBundle, calculateAssessment, validateAssessmentRubric, validateLearningPath, validateMissionAuthoringBundle };
|