Difficulty: Advanced
Type: feature
Background
The README explicitly lists "Contribution scoring engine" as a deferred, intentionally-not-implemented area, alongside a note that "clear interfaces and TODOs are left where appropriate" for future extension.
Problem
There is currently no way to track or score member contributions (e.g., activity, engagement, moderation actions) that could feed into role eligibility, badges, or future reward distribution — a foundational piece several other deferred features (rewards, streaks) would depend on.
Expected outcome
A packages/contribution-scoring package (or similarly scoped module) defines a pluggable scoring strategy interface, a Prisma model for recording scoring events and running totals per member/community, and at least one reference scoring strategy (e.g., simple point-per-action with decay over time) wired into the outbox event stream so scoring reacts to existing domain events (MEMBERSHIP_CREATED, ROLE_ASSIGNED, etc.).
Suggested implementation
- Design a
ScoringStrategy interface (score(event, currentTotal): number) in a new package, following the existing monorepo package conventions (packages/policy-engine as a model).
- Add a Prisma model (
contribution_scores or similar) tracking per-member, per-community running totals and a contribution_events log for auditability.
- Consume relevant outbox event types to update scores (subscribe via the existing pluggable
OutboxEventHandler pattern, or a dedicated consumer).
- Expose a read endpoint (e.g.,
GET /v1/members/:wallet/score) for the current score/breakdown.
- Document the scoring model, decay strategy, and extension points in
docs/.
Acceptance criteria
Likely affected files/directories
packages/ (new contribution-scoring package)
apps/access-api/prisma/schema.prisma
apps/access-api/src/routes/
docs/
Difficulty: Advanced
Type: feature
Background
The README explicitly lists "Contribution scoring engine" as a deferred, intentionally-not-implemented area, alongside a note that "clear interfaces and TODOs are left where appropriate" for future extension.
Problem
There is currently no way to track or score member contributions (e.g., activity, engagement, moderation actions) that could feed into role eligibility, badges, or future reward distribution — a foundational piece several other deferred features (rewards, streaks) would depend on.
Expected outcome
A
packages/contribution-scoringpackage (or similarly scoped module) defines a pluggable scoring strategy interface, a Prisma model for recording scoring events and running totals per member/community, and at least one reference scoring strategy (e.g., simple point-per-action with decay over time) wired into the outbox event stream so scoring reacts to existing domain events (MEMBERSHIP_CREATED,ROLE_ASSIGNED, etc.).Suggested implementation
ScoringStrategyinterface (score(event, currentTotal): number) in a new package, following the existing monorepo package conventions (packages/policy-engineas a model).contribution_scoresor similar) tracking per-member, per-community running totals and acontribution_eventslog for auditability.OutboxEventHandlerpattern, or a dedicated consumer).GET /v1/members/:wallet/score) for the current score/breakdown.docs/.Acceptance criteria
docs/Likely affected files/directories
packages/(new contribution-scoring package)apps/access-api/prisma/schema.prismaapps/access-api/src/routes/docs/