@contractspec/example.learning-journey-duo-drills 3.7.17 → 3.7.19

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.
@@ -2,33 +2,33 @@ $ contractspec-bun-build prebuild
2
2
  $ bun run build:bundle && bun run build:types
3
3
  $ contractspec-bun-build transpile
4
4
  [contractspec-bun-build] transpile target=bun root=src entries=6 noBundle=false
5
- Bundled 6 modules in 11ms
5
+ Bundled 6 modules in 27ms
6
6
 
7
- docs/duo-drills.docblock.js 1.45 KB (entry point)
8
- ./index.js 4.78 KB (entry point)
9
- docs/index.js 1.45 KB (entry point)
10
- ./example.js 0.96 KB (entry point)
11
- ./learning-journey-duo-drills.feature.js 0.62 KB (entry point)
12
- ./track.js 1.80 KB (entry point)
7
+ docs/duo-drills.docblock.js 1.30 KB (entry point)
8
+ ./index.js 3.74 KB (entry point)
9
+ docs/index.js 1.30 KB (entry point)
10
+ ./example.js 0.73 KB (entry point)
11
+ ./learning-journey-duo-drills.feature.js 461 bytes (entry point)
12
+ ./track.js 1.30 KB (entry point)
13
13
 
14
14
  [contractspec-bun-build] transpile target=node root=src entries=6 noBundle=false
15
- Bundled 6 modules in 28ms
15
+ Bundled 6 modules in 31ms
16
16
 
17
- docs/duo-drills.docblock.js 1.43 KB (entry point)
18
- ./index.js 4.76 KB (entry point)
19
- docs/index.js 1.43 KB (entry point)
20
- ./example.js 0.95 KB (entry point)
21
- ./learning-journey-duo-drills.feature.js 0.61 KB (entry point)
22
- ./track.js 1.79 KB (entry point)
17
+ docs/duo-drills.docblock.js 1.28 KB (entry point)
18
+ ./index.js 3.72 KB (entry point)
19
+ docs/index.js 1.28 KB (entry point)
20
+ ./example.js 0.72 KB (entry point)
21
+ ./learning-journey-duo-drills.feature.js 453 bytes (entry point)
22
+ ./track.js 1.29 KB (entry point)
23
23
 
24
24
  [contractspec-bun-build] transpile target=browser root=src entries=6 noBundle=false
25
- Bundled 6 modules in 31ms
25
+ Bundled 6 modules in 23ms
26
26
 
27
- docs/duo-drills.docblock.js 1.43 KB (entry point)
28
- ./index.js 4.76 KB (entry point)
29
- docs/index.js 1.43 KB (entry point)
30
- ./example.js 0.95 KB (entry point)
31
- ./learning-journey-duo-drills.feature.js 0.61 KB (entry point)
32
- ./track.js 1.79 KB (entry point)
27
+ docs/duo-drills.docblock.js 1.28 KB (entry point)
28
+ ./index.js 3.72 KB (entry point)
29
+ docs/index.js 1.28 KB (entry point)
30
+ ./example.js 0.72 KB (entry point)
31
+ ./learning-journey-duo-drills.feature.js 453 bytes (entry point)
32
+ ./track.js 1.29 KB (entry point)
33
33
 
34
34
  $ contractspec-bun-build types
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @contractspec/example.learning-journey-duo-drills
2
2
 
3
+ ## 3.7.19
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies because of Expand ContractSpec authoring with preset-driven workspace setup, shell completion, packaged workspace schema artifacts, and richer form and UI surfaces across the CLI, editors, and shared runtimes.
8
+ - @contractspec/lib.contracts-spec@5.3.0
9
+ - @contractspec/module.learning-journey@3.7.18
10
+
11
+ ## 3.7.18
12
+
13
+ ### Patch Changes
14
+
15
+ - chore: auto-bump internal dependents
16
+ - Updated dependencies because of chore: auto-bump internal dependents
17
+ - Updated dependencies because of Introduce the Builder v3 control plane as a governed authoring layer over external execution providers.
18
+ - Updated dependencies because of Implement ContractSpec Connect as a first-class spec, runtime, and CLI workflow.
19
+ - @contractspec/module.learning-journey@3.7.17
20
+ - @contractspec/lib.contracts-spec@5.2.0
21
+
3
22
  ## 3.7.17
4
23
 
5
24
  ### Patch Changes
