@ak--47/dungeon-master 1.2.2 → 1.3.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 (52) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +51 -13
  3. package/dungeons/technical/ad-spend.js +2 -2
  4. package/dungeons/technical/anonymous-users.js +2 -2
  5. package/dungeons/technical/array-of-object-lookup.js +2 -2
  6. package/dungeons/technical/experiments.js +2 -2
  7. package/dungeons/technical/foobar.js +2 -2
  8. package/dungeons/technical/group-analytics.js +2 -2
  9. package/dungeons/technical/mirror-strategies.js +2 -2
  10. package/dungeons/technical/nested-objects.js +2 -2
  11. package/dungeons/technical/retention-cadence.js +2 -3
  12. package/dungeons/technical/sanity.js +2 -2
  13. package/dungeons/technical/scale-test.js +2 -2
  14. package/dungeons/technical/scd.js +2 -2
  15. package/dungeons/technical/simple.js +2 -2
  16. package/dungeons/technical/simplest.js +2 -2
  17. package/dungeons/technical/text-generation.js +2 -2
  18. package/dungeons/vertical/ai-platform-schema.json +617 -0
  19. package/dungeons/vertical/ai-platform.js +799 -0
  20. package/dungeons/vertical/community.js +40 -26
  21. package/dungeons/vertical/crypto-schema.json +546 -0
  22. package/dungeons/vertical/crypto.js +721 -0
  23. package/dungeons/vertical/dating-schema.json +401 -0
  24. package/dungeons/vertical/dating.js +798 -0
  25. package/dungeons/vertical/devtools.js +13 -9
  26. package/dungeons/vertical/ecommerce.js +2 -3
  27. package/dungeons/vertical/education.js +4 -5
  28. package/dungeons/vertical/fintech.js +32 -29
  29. package/dungeons/vertical/fitness.js +2 -3
  30. package/dungeons/vertical/food-delivery.js +37 -43
  31. package/dungeons/vertical/gaming-schema.json +2495 -230
  32. package/dungeons/vertical/gaming.js +771 -388
  33. package/dungeons/vertical/healthcare.js +2 -3
  34. package/dungeons/vertical/insurance-application.js +2 -3
  35. package/dungeons/vertical/logistics.js +20 -14
  36. package/dungeons/vertical/marketplace.js +22 -14
  37. package/dungeons/vertical/media.js +39 -30
  38. package/dungeons/vertical/real-estate-schema.json +527 -0
  39. package/dungeons/vertical/real-estate.js +774 -0
  40. package/dungeons/vertical/sass.js +2 -3
  41. package/dungeons/vertical/social.js +15 -13
  42. package/dungeons/vertical/travel.js +59 -26
  43. package/lib/core/config-validator.js +71 -15
  44. package/lib/core/storage.js +14 -4
  45. package/lib/orchestrators/user-loop.js +39 -5
  46. package/lib/templates/macro-presets.js +111 -0
  47. package/lib/templates/soup-presets.js +19 -36
  48. package/package.json +8 -2
  49. package/types.d.ts +219 -42
  50. package/dungeons/user/.gitkeep +0 -0
  51. package/dungeons/vertical/rpg-schema.json +0 -2491
  52. package/dungeons/vertical/rpg.js +0 -976
@@ -2,7 +2,7 @@
2
2
  const SEED = "dm4-community";
3
3
  const num_days = 100;
4
4
  const num_users = 5_000;
5
- const avg_events_per_user = 120;
5
+ const avg_events_per_user_per_day = 1.2;
6
6
  let token = "your-mixpanel-token";
7
7
 
8
8
  // ── env overrides ──
