@contractspec/example.learning-journey-studio-onboarding 1.57.0 → 1.58.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.
Files changed (67) hide show
  1. package/.turbo/turbo-build.log +46 -50
  2. package/.turbo/turbo-prebuild.log +1 -0
  3. package/CHANGELOG.md +14 -0
  4. package/dist/browser/docs/index.js +35 -0
  5. package/dist/browser/docs/studio-onboarding.docblock.js +35 -0
  6. package/dist/browser/example.js +32 -0
  7. package/dist/browser/handlers/demo.handlers.js +107 -0
  8. package/dist/browser/index.js +393 -0
  9. package/dist/browser/learning-journey-studio-onboarding.feature.js +50 -0
  10. package/dist/browser/operations/index.js +201 -0
  11. package/dist/browser/presentations/index.js +250 -0
  12. package/dist/browser/tests/operations.test-spec.js +34 -0
  13. package/dist/browser/track.js +87 -0
  14. package/dist/docs/index.d.ts +2 -1
  15. package/dist/docs/index.d.ts.map +1 -0
  16. package/dist/docs/index.js +36 -1
  17. package/dist/docs/studio-onboarding.docblock.d.ts +2 -1
  18. package/dist/docs/studio-onboarding.docblock.d.ts.map +1 -0
  19. package/dist/docs/studio-onboarding.docblock.js +21 -25
  20. package/dist/example.d.ts +2 -6
  21. package/dist/example.d.ts.map +1 -1
  22. package/dist/example.js +31 -39
  23. package/dist/handlers/demo.handlers.d.ts +12 -17
  24. package/dist/handlers/demo.handlers.d.ts.map +1 -1
  25. package/dist/handlers/demo.handlers.js +105 -21
  26. package/dist/index.d.ts +8 -7
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +394 -9
  29. package/dist/learning-journey-studio-onboarding.feature.d.ts +1 -6
  30. package/dist/learning-journey-studio-onboarding.feature.d.ts.map +1 -1
  31. package/dist/learning-journey-studio-onboarding.feature.js +49 -73
  32. package/dist/node/docs/index.js +35 -0
  33. package/dist/node/docs/studio-onboarding.docblock.js +35 -0
  34. package/dist/node/example.js +32 -0
  35. package/dist/node/handlers/demo.handlers.js +107 -0
  36. package/dist/node/index.js +393 -0
  37. package/dist/node/learning-journey-studio-onboarding.feature.js +50 -0
  38. package/dist/node/operations/index.js +201 -0
  39. package/dist/node/presentations/index.js +250 -0
  40. package/dist/node/tests/operations.test-spec.js +34 -0
  41. package/dist/node/track.js +87 -0
  42. package/dist/operations/index.d.ts +229 -236
  43. package/dist/operations/index.d.ts.map +1 -1
  44. package/dist/operations/index.js +193 -167
  45. package/dist/operations/index.test.d.ts +2 -0
  46. package/dist/operations/index.test.d.ts.map +1 -0
  47. package/dist/presentations/index.d.ts +3 -8
  48. package/dist/presentations/index.d.ts.map +1 -1
  49. package/dist/presentations/index.js +248 -54
  50. package/dist/tests/operations.test-spec.d.ts +1 -6
  51. package/dist/tests/operations.test-spec.d.ts.map +1 -1
  52. package/dist/tests/operations.test-spec.js +33 -34
  53. package/dist/track.d.ts +3 -7
  54. package/dist/track.d.ts.map +1 -1
  55. package/dist/track.js +87 -90
  56. package/package.json +118 -34
  57. package/tsdown.config.js +1 -2
  58. package/.turbo/turbo-build$colon$bundle.log +0 -50
  59. package/dist/docs/studio-onboarding.docblock.js.map +0 -1
  60. package/dist/example.js.map +0 -1
  61. package/dist/handlers/demo.handlers.js.map +0 -1
  62. package/dist/learning-journey-studio-onboarding.feature.js.map +0 -1
  63. package/dist/operations/index.js.map +0 -1
  64. package/dist/presentations/index.js.map +0 -1
  65. package/dist/tests/operations.test-spec.js.map +0 -1
  66. package/dist/track.js.map +0 -1
  67. package/tsconfig.tsbuildinfo +0 -1
