Canonical product contract

Progress signals that mean one thing each

Rating, XP, difficulty and weekly rank answer different questions. These are the rules the app and backend are expected to share.

How the flow connects

A server-finalized attempt feeds separate signals. Each signal answers a different question and remains inspectable without turning progress into a promise of mastery.

  1. 01
    Finalized challengeThe server validates the result, difficulty and attempt identifier.
  2. 02
    Skills and XPInferred skills receive one XP award based on difficulty.
  3. 03
    Next difficultyAuto mode uses result and skill; manual mode uses the fixed level you selected.
  4. 04
    Streak and achievementValid events may advance the daily streak and reachable milestones without awarding XP again.

Four signals, four questions

Rating

Rating inspired by Elo

Rating starts at 1000, never falls below 100 and uses K factors 32, 24 and 16. Solved result, challenge difficulty and completion time affect each change. There is no human opponent, and rating does not drive adaptive difficulty.

Skill XP

Skill XP and levels

A solved challenge grants each inferred skill exactly one award: 60/100/140/180/220 XP for difficulty 1–5. Each of ten skills has levels 1–5; the next threshold is round(100 × level^1.5), and level 5 displays 100% complete.

Difficulty

Adaptive difficulty

Difficulty uses recent result and relevant skill progress to choose a suitable next step. It neither grants a second XP award nor reads the Elo-inspired rating.

Weekly position

Weekly ranking

The weekly board counts solutions finalized by the server from Monday UTC. Only the canonical solved_count field determines public position; client-reported progress never updates it.

Difficulty control examples

01

Automatic mode

After a finalized attempt, the backend uses the result and demonstrated skill level to keep, raise or lower the next challenge. Rating is not an input.

02

Manual mode

You choose a level from 1 to 5. The backend validates and persists the preference for the current Firebase identity, including anonymous identities, and new generations keep that level until you return to auto.

Limits and sync

Core state is authoritative on the server. A network failure can delay a read or write; the interface reports the error instead of presenting a local change as saved. When an anonymous account becomes permanent, the preference is included in the owner-bound migration.

Continue with the guides