@contractspec/example.learning-patterns 1.46.2 → 1.48.0

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.
@@ -1,5 +1,5 @@
1
1
  $ tsdown
2
- ℹ tsdown v0.18.4 powered by rolldown v1.0.0-beta.57
2
+ ℹ tsdown v0.19.0 powered by rolldown v1.0.0-beta.59
3
3
  ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/learning-patterns/tsdown.config.js
4
4
  ℹ entry: src/events.ts, src/example.ts, src/index.ts, src/docs/index.ts, src/docs/learning-patterns.docblock.ts, src/tracks/ambient-coach.ts, src/tracks/drills.ts, src/tracks/index.ts, src/tracks/quests.ts
5
5
  ℹ target: esnext
@@ -10,30 +10,30 @@ $ tsdown
10
10
  ℹ dist/docs/learning-patterns.docblock.js 1.15 kB │ gzip: 0.57 kB
11
11
  ℹ dist/tracks/quests.js 1.11 kB │ gzip: 0.48 kB
12
12
  ℹ dist/tracks/ambient-coach.js 1.07 kB │ gzip: 0.48 kB
13
- ℹ dist/example.js 0.84 kB │ gzip: 0.46 kB
13
+ ℹ dist/example.js 0.92 kB │ gzip: 0.49 kB
14
14
  ℹ dist/events.js 0.53 kB │ gzip: 0.31 kB
15
15
  ℹ dist/index.js 0.50 kB │ gzip: 0.20 kB
16
16
  ℹ dist/tracks/index.js 0.29 kB │ gzip: 0.12 kB
17
17
  ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
18
- ℹ dist/tracks/drills.js.map 2.13 kB │ gzip: 0.85 kB
19
- ℹ dist/tracks/quests.js.map 1.96 kB │ gzip: 0.74 kB
20
- ℹ dist/tracks/ambient-coach.js.map 1.86 kB │ gzip: 0.74 kB
18
+ ℹ dist/tracks/drills.js.map 2.05 kB │ gzip: 0.84 kB
19
+ ℹ dist/tracks/quests.js.map 1.87 kB │ gzip: 0.73 kB
20
+ ℹ dist/tracks/ambient-coach.js.map 1.77 kB │ gzip: 0.73 kB
21
21
  ℹ dist/docs/learning-patterns.docblock.js.map 1.65 kB │ gzip: 0.74 kB
22
- ℹ dist/example.js.map 1.37 kB │ gzip: 0.68 kB
22
+ ℹ dist/example.js.map 1.35 kB │ gzip: 0.68 kB
23
23
  ℹ dist/events.js.map 0.82 kB │ gzip: 0.45 kB
24
24
  ℹ dist/events.d.ts.map 0.20 kB │ gzip: 0.16 kB
25
25
  ℹ dist/tracks/ambient-coach.d.ts.map 0.16 kB │ gzip: 0.14 kB
26
26
  ℹ dist/tracks/drills.d.ts.map 0.14 kB │ gzip: 0.13 kB
27
27
  ℹ dist/tracks/quests.d.ts.map 0.14 kB │ gzip: 0.13 kB
28
- ℹ dist/example.d.ts.map 0.12 kB │ gzip: 0.12 kB
28
+ ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
29
29
  ℹ dist/events.d.ts 0.73 kB │ gzip: 0.36 kB
30
30
  ℹ dist/index.d.ts 0.46 kB │ gzip: 0.19 kB
31
31
  ℹ dist/tracks/ambient-coach.d.ts 0.36 kB │ gzip: 0.20 kB
32
32
  ℹ dist/tracks/drills.d.ts 0.32 kB │ gzip: 0.19 kB
33
33
  ℹ dist/tracks/quests.d.ts 0.32 kB │ gzip: 0.19 kB
34
34
  ℹ dist/tracks/index.d.ts 0.29 kB │ gzip: 0.12 kB
35
- ℹ dist/example.d.ts 0.20 kB │ gzip: 0.16 kB
35
+ ℹ dist/example.d.ts 0.25 kB │ gzip: 0.17 kB
36
36
  ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
37
37
  ℹ dist/docs/learning-patterns.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
38
- ℹ 29 files, total: 20.01 kB
39
- ✔ Build complete in 17523ms
38
+ ℹ 29 files, total: 19.87 kB
39
+ ✔ Build complete in 19246ms
@@ -1,7 +1,7 @@
1
1
  $ bun build:types && bun build:bundle
