@ak--47/dungeon-master 1.0.0 → 1.2.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 (104) hide show
  1. package/README.md +7 -7
  2. package/dungeons/technical/ad-spend-schema.json +128 -0
  3. package/dungeons/technical/ad-spend.js +116 -0
  4. package/dungeons/technical/anonymous-users-schema.json +92 -0
  5. package/dungeons/technical/anonymous-users.js +102 -0
  6. package/dungeons/technical/array-of-object-lookup-schema.json +191 -0
  7. package/dungeons/{array-of-object-lookup.js → technical/array-of-object-lookup.js} +12 -5
  8. package/dungeons/technical/experiments-schema.json +203 -0
  9. package/dungeons/technical/experiments.js +168 -0
  10. package/dungeons/technical/foobar-schema.json +362 -0
  11. package/dungeons/{foobar.js → technical/foobar.js} +3 -3
  12. package/dungeons/technical/group-analytics-schema.json +241 -0
  13. package/dungeons/technical/group-analytics.js +151 -0
  14. package/dungeons/technical/mirror-strategies-schema.json +84 -0
  15. package/dungeons/technical/mirror-strategies.js +126 -0
  16. package/dungeons/technical/nested-objects-schema.json +145 -0
  17. package/dungeons/technical/nested-objects.js +207 -0
  18. package/dungeons/technical/retention-cadence-schema.json +37 -0
  19. package/dungeons/{retention-cadence.js → technical/retention-cadence.js} +2 -3
  20. package/dungeons/technical/sanity-schema.json +185 -0
  21. package/dungeons/{sanity.js → technical/sanity.js} +4 -2
  22. package/dungeons/technical/scale-test-schema.json +70 -0
  23. package/dungeons/technical/scale-test.js +90 -0
  24. package/dungeons/technical/scd-schema.json +467 -0
  25. package/dungeons/{scd.js → technical/scd.js} +20 -10
  26. package/dungeons/technical/simple-schema.json +362 -0
  27. package/dungeons/{simple.js → technical/simple.js} +7 -7
  28. package/dungeons/technical/simplest-schema.json +724 -0
  29. package/dungeons/{simplest.js → technical/simplest.js} +7 -7
  30. package/dungeons/technical/text-generation-schema.json +1062 -0
  31. package/dungeons/{text-generation.js → technical/text-generation.js} +24 -11
  32. package/dungeons/vertical/community-schema.json +579 -0
  33. package/dungeons/vertical/community.js +794 -0
  34. package/dungeons/vertical/devtools-schema.json +601 -0
  35. package/dungeons/vertical/devtools.js +843 -0
  36. package/dungeons/vertical/ecommerce-schema.json +604 -0
  37. package/dungeons/{ecommerce.js → vertical/ecommerce.js} +43 -5
  38. package/dungeons/vertical/education-schema.json +5686 -0
  39. package/dungeons/{education.js → vertical/education.js} +70 -39
  40. package/dungeons/vertical/fintech-schema.json +630 -0
  41. package/dungeons/{fintech.js → vertical/fintech.js} +107 -56
  42. package/dungeons/vertical/fitness-schema.json +530 -0
  43. package/dungeons/vertical/fitness.js +808 -0
  44. package/dungeons/vertical/food-delivery-schema.json +36728 -0
  45. package/dungeons/{food.js → vertical/food-delivery.js} +67 -26
  46. package/dungeons/vertical/gaming-schema.json +438 -0
  47. package/dungeons/{gaming.js → vertical/gaming.js} +29 -16
  48. package/dungeons/vertical/healthcare-schema.json +549 -0
  49. package/dungeons/vertical/healthcare.js +775 -0
  50. package/dungeons/vertical/insurance-application-schema.json +485 -0
  51. package/dungeons/{insurance-application.js → vertical/insurance-application.js} +41 -31
  52. package/dungeons/vertical/logistics-schema.json +574 -0
  53. package/dungeons/vertical/logistics.js +799 -0
  54. package/dungeons/vertical/marketplace-schema.json +533 -0
  55. package/dungeons/vertical/marketplace.js +850 -0
  56. package/dungeons/vertical/media-schema.json +4749 -0
  57. package/dungeons/{media.js → vertical/media.js} +103 -19
  58. package/dungeons/vertical/rpg-schema.json +2491 -0
  59. package/dungeons/{rpg.js → vertical/rpg.js} +87 -60
  60. package/dungeons/vertical/sass-schema.json +3128 -0
  61. package/dungeons/{sass.js → vertical/sass.js} +65 -26
  62. package/dungeons/vertical/social-schema.json +620 -0
  63. package/dungeons/{social.js → vertical/social.js} +76 -17
  64. package/dungeons/vertical/travel-schema.json +580 -0
  65. package/dungeons/vertical/travel.js +742 -0
  66. package/index.js +20 -16
  67. package/lib/core/config-validator.js +286 -1
  68. package/lib/core/context.js +16 -5
  69. package/lib/core/storage.js +2 -0
  70. package/lib/generators/adspend.js +3 -3
  71. package/lib/generators/events.js +141 -14
  72. package/lib/generators/funnels.js +67 -7
  73. package/lib/generators/text.js +2 -2
  74. package/lib/orchestrators/user-loop.js +444 -22
  75. package/lib/templates/soup-presets.js +2 -2
  76. package/lib/utils/utils.js +4 -5
  77. package/package.json +4 -3
  78. package/scripts/dungeon-to-json.mjs +163 -0
  79. package/scripts/extract-dungeon-schema.mjs +343 -0
  80. package/scripts/json-to-dungeon.mjs +200 -0
  81. package/scripts/run-dungeon.mjs +76 -0
  82. package/scripts/run-many.mjs +118 -0
  83. package/scripts/verify-runner.mjs +42 -0
  84. package/types.d.ts +316 -1
  85. package/dungeons/array-of-object-lookup-schema.json +0 -327
  86. package/dungeons/ecommerce-schema.json +0 -462
  87. package/dungeons/education-schema.json +0 -2409
  88. package/dungeons/fintech-schema.json +0 -14034
  89. package/dungeons/foobar-schema.json +0 -403
  90. package/dungeons/food-delivery-schema.json +0 -192
  91. package/dungeons/food-delivery.js +0 -602
  92. package/dungeons/food-schema.json +0 -1152
  93. package/dungeons/gaming-schema.json +0 -1270
  94. package/dungeons/insurance-application-schema.json +0 -204
  95. package/dungeons/media-schema.json +0 -906
  96. package/dungeons/retention-cadence-schema.json +0 -78
  97. package/dungeons/rpg-schema.json +0 -4526
  98. package/dungeons/sanity-schema.json +0 -255
  99. package/dungeons/sass-schema.json +0 -1291
  100. package/dungeons/scd-schema.json +0 -919
  101. package/dungeons/simple-schema.json +0 -608
  102. package/dungeons/simplest-schema.json +0 -1418
  103. package/dungeons/social-schema.json +0 -1118
  104. package/dungeons/text-generation-schema.json +0 -3096
