social.dracome.library.goal

dracome.social

Documentation

A repeatable consumption-goal record for an actor, targeting a metric over a half-open time period `[periodStart, periodEnd)` (periodStart is inclusive, periodEnd is exclusive). Fulfillment progress against the goal is not stored on this record — it is computed at read time by filtering the actor's `library.state` records that fall within the period, per the metric named in `metric`.

main record

A repeatable consumption-goal record for an actor, targeting a metric over a half-open time period `[periodStart, periodEnd)` (periodStart is inclusive, periodEnd is exclusive). Fulfillment progress against the goal is not stored on this record — it is computed at read time by filtering the actor's `library.state` records that fall within the period, per the metric named in `metric`.

Record Key tid Timestamp-based ID

Properties

createdAt string datetime Required

Canonical UTC instant serialized as ISO 8601 with a trailing Z suffix.

formatScope ref social.dracome.library.defs#goalFormatScope Optional

Optional restriction of this goal to one format category (e.g. only audiobooks). Unset means the goal counts consumption of all formats. Only meaningful when `metric` is `completed_state_count` — never populated alongside a sum metric.

periodEnd string datetime Required

Canonical UTC instant marking the exclusive end of the goal's period `[periodStart, periodEnd)`, serialized as ISO 8601 with a trailing Z suffix.

periodLabel string Optional

Optional free-text label for the goal's period (e.g. '2026 Reading Challenge'), for display only. Not used to compute the period boundaries — periodStart/periodEnd remain authoritative.

maxLength: 256 bytesmaxGraphemes: 64 graphemes
periodStart string datetime Required

Canonical UTC instant marking the inclusive start of the goal's period, serialized as ISO 8601 with a trailing Z suffix.

targetValue integer Required

The target value to reach for `metric` within the goal's period. The maximum is 999,999 hours expressed in seconds (999999 * 3600) — the field is not per-metric here, so it is bounded to the widest unit's ceiling; `completed_state_count`/`page_count_sum` goals are additionally capped at 999,999.

minimum: 1maximum: 3599996400
updatedAt string datetime Optional

Canonical UTC instant serialized as ISO 8601 with a trailing Z suffix.

View raw schema
{
  "description": "A repeatable consumption-goal record for an actor, targeting a metric over a half-open time period `[periodStart, periodEnd)` (periodStart is inclusive, periodEnd is exclusive). Fulfillment progress against the goal is not stored on this record — it is computed at read time by filtering the actor's `library.state` records that fall within the period, per the metric named in `metric`.",
  "key": "tid",
  "record": {
    "properties": {
      "createdAt": {
        "description": "Canonical UTC instant serialized as ISO 8601 with a trailing Z suffix.",
        "format": "datetime",
        "type": "string"
      },
      "formatScope": {
        "description": "Optional restriction of this goal to one format category (e.g. only audiobooks). Unset means the goal counts consumption of all formats. Only meaningful when `metric` is `completed_state_count` — never populated alongside a sum metric.",
        "ref": "social.dracome.library.defs#goalFormatScope",
        "type": "ref"
      },
      "metric": {
        "description": "The consumption metric this goal targets.",
        "ref": "social.dracome.library.defs#goalMetric",
        "type": "ref"
      },
      "periodEnd": {
        "description": "Canonical UTC instant marking the exclusive end of the goal's period `[periodStart, periodEnd)`, serialized as ISO 8601 with a trailing Z suffix.",
        "format": "datetime",
        "type": "string"
      },
      "periodLabel": {
        "description": "Optional free-text label for the goal's period (e.g. '2026 Reading Challenge'), for display only. Not used to compute the period boundaries — periodStart/periodEnd remain authoritative.",
        "maxGraphemes": 64,
        "maxLength": 256,
        "type": "string"
      },
      "periodStart": {
        "description": "Canonical UTC instant marking the inclusive start of the goal's period, serialized as ISO 8601 with a trailing Z suffix.",
        "format": "datetime",
        "type": "string"
      },
      "targetValue": {
        "description": "The target value to reach for `metric` within the goal's period. The maximum is 999,999 hours expressed in seconds (999999 * 3600) — the field is not per-metric here, so it is bounded to the widest unit's ceiling; `completed_state_count`/`page_count_sum` goals are additionally capped at 999,999.",
        "maximum": 3599996400,
        "minimum": 1,
        "type": "integer"
      },
      "updatedAt": {
        "description": "Canonical UTC instant serialized as ISO 8601 with a trailing Z suffix.",
        "format": "datetime",
        "type": "string"
      }
    },
    "required": [
      "metric",
      "targetValue",
      "periodStart",
      "periodEnd",
      "createdAt"
    ],
    "type": "object"
  },
  "type": "record"
}

Lexicon Garden

@