2
2
  $ tsc --noEmit
3
3
  $ tsdown
4
- ℹ tsdown v0.18.4 powered by rolldown v1.0.0-beta.57
4
+ ℹ tsdown v0.19.0 powered by rolldown v1.0.0-beta.59
5
5
  ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/learning-patterns/tsdown.config.js
6
6
  ℹ entry: src/events.ts, src/example.ts, src/index.ts, src/docs/index.ts, src/docs/learning-patterns.docblock.ts, src/tracks/ambient-coach.ts, src/tracks/drills.ts, src/tracks/index.ts, src/tracks/quests.ts
7
7
  ℹ target: esnext
@@ -11,30 +11,30 @@ $ tsdown
11
11
  ℹ dist/docs/learning-patterns.docblock.js 1.15 kB │ gzip: 0.57 kB
12
12
  ℹ dist/tracks/quests.js 1.11 kB │ gzip: 0.48 kB
13
13
  ℹ dist/tracks/ambient-coach.js 1.07 kB │ gzip: 0.48 kB
14
- ℹ dist/example.js 0.84 kB │ gzip: 0.46 kB
14
+ ℹ dist/example.js 0.92 kB │ gzip: 0.49 kB
15
15
  ℹ dist/events.js 0.53 kB │ gzip: 0.31 kB
16
16
  ℹ dist/index.js 0.50 kB │ gzip: 0.20 kB
17
17
  ℹ dist/tracks/index.js 0.29 kB │ gzip: 0.12 kB
18
18
  ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
19
- ℹ dist/tracks/drills.js.map 2.13 kB │ gzip: 0.85 kB
20
- ℹ dist/tracks/quests.js.map 1.96 kB │ gzip: 0.74 kB
21
- ℹ dist/tracks/ambient-coach.js.map 1.86 kB │ gzip: 0.74 kB
19
+ ℹ dist/tracks/drills.js.map 2.05 kB │ gzip: 0.84 kB
20
+ ℹ dist/tracks/quests.js.map 1.87 kB │ gzip: 0.73 kB
21
+ ℹ dist/tracks/ambient-coach.js.map 1.77 kB │ gzip: 0.73 kB
22
22
  ℹ dist/docs/learning-patterns.docblock.js.map 1.65 kB │ gzip: 0.74 kB
23
- ℹ dist/example.js.map 1.37 kB │ gzip: 0.68 kB
23
+ ℹ dist/example.js.map 1.35 kB │ gzip: 0.68 kB
24
24
  ℹ dist/events.js.map 0.82 kB │ gzip: 0.45 kB
25
25
  ℹ dist/events.d.ts.map 0.20 kB │ gzip: 0.16 kB
26
26
  ℹ dist/tracks/ambient-coach.d.ts.map 0.16 kB │ gzip: 0.14 kB
27
27
  ℹ dist/tracks/drills.d.ts.map 0.14 kB │ gzip: 0.13 kB
28
28
  ℹ dist/tracks/quests.d.ts.map 0.14 kB │ gzip: 0.13 kB
29
- ℹ dist/example.d.ts.map 0.12 kB │ gzip: 0.12 kB
29
+ ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
30
30
  ℹ dist/events.d.ts 0.73 kB │ gzip: 0.36 kB
31
31
  ℹ dist/index.d.ts 0.46 kB │ gzip: 0.19 kB
32
32
  ℹ dist/tracks/ambient-coach.d.ts 0.36 kB │ gzip: 0.20 kB
33
33
  ℹ dist/tracks/drills.d.ts 0.32 kB │ gzip: 0.19 kB
34
34
  ℹ dist/tracks/quests.d.ts 0.32 kB │ gzip: 0.19 kB
35
35
  ℹ dist/tracks/index.d.ts 0.29 kB │ gzip: 0.12 kB
36
- ℹ dist/example.d.ts 0.20 kB │ gzip: 0.16 kB
36
+ ℹ dist/example.d.ts 0.25 kB │ gzip: 0.17 kB
37
37
  ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
38
38
  ℹ dist/docs/learning-patterns.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
39
- ℹ 29 files, total: 20.01 kB
40
- ✔ Build complete in 21036ms
39
+ ℹ 29 files, total: 19.87 kB
40
+ ✔ Build complete in 19882ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @contractspec/example.learning-patterns
2
2
 