@@ -1,30 +1 @@
1
- // src/docs/duo-drills.docblock.ts
2
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
3
- var duoDrillsDocBlocks = [
4
- {
5
- id: "docs.learning-journey.duo-drills",
6
- title: "Learning Journey — Duo Drills",
7
- summary: "Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",
8
- kind: "reference",
9
- visibility: "public",
10
- route: "/docs/learning-journey/duo-drills",
11
- tags: ["learning", "drills", "srs", "xp"],
12
- body: `## Track
13
- - **Key**: \`drills_language_basics\`
14
- - **Persona**: learner running quick drills (language/finance/spec concepts)
15
- - **Goal**: complete first session, maintain high-accuracy sessions, master cards in the first skill
16
-
17
- ## Steps & Conditions
18
- 1) \`complete_first_session\` → event \`drill.session.completed\`
19
- 2) \`reach_accuracy_threshold\` → count 3 sessions with payload \`accuracyBucket: "high"\` (within default window)
20
- 3) \`unlock_new_skill\` → SRS mastery: \`drill.card.mastered\` events with \`mastery >= 0.8\`, count 5 cards
21
-
22
- XP: 20 + 30 + 40. Streak: daily session completion can be used to drive streak rewards.
23
-
24
- ## Wiring
25
- - Tracks export from \`@contractspec/example.learning-journey-duo-drills/track\`.
26
- - Use registry helper \`recordEvent\` to advance steps from drill/session events.
27
- - SRS mastery events should include payload: \`{ skillId, mastery }\`.`
28
- }
29
- ];
30
- registerDocBlocks(duoDrillsDocBlocks);
1
+ import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var h=[{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 }`.'}];f(h);
@@ -1,30 +1 @@
1
- // src/docs/duo-drills.docblock.ts
2
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
3
- var duoDrillsDocBlocks = [
4
- {
5
- id: "docs.learning-journey.duo-drills",
6
- title: "Learning Journey — Duo Drills",
7
- summary: "Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",
8
- kind: "reference",
9
- visibility: "public",
10
- route: "/docs/learning-journey/duo-drills",
11
- tags: ["learning", "drills", "srs", "xp"],
12
- body: `## Track
13
- - **Key**: \`drills_language_basics\`
14
- - **Persona**: learner running quick drills (language/finance/spec concepts)
15
- - **Goal**: complete first session, maintain high-accuracy sessions, master cards in the first skill
16
-
17
- ## Steps & Conditions
18
- 1) \`complete_first_session\` → event \`drill.session.completed\`
19
- 2) \`reach_accuracy_threshold\` → count 3 sessions with payload \`accuracyBucket: "high"\` (within default window)
20
- 3) \`unlock_new_skill\` → SRS mastery: \`drill.card.mastered\` events with \`mastery >= 0.8\`, count 5 cards
21
-
22
- XP: 20 + 30 + 40. Streak: daily session completion can be used to drive streak rewards.
23
-
24
- ## Wiring
25
- - Tracks export from \`@contractspec/example.learning-journey-duo-drills/track\`.
26
- - Use registry helper \`recordEvent\` to advance steps from drill/session events.
27
- - SRS mastery events should include payload: \`{ skillId, mastery }\`.`
28
- }
29
- ];
30
- registerDocBlocks(duoDrillsDocBlocks);
1
+ import{registerDocBlocks as m}from"@contractspec/lib.contracts-spec/docs";var f=[{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 }`.'}];m(f);
@@ -1,32 +1 @@
1
- // src/example.ts
2
- import { defineExample } from "@contractspec/lib.contracts-spec";
3
- var example = defineExample({
4
- meta: {
5
- key: "learning-journey-duo-drills",
6
- version: "1.0.0",
7
- title: "Learning Journey — Duo Drills",
8
- description: "Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",
9
- kind: "template",
10
- visibility: "public",
11
- stability: "experimental",
12
- owners: ["@platform.core"],
13
- tags: ["learning", "drills", "srs", "xp"]
14
- },
15
- docs: {
16
- rootDocId: "docs.learning-journey.duo-drills"
17
- },
18
- entrypoints: {
19
- packageName: "@contractspec/example.learning-journey-duo-drills",
20
- docs: "./docs"
21
- },
22
- surfaces: {
23
- templates: true,
24
- sandbox: { enabled: true, modes: ["playground", "markdown"] },
25
- studio: { enabled: true, installable: true },
26
- mcp: { enabled: true }
27
- }
28
- });
29
- var example_default = example;
30
- export {
31
- example_default as default
32
- };
1
+ import{defineExample as g}from"@contractspec/lib.contracts-spec";var h=g({meta:{key:"learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey — Duo Drills",description:"Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",kind:"template",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["learning","drills","srs","xp"]},docs:{rootDocId:"docs.learning-journey.duo-drills"},entrypoints:{packageName:"@contractspec/example.learning-journey-duo-drills",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","markdown"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),q=h;export{q as default};
@@ -1,140 +1 @@
1
- // src/docs/duo-drills.docblock.ts
2
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
3
- var duoDrillsDocBlocks = [
4
- {
5
- id: "docs.learning-journey.duo-drills",
6
- title: "Learning Journey — Duo Drills",
7
- summary: "Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",
8
- kind: "reference",
9
- visibility: "public",
10
- route: "/docs/learning-journey/duo-drills",
11
- tags: ["learning", "drills", "srs", "xp"],
12
- body: `## Track
13
- - **Key**: \`drills_language_basics\`
14
- - **Persona**: learner running quick drills (language/finance/spec concepts)
15
- - **Goal**: complete first session, maintain high-accuracy sessions, master cards in the first skill
16
-
17
- ## Steps & Conditions
18
- 1) \`complete_first_session\` → event \`drill.session.completed\`
19
- 2) \`reach_accuracy_threshold\` → count 3 sessions with payload \`accuracyBucket: "high"\` (within default window)
20
- 3) \`unlock_new_skill\` → SRS mastery: \`drill.card.mastered\` events with \`mastery >= 0.8\`, count 5 cards
21
-
22
- XP: 20 + 30 + 40. Streak: daily session completion can be used to drive streak rewards.
23
-
24
- ## Wiring
25
- - Tracks export from \`@contractspec/example.learning-journey-duo-drills/track\`.
26
- - Use registry helper \`recordEvent\` to advance steps from drill/session events.
27
- - SRS mastery events should include payload: \`{ skillId, mastery }\`.`
28
- }
29
- ];
30
- registerDocBlocks(duoDrillsDocBlocks);
31
- // src/example.ts
32
- import { defineExample } from "@contractspec/lib.contracts-spec";
33
- var example = defineExample({
34
- meta: {
35
- key: "learning-journey-duo-drills",
36
- version: "1.0.0",
37
- title: "Learning Journey — Duo Drills",
38
- description: "Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",
39
- kind: "template",
40
- visibility: "public",
41
- stability: "experimental",
42
- owners: ["@platform.core"],
43
- tags: ["learning", "drills", "srs", "xp"]
44
- },
45
- docs: {
46
- rootDocId: "docs.learning-journey.duo-drills"
47
- },
48
- entrypoints: {
49
- packageName: "@contractspec/example.learning-journey-duo-drills",
50
- docs: "./docs"
51
- },
52
- surfaces: {
53
- templates: true,
54
- sandbox: { enabled: true, modes: ["playground", "markdown"] },
55
- studio: { enabled: true, installable: true },
56
- mcp: { enabled: true }
57
- }
58
- });
59
- var example_default = example;
60
-
61
- // src/learning-journey-duo-drills.feature.ts
62
- import { defineFeature } from "@contractspec/lib.contracts-spec";
63
- var LearningJourneyDuoDrillsFeature = defineFeature({
64
- meta: {
65
- key: "learning-journey-duo-drills",
66
- version: "1.0.0",
67
- title: "Learning Journey: Duo Drills",
68
- description: "Drill-based learning with spaced repetition, XP, and streaks",
69
- domain: "learning-journey",
70
- owners: ["@examples"],
71
- tags: ["learning", "drills", "srs", "gamification"],
72
- stability: "experimental"
73
- },
74
- docs: ["docs.learning-journey.duo-drills"]
75
- });
76
-
77
- // src/track.ts
78
- var drillsLanguageBasicsTrack = {
79
- id: "drills_language_basics",
80
- name: "Language Basics Drills",
81
- description: "Short SRS-driven drills to master a first skill, modeled after Duolingo-style sessions.",
82
- targetUserSegment: "learner",
83
- targetRole: "individual",
84
- totalXp: 50,
85
- completionRewards: { xpBonus: 25 },
86
- steps: [
87
- {
88
- id: "complete_first_session",
89
- title: "Complete first drill session",
90
- description: "Finish a drill session to get started.",
91
- order: 1,
92
- completion: {
93
- kind: "event",
94
- eventName: "drill.session.completed"
95
- },
96
- xpReward: 20,
97
- metadata: { surface: "drills" }
98
- },
99
- {
100
- id: "reach_accuracy_threshold",
101
- title: "Hit high accuracy in sessions",
102
- description: "Achieve three high-accuracy sessions to build confidence.",
103
- order: 2,
104
- completion: {
105
- kind: "count",
106
- eventName: "drill.session.completed",
107
- atLeast: 3,
108
- payloadFilter: { accuracyBucket: "high" }
109
- },
110
- xpReward: 30,
111
- metadata: { metric: "accuracy", target: ">=85%" }
112
- },
113
- {
114
- id: "unlock_new_skill",
115
- title: "Master core cards in first skill",
116
- description: "Reach mastery on at least five cards in the first skill to unlock the next one.",
117
- order: 3,
118
- completion: {
119
- kind: "srs_mastery",
120
- eventName: "drill.card.mastered",
121
- minimumMastery: 0.8,
122
- requiredCount: 5,
123
- skillIdField: "skillId",
124
- masteryField: "mastery",
125
- payloadFilter: { skillId: "language_basics" }
126
- },
127
- xpReward: 40,
128
- metadata: { surface: "srs", skill: "language_basics" }
129
- }
130
- ]
131
- };
132
- var drillTracks = [
133
- drillsLanguageBasicsTrack
134
- ];
135
- export {
136
- example_default as example,
137
- drillsLanguageBasicsTrack,
138
- drillTracks,
139
- LearningJourneyDuoDrillsFeature
140
- };
1
+ import{registerDocBlocks as e}from"@contractspec/lib.contracts-spec/docs";var i=[{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(i);import{defineExample as s}from"@contractspec/lib.contracts-spec";var a=s({meta:{key:"learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey — Duo Drills",description:"Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",kind:"template",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["learning","drills","srs","xp"]},docs:{rootDocId:"docs.learning-journey.duo-drills"},entrypoints:{packageName:"@contractspec/example.learning-journey-duo-drills",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","markdown"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),r=a;import{defineFeature as t}from"@contractspec/lib.contracts-spec";var u=t({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 l={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:{xpBonus: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"},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,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,completion:{kind:"srs_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"}}]},g=[l];export{r as example,l as drillsLanguageBasicsTrack,g as drillTracks,u as LearningJourneyDuoDrillsFeature};
@@ -1,18 +1 @@
1
- // src/learning-journey-duo-drills.feature.ts
2
- import { defineFeature } from "@contractspec/lib.contracts-spec";
3
- var LearningJourneyDuoDrillsFeature = defineFeature({
4
- meta: {
5
- key: "learning-journey-duo-drills",
6
- version: "1.0.0",
7
- title: "Learning Journey: Duo Drills",
8
- description: "Drill-based learning with spaced repetition, XP, and streaks",
9
- domain: "learning-journey",
10
- owners: ["@examples"],
11
- tags: ["learning", "drills", "srs", "gamification"],
12
- stability: "experimental"
13
- },
14
- docs: ["docs.learning-journey.duo-drills"]
15
- });
16
- export {
17
- LearningJourneyDuoDrillsFeature
18
- };
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,62 +1 @@
1
- // src/track.ts
2
- var drillsLanguageBasicsTrack = {
3
- id: "drills_language_basics",
4
- name: "Language Basics Drills",
5
- description: "Short SRS-driven drills to master a first skill, modeled after Duolingo-style sessions.",
6
- targetUserSegment: "learner",
7
- targetRole: "individual",
8
- totalXp: 50,
9
- completionRewards: { xpBonus: 25 },
10
- steps: [
11
- {
12
- id: "complete_first_session",
13
- title: "Complete first drill session",
14
- description: "Finish a drill session to get started.",
15
- order: 1,
16
- completion: {
17
- kind: "event",
18
- eventName: "drill.session.completed"
19
- },
20
- xpReward: 20,
21
- metadata: { surface: "drills" }
22
- },
23
- {
24
- id: "reach_accuracy_threshold",
25
- title: "Hit high accuracy in sessions",
26
- description: "Achieve three high-accuracy sessions to build confidence.",
27
- order: 2,
28
- completion: {
29
- kind: "count",
30
- eventName: "drill.session.completed",
31
- atLeast: 3,
32
- payloadFilter: { accuracyBucket: "high" }
33
- },
34
- xpReward: 30,
35
- metadata: { metric: "accuracy", target: ">=85%" }
36
- },
37
- {
38
- id: "unlock_new_skill",
39
- title: "Master core cards in first skill",
40
- description: "Reach mastery on at least five cards in the first skill to unlock the next one.",
41
- order: 3,
42
- completion: {
43
- kind: "srs_mastery",
44
- eventName: "drill.card.mastered",
45
- minimumMastery: 0.8,
46
- requiredCount: 5,
47
- skillIdField: "skillId",
48
- masteryField: "mastery",
49
- payloadFilter: { skillId: "language_basics" }
50
- },
51
- xpReward: 40,
52
- metadata: { surface: "srs", skill: "language_basics" }
53
- }
54
- ]
55
- };
56
- var drillTracks = [
57
- drillsLanguageBasicsTrack
58
- ];
59
- export {
60
- drillsLanguageBasicsTrack,
61
- drillTracks
62
- };
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:{xpBonus: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"},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,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,completion:{kind:"srs_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};
@@ -1,31 +1,2 @@
1
1
  // @bun
2
- // src/docs/duo-drills.docblock.ts
3
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
4
- var duoDrillsDocBlocks = [
5
- {
6
- id: "docs.learning-journey.duo-drills",
7
- title: "Learning Journey \u2014 Duo Drills",
8
- summary: "Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",
9
- kind: "reference",
10
- visibility: "public",
11
- route: "/docs/learning-journey/duo-drills",
12
- tags: ["learning", "drills", "srs", "xp"],
13
- body: `## Track
14
- - **Key**: \`drills_language_basics\`
15
- - **Persona**: learner running quick drills (language/finance/spec concepts)
16
- - **Goal**: complete first session, maintain high-accuracy sessions, master cards in the first skill
17
-
18
- ## Steps & Conditions
19
- 1) \`complete_first_session\` \u2192 event \`drill.session.completed\`
20
- 2) \`reach_accuracy_threshold\` \u2192 count 3 sessions with payload \`accuracyBucket: "high"\` (within default window)
21
- 3) \`unlock_new_skill\` \u2192 SRS mastery: \`drill.card.mastered\` events with \`mastery >= 0.8\`, count 5 cards
22
-
23
- XP: 20 + 30 + 40. Streak: daily session completion can be used to drive streak rewards.
24
-
25
- ## Wiring
26
- - Tracks export from \`@contractspec/example.learning-journey-duo-drills/track\`.
27
- - Use registry helper \`recordEvent\` to advance steps from drill/session events.
28
- - SRS mastery events should include payload: \`{ skillId, mastery }\`.`
29
- }
30
- ];
31
- registerDocBlocks(duoDrillsDocBlocks);
2
+ import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var h=[{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 }`.'}];f(h);
@@ -1,31 +1,2 @@
1
1
  // @bun
2
- // src/docs/duo-drills.docblock.ts
3
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
4
- var duoDrillsDocBlocks = [
5
- {
6
- id: "docs.learning-journey.duo-drills",
7
- title: "Learning Journey \u2014 Duo Drills",
8
- summary: "Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",
9
- kind: "reference",
10
- visibility: "public",
11
- route: "/docs/learning-journey/duo-drills",
12
- tags: ["learning", "drills", "srs", "xp"],
13
- body: `## Track
14
- - **Key**: \`drills_language_basics\`
15
- - **Persona**: learner running quick drills (language/finance/spec concepts)
16
- - **Goal**: complete first session, maintain high-accuracy sessions, master cards in the first skill
17
-
18
- ## Steps & Conditions
19
- 1) \`complete_first_session\` \u2192 event \`drill.session.completed\`
20
- 2) \`reach_accuracy_threshold\` \u2192 count 3 sessions with payload \`accuracyBucket: "high"\` (within default window)
21
- 3) \`unlock_new_skill\` \u2192 SRS mastery: \`drill.card.mastered\` events with \`mastery >= 0.8\`, count 5 cards
22
-
23
- XP: 20 + 30 + 40. Streak: daily session completion can be used to drive streak rewards.
24
-
25
- ## Wiring
26
- - Tracks export from \`@contractspec/example.learning-journey-duo-drills/track\`.
27
- - Use registry helper \`recordEvent\` to advance steps from drill/session events.
28
- - SRS mastery events should include payload: \`{ skillId, mastery }\`.`
29
- }
30
- ];
31
- registerDocBlocks(duoDrillsDocBlocks);
2
+ import{registerDocBlocks as m}from"@contractspec/lib.contracts-spec/docs";var f=[{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 }`.'}];m(f);
package/dist/example.js CHANGED
@@ -1,33 +1,2 @@
1
1
  // @bun
2
- // src/example.ts
3
- import { defineExample } from "@contractspec/lib.contracts-spec";
4
- var example = defineExample({
5
- meta: {
6
- key: "learning-journey-duo-drills",
7
- version: "1.0.0",
8
- title: "Learning Journey \u2014 Duo Drills",
9
- description: "Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",
10
- kind: "template",
11
- visibility: "public",
12
- stability: "experimental",
13
- owners: ["@platform.core"],
14
- tags: ["learning", "drills", "srs", "xp"]
15
- },
16
- docs: {
17
- rootDocId: "docs.learning-journey.duo-drills"
18
- },
19
- entrypoints: {
20
- 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
- }
29
- });
30
- var example_default = example;
31
- export {
32
- example_default as default
33
- };
2
+ import{defineExample as g}from"@contractspec/lib.contracts-spec";var h=g({meta:{key:"learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey \u2014 Duo Drills",description:"Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",kind:"template",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["learning","drills","srs","xp"]},docs:{rootDocId:"docs.learning-journey.duo-drills"},entrypoints:{packageName:"@contractspec/example.learning-journey-duo-drills",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","markdown"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),q=h;export{q as default};
package/dist/index.js CHANGED
@@ -1,141 +1,2 @@
1
1
  // @bun
2
- // src/docs/duo-drills.docblock.ts
3
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
4
- var duoDrillsDocBlocks = [
5
- {
6
- id: "docs.learning-journey.duo-drills",
7
- title: "Learning Journey \u2014 Duo Drills",
8
- summary: "Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",
9
- kind: "reference",
10
- visibility: "public",
11
- route: "/docs/learning-journey/duo-drills",
12
- tags: ["learning", "drills", "srs", "xp"],
13
- body: `## Track
14
- - **Key**: \`drills_language_basics\`
15
- - **Persona**: learner running quick drills (language/finance/spec concepts)
16
- - **Goal**: complete first session, maintain high-accuracy sessions, master cards in the first skill
17
-
18
- ## Steps & Conditions
19
- 1) \`complete_first_session\` \u2192 event \`drill.session.completed\`
20
- 2) \`reach_accuracy_threshold\` \u2192 count 3 sessions with payload \`accuracyBucket: "high"\` (within default window)
21
- 3) \`unlock_new_skill\` \u2192 SRS mastery: \`drill.card.mastered\` events with \`mastery >= 0.8\`, count 5 cards
22
-
23
- XP: 20 + 30 + 40. Streak: daily session completion can be used to drive streak rewards.
24
-
25
- ## Wiring
26
- - Tracks export from \`@contractspec/example.learning-journey-duo-drills/track\`.
27
- - Use registry helper \`recordEvent\` to advance steps from drill/session events.
28
- - SRS mastery events should include payload: \`{ skillId, mastery }\`.`
29
- }
30
- ];
31
- registerDocBlocks(duoDrillsDocBlocks);
32
- // src/example.ts
33
- import { defineExample } from "@contractspec/lib.contracts-spec";
34
- var example = defineExample({
35
- meta: {
36
- key: "learning-journey-duo-drills",
37
- version: "1.0.0",
38
- title: "Learning Journey \u2014 Duo Drills",
39
- description: "Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",
40
- kind: "template",
41
- visibility: "public",
42
- stability: "experimental",
43
- owners: ["@platform.core"],
44
- tags: ["learning", "drills", "srs", "xp"]
45
- },
46
- docs: {
47
- rootDocId: "docs.learning-journey.duo-drills"
48
- },
49
- entrypoints: {
50
- packageName: "@contractspec/example.learning-journey-duo-drills",
51
- docs: "./docs"
52
- },
53
- surfaces: {
54
- templates: true,
55
- sandbox: { enabled: true, modes: ["playground", "markdown"] },
56
- studio: { enabled: true, installable: true },
57
- mcp: { enabled: true }
58
- }
59
- });
60
- var example_default = example;
61
-
62
- // src/learning-journey-duo-drills.feature.ts
63
- import { defineFeature } from "@contractspec/lib.contracts-spec";
64
- var LearningJourneyDuoDrillsFeature = defineFeature({
65
- meta: {
66
- key: "learning-journey-duo-drills",
67
- version: "1.0.0",
68
- title: "Learning Journey: Duo Drills",
69
- description: "Drill-based learning with spaced repetition, XP, and streaks",
70
- domain: "learning-journey",
71
- owners: ["@examples"],
72
- tags: ["learning", "drills", "srs", "gamification"],
73
- stability: "experimental"
74
- },
75
- docs: ["docs.learning-journey.duo-drills"]
76
- });
77
-
78
- // src/track.ts
79
- var drillsLanguageBasicsTrack = {
80
- id: "drills_language_basics",
81
- name: "Language Basics Drills",
82
- description: "Short SRS-driven drills to master a first skill, modeled after Duolingo-style sessions.",
83
- targetUserSegment: "learner",
84
- targetRole: "individual",
85
- totalXp: 50,
86
- completionRewards: { xpBonus: 25 },
87
- steps: [
88
- {
89
- id: "complete_first_session",
90
- title: "Complete first drill session",
91
- description: "Finish a drill session to get started.",
92
- order: 1,
93
- completion: {
94
- kind: "event",
95
- eventName: "drill.session.completed"
96
- },
97
- xpReward: 20,
98
- metadata: { surface: "drills" }
99
- },
100
- {
101
- id: "reach_accuracy_threshold",
102
- title: "Hit high accuracy in sessions",
103
- description: "Achieve three high-accuracy sessions to build confidence.",
104
- order: 2,
105
- completion: {
106
- kind: "count",
107
- eventName: "drill.session.completed",
108
- atLeast: 3,
109
- payloadFilter: { accuracyBucket: "high" }
110
- },
111
- xpReward: 30,
112
- metadata: { metric: "accuracy", target: ">=85%" }
113
- },
114
- {
115
- id: "unlock_new_skill",
116
- title: "Master core cards in first skill",
117
- description: "Reach mastery on at least five cards in the first skill to unlock the next one.",
118
- order: 3,
119
- completion: {
120
- kind: "srs_mastery",
121
- eventName: "drill.card.mastered",
122
- minimumMastery: 0.8,
123
- requiredCount: 5,
124
- skillIdField: "skillId",
125
- masteryField: "mastery",
126
- payloadFilter: { skillId: "language_basics" }
127
- },
128
- xpReward: 40,
129
- metadata: { surface: "srs", skill: "language_basics" }
130
- }
131
- ]
132
- };
133
- var drillTracks = [
134
- drillsLanguageBasicsTrack
135
- ];
136
- export {
137
- example_default as example,
138
- drillsLanguageBasicsTrack,
139
- drillTracks,
140
- LearningJourneyDuoDrillsFeature
141
- };
2
+ import{registerDocBlocks as e}from"@contractspec/lib.contracts-spec/docs";var i=[{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(i);import{defineExample as s}from"@contractspec/lib.contracts-spec";var a=s({meta:{key:"learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey \u2014 Duo Drills",description:"Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",kind:"template",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["learning","drills","srs","xp"]},docs:{rootDocId:"docs.learning-journey.duo-drills"},entrypoints:{packageName:"@contractspec/example.learning-journey-duo-drills",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","markdown"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),r=a;import{defineFeature as t}from"@contractspec/lib.contracts-spec";var u=t({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 l={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:{xpBonus: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"},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,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,completion:{kind:"srs_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"}}]},g=[l];export{r as example,l as drillsLanguageBasicsTrack,g as drillTracks,u as LearningJourneyDuoDrillsFeature};
@@ -1,19 +1,2 @@
1
1
  // @bun
2
- // src/learning-journey-duo-drills.feature.ts
3
- import { defineFeature } from "@contractspec/lib.contracts-spec";
4
- var LearningJourneyDuoDrillsFeature = defineFeature({
5
- meta: {
6
- key: "learning-journey-duo-drills",
7
- version: "1.0.0",
8
- title: "Learning Journey: Duo Drills",
9
- description: "Drill-based learning with spaced repetition, XP, and streaks",
10
- domain: "learning-journey",
11
- owners: ["@examples"],
12
- tags: ["learning", "drills", "srs", "gamification"],
13
- stability: "experimental"
14
- },
15
- docs: ["docs.learning-journey.duo-drills"]
16
- });
17
- export {
18
- LearningJourneyDuoDrillsFeature
19
- };
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};
@@ -1,30 +1 @@
1
- // src/docs/duo-drills.docblock.ts
2
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
3
- var duoDrillsDocBlocks = [
4
- {
5
- id: "docs.learning-journey.duo-drills",
6
- title: "Learning Journey — Duo Drills",
7
- summary: "Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",
8
- kind: "reference",
9
- visibility: "public",
10
- route: "/docs/learning-journey/duo-drills",
11
- tags: ["learning", "drills", "srs", "xp"],
12
- body: `## Track
13
- - **Key**: \`drills_language_basics\`
14
- - **Persona**: learner running quick drills (language/finance/spec concepts)
15
- - **Goal**: complete first session, maintain high-accuracy sessions, master cards in the first skill
16
-
17
- ## Steps & Conditions
18
- 1) \`complete_first_session\` → event \`drill.session.completed\`
19
- 2) \`reach_accuracy_threshold\` → count 3 sessions with payload \`accuracyBucket: "high"\` (within default window)
20
- 3) \`unlock_new_skill\` → SRS mastery: \`drill.card.mastered\` events with \`mastery >= 0.8\`, count 5 cards
21
-
22
- XP: 20 + 30 + 40. Streak: daily session completion can be used to drive streak rewards.
23
-
24
- ## Wiring
25
- - Tracks export from \`@contractspec/example.learning-journey-duo-drills/track\`.
26
- - Use registry helper \`recordEvent\` to advance steps from drill/session events.
27
- - SRS mastery events should include payload: \`{ skillId, mastery }\`.`
28
- }
29
- ];
30
- registerDocBlocks(duoDrillsDocBlocks);
1
+ import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var h=[{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 }`.'}];f(h);
@@ -1,30 +1 @@
1
- // src/docs/duo-drills.docblock.ts
2
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
3
- var duoDrillsDocBlocks = [
4
- {
5
- id: "docs.learning-journey.duo-drills",
6
- title: "Learning Journey — Duo Drills",
7
- summary: "Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",
8
- kind: "reference",
9
- visibility: "public",
10
- route: "/docs/learning-journey/duo-drills",
11
- tags: ["learning", "drills", "srs", "xp"],
12
- body: `## Track
13
- - **Key**: \`drills_language_basics\`
14
- - **Persona**: learner running quick drills (language/finance/spec concepts)
15
- - **Goal**: complete first session, maintain high-accuracy sessions, master cards in the first skill
16
-
17
- ## Steps & Conditions
18
- 1) \`complete_first_session\` → event \`drill.session.completed\`
19
- 2) \`reach_accuracy_threshold\` → count 3 sessions with payload \`accuracyBucket: "high"\` (within default window)
20
- 3) \`unlock_new_skill\` → SRS mastery: \`drill.card.mastered\` events with \`mastery >= 0.8\`, count 5 cards
21
-
22
- XP: 20 + 30 + 40. Streak: daily session completion can be used to drive streak rewards.
23
-
24
- ## Wiring
25
- - Tracks export from \`@contractspec/example.learning-journey-duo-drills/track\`.
26
- - Use registry helper \`recordEvent\` to advance steps from drill/session events.
27
- - SRS mastery events should include payload: \`{ skillId, mastery }\`.`
28
- }
29
- ];
30
- registerDocBlocks(duoDrillsDocBlocks);
1
+ import{registerDocBlocks as m}from"@contractspec/lib.contracts-spec/docs";var f=[{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 }`.'}];m(f);
@@ -1,32 +1 @@
1
- // src/example.ts
2
- import { defineExample } from "@contractspec/lib.contracts-spec";
3
- var example = defineExample({
4
- meta: {
5
- key: "learning-journey-duo-drills",
6
- version: "1.0.0",
7
- title: "Learning Journey — Duo Drills",
8
- description: "Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",
9
- kind: "template",
10
- visibility: "public",
11
- stability: "experimental",
12
- owners: ["@platform.core"],
13
- tags: ["learning", "drills", "srs", "xp"]
14
- },
15
- docs: {
16
- rootDocId: "docs.learning-journey.duo-drills"
17
- },
18
- entrypoints: {
19
- packageName: "@contractspec/example.learning-journey-duo-drills",
20
- docs: "./docs"
21
- },
22
- surfaces: {
23
- templates: true,
24
- sandbox: { enabled: true, modes: ["playground", "markdown"] },
25
- studio: { enabled: true, installable: true },
26
- mcp: { enabled: true }
27
- }
28
- });
29
- var example_default = example;
30
- export {
31
- example_default as default
32
- };
1
+ import{defineExample as g}from"@contractspec/lib.contracts-spec";var h=g({meta:{key:"learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey — Duo Drills",description:"Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",kind:"template",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["learning","drills","srs","xp"]},docs:{rootDocId:"docs.learning-journey.duo-drills"},entrypoints:{packageName:"@contractspec/example.learning-journey-duo-drills",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","markdown"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),q=h;export{q as default};
@@ -1,140 +1 @@
1
- // src/docs/duo-drills.docblock.ts
2
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
3
- var duoDrillsDocBlocks = [
4
- {
5
- id: "docs.learning-journey.duo-drills",
6
- title: "Learning Journey — Duo Drills",
7
- summary: "Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",
8
- kind: "reference",
9
- visibility: "public",
10
- route: "/docs/learning-journey/duo-drills",
11
- tags: ["learning", "drills", "srs", "xp"],
12
- body: `## Track
13
- - **Key**: \`drills_language_basics\`
14
- - **Persona**: learner running quick drills (language/finance/spec concepts)
15
- - **Goal**: complete first session, maintain high-accuracy sessions, master cards in the first skill
16
-
17
- ## Steps & Conditions
18
- 1) \`complete_first_session\` → event \`drill.session.completed\`
19
- 2) \`reach_accuracy_threshold\` → count 3 sessions with payload \`accuracyBucket: "high"\` (within default window)
20
- 3) \`unlock_new_skill\` → SRS mastery: \`drill.card.mastered\` events with \`mastery >= 0.8\`, count 5 cards
21
-
22
- XP: 20 + 30 + 40. Streak: daily session completion can be used to drive streak rewards.
23
-
24
- ## Wiring
25
- - Tracks export from \`@contractspec/example.learning-journey-duo-drills/track\`.
26
- - Use registry helper \`recordEvent\` to advance steps from drill/session events.
27
- - SRS mastery events should include payload: \`{ skillId, mastery }\`.`
28
- }
29
- ];
30
- registerDocBlocks(duoDrillsDocBlocks);
31
- // src/example.ts
32
- import { defineExample } from "@contractspec/lib.contracts-spec";
33
- var example = defineExample({
34
- meta: {
35
- key: "learning-journey-duo-drills",
36
- version: "1.0.0",
37
- title: "Learning Journey — Duo Drills",
38
- description: "Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",
39
- kind: "template",
40
- visibility: "public",
41
- stability: "experimental",
42
- owners: ["@platform.core"],
43
- tags: ["learning", "drills", "srs", "xp"]
44
- },
45
- docs: {
46
- rootDocId: "docs.learning-journey.duo-drills"
47
- },
48
- entrypoints: {
49
- packageName: "@contractspec/example.learning-journey-duo-drills",
50
- docs: "./docs"
51
- },
52
- surfaces: {
53
- templates: true,
54
- sandbox: { enabled: true, modes: ["playground", "markdown"] },
55
- studio: { enabled: true, installable: true },
56
- mcp: { enabled: true }
57
- }
58
- });
59
- var example_default = example;
60
-
61
- // src/learning-journey-duo-drills.feature.ts
62
- import { defineFeature } from "@contractspec/lib.contracts-spec";
63
- var LearningJourneyDuoDrillsFeature = defineFeature({
64
- meta: {
65
- key: "learning-journey-duo-drills",
66
- version: "1.0.0",
67
- title: "Learning Journey: Duo Drills",
68
- description: "Drill-based learning with spaced repetition, XP, and streaks",
69
- domain: "learning-journey",
70
- owners: ["@examples"],
71
- tags: ["learning", "drills", "srs", "gamification"],
72
- stability: "experimental"
73
- },
74
- docs: ["docs.learning-journey.duo-drills"]
75
- });
76
-
77
- // src/track.ts
78
- var drillsLanguageBasicsTrack = {
79
- id: "drills_language_basics",
80
- name: "Language Basics Drills",
81
- description: "Short SRS-driven drills to master a first skill, modeled after Duolingo-style sessions.",
82
- targetUserSegment: "learner",
83
- targetRole: "individual",
84
- totalXp: 50,
85
- completionRewards: { xpBonus: 25 },
86
- steps: [
87
- {
88
- id: "complete_first_session",
89
- title: "Complete first drill session",
90
- description: "Finish a drill session to get started.",
91
- order: 1,
92
- completion: {
93
- kind: "event",
94
- eventName: "drill.session.completed"
95
- },
96
- xpReward: 20,
97
- metadata: { surface: "drills" }
98
- },
99
- {
100
- id: "reach_accuracy_threshold",
101
- title: "Hit high accuracy in sessions",
102
- description: "Achieve three high-accuracy sessions to build confidence.",
103
- order: 2,
104
- completion: {
105
- kind: "count",
106
- eventName: "drill.session.completed",
107
- atLeast: 3,
108
- payloadFilter: { accuracyBucket: "high" }
109
- },
110
- xpReward: 30,
111
- metadata: { metric: "accuracy", target: ">=85%" }
112
- },
113
- {
114
- id: "unlock_new_skill",
115
- title: "Master core cards in first skill",
116
- description: "Reach mastery on at least five cards in the first skill to unlock the next one.",
117
- order: 3,
118
- completion: {
119
- kind: "srs_mastery",
120
- eventName: "drill.card.mastered",
121
- minimumMastery: 0.8,
122
- requiredCount: 5,
123
- skillIdField: "skillId",
124
- masteryField: "mastery",
125
- payloadFilter: { skillId: "language_basics" }
126
- },
127
- xpReward: 40,
128
- metadata: { surface: "srs", skill: "language_basics" }
129
- }
130
- ]
131
- };
132
- var drillTracks = [
133
- drillsLanguageBasicsTrack
134
- ];
135
- export {
136
- example_default as example,
137
- drillsLanguageBasicsTrack,
138
- drillTracks,
139
- LearningJourneyDuoDrillsFeature
140
- };
1
+ import{registerDocBlocks as e}from"@contractspec/lib.contracts-spec/docs";var i=[{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(i);import{defineExample as s}from"@contractspec/lib.contracts-spec";var a=s({meta:{key:"learning-journey-duo-drills",version:"1.0.0",title:"Learning Journey — Duo Drills",description:"Short drill/SRS example with XP and streak hooks for language, finance, or ContractSpec concept drills.",kind:"template",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["learning","drills","srs","xp"]},docs:{rootDocId:"docs.learning-journey.duo-drills"},entrypoints:{packageName:"@contractspec/example.learning-journey-duo-drills",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","markdown"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),r=a;import{defineFeature as t}from"@contractspec/lib.contracts-spec";var u=t({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 l={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:{xpBonus: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"},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,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,completion:{kind:"srs_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"}}]},g=[l];export{r as example,l as drillsLanguageBasicsTrack,g as drillTracks,u as LearningJourneyDuoDrillsFeature};
@@ -1,18 +1 @@
1
- // src/learning-journey-duo-drills.feature.ts
2
- import { defineFeature } from "@contractspec/lib.contracts-spec";
3
- var LearningJourneyDuoDrillsFeature = defineFeature({
4
- meta: {
5
- key: "learning-journey-duo-drills",
6
- version: "1.0.0",
7
- title: "Learning Journey: Duo Drills",
8
- description: "Drill-based learning with spaced repetition, XP, and streaks",
9
- domain: "learning-journey",
10
- owners: ["@examples"],
11
- tags: ["learning", "drills", "srs", "gamification"],
12
- stability: "experimental"
13
- },
14
- docs: ["docs.learning-journey.duo-drills"]
15
- });
16
- export {
17
- LearningJourneyDuoDrillsFeature
18
- };
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,62 +1 @@
1
- // src/track.ts
2
- var drillsLanguageBasicsTrack = {
3
- id: "drills_language_basics",
4
- name: "Language Basics Drills",
5
- description: "Short SRS-driven drills to master a first skill, modeled after Duolingo-style sessions.",
6
- targetUserSegment: "learner",
7
- targetRole: "individual",
8
- totalXp: 50,
9
- completionRewards: { xpBonus: 25 },
10
- steps: [
11
- {
12
- id: "complete_first_session",
13
- title: "Complete first drill session",
14
- description: "Finish a drill session to get started.",
15
- order: 1,
16
- completion: {
17
- kind: "event",
18
- eventName: "drill.session.completed"
19
- },
20
- xpReward: 20,
21
- metadata: { surface: "drills" }
22
- },
23
- {
24
- id: "reach_accuracy_threshold",
25
- title: "Hit high accuracy in sessions",
26
- description: "Achieve three high-accuracy sessions to build confidence.",
27
- order: 2,
28
- completion: {
29
- kind: "count",
30
- eventName: "drill.session.completed",
31
- atLeast: 3,
32
- payloadFilter: { accuracyBucket: "high" }
33
- },
34
- xpReward: 30,
35
- metadata: { metric: "accuracy", target: ">=85%" }
36
- },
37
- {
38
- id: "unlock_new_skill",
39
- title: "Master core cards in first skill",
40
- description: "Reach mastery on at least five cards in the first skill to unlock the next one.",
41
- order: 3,
42
- completion: {
43
- kind: "srs_mastery",
44
- eventName: "drill.card.mastered",
45
- minimumMastery: 0.8,
46
- requiredCount: 5,
47
- skillIdField: "skillId",
48
- masteryField: "mastery",
49
- payloadFilter: { skillId: "language_basics" }
50
- },
51
- xpReward: 40,
52
- metadata: { surface: "srs", skill: "language_basics" }
53
- }
54
- ]
55
- };
56
- var drillTracks = [
57
- drillsLanguageBasicsTrack
58
- ];
59
- export {
60
- drillsLanguageBasicsTrack,
61
- drillTracks
62
- };
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:{xpBonus: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"},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,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,completion:{kind:"srs_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.js CHANGED
@@ -1,63 +1,2 @@
1
1
  // @bun
2
- // src/track.ts
3
- var drillsLanguageBasicsTrack = {
4
- id: "drills_language_basics",
5
- name: "Language Basics Drills",
6
- description: "Short SRS-driven drills to master a first skill, modeled after Duolingo-style sessions.",
7
- targetUserSegment: "learner",
8
- targetRole: "individual",
9
- totalXp: 50,
10
- completionRewards: { xpBonus: 25 },
11
- steps: [
12
- {
13
- id: "complete_first_session",
14
- title: "Complete first drill session",
15
- description: "Finish a drill session to get started.",
16
- order: 1,
17
- completion: {
18
- kind: "event",
19
- eventName: "drill.session.completed"
20
- },
21
- xpReward: 20,
22
- metadata: { surface: "drills" }
23
- },
24
- {
25
- id: "reach_accuracy_threshold",
26
- title: "Hit high accuracy in sessions",
27
- description: "Achieve three high-accuracy sessions to build confidence.",
28
- order: 2,
29
- completion: {
30
- kind: "count",
31
- eventName: "drill.session.completed",
32
- atLeast: 3,
33
- payloadFilter: { accuracyBucket: "high" }
34
- },
35
- xpReward: 30,
36
- metadata: { metric: "accuracy", target: ">=85%" }
37
- },
38
- {
39
- id: "unlock_new_skill",
40
- title: "Master core cards in first skill",
41
- description: "Reach mastery on at least five cards in the first skill to unlock the next one.",
42
- order: 3,
43
- completion: {
44
- kind: "srs_mastery",
45
- eventName: "drill.card.mastered",
46
- minimumMastery: 0.8,
47
- requiredCount: 5,
48
- skillIdField: "skillId",
49
- masteryField: "mastery",
50
- payloadFilter: { skillId: "language_basics" }
51
- },
52
- xpReward: 40,
53
- metadata: { surface: "srs", skill: "language_basics" }
54
- }
55
- ]
56
- };
57
- var drillTracks = [
58
- drillsLanguageBasicsTrack
59
- ];
60
- export {
61
- drillsLanguageBasicsTrack,
62
- drillTracks
63
- };
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:{xpBonus: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"},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,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,completion:{kind:"srs_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.7.17",
3
+ "version": "3.7.19",
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",
@@ -57,20 +57,20 @@
57
57
  "dev": "contractspec-bun-build dev",
58
58
  "clean": "rimraf dist .turbo",
59
59
  "lint": "bun lint:fix",
60
- "lint:fix": "biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .",
61
- "lint:check": "biome check .",
60
+ "lint:fix": "node ../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../scripts/biome.cjs check --write .",
61
+ "lint:check": "node ../../../scripts/biome.cjs check .",
62
62
  "test": "bun test",
63
63
  "prebuild": "contractspec-bun-build prebuild",
64
64
  "typecheck": "tsc --noEmit"
65
65
  },
66
66
  "dependencies": {
67
- "@contractspec/module.learning-journey": "3.7.16",
68
- "@contractspec/lib.contracts-spec": "5.1.0"
67
+ "@contractspec/module.learning-journey": "3.7.18",
68
+ "@contractspec/lib.contracts-spec": "5.3.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.13"
73
+ "@contractspec/tool.bun": "3.7.14"
74
74
  },
75
75
  "publishConfig": {
76
76
  "exports": {