{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://aumos.app/spec/amp/1/manager-result.schema.json",
  "title": "manager-result",
  "type": "object",
  "properties": {
    "protocol": {
      "type": "string",
      "const": "AMP/1"
    },
    "invocationId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "artifacts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": ["research", "evidence", "forecast", "risk-observation", "note"]
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "subject": {
            "type": "object",
            "properties": {
              "class": {
                "type": "string",
                "enum": ["equity", "etf", "crypto", "cash"]
              },
              "symbol": {
                "type": "string",
                "minLength": 1
              },
              "market": {
                "type": "string",
                "pattern": "^[A-Z0-9]{1,12}$",
                "description": "MIC-style market identifier, e.g. XNAS"
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$",
                "description": "ISO 4217 currency code"
              }
            },
            "required": ["class", "symbol"],
            "additionalProperties": false
          },
          "body": {
            "type": "string"
          },
          "evidenceIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "producedAt": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$",
            "description": "RFC 3339 timestamp, e.g. 2026-08-04T13:24:59.000Z",
            "format": "date-time"
          }
        },
        "required": ["kind", "title", "body"],
        "additionalProperties": false
      }
    },
    "decision": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "enum": ["WAIT", "WATCH", "BUY", "SELL", "RESIZE", "HEDGE", "REBALANCE"]
        },
        "subject": {
          "type": "object",
          "properties": {
            "class": {
              "type": "string",
              "enum": ["equity", "etf", "crypto", "cash"]
            },
            "symbol": {
              "type": "string",
              "minLength": 1
            },
            "market": {
              "type": "string",
              "pattern": "^[A-Z0-9]{1,12}$",
              "description": "MIC-style market identifier, e.g. XNAS"
            },
            "currency": {
              "type": "string",
              "pattern": "^[A-Z]{3}$",
              "description": "ISO 4217 currency code"
            }
          },
          "required": ["class", "symbol"],
          "additionalProperties": false
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "thesisRefs": {
          "maxItems": 64,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "rationale": {
          "type": "object",
          "properties": {
            "conclusion": {
              "type": "string",
              "minLength": 1,
              "maxLength": 8000
            },
            "keyReasons": {
              "maxItems": 64,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              }
            },
            "counterArguments": {
              "maxItems": 64,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              }
            },
            "risks": {
              "maxItems": 64,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              }
            },
            "uncertainty": {
              "maxItems": 64,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              }
            }
          },
          "required": ["conclusion"],
          "additionalProperties": false
        },
        "forecast": {
          "type": "object",
          "properties": {
            "horizonDays": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "expectedReturnRange": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "items": false,
              "minItems": 2,
              "maxItems": 2
            },
            "confidence": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            }
          },
          "required": ["horizonDays"],
          "additionalProperties": false
        },
        "target": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "position-weight"
                },
                "asset": {
                  "type": "object",
                  "properties": {
                    "class": {
                      "type": "string",
                      "enum": ["equity", "etf", "crypto", "cash"]
                    },
                    "symbol": {
                      "type": "string",
                      "minLength": 1
                    },
                    "market": {
                      "type": "string",
                      "pattern": "^[A-Z0-9]{1,12}$",
                      "description": "MIC-style market identifier, e.g. XNAS"
                    },
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$",
                      "description": "ISO 4217 currency code"
                    }
                  },
                  "required": ["class", "symbol"],
                  "additionalProperties": false
                },
                "targetWeight": {
                  "type": "number",
                  "description": "Fraction of portfolio value. 0.12 is 12%."
                }
              },
              "required": ["type", "asset", "targetWeight"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "cash-weight"
                },
                "targetWeight": {
                  "type": "number",
                  "description": "Fraction of portfolio value. 0.12 is 12%."
                }
              },
              "required": ["type", "targetWeight"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "exit"
                },
                "asset": {
                  "type": "object",
                  "properties": {
                    "class": {
                      "type": "string",
                      "enum": ["equity", "etf", "crypto", "cash"]
                    },
                    "symbol": {
                      "type": "string",
                      "minLength": 1
                    },
                    "market": {
                      "type": "string",
                      "pattern": "^[A-Z0-9]{1,12}$",
                      "description": "MIC-style market identifier, e.g. XNAS"
                    },
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$",
                      "description": "ISO 4217 currency code"
                    }
                  },
                  "required": ["class", "symbol"],
                  "additionalProperties": false
                }
              },
              "required": ["type", "asset"],
              "additionalProperties": false
            }
          ],
          "description": "The exposure to hold after the change, when the judgement is about one position. Portfolio intent, never an order: there is nowhere in AMP/1 to put a quantity, a limit price, an order type or a venue. Read together with `targets` — this one first — so a proposal may send both."
        },
        "targets": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "position-weight"
                  },
                  "asset": {
                    "type": "object",
                    "properties": {
                      "class": {
                        "type": "string",
                        "enum": ["equity", "etf", "crypto", "cash"]
                      },
                      "symbol": {
                        "type": "string",
                        "minLength": 1
                      },
                      "market": {
                        "type": "string",
                        "pattern": "^[A-Z0-9]{1,12}$",
                        "description": "MIC-style market identifier, e.g. XNAS"
                      },
                      "currency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$",
                        "description": "ISO 4217 currency code"
                      }
                    },
                    "required": ["class", "symbol"],
                    "additionalProperties": false
                  },
                  "targetWeight": {
                    "type": "number",
                    "description": "Fraction of portfolio value. 0.12 is 12%."
                  }
                },
                "required": ["type", "asset", "targetWeight"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "cash-weight"
                  },
                  "targetWeight": {
                    "type": "number",
                    "description": "Fraction of portfolio value. 0.12 is 12%."
                  }
                },
                "required": ["type", "targetWeight"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "exit"
                  },
                  "asset": {
                    "type": "object",
                    "properties": {
                      "class": {
                        "type": "string",
                        "enum": ["equity", "etf", "crypto", "cash"]
                      },
                      "symbol": {
                        "type": "string",
                        "minLength": 1
                      },
                      "market": {
                        "type": "string",
                        "pattern": "^[A-Z0-9]{1,12}$",
                        "description": "MIC-style market identifier, e.g. XNAS"
                      },
                      "currency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$",
                        "description": "ISO 4217 currency code"
                      }
                    },
                    "required": ["class", "symbol"],
                    "additionalProperties": false
                  }
                },
                "required": ["type", "asset"],
                "additionalProperties": false
              }
            ]
          },
          "description": "The rest of the basket, when one judgement is about several positions. Submit the whole basket as one proposal: the legs are resolved together against one book, so splitting them across separate judgements runs the same rule once per leg against a different intermediate book — a different answer, not the same answer twice. The two fields are read as `target` followed by these, in order, and where two entries name the same asset the later one wins; nothing is dropped and there is no other precedence rule. A `cash-weight` entry may be mixed with `position-weight` and `exit` entries: the named positions are honoured exactly and the cash is raised by selling proportionally from the holdings no entry named."
        },
        "watches": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "subject": {
                "type": "object",
                "properties": {
                  "class": {
                    "type": "string",
                    "enum": ["equity", "etf", "crypto", "cash"]
                  },
                  "symbol": {
                    "type": "string",
                    "minLength": 1
                  },
                  "market": {
                    "type": "string",
                    "pattern": "^[A-Z0-9]{1,12}$",
                    "description": "MIC-style market identifier, e.g. XNAS"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$",
                    "description": "ISO 4217 currency code"
                  }
                },
                "required": ["class", "symbol"],
                "additionalProperties": false
              },
              "intent": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              },
              "trigger": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "price-below"
                      },
                      "asset": {
                        "type": "object",
                        "properties": {
                          "class": {
                            "type": "string",
                            "enum": ["equity", "etf", "crypto", "cash"]
                          },
                          "symbol": {
                            "type": "string",
                            "minLength": 1
                          },
                          "market": {
                            "type": "string",
                            "pattern": "^[A-Z0-9]{1,12}$",
                            "description": "MIC-style market identifier, e.g. XNAS"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$",
                            "description": "ISO 4217 currency code"
                          }
                        },
                        "required": ["class", "symbol"],
                        "additionalProperties": false
                      },
                      "price": {
                        "type": "object",
                        "properties": {
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$",
                            "description": "ISO 4217 currency code"
                          },
                          "minorUnits": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "exponent": {
                            "description": "Decimal places the count is in. Omitted = the currency's minor unit.",
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 12
                          }
                        },
                        "required": ["currency", "minorUnits"],
                        "additionalProperties": false
                      }
                    },
                    "required": ["kind", "asset", "price"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "price-above"
                      },
                      "asset": {
                        "type": "object",
                        "properties": {
                          "class": {
                            "type": "string",
                            "enum": ["equity", "etf", "crypto", "cash"]
                          },
                          "symbol": {
                            "type": "string",
                            "minLength": 1
                          },
                          "market": {
                            "type": "string",
                            "pattern": "^[A-Z0-9]{1,12}$",
                            "description": "MIC-style market identifier, e.g. XNAS"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$",
                            "description": "ISO 4217 currency code"
                          }
                        },
                        "required": ["class", "symbol"],
                        "additionalProperties": false
                      },
                      "price": {
                        "type": "object",
                        "properties": {
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$",
                            "description": "ISO 4217 currency code"
                          },
                          "minorUnits": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "exponent": {
                            "description": "Decimal places the count is in. Omitted = the currency's minor unit.",
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 12
                          }
                        },
                        "required": ["currency", "minorUnits"],
                        "additionalProperties": false
                      }
                    },
                    "required": ["kind", "asset", "price"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "weight-drift"
                      },
                      "asset": {
                        "type": "object",
                        "properties": {
                          "class": {
                            "type": "string",
                            "enum": ["equity", "etf", "crypto", "cash"]
                          },
                          "symbol": {
                            "type": "string",
                            "minLength": 1
                          },
                          "market": {
                            "type": "string",
                            "pattern": "^[A-Z0-9]{1,12}$",
                            "description": "MIC-style market identifier, e.g. XNAS"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$",
                            "description": "ISO 4217 currency code"
                          }
                        },
                        "required": ["class", "symbol"],
                        "additionalProperties": false
                      },
                      "beyond": {
                        "type": "number",
                        "description": "Fraction of portfolio value. 0.12 is 12%."
                      },
                      "baselineWeight": {
                        "description": "The portfolio weight this band is measured from. A fraction of portfolio value, where 0.12 is 12% — the weight this position had when you armed the watch — the number `portfolio_get` answered for this run, not a target weight and not a mandate cap. State it and the watch becomes self-describing: you can check before arming whether `beyond` is already exceeded, and the run this watch wakes can see what it fired against. Omit it and the baseline is whatever weight the book last recorded, so the band is measured from a line that moves with every mark and the watch cannot be checked before it is armed.",
                        "type": "number"
                      }
                    },
                    "required": ["kind", "asset", "beyond"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "at-time"
                      },
                      "at": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$",
                        "description": "RFC 3339 timestamp, e.g. 2026-08-04T13:24:59.000Z",
                        "format": "date-time"
                      },
                      "rule": {
                        "type": "object",
                        "properties": {
                          "cron": {
                            "type": "string",
                            "minLength": 1
                          },
                          "timeZone": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": ["cron", "timeZone"],
                        "additionalProperties": false
                      }
                    },
                    "required": ["kind", "at"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "event"
                      },
                      "eventKind": {
                        "type": "string",
                        "enum": [
                          "earnings",
                          "price-move",
                          "news",
                          "filing",
                          "macro",
                          "schedule",
                          "plan-trigger",
                          "manual"
                        ]
                      },
                      "subject": {
                        "type": "object",
                        "properties": {
                          "class": {
                            "type": "string",
                            "enum": ["equity", "etf", "crypto", "cash"]
                          },
                          "symbol": {
                            "type": "string",
                            "minLength": 1
                          },
                          "market": {
                            "type": "string",
                            "pattern": "^[A-Z0-9]{1,12}$",
                            "description": "MIC-style market identifier, e.g. XNAS"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$",
                            "description": "ISO 4217 currency code"
                          }
                        },
                        "required": ["class", "symbol"],
                        "additionalProperties": false
                      }
                    },
                    "required": ["kind", "eventKind"],
                    "additionalProperties": false
                  }
                ]
              },
              "expiresAt": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$",
                "description": "RFC 3339 timestamp, e.g. 2026-08-04T13:24:59.000Z",
                "format": "date-time"
              },
              "kind": {
                "description": "IGNORED, and here only so a row you read from `invocation_read {sections:[\"standingPlans\"]}` can be sent straight back. Which array you put this in is what decides whether it is a watch or a plan.",
                "type": "string",
                "enum": ["watch", "plan"]
              },
              "key": {
                "description": "Your own name for this promise, and it does two things. Within this document, `priceLevels[].armedKey` points at it. Across judgements, arming a promise under a key you already have standing on this fund **replaces** that one — use it for a review you restate every run, and its wording or its condition may change. It is matched whole against your own standing promises only; it is not a plan id. Keys must be distinct within one proposal. Omit it and nothing is replaced unless you re-armed it identically.",
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              }
            },
            "required": ["intent", "trigger"],
            "additionalProperties": false
          }
        },
        "plans": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "subject": {
                "type": "object",
                "properties": {
                  "class": {
                    "type": "string",
                    "enum": ["equity", "etf", "crypto", "cash"]
                  },
                  "symbol": {
                    "type": "string",
                    "minLength": 1
                  },
                  "market": {
                    "type": "string",
                    "pattern": "^[A-Z0-9]{1,12}$",
                    "description": "MIC-style market identifier, e.g. XNAS"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$",
                    "description": "ISO 4217 currency code"
                  }
                },
                "required": ["class", "symbol"],
                "additionalProperties": false
              },
              "intent": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              },
              "trigger": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "price-below"
                      },
                      "asset": {
                        "type": "object",
                        "properties": {
                          "class": {
                            "type": "string",
                            "enum": ["equity", "etf", "crypto", "cash"]
                          },
                          "symbol": {
                            "type": "string",
                            "minLength": 1
                          },
                          "market": {
                            "type": "string",
                            "pattern": "^[A-Z0-9]{1,12}$",
                            "description": "MIC-style market identifier, e.g. XNAS"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$",
                            "description": "ISO 4217 currency code"
                          }
                        },
                        "required": ["class", "symbol"],
                        "additionalProperties": false
                      },
                      "price": {
                        "type": "object",
                        "properties": {
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$",
                            "description": "ISO 4217 currency code"
                          },
                          "minorUnits": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "exponent": {
                            "description": "Decimal places the count is in. Omitted = the currency's minor unit.",
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 12
                          }
                        },
                        "required": ["currency", "minorUnits"],
                        "additionalProperties": false
                      }
                    },
                    "required": ["kind", "asset", "price"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "price-above"
                      },
                      "asset": {
                        "type": "object",
                        "properties": {
                          "class": {
                            "type": "string",
                            "enum": ["equity", "etf", "crypto", "cash"]
                          },
                          "symbol": {
                            "type": "string",
                            "minLength": 1
                          },
                          "market": {
                            "type": "string",
                            "pattern": "^[A-Z0-9]{1,12}$",
                            "description": "MIC-style market identifier, e.g. XNAS"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$",
                            "description": "ISO 4217 currency code"
                          }
                        },
                        "required": ["class", "symbol"],
                        "additionalProperties": false
                      },
                      "price": {
                        "type": "object",
                        "properties": {
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$",
                            "description": "ISO 4217 currency code"
                          },
                          "minorUnits": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "exponent": {
                            "description": "Decimal places the count is in. Omitted = the currency's minor unit.",
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 12
                          }
                        },
                        "required": ["currency", "minorUnits"],
                        "additionalProperties": false
                      }
                    },
                    "required": ["kind", "asset", "price"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "weight-drift"
                      },
                      "asset": {
                        "type": "object",
                        "properties": {
                          "class": {
                            "type": "string",
                            "enum": ["equity", "etf", "crypto", "cash"]
                          },
                          "symbol": {
                            "type": "string",
                            "minLength": 1
                          },
                          "market": {
                            "type": "string",
                            "pattern": "^[A-Z0-9]{1,12}$",
                            "description": "MIC-style market identifier, e.g. XNAS"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$",
                            "description": "ISO 4217 currency code"
                          }
                        },
                        "required": ["class", "symbol"],
                        "additionalProperties": false
                      },
                      "beyond": {
                        "type": "number",
                        "description": "Fraction of portfolio value. 0.12 is 12%."
                      },
                      "baselineWeight": {
                        "description": "The portfolio weight this band is measured from. A fraction of portfolio value, where 0.12 is 12% — the weight this position had when you armed the watch — the number `portfolio_get` answered for this run, not a target weight and not a mandate cap. State it and the watch becomes self-describing: you can check before arming whether `beyond` is already exceeded, and the run this watch wakes can see what it fired against. Omit it and the baseline is whatever weight the book last recorded, so the band is measured from a line that moves with every mark and the watch cannot be checked before it is armed.",
                        "type": "number"
                      }
                    },
                    "required": ["kind", "asset", "beyond"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "at-time"
                      },
                      "at": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$",
                        "description": "RFC 3339 timestamp, e.g. 2026-08-04T13:24:59.000Z",
                        "format": "date-time"
                      },
                      "rule": {
                        "type": "object",
                        "properties": {
                          "cron": {
                            "type": "string",
                            "minLength": 1
                          },
                          "timeZone": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": ["cron", "timeZone"],
                        "additionalProperties": false
                      }
                    },
                    "required": ["kind", "at"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "event"
                      },
                      "eventKind": {
                        "type": "string",
                        "enum": [
                          "earnings",
                          "price-move",
                          "news",
                          "filing",
                          "macro",
                          "schedule",
                          "plan-trigger",
                          "manual"
                        ]
                      },
                      "subject": {
                        "type": "object",
                        "properties": {
                          "class": {
                            "type": "string",
                            "enum": ["equity", "etf", "crypto", "cash"]
                          },
                          "symbol": {
                            "type": "string",
                            "minLength": 1
                          },
                          "market": {
                            "type": "string",
                            "pattern": "^[A-Z0-9]{1,12}$",
                            "description": "MIC-style market identifier, e.g. XNAS"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$",
                            "description": "ISO 4217 currency code"
                          }
                        },
                        "required": ["class", "symbol"],
                        "additionalProperties": false
                      }
                    },
                    "required": ["kind", "eventKind"],
                    "additionalProperties": false
                  }
                ]
              },
              "expiresAt": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$",
                "description": "RFC 3339 timestamp, e.g. 2026-08-04T13:24:59.000Z",
                "format": "date-time"
              },
              "kind": {
                "description": "IGNORED, and here only so a row you read from `invocation_read {sections:[\"standingPlans\"]}` can be sent straight back. Which array you put this in is what decides whether it is a watch or a plan.",
                "type": "string",
                "enum": ["watch", "plan"]
              },
              "key": {
                "description": "Your own name for this promise, and it does two things. Within this document, `priceLevels[].armedKey` points at it. Across judgements, arming a promise under a key you already have standing on this fund **replaces** that one — use it for a review you restate every run, and its wording or its condition may change. It is matched whole against your own standing promises only; it is not a plan id. Keys must be distinct within one proposal. Omit it and nothing is replaced unless you re-armed it identically.",
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              }
            },
            "required": ["intent", "trigger"],
            "additionalProperties": false
          }
        },
        "retirePlans": {
          "maxItems": 64,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "description": "OPTIONAL. Promises of YOUR OWN that this judgement withdraws, as the `planId` values `invocation_read {sections: [\"standingPlans\"]}` gave you in THIS run. Use it for a duplicate you can no longer fold — a review you restated in different words before you had a `key`, so neither an identical re-arming nor a key reaches it. Each id must name a promise that is still standing on this fund AND was armed by you: an id that is unknown, already over, or somebody else’s (the investor’s promises are in that list too) is refused, never skipped. Withdrawing is not firing and not a judgement about what the promise said — the row simply stops standing. Re-arming what you still hold is the ordinary road and this is not a substitute for it."
        },
        "thesisUpdates": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "thesisId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "subject": {
                "type": "object",
                "properties": {
                  "class": {
                    "type": "string",
                    "enum": ["equity", "etf", "crypto", "cash"]
                  },
                  "symbol": {
                    "type": "string",
                    "minLength": 1
                  },
                  "market": {
                    "type": "string",
                    "pattern": "^[A-Z0-9]{1,12}$",
                    "description": "MIC-style market identifier, e.g. XNAS"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$",
                    "description": "ISO 4217 currency code"
                  }
                },
                "required": ["class", "symbol"],
                "additionalProperties": false
              },
              "stance": {
                "type": "string",
                "enum": ["BULLISH", "BEARISH", "NEUTRAL"]
              },
              "status": {
                "type": "string",
                "enum": ["ACTIVE", "CHALLENGED", "INVALIDATED", "REALISED", "RETIRED"]
              },
              "claim": {
                "type": "string",
                "minLength": 1,
                "maxLength": 8000
              },
              "supportingReasons": {
                "maxItems": 64,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                }
              },
              "invalidationConditions": {
                "maxItems": 64,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                }
              },
              "evidenceIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                }
              },
              "changeSummary": {
                "type": "string",
                "maxLength": 8000
              }
            },
            "required": [
              "subject",
              "stance",
              "status",
              "claim",
              "supportingReasons",
              "invalidationConditions",
              "evidenceIds"
            ],
            "additionalProperties": false
          }
        },
        "evidenceIds": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "effectiveConstraints": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "field": {
                "type": "string",
                "enum": ["maxPositionWeight", "cashFloor", "maxDrawdown"]
              },
              "declared": {
                "type": "number",
                "description": "Fraction of portfolio value. 0.12 is 12%."
              },
              "effective": {
                "type": "number",
                "description": "Fraction of portfolio value. 0.12 is 12%."
              },
              "reason": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              },
              "unlocks": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              }
            },
            "required": ["field", "declared", "effective", "reason"],
            "additionalProperties": false
          }
        },
        "priceLevels": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "purpose": {
                "type": "string",
                "enum": ["entry", "stop", "take-profit"],
                "description": "What this price is for: `entry` is where you would buy, `stop` is where the judgement is wrong, `take-profit` is where you would take profit. Aumos never infers this — not from `price-below` vs `price-above`, not from whether the position is held, and not from any prose — so a purpose you do not state is a line nothing can name."
              },
              "asset": {
                "type": "object",
                "properties": {
                  "class": {
                    "type": "string",
                    "enum": ["equity", "etf", "crypto", "cash"]
                  },
                  "symbol": {
                    "type": "string",
                    "minLength": 1
                  },
                  "market": {
                    "type": "string",
                    "pattern": "^[A-Z0-9]{1,12}$",
                    "description": "MIC-style market identifier, e.g. XNAS"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$",
                    "description": "ISO 4217 currency code"
                  }
                },
                "required": ["class", "symbol"],
                "additionalProperties": false,
                "description": "The asset this price is about, in full. Give `market` and `currency`: the same symbol is two assets on two boards, and a level filed against a bare symbol cannot be matched to a holding without guessing which one you meant."
              },
              "price": {
                "anyOf": [
                  {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "point"
                          },
                          "value": {
                            "type": "object",
                            "properties": {
                              "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "ISO 4217 currency code"
                              },
                              "minorUnits": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "exponent": {
                                "description": "Decimal places the count is in. Omitted = the currency's minor unit.",
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 12
                              }
                            },
                            "required": ["currency", "minorUnits"],
                            "additionalProperties": false
                          }
                        },
                        "required": ["kind", "value"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "band"
                          },
                          "low": {
                            "type": "object",
                            "properties": {
                              "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "ISO 4217 currency code"
                              },
                              "minorUnits": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "exponent": {
                                "description": "Decimal places the count is in. Omitted = the currency's minor unit.",
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 12
                              }
                            },
                            "required": ["currency", "minorUnits"],
                            "additionalProperties": false
                          },
                          "high": {
                            "type": "object",
                            "properties": {
                              "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "ISO 4217 currency code"
                              },
                              "minorUnits": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "exponent": {
                                "description": "Decimal places the count is in. Omitted = the currency's minor unit.",
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 12
                              }
                            },
                            "required": ["currency", "minorUnits"],
                            "additionalProperties": false
                          }
                        },
                        "required": ["kind", "low", "high"],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "currency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$",
                        "description": "ISO 4217 currency code"
                      },
                      "minorUnits": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "exponent": {
                        "description": "Decimal places the count is in. Omitted = the currency's minor unit.",
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 12
                      }
                    },
                    "required": ["currency", "minorUnits"],
                    "additionalProperties": false
                  }
                ],
                "description": "The level itself — a bare Money for a single price (the same shape a `price-below` trigger takes; it is read as `{\"kind\":\"point\",…}`), `{\"kind\":\"point\",\"value\":…}` for the same thing written out, or `{\"kind\":\"band\",\"low\":…,\"high\":…}` for a range you would work across. Money, so the currency and the decimal precision are yours: a level of 0.0000094 USD survives, and nothing rounds it to a cent. A band is never collapsed to one number, so send a band when a band is what you concluded."
              },
              "reason": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000,
                "description": "Why this price, in your own words. Carried verbatim and never translated — it is read beside the level by the person whose money this is."
              },
              "thesisRefs": {
                "maxItems": 64,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "description": "The theses this level rests on, as `thesisId@version`, when it rests on one. Same spelling as the proposal-level field and the same meaning, one scope narrower."
              },
              "expiresAt": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$",
                "description": "When this level stops standing on its own. Absent, it stands until a later judgement of yours replaces it — see `priceLevels` for what replaces what.",
                "format": "date-time"
              },
              "armedKey": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "description": "The `key` of one of this same proposal's `watches` or `plans`, when this level is the line that watch opens or is watching. ANY trigger may be named, including `event`, `at-time` and `weight-drift` — that is how you say “this band applies once that happens”. The link is checked, not assumed: where the trigger names an asset it must be this level’s asset, and where it fires at a price that price must be inside this level. Omit it and the level is simply recorded — writing a price down arms nothing, and no watch, plan or order is created on your behalf."
              }
            },
            "required": ["purpose", "asset", "price", "reason"],
            "additionalProperties": false
          },
          "description": "The prices this judgement is working to — where you would enter, where the judgement is wrong, where you would take profit — each with its `purpose` stated. Send the complete set you still stand behind, every judgement: a list you send replaces every level you had standing on this book, so one you drop is released and `[]` releases them all. Omit the field entirely and this judgement says nothing about levels — what you had standing keeps standing, and nothing is read as a zero or guessed from a trigger. Writing a price here arms nothing and orders nothing; link it to a watch of yours with `armedKey` when you want it watched."
        },
        "analysis": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {},
          "description": "OPTIONAL. Your own structured record for this judgement, as a JSON object this host stores verbatim and never reads — no key here is known to it, reserved by it or refused by it. Put the machine-readable state your methodology needs its next run to have (a discovery cursor, a candidate ledger, an audit outcome) here rather than as a token inside your prose: the prose is what a person reads and this is what you read. It is sealed with the judgement and comes back on that judgement’s row through `invocation_read {sections: [\"analyses\"]}`, never in the head. At most 8000 bytes of JSON, and it is not evidence — a claim about the world belongs in `evidenceIds`, where it can be audited against an original."
        }
      },
      "required": ["action", "rationale"],
      "additionalProperties": false
    },
    "diagnostics": {
      "type": "object",
      "properties": {
        "startedAt": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$",
          "description": "RFC 3339 timestamp, e.g. 2026-08-04T13:24:59.000Z",
          "format": "date-time"
        },
        "finishedAt": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$",
          "description": "RFC 3339 timestamp, e.g. 2026-08-04T13:24:59.000Z",
          "format": "date-time"
        },
        "skillsUsed": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "steps": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "notes": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  },
  "required": ["protocol", "invocationId", "artifacts", "decision"],
  "additionalProperties": false
}
