{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sagaris/json-schema/sagaris-social-checklist-item-context-schema.json",
  "title": "SocialChecklistItemContext",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sagaris-openapi.json#/components/schemas/SocialChecklistItemContext",
  "type": "object",
  "properties": {
    "item": {
      "allOf": [
        {
          "$ref": "#/$defs/SocialChecklistItem"
        },
        {
          "type": "object",
          "properties": {
            "verdict_basis": {
              "type": "string"
            },
            "ai_does": {
              "type": "string"
            },
            "phase": {
              "type": [
                "object",
                "null"
              ]
            },
            "official_check": {
              "type": [
                "string",
                "null"
              ]
            },
            "frequency_detail": {
              "type": [
                "string",
                "null"
              ]
            },
            "why": {
              "type": "string"
            },
            "notes": {
              "type": [
                "string",
                "null"
              ]
            },
            "sources": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "value": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      ]
    },
    "workspace": {
      "type": "object",
      "properties": {
        "brand_voice": {
          "type": "object",
          "description": "status set, not_set or unavailable, and the saved voice fields."
        },
        "profile": {
          "type": "object",
          "description": "What the workspace profile states; empty fields mean nothing is on file."
        },
        "connections": {
          "type": "object",
          "description": "status read or unavailable, and each provider's state (never a token)."
        },
        "recent_posts": {
          "type": "object",
          "description": "status read or unavailable, and up to ten recent posts."
        }
      }
    },
    "catalog_version": {
      "type": "string"
    },
    "today": {
      "type": "string",
      "format": "date"
    },
    "agent_rule": {
      "type": "string"
    }
  },
  "$defs": {
    "SocialChecklistItem": {
      "type": "object",
      "description": "One catalog item with its status in the key's workspace.",
      "properties": {
        "id": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "one_time",
            "ongoing"
          ]
        },
        "frequency": {
          "type": "string"
        },
        "frequency_label": {
          "type": "string"
        },
        "area": {
          "type": "string"
        },
        "task": {
          "type": "string"
        },
        "done_when": {
          "type": [
            "string",
            "null"
          ]
        },
        "automation": {
          "type": "string",
          "enum": [
            "auto",
            "ai_draft_human_approves",
            "notify_human",
            "human_only"
          ]
        },
        "automation_label": {
          "type": "string"
        },
        "applies_to": {
          "type": "string"
        },
        "platforms": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "not_assessed",
            "not_started",
            "in_progress",
            "done",
            "blocked",
            "not_applicable"
          ]
        },
        "status_label": {
          "type": "string"
        },
        "evidence": {
          "type": [
            "string",
            "null"
          ]
        },
        "last_done_on": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "status_source": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "member",
            "system",
            "agent"
          ]
        },
        "status_updated_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "due": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "due_on": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "state": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "overdue",
                "due_today",
                "upcoming"
              ]
            }
          }
        },
        "assessment": {
          "type": [
            "object",
            "null"
          ],
          "description": "The item's assessed state (spec F-05): a person's recorded status where there is one, else SAGARIS's weekly baseline assessment from evidence, else unknown with the reason it is not yet assessed here.",
          "properties": {
            "state": {
              "type": "string",
              "enum": [
                "done",
                "missing",
                "unknown",
                "not_applicable"
              ]
            },
            "state_label": {
              "type": "string"
            },
            "reason": {
              "type": "string",
              "description": "The evidence (done, missing) or the reason (unknown, not applicable)."
            },
            "sources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  }
                }
              }
            },
            "by": {
              "type": "string",
              "enum": [
                "person",
                "sagaris",
                "assistant",
                "catalog"
              ]
            },
            "assessed_on": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            }
          }
        },
        "executor": {
          "type": "object",
          "description": "The catalog's executor record for the item.",
          "properties": {
            "verdict": {
              "type": "string",
              "enum": [
                "proven",
                "agreed",
                "required",
                "supported",
                "test_first",
                "replaced"
              ]
            },
            "verdict_label": {
              "type": "string"
            },
            "verdict_review": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "pending_owner_review"
              ],
              "description": "pending_owner_review: the verdict (test_first or replaced) is the spec's proposal and the owner has not reviewed it yet. Null for a proven, agreed, required or supported item."
            },
            "is_default": {
              "type": "boolean",
              "description": "In the default checklist every workspace runs: a proven, agreed, required or supported verdict, or an item kept in the run while its proposed verdict waits for the owner's review."
            },
            "person_action": {
              "type": "string",
              "enum": [
                "none",
                "approve_change_deny"
              ]
            },
            "person_action_label": {
              "type": "string"
            },
            "exceptions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "priority": {
              "type": "integer",
              "minimum": 1,
              "maximum": 4
            },
            "priority_label": {
              "type": "string"
            },
            "depends_on": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "runner": {
              "type": [
                "string",
                "null"
              ],
              "description": "The runner that executes the item on SAGARIS's schedule; null while none is built. The item is still assessed (assessment)."
            }
          }
        },
        "card": {
          "type": [
            "object",
            "null"
          ],
          "description": "An approval card waiting for a person, or a change a person asked for that no redo has answered.",
          "properties": {
            "state": {
              "type": "string",
              "enum": [
                "pending",
                "change_requested"
              ]
            },
            "card_id": {
              "type": "string"
            },
            "revision": {
              "type": "integer"
            },
            "change_note": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "agent": {
          "type": "object",
          "properties": {
            "can_record_evidence": {
              "type": "boolean"
            },
            "accepts_output_kinds": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "social_post",
                  "document"
                ]
              }
            }
          }
        }
      }
    }
  }
}