{
"id": "net.anisota.chronicle.log.weekly",
"defs": {
"main": {
"key": "any",
"type": "record",
"record": {
"type": "object",
"required": [
"week",
"aggregates",
"status",
"signature",
"createdAt"
],
"properties": {
"week": {
"type": "string",
"description": "ISO week string in YYYY-WNN format (e.g. 2026-W06)"
},
"status": {
"enum": [
"active",
"finalized"
],
"type": "string",
"description": "Whether this week is still being updated or has been finalized"
},
"trends": {
"ref": "#trendData",
"type": "ref"
},
"patterns": {
"ref": "#weeklyPatterns",
"type": "ref"
},
"createdAt": {
"type": "string",
"format": "datetime",
"description": "When the weekly record was first created"
},
"signature": {
"ref": "#chronicleSignature",
"type": "ref"
},
"aggregates": {
"ref": "#weeklyAggregates",
"type": "ref"
},
"finalizedAt": {
"type": "string",
"format": "datetime",
"description": "When the weekly record was finalized (end of week)"
},
"lowerLogRefs": {
"type": "array",
"items": {
"type": "string"
},
"description": "AT URIs of daily log records included in this week"
},
"upperLogRefs": {
"type": "array",
"items": {
"type": "string"
},
"description": "AT URIs of containing logs (monthly, yearly) this week belongs to"
},
"expeditionRefs": {
"type": "array",
"items": {
"type": "string"
},
"description": "AT URIs of expedition records that occurred during this week"
}
}
},
"description": "Weekly aggregation of daily records. rkey is YYYY-WNN (ISO week). Updated once per day, finalized when week ends."
},
"trendData": {
"type": "object",
"properties": {
"xpChange": {
"type": "string",
"description": "Percentage change in XP compared to previous week (e.g. '+12%')"
},
"activityChange": {
"type": "string",
"description": "Percentage change in activity compared to previous week"
},
"engagementChange": {
"type": "string",
"description": "Percentage change in engagement compared to previous week"
}
},
"description": "Week-over-week trend comparisons"
},
"weeklyPatterns": {
"type": "object",
"properties": {
"peakBlocks": {
"type": "integer",
"maximum": 48,
"minimum": 0,
"description": "Highest activeBlockCount for any single day in the week"
},
"avgBlocksPerDay": {
"type": "integer",
"minimum": 0,
"description": "Average active blocks per day (totalActiveBlocks / daysActive, rounded)"
},
"totalActiveBlocks": {
"type": "integer",
"minimum": 0,
"description": "Sum of activeBlockCount across all days in the week"
}
},
"description": "Activity pattern aggregation for the week based on half-hour blocks"
},
"weeklyAggregates": {
"type": "object",
"properties": {
"postsRead": {
"type": "integer",
"minimum": 0,
"description": "Total posts read this week"
},
"daysActive": {
"type": "integer",
"minimum": 0,
"description": "Number of days with activity this week"
},
"postsCreated": {
"type": "integer",
"minimum": 0,
"description": "Total posts created this week"
},
"likesReceived": {
"type": "integer",
"minimum": 0,
"description": "Total likes received this week"
},
"totalXPGained": {
"type": "integer",
"minimum": 0,
"description": "Total XP gained this week"
},
"quotesReceived": {
"type": "integer",
"minimum": 0,
"description": "Total quotes received this week"
},
"repliesReceived": {
"type": "integer",
"minimum": 0,
"description": "Total replies received this week"
},
"repostsReceived": {
"type": "integer",
"minimum": 0,
"description": "Total reposts received this week"
},
"specimensPhotographed": {
"type": "integer",
"minimum": 0,
"description": "New specimens photographed this week"
}
},
"description": "Rolled-up counts from daily records"
},
"chronicleSignature": {
"type": "object",
"required": [
"sig",
"alg",
"kid",
"signedAt",
"nonce",
"version"
],
"properties": {
"alg": {
"type": "string",
"description": "Signing algorithm (ES256)"
},
"kid": {
"type": "string",
"description": "Key identifier for the signing key"
},
"sig": {
"type": "string",
"description": "Base64-encoded ES256 signature"
},
"nonce": {
"type": "string",
"description": "Unique random nonce to prevent replay"
},
"version": {
"type": "integer",
"description": "Signature schema version"
},
"signedAt": {
"type": "string",
"format": "datetime",
"description": "When the record was signed"
}
},
"description": "ES256 cryptographic signature proving record authenticity"
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}