Gamification Simulator
This skill helps you test gamification features by injecting specific data states into the database.
Quick Start
To inject a specific scenario (e.g., competitive-family):
bash1node gamification-sim/scripts/run_scenario.cjs competitive-family
To reset to a clean state:
bash1node gamification-sim/scripts/run_scenario.cjs clean-slate
Available Scenarios
See scenarios.md for details on:
clean-slate: Wipes all data and creates a single Admin ("Dad").competitive-family: Adds multiple members with high points and streaks.overdue-crisis: Injects several overdue chores for a specific member.analytics-rich: Creates 30 days of historical logs for chart testing.
Workflows
Testing Leaderboard
- Run:
node gamification-sim/scripts/run_scenario.cjs competitive-family - Open the frontend and navigate to
/leaderboard. - Verify members are ranked correctly by XP.
Testing Analytics
- Run:
node gamification-sim/scripts/run_scenario.cjs analytics-rich - Navigate to
/admin/reports. - Verify charts show data trends over the last month.
Customization
To add new scenarios, edit gamification-sim/scripts/inject_scenario.ts. The run_scenario.cjs wrapper will automatically pick up your changes.