@@ -1,57 +1,251 @@
1
- import { StudioOnboardingTrackModel } from "../operations/index.js";
2
- import { StabilityEnum, definePresentation } from "@contractspec/lib.contracts";
1
+ // @bun
2
+ // src/track.ts
3
+ var studioGettingStartedTrack = {
4
+ id: "studio_getting_started",
5
+ productId: "contractspec-studio",
6
+ name: "Studio Getting Started",
7
+ description: "First 30 minutes in Studio: create a project, edit the spec, deploy/regenerate, and try key modules.",
8
+ targetUserSegment: "new_studio_user",
9
+ targetRole: "developer",
10
+ totalXp: 110,
11
+ streakRule: { hoursWindow: 48, bonusXp: 25 },
12
+ completionRewards: { xpBonus: 25, badgeKey: "studio_first_30m" },
13
+ steps: [
14
+ {
15
+ id: "choose_template",
16
+ title: "Choose a template",
17
+ description: "Create your first Studio project (starter template).",
18
+ order: 1,
19
+ completion: {
20
+ eventName: "studio.template.instantiated",
21
+ sourceModule: "@contractspec/bundle.studio"
22
+ },
23
+ xpReward: 20,
24
+ metadata: { surface: "projects" }
25
+ },
26
+ {
27
+ id: "edit_spec",
28
+ title: "Edit the spec",
29
+ description: "Change the spec (not generated code) and save.",
30
+ instructions: "Open spec editor, tweak a contract or presentation, save.",
31
+ order: 2,
32
+ completion: {
33
+ eventName: "spec.changed",
34
+ sourceModule: "@contractspec/bundle.studio"
35
+ },
36
+ xpReward: 20,
37
+ metadata: { surface: "spec-editor" }
38
+ },
39
+ {
40
+ id: "regenerate_app",
41
+ title: "Regenerate the app",
42
+ description: "Regenerate artifacts from the updated spec.",
43
+ order: 3,
44
+ completion: {
45
+ eventName: "regeneration.completed",
46
+ sourceModule: "@contractspec/lib.contracts/regenerator"
47
+ },
48
+ xpReward: 20,
49
+ metadata: { surface: "regenerator" }
50
+ },
51
+ {
52
+ id: "open_canvas",
53
+ title: "Open the canvas",
54
+ description: "Visit the canvas module for your project.",
55
+ order: 4,
56
+ completion: {
57
+ eventName: "module.navigated",
58
+ sourceModule: "@contractspec/bundle.studio",
59
+ payloadFilter: { moduleId: "canvas" }
60
+ },
61
+ xpReward: 20,
62
+ metadata: { surface: "canvas" }
63
+ },
64
+ {
65
+ id: "try_evolution_mode",
66
+ title: "Try evolution mode",
67
+ description: "Request a change via Evolution, then regenerate.",
68
+ order: 5,
69
+ completion: {
70
+ eventName: "studio.evolution.applied",
71
+ sourceModule: "@contractspec/lib.evolution"
72
+ },
73
+ xpReward: 30,
74
+ metadata: { surface: "evolution" }
75
+ }
76
+ ],
77
+ metadata: {
78
+ persona: "first_run",
79
+ surfacedIn: ["studio/home", "studio/sidebar/learning"]
80
+ }
81
+ };
82
+ var studioLearningTracks = [
83
+ studioGettingStartedTrack
84
+ ];
3
85
 
