{
  "$defs": {
    "IsoDate": {
      "description": "ISO 8601 date (YYYY-MM-DD).",
      "format": "date",
      "type": "string"
    },
    "PathRef": {
      "description": "Path-based cross-reference relative to .corpospec/ root.\nPattern: `^[a-z0-9_-]+(/[a-z0-9_.-]+)+$`",
      "pattern": "^[a-z0-9_-]+(/[a-z0-9_.-]+)+$",
      "type": "string"
    },
    "ResolutionItem": {
      "description": "A single item within a corporate resolution. The `number` ordering is\ndocument-scoped and expected to be unique per resolution; uniqueness cannot\nbe expressed in JSON Schema and is enforced at validation time.",
      "properties": {
        "notes": {
          "type": [
            "string",
            "null"
          ]
        },
        "number": {
          "description": "Sequential agenda number within the resolution, starting at 1.",
          "format": "int64",
          "minimum": 1,
          "type": "integer"
        },
        "outcome": {
          "$ref": "#/$defs/ResolutionOutcome"
        },
        "related_contract": {
          "anyOf": [
            {
              "$ref": "#/$defs/PathRef"
            },
            {
              "type": "null"
            }
          ]
        },
        "subject": {
          "description": "Non-empty human-readable subject of the agenda item (what is being\ndecided, e.g. \"Approval of Stammkapital payment\").",
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "number",
        "subject",
        "outcome"
      ],
      "type": "object"
    },
    "ResolutionOutcome": {
      "description": "Outcome of a single resolution item.",
      "enum": [
        "approved",
        "rejected",
        "deferred",
        "withdrawn"
      ],
      "type": "string"
    },
    "ResolutionProcedure": {
      "description": "Voting procedure for a corporate resolution.",
      "enum": [
        "written_circular",
        "meeting"
      ],
      "type": "string"
    }
  },
  "$id": "https://corpospec.com/schemas/v0.8.1/resolution.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Formal corporate resolution (e.g. Gesellschafterbeschluss under § 48 GmbHG).",
  "properties": {
    "date": {
      "$ref": "#/$defs/IsoDate"
    },
    "decision_makers": {
      "items": {
        "$ref": "#/$defs/PathRef"
      },
      "type": "array"
    },
    "entity": {
      "$ref": "#/$defs/PathRef"
    },
    "id": {
      "$ref": "#/$defs/PathRef"
    },
    "items": {
      "items": {
        "$ref": "#/$defs/ResolutionItem"
      },
      "type": "array"
    },
    "legal_basis": {
      "description": "Statutory or contractual basis authorising the resolution. For German\nGmbH Gesellschafterbeschluesse this is typically a section of the\nGmbHG (e.g. \"§ 48 GmbHG\" for shareholder resolutions, \"§ 46 GmbHG\"\nfor the shareholder competence catalogue, \"§ 49 GmbHG\" for the\nconvocation of meetings). For other jurisdictions cite the relevant\nstatute (e.g. \"Delaware General Corporation Law, Title 8, Chapter 1\").\nKept as free-form string to accommodate cross-jurisdiction prose.",
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "procedure": {
      "$ref": "#/$defs/ResolutionProcedure"
    },
    "related_contracts": {
      "default": [],
      "items": {
        "$ref": "#/$defs/PathRef"
      },
      "type": "array"
    },
    "related_decisions": {
      "default": [],
      "items": {
        "$ref": "#/$defs/PathRef"
      },
      "type": "array"
    },
    "retention_years": {
      "description": "Minimum retention period in years under applicable law. Under German\ncommercial and tax law, shareholder resolutions qualify as accounting\nrecords under § 257 HGB and § 147 AO with a 10-year retention duty;\nfoundational instruments (incorporation, capital changes) are\ntypically retained for the lifetime of the entity (often encoded as\n99). The value is advisory — enforcement lives in the retention\npolicy, not the schema.",
      "format": "int64",
      "minimum": 1,
      "type": [
        "integer",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "entity",
    "date",
    "procedure",
    "decision_makers",
    "items"
  ],
  "title": "Resolution",
  "type": "object"
}