@ak--47/dungeon-master 1.0.0 → 1.1.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 (103) 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 +91 -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} +11 -4
  8. package/dungeons/technical/experiments-schema.json +197 -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} +2 -2
  12. package/dungeons/technical/group-analytics-schema.json +149 -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} +1 -1
  20. package/dungeons/technical/sanity-schema.json +185 -0
  21. package/dungeons/{sanity.js → technical/sanity.js} +3 -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 +270 -0
  25. package/dungeons/{scd.js → technical/scd.js} +19 -10
  26. package/dungeons/technical/simple-schema.json +278 -0
  27. package/dungeons/{simple.js → technical/simple.js} +6 -6
  28. package/dungeons/technical/simplest-schema.json +635 -0
  29. package/dungeons/{simplest.js → technical/simplest.js} +6 -6
  30. package/dungeons/technical/text-generation-schema.json +1059 -0
  31. package/dungeons/{text-generation.js → technical/text-generation.js} +23 -9
  32. package/dungeons/vertical/community-schema.json +557 -0
  33. package/dungeons/vertical/community.js +788 -0
  34. package/dungeons/vertical/devtools-schema.json +580 -0
  35. package/dungeons/vertical/devtools.js +837 -0
  36. package/dungeons/vertical/ecommerce-schema.json +586 -0
  37. package/dungeons/{ecommerce.js → vertical/ecommerce.js} +34 -3
  38. package/dungeons/vertical/education-schema.json +697 -0
  39. package/dungeons/{education.js → vertical/education.js} +54 -36
  40. package/dungeons/vertical/fintech-schema.json +563 -0
  41. package/dungeons/{fintech.js → vertical/fintech.js} +91 -53
  42. package/dungeons/vertical/fitness-schema.json +508 -0
  43. package/dungeons/vertical/fitness.js +802 -0
  44. package/dungeons/vertical/food-delivery-schema.json +678 -0
  45. package/dungeons/{food.js → vertical/food-delivery.js} +51 -23
  46. package/dungeons/vertical/gaming-schema.json +394 -0
  47. package/dungeons/{gaming.js → vertical/gaming.js} +9 -7
  48. package/dungeons/vertical/healthcare-schema.json +527 -0
  49. package/dungeons/vertical/healthcare.js +769 -0
  50. package/dungeons/vertical/insurance-application-schema.json +466 -0
  51. package/dungeons/{insurance-application.js → vertical/insurance-application.js} +33 -29
  52. package/dungeons/vertical/logistics-schema.json +552 -0
  53. package/dungeons/vertical/logistics.js +793 -0
  54. package/dungeons/vertical/marketplace-schema.json +511 -0
  55. package/dungeons/vertical/marketplace.js +844 -0
  56. package/dungeons/vertical/media-schema.json +787 -0
  57. package/dungeons/{media.js → vertical/media.js} +94 -16
  58. package/dungeons/vertical/rpg-schema.json +654 -0
  59. package/dungeons/{rpg.js → vertical/rpg.js} +78 -57
  60. package/dungeons/vertical/sass-schema.json +653 -0
  61. package/dungeons/{sass.js → vertical/sass.js} +49 -23
  62. package/dungeons/vertical/social-schema.json +552 -0
  63. package/dungeons/{social.js → vertical/social.js} +60 -14
  64. package/dungeons/vertical/travel-schema.json +558 -0
  65. package/dungeons/vertical/travel.js +736 -0
  66. package/index.js +19 -15
  67. package/lib/core/config-validator.js +286 -1
  68. package/lib/core/context.js +7 -5
  69. package/lib/generators/adspend.js +3 -3
  70. package/lib/generators/events.js +141 -14
  71. package/lib/generators/funnels.js +67 -7
  72. package/lib/generators/text.js +2 -2
  73. package/lib/orchestrators/user-loop.js +441 -22
  74. package/lib/templates/soup-presets.js +2 -2
  75. package/lib/utils/utils.js +4 -5
  76. package/package.json +4 -3
  77. package/scripts/dungeon-to-json.mjs +163 -0
  78. package/scripts/extract-dungeon-schema.mjs +297 -0
  79. package/scripts/json-to-dungeon.mjs +200 -0
  80. package/scripts/run-dungeon.mjs +76 -0
  81. package/scripts/run-many.mjs +118 -0
  82. package/scripts/verify-runner.mjs +42 -0
  83. package/types.d.ts +313 -1
  84. package/dungeons/array-of-object-lookup-schema.json +0 -327
  85. package/dungeons/ecommerce-schema.json +0 -462
  86. package/dungeons/education-schema.json +0 -2409
  87. package/dungeons/fintech-schema.json +0 -14034
  88. package/dungeons/foobar-schema.json +0 -403
  89. package/dungeons/food-delivery-schema.json +0 -192
  90. package/dungeons/food-delivery.js +0 -602
  91. package/dungeons/food-schema.json +0 -1152
  92. package/dungeons/gaming-schema.json +0 -1270
  93. package/dungeons/insurance-application-schema.json +0 -204
  94. package/dungeons/media-schema.json +0 -906
  95. package/dungeons/retention-cadence-schema.json +0 -78
  96. package/dungeons/rpg-schema.json +0 -4526
  97. package/dungeons/sanity-schema.json +0 -255
  98. package/dungeons/sass-schema.json +0 -1291
  99. package/dungeons/scd-schema.json +0 -919
  100. package/dungeons/simple-schema.json +0 -608
  101. package/dungeons/simplest-schema.json +0 -1418
  102. package/dungeons/social-schema.json +0 -1118
  103. package/dungeons/text-generation-schema.json +0 -3096