4
- //#region src/presentations/index.ts
5
- const baseMeta = {
6
- domain: "learning-journey",
7
- title: "Studio Onboarding",
8
- owners: ["@examples.learning-journey.studio-onboarding"],
9
- tags: [
10
- "learning",
11
- "onboarding",
12
- "studio"
13
- ],
14
- stability: StabilityEnum.Experimental
86
+ // src/operations/index.ts
87
+ import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
88
+ import { defineCommand, defineQuery } from "@contractspec/lib.contracts";
89
+ var OWNERS = ["examples.learning-journey.studio-onboarding"];
90
+ var StepModel = defineSchemaModel({
91
+ name: "StudioOnboardingStep",
92
+ description: "Step metadata for Studio onboarding journey",
93
+ fields: {
94
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
95
+ title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
96
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
97
+ completionEvent: {
98
+ type: ScalarTypeEnum.String_unsecure(),
99
+ isOptional: false
100
+ },
101
+ sourceModule: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
102
+ xpReward: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
103
+ order: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true }
104
+ }
105
+ });
106
+ var StudioOnboardingTrackModel = defineSchemaModel({
107
+ name: "StudioOnboardingTrack",
108
+ description: "Studio onboarding track definition",
109
+ fields: {
110
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
111
+ name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
112
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
113
+ totalXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
114
+ completionXpBonus: {
115
+ type: ScalarTypeEnum.Int_unsecure(),
116
+ isOptional: true
117
+ },
118
+ completionBadgeKey: {
119
+ type: ScalarTypeEnum.String_unsecure(),
120
+ isOptional: true
121
+ },
122
+ streakHoursWindow: {
123
+ type: ScalarTypeEnum.Int_unsecure(),
124
+ isOptional: true
125
+ },
126
+ streakBonusXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
127
+ steps: { type: StepModel, isArray: true, isOptional: false }
128
+ }
129
+ });
130
+ var TrackResponseModel = defineSchemaModel({
131
+ name: "StudioOnboardingTrackResponse",
132
+ description: "Response wrapper for studio onboarding track",
133
+ fields: {
134
+ track: { type: StudioOnboardingTrackModel, isOptional: false }
135
+ }
136
+ });
137
+ var RecordDemoEventInput = defineSchemaModel({
138
+ name: "StudioOnboardingRecordEventInput",
139
+ description: "Emit a demo event to advance Studio onboarding steps",
140
+ fields: {
141
+ learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
142
+ eventName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
143
+ payload: { type: ScalarTypeEnum.JSON(), isOptional: true },
144
+ occurredAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
145
+ }
146
+ });
147
+ var SuccessModel = defineSchemaModel({
148
+ name: "StudioOnboardingSuccess",
149
+ description: "Generic success response",
150
+ fields: {
151
+ success: { type: ScalarTypeEnum.Boolean(), isOptional: false }
152
+ }
153
+ });
154
+ var GetStudioOnboardingTrack = defineQuery({
155
+ meta: {
156
+ key: "learningJourney.studioOnboarding.getTrack",
157
+ version: "1.0.0",
158
+ stability: "experimental",
159
+ owners: [...OWNERS],
160
+ tags: ["learning", "onboarding", "studio"],
161
+ description: "Fetch the Studio onboarding track definition.",
162
+ goal: "Expose track metadata to UIs and templates.",
163
+ context: "Called by Studio/Playground to render journey steps."
164
+ },
165
+ io: {
166
+ input: defineSchemaModel({
167
+ name: "StudioOnboardingTrackInput",
168
+ description: "Track input",
169
+ fields: {}
170
+ }),
171
+ output: TrackResponseModel
172
+ },
173
+ policy: { auth: "user" }
174
+ });
175
+ var RecordStudioOnboardingEvent = defineCommand({
176
+ meta: {
177
+ key: "learningJourney.studioOnboarding.recordEvent",
178
+ version: "1.0.0",
179
+ stability: "experimental",
180
+ owners: [...OWNERS],
181
+ tags: ["learning", "onboarding", "studio"],
182
+ description: "Record an event to advance Studio onboarding progress.",
183
+ goal: "Advance steps via domain events in demo/sandbox contexts.",
184
+ context: "Called by handlers or demo scripts to emit step completion events."
185
+ },
186
+ io: {
187
+ input: RecordDemoEventInput,
188
+ output: SuccessModel
189
+ },
190
+ policy: { auth: "user" }
191
+ });
192
+ var studioOnboardingContracts = {
193
+ GetStudioOnboardingTrack,
194
+ RecordStudioOnboardingEvent,
195
+ track: studioGettingStartedTrack
15
196
  };
16
- const StudioOnboardingTrackPresentation = definePresentation({
17
- meta: {
18
- key: "learning.journey.studio.track",
19
- version: "1.0.0",
20
- description: "Studio onboarding track detail",
21
- goal: "Visualize the onboarding track for the user.",
22
- context: "Displayed in the Studio dashboard.",
23
- ...baseMeta
24
- },
25
- source: {
26
- type: "component",
27
- framework: "react",
28
- componentKey: "LearningTrackDetail",
29
- props: StudioOnboardingTrackModel
30
- },
31
- targets: [
32
- "react",
33
- "markdown",
34
- "application/json"
35
- ]
36
- });
37
- const StudioOnboardingWidgetPresentation = definePresentation({
38
- meta: {
39
- key: "learning.journey.studio.widget",
40
- version: "1.0.0",
41
- description: "Compact widget for Studio onboarding progress",
42
- goal: "Show quick progress summary.",
43
- context: "Displayed in the Studio sidebar or header.",
44
- ...baseMeta
45
- },
46
- source: {
47
- type: "component",
48
- framework: "react",
49
- componentKey: "LearningTrackProgressWidget"
50
- },
51
- targets: ["react"]
52
- });
53
- const studioOnboardingPresentations = [StudioOnboardingTrackPresentation, StudioOnboardingWidgetPresentation];
54
197
 
