Skip to content

Implement Heuristics Service for DevIndex #9144

@tobiu

Description

@tobiu

Create a new service apps/devindex/services/Heuristics.mjs that implements statistical analysis on user contribution data.

Responsibilities:

  1. Analyze(user): Takes a minified user object.
  2. Calculate Metrics:
    • velocity: Max contributions per day (Max Yearly / 365).
    • acceleration: Growth factor (Max Year / Median of Non-Zero Years).
    • consistency: Count of years with significant activity (>100 commits).
  3. Return: A minified object h containing { v, a, c }.

Constraints:

  • Pure math, no external dependencies.
  • Robust handling of zero-division or empty histories.
  • Optimized for performance (called in tight loop).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions