@contractspec/example.learning-patterns 1.57.0 → 1.59.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.
- package/.turbo/turbo-build.log +43 -44
- package/.turbo/turbo-prebuild.log +1 -0
- package/CHANGELOG.md +25 -0
- package/dist/browser/docs/index.js +36 -0
- package/dist/browser/docs/learning-patterns.docblock.js +36 -0
- package/dist/browser/events.js +15 -0
- package/dist/browser/example.js +32 -0
- package/dist/browser/index.js +221 -0
- package/dist/browser/tracks/ambient-coach.js +58 -0
- package/dist/browser/tracks/drills.js +65 -0
- package/dist/browser/tracks/index.js +153 -0
- package/dist/browser/tracks/quests.js +58 -0
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +37 -1
- package/dist/docs/learning-patterns.docblock.d.ts +2 -1
- package/dist/docs/learning-patterns.docblock.d.ts.map +1 -0
- package/dist/docs/learning-patterns.docblock.js +35 -29
- package/dist/events.d.ts +11 -14
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +15 -15
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +31 -39
- package/dist/index.d.ts +10 -6
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +222 -9
- package/dist/learning-patterns.test.d.ts +2 -0
- package/dist/learning-patterns.test.d.ts.map +1 -0
- package/dist/node/docs/index.js +36 -0
- package/dist/node/docs/learning-patterns.docblock.js +36 -0
- package/dist/node/events.js +15 -0
- package/dist/node/example.js +32 -0
- package/dist/node/index.js +221 -0
- package/dist/node/tracks/ambient-coach.js +58 -0
- package/dist/node/tracks/drills.js +65 -0
- package/dist/node/tracks/index.js +153 -0
- package/dist/node/tracks/quests.js +58 -0
- package/dist/tracks/ambient-coach.d.ts +3 -7
- package/dist/tracks/ambient-coach.d.ts.map +1 -1
- package/dist/tracks/ambient-coach.js +57 -46
- package/dist/tracks/drills.d.ts +3 -7
- package/dist/tracks/drills.d.ts.map +1 -1
- package/dist/tracks/drills.js +64 -52
- package/dist/tracks/index.d.ts +4 -4
- package/dist/tracks/index.d.ts.map +1 -0
- package/dist/tracks/index.js +153 -4
- package/dist/tracks/quests.d.ts +3 -7
- package/dist/tracks/quests.d.ts.map +1 -1
- package/dist/tracks/quests.js +57 -54
- package/package.json +101 -32
- package/tsdown.config.js +1 -2
- package/.turbo/turbo-build$colon$bundle.log +0 -44
- package/dist/docs/learning-patterns.docblock.js.map +0 -1
- package/dist/events.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/tracks/ambient-coach.js.map +0 -1
- package/dist/tracks/drills.js.map +0 -1
- package/dist/tracks/quests.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,45 +1,44 @@
|
|
|
1
|
-
$ bun
|
|
2
|
-
$
|
|
3
|
-
$
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[34mℹ[39m target: [34mesnext[39m
|
|
8
|
-
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
9
|
-
[34mℹ[39m Build start
|
|
10
|
-
[34mℹ[39m [2mdist/[22m[1mtracks/drills.js[22m [2m1.21 kB[22m [2m│ gzip: 0.59 kB[22m
|
|
11
|
-
[34mℹ[39m [2mdist/[22m[1mdocs/learning-patterns.docblock.js[22m [2m1.15 kB[22m [2m│ gzip: 0.57 kB[22m
|
|
12
|
-
[34mℹ[39m [2mdist/[22m[1mtracks/quests.js[22m [2m1.11 kB[22m [2m│ gzip: 0.48 kB[22m
|
|
13
|
-
[34mℹ[39m [2mdist/[22m[1mtracks/ambient-coach.js[22m [2m1.07 kB[22m [2m│ gzip: 0.48 kB[22m
|
|
14
|
-
[34mℹ[39m [2mdist/[22m[1mexample.js[22m [2m0.88 kB[22m [2m│ gzip: 0.48 kB[22m
|
|
15
|
-
[34mℹ[39m [2mdist/[22m[1mevents.js[22m [2m0.53 kB[22m [2m│ gzip: 0.31 kB[22m
|
|
16
|
-
[34mℹ[39m [2mdist/[22m[1mindex.js[22m [2m0.47 kB[22m [2m│ gzip: 0.19 kB[22m
|
|
17
|
-
[34mℹ[39m [2mdist/[22m[1mtracks/index.js[22m [2m0.29 kB[22m [2m│ gzip: 0.12 kB[22m
|
|
18
|
-
[34mℹ[39m [2mdist/[22m[1mdocs/index.js[22m [2m0.04 kB[22m [2m│ gzip: 0.06 kB[22m
|
|
19
|
-
[34mℹ[39m [2mdist/[22mtracks/drills.js.map [2m2.05 kB[22m [2m│ gzip: 0.84 kB[22m
|
|
20
|
-
[34mℹ[39m [2mdist/[22mtracks/quests.js.map [2m1.87 kB[22m [2m│ gzip: 0.73 kB[22m
|
|
21
|
-
[34mℹ[39m [2mdist/[22mtracks/ambient-coach.js.map [2m1.77 kB[22m [2m│ gzip: 0.73 kB[22m
|
|
22
|
-
[34mℹ[39m [2mdist/[22mdocs/learning-patterns.docblock.js.map [2m1.65 kB[22m [2m│ gzip: 0.74 kB[22m
|
|
23
|
-
[34mℹ[39m [2mdist/[22mexample.js.map [2m1.34 kB[22m [2m│ gzip: 0.68 kB[22m
|
|
24
|
-
[34mℹ[39m [2mdist/[22mevents.js.map [2m0.82 kB[22m [2m│ gzip: 0.45 kB[22m
|
|
25
|
-
[34mℹ[39m [2mdist/[22mtracks/ambient-coach.d.ts.map [2m0.17 kB[22m [2m│ gzip: 0.14 kB[22m
|
|
26
|
-
[34mℹ[39m [2mdist/[22mtracks/drills.d.ts.map [2m0.15 kB[22m [2m│ gzip: 0.14 kB[22m
|
|
27
|
-
[34mℹ[39m [2mdist/[22mtracks/quests.d.ts.map [2m0.15 kB[22m [2m│ gzip: 0.14 kB[22m
|
|
28
|
-
[34mℹ[39m [2mdist/[22mevents.d.ts.map [2m0.15 kB[22m [2m│ gzip: 0.13 kB[22m
|
|
29
|
-
[34mℹ[39m [2mdist/[22mexample.d.ts.map [2m0.13 kB[22m [2m│ gzip: 0.13 kB[22m
|
|
30
|
-
[34mℹ[39m [2mdist/[22m[32m[1mevents.d.ts[22m[39m [2m0.73 kB[22m [2m│ gzip: 0.36 kB[22m
|
|
31
|
-
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.ts[22m[39m [2m0.46 kB[22m [2m│ gzip: 0.19 kB[22m
|
|
32
|
-
[34mℹ[39m [2mdist/[22m[32m[1mtracks/ambient-coach.d.ts[22m[39m [2m0.36 kB[22m [2m│ gzip: 0.20 kB[22m
|
|
33
|
-
[34mℹ[39m [2mdist/[22m[32m[1mtracks/drills.d.ts[22m[39m [2m0.32 kB[22m [2m│ gzip: 0.19 kB[22m
|
|
34
|
-
[34mℹ[39m [2mdist/[22m[32m[1mtracks/quests.d.ts[22m[39m [2m0.32 kB[22m [2m│ gzip: 0.19 kB[22m
|
|
35
|
-
[34mℹ[39m [2mdist/[22m[32m[1mtracks/index.d.ts[22m[39m [2m0.29 kB[22m [2m│ gzip: 0.12 kB[22m
|
|
36
|
-
[34mℹ[39m [2mdist/[22m[32m[1mexample.d.ts[22m[39m [2m0.25 kB[22m [2m│ gzip: 0.17 kB[22m
|
|
37
|
-
[34mℹ[39m [2mdist/[22m[32m[1mdocs/index.d.ts[22m[39m [2m0.01 kB[22m [2m│ gzip: 0.03 kB[22m
|
|
38
|
-
[34mℹ[39m [2mdist/[22m[32m[1mdocs/learning-patterns.docblock.d.ts[22m[39m [2m0.01 kB[22m [2m│ gzip: 0.03 kB[22m
|
|
39
|
-
[34mℹ[39m 29 files, total: 19.75 kB
|
|
40
|
-
[32m✔[39m Build complete in [32m20436ms[39m
|
|
41
|
-
[33m[PLUGIN_TIMINGS] Warning:[0m Your build spent significant time in plugins. Here is a breakdown:
|
|
42
|
-
- rolldown-plugin-dts:generate (60%)
|
|
43
|
-
- tsdown:external (38%)
|
|
44
|
-
See https://rolldown.rs/options/checks#plugintimings for more details.
|
|
1
|
+
$ contractspec-bun-build prebuild
|
|
2
|
+
$ bun run prebuild && bun run build:bundle && bun run build:types
|
|
3
|
+
$ contractspec-bun-build prebuild
|
|
4
|
+
$ contractspec-bun-build transpile
|
|
5
|
+
[contractspec-bun-build] transpile target=bun root=src entries=9
|
|
6
|
+
Bundled 9 modules in 42ms
|
|
45
7
|
|
|
8
|
+
docs/index.js 1.15 KB (entry point)
|
|
9
|
+
./index.js 5.81 KB (entry point)
|
|
10
|
+
docs/learning-patterns.docblock.js 1.15 KB (entry point)
|
|
11
|
+
./example.js 0.89 KB (entry point)
|
|
12
|
+
tracks/index.js 3.78 KB (entry point)
|
|
13
|
+
tracks/quests.js 1.53 KB (entry point)
|
|
14
|
+
tracks/ambient-coach.js 1.51 KB (entry point)
|
|
15
|
+
tracks/drills.js 1.70 KB (entry point)
|
|
16
|
+
./events.js 496 bytes (entry point)
|
|
17
|
+
|
|
18
|
+
[contractspec-bun-build] transpile target=node root=src entries=9
|
|
19
|
+
Bundled 9 modules in 39ms
|
|
20
|
+
|
|
21
|
+
docs/index.js 1.13 KB (entry point)
|
|
22
|
+
./index.js 5.80 KB (entry point)
|
|
23
|
+
docs/learning-patterns.docblock.js 1.13 KB (entry point)
|
|
24
|
+
./example.js 0.88 KB (entry point)
|
|
25
|
+
tracks/index.js 3.78 KB (entry point)
|
|
26
|
+
tracks/quests.js 1.53 KB (entry point)
|
|
27
|
+
tracks/ambient-coach.js 1.50 KB (entry point)
|
|
28
|
+
tracks/drills.js 1.69 KB (entry point)
|
|
29
|
+
./events.js 488 bytes (entry point)
|
|
30
|
+
|
|
31
|
+
[contractspec-bun-build] transpile target=browser root=src entries=9
|
|
32
|
+
Bundled 9 modules in 30ms
|
|
33
|
+
|
|
34
|
+
docs/index.js 1.13 KB (entry point)
|
|
35
|
+
./index.js 5.80 KB (entry point)
|
|
36
|
+
docs/learning-patterns.docblock.js 1.13 KB (entry point)
|
|
37
|
+
./example.js 0.88 KB (entry point)
|
|
38
|
+
tracks/index.js 3.78 KB (entry point)
|
|
39
|
+
tracks/quests.js 1.53 KB (entry point)
|
|
40
|
+
tracks/ambient-coach.js 1.50 KB (entry point)
|
|
41
|
+
tracks/drills.js 1.69 KB (entry point)
|
|
42
|
+
./events.js 488 bytes (entry point)
|
|
43
|
+
|
|
44
|
+
$ contractspec-bun-build types
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$ contractspec-bun-build prebuild
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @contractspec/example.learning-patterns
|
|
2
2
|
|
|
3
|
+
## 1.59.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1a0cf44: fix: publishConfig not supported by bun
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [1a0cf44]
|
|
12
|
+
- @contractspec/module.learning-journey@1.59.0
|
|
13
|
+
- @contractspec/lib.contracts@1.59.0
|
|
14
|
+
|
|
15
|
+
## 1.58.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- d1f0fd0: chore: Migrate non-app package builds from tsdown to shared Bun tooling, add `@contractspec/tool.bun`, and standardize `prebuild`/`build`/`typecheck` with platform-aware exports and `tsc` declaration emission into `dist`.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [d1f0fd0]
|
|
24
|
+
- Updated dependencies [4355a9e]
|
|
25
|
+
- @contractspec/module.learning-journey@1.58.0
|
|
26
|
+
- @contractspec/lib.contracts@1.58.0
|
|
27
|
+
|
|
3
28
|
## 1.57.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// src/docs/learning-patterns.docblock.ts
|
|
2
|
+
import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
|
|
3
|
+
var docBlocks = [
|
|
4
|
+
{
|
|
5
|
+
id: "docs.examples.learning-patterns.goal",
|
|
6
|
+
title: "Learning Patterns — Goal",
|
|
7
|
+
summary: "Domain-agnostic drills, ambient coaching, and quests built on Learning Journey.",
|
|
8
|
+
kind: "goal",
|
|
9
|
+
visibility: "public",
|
|
10
|
+
route: "/docs/examples/learning-patterns/goal",
|
|
11
|
+
tags: ["learning", "drills", "quests", "coaching"],
|
|
12
|
+
body: `## Why it matters
|
|
13
|
+
- Demonstrates multiple learning archetypes without vertical coupling.
|
|
14
|
+
- Progress is event-driven (no client-side hacks).
|
|
15
|
+
- SRS logic is deterministic and testable.`
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "docs.examples.learning-patterns.reference",
|
|
19
|
+
title: "Learning Patterns — Reference",
|
|
20
|
+
summary: "Track specs and event names exported by the learning patterns example.",
|
|
21
|
+
kind: "reference",
|
|
22
|
+
visibility: "public",
|
|
23
|
+
route: "/docs/examples/learning-patterns",
|
|
24
|
+
tags: ["learning", "reference"],
|
|
25
|
+
body: `## Tracks
|
|
26
|
+
- Drills + SRS
|
|
27
|
+
- Ambient Coach
|
|
28
|
+
- Quests
|
|
29
|
+
|
|
30
|
+
## Events
|
|
31
|
+
- drill.*
|
|
32
|
+
- coach.*
|
|
33
|
+
- quest.*`
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
registerDocBlocks(docBlocks);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// src/docs/learning-patterns.docblock.ts
|
|
2
|
+
import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
|
|
3
|
+
var docBlocks = [
|
|
4
|
+
{
|
|
5
|
+
id: "docs.examples.learning-patterns.goal",
|
|
6
|
+
title: "Learning Patterns — Goal",
|
|
7
|
+
summary: "Domain-agnostic drills, ambient coaching, and quests built on Learning Journey.",
|
|
8
|
+
kind: "goal",
|
|
9
|
+
visibility: "public",
|
|
10
|
+
route: "/docs/examples/learning-patterns/goal",
|
|
11
|
+
tags: ["learning", "drills", "quests", "coaching"],
|
|
12
|
+
body: `## Why it matters
|
|
13
|
+
- Demonstrates multiple learning archetypes without vertical coupling.
|
|
14
|
+
- Progress is event-driven (no client-side hacks).
|
|
15
|
+
- SRS logic is deterministic and testable.`
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "docs.examples.learning-patterns.reference",
|
|
19
|
+
title: "Learning Patterns — Reference",
|
|
20
|
+
summary: "Track specs and event names exported by the learning patterns example.",
|
|
21
|
+
kind: "reference",
|
|
22
|
+
visibility: "public",
|
|
23
|
+
route: "/docs/examples/learning-patterns",
|
|
24
|
+
tags: ["learning", "reference"],
|
|
25
|
+
body: `## Tracks
|
|
26
|
+
- Drills + SRS
|
|
27
|
+
- Ambient Coach
|
|
28
|
+
- Quests
|
|
29
|
+
|
|
30
|
+
## Events
|
|
31
|
+
- drill.*
|
|
32
|
+
- coach.*
|
|
33
|
+
- quest.*`
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
registerDocBlocks(docBlocks);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/events.ts
|
|
2
|
+
var LEARNING_EVENTS = {
|
|
3
|
+
DRILL_CARD_ANSWERED: "drill.card.answered",
|
|
4
|
+
DRILL_SESSION_COMPLETED: "drill.session.completed",
|
|
5
|
+
DRILL_CARD_MASTERED: "drill.card.mastered",
|
|
6
|
+
COACH_TIP_TRIGGERED: "coach.tip.triggered",
|
|
7
|
+
COACH_TIP_SHOWN: "coach.tip.shown",
|
|
8
|
+
COACH_TIP_ACKNOWLEDGED: "coach.tip.acknowledged",
|
|
9
|
+
COACH_TIP_ACTION_TAKEN: "coach.tip.actionTaken",
|
|
10
|
+
QUEST_STARTED: "quest.started",
|
|
11
|
+
QUEST_STEP_COMPLETED: "quest.step.completed"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
LEARNING_EVENTS
|
|
15
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// src/example.ts
|
|
2
|
+
import { defineExample } from "@contractspec/lib.contracts";
|
|
3
|
+
var example = defineExample({
|
|
4
|
+
meta: {
|
|
5
|
+
key: "learning-patterns",
|
|
6
|
+
version: "1.0.0",
|
|
7
|
+
title: "Learning Patterns",
|
|
8
|
+
description: "Domain-agnostic learning archetypes implemented as Learning Journey tracks.",
|
|
9
|
+
kind: "library",
|
|
10
|
+
visibility: "public",
|
|
11
|
+
stability: "experimental",
|
|
12
|
+
owners: ["@platform.core"],
|
|
13
|
+
tags: ["learning", "journey", "patterns"]
|
|
14
|
+
},
|
|
15
|
+
docs: {
|
|
16
|
+
rootDocId: "docs.examples.learning-patterns"
|
|
17
|
+
},
|
|
18
|
+
entrypoints: {
|
|
19
|
+
packageName: "@contractspec/example.learning-patterns",
|
|
20
|
+
docs: "./docs"
|
|
21
|
+
},
|
|
22
|
+
surfaces: {
|
|
23
|
+
templates: true,
|
|
24
|
+
sandbox: { enabled: true, modes: ["markdown", "specs"] },
|
|
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
|
+
};
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
// src/docs/learning-patterns.docblock.ts
|
|
2
|
+
import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
|
|
3
|
+
var docBlocks = [
|
|
4
|
+
{
|
|
5
|
+
id: "docs.examples.learning-patterns.goal",
|
|
6
|
+
title: "Learning Patterns — Goal",
|
|
7
|
+
summary: "Domain-agnostic drills, ambient coaching, and quests built on Learning Journey.",
|
|
8
|
+
kind: "goal",
|
|
9
|
+
visibility: "public",
|
|
10
|
+
route: "/docs/examples/learning-patterns/goal",
|
|
11
|
+
tags: ["learning", "drills", "quests", "coaching"],
|
|
12
|
+
body: `## Why it matters
|
|
13
|
+
- Demonstrates multiple learning archetypes without vertical coupling.
|
|
14
|
+
- Progress is event-driven (no client-side hacks).
|
|
15
|
+
- SRS logic is deterministic and testable.`
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "docs.examples.learning-patterns.reference",
|
|
19
|
+
title: "Learning Patterns — Reference",
|
|
20
|
+
summary: "Track specs and event names exported by the learning patterns example.",
|
|
21
|
+
kind: "reference",
|
|
22
|
+
visibility: "public",
|
|
23
|
+
route: "/docs/examples/learning-patterns",
|
|
24
|
+
tags: ["learning", "reference"],
|
|
25
|
+
body: `## Tracks
|
|
26
|
+
- Drills + SRS
|
|
27
|
+
- Ambient Coach
|
|
28
|
+
- Quests
|
|
29
|
+
|
|
30
|
+
## Events
|
|
31
|
+
- drill.*
|
|
32
|
+
- coach.*
|
|
33
|
+
- quest.*`
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
registerDocBlocks(docBlocks);
|
|
37
|
+
// src/events.ts
|
|
38
|
+
var LEARNING_EVENTS = {
|
|
39
|
+
DRILL_CARD_ANSWERED: "drill.card.answered",
|
|
40
|
+
DRILL_SESSION_COMPLETED: "drill.session.completed",
|
|
41
|
+
DRILL_CARD_MASTERED: "drill.card.mastered",
|
|
42
|
+
COACH_TIP_TRIGGERED: "coach.tip.triggered",
|
|
43
|
+
COACH_TIP_SHOWN: "coach.tip.shown",
|
|
44
|
+
COACH_TIP_ACKNOWLEDGED: "coach.tip.acknowledged",
|
|
45
|
+
COACH_TIP_ACTION_TAKEN: "coach.tip.actionTaken",
|
|
46
|
+
QUEST_STARTED: "quest.started",
|
|
47
|
+
QUEST_STEP_COMPLETED: "quest.step.completed"
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// src/example.ts
|
|
51
|
+
import { defineExample } from "@contractspec/lib.contracts";
|
|
52
|
+
var example = defineExample({
|
|
53
|
+
meta: {
|
|
54
|
+
key: "learning-patterns",
|
|
55
|
+
version: "1.0.0",
|
|
56
|
+
title: "Learning Patterns",
|
|
57
|
+
description: "Domain-agnostic learning archetypes implemented as Learning Journey tracks.",
|
|
58
|
+
kind: "library",
|
|
59
|
+
visibility: "public",
|
|
60
|
+
stability: "experimental",
|
|
61
|
+
owners: ["@platform.core"],
|
|
62
|
+
tags: ["learning", "journey", "patterns"]
|
|
63
|
+
},
|
|
64
|
+
docs: {
|
|
65
|
+
rootDocId: "docs.examples.learning-patterns"
|
|
66
|
+
},
|
|
67
|
+
entrypoints: {
|
|
68
|
+
packageName: "@contractspec/example.learning-patterns",
|
|
69
|
+
docs: "./docs"
|
|
70
|
+
},
|
|
71
|
+
surfaces: {
|
|
72
|
+
templates: true,
|
|
73
|
+
sandbox: { enabled: true, modes: ["markdown", "specs"] },
|
|
74
|
+
studio: { enabled: true, installable: true },
|
|
75
|
+
mcp: { enabled: true }
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
var example_default = example;
|
|
79
|
+
|
|
80
|
+
// src/tracks/drills.ts
|
|
81
|
+
var drillsTrack = {
|
|
82
|
+
id: "learning_patterns_drills_basics",
|
|
83
|
+
name: "Drills Basics",
|
|
84
|
+
description: "Short drill sessions with an SRS-style mastery step.",
|
|
85
|
+
targetUserSegment: "learner",
|
|
86
|
+
targetRole: "individual",
|
|
87
|
+
totalXp: 50,
|
|
88
|
+
steps: [
|
|
89
|
+
{
|
|
90
|
+
id: "complete_first_session",
|
|
91
|
+
title: "Complete your first session",
|
|
92
|
+
order: 1,
|
|
93
|
+
completion: {
|
|
94
|
+
kind: "event",
|
|
95
|
+
eventName: LEARNING_EVENTS.DRILL_SESSION_COMPLETED
|
|
96
|
+
},
|
|
97
|
+
xpReward: 10
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: "hit_accuracy_threshold",
|
|
101
|
+
title: "Hit high accuracy 3 times",
|
|
102
|
+
order: 2,
|
|
103
|
+
completion: {
|
|
104
|
+
kind: "count",
|
|
105
|
+
eventName: LEARNING_EVENTS.DRILL_SESSION_COMPLETED,
|
|
106
|
+
atLeast: 3,
|
|
107
|
+
payloadFilter: { accuracyBucket: "high" }
|
|
108
|
+
},
|
|
109
|
+
xpReward: 20
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: "master_cards",
|
|
113
|
+
title: "Master 5 cards",
|
|
114
|
+
order: 3,
|
|
115
|
+
completion: {
|
|
116
|
+
kind: "srs_mastery",
|
|
117
|
+
eventName: LEARNING_EVENTS.DRILL_CARD_MASTERED,
|
|
118
|
+
minimumMastery: 0.8,
|
|
119
|
+
requiredCount: 5,
|
|
120
|
+
skillIdField: "skillId",
|
|
121
|
+
masteryField: "mastery"
|
|
122
|
+
},
|
|
123
|
+
xpReward: 20
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
};
|
|
127
|
+
var drillTracks = [drillsTrack];
|
|
128
|
+
|
|
129
|
+
// src/tracks/ambient-coach.ts
|
|
130
|
+
var ambientCoachTrack = {
|
|
131
|
+
id: "learning_patterns_ambient_coach_basics",
|
|
132
|
+
name: "Ambient Coach Basics",
|
|
133
|
+
description: "Contextual tips triggered by behavior events.",
|
|
134
|
+
targetUserSegment: "learner",
|
|
135
|
+
targetRole: "individual",
|
|
136
|
+
totalXp: 30,
|
|
137
|
+
steps: [
|
|
138
|
+
{
|
|
139
|
+
id: "tip_shown",
|
|
140
|
+
title: "See a contextual tip",
|
|
141
|
+
order: 1,
|
|
142
|
+
completion: { kind: "event", eventName: LEARNING_EVENTS.COACH_TIP_SHOWN },
|
|
143
|
+
xpReward: 10
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: "tip_acknowledged",
|
|
147
|
+
title: "Acknowledge a tip",
|
|
148
|
+
order: 2,
|
|
149
|
+
completion: {
|
|
150
|
+
kind: "event",
|
|
151
|
+
eventName: LEARNING_EVENTS.COACH_TIP_ACKNOWLEDGED
|
|
152
|
+
},
|
|
153
|
+
xpReward: 10
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: "tip_action_taken",
|
|
157
|
+
title: "Take an action from a tip",
|
|
158
|
+
order: 3,
|
|
159
|
+
completion: {
|
|
160
|
+
kind: "event",
|
|
161
|
+
eventName: LEARNING_EVENTS.COACH_TIP_ACTION_TAKEN
|
|
162
|
+
},
|
|
163
|
+
xpReward: 10
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
};
|
|
167
|
+
var ambientCoachTracks = [
|
|
168
|
+
ambientCoachTrack
|
|
169
|
+
];
|
|
170
|
+
|
|
171
|
+
// src/tracks/quests.ts
|
|
172
|
+
var questTrack = {
|
|
173
|
+
id: "learning_patterns_quest_7day",
|
|
174
|
+
name: "Quest (7-day)",
|
|
175
|
+
description: "Time-bounded quest with day unlocks.",
|
|
176
|
+
targetUserSegment: "learner",
|
|
177
|
+
targetRole: "individual",
|
|
178
|
+
totalXp: 70,
|
|
179
|
+
steps: [
|
|
180
|
+
{
|
|
181
|
+
id: "day1_start",
|
|
182
|
+
title: "Start the quest",
|
|
183
|
+
order: 1,
|
|
184
|
+
completion: { kind: "event", eventName: LEARNING_EVENTS.QUEST_STARTED },
|
|
185
|
+
xpReward: 10
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
id: "day1_complete",
|
|
189
|
+
title: "Complete day 1 step",
|
|
190
|
+
order: 2,
|
|
191
|
+
completion: {
|
|
192
|
+
kind: "event",
|
|
193
|
+
eventName: LEARNING_EVENTS.QUEST_STEP_COMPLETED
|
|
194
|
+
},
|
|
195
|
+
availability: { unlockOnDay: 1, dueWithinHours: 48 },
|
|
196
|
+
xpReward: 10
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: "day2_complete",
|
|
200
|
+
title: "Complete day 2 step",
|
|
201
|
+
order: 3,
|
|
202
|
+
completion: {
|
|
203
|
+
kind: "event",
|
|
204
|
+
eventName: LEARNING_EVENTS.QUEST_STEP_COMPLETED
|
|
205
|
+
},
|
|
206
|
+
availability: { unlockOnDay: 2, dueWithinHours: 48 },
|
|
207
|
+
xpReward: 10
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
};
|
|
211
|
+
var questTracks = [questTrack];
|
|
212
|
+
export {
|
|
213
|
+
questTracks,
|
|
214
|
+
questTrack,
|
|
215
|
+
example_default as example,
|
|
216
|
+
drillsTrack,
|
|
217
|
+
drillTracks,
|
|
218
|
+
ambientCoachTracks,
|
|
219
|
+
ambientCoachTrack,
|
|
220
|
+
LEARNING_EVENTS
|
|
221
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// src/events.ts
|
|
2
|
+
var LEARNING_EVENTS = {
|
|
3
|
+
DRILL_CARD_ANSWERED: "drill.card.answered",
|
|
4
|
+
DRILL_SESSION_COMPLETED: "drill.session.completed",
|
|
5
|
+
DRILL_CARD_MASTERED: "drill.card.mastered",
|
|
6
|
+
COACH_TIP_TRIGGERED: "coach.tip.triggered",
|
|
7
|
+
COACH_TIP_SHOWN: "coach.tip.shown",
|
|
8
|
+
COACH_TIP_ACKNOWLEDGED: "coach.tip.acknowledged",
|
|
9
|
+
COACH_TIP_ACTION_TAKEN: "coach.tip.actionTaken",
|
|
10
|
+
QUEST_STARTED: "quest.started",
|
|
11
|
+
QUEST_STEP_COMPLETED: "quest.step.completed"
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// src/tracks/ambient-coach.ts
|
|
15
|
+
var ambientCoachTrack = {
|
|
16
|
+
id: "learning_patterns_ambient_coach_basics",
|
|
17
|
+
name: "Ambient Coach Basics",
|
|
18
|
+
description: "Contextual tips triggered by behavior events.",
|
|
19
|
+
targetUserSegment: "learner",
|
|
20
|
+
targetRole: "individual",
|
|
21
|
+
totalXp: 30,
|
|
22
|
+
steps: [
|
|
23
|
+
{
|
|
24
|
+
id: "tip_shown",
|
|
25
|
+
title: "See a contextual tip",
|
|
26
|
+
order: 1,
|
|
27
|
+
completion: { kind: "event", eventName: LEARNING_EVENTS.COACH_TIP_SHOWN },
|
|
28
|
+
xpReward: 10
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: "tip_acknowledged",
|
|
32
|
+
title: "Acknowledge a tip",
|
|
33
|
+
order: 2,
|
|
34
|
+
completion: {
|
|
35
|
+
kind: "event",
|
|
36
|
+
eventName: LEARNING_EVENTS.COACH_TIP_ACKNOWLEDGED
|
|
37
|
+
},
|
|
38
|
+
xpReward: 10
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "tip_action_taken",
|
|
42
|
+
title: "Take an action from a tip",
|
|
43
|
+
order: 3,
|
|
44
|
+
completion: {
|
|
45
|
+
kind: "event",
|
|
46
|
+
eventName: LEARNING_EVENTS.COACH_TIP_ACTION_TAKEN
|
|
47
|
+
},
|
|
48
|
+
xpReward: 10
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
};
|
|
52
|
+
var ambientCoachTracks = [
|
|
53
|
+
ambientCoachTrack
|
|
54
|
+
];
|
|
55
|
+
export {
|
|
56
|
+
ambientCoachTracks,
|
|
57
|
+
ambientCoachTrack
|
|
58
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// src/events.ts
|
|
2
|
+
var LEARNING_EVENTS = {
|
|
3
|
+
DRILL_CARD_ANSWERED: "drill.card.answered",
|
|
4
|
+
DRILL_SESSION_COMPLETED: "drill.session.completed",
|
|
5
|
+
DRILL_CARD_MASTERED: "drill.card.mastered",
|
|
6
|
+
COACH_TIP_TRIGGERED: "coach.tip.triggered",
|
|
7
|
+
COACH_TIP_SHOWN: "coach.tip.shown",
|
|
8
|
+
COACH_TIP_ACKNOWLEDGED: "coach.tip.acknowledged",
|
|
9
|
+
COACH_TIP_ACTION_TAKEN: "coach.tip.actionTaken",
|
|
10
|
+
QUEST_STARTED: "quest.started",
|
|
11
|
+
QUEST_STEP_COMPLETED: "quest.step.completed"
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// src/tracks/drills.ts
|
|
15
|
+
var drillsTrack = {
|
|
16
|
+
id: "learning_patterns_drills_basics",
|
|
17
|
+
name: "Drills Basics",
|
|
18
|
+
description: "Short drill sessions with an SRS-style mastery step.",
|
|
19
|
+
targetUserSegment: "learner",
|
|
20
|
+
targetRole: "individual",
|
|
21
|
+
totalXp: 50,
|
|
22
|
+
steps: [
|
|
23
|
+
{
|
|
24
|
+
id: "complete_first_session",
|
|
25
|
+
title: "Complete your first session",
|
|
26
|
+
order: 1,
|
|
27
|
+
completion: {
|
|
28
|
+
kind: "event",
|
|
29
|
+
eventName: LEARNING_EVENTS.DRILL_SESSION_COMPLETED
|
|
30
|
+
},
|
|
31
|
+
xpReward: 10
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "hit_accuracy_threshold",
|
|
35
|
+
title: "Hit high accuracy 3 times",
|
|
36
|
+
order: 2,
|
|
37
|
+
completion: {
|
|
38
|
+
kind: "count",
|
|
39
|
+
eventName: LEARNING_EVENTS.DRILL_SESSION_COMPLETED,
|
|
40
|
+
atLeast: 3,
|
|
41
|
+
payloadFilter: { accuracyBucket: "high" }
|
|
42
|
+
},
|
|
43
|
+
xpReward: 20
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "master_cards",
|
|
47
|
+
title: "Master 5 cards",
|
|
48
|
+
order: 3,
|
|
49
|
+
completion: {
|
|
50
|
+
kind: "srs_mastery",
|
|
51
|
+
eventName: LEARNING_EVENTS.DRILL_CARD_MASTERED,
|
|
52
|
+
minimumMastery: 0.8,
|
|
53
|
+
requiredCount: 5,
|
|
54
|
+
skillIdField: "skillId",
|
|
55
|
+
masteryField: "mastery"
|
|
56
|
+
},
|
|
57
|
+
xpReward: 20
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
};
|
|
61
|
+
var drillTracks = [drillsTrack];
|
|
62
|
+
export {
|
|
63
|
+
drillsTrack,
|
|
64
|
+
drillTracks
|
|
65
|
+
};
|