55
- //#endregion
56
- export { StudioOnboardingTrackPresentation, StudioOnboardingWidgetPresentation, studioOnboardingPresentations };
57
- //# sourceMappingURL=index.js.map
198
+ // src/presentations/index.ts
199
+ import {
200
+ definePresentation,
201
+ StabilityEnum
202
+ } from "@contractspec/lib.contracts";
203
+ var baseMeta = {
204
+ domain: "learning-journey",
205
+ title: "Studio Onboarding",
206
+ owners: ["@examples.learning-journey.studio-onboarding"],
207
+ tags: ["learning", "onboarding", "studio"],
208
+ stability: StabilityEnum.Experimental
209
+ };
210
+ var StudioOnboardingTrackPresentation = definePresentation({
211
+ meta: {
212
+ key: "learning.journey.studio.track",
213
+ version: "1.0.0",
214
+ description: "Studio onboarding track detail",
215
+ goal: "Visualize the onboarding track for the user.",
216
+ context: "Displayed in the Studio dashboard.",
217
+ ...baseMeta
218
+ },
219
+ source: {
220
+ type: "component",
221
+ framework: "react",
222
+ componentKey: "LearningTrackDetail",
223
+ props: StudioOnboardingTrackModel
224
+ },
225
+ targets: ["react", "markdown", "application/json"]
226
+ });
227
+ var StudioOnboardingWidgetPresentation = definePresentation({
228
+ meta: {
229
+ key: "learning.journey.studio.widget",
230
+ version: "1.0.0",
231
+ description: "Compact widget for Studio onboarding progress",
232
+ goal: "Show quick progress summary.",
233
+ context: "Displayed in the Studio sidebar or header.",
234
+ ...baseMeta
235
+ },
236
+ source: {
237
+ type: "component",
238
+ framework: "react",
239
+ componentKey: "LearningTrackProgressWidget"
240
+ },
241
+ targets: ["react"]
242
+ });
243
+ var studioOnboardingPresentations = [
244
+ StudioOnboardingTrackPresentation,
245
+ StudioOnboardingWidgetPresentation
246
+ ];
247
+ export {
248
+ studioOnboardingPresentations,
249
+ StudioOnboardingWidgetPresentation,
250
+ StudioOnboardingTrackPresentation
251
+ };
@@ -1,7 +1,2 @@
1
- import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
-
3
- //#region src/tests/operations.test-spec.d.ts
4
- declare const GetTrackTest: _contractspec_lib_contracts0.TestSpec;
5
- //#endregion
6
- export { GetTrackTest };
1
+ export declare const GetTrackTest: import("@contractspec/lib.contracts").TestSpec;
7
2
  //# sourceMappingURL=operations.test-spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"operations.test-spec.d.ts","names":[],"sources":["../../src/tests/operations.test-spec.ts"],"mappings":";;;cAEa,YAAA,EA4BX,4BAAA,CA5BuB,QAAA"}
