@contractspec/example.learning-journey-duo-drills 3.7.19 → 4.0.1
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/.turbo/turbo-build.log +35 -34
- package/CHANGELOG.md +30 -0
- package/dist/browser/example.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/learning-journey-duo-drills.feature.js +1 -1
- package/dist/browser/track.js +1 -1
- package/dist/example.d.ts +3 -2
- package/dist/example.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/learning-journey-duo-drills.feature.js +1 -1
- package/dist/node/example.js +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/learning-journey-duo-drills.feature.js +1 -1
- package/dist/node/track.js +1 -1
- package/dist/track.d.ts +3 -3
- package/dist/track.js +1 -1
- package/package.json +4 -4
- package/src/example.ts +15 -18
- package/src/index.ts +2 -0
- package/src/learning-journey-duo-drills.feature.ts +1 -1
- package/src/track.test.ts +27 -96
- package/src/track.ts +43 -7
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
[
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
./
|
|
12
|
-
./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
./
|
|
22
|
-
./
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
./
|
|
32
|
-
./
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
|
|
2
|
+
[0m[2m[35m$[0m [2m[1mcontractspec-bun-build prebuild[0m
|
|
3
|
+
[0m[2m[35m$[0m [2m[1mbun run build:bundle && bun run build:types[0m
|
|
4
|
+
[0m[2m[35m$[0m [2m[1mcontractspec-bun-build transpile[0m
|
|
5
|
+
[contractspec-bun-build] transpile target=bun root=src entries=6 noBundle=false
|
|
6
|
+
[32mBundled 6 modules in 14ms[0m
|
|
7
|
+
|
|
8
|
+
[34mdocs/duo-drills.docblock.js[0m 1.30 KB [2m(entry point)[0m
|
|
9
|
+
[34m./index.js[0m 4.27 KB [2m(entry point)[0m
|
|
10
|
+
[34mdocs/index.js[0m 1.30 KB [2m(entry point)[0m
|
|
11
|
+
[34m./example.js[0m 0.71 KB [2m(entry point)[0m
|
|
12
|
+
[34m./learning-journey-duo-drills.feature.js[0m 470 bytes [2m(entry point)[0m
|
|
13
|
+
[34m./track.js[0m 1.83 KB [2m(entry point)[0m
|
|
14
|
+
|
|
15
|
+
[contractspec-bun-build] transpile target=node root=src entries=6 noBundle=false
|
|
16
|
+
[32mBundled 6 modules in 12ms[0m
|
|
17
|
+
|
|
18
|
+
[34mdocs/duo-drills.docblock.js[0m 1.28 KB [2m(entry point)[0m
|
|
19
|
+
[34m./index.js[0m 4.25 KB [2m(entry point)[0m
|
|
20
|
+
[34mdocs/index.js[0m 1.28 KB [2m(entry point)[0m
|
|
21
|
+
[34m./example.js[0m 0.70 KB [2m(entry point)[0m
|
|
22
|
+
[34m./learning-journey-duo-drills.feature.js[0m 462 bytes [2m(entry point)[0m
|
|
23
|
+
[34m./track.js[0m 1.82 KB [2m(entry point)[0m
|
|
24
|
+
|
|
25
|
+
[contractspec-bun-build] transpile target=browser root=src entries=6 noBundle=false
|
|
26
|
+
[32mBundled 6 modules in 12ms[0m
|
|
27
|
+
|
|
28
|
+
[34mdocs/duo-drills.docblock.js[0m 1.28 KB [2m(entry point)[0m
|
|
29
|
+
[34m./index.js[0m 4.25 KB [2m(entry point)[0m
|
|
30
|
+
[34mdocs/index.js[0m 1.28 KB [2m(entry point)[0m
|
|
31
|
+
[34m./example.js[0m 0.70 KB [2m(entry point)[0m
|
|
32
|
+
[34m./learning-journey-duo-drills.feature.js[0m 462 bytes [2m(entry point)[0m
|
|
33
|
+
[34m./track.js[0m 1.82 KB [2m(entry point)[0m
|
|
34
|
+
|
|
35
|
+
[0m[2m[35m$[0m [2m[1mcontractspec-bun-build types[0m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @contractspec/example.learning-journey-duo-drills
|
|
2
2
|
|
|
3
|
+
## 4.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- chore: auto-bump internal dependents
|
|
8
|
+
- Updated dependencies because of chore: auto-bump internal dependents
|
|
9
|
+
- Updated dependencies because of Add FormSpec layout hints, semantic field rendering, and portable text/textarea input-group addons.
|
|
10
|
+
- Updated dependencies because of Add ThemeSpec light/dark modes and a design-system Tailwind bridge for CSS variables, presets, CSS text, and OKLCH color pass-through.
|
|
11
|
+
- Updated dependencies because of Add a canonical typed result system for ContractSpec success and failure propagation across operations, workflows, jobs, server adapters, MCP, GraphQL, and React clients.
|
|
12
|
+
- @contractspec/module.learning-journey@4.0.1
|
|
13
|
+
- @contractspec/lib.contracts-spec@5.5.0
|
|
14
|
+
|
|
15
|
+
## 4.0.0
|
|
16
|
+
|
|
17
|
+
### Major Changes
|
|
18
|
+
|
|
19
|
+
- Redesign the learning system around the adaptive journey runtime and repair shared learning sandbox presentation wiring.
|
|
20
|
+
- Packages: @contractspec/module.learning-journey (major), @contractspec/module.examples (patch), @contractspec/example.learning-journey-ambient-coach (major), @contractspec/example.learning-journey-crm-onboarding (major), @contractspec/example.learning-journey-duo-drills (major), @contractspec/example.learning-journey-platform-tour (major), @contractspec/example.learning-journey-quest-challenges (major), @contractspec/example.learning-journey-registry (major), @contractspec/example.learning-journey-studio-onboarding (major), @contractspec/example.learning-journey-ui-coaching (major), @contractspec/example.learning-journey-ui-gamified (major), @contractspec/example.learning-journey-ui-onboarding (major), @contractspec/example.learning-journey-ui-shared (major), @contractspec/example.learning-patterns (major)
|
|
21
|
+
- Migration: Replace the old onboarding-centric learning contracts and local example progress logic with the canonical adaptive `learning.journey.*` runtime.; Use the shared learning registry mapping/data helpers so supported learning sandbox templates resolve the shared presentation set consistently.
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies because of Add a family-aware ContractSpec Adoption Engine, expand contract authoring targets across CLI and VS Code tooling, and refresh release-facing schema and policy artifacts for downstream workspaces.
|
|
26
|
+
- Updated dependencies because of Improve app-config, theme, and feature authoring with explicit validation APIs, first-class theme discovery and scaffolding, and key-based app-config generation across contracts, workspace tooling, and the CLI.
|
|
27
|
+
- Updated dependencies because of Refresh root, package, website, and LLM-facing docs so Connect, Builder, release capsules, and the current contracts-spec export surface stay aligned.
|
|
28
|
+
- Updated dependencies because of Persist canonical knowledge payload text during indexing and align the retrieval/query docs with the corrected behavior.
|
|
29
|
+
- Updated dependencies because of Redesign the learning system around the adaptive journey runtime and repair shared learning sandbox presentation wiring.
|
|
30
|
+
- @contractspec/lib.contracts-spec@5.4.0
|
|
31
|
+
- @contractspec/module.learning-journey@4.0.0
|
|
32
|
+
|
|
3
33
|
## 3.7.19
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/dist/browser/example.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineExample as
|
|
1
|
+
import{defineExample as b}from"@contractspec/lib.contracts-spec/examples";var c=b({meta:{key:"examples.learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey Duo Drills",description:"Drill-based learning journey example with SRS, XP, and streak hooks.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","learning-journey-duo-drills"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.learning-journey-duo-drills"}}),h=c;export{h as default,c as ExamplesLearningJourneyDuoDrillsExample};
|
package/dist/browser/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerDocBlocks as e}from"@contractspec/lib.contracts-spec/docs";var
|
|
1
|
+
import{registerDocBlocks as e}from"@contractspec/lib.contracts-spec/docs";var t=[{id:"docs.learning-journey.duo-drills",title:"Learning Journey — Duo Drills",summary:"Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",kind:"reference",visibility:"public",route:"/docs/learning-journey/duo-drills",tags:["learning","drills","srs","xp"],body:'## Track\n- **Key**: `drills_language_basics`\n- **Persona**: learner running quick drills (language/finance/spec concepts)\n- **Goal**: complete first session, maintain high-accuracy sessions, master cards in the first skill\n\n## Steps & Conditions\n1) `complete_first_session` → event `drill.session.completed`\n2) `reach_accuracy_threshold` → count 3 sessions with payload `accuracyBucket: "high"` (within default window)\n3) `unlock_new_skill` → SRS mastery: `drill.card.mastered` events with `mastery >= 0.8`, count 5 cards\n\nXP: 20 + 30 + 40. Streak: daily session completion can be used to drive streak rewards.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-duo-drills/track`.\n- Use registry helper `recordEvent` to advance steps from drill/session events.\n- SRS mastery events should include payload: `{ skillId, mastery }`.'}];e(t);import{defineExample as i}from"@contractspec/lib.contracts-spec/examples";var s=i({meta:{key:"examples.learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey Duo Drills",description:"Drill-based learning journey example with SRS, XP, and streak hooks.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","learning-journey-duo-drills"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.learning-journey-duo-drills"}}),r=s;import{defineFeature as a}from"@contractspec/lib.contracts-spec/features";var m=a({meta:{key:"learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey: Duo Drills",description:"Drill-based learning with spaced repetition, XP, and streaks",domain:"learning-journey",owners:["@examples"],tags:["learning","drills","srs","gamification"],stability:"experimental"},docs:["docs.learning-journey.duo-drills"]});var c={id:"drills_language_basics",name:"Language Basics Drills",description:"Short SRS-driven drills to master a first skill, modeled after Duolingo-style sessions.",targetUserSegment:"learner",targetRole:"individual",totalXp:50,completionRewards:{xp:25},steps:[{id:"complete_first_session",title:"Complete first drill session",description:"Finish a drill session to get started.",order:1,completion:{kind:"event",eventName:"drill.session.completed"},branches:[{key:"fast_track",when:{kind:"event",eventName:"drill.session.completed",payloadFilter:{accuracyBucket:"high"}},blockStepIds:["reach_accuracy_threshold"],reward:{xp:10}},{key:"guided_practice",when:{kind:"event",eventName:"drill.session.completed"}}],xpReward:20,metadata:{surface:"drills"}},{id:"reach_accuracy_threshold",title:"Hit high accuracy in sessions",description:"Achieve three high-accuracy sessions to build confidence.",order:2,prerequisites:[{kind:"branch_selected",stepId:"complete_first_session",branchKey:"guided_practice"}],completion:{kind:"count",eventName:"drill.session.completed",atLeast:3,payloadFilter:{accuracyBucket:"high"}},xpReward:30,metadata:{metric:"accuracy",target:">=85%"}},{id:"unlock_new_skill",title:"Master core cards in first skill",description:"Reach mastery on at least five cards in the first skill to unlock the next one.",order:3,prerequisiteMode:"any",prerequisites:[{kind:"step_completed",stepId:"reach_accuracy_threshold"},{kind:"branch_selected",stepId:"complete_first_session",branchKey:"fast_track"}],completion:{kind:"mastery",eventName:"drill.card.mastered",minimumMastery:0.8,requiredCount:5,skillIdField:"skillId",masteryField:"mastery",payloadFilter:{skillId:"language_basics"}},xpReward:40,metadata:{surface:"srs",skill:"language_basics"}}]},k=[c];export{r as example,c as drillsLanguageBasicsTrack,k as drillTracks,m as LearningJourneyDuoDrillsFeature,s as ExamplesLearningJourneyDuoDrillsExample};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey: Duo Drills",description:"Drill-based learning with spaced repetition, XP, and streaks",domain:"learning-journey",owners:["@examples"],tags:["learning","drills","srs","gamification"],stability:"experimental"},docs:["docs.learning-journey.duo-drills"]});export{j as LearningJourneyDuoDrillsFeature};
|
|
1
|
+
import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey: Duo Drills",description:"Drill-based learning with spaced repetition, XP, and streaks",domain:"learning-journey",owners:["@examples"],tags:["learning","drills","srs","gamification"],stability:"experimental"},docs:["docs.learning-journey.duo-drills"]});export{j as LearningJourneyDuoDrillsFeature};
|
package/dist/browser/track.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={id:"drills_language_basics",name:"Language Basics Drills",description:"Short SRS-driven drills to master a first skill, modeled after Duolingo-style sessions.",targetUserSegment:"learner",targetRole:"individual",totalXp:50,completionRewards:{
|
|
1
|
+
var e={id:"drills_language_basics",name:"Language Basics Drills",description:"Short SRS-driven drills to master a first skill, modeled after Duolingo-style sessions.",targetUserSegment:"learner",targetRole:"individual",totalXp:50,completionRewards:{xp:25},steps:[{id:"complete_first_session",title:"Complete first drill session",description:"Finish a drill session to get started.",order:1,completion:{kind:"event",eventName:"drill.session.completed"},branches:[{key:"fast_track",when:{kind:"event",eventName:"drill.session.completed",payloadFilter:{accuracyBucket:"high"}},blockStepIds:["reach_accuracy_threshold"],reward:{xp:10}},{key:"guided_practice",when:{kind:"event",eventName:"drill.session.completed"}}],xpReward:20,metadata:{surface:"drills"}},{id:"reach_accuracy_threshold",title:"Hit high accuracy in sessions",description:"Achieve three high-accuracy sessions to build confidence.",order:2,prerequisites:[{kind:"branch_selected",stepId:"complete_first_session",branchKey:"guided_practice"}],completion:{kind:"count",eventName:"drill.session.completed",atLeast:3,payloadFilter:{accuracyBucket:"high"}},xpReward:30,metadata:{metric:"accuracy",target:">=85%"}},{id:"unlock_new_skill",title:"Master core cards in first skill",description:"Reach mastery on at least five cards in the first skill to unlock the next one.",order:3,prerequisiteMode:"any",prerequisites:[{kind:"step_completed",stepId:"reach_accuracy_threshold"},{kind:"branch_selected",stepId:"complete_first_session",branchKey:"fast_track"}],completion:{kind:"mastery",eventName:"drill.card.mastered",minimumMastery:0.8,requiredCount:5,skillIdField:"skillId",masteryField:"mastery",payloadFilter:{skillId:"language_basics"}},xpReward:40,metadata:{surface:"srs",skill:"language_basics"}}]},s=[e];export{e as drillsLanguageBasicsTrack,s as drillTracks};
|
package/dist/example.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default
|
|
1
|
+
declare const ExamplesLearningJourneyDuoDrillsExample: import("@contractspec/lib.contracts-spec").ExampleSpec;
|
|
2
|
+
export default ExamplesLearningJourneyDuoDrillsExample;
|
|
3
|
+
export { ExamplesLearningJourneyDuoDrillsExample };
|
package/dist/example.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{defineExample as
|
|
2
|
+
import{defineExample as b}from"@contractspec/lib.contracts-spec/examples";var c=b({meta:{key:"examples.learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey Duo Drills",description:"Drill-based learning journey example with SRS, XP, and streak hooks.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","learning-journey-duo-drills"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.learning-journey-duo-drills"}}),h=c;export{h as default,c as ExamplesLearningJourneyDuoDrillsExample};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{registerDocBlocks as e}from"@contractspec/lib.contracts-spec/docs";var
|
|
2
|
+
import{registerDocBlocks as e}from"@contractspec/lib.contracts-spec/docs";var t=[{id:"docs.learning-journey.duo-drills",title:"Learning Journey \u2014 Duo Drills",summary:"Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",kind:"reference",visibility:"public",route:"/docs/learning-journey/duo-drills",tags:["learning","drills","srs","xp"],body:'## Track\n- **Key**: `drills_language_basics`\n- **Persona**: learner running quick drills (language/finance/spec concepts)\n- **Goal**: complete first session, maintain high-accuracy sessions, master cards in the first skill\n\n## Steps & Conditions\n1) `complete_first_session` \u2192 event `drill.session.completed`\n2) `reach_accuracy_threshold` \u2192 count 3 sessions with payload `accuracyBucket: "high"` (within default window)\n3) `unlock_new_skill` \u2192 SRS mastery: `drill.card.mastered` events with `mastery >= 0.8`, count 5 cards\n\nXP: 20 + 30 + 40. Streak: daily session completion can be used to drive streak rewards.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-duo-drills/track`.\n- Use registry helper `recordEvent` to advance steps from drill/session events.\n- SRS mastery events should include payload: `{ skillId, mastery }`.'}];e(t);import{defineExample as i}from"@contractspec/lib.contracts-spec/examples";var s=i({meta:{key:"examples.learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey Duo Drills",description:"Drill-based learning journey example with SRS, XP, and streak hooks.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","learning-journey-duo-drills"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.learning-journey-duo-drills"}}),r=s;import{defineFeature as a}from"@contractspec/lib.contracts-spec/features";var m=a({meta:{key:"learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey: Duo Drills",description:"Drill-based learning with spaced repetition, XP, and streaks",domain:"learning-journey",owners:["@examples"],tags:["learning","drills","srs","gamification"],stability:"experimental"},docs:["docs.learning-journey.duo-drills"]});var c={id:"drills_language_basics",name:"Language Basics Drills",description:"Short SRS-driven drills to master a first skill, modeled after Duolingo-style sessions.",targetUserSegment:"learner",targetRole:"individual",totalXp:50,completionRewards:{xp:25},steps:[{id:"complete_first_session",title:"Complete first drill session",description:"Finish a drill session to get started.",order:1,completion:{kind:"event",eventName:"drill.session.completed"},branches:[{key:"fast_track",when:{kind:"event",eventName:"drill.session.completed",payloadFilter:{accuracyBucket:"high"}},blockStepIds:["reach_accuracy_threshold"],reward:{xp:10}},{key:"guided_practice",when:{kind:"event",eventName:"drill.session.completed"}}],xpReward:20,metadata:{surface:"drills"}},{id:"reach_accuracy_threshold",title:"Hit high accuracy in sessions",description:"Achieve three high-accuracy sessions to build confidence.",order:2,prerequisites:[{kind:"branch_selected",stepId:"complete_first_session",branchKey:"guided_practice"}],completion:{kind:"count",eventName:"drill.session.completed",atLeast:3,payloadFilter:{accuracyBucket:"high"}},xpReward:30,metadata:{metric:"accuracy",target:">=85%"}},{id:"unlock_new_skill",title:"Master core cards in first skill",description:"Reach mastery on at least five cards in the first skill to unlock the next one.",order:3,prerequisiteMode:"any",prerequisites:[{kind:"step_completed",stepId:"reach_accuracy_threshold"},{kind:"branch_selected",stepId:"complete_first_session",branchKey:"fast_track"}],completion:{kind:"mastery",eventName:"drill.card.mastered",minimumMastery:0.8,requiredCount:5,skillIdField:"skillId",masteryField:"mastery",payloadFilter:{skillId:"language_basics"}},xpReward:40,metadata:{surface:"srs",skill:"language_basics"}}]},k=[c];export{r as example,c as drillsLanguageBasicsTrack,k as drillTracks,m as LearningJourneyDuoDrillsFeature,s as ExamplesLearningJourneyDuoDrillsExample};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey: Duo Drills",description:"Drill-based learning with spaced repetition, XP, and streaks",domain:"learning-journey",owners:["@examples"],tags:["learning","drills","srs","gamification"],stability:"experimental"},docs:["docs.learning-journey.duo-drills"]});export{j as LearningJourneyDuoDrillsFeature};
|
|
2
|
+
import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey: Duo Drills",description:"Drill-based learning with spaced repetition, XP, and streaks",domain:"learning-journey",owners:["@examples"],tags:["learning","drills","srs","gamification"],stability:"experimental"},docs:["docs.learning-journey.duo-drills"]});export{j as LearningJourneyDuoDrillsFeature};
|
package/dist/node/example.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineExample as
|
|
1
|
+
import{defineExample as b}from"@contractspec/lib.contracts-spec/examples";var c=b({meta:{key:"examples.learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey Duo Drills",description:"Drill-based learning journey example with SRS, XP, and streak hooks.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","learning-journey-duo-drills"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.learning-journey-duo-drills"}}),h=c;export{h as default,c as ExamplesLearningJourneyDuoDrillsExample};
|
package/dist/node/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerDocBlocks as e}from"@contractspec/lib.contracts-spec/docs";var
|
|
1
|
+
import{registerDocBlocks as e}from"@contractspec/lib.contracts-spec/docs";var t=[{id:"docs.learning-journey.duo-drills",title:"Learning Journey — Duo Drills",summary:"Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",kind:"reference",visibility:"public",route:"/docs/learning-journey/duo-drills",tags:["learning","drills","srs","xp"],body:'## Track\n- **Key**: `drills_language_basics`\n- **Persona**: learner running quick drills (language/finance/spec concepts)\n- **Goal**: complete first session, maintain high-accuracy sessions, master cards in the first skill\n\n## Steps & Conditions\n1) `complete_first_session` → event `drill.session.completed`\n2) `reach_accuracy_threshold` → count 3 sessions with payload `accuracyBucket: "high"` (within default window)\n3) `unlock_new_skill` → SRS mastery: `drill.card.mastered` events with `mastery >= 0.8`, count 5 cards\n\nXP: 20 + 30 + 40. Streak: daily session completion can be used to drive streak rewards.\n\n## Wiring\n- Tracks export from `@contractspec/example.learning-journey-duo-drills/track`.\n- Use registry helper `recordEvent` to advance steps from drill/session events.\n- SRS mastery events should include payload: `{ skillId, mastery }`.'}];e(t);import{defineExample as i}from"@contractspec/lib.contracts-spec/examples";var s=i({meta:{key:"examples.learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey Duo Drills",description:"Drill-based learning journey example with SRS, XP, and streak hooks.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","learning-journey-duo-drills"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.learning-journey-duo-drills"}}),r=s;import{defineFeature as a}from"@contractspec/lib.contracts-spec/features";var m=a({meta:{key:"learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey: Duo Drills",description:"Drill-based learning with spaced repetition, XP, and streaks",domain:"learning-journey",owners:["@examples"],tags:["learning","drills","srs","gamification"],stability:"experimental"},docs:["docs.learning-journey.duo-drills"]});var c={id:"drills_language_basics",name:"Language Basics Drills",description:"Short SRS-driven drills to master a first skill, modeled after Duolingo-style sessions.",targetUserSegment:"learner",targetRole:"individual",totalXp:50,completionRewards:{xp:25},steps:[{id:"complete_first_session",title:"Complete first drill session",description:"Finish a drill session to get started.",order:1,completion:{kind:"event",eventName:"drill.session.completed"},branches:[{key:"fast_track",when:{kind:"event",eventName:"drill.session.completed",payloadFilter:{accuracyBucket:"high"}},blockStepIds:["reach_accuracy_threshold"],reward:{xp:10}},{key:"guided_practice",when:{kind:"event",eventName:"drill.session.completed"}}],xpReward:20,metadata:{surface:"drills"}},{id:"reach_accuracy_threshold",title:"Hit high accuracy in sessions",description:"Achieve three high-accuracy sessions to build confidence.",order:2,prerequisites:[{kind:"branch_selected",stepId:"complete_first_session",branchKey:"guided_practice"}],completion:{kind:"count",eventName:"drill.session.completed",atLeast:3,payloadFilter:{accuracyBucket:"high"}},xpReward:30,metadata:{metric:"accuracy",target:">=85%"}},{id:"unlock_new_skill",title:"Master core cards in first skill",description:"Reach mastery on at least five cards in the first skill to unlock the next one.",order:3,prerequisiteMode:"any",prerequisites:[{kind:"step_completed",stepId:"reach_accuracy_threshold"},{kind:"branch_selected",stepId:"complete_first_session",branchKey:"fast_track"}],completion:{kind:"mastery",eventName:"drill.card.mastered",minimumMastery:0.8,requiredCount:5,skillIdField:"skillId",masteryField:"mastery",payloadFilter:{skillId:"language_basics"}},xpReward:40,metadata:{surface:"srs",skill:"language_basics"}}]},k=[c];export{r as example,c as drillsLanguageBasicsTrack,k as drillTracks,m as LearningJourneyDuoDrillsFeature,s as ExamplesLearningJourneyDuoDrillsExample};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey: Duo Drills",description:"Drill-based learning with spaced repetition, XP, and streaks",domain:"learning-journey",owners:["@examples"],tags:["learning","drills","srs","gamification"],stability:"experimental"},docs:["docs.learning-journey.duo-drills"]});export{j as LearningJourneyDuoDrillsFeature};
|
|
1
|
+
import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey: Duo Drills",description:"Drill-based learning with spaced repetition, XP, and streaks",domain:"learning-journey",owners:["@examples"],tags:["learning","drills","srs","gamification"],stability:"experimental"},docs:["docs.learning-journey.duo-drills"]});export{j as LearningJourneyDuoDrillsFeature};
|
package/dist/node/track.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={id:"drills_language_basics",name:"Language Basics Drills",description:"Short SRS-driven drills to master a first skill, modeled after Duolingo-style sessions.",targetUserSegment:"learner",targetRole:"individual",totalXp:50,completionRewards:{
|
|
1
|
+
var e={id:"drills_language_basics",name:"Language Basics Drills",description:"Short SRS-driven drills to master a first skill, modeled after Duolingo-style sessions.",targetUserSegment:"learner",targetRole:"individual",totalXp:50,completionRewards:{xp:25},steps:[{id:"complete_first_session",title:"Complete first drill session",description:"Finish a drill session to get started.",order:1,completion:{kind:"event",eventName:"drill.session.completed"},branches:[{key:"fast_track",when:{kind:"event",eventName:"drill.session.completed",payloadFilter:{accuracyBucket:"high"}},blockStepIds:["reach_accuracy_threshold"],reward:{xp:10}},{key:"guided_practice",when:{kind:"event",eventName:"drill.session.completed"}}],xpReward:20,metadata:{surface:"drills"}},{id:"reach_accuracy_threshold",title:"Hit high accuracy in sessions",description:"Achieve three high-accuracy sessions to build confidence.",order:2,prerequisites:[{kind:"branch_selected",stepId:"complete_first_session",branchKey:"guided_practice"}],completion:{kind:"count",eventName:"drill.session.completed",atLeast:3,payloadFilter:{accuracyBucket:"high"}},xpReward:30,metadata:{metric:"accuracy",target:">=85%"}},{id:"unlock_new_skill",title:"Master core cards in first skill",description:"Reach mastery on at least five cards in the first skill to unlock the next one.",order:3,prerequisiteMode:"any",prerequisites:[{kind:"step_completed",stepId:"reach_accuracy_threshold"},{kind:"branch_selected",stepId:"complete_first_session",branchKey:"fast_track"}],completion:{kind:"mastery",eventName:"drill.card.mastered",minimumMastery:0.8,requiredCount:5,skillIdField:"skillId",masteryField:"mastery",payloadFilter:{skillId:"language_basics"}},xpReward:40,metadata:{surface:"srs",skill:"language_basics"}}]},s=[e];export{e as drillsLanguageBasicsTrack,s as drillTracks};
|
package/dist/track.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const drillsLanguageBasicsTrack:
|
|
3
|
-
export declare const drillTracks:
|
|
1
|
+
import type { JourneyTrackSpec } from '@contractspec/module.learning-journey/track-spec';
|
|
2
|
+
export declare const drillsLanguageBasicsTrack: JourneyTrackSpec;
|
|
3
|
+
export declare const drillTracks: JourneyTrackSpec[];
|
package/dist/track.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var e={id:"drills_language_basics",name:"Language Basics Drills",description:"Short SRS-driven drills to master a first skill, modeled after Duolingo-style sessions.",targetUserSegment:"learner",targetRole:"individual",totalXp:50,completionRewards:{
|
|
2
|
+
var e={id:"drills_language_basics",name:"Language Basics Drills",description:"Short SRS-driven drills to master a first skill, modeled after Duolingo-style sessions.",targetUserSegment:"learner",targetRole:"individual",totalXp:50,completionRewards:{xp:25},steps:[{id:"complete_first_session",title:"Complete first drill session",description:"Finish a drill session to get started.",order:1,completion:{kind:"event",eventName:"drill.session.completed"},branches:[{key:"fast_track",when:{kind:"event",eventName:"drill.session.completed",payloadFilter:{accuracyBucket:"high"}},blockStepIds:["reach_accuracy_threshold"],reward:{xp:10}},{key:"guided_practice",when:{kind:"event",eventName:"drill.session.completed"}}],xpReward:20,metadata:{surface:"drills"}},{id:"reach_accuracy_threshold",title:"Hit high accuracy in sessions",description:"Achieve three high-accuracy sessions to build confidence.",order:2,prerequisites:[{kind:"branch_selected",stepId:"complete_first_session",branchKey:"guided_practice"}],completion:{kind:"count",eventName:"drill.session.completed",atLeast:3,payloadFilter:{accuracyBucket:"high"}},xpReward:30,metadata:{metric:"accuracy",target:">=85%"}},{id:"unlock_new_skill",title:"Master core cards in first skill",description:"Reach mastery on at least five cards in the first skill to unlock the next one.",order:3,prerequisiteMode:"any",prerequisites:[{kind:"step_completed",stepId:"reach_accuracy_threshold"},{kind:"branch_selected",stepId:"complete_first_session",branchKey:"fast_track"}],completion:{kind:"mastery",eventName:"drill.card.mastered",minimumMastery:0.8,requiredCount:5,skillIdField:"skillId",masteryField:"mastery",payloadFilter:{skillId:"language_basics"}},xpReward:40,metadata:{surface:"srs",skill:"language_basics"}}]},s=[e];export{e as drillsLanguageBasicsTrack,s as drillTracks};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/example.learning-journey-duo-drills",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Drill-based learning journey example with SRS, XP, and streak hooks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
"typecheck": "tsc --noEmit"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@contractspec/module.learning-journey": "
|
|
68
|
-
"@contractspec/lib.contracts-spec": "5.
|
|
67
|
+
"@contractspec/module.learning-journey": "4.0.1",
|
|
68
|
+
"@contractspec/lib.contracts-spec": "5.5.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@contractspec/tool.typescript": "3.7.13",
|
|
72
72
|
"typescript": "^5.9.3",
|
|
73
|
-
"@contractspec/tool.bun": "3.7.
|
|
73
|
+
"@contractspec/tool.bun": "3.7.15"
|
|
74
74
|
},
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"exports": {
|
package/src/example.ts
CHANGED
|
@@ -1,31 +1,28 @@
|
|
|
1
|
-
import { defineExample } from '@contractspec/lib.contracts-spec';
|
|
1
|
+
import { defineExample } from '@contractspec/lib.contracts-spec/examples';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const ExamplesLearningJourneyDuoDrillsExample = defineExample({
|
|
4
4
|
meta: {
|
|
5
|
-
key: 'learning-journey-duo-drills',
|
|
5
|
+
key: 'examples.learning-journey-duo-drills',
|
|
6
6
|
version: '1.0.0',
|
|
7
|
-
title: 'Learning Journey
|
|
7
|
+
title: 'Learning Journey Duo Drills',
|
|
8
8
|
description:
|
|
9
|
-
'
|
|
9
|
+
'Drill-based learning journey example with SRS, XP, and streak hooks.',
|
|
10
10
|
kind: 'template',
|
|
11
|
-
visibility: '
|
|
11
|
+
visibility: 'experimental',
|
|
12
12
|
stability: 'experimental',
|
|
13
|
-
owners: ['@
|
|
14
|
-
tags: ['
|
|
13
|
+
owners: ['@contractspec-core'],
|
|
14
|
+
tags: ['package', 'examples', 'learning-journey-duo-drills'],
|
|
15
15
|
},
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
surfaces: {
|
|
17
|
+
templates: true,
|
|
18
|
+
sandbox: { enabled: true, modes: ['playground', 'specs'] },
|
|
19
|
+
studio: { enabled: false, installable: false },
|
|
20
|
+
mcp: { enabled: false },
|
|
18
21
|
},
|
|
19
22
|
entrypoints: {
|
|
20
23
|
packageName: '@contractspec/example.learning-journey-duo-drills',
|
|
21
|
-
docs: './docs',
|
|
22
|
-
},
|
|
23
|
-
surfaces: {
|
|
24
|
-
templates: true,
|
|
25
|
-
sandbox: { enabled: true, modes: ['playground', 'markdown'] },
|
|
26
|
-
studio: { enabled: true, installable: true },
|
|
27
|
-
mcp: { enabled: true },
|
|
28
24
|
},
|
|
29
25
|
});
|
|
30
26
|
|
|
31
|
-
export default
|
|
27
|
+
export default ExamplesLearningJourneyDuoDrillsExample;
|
|
28
|
+
export { ExamplesLearningJourneyDuoDrillsExample };
|
package/src/index.ts
CHANGED
package/src/track.test.ts
CHANGED
|
@@ -1,106 +1,37 @@
|
|
|
1
1
|
import { describe, expect, it } from 'bun:test';
|
|
2
|
-
|
|
2
|
+
import {
|
|
3
|
+
createJourneyProgressState,
|
|
4
|
+
projectJourneyProgress,
|
|
5
|
+
recordJourneyEvent,
|
|
6
|
+
} from '@contractspec/module.learning-journey/runtime';
|
|
3
7
|
import { drillsLanguageBasicsTrack } from './track';
|
|
4
8
|
|
|
5
|
-
interface TestEvent {
|
|
6
|
-
name: string;
|
|
7
|
-
payload?: Record<string, unknown>;
|
|
8
|
-
occurredAt?: Date;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const matchesFilter = (
|
|
12
|
-
filter: Record<string, unknown> | undefined,
|
|
13
|
-
payload: Record<string, unknown> | undefined
|
|
14
|
-
) => {
|
|
15
|
-
if (!filter) return true;
|
|
16
|
-
if (!payload) return false;
|
|
17
|
-
return Object.entries(filter).every(([key, value]) => payload[key] === value);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
interface StepState {
|
|
21
|
-
id: string;
|
|
22
|
-
status: 'PENDING' | 'COMPLETED';
|
|
23
|
-
occurrences: number;
|
|
24
|
-
masteryCount: number;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
9
|
describe('duo drills track', () => {
|
|
28
|
-
it('
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
10
|
+
it('supports both the fast-track branch and mastery completion', () => {
|
|
11
|
+
let state = createJourneyProgressState(drillsLanguageBasicsTrack);
|
|
12
|
+
state = recordJourneyEvent(drillsLanguageBasicsTrack, state, {
|
|
13
|
+
name: 'drill.session.completed',
|
|
14
|
+
payload: { accuracyBucket: 'high' },
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const afterDiagnostic = projectJourneyProgress(
|
|
18
|
+
drillsLanguageBasicsTrack,
|
|
19
|
+
state
|
|
20
|
+
);
|
|
21
|
+
expect(afterDiagnostic.blockedStepIds).toEqual([
|
|
22
|
+
'reach_accuracy_threshold',
|
|
23
|
+
]);
|
|
24
|
+
expect(afterDiagnostic.currentStepId).toBe('unlock_new_skill');
|
|
25
|
+
|
|
26
|
+
for (let index = 0; index < 5; index++) {
|
|
27
|
+
state = recordJourneyEvent(drillsLanguageBasicsTrack, state, {
|
|
43
28
|
name: 'drill.card.mastered',
|
|
44
29
|
payload: { skillId: 'language_basics', mastery: 0.9 },
|
|
45
|
-
})),
|
|
46
|
-
];
|
|
47
|
-
|
|
48
|
-
const progress: StepState[] =
|
|
49
|
-
drillsLanguageBasicsTrack.steps.map<StepState>((step) => ({
|
|
50
|
-
id: step.id,
|
|
51
|
-
status: 'PENDING',
|
|
52
|
-
occurrences: 0,
|
|
53
|
-
masteryCount: 0,
|
|
54
|
-
}));
|
|
55
|
-
|
|
56
|
-
events.forEach((event) => {
|
|
57
|
-
drillsLanguageBasicsTrack.steps.forEach((stepSpec, index) => {
|
|
58
|
-
const step = progress[index];
|
|
59
|
-
if (!step || step.status === 'COMPLETED') return;
|
|
60
|
-
const completion = stepSpec.completion;
|
|
61
|
-
if ((completion.kind ?? 'event') === 'event') {
|
|
62
|
-
if (completion.eventName !== event.name) return;
|
|
63
|
-
if (
|
|
64
|
-
matchesFilter(
|
|
65
|
-
completion.payloadFilter,
|
|
66
|
-
event.payload as Record<string, unknown> | undefined
|
|
67
|
-
)
|
|
68
|
-
) {
|
|
69
|
-
step.status = 'COMPLETED';
|
|
70
|
-
}
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
if (completion.kind === 'count') {
|
|
74
|
-
if (
|
|
75
|
-
completion.eventName === event.name &&
|
|
76
|
-
matchesFilter(
|
|
77
|
-
completion.payloadFilter,
|
|
78
|
-
event.payload as Record<string, unknown> | undefined
|
|
79
|
-
)
|
|
80
|
-
) {
|
|
81
|
-
step.occurrences = step.occurrences + 1;
|
|
82
|
-
if (step.occurrences >= completion.atLeast) {
|
|
83
|
-
step.status = 'COMPLETED';
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
if (completion.kind === 'srs_mastery') {
|
|
89
|
-
if (completion.eventName !== event.name) return;
|
|
90
|
-
if (!matchesFilter(completion.payloadFilter, event.payload)) return;
|
|
91
|
-
const masteryValue = (
|
|
92
|
-
event.payload as Record<string, unknown> | undefined
|
|
93
|
-
)?.[completion.masteryField ?? 'mastery'];
|
|
94
|
-
if (typeof masteryValue !== 'number') return;
|
|
95
|
-
if (masteryValue < completion.minimumMastery) return;
|
|
96
|
-
step.masteryCount = step.masteryCount + 1;
|
|
97
|
-
if (step.masteryCount >= (completion.requiredCount ?? 1)) {
|
|
98
|
-
step.status = 'COMPLETED';
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
30
|
});
|
|
102
|
-
}
|
|
31
|
+
}
|
|
103
32
|
|
|
104
|
-
expect(
|
|
33
|
+
expect(
|
|
34
|
+
projectJourneyProgress(drillsLanguageBasicsTrack, state).isCompleted
|
|
35
|
+
).toBeTrue();
|
|
105
36
|
});
|
|
106
37
|
});
|
package/src/track.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { JourneyTrackSpec } from '@contractspec/module.learning-journey/track-spec';
|
|
2
2
|
|
|
3
|
-
export const drillsLanguageBasicsTrack:
|
|
3
|
+
export const drillsLanguageBasicsTrack: JourneyTrackSpec = {
|
|
4
4
|
id: 'drills_language_basics',
|
|
5
5
|
name: 'Language Basics Drills',
|
|
6
6
|
description:
|
|
@@ -8,7 +8,7 @@ export const drillsLanguageBasicsTrack: LearningJourneyTrackSpec = {
|
|
|
8
8
|
targetUserSegment: 'learner',
|
|
9
9
|
targetRole: 'individual',
|
|
10
10
|
totalXp: 50,
|
|
11
|
-
completionRewards: {
|
|
11
|
+
completionRewards: { xp: 25 },
|
|
12
12
|
steps: [
|
|
13
13
|
{
|
|
14
14
|
id: 'complete_first_session',
|
|
@@ -19,6 +19,25 @@ export const drillsLanguageBasicsTrack: LearningJourneyTrackSpec = {
|
|
|
19
19
|
kind: 'event',
|
|
20
20
|
eventName: 'drill.session.completed',
|
|
21
21
|
},
|
|
22
|
+
branches: [
|
|
23
|
+
{
|
|
24
|
+
key: 'fast_track',
|
|
25
|
+
when: {
|
|
26
|
+
kind: 'event',
|
|
27
|
+
eventName: 'drill.session.completed',
|
|
28
|
+
payloadFilter: { accuracyBucket: 'high' },
|
|
29
|
+
},
|
|
30
|
+
blockStepIds: ['reach_accuracy_threshold'],
|
|
31
|
+
reward: { xp: 10 },
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
key: 'guided_practice',
|
|
35
|
+
when: {
|
|
36
|
+
kind: 'event',
|
|
37
|
+
eventName: 'drill.session.completed',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
],
|
|
22
41
|
xpReward: 20,
|
|
23
42
|
metadata: { surface: 'drills' },
|
|
24
43
|
},
|
|
@@ -27,6 +46,13 @@ export const drillsLanguageBasicsTrack: LearningJourneyTrackSpec = {
|
|
|
27
46
|
title: 'Hit high accuracy in sessions',
|
|
28
47
|
description: 'Achieve three high-accuracy sessions to build confidence.',
|
|
29
48
|
order: 2,
|
|
49
|
+
prerequisites: [
|
|
50
|
+
{
|
|
51
|
+
kind: 'branch_selected',
|
|
52
|
+
stepId: 'complete_first_session',
|
|
53
|
+
branchKey: 'guided_practice',
|
|
54
|
+
},
|
|
55
|
+
],
|
|
30
56
|
completion: {
|
|
31
57
|
kind: 'count',
|
|
32
58
|
eventName: 'drill.session.completed',
|
|
@@ -42,8 +68,20 @@ export const drillsLanguageBasicsTrack: LearningJourneyTrackSpec = {
|
|
|
42
68
|
description:
|
|
43
69
|
'Reach mastery on at least five cards in the first skill to unlock the next one.',
|
|
44
70
|
order: 3,
|
|
71
|
+
prerequisiteMode: 'any',
|
|
72
|
+
prerequisites: [
|
|
73
|
+
{
|
|
74
|
+
kind: 'step_completed',
|
|
75
|
+
stepId: 'reach_accuracy_threshold',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
kind: 'branch_selected',
|
|
79
|
+
stepId: 'complete_first_session',
|
|
80
|
+
branchKey: 'fast_track',
|
|
81
|
+
},
|
|
82
|
+
],
|
|
45
83
|
completion: {
|
|
46
|
-
kind: '
|
|
84
|
+
kind: 'mastery',
|
|
47
85
|
eventName: 'drill.card.mastered',
|
|
48
86
|
minimumMastery: 0.8,
|
|
49
87
|
requiredCount: 5,
|
|
@@ -57,6 +95,4 @@ export const drillsLanguageBasicsTrack: LearningJourneyTrackSpec = {
|
|
|
57
95
|
],
|
|
58
96
|
};
|
|
59
97
|
|
|
60
|
-
export const drillTracks:
|
|
61
|
-
drillsLanguageBasicsTrack,
|
|
62
|
-
];
|
|
98
|
+
export const drillTracks: JourneyTrackSpec[] = [drillsLanguageBasicsTrack];
|