Summary
Move character class thresholds from hardcoded values to config/example.json for per-deployment customization.
Current State
Thresholds are hardcoded in src/lib/pipelines/export/exportLeaderboardAPI.ts:
const types = [
{ key: "prs", name: "Builder", threshold: 50 },
{ key: "issues", name: "Hunter", threshold: 25 },
];
const hasHighReviews = distribution.reviews.percentage >= 25;
Proposed Config
{
"characterSystem": {
"thresholds": {
"builder": { "prs": 50 },
"hunter": { "issues": 25 },
"maintainer": { "reviews": 25 },
"scribe": { "docsFocus": 40 }
},
"tiers": {
"beginner": 0,
"regular": 50,
"active": 200,
"veteran": 500,
"elite": 1000,
"legend": 5000
}
}
}
Benefits
- Fork-friendly: Different orgs have different contribution patterns
- PM-friendly: No code changes to tune thresholds
- Consistent with existing config patterns (scoring rules, bot exclusions)
Acceptance Criteria
Related
Summary
Move character class thresholds from hardcoded values to
config/example.jsonfor per-deployment customization.Current State
Thresholds are hardcoded in
src/lib/pipelines/export/exportLeaderboardAPI.ts:Proposed Config
{ "characterSystem": { "thresholds": { "builder": { "prs": 50 }, "hunter": { "issues": 25 }, "maintainer": { "reviews": 25 }, "scribe": { "docsFocus": 40 } }, "tiers": { "beginner": 0, "regular": 50, "active": 200, "veteran": 500, "elite": 1000, "legend": 5000 } } }Benefits
Acceptance Criteria
Related