@@ -0,0 +1,549 @@
1
+ {
2
+ "events": [
3
+ {
4
+ "event": "account created",
5
+ "isFirstEvent": true,
6
+ "properties": {
7
+ "referral_source": [
8
+ "organic",
9
+ "doctor_referral",
10
+ "insurance_partner",
11
+ "social_media",
12
+ "search"
13
+ ]
14
+ }
15
+ },
16
+ {
17
+ "event": "symptom search",
18
+ "weight": 7,
19
+ "properties": {
20
+ "search_term": [
21
+ "headache",
22
+ "fever",
23
+ "cough",
24
+ "back pain",
25
+ "fatigue",
26
+ "anxiety",
27
+ "rash",
28
+ "nausea",
29
+ "chest pain",
30
+ "joint pain"
31
+ ],
32
+ "results_count": {
33
+ "$range": [
34
+ 4,
35
+ 20
36
+ ]
37
+ }
38
+ }
39
+ },
40
+ {
41
+ "event": "appointment booked",
42
+ "weight": 6,
43
+ "properties": {
44
+ "doctor_id": {
45
+ "$type": "string"
46
+ },
47
+ "clinic_id": {
48
+ "$type": "string"
49
+ },
50
+ "condition_type": [
51
+ "general",
52
+ "respiratory",
53
+ "dermatology",
54
+ "mental_health",
55
+ "chronic",
56
+ "pediatric"
57
+ ],
58
+ "wait_time_hours": {
59
+ "$range": [
60
+ 10,
61
+ 59
62
+ ]
63
+ },
64
+ "appointment_type": [
65
+ "new_patient",
66
+ "follow_up",
67
+ "urgent",
68
+ "routine"
69
+ ],
70
+ "after_hours": [
71
+ false
72
+ ]
73
+ }
74
+ },
75
+ {
76
+ "event": "consultation completed",
77
+ "weight": 5,
78
+ "properties": {
79
+ "doctor_id": {
80
+ "$type": "string"
81
+ },
82
+ "consultation_mode": [
83
+ "phone"
84
+ ],
85
+ "duration_minutes": {
86
+ "$range": [
87
+ 12,
88
+ 46
89
+ ]
90
+ },
91
+ "consultation_fee": {
92
+ "$range": [
93
+ 46,
94
+ 167
95
+ ]
96
+ },
97
+ "satisfaction_score": [
98
+ 2
99
+ ],
100
+ "condition_type": [
101
+ "general",
102
+ "respiratory",
103
+ "dermatology",
104
+ "mental_health",
105
+ "chronic",
106
+ "pediatric"
107
+ ],
108
+ "after_hours": [
109
+ false
110
+ ]
111
+ }
112
+ },
113
+ {
114
+ "event": "prescription issued",
115
+ "weight": 4,
116
+ "properties": {
117
+ "medication_type": [
118
+ "antibiotic",
119
+ "antiviral",
120
+ "painkiller",
121
+ "anti_inflammatory",
122
+ "antidepressant",
123
+ "inhaler",
124
+ "topical",
125
+ "chronic_maintenance"
126
+ ],
127
+ "quantity": {
128
+ "$range": [
129
+ 20,
130
+ 71
131
+ ]
132
+ },
133
+ "condition_type": [
134
+ "general",
135
+ "respiratory",
136
+ "dermatology",
137
+ "mental_health",
138
+ "chronic",
139
+ "pediatric"
140
+ ],
141
+ "refill_count": {
142
+ "$range": [
143
+ 0,
144
+ 3
145
+ ]
146
+ }
147
+ }
148
+ },
149
+ {
150
+ "event": "prescription refill",
151
+ "weight": 3,
152
+ "properties": {
153
+ "medication_type": [
154
+ "antibiotic",
155
+ "antiviral",
156
+ "painkiller",
157
+ "anti_inflammatory",
158
+ "antidepressant",
159
+ "inhaler",
160
+ "topical",
161
+ "chronic_maintenance"
162
+ ],
163
+ "quantity": {
164
+ "$range": [
165
+ 19,
166
+ 70
167
+ ]
168
+ },
169
+ "condition_type": [
170
+ "general",
171
+ "respiratory",
172
+ "dermatology",
173
+ "mental_health",
174
+ "chronic",
175
+ "pediatric"
176
+ ],
177
+ "refill_count": {
178
+ "$range": [
179
+ 1,
180
+ 5
181
+ ]
182
+ }
183
+ }
184
+ },
185
+ {
186
+ "event": "follow up scheduled",
187
+ "weight": 3,
188
+ "properties": {
189
+ "doctor_id": {
190
+ "$type": "string"
191
+ },
192
+ "days_until_followup": [
193
+ 21,
194
+ 12,
195
+ 23,
196
+ 11,
197
+ 17,
198
+ 10
199
+ ],
200
+ "condition_type": [
201
+ "general",
202
+ "respiratory",
203
+ "dermatology",
204
+ "mental_health",
205
+ "chronic",
206
+ "pediatric"
207
+ ],
208
+ "consultation_mode": [
209
+ "phone"
210
+ ]
211
+ }
212
+ },
213
+ {
214
+ "event": "message sent",
215
+ "weight": 5,
216
+ "properties": {
217
+ "message_type": [
218
+ "question",
219
+ "update",
220
+ "result_inquiry",
221
+ "prescription_question",
222
+ "scheduling"
223
+ ],
224
+ "recipient_role": [
225
+ "doctor",
226
+ "nurse",
227
+ "support"
228
+ ],
229
+ "response_time_hours": [
230
+ 11,
231
+ 13,
232
+ 18
233
+ ]
234
+ }
235
+ },
236
+ {
237
+ "event": "lab results viewed",
238
+ "weight": 3,
239
+ "properties": {
240
+ "test_type": [
241
+ "blood_panel",
242
+ "urinalysis",
243
+ "imaging",
244
+ "allergy_test",
245
+ "metabolic_panel",
246
+ "thyroid"
247
+ ],
248
+ "result_status": [
249
+ "normal",
250
+ "abnormal",
251
+ "pending"
252
+ ]
253
+ }
254
+ },
255
+ {
256
+ "event": "health record accessed",
257
+ "weight": 4,
258
+ "properties": {
259
+ "record_type": [
260
+ "visit_summary",
261
+ "lab_results",
262
+ "prescriptions",
263
+ "immunizations",
264
+ "billing"
265
+ ],
266
+ "access_method": [
267
+ "app",
268
+ "web_portal"
269
+ ]
270
+ }
271
+ },
272
+ {
273
+ "event": "insurance verified",
274
+ "weight": 2,
275
+ "properties": {
276
+ "insurance_type": [
277
+ "private",
278
+ "employer",
279
+ "medicare",
280
+ "medicaid",
281
+ "self_pay"
282
+ ],
283
+ "verification_status": [
284
+ "approved",
285
+ "pending",
286
+ "denied"
287
+ ],
288
+ "copay_amount": {
289
+ "$range": [
290
+ 12,
291
+ 61
292
+ ]
293
+ }
294
+ }
295
+ },
296
+ {
297
+ "event": "payment processed",
298
+ "weight": 3,
299
+ "properties": {
300
+ "amount": {
301
+ "$range": [
302
+ 105,
303
+ 431
304
+ ]
305
+ },
306
+ "payment_method": [
307
+ "credit_card",
308
+ "insurance_claim",
309
+ "hsa_fsa",
310
+ "debit"
311
+ ],
312
+ "payment_status": [
313
+ "success",
314
+ "failed"
315
+ ]
316
+ }
317
+ },
318
+ {
319
+ "event": "notification received",
320
+ "weight": 6,
321
+ "properties": {
322
+ "notification_type": [
323
+ "appointment_reminder",
324
+ "lab_ready",
325
+ "prescription_ready",
326
+ "message_received",
327
+ "billing"
328
+ ],
329
+ "channel": [
330
+ "push",
331
+ "email",
332
+ "sms"
333
+ ],
334
+ "opened": [
335
+ true,
336
+ false
337
+ ]
338
+ }
339
+ },
340
+ {
341
+ "event": "provider rated",
342
+ "weight": 2,
343
+ "properties": {
344
+ "doctor_id": {
345
+ "$type": "string"
346
+ },
347
+ "rating": [
348
+ 4,
349
+ 2
350
+ ],
351
+ "would_recommend": [
352
+ true,
353
+ false
354
+ ]
355
+ }
356
+ },
357
+ {
358
+ "event": "support ticket created",
359
+ "properties": {
360
+ "category": [
361
+ "billing",
362
+ "technical",
363
+ "scheduling",
364
+ "prescription",
365
+ "insurance",
366
+ "other"
367
+ ],
368
+ "priority": [
369
+ "low",
370
+ "medium",
371
+ "high"
372
+ ],
373
+ "resolution_hours": {
374
+ "$range": [
375
+ 20,
376
+ 75
377
+ ]
378
+ }
379
+ }
380
+ },
381
+ {
382
+ "event": "profile updated",
383
+ "weight": 2,
384
+ "properties": {
385
+ "field_updated": [
386
+ "insurance",
387
+ "address",
388
+ "phone",
389
+ "emergency_contact",
390
+ "allergies",
391
+ "medications"
392
+ ]
393
+ }
394
+ },
395
+ {
396
+ "event": "app session",
397
+ "weight": 8,
398
+ "properties": {
399
+ "session_duration_sec": {
400
+ "$range": [
401
+ 264,
402
+ 1480
403
+ ]
404
+ },
405
+ "pages_viewed": [
406
+ 11,
407
+ 7,
408
+ 9
409
+ ]
410
+ }
411
+ },
412
+ {
413
+ "event": "account deactivated",
414
+ "isChurnEvent": true,
415
+ "returnLikelihood": 0.15,
416
+ "isStrictEvent": true,
417
+ "properties": {
418
+ "reason": [
419
+ "switched_provider",
420
+ "cost",
421
+ "no_longer_needed",
422
+ "poor_experience",
423
+ "insurance_change"
424
+ ]
425
+ }
426
+ }
427
+ ],
428
+ "funnels": [
429
+ {
430
+ "sequence": [
431
+ "account created",
432
+ "insurance verified",
433
+ "symptom search",
434
+ "appointment booked"
435
+ ],
436
+ "name": "Onboarding Flow",
437
+ "isFirstFunnel": true,
438
+ "conversionRate": 45,
439
+ "timeToConvert": 72,
440
+ "weight": 3
441
+ },
442
+ {
443
+ "sequence": [
444
+ "symptom search",
445
+ "appointment booked",
446
+ "consultation completed"
447
+ ],
448
+ "name": "Booking to Consultation",
449
+ "conversionRate": 40,
450
+ "timeToConvert": 48,
451
+ "weight": 5
452
+ },
453
+ {
454
+ "sequence": [
455
+ "appointment booked",
456
+ "consultation completed",
457
+ "prescription issued",
458
+ "follow up scheduled"
459
+ ],
460
+ "name": "Full Care Journey",
461
+ "conversionRate": 30,
462
+ "timeToConvert": 168,
463
+ "weight": 3
464
+ },
465
+ {
466
+ "sequence": [
467
+ "prescription issued",
468
+ "prescription refill",
469
+ "payment processed"
470
+ ],
471
+ "name": "Prescription Lifecycle",
472
+ "conversionRate": 55,
473
+ "timeToConvert": 720,
474
+ "weight": 2
475
+ },
476
+ {
477
+ "sequence": [
478
+ "consultation completed",
479
+ "provider rated",
480
+ "follow up scheduled"
481
+ ],
482
+ "name": "Patient Satisfaction",
483
+ "conversionRate": 25,
484
+ "timeToConvert": 72,
485
+ "weight": 2
486
+ }
487
+ ],
488
+ "superProps": {
489
+ "subscription_tier": [
490
+ "free",
491
+ "basic",
492
+ "premium"
493
+ ],
494
+ "platform": [
495
+ "ios",
496
+ "android",
497
+ "web"
498
+ ]
499
+ },
500
+ "userProps": {
501
+ "role": [
502
+ "patient",
503
+ "nurse",
504
+ "doctor"
505
+ ],
506
+ "specialty": [
507
+ "none"
508
+ ],
509
+ "years_experience": {
510
+ "$range": [
511
+ 0,
512
+ 5
513
+ ]
514
+ },
515
+ "preferred_language": [
516
+ "en",
517
+ "es",
518
+ "pt",
519
+ "de",
520
+ "fr"
521
+ ],
522
+ "has_chronic_condition": [
523
+ false,
524
+ true
525
+ ],
526
+ "age_range": [
527
+ "18-25",
528
+ "26-35",
529
+ "36-45",
530
+ "46-55",
531
+ "56-65",
532
+ "65+"
533
+ ]
534
+ },
535
+ "scdProps": {
536
+ "care_plan": {
537
+ "type": "user",
538
+ "frequency": "month",
539
+ "timing": "fuzzy",
540
+ "max": 8,
541
+ "values": [
542
+ "preventive",
543
+ "routine",
544
+ "chronic",
545
+ "acute"
546
+ ]
547
+ }
548
+ }
549
+ }