@plasius/learning 0.2.9 → 0.2.10

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
@@ -70,6 +70,7 @@ import {
70
70
  RESCUE_CREW_COMMANDER_MISSION_ONE_AUTHORING_V1,
71
71
  ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1,
72
72
  ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1,
73
+ SERVO_CREATURE_MISSION_ONE_AUTHORING_V1,
73
74
  SKYWING_SPRINT_MISSION_ONE_AUTHORING_V1,
74
75
  STAR_DEFENDER_SQUADRON_MISSION_ONE_AUTHORING_V1,
75
76
  assertValidMissionAuthoringBundle,
@@ -102,6 +103,9 @@ const starDefenderSquadron = JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1.modules.find(
102
103
  const beaconBot = JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1.modules.find(
103
104
  (module) => module.slug === "beacon-bot",
104
105
  );
106
+ const servoCreature = JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1.modules.find(
107
+ (module) => module.slug === "servo-creature",
108
+ );
105
109
 
106
110
  if (
107
111
  !roadHopper ||
@@ -112,7 +116,8 @@ if (
112
116
  !rescueCrewCommander ||
113
117
  !pixelTrailChallenge ||
114
118
  !starDefenderSquadron ||
115
- !beaconBot
119
+ !beaconBot ||
120
+ !servoCreature
116
121
  ) {
117
122
  throw new Error("Junior Coder module is missing");
118
123
  }
@@ -153,6 +158,10 @@ assertValidMissionAuthoringBundle(
153
158
  BEACON_BOT_MISSION_ONE_AUTHORING_V1,
154
159
  beaconBot,
155
160
  );
161
+ assertValidMissionAuthoringBundle(
162
+ SERVO_CREATURE_MISSION_ONE_AUTHORING_V1,
163
+ servoCreature,
164
+ );
156
165
  ```
157
166
 
158
167
  ## Contract rules
@@ -181,6 +190,9 @@ assertValidMissionAuthoringBundle(
181
190
  - Unverified components cannot claim compatibility or physical completion.
182
191
  Simulator completion remains separate; physical export and its distinct
183
192
  badge require adult acknowledgement and evidence.
193
+ - Servo Creature documents its safe 30–150 degree simulator range while every
194
+ physical servo, regulated supply and common-ground arrangement remains
195
+ pending adult bench verification and unavailable to learner code.
184
196
 
185
197
  See [the foundation design](docs/design/junior-coder-catalog-foundation.md),
186
198
  [the uniform pricing design](docs/design/junior-coder-uniform-pricing.md),
@@ -188,7 +200,8 @@ See [the foundation design](docs/design/junior-coder-catalog-foundation.md),
188
200
  [ADR 0001](docs/adrs/adr-0001-learning-domain-and-catalog-boundary.md), and
189
201
  [ADR 0002](docs/adrs/adr-0002-immutable-module-repricing-and-admin-test-source.md),
190
202
  [ADR 0003](docs/adrs/adr-0003-mission-authoring-manifests-are-additive-and-separated.md),
191
- and [ADR 0004](docs/adrs/adr-0004-robot-mission-hardware-disclosures-are-additive-and-fail-closed.md).
203
+ [ADR 0004](docs/adrs/adr-0004-robot-mission-hardware-disclosures-are-additive-and-fail-closed.md),
204
+ and [TDR 0006](docs/tdrs/tdr-0006-servo-creature-safe-movement-and-power-authoring.md).
192
205
 
193
206
  ## Development
194
207
 
package/dist/index.cjs CHANGED
@@ -33,6 +33,7 @@ __export(index_exports, {
33
33
  RESCUE_CREW_COMMANDER_MISSION_ONE_AUTHORING_V1: () => RESCUE_CREW_COMMANDER_MISSION_ONE_AUTHORING_V1,
34
34
  ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1: () => ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1,
35
35
  ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1: () => ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1,
36
+ SERVO_CREATURE_MISSION_ONE_AUTHORING_V1: () => SERVO_CREATURE_MISSION_ONE_AUTHORING_V1,
36
37
  SKYWING_SPRINT_MISSION_ONE_AUTHORING_V1: () => SKYWING_SPRINT_MISSION_ONE_AUTHORING_V1,
37
38
  STAR_DEFENDER_SQUADRON_MISSION_ONE_AUTHORING_V1: () => STAR_DEFENDER_SQUADRON_MISSION_ONE_AUTHORING_V1,
38
39
  assertValidLearningPath: () => assertValidLearningPath,
@@ -2721,6 +2722,395 @@ var BEACON_BOT_MISSION_ONE_AUTHORING_V1 = {
2721
2722
  }
2722
2723
  }
2723
2724
  };
2725
+ var SERVO_CREATURE_MISSION_ONE_AUTHORING_V1 = {
2726
+ version: MISSION_AUTHORING_CONTRACT_VERSION_V1,
2727
+ moduleId: "junior-coder.servo-creature",
2728
+ moduleVersion: "1.1.0",
2729
+ missionId: "servo-creature-mission-1",
2730
+ learner: {
2731
+ estimatedMinutes: 20,
2732
+ stages: [
2733
+ {
2734
+ kind: "learn",
2735
+ instruction: "Read what setServoAngle(), waitMs(), repeatMovement(), setCreatureMood() and readTouchSensor() do in the private Servo Creature simulator.",
2736
+ artifactIds: ["servo-creature-m1-art"]
2737
+ },
2738
+ {
2739
+ kind: "predict",
2740
+ instruction: "Predict the creature's labelled angle, mood, repeat count and simulated touch response before the sequence runs.",
2741
+ artifactIds: []
2742
+ },
2743
+ {
2744
+ kind: "build",
2745
+ instruction: "Adjust the five documented C++-style calls to create one bounded creature movement sequence.",
2746
+ artifactIds: ["servo-creature-m1-code"]
2747
+ },
2748
+ {
2749
+ kind: "run",
2750
+ instruction: "Use the Run action button to start the private Servo Creature simulator.",
2751
+ artifactIds: ["servo-creature-m1-code"]
2752
+ },
2753
+ {
2754
+ kind: "assess",
2755
+ instruction: "Run the visible and protected deterministic pose, mood and interaction checks.",
2756
+ artifactIds: []
2757
+ },
2758
+ {
2759
+ kind: "inspect",
2760
+ instruction: "Compare the highlighted C++-style line with the first movement goal that did not pass.",
2761
+ artifactIds: []
2762
+ },
2763
+ {
2764
+ kind: "fix",
2765
+ instruction: "Change one angle, wait, repeat, mood or simulated touch call, then rerun and inspect the text telemetry.",
2766
+ artifactIds: ["servo-creature-m1-code"]
2767
+ },
2768
+ {
2769
+ kind: "explain",
2770
+ instruction: "Explain how the bounded calls created a safe movement and how the simulated interaction changed the creature's response.",
2771
+ artifactIds: []
2772
+ },
2773
+ {
2774
+ kind: "reward",
2775
+ instruction: "Collect the simulated badge when the score and private-runtime safety check pass; physical completion remains adult-only.",
2776
+ artifactIds: []
2777
+ }
2778
+ ],
2779
+ readinessChecks: [
2780
+ {
2781
+ id: "servo-creature-m1-find-angle-limit",
2782
+ prompt: "Find the documented safe minimum and maximum angle before changing the creature's pose.",
2783
+ scored: false
2784
+ }
2785
+ ],
2786
+ artifacts: [
2787
+ {
2788
+ id: "servo-creature-m1-code",
2789
+ kind: "starter-code",
2790
+ audience: "learner",
2791
+ solutionBearing: false
2792
+ },
2793
+ {
2794
+ id: "servo-creature-m1-art",
2795
+ kind: "starter-assets",
2796
+ audience: "learner",
2797
+ solutionBearing: false
2798
+ },
2799
+ {
2800
+ id: "servo-creature-m1-printable",
2801
+ kind: "printable",
2802
+ audience: "learner",
2803
+ solutionBearing: false
2804
+ }
2805
+ ],
2806
+ goals: [
2807
+ {
2808
+ id: "servo-creature-m1-starts",
2809
+ statement: "The documented C++-style settings are valid and the private simulator starts.",
2810
+ visibility: "visible",
2811
+ criterionIds: ["servo-creature-build"],
2812
+ completionRequired: true,
2813
+ aiRequired: false
2814
+ },
2815
+ {
2816
+ id: "servo-creature-m1-movement-sequence",
2817
+ statement: "The creature completes a bounded angle, timing, mood and interaction sequence.",
2818
+ visibility: "visible",
2819
+ criterionIds: ["servo-creature-goal-one", "servo-creature-goal-two"],
2820
+ completionRequired: true,
2821
+ aiRequired: false
2822
+ },
2823
+ {
2824
+ id: "servo-creature-m1-private-runtime",
2825
+ statement: "The program stays inside the private simulator and never accesses physical hardware, the network or browser storage.",
2826
+ visibility: "visible",
2827
+ criterionIds: ["servo-creature-safety"],
2828
+ completionRequired: true,
2829
+ aiRequired: false
2830
+ }
2831
+ ],
2832
+ interactions: [
2833
+ {
2834
+ id: "servo-creature-m1-run-control",
2835
+ description: "Start the private Servo Creature movement simulation.",
2836
+ primaryMode: "pointer",
2837
+ alternativeIds: ["servo-creature-m1-keyboard-run"]
2838
+ },
2839
+ {
2840
+ id: "servo-creature-m1-code-control",
2841
+ description: "Edit the documented angle, timing, repeat, mood and interaction calls.",
2842
+ primaryMode: "keyboard",
2843
+ alternativeIds: []
2844
+ },
2845
+ {
2846
+ id: "servo-creature-m1-pose-motion",
2847
+ description: "Observe the bounded creature pose and movement sequence.",
2848
+ primaryMode: "motion",
2849
+ alternativeIds: ["servo-creature-m1-telemetry"]
2850
+ }
2851
+ ],
2852
+ accessibilityAlternatives: [
2853
+ {
2854
+ id: "servo-creature-m1-keyboard-run",
2855
+ modes: ["keyboard"],
2856
+ equivalentOutcome: true,
2857
+ description: "Press Enter or Space on the play-icon Run button to start the same simulator."
2858
+ },
2859
+ {
2860
+ id: "servo-creature-m1-telemetry",
2861
+ modes: ["text", "shape", "symbol", "reduced-motion"],
2862
+ equivalentOutcome: true,
2863
+ description: "Read the angle, mood, repeat count, elapsed milliseconds and touch state without animation."
2864
+ }
2865
+ ],
2866
+ evidenceRequirements: [
2867
+ {
2868
+ id: "servo-creature-m1-assessment",
2869
+ goalIds: [
2870
+ "servo-creature-m1-starts",
2871
+ "servo-creature-m1-movement-sequence",
2872
+ "servo-creature-m1-private-runtime"
2873
+ ],
2874
+ kind: "assessment-result",
2875
+ retention: "entitlement",
2876
+ containsPersonalData: false
2877
+ },
2878
+ {
2879
+ id: "servo-creature-m1-explanation",
2880
+ goalIds: ["servo-creature-m1-movement-sequence"],
2881
+ kind: "learner-explanation",
2882
+ retention: "attempt",
2883
+ containsPersonalData: false
2884
+ }
2885
+ ],
2886
+ sideAdventures: [
2887
+ {
2888
+ id: "servo-creature-m1-remix",
2889
+ prompt: "Invent an original creature mood and describe a text or symbol cue that makes its pose understandable without movement.",
2890
+ completionRequired: false
2891
+ }
2892
+ ],
2893
+ rewardBindings: [
2894
+ {
2895
+ id: "servo-creature-m1-simulated-badge",
2896
+ badgeId: "servo-creature-mission-complete",
2897
+ goalIds: [
2898
+ "servo-creature-m1-starts",
2899
+ "servo-creature-m1-movement-sequence",
2900
+ "servo-creature-m1-private-runtime"
2901
+ ],
2902
+ deterministic: true,
2903
+ random: false,
2904
+ tokenConvertible: false
2905
+ }
2906
+ ],
2907
+ functionReference: [
2908
+ {
2909
+ id: "servo-creature-function-angle",
2910
+ signature: "setServoAngle(degrees)",
2911
+ summary: "Chooses one safe labelled creature pose in the private simulator.",
2912
+ parameters: [
2913
+ {
2914
+ name: "degrees",
2915
+ type: "whole number",
2916
+ description: "A bounded angle from 30 to 150 degrees."
2917
+ }
2918
+ ],
2919
+ effect: "Updates the simulator's labelled angle and pose cue without generating PWM or accessing a physical servo.",
2920
+ example: "setServoAngle(90);"
2921
+ },
2922
+ {
2923
+ id: "servo-creature-function-wait",
2924
+ signature: "waitMs(duration)",
2925
+ summary: "Adds one safe wait to the simulated movement timeline.",
2926
+ parameters: [
2927
+ {
2928
+ name: "duration",
2929
+ type: "whole number",
2930
+ description: "A bounded number of milliseconds from 100 to 1000."
2931
+ }
2932
+ ],
2933
+ effect: "Advances simulated elapsed time; it never blocks the website or holds a physical servo under load.",
2934
+ example: "waitMs(300);"
2935
+ },
2936
+ {
2937
+ id: "servo-creature-function-repeat",
2938
+ signature: "repeatMovement(count)",
2939
+ summary: "Repeats the current simulated pose a safe number of times.",
2940
+ parameters: [
2941
+ {
2942
+ name: "count",
2943
+ type: "whole number",
2944
+ description: "A bounded repeat count from 1 to 4."
2945
+ }
2946
+ ],
2947
+ effect: "Adds a fixed number of labelled pose steps to the private simulator timeline.",
2948
+ example: "repeatMovement(3);"
2949
+ },
2950
+ {
2951
+ id: "servo-creature-function-mood",
2952
+ signature: "setCreatureMood(mood)",
2953
+ summary: "Chooses the creature's labelled expression for the simulated pose.",
2954
+ parameters: [
2955
+ {
2956
+ name: "mood",
2957
+ type: "string",
2958
+ description: "Use calm, curious or happy."
2959
+ }
2960
+ ],
2961
+ effect: "Updates the simulator's text and symbol mood cue without moving physical parts.",
2962
+ example: 'setCreatureMood("curious");'
2963
+ },
2964
+ {
2965
+ id: "servo-creature-function-touch",
2966
+ signature: "readTouchSensor()",
2967
+ summary: "Reads the simulator's fictional touch state for one interaction response.",
2968
+ parameters: [],
2969
+ effect: "Returns touched or clear from simulator state only; it cannot access a physical sensor.",
2970
+ example: "const touchState = readTouchSensor();"
2971
+ }
2972
+ ]
2973
+ },
2974
+ facilitator: {
2975
+ artifacts: [
2976
+ {
2977
+ id: "servo-creature-m1-answer-key",
2978
+ kind: "answer-key",
2979
+ audience: "facilitator",
2980
+ solutionBearing: true
2981
+ },
2982
+ {
2983
+ id: "servo-creature-m1-protected-tests",
2984
+ kind: "protected-test",
2985
+ audience: "facilitator",
2986
+ solutionBearing: true
2987
+ },
2988
+ {
2989
+ id: "servo-creature-m1-adult-hardware-guide",
2990
+ kind: "facilitator-note",
2991
+ audience: "facilitator",
2992
+ solutionBearing: true
2993
+ }
2994
+ ],
2995
+ protectedGoals: [
2996
+ {
2997
+ id: "servo-creature-m1-protected-resilience",
2998
+ statement: "The simulator rejects unsupported moods, out-of-range angles, excessive waits or repeats and any physical-hardware request.",
2999
+ visibility: "protected",
3000
+ criterionIds: ["servo-creature-edge-one", "servo-creature-edge-two"],
3001
+ completionRequired: false,
3002
+ aiRequired: false
3003
+ }
3004
+ ],
3005
+ prompts: [
3006
+ "Ask the learner to predict the labelled pose timeline before suggesting one bounded change.",
3007
+ "Use the function reference and visible telemetry; never provide servo wiring, power or movement advice to a learner.",
3008
+ "Physical export stays unavailable until an adult acknowledges the exact manifest and every servo power component has verified bench-test evidence."
3009
+ ]
3010
+ },
3011
+ hardware: {
3012
+ requirementsVersion: "1.0.0",
3013
+ hardwareIncluded: false,
3014
+ completePathItemIds: [
3015
+ "pico-2-w",
3016
+ "breadboard",
3017
+ "usb-data-cable",
3018
+ "jumper-wires",
3019
+ "micro-servo",
3020
+ "servo-power"
3021
+ ],
3022
+ incrementalItemIds: ["micro-servo", "servo-power"],
3023
+ components: [
3024
+ {
3025
+ itemId: "pico-2-w",
3026
+ quantity: 1,
3027
+ acquisitionScope: "complete-path",
3028
+ verificationStatus: "pending-bench-test",
3029
+ compatibilityClaimed: false,
3030
+ physicalCompletionEligible: false
3031
+ },
3032
+ {
3033
+ itemId: "breadboard",
3034
+ quantity: 1,
3035
+ acquisitionScope: "complete-path",
3036
+ verificationStatus: "pending-bench-test",
3037
+ compatibilityClaimed: false,
3038
+ physicalCompletionEligible: false
3039
+ },
3040
+ {
3041
+ itemId: "usb-data-cable",
3042
+ quantity: 1,
3043
+ acquisitionScope: "complete-path",
3044
+ verificationStatus: "pending-bench-test",
3045
+ compatibilityClaimed: false,
3046
+ physicalCompletionEligible: false
3047
+ },
3048
+ {
3049
+ itemId: "jumper-wires",
3050
+ quantity: 12,
3051
+ acquisitionScope: "complete-path",
3052
+ verificationStatus: "pending-bench-test",
3053
+ compatibilityClaimed: false,
3054
+ physicalCompletionEligible: false
3055
+ },
3056
+ {
3057
+ itemId: "micro-servo",
3058
+ quantity: 1,
3059
+ acquisitionScope: "incremental",
3060
+ verificationStatus: "pending-bench-test",
3061
+ compatibilityClaimed: false,
3062
+ physicalCompletionEligible: false
3063
+ },
3064
+ {
3065
+ itemId: "servo-power",
3066
+ quantity: 1,
3067
+ acquisitionScope: "incremental",
3068
+ verificationStatus: "pending-bench-test",
3069
+ compatibilityClaimed: false,
3070
+ physicalCompletionEligible: false
3071
+ }
3072
+ ],
3073
+ safeguards: {
3074
+ adultAssemblyRequired: true,
3075
+ adultAcknowledgementRequiredForExport: true,
3076
+ websiteMayControlHardware: false,
3077
+ simulatorCompletionAvailable: true,
3078
+ simulatedBadgeId: "servo-creature-mission-complete",
3079
+ physicalBadgeId: "servo-creature-physical-builder",
3080
+ physicalBadgeRequiresAdultSignoff: true,
3081
+ adultAssemblySteps: [
3082
+ "Confirm the exact servo, external supply and connector identities against the requirements manifest.",
3083
+ "Assemble and inspect the disconnected signal and common-ground wiring before learner use.",
3084
+ "Secure the creature linkage, lift or restrain moving parts and complete the adult bench-test record."
3085
+ ],
3086
+ powerRequirements: [
3087
+ "Use an external regulated servo supply sized for the verified servo; do not power the servo from a Pico GPIO pin.",
3088
+ "Connect one common signal ground between the verified servo supply and Pico only as shown in the adult guide.",
3089
+ "Disconnect every power source before changing wiring or creature linkages."
3090
+ ],
3091
+ cableRequirements: [
3092
+ "One known data-capable USB cable compatible with the Pico 2 W.",
3093
+ "Insulated jumper leads and a verified servo connector arrangement documented by the adult guide."
3094
+ ],
3095
+ softwarePrerequisites: [
3096
+ "Supported Pico SDK toolchain on Raspberry Pi OS or a documented desktop environment.",
3097
+ "Known-good Servo Creature recovery firmware with adult-owned neutral-pose and stop behaviour."
3098
+ ],
3099
+ warnings: [
3100
+ "Hardware is not included with the module.",
3101
+ "No listed servo or power arrangement currently claims compatibility or physical-completion eligibility.",
3102
+ "Pinch points, stalled servos and unsuitable power supplies can cause heat or movement; adult assembly and testing are mandatory.",
3103
+ "The simulator and simulated badge remain available without physical equipment."
3104
+ ],
3105
+ unrelatedHardwareNotRequired: [
3106
+ "Camera Module 3 or Raspberry Pi Zero 2 W",
3107
+ "motor driver, motors or rover chassis",
3108
+ "physical touch or IR sensor",
3109
+ "LED or infrared beacon parts"
3110
+ ]
3111
+ }
3112
+ }
3113
+ };
2724
3114
  var RESCUE_CREW_COMMANDER_MISSION_ONE_AUTHORING_V1 = {
2725
3115
  version: MISSION_AUTHORING_CONTRACT_VERSION_V1,
2726
3116
  moduleId: "junior-coder.rescue-crew-commander",
@@ -3529,6 +3919,7 @@ ${summary}`);
3529
3919
  RESCUE_CREW_COMMANDER_MISSION_ONE_AUTHORING_V1,
3530
3920
  ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1,
3531
3921
  ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1,
3922
+ SERVO_CREATURE_MISSION_ONE_AUTHORING_V1,
3532
3923
  SKYWING_SPRINT_MISSION_ONE_AUTHORING_V1,
3533
3924
  STAR_DEFENDER_SQUADRON_MISSION_ONE_AUTHORING_V1,
3534
3925
  assertValidLearningPath,