{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/deerdawn-com/json-schema/deerdawn-com-active-brief-response-schema.json",
  "title": "ActiveBriefResponse",
  "description": "The active project brief, resolved from cwd/workspace.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/deerdawn-com-openapi.yml#/components/schemas/ActiveBriefResponse",
  "type": "object",
  "properties": {
    "brief": {
      "type": [
        "string",
        "null"
      ],
      "description": "The brief text for the active project (null if none)."
    },
    "brief_spine": {
      "allOf": [
        {
          "$ref": "#/$defs/BriefSpine"
        },
        {
          "nullable": true
        }
      ]
    },
    "project_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "project_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "last_updated": {
      "type": [
        "string",
        "null"
      ]
    },
    "match_kind": {
      "type": [
        "string",
        "null"
      ]
    },
    "recently_loaded": {
      "type": "boolean"
    }
  },
  "required": [
    "brief",
    "project_name",
    "project_id",
    "last_updated"
  ],
  "$defs": {
    "BriefItem": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string"
        },
        "trust": {
          "type": "string",
          "enum": [
            "high",
            "inferred",
            "unverified"
          ],
          "description": "Per-item confidence band derived from provenance: high (verified or confidence ≥ 0.75), inferred (0.4–0.75 or date_inferred), unverified (below that or absent)."
        },
        "source_tool": {
          "type": [
            "string",
            "null"
          ]
        },
        "date": {
          "type": [
            "string",
            "null"
          ],
          "description": "ISO timestamp this item was recorded/decided/shipped."
        },
        "importance": {
          "type": "string",
          "enum": [
            "low",
            "normal",
            "high",
            "critical"
          ]
        },
        "reasoning": {
          "type": [
            "string",
            "null"
          ],
          "description": "DECIDED items only — why the decision was made."
        },
        "paths": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "LANDMINE items only — related file paths."
        },
        "commit_ref": {
          "type": [
            "string",
            "null"
          ],
          "description": "SHIPPED items only — the commit this shipped in."
        },
        "pinned": {
          "type": "boolean"
        },
        "from_card": {
          "type": "boolean",
          "description": "SHIPPED items only — true when the line came from a board card moved to Done. Label it \"Shipped\": a Done card is a reported completion, not a checked one."
        }
      },
      "required": [
        "text",
        "trust"
      ],
      "description": "One brief line with its trust band and provenance."
    },
    "BriefSpine": {
      "type": "object",
      "properties": {
        "shipped": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BriefItem"
          },
          "description": "SHIPPED slot — deterministic completion events (newest first)."
        },
        "decided": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BriefItem"
          },
          "description": "DECIDED slot — unresolved recent decisions."
        },
        "open": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BriefItem"
          },
          "description": "OPEN slot — open questions."
        },
        "landmine": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BriefItem"
          },
          "description": "LANDMINE slot — sharp, durable watch-outs."
        },
        "shipped_header": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "verified": {
              "type": "boolean"
            }
          },
          "required": [
            "text",
            "verified"
          ],
          "description": "Optional SHIPPED header (current_status)."
        }
      },
      "required": [
        "shipped",
        "decided",
        "open",
        "landmine"
      ],
      "description": "The structured 4-slot brief — SHIPPED / DECIDED / OPEN / LANDMINE."
    }
  }
}