1
+ {"version":3,"file":"operations.test-spec.d.ts","sourceRoot":"","sources":["../../src/tests/operations.test-spec.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,gDA4BvB,CAAC"}
@@ -1,36 +1,35 @@
1
+ // @bun
2
+ // src/tests/operations.test-spec.ts
1
3
  import { defineTestSpec } from "@contractspec/lib.contracts";
2
-
3
- //#region src/tests/operations.test-spec.ts
4
- const GetTrackTest = defineTestSpec({
5
- meta: {
6
- key: "learningJourney.studioOnboarding.getTrack.test",
7
- version: "1.0.0",
8
- stability: "experimental",
9
- owners: ["@example.learning-journey-studio-onboarding"],
10
- description: "Test for getting studio onboarding track",
11
- tags: ["test"]
12
- },
13
- target: {
14
- type: "operation",
15
- operation: {
16
- key: "learningJourney.studioOnboarding.getTrack",
17
- version: "1.0.0"
18
- }
19
- },
20
- scenarios: [{
21
- key: "success",
22
- when: { operation: { key: "learningJourney.studioOnboarding.getTrack" } },
23
- then: [{
24
- type: "expectOutput",
25
- match: {}
26
- }]
27
- }, {
28
- key: "error",
29
- when: { operation: { key: "learningJourney.studioOnboarding.getTrack" } },
30
- then: [{ type: "expectError" }]
31
- }]
4
+ var GetTrackTest = defineTestSpec({
5
+ meta: {
6
+ key: "learningJourney.studioOnboarding.getTrack.test",
7
+ version: "1.0.0",
8
+ stability: "experimental",
9
+ owners: ["@example.learning-journey-studio-onboarding"],
10
+ description: "Test for getting studio onboarding track",
11
+ tags: ["test"]
12
+ },
13
+ target: {
14
+ type: "operation",
15
+ operation: {
16
+ key: "learningJourney.studioOnboarding.getTrack",
17
+ version: "1.0.0"
18
+ }
19
+ },
20
+ scenarios: [
21
+ {
22
+ key: "success",
23
+ when: { operation: { key: "learningJourney.studioOnboarding.getTrack" } },
24
+ then: [{ type: "expectOutput", match: {} }]
25
+ },
26
+ {
27
+ key: "error",
28
+ when: { operation: { key: "learningJourney.studioOnboarding.getTrack" } },
29
+ then: [{ type: "expectError" }]
30
+ }
31
+ ]
32
32
  });
33
-
34
- //#endregion
35
- export { GetTrackTest };
36
- //# sourceMappingURL=operations.test-spec.js.map
33
+ export {
34
+ GetTrackTest
35
+ };
package/dist/track.d.ts CHANGED
@@ -1,8 +1,4 @@
1
- import { LearningJourneyTrackSpec } from "@contractspec/module.learning-journey/track-spec";
2
-
3
- //#region src/track.d.ts
4
- declare const studioGettingStartedTrack: LearningJourneyTrackSpec;
5
- declare const studioLearningTracks: LearningJourneyTrackSpec[];
6
- //#endregion
7
- export { studioGettingStartedTrack, studioLearningTracks };
1
+ import type { LearningJourneyTrackSpec } from '@contractspec/module.learning-journey/track-spec';
2
+ export declare const studioGettingStartedTrack: LearningJourneyTrackSpec;
3
+ export declare const studioLearningTracks: LearningJourneyTrackSpec[];
8
4
  //# sourceMappingURL=track.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"track.d.ts","names":[],"sources":["../src/track.ts"],"mappings":";;;cAEa,yBAAA,EAA2B,wBAAA;AAAA,cAiF3B,oBAAA,EAAsB,wBAAA"}
1
+ {"version":3,"file":"track.d.ts","sourceRoot":"","sources":["../src/track.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAEjG,eAAO,MAAM,yBAAyB,EAAE,wBA+EvC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,wBAAwB,EAE1D,CAAC"}
package/dist/track.js CHANGED
@@ -1,91 +1,88 @@
1
- //#region src/track.ts
2
- const studioGettingStartedTrack = {
3
- id: "studio_getting_started",
4
- productId: "contractspec-studio",
5
- name: "Studio Getting Started",
6
- description: "First 30 minutes in Studio: create a project, edit the spec, deploy/regenerate, and try key modules.",
7
- targetUserSegment: "new_studio_user",
8
- targetRole: "developer",
9
- totalXp: 110,
10
- streakRule: {
11
- hoursWindow: 48,
12
- bonusXp: 25
13
- },
14
- completionRewards: {
15
- xpBonus: 25,
16
- badgeKey: "studio_first_30m"
17
- },
18
- steps: [
19
- {
20
- id: "choose_template",
21
- title: "Choose a template",
22
- description: "Create your first Studio project (starter template).",
23
- order: 1,
24
- completion: {
25
- eventName: "studio.template.instantiated",
26
- sourceModule: "@contractspec/bundle.studio"
27
- },
28
- xpReward: 20,
29
- metadata: { surface: "projects" }
30
- },
31
- {
32
- id: "edit_spec",
33
- title: "Edit the spec",
34
- description: "Change the spec (not generated code) and save.",
35
- instructions: "Open spec editor, tweak a contract or presentation, save.",
36
- order: 2,
37
- completion: {
38
- eventName: "spec.changed",
39
- sourceModule: "@contractspec/bundle.studio"
40
- },
41
- xpReward: 20,
42
- metadata: { surface: "spec-editor" }
43
- },
44
- {
45
- id: "regenerate_app",
46
- title: "Regenerate the app",
47
- description: "Regenerate artifacts from the updated spec.",
48
- order: 3,
49
- completion: {
50
- eventName: "regeneration.completed",
51
- sourceModule: "@contractspec/lib.contracts/regenerator"
52
- },
53
- xpReward: 20,
54
- metadata: { surface: "regenerator" }
55
- },
56
- {
57
- id: "open_canvas",
58
- title: "Open the canvas",
59
- description: "Visit the canvas module for your project.",
60
- order: 4,
61
- completion: {
62
- eventName: "module.navigated",
63
- sourceModule: "@contractspec/bundle.studio",
64
- payloadFilter: { moduleId: "canvas" }
65
- },
66
- xpReward: 20,
67
- metadata: { surface: "canvas" }
68
- },
69
- {
70
- id: "try_evolution_mode",
71
- title: "Try evolution mode",
72
- description: "Request a change via Evolution, then regenerate.",
73
- order: 5,
74
- completion: {
75
- eventName: "studio.evolution.applied",
76
- sourceModule: "@contractspec/lib.evolution"
77
- },
78
- xpReward: 30,
79
- metadata: { surface: "evolution" }
80
- }
81
- ],
82
- metadata: {
83
- persona: "first_run",
84
- surfacedIn: ["studio/home", "studio/sidebar/learning"]
85
- }
1
+ // @bun
2
+ // src/track.ts
3
+ var studioGettingStartedTrack = {
4
+ id: "studio_getting_started",
5
+ productId: "contractspec-studio",
6
+ name: "Studio Getting Started",
7
+ description: "First 30 minutes in Studio: create a project, edit the spec, deploy/regenerate, and try key modules.",
8
+ targetUserSegment: "new_studio_user",
9
+ targetRole: "developer",
10
+ totalXp: 110,
11
+ streakRule: { hoursWindow: 48, bonusXp: 25 },
12
+ completionRewards: { xpBonus: 25, badgeKey: "studio_first_30m" },
13
+ steps: [
14
+ {
15
+ id: "choose_template",
16
+ title: "Choose a template",
17
+ description: "Create your first Studio project (starter template).",
18
+ order: 1,
19
+ completion: {
20
+ eventName: "studio.template.instantiated",
21
+ sourceModule: "@contractspec/bundle.studio"
22
+ },
23
+ xpReward: 20,
24
+ metadata: { surface: "projects" }
25
+ },
26
+ {
27
+ id: "edit_spec",
28
+ title: "Edit the spec",
29
+ description: "Change the spec (not generated code) and save.",
30
+ instructions: "Open spec editor, tweak a contract or presentation, save.",
31
+ order: 2,
32
+ completion: {
33
+ eventName: "spec.changed",
34
+ sourceModule: "@contractspec/bundle.studio"
35
+ },
36
+ xpReward: 20,
37
+ metadata: { surface: "spec-editor" }
38
+ },
39
+ {
40
+ id: "regenerate_app",
41
+ title: "Regenerate the app",
42
+ description: "Regenerate artifacts from the updated spec.",
43
+ order: 3,
44
+ completion: {
45
+ eventName: "regeneration.completed",
46
+ sourceModule: "@contractspec/lib.contracts/regenerator"
47
+ },
48
+ xpReward: 20,
49
+ metadata: { surface: "regenerator" }
50
+ },
51
+ {
52
+ id: "open_canvas",
53
+ title: "Open the canvas",
54
+ description: "Visit the canvas module for your project.",
55
+ order: 4,
56
+ completion: {
57
+ eventName: "module.navigated",
58
+ sourceModule: "@contractspec/bundle.studio",
59
+ payloadFilter: { moduleId: "canvas" }
60
+ },
61
+ xpReward: 20,
62
+ metadata: { surface: "canvas" }
63
+ },
64
+ {
65
+ id: "try_evolution_mode",
66
+ title: "Try evolution mode",
67
+ description: "Request a change via Evolution, then regenerate.",
68
+ order: 5,
69
+ completion: {
70
+ eventName: "studio.evolution.applied",
71
+ sourceModule: "@contractspec/lib.evolution"
72
+ },
73
+ xpReward: 30,
74
+ metadata: { surface: "evolution" }
75
+ }
76
+ ],
77
+ metadata: {
78
+ persona: "first_run",
79
+ surfacedIn: ["studio/home", "studio/sidebar/learning"]
80
+ }
81
+ };
82
+ var studioLearningTracks = [
83
+ studioGettingStartedTrack
84
+ ];
85
+ export {
86
+ studioLearningTracks,
87
+ studioGettingStartedTrack
86
88
  };
87
- const studioLearningTracks = [studioGettingStartedTrack];
88
-
89
- //#endregion
90
- export { studioGettingStartedTrack, studioLearningTracks };
91
- //# sourceMappingURL=track.js.map