@@ -1,8 +1,8 @@
1
1
  import dayjs from "dayjs";
2
2
  import utc from "dayjs/plugin/utc.js";
3
3
  import "dotenv/config";
4
- import { weighNumRange, range, date, initChance, exhaust, choose, integer } from "../lib/utils/utils.js";
5
- import { createTextGenerator, generateBatch } from "../lib/generators/text.js";
4
+ import { weighNumRange, range, date, initChance, exhaust, choose, integer } from "../../lib/utils/utils.js";
5
+ import { createTextGenerator, generateBatch } from "../../lib/generators/text.js";
6
6
 
7
7
  const SEED = "SUPER DUPER DANGEROUS BROOO";
8
8
  dayjs.extend(utc);
@@ -435,7 +435,8 @@ const dungeon = {
435
435
  has_screenshot: [true, true, false, false], // 50% have screenshots
436
436
  channel: ["email", "phone", "chat", "portal"],
437
437
  is_resolved: [true, true, true, false], // 75% resolved
438
- resolution_time_minutes: weighNumRange(15, 2880, 0.6) // 15min to 2 days
438
+ resolution_time_minutes: weighNumRange(15, 2880, 0.6), // 15min to 2 days
439
+ auto_escalated: [false],
439
440
  }
440
441
  },
441
442
  {
@@ -576,7 +577,9 @@ const dungeon = {
576
577
  is_reproducible: [true, true, true, false], // 75% reproducible
577
578
  affects_workflow: [true, true, false], // 67% affect workflow
578
579
  has_screenshot: [true, true, false], // 67% include screenshots
579
- reporter_role: ["admin", "user", "developer", "qa_tester"]
580
+ reporter_role: ["admin", "user", "developer", "qa_tester"],
581
+ requires_immediate_review: [false],
582
+ estimated_fix_hours: weighNumRange(1, 8, 0.4),
580
583
  }
581
584
  },
582
585
  {
@@ -726,9 +729,18 @@ const dungeon = {
726
729
  affects_production: [true, false, false], // 33% affect production
727
730
  resolution_status: ["open", "investigating", "resolved", "closed"]
728
731
  }
732
+ },
733
+ {
734
+ event: "satisfaction_survey_triggered",
735
+ weight: 0,
736
+ isStrictEvent: true,
737
+ properties: {
738
+ survey_type: ["quarterly_nps"],
739
+ score: weighNumRange(1, 10, 0.3),
740
+ }
729
741
  }
730
742
  ],
731
-
743
+
732
744
  funnels: [
733
745
 
734
746
  ],
