Skip to content

docs(backend): GAMIFICATION.md documents an XP reward table that does not exist in the code #12501

Description

@diegosouzapw

Split out of #12426, which surfaced this while auditing the XP award path. Found by @pacocartones — thank you.

docs/frameworks/GAMIFICATION.md:239-252 documents an XP reward table that does not match XP_REWARDS in src/lib/gamification/xp.ts:155-160. The docs are not describing a version of the code that exists.

Names that exist only in the docs

Documented Value In XP_REWARDS?
badge_earned 25 ❌ — the code has badge_unlock: 10
streak_milestone 15 ❌ — the code has streak_bonus: 2
referral ❌ no such action
model_diversity ❌ no such action
compression_use ❌ no such action
skill_use ❌ no such action

Values that disagree

Action Docs Code
token_share 5 1
daily_login 3 5

Decision needed before fixing

Which table is authoritative? Correcting the docs to match the code and raising the code's rewards to match the docs are both defensible, and the answer determines whether this is a docs-only change or lands together with #12426 (which tracks the fact that streak_bonus and badge_unlock are never paid at all — getXpForAction in src/lib/gamification/events.ts:108-120 uses its own hardcoded table that stops at daily_login).

Per AGENTS.md → "Documentation accuracy", documentation must describe verified behavior. Right now this table would fail that gate.

Refs #12426

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendbacklogTracked for future work; not blockingdocumentationImprovements or additions to documentation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions