@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.
- package/README.md +7 -7
- package/dungeons/technical/ad-spend-schema.json +128 -0
- package/dungeons/technical/ad-spend.js +116 -0
- package/dungeons/technical/anonymous-users-schema.json +91 -0
- package/dungeons/technical/anonymous-users.js +102 -0
- package/dungeons/technical/array-of-object-lookup-schema.json +191 -0
- package/dungeons/{array-of-object-lookup.js → technical/array-of-object-lookup.js} +11 -4
- package/dungeons/technical/experiments-schema.json +197 -0
- package/dungeons/technical/experiments.js +168 -0
- package/dungeons/technical/foobar-schema.json +362 -0
- package/dungeons/{foobar.js → technical/foobar.js} +2 -2
- package/dungeons/technical/group-analytics-schema.json +149 -0
- package/dungeons/technical/group-analytics.js +151 -0
- package/dungeons/technical/mirror-strategies-schema.json +84 -0
- package/dungeons/technical/mirror-strategies.js +126 -0
- package/dungeons/technical/nested-objects-schema.json +145 -0
- package/dungeons/technical/nested-objects.js +207 -0
- package/dungeons/technical/retention-cadence-schema.json +37 -0
- package/dungeons/{retention-cadence.js → technical/retention-cadence.js} +1 -1
- package/dungeons/technical/sanity-schema.json +185 -0
- package/dungeons/{sanity.js → technical/sanity.js} +3 -2
- package/dungeons/technical/scale-test-schema.json +70 -0
- package/dungeons/technical/scale-test.js +90 -0
- package/dungeons/technical/scd-schema.json +270 -0
- package/dungeons/{scd.js → technical/scd.js} +19 -10
- package/dungeons/technical/simple-schema.json +278 -0
- package/dungeons/{simple.js → technical/simple.js} +6 -6
- package/dungeons/technical/simplest-schema.json +635 -0
- package/dungeons/{simplest.js → technical/simplest.js} +6 -6
- package/dungeons/technical/text-generation-schema.json +1059 -0
- package/dungeons/{text-generation.js → technical/text-generation.js} +23 -9
- package/dungeons/vertical/community-schema.json +557 -0
- package/dungeons/vertical/community.js +788 -0
- package/dungeons/vertical/devtools-schema.json +580 -0
- package/dungeons/vertical/devtools.js +837 -0
- package/dungeons/vertical/ecommerce-schema.json +586 -0
- package/dungeons/{ecommerce.js → vertical/ecommerce.js} +34 -3
- package/dungeons/vertical/education-schema.json +697 -0
- package/dungeons/{education.js → vertical/education.js} +54 -36
- package/dungeons/vertical/fintech-schema.json +563 -0
- package/dungeons/{fintech.js → vertical/fintech.js} +91 -53
- package/dungeons/vertical/fitness-schema.json +508 -0
- package/dungeons/vertical/fitness.js +802 -0
- package/dungeons/vertical/food-delivery-schema.json +678 -0
- package/dungeons/{food.js → vertical/food-delivery.js} +51 -23
- package/dungeons/vertical/gaming-schema.json +394 -0
- package/dungeons/{gaming.js → vertical/gaming.js} +9 -7
- package/dungeons/vertical/healthcare-schema.json +527 -0
- package/dungeons/vertical/healthcare.js +769 -0
- package/dungeons/vertical/insurance-application-schema.json +466 -0
- package/dungeons/{insurance-application.js → vertical/insurance-application.js} +33 -29
- package/dungeons/vertical/logistics-schema.json +552 -0
- package/dungeons/vertical/logistics.js +793 -0
- package/dungeons/vertical/marketplace-schema.json +511 -0
- package/dungeons/vertical/marketplace.js +844 -0
- package/dungeons/vertical/media-schema.json +787 -0
- package/dungeons/{media.js → vertical/media.js} +94 -16
- package/dungeons/vertical/rpg-schema.json +654 -0
- package/dungeons/{rpg.js → vertical/rpg.js} +78 -57
- package/dungeons/vertical/sass-schema.json +653 -0
- package/dungeons/{sass.js → vertical/sass.js} +49 -23
- package/dungeons/vertical/social-schema.json +552 -0
- package/dungeons/{social.js → vertical/social.js} +60 -14
- package/dungeons/vertical/travel-schema.json +558 -0
- package/dungeons/vertical/travel.js +736 -0
- package/index.js +19 -15
- package/lib/core/config-validator.js +286 -1
- package/lib/core/context.js +7 -5
- package/lib/generators/adspend.js +3 -3
- package/lib/generators/events.js +141 -14
- package/lib/generators/funnels.js +67 -7
- package/lib/generators/text.js +2 -2
- package/lib/orchestrators/user-loop.js +441 -22
- package/lib/templates/soup-presets.js +2 -2
- package/lib/utils/utils.js +4 -5
- package/package.json +4 -3
- package/scripts/dungeon-to-json.mjs +163 -0
- package/scripts/extract-dungeon-schema.mjs +297 -0
- package/scripts/json-to-dungeon.mjs +200 -0
- package/scripts/run-dungeon.mjs +76 -0
- package/scripts/run-many.mjs +118 -0
- package/scripts/verify-runner.mjs +42 -0
- package/types.d.ts +313 -1
- package/dungeons/array-of-object-lookup-schema.json +0 -327
- package/dungeons/ecommerce-schema.json +0 -462
- package/dungeons/education-schema.json +0 -2409
- package/dungeons/fintech-schema.json +0 -14034
- package/dungeons/foobar-schema.json +0 -403
- package/dungeons/food-delivery-schema.json +0 -192
- package/dungeons/food-delivery.js +0 -602
- package/dungeons/food-schema.json +0 -1152
- package/dungeons/gaming-schema.json +0 -1270
- package/dungeons/insurance-application-schema.json +0 -204
- package/dungeons/media-schema.json +0 -906
- package/dungeons/retention-cadence-schema.json +0 -78
- package/dungeons/rpg-schema.json +0 -4526
- package/dungeons/sanity-schema.json +0 -255
- package/dungeons/sass-schema.json +0 -1291
- package/dungeons/scd-schema.json +0 -919
- package/dungeons/simple-schema.json +0 -608
- package/dungeons/simplest-schema.json +0 -1418
- package/dungeons/social-schema.json +0 -1118
- package/dungeons/text-generation-schema.json +0 -3096
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
2
|
import utc from "dayjs/plugin/utc.js";
|
|
3
3
|
import "dotenv/config";
|
|
4
|
-
import * as u from "
|
|
4
|
+
import * as u from "../../lib/utils/utils.js";
|
|
5
5
|
import * as v from "ak-tools";
|
|
6
6
|
|
|
7
7
|
const SEED = "harness-education";
|
|
@@ -264,7 +264,7 @@ const config = {
|
|
|
264
264
|
weight: 1,
|
|
265
265
|
isFirstEvent: true,
|
|
266
266
|
properties: {
|
|
267
|
-
"account_type":
|
|
267
|
+
"account_type": ["instructor", "instructor", "instructor", "instructor", "instructor", "instructor", "student"],
|
|
268
268
|
"signup_source": ["organic", "referral", "school_partnership", "social_ad"],
|
|
269
269
|
}
|
|
270
270
|
},
|
|
@@ -272,18 +272,18 @@ const config = {
|
|
|
272
272
|
event: "course enrolled",
|
|
273
273
|
weight: 8,
|
|
274
274
|
properties: {
|
|
275
|
-
"course_id":
|
|
275
|
+
"course_id": courseIds,
|
|
276
276
|
"course_category": ["CS", "Math", "Science", "Business", "Arts", "Languages"],
|
|
277
277
|
"difficulty": ["beginner", "intermediate", "advanced"],
|
|
278
|
-
"is_free":
|
|
278
|
+
"is_free": [false, false, false, true, true],
|
|
279
279
|
}
|
|
280
280
|
},
|
|
281
281
|
{
|
|
282
282
|
event: "lecture started",
|
|
283
283
|
weight: 18,
|
|
284
284
|
properties: {
|
|
285
|
-
"course_id":
|
|
286
|
-
"lecture_id":
|
|
285
|
+
"course_id": courseIds,
|
|
286
|
+
"lecture_id": lectureIds,
|
|
287
287
|
"lecture_duration_mins": u.weighNumRange(5, 60, 0.8, 20),
|
|
288
288
|
"module_number": u.weighNumRange(1, 12),
|
|
289
289
|
}
|
|
@@ -292,51 +292,59 @@ const config = {
|
|
|
292
292
|
event: "lecture completed",
|
|
293
293
|
weight: 14,
|
|
294
294
|
properties: {
|
|
295
|
-
"course_id":
|
|
296
|
-
"lecture_id":
|
|
295
|
+
"course_id": courseIds,
|
|
296
|
+
"lecture_id": lectureIds,
|
|
297
297
|
"watch_time_mins": u.weighNumRange(3, 60, 0.8, 20),
|
|
298
|
-
"playback_speed":
|
|
299
|
-
"notes_taken":
|
|
298
|
+
"playback_speed": [0.75, 1.0, 1.0, 1.0, 1.25, 1.5, 2.0],
|
|
299
|
+
"notes_taken": [false, false, true],
|
|
300
|
+
"speed_learner": [false],
|
|
301
|
+
"thorough_learner": [false],
|
|
300
302
|
}
|
|
301
303
|
},
|
|
302
304
|
{
|
|
303
305
|
event: "quiz started",
|
|
304
306
|
weight: 10,
|
|
305
307
|
properties: {
|
|
306
|
-
"course_id":
|
|
307
|
-
"quiz_id":
|
|
308
|
+
"course_id": courseIds,
|
|
309
|
+
"quiz_id": quizIds,
|
|
308
310
|
"quiz_type": ["practice", "graded", "final_exam"],
|
|
309
311
|
"question_count": u.weighNumRange(5, 50, 0.7, 15),
|
|
312
|
+
"semester_end_rush": [false],
|
|
310
313
|
}
|
|
311
314
|
},
|
|
312
315
|
{
|
|
313
316
|
event: "quiz completed",
|
|
314
317
|
weight: 8,
|
|
315
318
|
properties: {
|
|
316
|
-
"course_id":
|
|
317
|
-
"quiz_id":
|
|
319
|
+
"course_id": courseIds,
|
|
320
|
+
"quiz_id": quizIds,
|
|
318
321
|
"score_percent": u.weighNumRange(0, 100, 1.2, 50),
|
|
319
322
|
"time_spent_mins": u.weighNumRange(3, 120, 0.6, 25),
|
|
320
323
|
"attempts": u.weighNumRange(1, 5, 0.5, 3),
|
|
324
|
+
"diligent_student": [false],
|
|
325
|
+
"speed_learner_effect": [false],
|
|
326
|
+
"semester_end_rush": [false],
|
|
321
327
|
}
|
|
322
328
|
},
|
|
323
329
|
{
|
|
324
330
|
event: "assignment submitted",
|
|
325
331
|
weight: 6,
|
|
326
332
|
properties: {
|
|
327
|
-
"course_id":
|
|
328
|
-
"assignment_id":
|
|
333
|
+
"course_id": courseIds,
|
|
334
|
+
"assignment_id": assignmentIds,
|
|
329
335
|
"submission_type": ["text", "code", "file", "project"],
|
|
330
336
|
"word_count": u.weighNumRange(100, 5000, 0.6, 500),
|
|
331
|
-
"is_late":
|
|
337
|
+
"is_late": [false, false, false, false, true],
|
|
338
|
+
"is_deadline_rush": [false],
|
|
339
|
+
"semester_end_rush": [false],
|
|
332
340
|
}
|
|
333
341
|
},
|
|
334
342
|
{
|
|
335
343
|
event: "assignment graded",
|
|
336
344
|
weight: 5,
|
|
337
345
|
properties: {
|
|
338
|
-
"course_id":
|
|
339
|
-
"assignment_id":
|
|
346
|
+
"course_id": courseIds,
|
|
347
|
+
"assignment_id": assignmentIds,
|
|
340
348
|
"grade": ["A", "B", "C", "D", "F"],
|
|
341
349
|
"feedback_length": u.weighNumRange(0, 500, 0.5, 100),
|
|
342
350
|
"grader": ["instructor", "peer", "auto"],
|
|
@@ -346,25 +354,27 @@ const config = {
|
|
|
346
354
|
event: "discussion posted",
|
|
347
355
|
weight: 7,
|
|
348
356
|
properties: {
|
|
349
|
-
"course_id":
|
|
357
|
+
"course_id": courseIds,
|
|
350
358
|
"post_type": ["question", "answer", "comment"],
|
|
351
359
|
"word_count": u.weighNumRange(10, 500, 0.6, 80),
|
|
360
|
+
"study_group_member": [false],
|
|
352
361
|
}
|
|
353
362
|
},
|
|
354
363
|
{
|
|
355
364
|
event: "certificate earned",
|
|
356
365
|
weight: 2,
|
|
357
366
|
properties: {
|
|
358
|
-
"course_id":
|
|
367
|
+
"course_id": courseIds,
|
|
359
368
|
"completion_time_days": u.weighNumRange(7, 180, 0.5, 45),
|
|
360
369
|
"final_grade": u.weighNumRange(60, 100, 1.2, 30),
|
|
370
|
+
"diligent_student": [false],
|
|
361
371
|
}
|
|
362
372
|
},
|
|
363
373
|
{
|
|
364
374
|
event: "study group joined",
|
|
365
375
|
weight: 4,
|
|
366
376
|
properties: {
|
|
367
|
-
"group_id":
|
|
377
|
+
"group_id": groupIds,
|
|
368
378
|
"group_size": u.weighNumRange(3, 20, 0.7, 8),
|
|
369
379
|
"group_type": ["study_circle", "project_team", "tutoring"],
|
|
370
380
|
}
|
|
@@ -374,14 +384,14 @@ const config = {
|
|
|
374
384
|
weight: 9,
|
|
375
385
|
properties: {
|
|
376
386
|
"resource_type": ["pdf", "slides", "code_sample", "dataset", "cheat_sheet"],
|
|
377
|
-
"course_id":
|
|
387
|
+
"course_id": courseIds,
|
|
378
388
|
}
|
|
379
389
|
},
|
|
380
390
|
{
|
|
381
391
|
event: "instructor feedback given",
|
|
382
392
|
weight: 3,
|
|
383
393
|
properties: {
|
|
384
|
-
"course_id":
|
|
394
|
+
"course_id": courseIds,
|
|
385
395
|
"feedback_type": ["written", "video", "rubric"],
|
|
386
396
|
"response_time_hours": u.weighNumRange(1, 72, 0.5, 15),
|
|
387
397
|
}
|
|
@@ -390,10 +400,10 @@ const config = {
|
|
|
390
400
|
event: "course reviewed",
|
|
391
401
|
weight: 3,
|
|
392
402
|
properties: {
|
|
393
|
-
"course_id":
|
|
403
|
+
"course_id": courseIds,
|
|
394
404
|
"rating": u.weighNumRange(1, 5, 1.5, 3),
|
|
395
405
|
"review_length": u.weighNumRange(10, 1000, 0.5, 100),
|
|
396
|
-
"would_recommend":
|
|
406
|
+
"would_recommend": [false, false, false, true, true, true, true, true, true, true],
|
|
397
407
|
}
|
|
398
408
|
},
|
|
399
409
|
{
|
|
@@ -401,7 +411,7 @@ const config = {
|
|
|
401
411
|
weight: 2,
|
|
402
412
|
properties: {
|
|
403
413
|
"plan": ["monthly", "annual", "lifetime"],
|
|
404
|
-
"price":
|
|
414
|
+
"price": [19.99, 149.99, 499.99],
|
|
405
415
|
}
|
|
406
416
|
},
|
|
407
417
|
{
|
|
@@ -416,11 +426,12 @@ const config = {
|
|
|
416
426
|
event: "practice problem solved",
|
|
417
427
|
weight: 12,
|
|
418
428
|
properties: {
|
|
419
|
-
"course_id":
|
|
420
|
-
"problem_id":
|
|
429
|
+
"course_id": courseIds,
|
|
430
|
+
"problem_id": problemIds,
|
|
421
431
|
"difficulty": ["easy", "medium", "hard"],
|
|
422
432
|
"time_to_solve_sec": u.weighNumRange(10, 3600, 0.5, 300),
|
|
423
|
-
"hint_used":
|
|
433
|
+
"hint_used": [false, false, true],
|
|
434
|
+
"independent_solver": [false],
|
|
424
435
|
}
|
|
425
436
|
},
|
|
426
437
|
],
|
|
@@ -432,11 +443,16 @@ const config = {
|
|
|
432
443
|
scdProps: {},
|
|
433
444
|
|
|
434
445
|
userProps: {
|
|
435
|
-
"account_type":
|
|
436
|
-
"subscription_status":
|
|
446
|
+
"account_type": ["student", "student", "student", "student", "student", "student", "student", "student", "instructor"],
|
|
447
|
+
"subscription_status": ["free", "free", "free", "monthly", "annual"],
|
|
437
448
|
"learning_style": ["visual", "reading", "hands_on", "auditory"],
|
|
438
449
|
"education_level": ["high_school", "bachelors", "masters", "phd", "self_taught"],
|
|
439
450
|
"timezone": ["US_Eastern", "US_Pacific", "US_Central", "Europe", "Asia"],
|
|
451
|
+
"courses_created": [0],
|
|
452
|
+
"teaching_experience_years": [0],
|
|
453
|
+
"instructor_rating": [0],
|
|
454
|
+
"learning_goal": ["none"],
|
|
455
|
+
"study_hours_per_week": [0],
|
|
440
456
|
},
|
|
441
457
|
|
|
442
458
|
groupKeys: [
|
|
@@ -640,9 +656,10 @@ const config = {
|
|
|
640
656
|
// 40% chance to splice in an extra certificate_earned event
|
|
641
657
|
if (chance.bool({ likelihood: 40 })) {
|
|
642
658
|
const lastEvent = userEvents[userEvents.length - 1];
|
|
643
|
-
|
|
659
|
+
const certTemplate = userEvents.find(e => e.event === "certificate earned");
|
|
660
|
+
if (lastEvent && certTemplate) {
|
|
644
661
|
const certEvent = {
|
|
645
|
-
|
|
662
|
+
...certTemplate,
|
|
646
663
|
time: dayjs(lastEvent.time).add(chance.integer({ min: 1, max: 5 }), 'days').toISOString(),
|
|
647
664
|
user_id: lastEvent.user_id,
|
|
648
665
|
course_id: chance.pickone(courseIds),
|
|
@@ -713,9 +730,10 @@ const config = {
|
|
|
713
730
|
} else if (joinedStudyGroupEarly) {
|
|
714
731
|
// Study group joiners keep all events and get bonus discussion_posted events
|
|
715
732
|
const lastEvent = userEvents[userEvents.length - 1];
|
|
716
|
-
|
|
733
|
+
const discussionTemplate = userEvents.find(e => e.event === "discussion posted");
|
|
734
|
+
if (lastEvent && discussionTemplate && chance.bool({ likelihood: 60 })) {
|
|
717
735
|
const bonusDiscussion = {
|
|
718
|
-
|
|
736
|
+
...discussionTemplate,
|
|
719
737
|
time: dayjs(lastEvent.time).add(chance.integer({ min: 1, max: 3 }), 'days').toISOString(),
|
|
720
738
|
user_id: lastEvent.user_id,
|
|
721
739
|
course_id: chance.pickone(courseIds),
|