3
+ ## 1.48.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b0444a4: feat: reduce adoption's friction by allowing generation of contracts from an analyse of the codebase
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [b0444a4]
12
+ - @contractspec/module.learning-journey@1.48.0
13
+ - @contractspec/lib.contracts@1.48.0
14
+
15
+ ## 1.47.0
16
+
17
+ ### Minor Changes
18
+
19
+ - caf8701: feat: add cli vibe command to run workflow
20
+ - c69b849: feat: add api web services (mcp & website)
21
+ - 42b8d78: feat: add cli `contractspec vibe` workflow to simplify usage
22
+ - fd38e85: feat: auto-fix contractspec issues
23
+
24
+ ### Patch Changes
25
+
26
+ - e7ded36: feat: improve stability (adding ts-morph)
27
+ - c231a8b: test: improve workspace stability
28
+ - Updated dependencies [e7ded36]
29
+ - Updated dependencies [caf8701]
30
+ - Updated dependencies [c69b849]
31
+ - Updated dependencies [c231a8b]
32
+ - Updated dependencies [42b8d78]
33
+ - Updated dependencies [fd38e85]
34
+ - @contractspec/module.learning-journey@1.47.0
35
+ - @contractspec/lib.contracts@1.47.0
36
+
3
37
  ## 1.46.2
4
38
 
5
39
  ### Patch Changes
package/dist/example.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { ExampleSpec } from "@contractspec/lib.contracts";
1
+ import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
2
 
3
3
  //#region src/example.d.ts
4
- declare const example: ExampleSpec;
4
+ declare const example: _contractspec_lib_contracts0.ExampleSpec;
5
5
  //#endregion
6
6
  export { example as default };
7
7
  //# sourceMappingURL=example.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,SAAS"}