@@ -259,7 +259,7 @@ const config = {
259
259
  token,
260
260
  seed: SEED,
261
261
  numDays: num_days,
262
- numEvents: num_users * avg_events_per_user,
262
+ avgEventsPerUserPerDay: avg_events_per_user_per_day,
263
263
  numUsers: num_users,
264
264
  hasAnonIds: false,
265
265
  hasSessionIds: true,
@@ -274,7 +274,6 @@ const config = {
274
274
  hasCampaigns: false,
275
275
  isAnonymous: false,
276
276
  hasAdSpend: false,
277
- percentUsersBornInDataset: 35,
278
277
  hasAvatar: true,
279
278
  concurrency: 1,
280
279
  writeToDisk: false,
@@ -699,30 +698,13 @@ const config = {
699
698
  // Conversion differences handled in everything hook via event filtering.
700
699
  // (funnel-pre conversionRate modifications are diluted by organic events)
701
700
 
702
- // -- HOOK 1: WEEKEND CONTENT SURGE (event) --------------------
703
- // Articles published on weekends get 1.5x word_count.
704
- if (type === "event") {
705
- if (record.event === "article published" || record.event === "article viewed") {
706
- const dow = dayjs(record.time).day();
707
- if (dow === 0 || dow === 6) {
708
- record.is_weekend = true;
709
- if (record.word_count) {
710
- record.word_count = Math.floor(record.word_count * 1.5);
711
- }
712
- }
713
- }
701
+ // -- HOOK 1: WEEKEND CONTENT SURGE ----------------------------
702
+ // Moved to everything hook (after sessionization) so DOW tags
703
+ // match final timestamps. See everything hook below.
714
704
 
715
- // -- HOOK 2: TRENDING TOPIC WINDOW (event) ----------------
716
- // Days 35-50: gaming hub articles get 2x view_count.
717
- const TREND_START = DATASET_START.add(35, "days");
718
- const TREND_END = DATASET_START.add(50, "days");
719
- const eventTime = dayjs(record.time);
720
- if (record.event === "article viewed" && eventTime.isAfter(TREND_START) && eventTime.isBefore(TREND_END)) {
721
- if (record.content_hub === "gaming") {
722
- record.view_count = Math.floor((record.view_count || 50) * 2);
723
- }
724
- }
725
- }
705
+ // -- HOOK 2: TRENDING TOPIC WINDOW ----------------------------
706
+ // Moved to everything hook (after superProp stamping) so it
707
+ // uses the profile's consistent content_hub.
726
708
 
727
709
  // -- EVERYTHING HOOKS -----------------------------------------
728
710
  if (type === "everything") {
@@ -739,6 +721,38 @@ const config = {
739
721
  if (profile.content_hub) e.content_hub = profile.content_hub;
740
722
  });
741
723
 
724
+ // -- HOOK 1: WEEKEND CONTENT SURGE -------------------------
725
+ // Articles published/viewed on weekends get 1.5x word_count.
726
+ // Runs after sessionization so DOW tags match final timestamps.
727
+ for (const e of events) {
728
+ if (e.event === 'article published' || e.event === 'article viewed') {
729
+ const dow = new Date(e.time).getUTCDay();
730
+ if (dow === 0 || dow === 6) {
731
+ e.is_weekend = true;
732
+ if (e.word_count) {
733
+ e.word_count = Math.floor(e.word_count * 1.5);
734
+ }
735
+ }
736
+ }
737
+ }
738
+
739
+ // -- HOOK 2: TRENDING TOPIC WINDOW -------------------------
740
+ // Days 35-50: gaming hub articles get 2x view_count.
741
+ // Runs after superProp stamping so content_hub is the
742
+ // profile's consistent value, not the random event-level one.
743
+ const TREND_START = DATASET_START.add(35, "days");
744
+ const TREND_END = DATASET_START.add(50, "days");
745
+ if (profile.content_hub === "gaming") {
746
+ events.forEach(e => {
747
+ if (e.event === "article viewed") {
748
+ const eventTime = dayjs(e.time);
749
+ if (eventTime.isAfter(TREND_START) && eventTime.isBefore(TREND_END)) {
750
+ e.view_count = Math.floor((e.view_count || 50) * 2);
751
+ }
752
+ }
753
+ });
754
+ }
755
+
742
756
  // -- HOOK 8: PRO SUBSCRIBER CONTENT CREATION LIFT ---------
743
757
  // Free-tier users drop 35% of final funnel step events to
744
758
  // create visible conversion gap vs paid subscribers.
@@ -0,0 +1,546 @@
1
+ {
2
+ "events": [
3
+ {
4
+ "event": "wallet connected",
5
+ "isFirstEvent": true,
6
+ "properties": {
7
+ "wallet_type": [
8
+ "MetaMask",
9
+ "Phantom",
10
+ "Coinbase Wallet",
11
+ "Rainbow",
12
+ "WalletConnect"
13
+ ],
14
+ "chain": [
15
+ "Ethereum",
16
+ "Solana",
17
+ "Base",
18
+ "Arbitrum",
19
+ "Polygon"
20
+ ]
21
+ }
22
+ },
23
+ {
24
+ "event": "kyc started",
25
+ "weight": 2,
26
+ "properties": {
27
+ "document_type": [
28
+ "passport",
29
+ "drivers_license",
30
+ "national_id"
31
+ ],
32
+ "verification_method": [
33
+ "selfie",
34
+ "video",
35
+ "document_scan"
36
+ ]
37
+ }
38
+ },
39
+ {
40
+ "event": "kyc completed",
41
+ "properties": {
42
+ "document_type": [
43
+ "passport",
44
+ "drivers_license",
45
+ "national_id"
46
+ ],
47
+ "verification_method": [
48
+ "selfie",
49
+ "video",
50
+ "document_scan"
51
+ ]
52
+ }
53
+ },
54
+ {
55
+ "event": "deposit",
56
+ "weight": 5,
57
+ "properties": {
58
+ "token": [
59
+ "ETH",
60
+ "USDC",
61
+ "USDT",
62
+ "SOL",
63
+ "BTC"
64
+ ],
65
+ "deposit_amount_usd": {
66
+ "$range": [
67
+ 956,
68
+ 4090
69
+ ]
70
+ },
71
+ "chain": [
72
+ "Ethereum",
73
+ "Solana",
74
+ "Base",
75
+ "Arbitrum",
76
+ "Polygon"
77
+ ],
78
+ "deposit_method": [
79
+ "wallet_transfer",
80
+ "bridge",
81
+ "on_ramp",
82
+ "exchange_transfer"
83
+ ],
84
+ "kyc_verified": [
85
+ false
86
+ ]
87
+ }
88
+ },
89
+ {
90
+ "event": "withdrawal",
91
+ "weight": 3,
92
+ "properties": {
93
+ "token": [
94
+ "ETH",
95
+ "USDC",
96
+ "USDT",
97
+ "SOL",
98
+ "BTC"
99
+ ],
100
+ "amount_usd": {
101
+ "$range": [
102
+ 817,
103
+ 4217
104
+ ]
105
+ },
106
+ "chain": [
107
+ "Ethereum",
108
+ "Solana",
109
+ "Base",
110
+ "Arbitrum",
111
+ "Polygon"
112
+ ],
113
+ "withdrawal_method": [
114
+ "wallet_transfer",
115
+ "bridge",
116
+ "off_ramp",
117
+ "exchange_transfer"
118
+ ]
119
+ }
120
+ },
121
+ {
122
+ "event": "swap",
123
+ "weight": 10,
124
+ "properties": {
125
+ "token_pair": [
126
+ "ETH/USDC",
127
+ "ETH/USDT",
128
+ "BTC/USDC",
129
+ "SOL/USDC",
130
+ "MATIC/ETH",
131
+ "ARB/ETH",
132
+ "OP/USDC",
133
+ "AVAX/USDC",
134
+ "LINK/ETH",
135
+ "UNI/USDC",
136
+ "AAVE/ETH",
137
+ "CRV/USDC",
138
+ "DOGE/USDT",
139
+ "PEPE/ETH",
140
+ "APE/USDC"
141
+ ],
142
+ "trade_amount_usd": {
143
+ "$range": [
144
+ 1946,
145
+ 8471
146
+ ]
147
+ },
148
+ "gas_fee_usd": [
149
+ 20,
150
+ 8,
151
+ 19,
152
+ 13
153
+ ],
154
+ "swap_status": [
155
+ "completed",
156
+ "pending",
157
+ "failed"
158
+ ],
159
+ "slippage_pct": [
160
+ 1
161
+ ],
162
+ "maker_fee_pct": [
163
+ 0.3
164
+ ],
165
+ "is_whale": [
166
+ false
167
+ ],
168
+ "kyc_verified": [
169
+ false
170
+ ],
171
+ "gas_spike": [
172
+ false
173
+ ],
174
+ "pro_advantage": [
175
+ false
176
+ ],
177
+ "rug_pull_victim": [
178
+ false
179
+ ],
180
+ "moon_trade": [
181
+ false
182
+ ],
183
+ "staked_early": [
184
+ false
185
+ ]
186
+ }
187
+ },
188
+ {
189
+ "event": "stake",
190
+ "weight": 4,
191
+ "properties": {
192
+ "token": [
193
+ "ETH",
194
+ "SOL",
195
+ "MATIC",
196
+ "AVAX",
197
+ "ATOM",
198
+ "DOT"
199
+ ],
200
+ "amount_usd": {
201
+ "$range": [
202
+ 1801,
203
+ 8469
204
+ ]
205
+ },
206
+ "apy_pct": [
207
+ 7,
208
+ 6,
209
+ 21,
210
+ 17,
211
+ 10
212
+ ],
213
+ "lock_period_days": [
214
+ 7,
215
+ 14,
216
+ 30,
217
+ 60,
218
+ 90,
219
+ 180
220
+ ]
221
+ }
222
+ },
223
+ {
224
+ "event": "unstake",
225
+ "weight": 2,
226
+ "properties": {
227
+ "token": [
228
+ "ETH",
229
+ "SOL",
230
+ "MATIC",
231
+ "AVAX",
232
+ "ATOM",
233
+ "DOT"
234
+ ],
235
+ "amount_usd": {
236
+ "$range": [
237
+ 1375,
238
+ 8170
239
+ ]
240
+ },
241
+ "apy_pct": [
242
+ 10,
243
+ 11,
244
+ 12,
245
+ 7,
246
+ 17,
247
+ 8,
248
+ 15,
249
+ 19
250
+ ],
251
+ "lock_period_days": [
252
+ 7,
253
+ 14,
254
+ 30,
255
+ 60,
256
+ 90,
257
+ 180
258
+ ]
259
+ }
260
+ },
261
+ {
262
+ "event": "claim airdrop",
263
+ "weight": 2,
264
+ "properties": {
265
+ "airdrop_name": [
266
+ "LayerZero Season 1",
267
+ "zkSync Drop",
268
+ "Starknet STRK",
269
+ "Arbitrum ARB",
270
+ "Optimism OP",
271
+ "Blur Season 3",
272
+ "EigenLayer Points",
273
+ "Celestia TIA",
274
+ "Jupiter JUP",
275
+ "Wormhole W"
276
+ ],
277
+ "token_amount": {
278
+ "$range": [
279
+ 1747,
280
+ 8203
281
+ ]
282
+ },
283
+ "airdrop_value_usd": {
284
+ "$range": [
285
+ 366,
286
+ 1571
287
+ ]
288
+ }
289
+ }
290
+ },
291
+ {
292
+ "event": "nft mint",
293
+ "weight": 2,
294
+ "properties": {
295
+ "collection": [
296
+ "Bored Apes",
297
+ "Azuki",
298
+ "DeGods",
299
+ "Pudgy Penguins",
300
+ "Milady",
301
+ "Doodles",
302
+ "CloneX",
303
+ "Moonbirds",
304
+ "CryptoPunks",
305
+ "Art Blocks"
306
+ ],
307
+ "mint_price_usd": {
308
+ "$range": [
309
+ 364,
310
+ 1652
311
+ ]
312
+ },
313
+ "chain": [
314
+ "Ethereum",
315
+ "Solana",
316
+ "Base",
317
+ "Polygon"
318
+ ]
319
+ }
320
+ },
321
+ {
322
+ "event": "portfolio viewed",
323
+ "weight": 8,
324
+ "properties": {
325
+ "total_value_usd": {
326
+ "$range": [
327
+ 15147,
328
+ 84328
329
+ ]
330
+ }
331
+ }
332
+ },
333
+ {
334
+ "event": "price alert set",
335
+ "weight": 3,
336
+ "properties": {
337
+ "token": [
338
+ "ETH",
339
+ "BTC",
340
+ "SOL",
341
+ "MATIC",
342
+ "AVAX",
343
+ "LINK",
344
+ "UNI",
345
+ "AAVE"
346
+ ],
347
+ "alert_type": [
348
+ "above",
349
+ "below",
350
+ "percent_change"
351
+ ]
352
+ }
353
+ },
354
+ {
355
+ "event": "referral sent",
356
+ "weight": 2,
357
+ "properties": {
358
+ "referral_method": [
359
+ "link",
360
+ "email",
361
+ "twitter",
362
+ "discord",
363
+ "telegram"
364
+ ]
365
+ }
366
+ },
367
+ {
368
+ "event": "limit order placed",
369
+ "weight": 3,
370
+ "properties": {
371
+ "token_pair": [
372
+ "ETH/USDC",
373
+ "ETH/USDT",
374
+ "BTC/USDC",
375
+ "SOL/USDC",
376
+ "MATIC/ETH",
377
+ "ARB/ETH",
378
+ "OP/USDC",
379
+ "AVAX/USDC",
380
+ "LINK/ETH",
381
+ "UNI/USDC",
382
+ "AAVE/ETH",
383
+ "CRV/USDC",
384
+ "DOGE/USDT",
385
+ "PEPE/ETH",
386
+ "APE/USDC"
387
+ ],
388
+ "order_type": [
389
+ "limit_buy",
390
+ "limit_sell",
391
+ "stop_loss",
392
+ "take_profit"
393
+ ],
394
+ "price_usd": {
395
+ "$range": [
396
+ 6805,
397
+ 41840
398
+ ]
399
+ }
400
+ }
401
+ },
402
+ {
403
+ "event": "transfer",
404
+ "weight": 3,
405
+ "properties": {
406
+ "token": [
407
+ "ETH",
408
+ "USDC",
409
+ "USDT",
410
+ "SOL",
411
+ "BTC"
412
+ ],
413
+ "amount_usd": {
414
+ "$range": [
415
+ 892,
416
+ 3988
417
+ ]
418
+ },
419
+ "gas_fee_usd": [
420
+ 7,
421
+ 10,
422
+ 22,
423
+ 11,
424
+ 8
425
+ ],
426
+ "destination_type": [
427
+ "wallet",
428
+ "exchange",
429
+ "contract",
430
+ "ens_name"
431
+ ],
432
+ "gas_spike": [
433
+ false
434
+ ]
435
+ }
436
+ }
437
+ ],
438
+ "funnels": [
439
+ {
440
+ "sequence": [
441
+ "wallet connected",
442
+ "kyc started",
443
+ "deposit"
444
+ ],
445
+ "isFirstFunnel": true,
446
+ "conversionRate": 60,
447
+ "timeToConvert": 1
448
+ },
449
+ {
450
+ "sequence": [
451
+ "deposit",
452
+ "swap",
453
+ "withdrawal"
454
+ ],
455
+ "conversionRate": 70,
456
+ "timeToConvert": 2,
457
+ "weight": 5
458
+ },
459
+ {
460
+ "sequence": [
461
+ "swap",
462
+ "stake",
463
+ "claim airdrop"
464
+ ],
465
+ "conversionRate": 35,
466
+ "timeToConvert": 7,
467
+ "weight": 3
468
+ }
469
+ ],
470
+ "superProps": {
471
+ "trading_tier": [
472
+ "Standard",
473
+ "Pro"
474
+ ],
475
+ "preferred_chain": [
476
+ "Ethereum",
477
+ "Solana",
478
+ "Base",
479
+ "Arbitrum",
480
+ "Polygon"
481
+ ],
482
+ "wallet_type": [
483
+ "MetaMask",
484
+ "Phantom",
485
+ "Coinbase Wallet",
486
+ "Rainbow",
487
+ "WalletConnect"
488
+ ],
489
+ "staked_early": [
490
+ false
491
+ ]
492
+ },
493
+ "userProps": {
494
+ "trading_tier": [
495
+ "Standard",
496
+ "Pro"
497
+ ],
498
+ "preferred_chain": [
499
+ "Ethereum",
500
+ "Solana",
501
+ "Base",
502
+ "Arbitrum",
503
+ "Polygon"
504
+ ],
505
+ "wallet_type": [
506
+ "MetaMask",
507
+ "Phantom",
508
+ "Coinbase Wallet",
509
+ "Rainbow",
510
+ "WalletConnect"
511
+ ],
512
+ "total_trade_volume": {
513
+ "$range": [
514
+ 66033,
515
+ 415215
516
+ ]
517
+ },
518
+ "portfolio_value": {
519
+ "$range": [
520
+ 30644,
521
+ 167675
522
+ ]
523
+ },
524
+ "kyc_status": [
525
+ "pending"
526
+ ],
527
+ "has_staked": [
528
+ false
529
+ ],
530
+ "staked_early": [
531
+ false
532
+ ]
533
+ },
534
+ "scdProps": {
535
+ "trading_tier": {
536
+ "type": "user",
537
+ "frequency": "month",
538
+ "timing": "fuzzy",
539
+ "max": 4,
540
+ "values": [
541
+ "Standard",
542
+ "Pro"
543
+ ]
544
+ }
545
+ }
546
+ }