{
"id": "bzh.herve.atmot.stats",
"defs": {
"main": {
"key": "literal:self",
"type": "record",
"record": {
"type": "object",
"required": [
"updatedAt"
],
"properties": {
"byLang": {
"type": "array",
"items": {
"ref": "#langStats",
"type": "ref"
},
"description": "Per-language statistics. Optional and possibly empty (e.g. on the first declaration write before any game completes)."
},
"updatedAt": {
"type": "string",
"format": "datetime",
"description": "When this record was last updated."
}
}
},
"description": "A single, mutable per-account streak/stats record, edited in place like a profile. It also doubles as AT Mot's declaration / signaling record: its presence signals that an account plays AT Mot, and its deletion signals opt-out. Listing this one collection across the network enumerates every AT Mot player, so it is created on first play even before any stats accrue."
},
"langStats": {
"type": "object",
"required": [
"lang"
],
"properties": {
"lang": {
"type": "string",
"format": "language",
"description": "BCP-47 language this block describes."
},
"gamesWon": {
"type": "integer",
"minimum": 0,
"description": "Total puzzles solved in this language."
},
"maxStreak": {
"type": "integer",
"minimum": 0,
"description": "Longest streak ever achieved in this language."
},
"gamesPlayed": {
"type": "integer",
"minimum": 0,
"description": "Total puzzles completed (won or lost) in this language."
},
"currentStreak": {
"type": "integer",
"minimum": 0,
"description": "Consecutive solved puzzles up to the most recent played puzzle."
},
"lastPuzzleNumber": {
"type": "integer",
"minimum": 1,
"description": "Puzzle number of the most recent completed puzzle, used to detect streak breaks."
},
"guessDistribution": {
"type": "array",
"items": {
"ref": "#guessBucket",
"type": "ref"
},
"maxLength": 6,
"description": "Histogram of winning guess counts. Each element is an object (not a bare integer) so context can be added later without a schema V2."
}
},
"description": "Streak and aggregate statistics for one language series."
},
"guessBucket": {
"type": "object",
"required": [
"guesses",
"count"
],
"properties": {
"count": {
"type": "integer",
"minimum": 0,
"description": "How many wins used exactly this many guesses."
},
"guesses": {
"type": "integer",
"maximum": 6,
"minimum": 1,
"description": "Number of guesses it took to win (1–6)."
}
},
"description": "One bucket of the guess-count histogram."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}