Raw schema
{
"type": "object",
"properties": {
"section": {
"type": "string",
"enum": [
"goals",
"rules",
"profile"
],
"description": "Profile memory section to update. Supports goals, rules, and profile when enabled by the server."
},
"structured": {
"description": "Preferred input. For goals, send a goals items list with date, goal, targetResult, and comment. For rules/profile, send only the matching object.",
"type": "object",
"properties": {
"goals": {
"description": "Use only when section is goals. Server builds canonical goals text from the goals list.",
"type": "object",
"properties": {
"items": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"description": "Optional exact goal date in YYYY-MM-DD. Omit when unknown; approximate dates are not supported and will be rejected.",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"goal": {
"type": "string",
"minLength": 1,
"description": "Required goal or event, for example 5 км, 10 км, half marathon, regularity, health, cycling event, or triathlon."
},
"targetResult": {
"description": "Target result or measurable outcome. Omit when unknown; the server writes `не указано`.",
"type": "string",
"minLength": 1
},
"comment": {
"description": "Short durable context: why this goal matters, preparation depth, taper/risk note, or role in the season. Omit when unknown; the server writes `не указано`.",
"type": "string",
"minLength": 1
}
},
"required": [
"goal"
],
"additionalProperties": false
},
"description": "Flat goals list in the same shape as the web profile card. Every dated race is a real goal by default; do not demote goals into lower-value categories."
}
},
"required": [
"items"
],
"additionalProperties": false
},
"rules": {
"description": "Use only when section is rules. Server builds the exact web-profile text.",
"type": "object",
"properties": {
"trainingsPerWeek": {
"description": "Exact single number for `Тренировок в неделю`. Do not send ranges, minimums, maximums, or flexible wording here.",
"type": "integer",
"minimum": 1,
"maximum": 14
},
"offDays": {
"description": "Exact single number for `Выходных`. Do not send ranges, minimums, maximums, or flexible wording here.",
"type": "integer",
"minimum": 0,
"maximum": 7
},
"restDays": {
"description": "Fixed rest weekdays for `Дни отдыха`, only when the user names fixed weekdays.",
"type": "string",
"minLength": 1
},
"customRules": {
"description": "Separate durable custom rules. The server writes one `Правило:` line per item.",
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"additional": {
"description": "Extra durable rule context that does not fit the other fields.",
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"profile": {
"description": "Use only when section is profile. Server patches Athlete.info and builds the exact web-profile text. Do not send firstName.",
"type": "object",
"properties": {
"birthYear": {
"description": "Birth year. Omit to preserve, null to clear.",
"anyOf": [
{
"type": "integer",
"minimum": 1940,
"maximum": 2010
},
{
"type": "null"
}
]
},
"gender": {
"description": "Gender from the web profile form. Omit to preserve, null to clear.",
"anyOf": [
{
"type": "string",
"enum": [
"male",
"female"
]
},
{
"type": "null"
}
]
},
"height": {
"description": "Height in cm. Omit to preserve, null to clear.",
"anyOf": [
{
"type": "integer",
"minimum": 130,
"maximum": 230
},
{
"type": "null"
}
]
},
"weight": {
"description": "Weight in kg. Omit to preserve, null to clear.",
"anyOf": [
{
"type": "integer",
"minimum": 30,
"maximum": 200
},
{
"type": "null"
}
]
},
"maxHr": {
"description": "Maximum heart rate. Omit to preserve, null to clear.",
"anyOf": [
{
"type": "integer",
"minimum": 100,
"maximum": 220
},
{
"type": "null"
}
]
},
"ltHr": {
"description": "Lactate-threshold heart rate. Omit to preserve, null to clear.",
"anyOf": [
{
"type": "integer",
"minimum": 100,
"maximum": 220
},
{
"type": "null"
}
]
},
"raceResults": {
"description": "Race PR list. If provided, replaces the whole list; [] or null clears it. Omit to preserve.",
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"distance": {
"type": "string",
"minLength": 1,
"description": "Race distance, for example 5 км, 10 km, half marathon, or marathon."
},
"result": {
"type": "string",
"minLength": 1,
"description": "Finish result, for example 20:15 or 1:42:30."
},
"date": {
"description": "Optional race date or month. Send null only to omit it for this race result.",
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
}
},
"required": [
"distance",
"result"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"otherSports": {
"description": "Other sports. Omit to preserve, null to clear.",
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"additional": {
"description": "Additional durable profile context. Omit to preserve, null to clear.",
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"newText": {
"description": "Legacy fallback full section text. For goals it must already use canonical `Цели:` blocks with no conflict or choice-rule block; old labels are rejected.",
"type": "string",
"minLength": 1
},
"previousHash": {
"type": "string",
"minLength": 1,
"description": "Hash returned by read_profile_sections for the same section. Used to prevent overwriting newer profile data."
},
"diffSummary": {
"description": "Short internal summary of the factual change. Do not include raw chat transcript.",
"type": "string",
"minLength": 1
}
},
"required": [
"section",
"previousHash"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}