@@ -746,7 +758,7 @@ const dungeon = {
746
758
 
747
759
  userProps: {
748
760
  account_age_days: weighNumRange(0, 1095, 0.4),
749
- user_tier: ["free", "free", "basic", "pro", "enterprise"],
761
+ user_tier: ["free", "free", "basic", "pro", "enterprise"],
750
762
  signup_method: ["email", "google", "microsoft", "sso", "invite"],
751
763
  notification_enabled: [true, true, false],
752
764
  has_purchased: [true, false, false],
@@ -756,7 +768,9 @@ const dungeon = {
756
768
  technical_expertise: ["beginner", "intermediate", "advanced", "expert"],
757
769
  engagement_score: weighNumRange(0, 100, 0.3), // Most users low engagement
758
770
  last_active_days_ago: weighNumRange(0, 30, 0.6),
759
- preferred_communication: ["email", "chat", "phone", "self_service"]
771
+ preferred_communication: ["email", "chat", "phone", "self_service"],
772
+ is_power_user: [false],
773
+ risk_level: ["healthy"],
760
774
  },
761
775
 
762
776
  // ============= Slowly Changing Dimensions =============
@@ -794,12 +808,12 @@ const dungeon = {
794
808
  if (meta.profile.user_tier === "enterprise" && record.length > 5) {
795
809
  const lastEvent = record[record.length - 1];
796
810
  record.push({
811
+ ...lastEvent,
797
812
  event: "satisfaction_survey_triggered",
798
813
  time: lastEvent.time,
799
814
  user_id: lastEvent.user_id,
800
- product_tier: "enterprise",
801
815
  survey_type: "quarterly_nps",
802
- score: chance.integer({ min: 1, max: 10 })
816
+ score: chance.integer({ min: 1, max: 10 }),
803
817
  });
804
818
  }
805
819
  return record;
@@ -0,0 +1,557 @@
1
+ {
2
+ "events": [
3
+ {
4
+ "event": "account created",
5
+ "isFirstEvent": true,
6
+ "properties": {
7
+ "referral_source": [
8
+ "organic",
9
+ "google_search",
10
+ "reddit_referral",
11
+ "youtube_link",
12
+ "friend_invite"
13
+ ]
14
+ }
15
+ },
16
+ {
17
+ "event": "article viewed",
18
+ "weight": 9,
19
+ "properties": {
20
+ "wiki_id": {
21
+ "$type": "string"
22
+ },
23
+ "content_hub": [
24
+ "gaming",
25
+ "anime",
26
+ "movies",
27
+ "tv",
28
+ "comics",
29
+ "music"
30
+ ],
31
+ "view_count": {
32
+ "$range": [
33
+ 23,
34
+ 79
35
+ ]
36
+ },
37
+ "time_on_page_sec": {
38
+ "$range": [
39
+ 123,
40
+ 496
41
+ ]
42
+ },
43
+ "is_weekend": [
44
+ false
45
+ ]
46
+ }
47
+ },
48
+ {
49
+ "event": "article published",
50
+ "weight": 3,
51
+ "properties": {
52
+ "wiki_id": {
53
+ "$type": "string"
54
+ },
55
+ "content_hub": [
56
+ "gaming",
57
+ "anime",
58
+ "movies",
59
+ "tv",
60
+ "comics",
61
+ "music"
62
+ ],
63
+ "word_count": {
64
+ "$range": [
65
+ 802,
66
+ 4228
67
+ ]
68
+ },
69
+ "has_images": [
70
+ true,
71
+ false
72
+ ],
73
+ "category": [
74
+ "lore",
75
+ "character",
76
+ "episode_guide",
77
+ "review",
78
+ "tutorial",
79
+ "news"
80
+ ],
81
+ "is_weekend": [
82
+ false
83
+ ],
84
+ "poll_enabled": [
85
+ false
86
+ ]
87
+ }
88
+ },
89
+ {
90
+ "event": "article edited",
91
+ "weight": 4,
92
+ "properties": {
93
+ "wiki_id": {
94
+ "$type": "string"
95
+ },
96
+ "content_hub": [
97
+ "gaming",
98
+ "anime",
99
+ "movies",
100
+ "tv",
101
+ "comics",
102
+ "music"
103
+ ],
104
+ "edit_type": [
105
+ "content",
106
+ "formatting",
107
+ "grammar",
108
+ "citation",
109
+ "revert"
110
+ ],
111
+ "edit_quality": [
112
+ 2,
113
+ 3
114
+ ],
115
+ "chars_changed": {
116
+ "$range": [
117
+ 372,
118
+ 1596
119
+ ]
120
+ }
121
+ }
122
+ },
123
+ {
124
+ "event": "discussion posted",
125
+ "weight": 5,
126
+ "properties": {
127
+ "community_id": {
128
+ "$type": "string"
129
+ },
130
+ "content_hub": [
131
+ "gaming",
132
+ "anime",
133
+ "movies",
134
+ "tv",
135
+ "comics",
136
+ "music"
137
+ ],
138
+ "topic_type": [
139
+ "theory",
140
+ "question",
141
+ "news",
142
+ "review",
143
+ "recommendation",
144
+ "debate"
145
+ ],
146
+ "reply_count": [
147
+ 35,
148
+ 18,
149
+ 39,
150
+ 13,
151
+ 14
152
+ ],
153
+ "discussion_mode": [
154
+ "classic"
155
+ ]
156
+ }
157
+ },
158
+ {
159
+ "event": "comment posted",
160
+ "weight": 6,
161
+ "properties": {
162
+ "community_id": {
163
+ "$type": "string"
164
+ },
165
+ "content_hub": [
166
+ "gaming",
167
+ "anime",
168
+ "movies",
169
+ "tv",
170
+ "comics",
171
+ "music"
172
+ ],
173
+ "comment_length": {
174
+ "$range": [
175
+ 93,
176
+ 411
177
+ ]
178
+ },
179
+ "is_reply": [
180
+ true,
181
+ false
182
+ ],
183
+ "discussion_mode": [
184
+ "classic"
185
+ ]
186
+ }
187
+ },
188
+ {
189
+ "event": "upvote given",
190
+ "weight": 7,
191
+ "properties": {
192
+ "content_type": [
193
+ "article",
194
+ "discussion",
195
+ "comment"
196
+ ],
197
+ "content_hub": [
198
+ "gaming",
199
+ "anime",
200
+ "movies",
201
+ "tv",
202
+ "comics",
203
+ "music"
204
+ ],
205
+ "upvote_count": [
206
+ 3,
207
+ 5
208
+ ]
209
+ }
210
+ },
211
+ {
212
+ "event": "search performed",
213
+ "weight": 6,
214
+ "properties": {
215
+ "search_term": [
216
+ "walkthrough",
217
+ "character list",
218
+ "ending explained",
219
+ "tier list",
220
+ "release date",
221
+ "easter eggs",
222
+ "best builds",
223
+ "lore timeline",
224
+ "voice actors",
225
+ "soundtrack"
226
+ ],
227
+ "results_count": {
228
+ "$range": [
229
+ 11,
230
+ 38
231
+ ]
232
+ },
233
+ "content_hub": [
234
+ "gaming",
235
+ "anime",
236
+ "movies",
237
+ "tv",
238
+ "comics",
239
+ "music"
240
+ ]
241
+ }
242
+ },
243
+ {
244
+ "event": "wiki page created",
245
+ "weight": 2,
246
+ "properties": {
247
+ "wiki_id": {
248
+ "$type": "string"
249
+ },
250
+ "content_hub": [
251
+ "gaming",
252
+ "anime",
253
+ "movies",
254
+ "tv",
255
+ "comics",
256
+ "music"
257
+ ],
258
+ "page_type": [
259
+ "character",
260
+ "location",
261
+ "item",
262
+ "episode",
263
+ "concept",
264
+ "organization"
265
+ ],
266
+ "word_count": {
267
+ "$range": [
268
+ 536,
269
+ 2605
270
+ ]
271
+ }
272
+ }
273
+ },
274
+ {
275
+ "event": "media uploaded",
276
+ "weight": 2,
277
+ "properties": {
278
+ "media_type": [
279
+ "image",
280
+ "gif",
281
+ "video_clip",
282
+ "screenshot"
283
+ ],
284
+ "file_size_kb": {
285
+ "$range": [
286
+ 882,
287
+ 4292
288
+ ]
289
+ },
290
+ "content_hub": [
291
+ "gaming",
292
+ "anime",
293
+ "movies",
294
+ "tv",
295
+ "comics",
296
+ "music"
297
+ ]
298
+ }
299
+ },
300
+ {
301
+ "event": "moderation action",
302
+ "weight": 2,
303
+ "properties": {
304
+ "action_type": [
305
+ "warn",
306
+ "edit_revert",
307
+ "content_removal",
308
+ "user_mute",
309
+ "spam_flag",
310
+ "lock_thread"
311
+ ],
312
+ "severity": [
313
+ "low",
314
+ "medium",
315
+ "high"
316
+ ],
317
+ "content_hub": [
318
+ "gaming",
319
+ "anime",
320
+ "movies",
321
+ "tv",
322
+ "comics",
323
+ "music"
324
+ ],
325
+ "resolution_time_hours": [
326
+ 11,
327
+ 12
328
+ ]
329
+ }
330
+ },
331
+ {
332
+ "event": "user followed",
333
+ "weight": 3,
334
+ "properties": {
335
+ "follow_source": [
336
+ "profile",
337
+ "article",
338
+ "discussion",
339
+ "recommendation"
340
+ ]
341
+ }
342
+ },
343
+ {
344
+ "event": "notification received",
345
+ "weight": 6,
346
+ "properties": {
347
+ "notification_type": [
348
+ "reply",
349
+ "mention",
350
+ "upvote",
351
+ "follow",
352
+ "article_update",
353
+ "moderation"
354
+ ],
355
+ "channel": [
356
+ "push",
357
+ "email",
358
+ "in_app"
359
+ ],
360
+ "opened": [
361
+ true,
362
+ false
363
+ ]
364
+ }
365
+ },
366
+ {
367
+ "event": "support ticket created",
368
+ "properties": {
369
+ "category": [
370
+ "bug_report",
371
+ "content_dispute",
372
+ "account_issue",
373
+ "feature_request",
374
+ "abuse_report",
375
+ "other"
376
+ ],
377
+ "priority": [
378
+ "low",
379
+ "medium",
380
+ "high"
381
+ ],
382
+ "resolution_hours": {
383
+ "$range": [
384
+ 19,
385
+ 74
386
+ ]
387
+ }
388
+ }
389
+ },
390
+ {
391
+ "event": "profile updated",
392
+ "weight": 2,
393
+ "properties": {
394
+ "field_updated": [
395
+ "avatar",
396
+ "bio",
397
+ "display_name",
398
+ "preferred_hub",
399
+ "notification_settings",
400
+ "badges"
401
+ ]
402
+ }
403
+ },
404
+ {
405
+ "event": "app session",
406
+ "weight": 8,
407
+ "properties": {
408
+ "session_duration_sec": {
409
+ "$range": [
410
+ 250,
411
+ 2913
412
+ ]
413
+ },
414
+ "pages_viewed": [
415
+ 8,
416
+ 7,
417
+ 22,
418
+ 9,
419
+ 23
420
+ ]
421
+ }
422
+ },
423
+ {
424
+ "event": "report submitted",
425
+ "properties": {
426
+ "report_type": [
427
+ "spam",
428
+ "harassment",
429
+ "misinformation",
430
+ "vandalism",
431
+ "copyright",
432
+ "other"
433
+ ],
434
+ "content_type": [
435
+ "article",
436
+ "comment",
437
+ "discussion",
438
+ "media"
439
+ ]
440
+ }
441
+ },
442
+ {
443
+ "event": "account deactivated",
444
+ "properties": {
445
+ "reason": [
446
+ "lost_interest",
447
+ "toxicity",
448
+ "no_time",
449
+ "switched_platform",
450
+ "privacy_concern"
451
+ ]
452
+ }
453
+ }
454
+ ],
455
+ "superProps": {
456
+ "subscription_tier": [
457
+ "free",
458
+ "supporter",
459
+ "pro"
460
+ ],
461
+ "platform": [
462
+ "ios",
463
+ "android",
464
+ "web"
465
+ ],
466
+ "content_hub": [
467
+ "gaming",
468
+ "anime",
469
+ "movies",
470
+ "tv",
471
+ "comics",
472
+ "music"
473
+ ]
474
+ },
475
+ "userProps": {
476
+ "role": [
477
+ "reader",
478
+ "contributor",
479
+ "moderator",
480
+ "creator"
481
+ ],
482
+ "contributor_level": [
483
+ "newcomer"
484
+ ],
485
+ "articles_created": [
486
+ 0
487
+ ],
488
+ "reputation_score": {
489
+ "$range": [
490
+ 20,
491
+ 76
492
+ ]
493
+ },
494
+ "preferred_hub": [
495
+ "gaming",
496
+ "anime",
497
+ "movies",
498
+ "tv",
499
+ "comics",
500
+ "music"
501
+ ]
502
+ },
503
+ "funnels": [
504
+ {
505
+ "sequence": [
506
+ "account created",
507
+ "search performed",
508
+ "article viewed",
509
+ "discussion posted"
510
+ ],
511
+ "isFirstFunnel": true,
512
+ "conversionRate": 40,
513
+ "timeToConvert": 72,
514
+ "weight": 3
515
+ },
516
+ {
517
+ "sequence": [
518
+ "article viewed",
519
+ "article published",
520
+ "comment posted"
521
+ ],
522
+ "conversionRate": 35,
523
+ "timeToConvert": 48,
524
+ "weight": 5
525
+ },
526
+ {
527
+ "sequence": [
528
+ "article viewed",
529
+ "upvote given",
530
+ "comment posted",
531
+ "discussion posted"
532
+ ],
533
+ "conversionRate": 30,
534
+ "timeToConvert": 96,
535
+ "weight": 4
536
+ },
537
+ {
538
+ "sequence": [
539
+ "article published",
540
+ "profile updated",
541
+ "notification received"
542
+ ],
543
+ "conversionRate": 45,
544
+ "timeToConvert": 168,
545
+ "weight": 2
546
+ },
547
+ {
548
+ "sequence": [
549
+ "report submitted",
550
+ "moderation action"
551
+ ],
552
+ "conversionRate": 60,
553
+ "timeToConvert": 48,
554
+ "weight": 2
555
+ }
556
+ ]
557
+ }