1
+ {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,SA0BJ,4BAAA,CA1BW"}
package/dist/example.js CHANGED
@@ -1,5 +1,7 @@
1
+ import { defineExample } from "@contractspec/lib.contracts";
2
+
1
3
  //#region src/example.ts
2
- const example = {
4
+ const example = defineExample({
3
5
  meta: {
4
6
  key: "learning-patterns",
5
7
  version: "1.0.0",
@@ -32,7 +34,7 @@ const example = {
32
34
  },
33
35
  mcp: { enabled: true }
34
36
  }
35
- };
37
+ });
36
38
  var example_default = example;
37
39
 
38
40
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"example.js","names":["example: ExampleSpec"],"sources":["../src/example.ts"],"sourcesContent":["import type { ExampleSpec } from '@contractspec/lib.contracts';\n\nconst example: ExampleSpec = {\n meta: {\n key: 'learning-patterns',\n version: '1.0.0',\n title: 'Learning Patterns',\n description:\n 'Domain-agnostic learning archetypes implemented as Learning Journey tracks.',\n kind: 'library',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['learning', 'journey', 'patterns'],\n },\n docs: {\n rootDocId: 'docs.examples.learning-patterns',\n },\n entrypoints: {\n packageName: '@contractspec/example.learning-patterns',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: { enabled: true, modes: ['markdown', 'specs'] },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n};\n\nexport default example;\n"],"mappings":";AAEA,MAAMA,UAAuB;CAC3B,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAY;GAAW;GAAW;EAC1C;CACD,MAAM,EACJ,WAAW,mCACZ;CACD,aAAa;EACX,aAAa;EACb,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GAAE,SAAS;GAAM,OAAO,CAAC,YAAY,QAAQ;GAAE;EACxD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF;AAED,sBAAe"}
1
+ {"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["import { defineExample } from '@contractspec/lib.contracts';\n\nconst example = defineExample({\n meta: {\n key: 'learning-patterns',\n version: '1.0.0',\n title: 'Learning Patterns',\n description:\n 'Domain-agnostic learning archetypes implemented as Learning Journey tracks.',\n kind: 'library',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['learning', 'journey', 'patterns'],\n },\n docs: {\n rootDocId: 'docs.examples.learning-patterns',\n },\n entrypoints: {\n packageName: '@contractspec/example.learning-patterns',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: { enabled: true, modes: ['markdown', 'specs'] },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n});\n\nexport default example;\n"],"mappings":";;;AAEA,MAAM,UAAU,cAAc;CAC5B,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAY;GAAW;GAAW;EAC1C;CACD,MAAM,EACJ,WAAW,mCACZ;CACD,aAAa;EACX,aAAa;EACb,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GAAE,SAAS;GAAM,OAAO,CAAC,YAAY,QAAQ;GAAE;EACxD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF,CAAC;AAEF,sBAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"ambient-coach.js","names":["ambientCoachTrack: LearningJourneyTrackSpec","ambientCoachTracks: LearningJourneyTrackSpec[]"],"sources":["../../src/tracks/ambient-coach.ts"],"sourcesContent":["import type { LearningJourneyTrackSpec } from '@contractspec/module.learning-journey/track-spec';\nimport { LEARNING_EVENTS } from '../events';\n\nexport const ambientCoachTrack: LearningJourneyTrackSpec = {\n id: 'learning_patterns_ambient_coach_basics',\n name: 'Ambient Coach Basics',\n description: 'Contextual tips triggered by behavior events.',\n targetUserSegment: 'learner',\n targetRole: 'individual',\n totalXp: 30,\n steps: [\n {\n id: 'tip_shown',\n title: 'See a contextual tip',\n order: 1,\n completion: { kind: 'event', eventName: LEARNING_EVENTS.COACH_TIP_SHOWN },\n xpReward: 10,\n },\n {\n id: 'tip_acknowledged',\n title: 'Acknowledge a tip',\n order: 2,\n completion: {\n kind: 'event',\n eventName: LEARNING_EVENTS.COACH_TIP_ACKNOWLEDGED,\n },\n xpReward: 10,\n },\n {\n id: 'tip_action_taken',\n title: 'Take an action from a tip',\n order: 3,\n completion: {\n kind: 'event',\n eventName: LEARNING_EVENTS.COACH_TIP_ACTION_TAKEN,\n },\n xpReward: 10,\n },\n ],\n};\n\nexport const ambientCoachTracks: LearningJourneyTrackSpec[] = [\n ambientCoachTrack,\n];\n"],"mappings":";;;AAGA,MAAaA,oBAA8C;CACzD,IAAI;CACJ,MAAM;CACN,aAAa;CACb,mBAAmB;CACnB,YAAY;CACZ,SAAS;CACT,OAAO;EACL;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IAAE,MAAM;IAAS,WAAW,gBAAgB;IAAiB;GACzE,UAAU;GACX;EACD;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IACV,MAAM;IACN,WAAW,gBAAgB;IAC5B;GACD,UAAU;GACX;EACD;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IACV,MAAM;IACN,WAAW,gBAAgB;IAC5B;GACD,UAAU;GACX;EACF;CACF;AAED,MAAaC,qBAAiD,CAC5D,kBACD"}
1
+ {"version":3,"file":"ambient-coach.js","names":[],"sources":["../../src/tracks/ambient-coach.ts"],"sourcesContent":["import type { LearningJourneyTrackSpec } from '@contractspec/module.learning-journey/track-spec';\nimport { LEARNING_EVENTS } from '../events';\n\nexport const ambientCoachTrack: LearningJourneyTrackSpec = {\n id: 'learning_patterns_ambient_coach_basics',\n name: 'Ambient Coach Basics',\n description: 'Contextual tips triggered by behavior events.',\n targetUserSegment: 'learner',\n targetRole: 'individual',\n totalXp: 30,\n steps: [\n {\n id: 'tip_shown',\n title: 'See a contextual tip',\n order: 1,\n completion: { kind: 'event', eventName: LEARNING_EVENTS.COACH_TIP_SHOWN },\n xpReward: 10,\n },\n {\n id: 'tip_acknowledged',\n title: 'Acknowledge a tip',\n order: 2,\n completion: {\n kind: 'event',\n eventName: LEARNING_EVENTS.COACH_TIP_ACKNOWLEDGED,\n },\n xpReward: 10,\n },\n {\n id: 'tip_action_taken',\n title: 'Take an action from a tip',\n order: 3,\n completion: {\n kind: 'event',\n eventName: LEARNING_EVENTS.COACH_TIP_ACTION_TAKEN,\n },\n xpReward: 10,\n },\n ],\n};\n\nexport const ambientCoachTracks: LearningJourneyTrackSpec[] = [\n ambientCoachTrack,\n];\n"],"mappings":";;;AAGA,MAAa,oBAA8C;CACzD,IAAI;CACJ,MAAM;CACN,aAAa;CACb,mBAAmB;CACnB,YAAY;CACZ,SAAS;CACT,OAAO;EACL;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IAAE,MAAM;IAAS,WAAW,gBAAgB;IAAiB;GACzE,UAAU;GACX;EACD;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IACV,MAAM;IACN,WAAW,gBAAgB;IAC5B;GACD,UAAU;GACX;EACD;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IACV,MAAM;IACN,WAAW,gBAAgB;IAC5B;GACD,UAAU;GACX;EACF;CACF;AAED,MAAa,qBAAiD,CAC5D,kBACD"}
@@ -1 +1 @@
1
- {"version":3,"file":"drills.js","names":["drillsTrack: LearningJourneyTrackSpec","drillTracks: LearningJourneyTrackSpec[]"],"sources":["../../src/tracks/drills.ts"],"sourcesContent":["import type { LearningJourneyTrackSpec } from '@contractspec/module.learning-journey/track-spec';\nimport { LEARNING_EVENTS } from '../events';\n\nexport const drillsTrack: LearningJourneyTrackSpec = {\n id: 'learning_patterns_drills_basics',\n name: 'Drills Basics',\n description: 'Short drill sessions with an SRS-style mastery step.',\n targetUserSegment: 'learner',\n targetRole: 'individual',\n totalXp: 50,\n steps: [\n {\n id: 'complete_first_session',\n title: 'Complete your first session',\n order: 1,\n completion: {\n kind: 'event',\n eventName: LEARNING_EVENTS.DRILL_SESSION_COMPLETED,\n },\n xpReward: 10,\n },\n {\n id: 'hit_accuracy_threshold',\n title: 'Hit high accuracy 3 times',\n order: 2,\n completion: {\n kind: 'count',\n eventName: LEARNING_EVENTS.DRILL_SESSION_COMPLETED,\n atLeast: 3,\n payloadFilter: { accuracyBucket: 'high' },\n },\n xpReward: 20,\n },\n {\n id: 'master_cards',\n title: 'Master 5 cards',\n order: 3,\n completion: {\n kind: 'srs_mastery',\n eventName: LEARNING_EVENTS.DRILL_CARD_MASTERED,\n minimumMastery: 0.8,\n requiredCount: 5,\n skillIdField: 'skillId',\n masteryField: 'mastery',\n },\n xpReward: 20,\n },\n ],\n};\n\nexport const drillTracks: LearningJourneyTrackSpec[] = [drillsTrack];\n"],"mappings":";;;AAGA,MAAaA,cAAwC;CACnD,IAAI;CACJ,MAAM;CACN,aAAa;CACb,mBAAmB;CACnB,YAAY;CACZ,SAAS;CACT,OAAO;EACL;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IACV,MAAM;IACN,WAAW,gBAAgB;IAC5B;GACD,UAAU;GACX;EACD;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IACV,MAAM;IACN,WAAW,gBAAgB;IAC3B,SAAS;IACT,eAAe,EAAE,gBAAgB,QAAQ;IAC1C;GACD,UAAU;GACX;EACD;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IACV,MAAM;IACN,WAAW,gBAAgB;IAC3B,gBAAgB;IAChB,eAAe;IACf,cAAc;IACd,cAAc;IACf;GACD,UAAU;GACX;EACF;CACF;AAED,MAAaC,cAA0C,CAAC,YAAY"}
1
+ {"version":3,"file":"drills.js","names":[],"sources":["../../src/tracks/drills.ts"],"sourcesContent":["import type { LearningJourneyTrackSpec } from '@contractspec/module.learning-journey/track-spec';\nimport { LEARNING_EVENTS } from '../events';\n\nexport const drillsTrack: LearningJourneyTrackSpec = {\n id: 'learning_patterns_drills_basics',\n name: 'Drills Basics',\n description: 'Short drill sessions with an SRS-style mastery step.',\n targetUserSegment: 'learner',\n targetRole: 'individual',\n totalXp: 50,\n steps: [\n {\n id: 'complete_first_session',\n title: 'Complete your first session',\n order: 1,\n completion: {\n kind: 'event',\n eventName: LEARNING_EVENTS.DRILL_SESSION_COMPLETED,\n },\n xpReward: 10,\n },\n {\n id: 'hit_accuracy_threshold',\n title: 'Hit high accuracy 3 times',\n order: 2,\n completion: {\n kind: 'count',\n eventName: LEARNING_EVENTS.DRILL_SESSION_COMPLETED,\n atLeast: 3,\n payloadFilter: { accuracyBucket: 'high' },\n },\n xpReward: 20,\n },\n {\n id: 'master_cards',\n title: 'Master 5 cards',\n order: 3,\n completion: {\n kind: 'srs_mastery',\n eventName: LEARNING_EVENTS.DRILL_CARD_MASTERED,\n minimumMastery: 0.8,\n requiredCount: 5,\n skillIdField: 'skillId',\n masteryField: 'mastery',\n },\n xpReward: 20,\n },\n ],\n};\n\nexport const drillTracks: LearningJourneyTrackSpec[] = [drillsTrack];\n"],"mappings":";;;AAGA,MAAa,cAAwC;CACnD,IAAI;CACJ,MAAM;CACN,aAAa;CACb,mBAAmB;CACnB,YAAY;CACZ,SAAS;CACT,OAAO;EACL;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IACV,MAAM;IACN,WAAW,gBAAgB;IAC5B;GACD,UAAU;GACX;EACD;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IACV,MAAM;IACN,WAAW,gBAAgB;IAC3B,SAAS;IACT,eAAe,EAAE,gBAAgB,QAAQ;IAC1C;GACD,UAAU;GACX;EACD;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IACV,MAAM;IACN,WAAW,gBAAgB;IAC3B,gBAAgB;IAChB,eAAe;IACf,cAAc;IACd,cAAc;IACf;GACD,UAAU;GACX;EACF;CACF;AAED,MAAa,cAA0C,CAAC,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"quests.js","names":["questTrack: LearningJourneyTrackSpec","questTracks: LearningJourneyTrackSpec[]"],"sources":["../../src/tracks/quests.ts"],"sourcesContent":["import type { LearningJourneyTrackSpec } from '@contractspec/module.learning-journey/track-spec';\nimport { LEARNING_EVENTS } from '../events';\n\nexport const questTrack: LearningJourneyTrackSpec = {\n id: 'learning_patterns_quest_7day',\n name: 'Quest (7-day)',\n description: 'Time-bounded quest with day unlocks.',\n targetUserSegment: 'learner',\n targetRole: 'individual',\n totalXp: 70,\n steps: [\n {\n id: 'day1_start',\n title: 'Start the quest',\n order: 1,\n completion: { kind: 'event', eventName: LEARNING_EVENTS.QUEST_STARTED },\n xpReward: 10,\n },\n {\n id: 'day1_complete',\n title: 'Complete day 1 step',\n order: 2,\n completion: {\n kind: 'event',\n eventName: LEARNING_EVENTS.QUEST_STEP_COMPLETED,\n },\n availability: { unlockOnDay: 1, dueWithinHours: 48 },\n xpReward: 10,\n },\n {\n id: 'day2_complete',\n title: 'Complete day 2 step',\n order: 3,\n completion: {\n kind: 'event',\n eventName: LEARNING_EVENTS.QUEST_STEP_COMPLETED,\n },\n availability: { unlockOnDay: 2, dueWithinHours: 48 },\n xpReward: 10,\n },\n ],\n};\n\nexport const questTracks: LearningJourneyTrackSpec[] = [questTrack];\n"],"mappings":";;;AAGA,MAAaA,aAAuC;CAClD,IAAI;CACJ,MAAM;CACN,aAAa;CACb,mBAAmB;CACnB,YAAY;CACZ,SAAS;CACT,OAAO;EACL;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IAAE,MAAM;IAAS,WAAW,gBAAgB;IAAe;GACvE,UAAU;GACX;EACD;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IACV,MAAM;IACN,WAAW,gBAAgB;IAC5B;GACD,cAAc;IAAE,aAAa;IAAG,gBAAgB;IAAI;GACpD,UAAU;GACX;EACD;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IACV,MAAM;IACN,WAAW,gBAAgB;IAC5B;GACD,cAAc;IAAE,aAAa;IAAG,gBAAgB;IAAI;GACpD,UAAU;GACX;EACF;CACF;AAED,MAAaC,cAA0C,CAAC,WAAW"}
1
+ {"version":3,"file":"quests.js","names":[],"sources":["../../src/tracks/quests.ts"],"sourcesContent":["import type { LearningJourneyTrackSpec } from '@contractspec/module.learning-journey/track-spec';\nimport { LEARNING_EVENTS } from '../events';\n\nexport const questTrack: LearningJourneyTrackSpec = {\n id: 'learning_patterns_quest_7day',\n name: 'Quest (7-day)',\n description: 'Time-bounded quest with day unlocks.',\n targetUserSegment: 'learner',\n targetRole: 'individual',\n totalXp: 70,\n steps: [\n {\n id: 'day1_start',\n title: 'Start the quest',\n order: 1,\n completion: { kind: 'event', eventName: LEARNING_EVENTS.QUEST_STARTED },\n xpReward: 10,\n },\n {\n id: 'day1_complete',\n title: 'Complete day 1 step',\n order: 2,\n completion: {\n kind: 'event',\n eventName: LEARNING_EVENTS.QUEST_STEP_COMPLETED,\n },\n availability: { unlockOnDay: 1, dueWithinHours: 48 },\n xpReward: 10,\n },\n {\n id: 'day2_complete',\n title: 'Complete day 2 step',\n order: 3,\n completion: {\n kind: 'event',\n eventName: LEARNING_EVENTS.QUEST_STEP_COMPLETED,\n },\n availability: { unlockOnDay: 2, dueWithinHours: 48 },\n xpReward: 10,\n },\n ],\n};\n\nexport const questTracks: LearningJourneyTrackSpec[] = [questTrack];\n"],"mappings":";;;AAGA,MAAa,aAAuC;CAClD,IAAI;CACJ,MAAM;CACN,aAAa;CACb,mBAAmB;CACnB,YAAY;CACZ,SAAS;CACT,OAAO;EACL;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IAAE,MAAM;IAAS,WAAW,gBAAgB;IAAe;GACvE,UAAU;GACX;EACD;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IACV,MAAM;IACN,WAAW,gBAAgB;IAC5B;GACD,cAAc;IAAE,aAAa;IAAG,gBAAgB;IAAI;GACpD,UAAU;GACX;EACD;GACE,IAAI;GACJ,OAAO;GACP,OAAO;GACP,YAAY;IACV,MAAM;IACN,WAAW,gBAAgB;IAC5B;GACD,cAAc;IAAE,aAAa;IAAG,gBAAgB;IAAI;GACpD,UAAU;GACX;EACF;CACF;AAED,MAAa,cAA0C,CAAC,WAAW"}
package/package.json CHANGED
@@ -1,10 +1,8 @@
1
1
  {
2
2
  "name": "@contractspec/example.learning-patterns",
3
- "version": "1.46.2",
3
+ "version": "1.48.0",
4
4
  "description": "Example: drills + ambient coach + quests learning patterns, powered by Learning Journey (event-driven, deterministic).",
5
5
  "type": "module",
6
- "main": "./dist/index.js",
7
- "module": "./dist/index.js",
8
6
  "types": "./dist/index.d.ts",
9
7
  "exports": {
10
8
  ".": "./dist/index.js",
@@ -32,13 +30,13 @@
32
30
  "test": "bun test"
33
31
  },
34
32
  "dependencies": {
35
- "@contractspec/lib.contracts": "1.46.2",
36
- "@contractspec/module.learning-journey": "1.46.2"
33
+ "@contractspec/lib.contracts": "1.48.0",
34
+ "@contractspec/module.learning-journey": "1.48.0"
37
35
  },
38
36
  "devDependencies": {
39
- "@contractspec/tool.tsdown": "1.46.2",
40
- "@contractspec/tool.typescript": "1.46.2",
41
- "tsdown": "^0.18.3",
37
+ "@contractspec/tool.tsdown": "1.48.0",
38
+ "@contractspec/tool.typescript": "1.48.0",
39
+ "tsdown": "^0.19.0",
42
40
  "typescript": "^5.9.3"
43
41
  },
44
42
  "publishConfig": {
package/src/example.ts CHANGED
@@ -1,6 +1,6 @@
1
- import type { ExampleSpec } from '@contractspec/lib.contracts';
1
+ import { defineExample } from '@contractspec/lib.contracts';
2
2
 
3
- const example: ExampleSpec = {
3
+ const example = defineExample({
4
4
  meta: {
5
5
  key: 'learning-patterns',
6
6
  version: '1.0.0',
@@ -26,6 +26,6 @@ const example: ExampleSpec = {
26
26
  studio: { enabled: true, installable: true },
27
27
  mcp: { enabled: true },
28
28
  },
29
- };
29
+ });
30
30
 
31
31
  export default example;