@plasius/learning 0.2.14 → 0.2.15

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 CHANGED
@@ -76,6 +76,7 @@ import {
76
76
  SERVO_CREATURE_MISSION_ONE_AUTHORING_V1,
77
77
  SKYWING_SPRINT_MISSION_ONE_AUTHORING_V1,
78
78
  STAR_DEFENDER_SQUADRON_MISSION_ONE_AUTHORING_V1,
79
+ VIBE_BUG_DETECTIVE_MISSION_ONE_AUTHORING_V1,
79
80
  VIBE_GAME_REMIX_LAB_MISSION_ONE_AUTHORING_V1,
80
81
  assertValidMissionAuthoringBundle,
81
82
  } from "@plasius/learning";
@@ -122,6 +123,9 @@ const rainbowRescueRover = JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1.modules.find(
122
123
  const vibeGameRemixLab = JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1.modules.find(
123
124
  (module) => module.slug === "vibe-game-remix-lab",
124
125
  );
126
+ const vibeBugDetective = JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1.modules.find(
127
+ (module) => module.slug === "vibe-bug-detective",
128
+ );
125
129
 
126
130
  if (
127
131
  !roadHopper ||
@@ -137,7 +141,8 @@ if (
137
141
  !danceRover ||
138
142
  !obstacleExplorer ||
139
143
  !rainbowRescueRover ||
140
- !vibeGameRemixLab
144
+ !vibeGameRemixLab ||
145
+ !vibeBugDetective
141
146
  ) {
142
147
  throw new Error("Junior Coder module is missing");
143
148
  }
@@ -198,6 +203,10 @@ assertValidMissionAuthoringBundle(
198
203
  VIBE_GAME_REMIX_LAB_MISSION_ONE_AUTHORING_V1,
199
204
  vibeGameRemixLab,
200
205
  );
206
+ assertValidMissionAuthoringBundle(
207
+ VIBE_BUG_DETECTIVE_MISSION_ONE_AUTHORING_V1,
208
+ vibeBugDetective,
209
+ );
201
210
  ```
202
211
 
203
212
  ## Contract rules
@@ -244,6 +253,9 @@ assertValidMissionAuthoringBundle(
244
253
  permitted learner artifact. The learner predicts, reviews and explicitly
245
254
  accepts or rejects it; rejection preserves source, deterministic completion
246
255
  never needs AI, and open chat or automatic edits are outside the contract.
256
+ - Vibe Bug Detective starts from visible failing evidence, binds one authored
257
+ repair to the current goal and permitted artifact, and requires learner
258
+ prediction, explicit accept/reject and deterministic regression reruns.
247
259
 
248
260
  See [the foundation design](docs/design/junior-coder-catalog-foundation.md),
249
261
  [the uniform pricing design](docs/design/junior-coder-uniform-pricing.md),
@@ -256,6 +268,7 @@ See [the foundation design](docs/design/junior-coder-catalog-foundation.md),
256
268
  [TDR 0007](docs/tdrs/tdr-0007-dance-rover-fail-safe-movement-and-power-authoring.md),
257
269
  and [TDR 0008](docs/tdrs/tdr-0008-obstacle-explorer-sensing-watchdog-and-fail-safe-authoring.md).
258
270
  See also [TDR 0010](docs/tdrs/tdr-0010-vibe-game-remix-bounded-suggestion-authoring.md).
271
+ See also [TDR 0011](docs/tdrs/tdr-0011-vibe-bug-detective-evidence-led-repair.md).
259
272
 
260
273
  ## Development
261
274
 
package/dist/index.cjs CHANGED
@@ -39,6 +39,7 @@ __export(index_exports, {
39
39
  SERVO_CREATURE_MISSION_ONE_AUTHORING_V1: () => SERVO_CREATURE_MISSION_ONE_AUTHORING_V1,
40
40
  SKYWING_SPRINT_MISSION_ONE_AUTHORING_V1: () => SKYWING_SPRINT_MISSION_ONE_AUTHORING_V1,
41
41
  STAR_DEFENDER_SQUADRON_MISSION_ONE_AUTHORING_V1: () => STAR_DEFENDER_SQUADRON_MISSION_ONE_AUTHORING_V1,
42
+ VIBE_BUG_DETECTIVE_MISSION_ONE_AUTHORING_V1: () => VIBE_BUG_DETECTIVE_MISSION_ONE_AUTHORING_V1,
42
43
  VIBE_GAME_REMIX_LAB_MISSION_ONE_AUTHORING_V1: () => VIBE_GAME_REMIX_LAB_MISSION_ONE_AUTHORING_V1,
43
44
  assertValidLearningPath: () => assertValidLearningPath,
44
45
  assertValidMissionAuthoringBundle: () => assertValidMissionAuthoringBundle,
@@ -4925,6 +4926,280 @@ var VIBE_GAME_REMIX_LAB_MISSION_ONE_AUTHORING_V1 = {
4925
4926
  ]
4926
4927
  }
4927
4928
  };
4929
+ var VIBE_BUG_DETECTIVE_MISSION_ONE_AUTHORING_V1 = {
4930
+ version: MISSION_AUTHORING_CONTRACT_VERSION_V1,
4931
+ moduleId: "junior-coder.vibe-bug-detective",
4932
+ moduleVersion: "1.1.0",
4933
+ missionId: "vibe-bug-detective-mission-1",
4934
+ learner: {
4935
+ estimatedMinutes: 20,
4936
+ stages: [
4937
+ {
4938
+ kind: "learn",
4939
+ instruction: "Read how setRobotDirection(), setRobotSteps() and placeRescueBeacon() control the supplied mini-game.",
4940
+ artifactIds: ["vibe-bug-detective-m1-guide"]
4941
+ },
4942
+ {
4943
+ kind: "predict",
4944
+ instruction: "Predict why the robot moves away from the beacon before viewing the one-line repair.",
4945
+ artifactIds: ["vibe-bug-detective-m1-evidence-card"]
4946
+ },
4947
+ {
4948
+ kind: "build",
4949
+ instruction: "Open the intentionally broken mini-game without changing files outside its documented settings artifact.",
4950
+ artifactIds: ["vibe-bug-detective-m1-code"]
4951
+ },
4952
+ {
4953
+ kind: "run",
4954
+ instruction: "Use the Run action button to reproduce the bug in the private JavaScript preview.",
4955
+ artifactIds: ["vibe-bug-detective-m1-code"]
4956
+ },
4957
+ {
4958
+ kind: "assess",
4959
+ instruction: "Run deterministic checks to collect failure evidence before reviewing any suggested fix.",
4960
+ artifactIds: []
4961
+ },
4962
+ {
4963
+ kind: "inspect",
4964
+ instruction: "Compare observed leftward movement with the expected right-side beacon goal and the single authored diff.",
4965
+ artifactIds: ["vibe-bug-detective-m1-code"]
4966
+ },
4967
+ {
4968
+ kind: "fix",
4969
+ instruction: "Accept or reject the exact direction repair yourself, then rerun every regression check.",
4970
+ artifactIds: ["vibe-bug-detective-m1-code"]
4971
+ },
4972
+ {
4973
+ kind: "explain",
4974
+ instruction: "Explain which evidence identified the bug and why the minimal change fixed it without changing other behaviour.",
4975
+ artifactIds: []
4976
+ },
4977
+ {
4978
+ kind: "reward",
4979
+ instruction: "Collect the evidence-bound badge after the deterministic score reaches 80 and every safety check passes.",
4980
+ artifactIds: []
4981
+ }
4982
+ ],
4983
+ readinessChecks: [
4984
+ {
4985
+ id: "vibe-bug-detective-m1-read-evidence",
4986
+ prompt: "Point to the observed direction and the beacon position before choosing a repair.",
4987
+ scored: false
4988
+ }
4989
+ ],
4990
+ artifacts: [
4991
+ {
4992
+ id: "vibe-bug-detective-m1-code",
4993
+ kind: "starter-code",
4994
+ audience: "learner",
4995
+ solutionBearing: false
4996
+ },
4997
+ {
4998
+ id: "vibe-bug-detective-m1-guide",
4999
+ kind: "starter-assets",
5000
+ audience: "learner",
5001
+ solutionBearing: false
5002
+ },
5003
+ {
5004
+ id: "vibe-bug-detective-m1-evidence-card",
5005
+ kind: "printable",
5006
+ audience: "learner",
5007
+ solutionBearing: false
5008
+ }
5009
+ ],
5010
+ goals: [
5011
+ {
5012
+ id: "vibe-bug-detective-m1-starts",
5013
+ statement: "The intentionally broken JavaScript mini-game remains structurally valid and starts.",
5014
+ visibility: "visible",
5015
+ criterionIds: ["vibe-bug-detective-build"],
5016
+ completionRequired: true,
5017
+ aiRequired: false
5018
+ },
5019
+ {
5020
+ id: "vibe-bug-detective-m1-repair",
5021
+ statement: "The robot travels three steps toward the right-side rescue beacon after one minimal direction repair.",
5022
+ visibility: "visible",
5023
+ criterionIds: [
5024
+ "vibe-bug-detective-goal-one",
5025
+ "vibe-bug-detective-goal-two",
5026
+ "vibe-bug-detective-goal-three"
5027
+ ],
5028
+ completionRequired: true,
5029
+ aiRequired: false
5030
+ },
5031
+ {
5032
+ id: "vibe-bug-detective-m1-regression-safety",
5033
+ statement: "The repair preserves the bounded step and beacon settings inside the private sandbox.",
5034
+ visibility: "visible",
5035
+ criterionIds: ["vibe-bug-detective-safety"],
5036
+ completionRequired: true,
5037
+ aiRequired: false
5038
+ }
5039
+ ],
5040
+ interactions: [
5041
+ {
5042
+ id: "vibe-bug-detective-m1-run-control",
5043
+ description: "Reproduce the supplied mini-game bug in the private preview.",
5044
+ primaryMode: "pointer",
5045
+ alternativeIds: ["vibe-bug-detective-m1-keyboard-run"]
5046
+ },
5047
+ {
5048
+ id: "vibe-bug-detective-m1-diff-review",
5049
+ description: "Read the labelled removed and added direction lines beside the assessment evidence.",
5050
+ primaryMode: "text",
5051
+ alternativeIds: []
5052
+ },
5053
+ {
5054
+ id: "vibe-bug-detective-m1-accept-control",
5055
+ description: "Approve the exact immutable repair snapshot.",
5056
+ primaryMode: "pointer",
5057
+ alternativeIds: ["vibe-bug-detective-m1-keyboard-review"]
5058
+ },
5059
+ {
5060
+ id: "vibe-bug-detective-m1-reject-control",
5061
+ description: "Reject the repair and preserve the current broken source.",
5062
+ primaryMode: "pointer",
5063
+ alternativeIds: ["vibe-bug-detective-m1-keyboard-review"]
5064
+ }
5065
+ ],
5066
+ accessibilityAlternatives: [
5067
+ {
5068
+ id: "vibe-bug-detective-m1-keyboard-run",
5069
+ modes: ["keyboard"],
5070
+ equivalentOutcome: true,
5071
+ description: "Press Enter or Space on the play-icon Run button to reproduce the same bug."
5072
+ },
5073
+ {
5074
+ id: "vibe-bug-detective-m1-keyboard-review",
5075
+ modes: ["keyboard", "text", "reduced-motion"],
5076
+ equivalentOutcome: true,
5077
+ description: "Read the text evidence and labelled diff, then focus Accept or Reject and press Enter or Space."
5078
+ }
5079
+ ],
5080
+ evidenceRequirements: [
5081
+ {
5082
+ id: "vibe-bug-detective-m1-assessment",
5083
+ goalIds: [
5084
+ "vibe-bug-detective-m1-starts",
5085
+ "vibe-bug-detective-m1-repair",
5086
+ "vibe-bug-detective-m1-regression-safety"
5087
+ ],
5088
+ kind: "assessment-result",
5089
+ retention: "entitlement",
5090
+ containsPersonalData: false
5091
+ },
5092
+ {
5093
+ id: "vibe-bug-detective-m1-explanation",
5094
+ goalIds: ["vibe-bug-detective-m1-repair"],
5095
+ kind: "learner-explanation",
5096
+ retention: "attempt",
5097
+ containsPersonalData: false
5098
+ }
5099
+ ],
5100
+ sideAdventures: [
5101
+ {
5102
+ id: "vibe-bug-detective-m1-regression-inventor",
5103
+ prompt: "Invent one extra regression test that proves the robot still stops at the rescue beacon.",
5104
+ completionRequired: false
5105
+ }
5106
+ ],
5107
+ rewardBindings: [
5108
+ {
5109
+ id: "vibe-bug-detective-m1-badge",
5110
+ badgeId: "vibe-bug-detective-mission-complete",
5111
+ goalIds: [
5112
+ "vibe-bug-detective-m1-starts",
5113
+ "vibe-bug-detective-m1-repair",
5114
+ "vibe-bug-detective-m1-regression-safety"
5115
+ ],
5116
+ deterministic: true,
5117
+ random: false,
5118
+ tokenConvertible: false
5119
+ }
5120
+ ],
5121
+ functionReference: [
5122
+ {
5123
+ id: "vibe-bug-detective-function-direction",
5124
+ signature: "setRobotDirection(direction)",
5125
+ summary: "Chooses the horizontal direction used by the supplied rescue robot.",
5126
+ parameters: [{ name: "direction", type: "text", description: "Use left or right." }],
5127
+ effect: "Changes only the labelled movement direction in the private mini-game.",
5128
+ example: 'setRobotDirection("right");'
5129
+ },
5130
+ {
5131
+ id: "vibe-bug-detective-function-steps",
5132
+ signature: "setRobotSteps(count)",
5133
+ summary: "Chooses how many bounded grid steps the robot attempts.",
5134
+ parameters: [{ name: "count", type: "whole number", description: "A bounded count from 1 to 4." }],
5135
+ effect: "Changes the private preview path length without controlling physical hardware.",
5136
+ example: "setRobotSteps(3);"
5137
+ },
5138
+ {
5139
+ id: "vibe-bug-detective-function-beacon",
5140
+ signature: "placeRescueBeacon(position)",
5141
+ summary: "Places the fictional rescue beacon on one labelled side.",
5142
+ parameters: [{ name: "position", type: "text", description: "Use left or right." }],
5143
+ effect: "Changes only the fictional beacon position in the private preview.",
5144
+ example: 'placeRescueBeacon("right");'
5145
+ }
5146
+ ],
5147
+ boundedSuggestion: {
5148
+ id: "vibe-bug-detective-m1-authored-direction-repair",
5149
+ source: "authored-fallback",
5150
+ intent: "Make the robot move toward the right-side rescue beacon.",
5151
+ constraints: [
5152
+ "Change exactly one documented direction setting.",
5153
+ "Preserve the step count and beacon position.",
5154
+ "Do not add network, storage, DOM, account or physical hardware access."
5155
+ ],
5156
+ permittedArtifactId: "vibe-bug-detective-m1-code",
5157
+ originalSnippet: 'setRobotDirection("left");',
5158
+ replacementSnippet: 'setRobotDirection("right");',
5159
+ explanationPrompt: "Which observed-versus-expected evidence identified the direction bug, and which regression result proves the repair?",
5160
+ aiOptional: false,
5161
+ learnerApprovalRequired: true,
5162
+ alternatives: ["accept", "reject"]
5163
+ }
5164
+ },
5165
+ facilitator: {
5166
+ artifacts: [
5167
+ {
5168
+ id: "vibe-bug-detective-m1-answer-key",
5169
+ kind: "answer-key",
5170
+ audience: "facilitator",
5171
+ solutionBearing: true
5172
+ },
5173
+ {
5174
+ id: "vibe-bug-detective-m1-protected-tests",
5175
+ kind: "protected-test",
5176
+ audience: "facilitator",
5177
+ solutionBearing: true
5178
+ },
5179
+ {
5180
+ id: "vibe-bug-detective-m1-safety-notes",
5181
+ kind: "facilitator-note",
5182
+ audience: "facilitator",
5183
+ solutionBearing: true
5184
+ }
5185
+ ],
5186
+ protectedGoals: [
5187
+ {
5188
+ id: "vibe-bug-detective-m1-protected-regressions",
5189
+ statement: "The repaired sandbox rejects extra statements, disallowed values, prompt injection, answer dumping, network access and changes outside the approved diff.",
5190
+ visibility: "protected",
5191
+ criterionIds: ["vibe-bug-detective-edge-one", "vibe-bug-detective-edge-two"],
5192
+ completionRequired: false,
5193
+ aiRequired: false
5194
+ }
5195
+ ],
5196
+ prompts: [
5197
+ "Ask the learner to describe observed and expected directions before revealing the authored repair.",
5198
+ "Keep every diagnostic choice tied to the current failing goal and permitted artifact; never invite free-form chat.",
5199
+ "A rejection must preserve the broken source, and AI/provider failure must never block deterministic repair or regression checks."
5200
+ ]
5201
+ }
5202
+ };
4928
5203
  var ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1 = {
4929
5204
  version: MISSION_AUTHORING_CONTRACT_VERSION_V1,
4930
5205
  moduleId: "junior-coder.road-hopper-rally",
@@ -5293,6 +5568,7 @@ ${summary}`);
5293
5568
  SERVO_CREATURE_MISSION_ONE_AUTHORING_V1,
5294
5569
  SKYWING_SPRINT_MISSION_ONE_AUTHORING_V1,
5295
5570
  STAR_DEFENDER_SQUADRON_MISSION_ONE_AUTHORING_V1,
5571
+ VIBE_BUG_DETECTIVE_MISSION_ONE_AUTHORING_V1,
5296
5572
  VIBE_GAME_REMIX_LAB_MISSION_ONE_AUTHORING_V1,
5297
5573
  assertValidLearningPath,
5298
5574
  assertValidMissionAuthoringBundle,