{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://discern.sh/schema/v1/discern-results.schema.json",
  "x-discern-compatibility-policy": "result-output",
  "title": "discern CLI and MCP JSON results",
  "description": "The public JSON contract for discern CLI --json results and MCP tool results. Runtime schemas remain strict, but this published schema intentionally permits additive object fields so older pinned schemas can validate newer compatible output.",
  "oneOf": [
    {
      "$ref": "#/$defs/DiscernCliJsonResult"
    },
    {
      "$ref": "#/$defs/DiscernMcpJsonResult"
    }
  ],
  "$defs": {
    "DiscernResultState": {
      "title": "DiscernResultState",
      "allOf": [
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "ok": {
                  "type": "boolean",
                  "const": true
                },
                "error": {
                  "not": {}
                }
              },
              "required": [
                "ok"
              ],
              "additionalProperties": {}
            },
            {
              "type": "object",
              "properties": {
                "ok": {
                  "type": "boolean",
                  "const": false
                },
                "error": {
                  "type": "string",
                  "x-discern-vocabulary": "x-discern-error-slugs"
                }
              },
              "required": [
                "ok"
              ],
              "additionalProperties": {}
            }
          ]
        },
        {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "dry_run": {
                  "type": "boolean",
                  "const": true
                },
                "plan": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-step-kinds"
                          },
                          "label": {
                            "type": "string"
                          },
                          "disposition": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-step-dispositions"
                          },
                          "note": {
                            "type": "string"
                          },
                          "group": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "label",
                          "disposition"
                        ]
                      }
                    }
                  },
                  "required": [
                    "title",
                    "details",
                    "steps"
                  ]
                },
                "steps": {
                  "not": {}
                }
              },
              "required": [
                "dry_run"
              ],
              "additionalProperties": {}
            },
            {
              "type": "object",
              "properties": {
                "dry_run": {
                  "type": "boolean",
                  "const": false
                },
                "plan": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-step-kinds"
                          },
                          "label": {
                            "type": "string"
                          },
                          "disposition": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-step-dispositions"
                          },
                          "note": {
                            "type": "string"
                          },
                          "group": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "label",
                          "disposition"
                        ]
                      }
                    }
                  },
                  "required": [
                    "title",
                    "details",
                    "steps"
                  ]
                },
                "steps": {
                  "not": {}
                }
              },
              "required": [
                "plan"
              ],
              "additionalProperties": {}
            },
            {
              "type": "object",
              "properties": {
                "dry_run": {
                  "type": "boolean",
                  "const": false
                },
                "plan": {
                  "not": {}
                },
                "steps": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-step-kinds"
                      },
                      "label": {
                        "type": "string"
                      },
                      "disposition": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-step-dispositions"
                      },
                      "note": {
                        "type": "string"
                      },
                      "group": {
                        "type": "string"
                      },
                      "outcome": {
                        "type": "string",
                        "enum": [
                          "ok",
                          "failed",
                          "skipped",
                          "cancelled"
                        ],
                        "x-discern-vocabulary": "x-discern-step-outcomes"
                      },
                      "advisory": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-advisory-kinds"
                          },
                          "evidence": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "next_action": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "kind",
                          "evidence",
                          "next_action"
                        ]
                      },
                      "duration_s": {
                        "type": "number"
                      },
                      "output_path": {
                        "type": "string"
                      },
                      "output_lines": {
                        "type": "number"
                      },
                      "error_like_lines": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "kind",
                      "label",
                      "disposition",
                      "outcome"
                    ]
                  }
                }
              },
              "additionalProperties": {}
            }
          ]
        }
      ]
    },
    "DiscernRootResult": {
      "title": "DiscernRootResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "discern"
        },
        "data": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-config-issue-kinds"
                  },
                  "path": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ]
              }
            }
          },
          "required": [
            "issues"
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernSetupResult": {
      "title": "DiscernSetupResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "setup"
        },
        "data": {
          "anyOf": [
            {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "phase": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-setup-phases"
                    },
                    "complete": {
                      "type": "boolean"
                    },
                    "setup_completion": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-setup-completion-evidence"
                    },
                    "next_action": {
                      "type": "string",
                      "minLength": 1
                    },
                    "agent_instructions": {
                      "type": "string"
                    },
                    "human_framing": {
                      "type": "string"
                    },
                    "progress": {
                      "type": "object",
                      "properties": {
                        "pending_markers": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "known_jobs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "wired": {
                                "type": "boolean"
                              },
                              "not_applicable": {
                                "type": "boolean",
                                "const": true
                              }
                            },
                            "required": [
                              "name",
                              "wired"
                            ]
                          }
                        },
                        "assurance": {
                          "type": "object",
                          "properties": {
                            "known_jobs": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "state": {
                                    "type": "string",
                                    "x-discern-vocabulary": "x-discern-known-job-states"
                                  },
                                  "not_applicable": {
                                    "type": "boolean",
                                    "const": true
                                  },
                                  "reason": {
                                    "type": "string"
                                  },
                                  "self_supplied": {
                                    "type": "boolean",
                                    "const": true
                                  }
                                },
                                "required": [
                                  "name",
                                  "state"
                                ]
                              }
                            },
                            "enforced": {
                              "type": "number"
                            },
                            "total": {
                              "type": "number"
                            },
                            "known_total": {
                              "type": "number"
                            },
                            "not_applicable": {
                              "type": "number"
                            },
                            "verdict": {
                              "type": "string",
                              "x-discern-vocabulary": "x-discern-assurance-verdicts"
                            },
                            "completion": {
                              "type": "object",
                              "properties": {
                                "standards": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "shared": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "producer": {
                                        "type": "string"
                                      },
                                      "standards": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      }
                                    },
                                    "required": [
                                      "producer",
                                      "standards"
                                    ]
                                  }
                                },
                                "candidate_bound": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "declared": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              },
                              "required": [
                                "standards",
                                "shared",
                                "candidate_bound",
                                "declared"
                              ]
                            }
                          },
                          "required": [
                            "known_jobs",
                            "enforced",
                            "total",
                            "verdict"
                          ]
                        }
                      },
                      "required": [
                        "pending_markers",
                        "known_jobs"
                      ]
                    }
                  },
                  "required": [
                    "phase",
                    "complete",
                    "next_action"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "next_action": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "next_action"
                  ]
                }
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernSetupBeginResult": {
      "title": "DiscernSetupBeginResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "setup begin"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "complete": {
                  "type": "boolean"
                },
                "next_action": {
                  "type": "string",
                  "minLength": 1
                },
                "already_set_up": {
                  "type": "boolean"
                },
                "message": {
                  "type": "string"
                },
                "project": {
                  "type": "object",
                  "properties": {
                    "slug": {
                      "type": "string"
                    },
                    "agents": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "slug",
                    "agents"
                  ]
                },
                "config_fills": {
                  "type": "object",
                  "properties": {
                    "filled": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "skipped": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "filled",
                    "skipped"
                  ]
                },
                "plan": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "path": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-setup-plan-actions"
                      },
                      "note": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "action"
                    ]
                  }
                },
                "command": {
                  "type": "string"
                },
                "bootstrapped": {
                  "type": "boolean"
                },
                "branch": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "machinery_committed": {
                  "type": "boolean"
                },
                "machinery_commit_error": {
                  "type": "string"
                },
                "discern_version": {
                  "type": "string"
                },
                "written": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "instruction_refresh": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "complete"
                        },
                        "compiled": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "status",
                        "compiled"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "partial"
                        },
                        "compiled": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "failures": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "artifact"
                              },
                              "evidence": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "kind",
                              "evidence"
                            ]
                          }
                        },
                        "effects_preserved": {
                          "type": "boolean",
                          "const": true
                        },
                        "recovery": {
                          "type": "object",
                          "properties": {
                            "command": {
                              "type": "string",
                              "const": "discern refresh"
                            },
                            "safe_to_retry": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "required": [
                            "command",
                            "safe_to_retry"
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "compiled",
                        "failures",
                        "effects_preserved",
                        "recovery"
                      ]
                    }
                  ]
                },
                "mcp_wired": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "hooks_wired": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "worktree_app_wired": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "project_rules_wired": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "skeletons": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "skipped": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "instructions": {
                  "type": "string"
                },
                "human_relay": {
                  "type": "string"
                },
                "page": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "step": {
                          "type": "number"
                        },
                        "title": {
                          "type": "string"
                        },
                        "spine": {
                          "type": "object",
                          "properties": {
                            "phase": {
                              "type": "string",
                              "minLength": 1
                            },
                            "stable_target": {
                              "type": "string",
                              "minLength": 1
                            },
                            "intent": {
                              "type": "string",
                              "minLength": 1
                            },
                            "files_to_read": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "must_do": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "authority_boundaries": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "what_not_to_do": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "completion_check": {
                              "type": "string",
                              "minLength": 1
                            },
                            "stop_conditions": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "recovery": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "next_action": {
                              "type": "string",
                              "minLength": 1
                            },
                            "owner_moments": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "kind": {
                                    "type": "string",
                                    "x-discern-vocabulary": "x-discern-setup-moment-kinds"
                                  },
                                  "phase": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "purpose": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "applicability": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "always"
                                          }
                                        },
                                        "required": [
                                          "kind"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "when"
                                          },
                                          "evidence_id": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "condition": {
                                            "type": "string",
                                            "minLength": 1
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "evidence_id",
                                          "condition"
                                        ]
                                      }
                                    ]
                                  },
                                  "fact_ids": {
                                    "minItems": 1,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "recommendation": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "decision": {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "x-discern-vocabulary": "x-discern-setup-decision-kinds"
                                      },
                                      "recommended_option": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "option_ids": {
                                        "minItems": 2,
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1
                                        }
                                      },
                                      "agent_waits_when_served": {
                                        "type": "boolean",
                                        "const": true
                                      },
                                      "delegation": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "allowed": {
                                                "type": "boolean",
                                                "const": true
                                              },
                                              "action": {
                                                "type": "string",
                                                "const": "use-recommendation"
                                              },
                                              "selects_option": {
                                                "type": "string",
                                                "minLength": 1
                                              }
                                            },
                                            "required": [
                                              "allowed",
                                              "action",
                                              "selects_option"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "allowed": {
                                                "type": "boolean",
                                                "const": false
                                              },
                                              "reason": {
                                                "type": "string",
                                                "minLength": 1
                                              }
                                            },
                                            "required": [
                                              "allowed",
                                              "reason"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "recommended_option",
                                      "option_ids",
                                      "agent_waits_when_served",
                                      "delegation"
                                    ]
                                  },
                                  "relay_protection": {
                                    "type": "string",
                                    "x-discern-vocabulary": "x-discern-relay-protections"
                                  }
                                },
                                "required": [
                                  "id",
                                  "kind",
                                  "phase",
                                  "purpose",
                                  "applicability",
                                  "fact_ids",
                                  "relay_protection"
                                ]
                              }
                            },
                            "human_decisions": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "relay": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          },
                          "required": [
                            "phase",
                            "stable_target",
                            "intent",
                            "files_to_read",
                            "must_do",
                            "authority_boundaries",
                            "what_not_to_do",
                            "completion_check",
                            "stop_conditions",
                            "recovery",
                            "next_action",
                            "owner_moments",
                            "human_decisions"
                          ]
                        },
                        "instructions": {
                          "type": "string"
                        },
                        "next_action": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "step",
                        "title",
                        "spine",
                        "instructions",
                        "next_action"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "changes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "next_action"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernSetupVerifyResult": {
      "title": "DiscernSetupVerifyResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "setup verify"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "phase": {
                  "type": "string",
                  "x-discern-vocabulary": "x-discern-setup-phases"
                },
                "next_action": {
                  "type": "string",
                  "minLength": 1
                },
                "ready": {
                  "type": "boolean"
                },
                "findings": {
                  "type": "object",
                  "properties": {
                    "git": {
                      "type": "object",
                      "properties": {
                        "repo": {
                          "type": "boolean"
                        },
                        "clean": {
                          "type": "boolean"
                        },
                        "uncommitted": {
                          "type": "number"
                        },
                        "identity": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "repo",
                        "clean",
                        "uncommitted",
                        "identity"
                      ]
                    },
                    "docs": {
                      "type": "object",
                      "properties": {
                        "exists": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "exists"
                      ]
                    },
                    "existing_instructions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "agents_detected": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "agents_effective": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "worktree_path": {
                      "type": "string"
                    },
                    "project_identity": {
                      "type": "object",
                      "properties": {
                        "proposed_name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "evidence": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "source": {
                                "type": "string",
                                "minLength": 1
                              },
                              "location": {
                                "type": "string",
                                "minLength": 1
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "source",
                              "location",
                              "value"
                            ]
                          }
                        },
                        "fallback_only": {
                          "type": "boolean"
                        },
                        "requires_confirmation": {
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "required": [
                        "proposed_name",
                        "evidence",
                        "fallback_only",
                        "requires_confirmation"
                      ]
                    }
                  },
                  "required": [
                    "git",
                    "docs",
                    "existing_instructions",
                    "agents_detected",
                    "agents_effective",
                    "worktree_path",
                    "project_identity"
                  ]
                },
                "conflicts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-setup-conflict-kinds"
                      },
                      "detail": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "detail"
                    ]
                  }
                },
                "instructions": {
                  "type": "string"
                }
              },
              "required": [
                "phase",
                "next_action"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernSetupStepResult": {
      "title": "DiscernSetupStepResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "setup step"
        },
        "data": {
          "anyOf": [
            {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "step": {
                      "type": "number"
                    },
                    "title": {
                      "type": "string"
                    },
                    "spine": {
                      "type": "object",
                      "properties": {
                        "phase": {
                          "type": "string",
                          "minLength": 1
                        },
                        "stable_target": {
                          "type": "string",
                          "minLength": 1
                        },
                        "intent": {
                          "type": "string",
                          "minLength": 1
                        },
                        "files_to_read": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "must_do": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "authority_boundaries": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "what_not_to_do": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "completion_check": {
                          "type": "string",
                          "minLength": 1
                        },
                        "stop_conditions": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "recovery": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "next_action": {
                          "type": "string",
                          "minLength": 1
                        },
                        "owner_moments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "kind": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-setup-moment-kinds"
                              },
                              "phase": {
                                "type": "string",
                                "minLength": 1
                              },
                              "purpose": {
                                "type": "string",
                                "minLength": 1
                              },
                              "applicability": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "always"
                                      }
                                    },
                                    "required": [
                                      "kind"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "when"
                                      },
                                      "evidence_id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "condition": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "evidence_id",
                                      "condition"
                                    ]
                                  }
                                ]
                              },
                              "fact_ids": {
                                "minItems": 1,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "recommendation": {
                                "type": "string",
                                "minLength": 1
                              },
                              "decision": {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "x-discern-vocabulary": "x-discern-setup-decision-kinds"
                                  },
                                  "recommended_option": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "option_ids": {
                                    "minItems": 2,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "agent_waits_when_served": {
                                    "type": "boolean",
                                    "const": true
                                  },
                                  "delegation": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "allowed": {
                                            "type": "boolean",
                                            "const": true
                                          },
                                          "action": {
                                            "type": "string",
                                            "const": "use-recommendation"
                                          },
                                          "selects_option": {
                                            "type": "string",
                                            "minLength": 1
                                          }
                                        },
                                        "required": [
                                          "allowed",
                                          "action",
                                          "selects_option"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "allowed": {
                                            "type": "boolean",
                                            "const": false
                                          },
                                          "reason": {
                                            "type": "string",
                                            "minLength": 1
                                          }
                                        },
                                        "required": [
                                          "allowed",
                                          "reason"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "recommended_option",
                                  "option_ids",
                                  "agent_waits_when_served",
                                  "delegation"
                                ]
                              },
                              "relay_protection": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-relay-protections"
                              }
                            },
                            "required": [
                              "id",
                              "kind",
                              "phase",
                              "purpose",
                              "applicability",
                              "fact_ids",
                              "relay_protection"
                            ]
                          }
                        },
                        "human_decisions": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "relay": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "required": [
                        "phase",
                        "stable_target",
                        "intent",
                        "files_to_read",
                        "must_do",
                        "authority_boundaries",
                        "what_not_to_do",
                        "completion_check",
                        "stop_conditions",
                        "recovery",
                        "next_action",
                        "owner_moments",
                        "human_decisions"
                      ]
                    },
                    "instructions": {
                      "type": "string"
                    },
                    "next_action": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "step",
                    "title",
                    "spine",
                    "instructions",
                    "next_action"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "next_action": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "next_action"
                  ]
                }
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernSetupDoneResult": {
      "title": "DiscernSetupDoneResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "setup done"
        },
        "data": {
          "anyOf": [
            {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "bootstrapped": {
                      "type": "boolean",
                      "const": true
                    },
                    "completion": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-setup-done-completions"
                    },
                    "effects_performed": {
                      "type": "boolean"
                    },
                    "gate_ran": {
                      "type": "boolean"
                    },
                    "setup_completion": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-setup-completion-evidence"
                    },
                    "unproven": {
                      "type": "boolean"
                    },
                    "gate_proven": {
                      "type": "boolean"
                    },
                    "worktree_proven": {
                      "type": "boolean"
                    },
                    "marker_committed": {
                      "type": "boolean"
                    },
                    "marker_commit_error": {
                      "type": "string"
                    },
                    "proof_line": {
                      "type": "string"
                    },
                    "leftover": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "assurance": {
                      "type": "object",
                      "properties": {
                        "known_jobs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-known-job-states"
                              },
                              "not_applicable": {
                                "type": "boolean",
                                "const": true
                              },
                              "reason": {
                                "type": "string"
                              },
                              "self_supplied": {
                                "type": "boolean",
                                "const": true
                              }
                            },
                            "required": [
                              "name",
                              "state"
                            ]
                          }
                        },
                        "enforced": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "known_total": {
                          "type": "number"
                        },
                        "not_applicable": {
                          "type": "number"
                        },
                        "verdict": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-assurance-verdicts"
                        },
                        "completion": {
                          "type": "object",
                          "properties": {
                            "standards": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "shared": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "producer": {
                                    "type": "string"
                                  },
                                  "standards": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "required": [
                                  "producer",
                                  "standards"
                                ]
                              }
                            },
                            "candidate_bound": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "declared": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "standards",
                            "shared",
                            "candidate_bound",
                            "declared"
                          ]
                        }
                      },
                      "required": [
                        "known_jobs",
                        "enforced",
                        "total",
                        "verdict"
                      ]
                    },
                    "inventory": {
                      "type": "object",
                      "properties": {
                        "project_context": {
                          "type": "object",
                          "properties": {
                            "primary_subsystem": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "region": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "page": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "title": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "start_here": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "boundary": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "non_obvious_invariant": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "region",
                                    "page",
                                    "title",
                                    "start_here",
                                    "boundary",
                                    "non_obvious_invariant"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "principles": {
                              "type": "object",
                              "properties": {
                                "count": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                }
                              },
                              "required": [
                                "count",
                                "items"
                              ]
                            },
                            "instruction_sources": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          },
                          "required": [
                            "primary_subsystem",
                            "principles",
                            "instruction_sources"
                          ]
                        },
                        "map_regions": {
                          "type": "object",
                          "properties": {
                            "count": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "items": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          },
                          "required": [
                            "count",
                            "items"
                          ]
                        },
                        "ledger_items": {
                          "type": "object",
                          "properties": {
                            "count": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "items": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          },
                          "required": [
                            "count",
                            "items"
                          ]
                        },
                        "jobs": {
                          "type": "object",
                          "properties": {
                            "enforced": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "deferred": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "absent": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "not_applicable": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "enforced",
                            "deferred",
                            "absent",
                            "not_applicable"
                          ]
                        }
                      },
                      "required": [
                        "project_context",
                        "map_regions",
                        "ledger_items",
                        "jobs"
                      ]
                    },
                    "landing": {
                      "type": "object",
                      "properties": {
                        "in_repo": {
                          "type": "boolean"
                        },
                        "branch": {
                          "type": "string"
                        },
                        "target": {
                          "type": "string"
                        },
                        "on_target": {
                          "type": "boolean"
                        },
                        "on_setup_branch": {
                          "type": "boolean"
                        },
                        "command": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "in_repo",
                        "branch",
                        "target",
                        "on_target",
                        "on_setup_branch",
                        "command"
                      ]
                    },
                    "reactivation": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string"
                        },
                        "per_agent": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "agent": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "step": {
                                "type": "string"
                              },
                              "check_kind": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-reactivation-check-kinds"
                              },
                              "check": {
                                "type": "string"
                              },
                              "recovery": {
                                "type": "string"
                              },
                              "cli_fallback": {
                                "type": "string"
                              },
                              "trust": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string"
                                  },
                                  "required": {
                                    "type": "boolean"
                                  },
                                  "explanation": {
                                    "type": "string"
                                  },
                                  "actions": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": "string",
                                          "x-discern-vocabulary": "x-discern-trust-action-kinds"
                                        },
                                        "instruction": {
                                          "type": "string"
                                        },
                                        "facts": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "x-discern-vocabulary": "x-discern-trust-fact-kinds"
                                              },
                                              "value": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "value"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "instruction",
                                        "facts"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "provider",
                                  "required",
                                  "explanation",
                                  "actions"
                                ]
                              }
                            },
                            "required": [
                              "agent",
                              "label",
                              "step",
                              "check_kind",
                              "check",
                              "recovery",
                              "cli_fallback",
                              "trust"
                            ]
                          }
                        }
                      },
                      "required": [
                        "summary",
                        "per_agent"
                      ]
                    },
                    "optional_improvement": {
                      "type": "object",
                      "properties": {
                        "verb": {
                          "type": "string"
                        },
                        "command": {
                          "type": "string"
                        },
                        "after": {
                          "type": "string",
                          "const": "activation_verified"
                        }
                      },
                      "required": [
                        "verb",
                        "command",
                        "after"
                      ]
                    },
                    "instructions": {
                      "type": "string"
                    },
                    "next_action": {
                      "type": "string",
                      "minLength": 1
                    },
                    "proof": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-proof-statuses"
                        },
                        "path": {
                          "type": "string"
                        },
                        "recorded": {
                          "type": "string"
                        },
                        "head": {
                          "type": "string"
                        },
                        "reason": {
                          "type": "string"
                        },
                        "proof": {
                          "$ref": "#/$defs/DiscernProofSummary"
                        },
                        "checkpoint_drops": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "scope": {
                                    "type": "string",
                                    "const": "policy"
                                  },
                                  "checkpoint": {
                                    "type": "null"
                                  },
                                  "mode": {
                                    "type": "null"
                                  },
                                  "policy_commit": {
                                    "type": "string"
                                  },
                                  "reason": {
                                    "type": "string",
                                    "x-discern-vocabulary": "x-discern-policy-checkpoint-drop-reasons"
                                  },
                                  "account": {
                                    "type": "string",
                                    "maxLength": 500
                                  }
                                },
                                "required": [
                                  "scope",
                                  "checkpoint",
                                  "mode",
                                  "reason",
                                  "account"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "scope": {
                                    "type": "string",
                                    "const": "checkpoint"
                                  },
                                  "checkpoint": {
                                    "type": "string"
                                  },
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "stop",
                                      "advise"
                                    ],
                                    "x-discern-vocabulary": "x-discern-checkpoint-modes"
                                  },
                                  "policy_commit": {
                                    "type": "string"
                                  },
                                  "reason": {
                                    "type": "string",
                                    "x-discern-vocabulary": "x-discern-entry-checkpoint-drop-reasons"
                                  },
                                  "account": {
                                    "type": "string",
                                    "maxLength": 500
                                  }
                                },
                                "required": [
                                  "scope",
                                  "checkpoint",
                                  "mode",
                                  "policy_commit",
                                  "reason",
                                  "account"
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "status"
                      ]
                    }
                  },
                  "required": [
                    "bootstrapped",
                    "completion",
                    "effects_performed",
                    "gate_ran",
                    "setup_completion",
                    "unproven",
                    "gate_proven",
                    "worktree_proven",
                    "marker_committed",
                    "leftover",
                    "assurance",
                    "inventory",
                    "landing",
                    "instructions",
                    "next_action"
                  ]
                },
                {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "next_action": {
                          "type": "string",
                          "minLength": 1
                        },
                        "leftover": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "unmet": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "step": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "name": {
                                "type": "string"
                              },
                              "describe": {
                                "type": "string"
                              },
                              "passed": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "step",
                              "name",
                              "describe",
                              "passed"
                            ]
                          }
                        }
                      },
                      "required": [
                        "next_action",
                        "leftover",
                        "unmet"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "next_action": {
                          "type": "string",
                          "minLength": 1
                        },
                        "uncommitted": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "stage": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-setup-done-refresh-stages"
                        }
                      },
                      "required": [
                        "next_action",
                        "uncommitted"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "stage": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-setup-done-stages"
                        },
                        "rollback": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-setup-rollbacks"
                        },
                        "state": {
                          "type": "string",
                          "minLength": 1
                        },
                        "next_action": {
                          "type": "string",
                          "minLength": 1
                        },
                        "recovery": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "stage",
                        "rollback",
                        "state",
                        "next_action",
                        "recovery"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "next_action": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "next_action"
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernSetupAcceptResult": {
      "title": "DiscernSetupAcceptResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "setup accept"
        },
        "data": {
          "anyOf": [
            {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "next_action": {
                      "type": "string",
                      "minLength": 1
                    },
                    "landed": {
                      "type": "boolean"
                    },
                    "branch": {
                      "type": "string"
                    },
                    "target": {
                      "type": "string"
                    },
                    "fast_forward": {
                      "type": "boolean"
                    },
                    "branch_deleted": {
                      "type": "boolean"
                    },
                    "proof": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-proof-statuses"
                        },
                        "path": {
                          "type": "string"
                        },
                        "recorded": {
                          "type": "string"
                        },
                        "head": {
                          "type": "string"
                        },
                        "reason": {
                          "type": "string"
                        },
                        "proof": {
                          "$ref": "#/$defs/DiscernProofSummary"
                        },
                        "checkpoint_drops": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "scope": {
                                    "type": "string",
                                    "const": "policy"
                                  },
                                  "checkpoint": {
                                    "type": "null"
                                  },
                                  "mode": {
                                    "type": "null"
                                  },
                                  "policy_commit": {
                                    "type": "string"
                                  },
                                  "reason": {
                                    "type": "string",
                                    "x-discern-vocabulary": "x-discern-policy-checkpoint-drop-reasons"
                                  },
                                  "account": {
                                    "type": "string",
                                    "maxLength": 500
                                  }
                                },
                                "required": [
                                  "scope",
                                  "checkpoint",
                                  "mode",
                                  "reason",
                                  "account"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "scope": {
                                    "type": "string",
                                    "const": "checkpoint"
                                  },
                                  "checkpoint": {
                                    "type": "string"
                                  },
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "stop",
                                      "advise"
                                    ],
                                    "x-discern-vocabulary": "x-discern-checkpoint-modes"
                                  },
                                  "policy_commit": {
                                    "type": "string"
                                  },
                                  "reason": {
                                    "type": "string",
                                    "x-discern-vocabulary": "x-discern-entry-checkpoint-drop-reasons"
                                  },
                                  "account": {
                                    "type": "string",
                                    "maxLength": 500
                                  }
                                },
                                "required": [
                                  "scope",
                                  "checkpoint",
                                  "mode",
                                  "policy_commit",
                                  "reason",
                                  "account"
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "status"
                      ]
                    },
                    "proof_line": {
                      "type": "string"
                    },
                    "validated_commit": {
                      "type": "string"
                    },
                    "merge_validated": {
                      "type": "boolean"
                    },
                    "proof_note": {
                      "type": "object",
                      "properties": {
                        "fetch": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "x-discern-vocabulary": "x-discern-proof-note-fetch-modes"
                            },
                            "status": {
                              "type": "string",
                              "x-discern-vocabulary": "x-discern-proof-note-fetch-statuses"
                            },
                            "remotes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "added": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "removed": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "errors": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "mode",
                            "status",
                            "remotes",
                            "added",
                            "removed",
                            "errors"
                          ]
                        },
                        "write": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "x-discern-vocabulary": "x-discern-proof-note-write-statuses"
                            },
                            "ref": {
                              "type": "string"
                            },
                            "commit": {
                              "type": "string"
                            },
                            "merged_refs": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "reason": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "status",
                            "ref",
                            "commit",
                            "merged_refs"
                          ]
                        }
                      },
                      "required": [
                        "fetch",
                        "write"
                      ]
                    },
                    "local_artifacts_converged": {
                      "type": "boolean"
                    },
                    "local_artifact_errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "tracked_refresh_pending": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "tracked_refresh_errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "proof_cleared": {
                      "type": "boolean"
                    },
                    "proof_clear_error": {
                      "type": "string"
                    },
                    "reactivation": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string"
                        },
                        "per_agent": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "agent": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "step": {
                                "type": "string"
                              },
                              "check_kind": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-reactivation-check-kinds"
                              },
                              "check": {
                                "type": "string"
                              },
                              "recovery": {
                                "type": "string"
                              },
                              "cli_fallback": {
                                "type": "string"
                              },
                              "trust": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string"
                                  },
                                  "required": {
                                    "type": "boolean"
                                  },
                                  "explanation": {
                                    "type": "string"
                                  },
                                  "actions": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": "string",
                                          "x-discern-vocabulary": "x-discern-trust-action-kinds"
                                        },
                                        "instruction": {
                                          "type": "string"
                                        },
                                        "facts": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "x-discern-vocabulary": "x-discern-trust-fact-kinds"
                                              },
                                              "value": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "value"
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "instruction",
                                        "facts"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "provider",
                                  "required",
                                  "explanation",
                                  "actions"
                                ]
                              }
                            },
                            "required": [
                              "agent",
                              "label",
                              "step",
                              "check_kind",
                              "check",
                              "recovery",
                              "cli_fallback",
                              "trust"
                            ]
                          }
                        }
                      },
                      "required": [
                        "summary",
                        "per_agent"
                      ]
                    },
                    "activation_context": {
                      "type": "string",
                      "minLength": 1
                    },
                    "optional_improvement": {
                      "type": "object",
                      "properties": {
                        "command": {
                          "type": "string"
                        },
                        "after": {
                          "type": "string",
                          "const": "activation_verified"
                        }
                      },
                      "required": [
                        "command",
                        "after"
                      ]
                    }
                  },
                  "required": [
                    "next_action",
                    "landed",
                    "branch",
                    "target",
                    "fast_forward",
                    "branch_deleted",
                    "proof",
                    "merge_validated",
                    "local_artifacts_converged"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "next_action": {
                      "type": "string",
                      "minLength": 1
                    },
                    "completion": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "no_op"
                        },
                        "reason": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-setup-accept-no-op-reasons"
                        }
                      },
                      "required": [
                        "status",
                        "reason"
                      ]
                    },
                    "target": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "next_action",
                    "completion",
                    "target"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "next_action": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "next_action"
                  ]
                }
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernUpgradeResult": {
      "title": "DiscernUpgradeResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "upgrade"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "managed_version": {
                  "type": "object",
                  "properties": {
                    "previous": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "adopted": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "previous",
                    "adopted"
                  ]
                },
                "check": {
                  "type": "boolean"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "recorded": {
                      "type": "number"
                    },
                    "from": {
                      "type": "number"
                    },
                    "current": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "current"
                  ]
                },
                "pending_migrations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "number"
                      },
                      "to": {
                        "type": "number"
                      },
                      "describe": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "from",
                      "to",
                      "describe"
                    ]
                  }
                },
                "pending_reconciliation": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-reconcile-kinds"
                      },
                      "path": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "path"
                    ]
                  }
                },
                "config_template_available": {
                  "type": "boolean"
                },
                "pending_gitignore_reconciliation": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-gitignore-reconcile-kinds"
                      },
                      "path": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "path"
                    ]
                  }
                },
                "gitignore_template_available": {
                  "type": "boolean"
                },
                "pending_gitattributes_reconciliation": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-gitattributes-reconcile-kinds"
                      },
                      "path": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "path"
                    ]
                  }
                },
                "untranslated_gitattributes_patterns": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "group": {
                        "type": "string"
                      },
                      "pattern": {
                        "type": "string"
                      },
                      "reason": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "group",
                      "pattern",
                      "reason"
                    ]
                  }
                },
                "changes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "newer_records": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                },
                "discern_version": {
                  "type": "string"
                },
                "migrations_applied": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "number"
                      },
                      "to": {
                        "type": "number"
                      },
                      "describe": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "from",
                      "to",
                      "describe"
                    ]
                  }
                },
                "config_reconciled": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-reconcile-kinds"
                      },
                      "path": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "path"
                    ]
                  }
                },
                "gitignore_reconciled": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-gitignore-reconcile-kinds"
                      },
                      "path": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "path"
                    ]
                  }
                },
                "gitattributes_reconciled": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-gitattributes-reconcile-kinds"
                      },
                      "path": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "path"
                    ]
                  }
                },
                "skills": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "copied": {
                          "type": "number"
                        },
                        "linked": {
                          "type": "number"
                        },
                        "pruned": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "copied",
                        "linked",
                        "pruned"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "mcp_wired": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "hooks_wired": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "worktree_app_wired": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "project_rules_wired": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "instruction_refresh": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "complete"
                        },
                        "compiled": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "status",
                        "compiled"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "partial"
                        },
                        "compiled": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "failures": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "artifact"
                              },
                              "evidence": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "kind",
                              "evidence"
                            ]
                          }
                        },
                        "effects_preserved": {
                          "type": "boolean",
                          "const": true
                        },
                        "recovery": {
                          "type": "object",
                          "properties": {
                            "command": {
                              "type": "string",
                              "const": "discern refresh"
                            },
                            "safe_to_retry": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "required": [
                            "command",
                            "safe_to_retry"
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "compiled",
                        "failures",
                        "effects_preserved",
                        "recovery"
                      ]
                    }
                  ]
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernUninstallResult": {
      "title": "DiscernUninstallResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "uninstall"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "removed": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "removed_runtime_state": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "stripped": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "kept": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "binary_hint": {
                  "type": "string"
                },
                "worktrees": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "resources": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "templates_available": {
                  "type": "boolean"
                },
                "incomplete_strips": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "rel": {
                        "type": "string"
                      },
                      "reason": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "rel",
                      "reason"
                    ]
                  }
                },
                "removed_git_config": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "kept_git_config": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "retained_refs": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "optional_cleanup": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "git_config_errors": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernDoctorResult": {
      "title": "DiscernDoctorResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "doctor"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "managed_version": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-managed-version-states"
                    },
                    "running": {
                      "type": "string"
                    },
                    "managed": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "state",
                    "running"
                  ]
                },
                "managed_currency_unavailable": {
                  "type": "string"
                },
                "release_reminder": {
                  "type": "string"
                },
                "discern_version": {
                  "type": "string"
                },
                "environment": {
                  "type": "object",
                  "properties": {
                    "discern": {
                      "type": "string"
                    },
                    "platform": {
                      "type": "string"
                    },
                    "git": {
                      "type": "string"
                    },
                    "desk_session": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "discern",
                    "platform"
                  ]
                },
                "checks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-doctor-check-statuses"
                      },
                      "ok": {
                        "type": "boolean"
                      },
                      "detail": {
                        "type": "string"
                      },
                      "fix": {
                        "type": "string"
                      },
                      "warn": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "name",
                      "status",
                      "ok",
                      "detail"
                    ]
                  }
                },
                "provider_trust": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "provider": {
                        "type": "string"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "explanation": {
                        "type": "string"
                      },
                      "actions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "x-discern-vocabulary": "x-discern-trust-action-kinds"
                            },
                            "instruction": {
                              "type": "string"
                            },
                            "facts": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "x-discern-vocabulary": "x-discern-trust-fact-kinds"
                                  },
                                  "value": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "value"
                                ]
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "instruction",
                            "facts"
                          ]
                        }
                      }
                    },
                    "required": [
                      "provider",
                      "required",
                      "explanation",
                      "actions"
                    ]
                  }
                },
                "execution_model": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "verb": {
                        "type": "string"
                      },
                      "when": {
                        "type": "string"
                      },
                      "steps": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "x-discern-vocabulary": "x-discern-step-kinds"
                            },
                            "label": {
                              "type": "string"
                            },
                            "actor": {
                              "type": "string",
                              "x-discern-vocabulary": "x-discern-actors"
                            },
                            "note": {
                              "type": "string"
                            },
                            "hint": {
                              "type": "string"
                            },
                            "condition": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "label",
                            "actor"
                          ]
                        }
                      }
                    },
                    "required": [
                      "verb",
                      "when",
                      "steps"
                    ]
                  }
                }
              },
              "required": [
                "discern_version",
                "environment",
                "checks"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernReleasesResult": {
      "title": "DiscernReleasesResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "releases"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "running_version": {
                  "type": "string"
                },
                "codename": {
                  "type": "string"
                },
                "urls": {
                  "type": "object",
                  "properties": {
                    "html": {
                      "type": "string"
                    },
                    "json": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "html",
                    "json"
                  ]
                },
                "repository_state": {
                  "type": "string",
                  "x-discern-vocabulary": "x-discern-release-repository-states"
                },
                "launch_eligible": {
                  "type": "boolean"
                },
                "launch_attempted": {
                  "type": "boolean"
                },
                "launch_succeeded": {
                  "type": "boolean"
                },
                "launch_message": {
                  "type": "string"
                },
                "state_write": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-release-state-write-statuses"
                    },
                    "reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ]
                },
                "network_request": {
                  "type": "boolean",
                  "const": false
                }
              },
              "required": [
                "running_version",
                "urls",
                "repository_state",
                "launch_eligible",
                "launch_attempted",
                "launch_succeeded",
                "state_write",
                "network_request"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernLicensesResult": {
      "title": "DiscernLicensesResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "licenses"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "documents": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-legal-document-kinds"
                      },
                      "identifier": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "key",
                      "kind",
                      "identifier",
                      "title",
                      "path",
                      "text"
                    ]
                  }
                },
                "components": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "version": {
                        "type": "string"
                      },
                      "registry": {
                        "type": "string"
                      },
                      "license": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name",
                      "version",
                      "registry",
                      "license"
                    ]
                  }
                }
              },
              "required": [
                "documents",
                "components"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernTriangleResult": {
      "title": "DiscernTriangleResult",
      "x-discern-stability": "evolving",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "triangle"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "mark": {
                  "type": "string"
                },
                "art": {
                  "type": "string"
                }
              },
              "required": [
                "mark",
                "art"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernMapResult": {
      "title": "DiscernMapResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "map"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "map_dir": {
                  "type": "string"
                },
                "count": {
                  "type": "number"
                },
                "docs": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "target": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "section": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "publish": {
                        "type": "boolean"
                      },
                      "order": {
                        "type": "number"
                      },
                      "aliases": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "page_id": {
                        "type": "string"
                      },
                      "manual_kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-manual-kinds"
                      }
                    },
                    "required": [
                      "path",
                      "section",
                      "slug",
                      "title",
                      "description"
                    ]
                  }
                },
                "regions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "page_count": {
                        "type": "number"
                      },
                      "pages": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "target": {
                              "type": "string"
                            },
                            "path": {
                              "type": "string"
                            },
                            "source_paths": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "page_changed_at": {
                              "type": "string"
                            },
                            "code_changes_since": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "target",
                            "path",
                            "source_paths"
                          ]
                        }
                      },
                      "pages_changed_at": {
                        "type": "string"
                      },
                      "code_changes_since": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "name",
                      "title",
                      "description",
                      "page_count",
                      "pages"
                    ]
                  }
                },
                "doc": {
                  "type": "object",
                  "properties": {
                    "target": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "section": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "publish": {
                      "type": "boolean"
                    },
                    "order": {
                      "type": "number"
                    },
                    "aliases": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "page_id": {
                      "type": "string"
                    },
                    "manual_kind": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-manual-kinds"
                    },
                    "content": {
                      "type": "string"
                    },
                    "cited_adrs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "number": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "number",
                          "slug",
                          "path"
                        ]
                      }
                    },
                    "freshness": {
                      "type": "object",
                      "properties": {
                        "target": {
                          "type": "string"
                        },
                        "path": {
                          "type": "string"
                        },
                        "source_paths": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "page_changed_at": {
                          "type": "string"
                        },
                        "code_changes_since": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "target",
                        "path",
                        "source_paths"
                      ]
                    }
                  },
                  "required": [
                    "target",
                    "path",
                    "section",
                    "slug",
                    "title",
                    "description",
                    "content"
                  ]
                },
                "candidates": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "suggestions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "target": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "section": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "publish": {
                        "type": "boolean"
                      },
                      "order": {
                        "type": "number"
                      },
                      "aliases": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "page_id": {
                        "type": "string"
                      },
                      "manual_kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-manual-kinds"
                      }
                    },
                    "required": [
                      "path",
                      "section",
                      "slug",
                      "title",
                      "description"
                    ]
                  }
                },
                "query": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                },
                "results": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "target": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "section": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "page_id": {
                        "type": "string"
                      },
                      "manual_kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-manual-kinds"
                      },
                      "match": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-doc-matches"
                      },
                      "heading": {
                        "type": "string"
                      },
                      "snippet": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "target",
                      "path",
                      "section",
                      "title",
                      "description",
                      "match",
                      "snippet"
                    ]
                  }
                },
                "truncated": {
                  "type": "boolean"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernDocsResult": {
      "title": "DiscernDocsResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "docs"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "map_dir": {
                  "type": "string"
                },
                "count": {
                  "type": "number"
                },
                "docs": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "target": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "section": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "publish": {
                        "type": "boolean"
                      },
                      "order": {
                        "type": "number"
                      },
                      "aliases": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "page_id": {
                        "type": "string"
                      },
                      "manual_kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-manual-kinds"
                      }
                    },
                    "required": [
                      "path",
                      "section",
                      "slug",
                      "title",
                      "description"
                    ]
                  }
                },
                "regions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "page_count": {
                        "type": "number"
                      },
                      "pages": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "target": {
                              "type": "string"
                            },
                            "path": {
                              "type": "string"
                            },
                            "source_paths": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "page_changed_at": {
                              "type": "string"
                            },
                            "code_changes_since": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "target",
                            "path",
                            "source_paths"
                          ]
                        }
                      },
                      "pages_changed_at": {
                        "type": "string"
                      },
                      "code_changes_since": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "name",
                      "title",
                      "description",
                      "page_count",
                      "pages"
                    ]
                  }
                },
                "doc": {
                  "type": "object",
                  "properties": {
                    "target": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "section": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "publish": {
                      "type": "boolean"
                    },
                    "order": {
                      "type": "number"
                    },
                    "aliases": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "page_id": {
                      "type": "string"
                    },
                    "manual_kind": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-manual-kinds"
                    },
                    "content": {
                      "type": "string"
                    },
                    "cited_adrs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "number": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "number",
                          "slug",
                          "path"
                        ]
                      }
                    },
                    "freshness": {
                      "type": "object",
                      "properties": {
                        "target": {
                          "type": "string"
                        },
                        "path": {
                          "type": "string"
                        },
                        "source_paths": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "page_changed_at": {
                          "type": "string"
                        },
                        "code_changes_since": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "target",
                        "path",
                        "source_paths"
                      ]
                    }
                  },
                  "required": [
                    "target",
                    "path",
                    "section",
                    "slug",
                    "title",
                    "description",
                    "content"
                  ]
                },
                "candidates": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "suggestions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "target": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "section": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "publish": {
                        "type": "boolean"
                      },
                      "order": {
                        "type": "number"
                      },
                      "aliases": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "page_id": {
                        "type": "string"
                      },
                      "manual_kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-manual-kinds"
                      }
                    },
                    "required": [
                      "path",
                      "section",
                      "slug",
                      "title",
                      "description"
                    ]
                  }
                },
                "query": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                },
                "results": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "target": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "section": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "page_id": {
                        "type": "string"
                      },
                      "manual_kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-manual-kinds"
                      },
                      "match": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-doc-matches"
                      },
                      "heading": {
                        "type": "string"
                      },
                      "snippet": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "target",
                      "path",
                      "section",
                      "title",
                      "description",
                      "match",
                      "snippet"
                    ]
                  }
                },
                "truncated": {
                  "type": "boolean"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernHelpResult": {
      "title": "DiscernHelpResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "help"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "command": {
                  "$ref": "#/$defs/DiscernHelpCommand"
                }
              },
              "required": [
                "command"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernConfigResult": {
      "title": "DiscernConfigResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "config"
        },
        "data": {
          "anyOf": [
            {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "operation": {
                      "type": "string",
                      "const": "edit"
                    },
                    "file": {
                      "type": "string"
                    },
                    "edits": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "literal": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "TOML value to set, or null to delete this key."
                          }
                        },
                        "required": [
                          "key",
                          "literal"
                        ]
                      }
                    }
                  },
                  "required": [
                    "operation",
                    "file",
                    "edits"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "operation": {
                      "type": "string",
                      "const": "get"
                    },
                    "key": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "operation",
                    "key",
                    "value"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "operation": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-config-operations"
                    },
                    "key": {
                      "type": "string"
                    },
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "operation",
                    "key",
                    "values"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "operation": {
                      "type": "string",
                      "const": "has"
                    },
                    "key": {
                      "type": "string"
                    },
                    "present": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "operation",
                    "key",
                    "present"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "operation": {
                      "type": "string",
                      "const": "explain"
                    },
                    "path": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-config-explain-kinds"
                    },
                    "what": {
                      "type": "string"
                    },
                    "why": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "params": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "keys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "default": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "type",
                          "description"
                        ]
                      }
                    },
                    "type": {
                      "type": "string"
                    },
                    "default": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    },
                    "examples": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "lead": {
                            "type": "string"
                          },
                          "toml": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "lead",
                          "toml"
                        ]
                      }
                    },
                    "reference": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "operation",
                    "path",
                    "kind",
                    "reference"
                  ]
                }
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernDoneResult": {
      "title": "DiscernDoneResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "done"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "emergency_validation": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "landing_id": {
                        "type": "string"
                      },
                      "head": {
                        "type": "string"
                      },
                      "reason": {
                        "type": "string"
                      },
                      "exceptions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "requirement": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "^[A-Za-z0-9_-]+$"
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "job",
                                    "scope",
                                    "standard"
                                  ],
                                  "x-discern-vocabulary": "x-discern-requirement-kinds"
                                },
                                "definition": {
                                  "type": "string",
                                  "pattern": "^[0-9a-f]{64}$"
                                }
                              },
                              "required": [
                                "id",
                                "kind",
                                "definition"
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed",
                                "unrun",
                                "stale"
                              ],
                              "x-discern-vocabulary": "x-discern-exception-states"
                            },
                            "evidence_id": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "requirement",
                            "state",
                            "evidence_id"
                          ]
                        }
                      },
                      "state": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-exception-validation-states"
                      },
                      "resolved_by": {
                        "type": "object",
                        "properties": {
                          "candidate_id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "proof_id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "candidate_id",
                          "proof_id"
                        ]
                      },
                      "next_action": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "landing_id",
                      "head",
                      "reason",
                      "exceptions",
                      "state",
                      "next_action"
                    ]
                  }
                },
                "producer_executions": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "producer_evidence": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "producer": {
                        "type": "string"
                      },
                      "use": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-producer-evidence-uses"
                      },
                      "closure": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-producer-closures"
                      },
                      "reason": {
                        "type": "string"
                      },
                      "evidence_id": {
                        "type": "string"
                      },
                      "from": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "producer",
                      "use",
                      "closure",
                      "reason"
                    ]
                  }
                },
                "completion": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-gate-completion-kinds"
                    },
                    "candidate_id": {
                      "type": "string"
                    },
                    "proof_id": {
                      "type": "string"
                    },
                    "pending_reasons": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "pending": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "next_action": {
                            "type": "string"
                          },
                          "attempt_id": {
                            "type": "string"
                          },
                          "operation_handle": {
                            "type": "string"
                          },
                          "expires_at": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "kind",
                          "reason"
                        ]
                      }
                    }
                  },
                  "required": [
                    "kind",
                    "pending_reasons"
                  ]
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "strict",
                    "report"
                  ],
                  "x-discern-vocabulary": "x-discern-validation-modes"
                },
                "gate_ran": {
                  "type": "boolean"
                },
                "failed_stage": {
                  "anyOf": [
                    {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-failed-stages"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "scopes_changed": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "preview_actions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "scope": {
                        "type": "string"
                      },
                      "command": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "scope",
                      "command"
                    ]
                  }
                },
                "standards": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "direction": {
                        "type": "string",
                        "enum": [
                          "up",
                          "down"
                        ],
                        "x-discern-vocabulary": "x-discern-proposal-directions"
                      },
                      "limit": {
                        "type": "number"
                      },
                      "margin": {
                        "type": "number",
                        "minimum": 0
                      },
                      "measurement": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-standard-measurements"
                      },
                      "value": {
                        "type": "number"
                      },
                      "verdict": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-standard-verdicts"
                      },
                      "duration_s": {
                        "type": "number"
                      },
                      "replayed_from": {
                        "type": "string"
                      },
                      "pin_eligible": {
                        "type": "boolean"
                      },
                      "pin_target": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "name",
                      "direction",
                      "limit",
                      "measurement"
                    ]
                  }
                },
                "standards_limits": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-standards-limits-statuses"
                    },
                    "trunk": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "trunk"
                  ]
                },
                "checkpoints": {
                  "type": "object",
                  "properties": {
                    "policy": {
                      "type": "string"
                    },
                    "outstanding": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "mode": {
                            "type": "string",
                            "enum": [
                              "stop",
                              "advise"
                            ],
                            "x-discern-vocabulary": "x-discern-checkpoint-modes"
                          },
                          "question": {
                            "type": "string"
                          },
                          "question_file": {
                            "type": "string"
                          },
                          "teach": {
                            "type": "string"
                          },
                          "reference": {
                            "type": "string"
                          },
                          "matched": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "related": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "x-discern-vocabulary": "x-discern-related-checkpoint-kinds"
                                },
                                "for_path": {
                                  "type": "string"
                                },
                                "path": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "for_path",
                                "path"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "mode",
                          "question",
                          "matched"
                        ]
                      }
                    },
                    "declared_met": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "question": {
                            "type": "string"
                          },
                          "question_file": {
                            "type": "string"
                          },
                          "teach": {
                            "type": "string"
                          },
                          "reference": {
                            "type": "string"
                          },
                          "declared_at": {
                            "type": "string"
                          },
                          "matched": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "related": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "x-discern-vocabulary": "x-discern-related-checkpoint-kinds"
                                },
                                "for_path": {
                                  "type": "string"
                                },
                                "path": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "for_path",
                                "path"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "declared_at"
                        ],
                        "description": "One checkpoint question the agent declared met, with the declaration time. Agent evidence: recorded, not machine-verified."
                      }
                    },
                    "declared_unmet": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "question": {
                            "type": "string"
                          },
                          "question_file": {
                            "type": "string"
                          },
                          "teach": {
                            "type": "string"
                          },
                          "reference": {
                            "type": "string"
                          },
                          "why": {
                            "type": "string"
                          },
                          "declared_at": {
                            "type": "string"
                          },
                          "matched": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "related": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "x-discern-vocabulary": "x-discern-related-checkpoint-kinds"
                                },
                                "for_path": {
                                  "type": "string"
                                },
                                "path": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "for_path",
                                "path"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "why",
                          "declared_at"
                        ],
                        "description": "One checkpoint question the agent declared unmet, with its rationale and declaration time. Landing requires an owner-authorized variance."
                      }
                    },
                    "advise": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "mode": {
                            "type": "string",
                            "enum": [
                              "stop",
                              "advise"
                            ],
                            "x-discern-vocabulary": "x-discern-checkpoint-modes"
                          },
                          "question": {
                            "type": "string"
                          },
                          "question_file": {
                            "type": "string"
                          },
                          "teach": {
                            "type": "string"
                          },
                          "reference": {
                            "type": "string"
                          },
                          "matched": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "related": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "x-discern-vocabulary": "x-discern-related-checkpoint-kinds"
                                },
                                "for_path": {
                                  "type": "string"
                                },
                                "path": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "for_path",
                                "path"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "mode",
                          "question",
                          "matched"
                        ]
                      }
                    },
                    "review": {
                      "type": "object",
                      "properties": {
                        "enforcement": {
                          "type": "string",
                          "const": "reported"
                        },
                        "status": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-checkpoint-review-statuses"
                        },
                        "unreviewed": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "stop",
                                  "advise"
                                ],
                                "x-discern-vocabulary": "x-discern-checkpoint-modes"
                              },
                              "question": {
                                "type": "string"
                              },
                              "question_file": {
                                "type": "string"
                              },
                              "teach": {
                                "type": "string"
                              },
                              "reference": {
                                "type": "string"
                              },
                              "matched": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "related": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "x-discern-vocabulary": "x-discern-related-checkpoint-kinds"
                                    },
                                    "for_path": {
                                      "type": "string"
                                    },
                                    "path": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "for_path",
                                    "path"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "mode",
                              "question",
                              "matched"
                            ]
                          }
                        }
                      },
                      "required": [
                        "enforcement",
                        "status"
                      ]
                    },
                    "drops": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "scope": {
                                "type": "string",
                                "const": "policy"
                              },
                              "checkpoint": {
                                "type": "null"
                              },
                              "mode": {
                                "type": "null"
                              },
                              "policy_commit": {
                                "type": "string"
                              },
                              "reason": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-policy-checkpoint-drop-reasons"
                              },
                              "account": {
                                "type": "string",
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "scope",
                              "checkpoint",
                              "mode",
                              "reason",
                              "account"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "scope": {
                                "type": "string",
                                "const": "checkpoint"
                              },
                              "checkpoint": {
                                "type": "string"
                              },
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "stop",
                                  "advise"
                                ],
                                "x-discern-vocabulary": "x-discern-checkpoint-modes"
                              },
                              "policy_commit": {
                                "type": "string"
                              },
                              "reason": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-entry-checkpoint-drop-reasons"
                              },
                              "account": {
                                "type": "string",
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "scope",
                              "checkpoint",
                              "mode",
                              "policy_commit",
                              "reason",
                              "account"
                            ]
                          }
                        ]
                      }
                    },
                    "advisories": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "gate_proof": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-gate-proof-recording-statuses"
                    },
                    "path": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ]
                },
                "proof": {
                  "$ref": "#/$defs/DiscernProofSummary"
                },
                "landing_authority": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "authorized",
                        "conversation-required"
                      ],
                      "x-discern-vocabulary": "x-discern-landing-authority-kinds"
                    },
                    "source": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-consent-sources"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "standing_scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "uncovered_scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "uncovered_unscoped_total": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "uncovered_generated_total": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "uncovered": {
                      "maxItems": 6,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "generated": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "path",
                          "scopes"
                        ]
                      }
                    },
                    "uncovered_total": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "kind"
                  ]
                }
              },
              "required": [
                "failed_stage",
                "scopes_changed"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernPrepareResult": {
      "title": "DiscernPrepareResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "prepare"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "producer_executions": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "producer_evidence": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "producer": {
                        "type": "string"
                      },
                      "use": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-producer-evidence-uses"
                      },
                      "closure": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-producer-closures"
                      },
                      "reason": {
                        "type": "string"
                      },
                      "evidence_id": {
                        "type": "string"
                      },
                      "from": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "producer",
                      "use",
                      "closure",
                      "reason"
                    ]
                  }
                },
                "standards": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "direction": {
                        "type": "string",
                        "enum": [
                          "up",
                          "down"
                        ],
                        "x-discern-vocabulary": "x-discern-proposal-directions"
                      },
                      "limit": {
                        "type": "number"
                      },
                      "margin": {
                        "type": "number",
                        "minimum": 0
                      },
                      "measurement": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-standard-measurements"
                      },
                      "value": {
                        "type": "number"
                      },
                      "verdict": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-standard-verdicts"
                      },
                      "duration_s": {
                        "type": "number"
                      },
                      "replayed_from": {
                        "type": "string"
                      },
                      "pin_eligible": {
                        "type": "boolean"
                      },
                      "pin_target": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "name",
                      "direction",
                      "limit",
                      "measurement"
                    ]
                  }
                },
                "measurement": {
                  "type": "string",
                  "const": "none"
                },
                "completion": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "diagnostic"
                    },
                    "proof": {
                      "type": "string",
                      "const": "not-issued"
                    }
                  },
                  "required": [
                    "kind",
                    "proof"
                  ]
                }
              },
              "required": [
                "producer_executions"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernTestResult": {
      "title": "DiscernTestResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "test"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "producer_executions": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "producer_evidence": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "producer": {
                        "type": "string"
                      },
                      "use": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-producer-evidence-uses"
                      },
                      "closure": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-producer-closures"
                      },
                      "reason": {
                        "type": "string"
                      },
                      "evidence_id": {
                        "type": "string"
                      },
                      "from": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "producer",
                      "use",
                      "closure",
                      "reason"
                    ]
                  }
                },
                "standards": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "direction": {
                        "type": "string",
                        "enum": [
                          "up",
                          "down"
                        ],
                        "x-discern-vocabulary": "x-discern-proposal-directions"
                      },
                      "limit": {
                        "type": "number"
                      },
                      "margin": {
                        "type": "number",
                        "minimum": 0
                      },
                      "measurement": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-standard-measurements"
                      },
                      "value": {
                        "type": "number"
                      },
                      "verdict": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-standard-verdicts"
                      },
                      "duration_s": {
                        "type": "number"
                      },
                      "replayed_from": {
                        "type": "string"
                      },
                      "pin_eligible": {
                        "type": "boolean"
                      },
                      "pin_target": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "name",
                      "direction",
                      "limit",
                      "measurement"
                    ]
                  }
                },
                "measurement": {
                  "type": "string",
                  "const": "none"
                },
                "completion": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "diagnostic"
                    },
                    "proof": {
                      "type": "string",
                      "const": "not-issued"
                    }
                  },
                  "required": [
                    "kind",
                    "proof"
                  ]
                }
              },
              "required": [
                "producer_executions"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernImprovementResult": {
      "title": "DiscernImprovementResult",
      "x-discern-stability": "evolving",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "improvement"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "score": {
                  "type": "number"
                },
                "weak": {
                  "type": "number"
                },
                "open_reviews": {
                  "type": "number"
                },
                "next_action": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-next-action-kinds"
                    },
                    "category": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "action": {
                      "type": "string"
                    },
                    "why": {
                      "type": "string"
                    },
                    "against": {
                      "type": "object",
                      "properties": {
                        "source": {
                          "type": "string"
                        },
                        "excerpt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "source",
                        "excerpt"
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "category",
                    "id",
                    "title",
                    "action",
                    "why"
                  ]
                },
                "recommendations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-checkpoint-recommendations"
                      },
                      "subject": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string"
                      },
                      "why": {
                        "type": "string"
                      },
                      "evidence": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string"
                          },
                          "excerpt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "source",
                          "excerpt"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "subject",
                      "title",
                      "action",
                      "why",
                      "evidence"
                    ]
                  }
                },
                "categories": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "score": {
                        "type": "number"
                      },
                      "weight": {
                        "type": "number"
                      },
                      "weak": {
                        "type": "number"
                      },
                      "rules": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "title": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "x-discern-vocabulary": "x-discern-rule-statuses"
                            },
                            "weight": {
                              "type": "number"
                            },
                            "detail": {
                              "type": "string"
                            },
                            "fix": {
                              "type": "string"
                            },
                            "teach": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "title",
                            "status",
                            "weight",
                            "detail",
                            "teach"
                          ]
                        }
                      },
                      "reviews": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "title": {
                              "type": "string"
                            },
                            "ask": {
                              "type": "string"
                            },
                            "teach": {
                              "type": "string"
                            },
                            "against": {
                              "type": "object",
                              "properties": {
                                "source": {
                                  "type": "string"
                                },
                                "excerpt": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "source",
                                "excerpt"
                              ]
                            },
                            "boundary": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "checkpoint": {
                                    "type": "string"
                                  },
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "stop",
                                      "advise"
                                    ],
                                    "x-discern-vocabulary": "x-discern-checkpoint-modes"
                                  }
                                },
                                "required": [
                                  "checkpoint",
                                  "mode"
                                ]
                              }
                            }
                          },
                          "required": [
                            "id",
                            "title",
                            "ask",
                            "teach"
                          ]
                        }
                      }
                    },
                    "required": [
                      "name",
                      "title",
                      "score",
                      "weight",
                      "weak",
                      "rules",
                      "reviews"
                    ]
                  }
                },
                "history": {
                  "type": "object",
                  "properties": {
                    "findings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "detector": {
                            "type": "string"
                          },
                          "family": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-detector-families"
                          },
                          "scope": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-detector-scopes"
                          },
                          "tone": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-finding-tones"
                          },
                          "subject": {
                            "type": "string"
                          },
                          "summary": {
                            "type": "string",
                            "minLength": 1
                          },
                          "series": {
                            "maxItems": 24,
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "observed": {
                            "type": "string"
                          },
                          "evidence": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "number"
                            }
                          },
                          "basis": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "minLength": 1
                              },
                              "coverage": {
                                "type": "object",
                                "properties": {
                                  "comparable": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "denominator": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "unit": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "comparable",
                                  "denominator",
                                  "unit"
                                ]
                              },
                              "validation_state": {
                                "type": "object",
                                "properties": {
                                  "version": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "complete": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "version",
                                  "complete"
                                ]
                              },
                              "matched_conditions": {
                                "maxItems": 16,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "dimension": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "values": {
                                      "minItems": 1,
                                      "maxItems": 16,
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "distinct": {
                                      "type": "integer",
                                      "exclusiveMinimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "omitted": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "required": [
                                    "dimension",
                                    "values",
                                    "distinct",
                                    "omitted"
                                  ]
                                }
                              },
                              "differing_conditions": {
                                "maxItems": 16,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "dimension": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "values": {
                                      "minItems": 1,
                                      "maxItems": 16,
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "distinct": {
                                      "type": "integer",
                                      "exclusiveMinimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "omitted": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "required": [
                                    "dimension",
                                    "values",
                                    "distinct",
                                    "omitted"
                                  ]
                                }
                              },
                              "excluded_events": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "limitations": {
                                "maxItems": 16,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "values": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {
                                  "type": "object",
                                  "properties": {
                                    "value": {
                                      "type": "number"
                                    },
                                    "kind": {
                                      "type": "string",
                                      "x-discern-vocabulary": "x-discern-evidence-value-kinds"
                                    }
                                  },
                                  "required": [
                                    "value",
                                    "kind"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "kind",
                              "coverage",
                              "validation_state",
                              "matched_conditions",
                              "differing_conditions",
                              "excluded_events",
                              "limitations",
                              "values"
                            ]
                          },
                          "strength": {
                            "type": "number"
                          },
                          "next_step": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "detector",
                          "family",
                          "scope",
                          "tone",
                          "summary",
                          "observed",
                          "evidence",
                          "strength",
                          "next_step"
                        ]
                      }
                    }
                  },
                  "required": [
                    "findings"
                  ]
                }
              },
              "required": [
                "score",
                "weak",
                "open_reviews",
                "next_action",
                "categories",
                "history"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernCheckpointsResult": {
      "title": "DiscernCheckpointsResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "checkpoints"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "policy": {
                  "type": "string"
                },
                "checkpoints": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "mode": {
                        "type": "string",
                        "enum": [
                          "stop",
                          "advise"
                        ],
                        "x-discern-vocabulary": "x-discern-checkpoint-modes"
                      },
                      "question": {
                        "type": "string"
                      },
                      "question_file": {
                        "type": "string"
                      },
                      "teach": {
                        "type": "string"
                      },
                      "reference": {
                        "type": "string"
                      },
                      "trigger": {
                        "type": "string"
                      },
                      "obligation": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-checkpoint-obligations"
                      },
                      "preview": {
                        "type": "object",
                        "properties": {
                          "holds": {
                            "type": "boolean"
                          },
                          "when_pending": {
                            "type": "boolean"
                          },
                          "matched": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "related": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "x-discern-vocabulary": "x-discern-related-checkpoint-kinds"
                                },
                                "for_path": {
                                  "type": "string"
                                },
                                "path": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "for_path",
                                "path"
                              ]
                            }
                          },
                          "vetoed_by": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-trigger-vetoes"
                          }
                        },
                        "required": [
                          "holds"
                        ]
                      },
                      "open_question": {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-open-question-states"
                          },
                          "definition_hash": {
                            "type": "string"
                          },
                          "subject": {
                            "type": "string"
                          },
                          "matched": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "related": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "x-discern-vocabulary": "x-discern-related-checkpoint-kinds"
                                },
                                "for_path": {
                                  "type": "string"
                                },
                                "path": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "for_path",
                                "path"
                              ]
                            }
                          },
                          "opened_at": {
                            "type": "string"
                          },
                          "reopened_at": {
                            "type": "string"
                          },
                          "declaration": {
                            "type": "object",
                            "properties": {
                              "conclusion": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-declaration-conclusions"
                              },
                              "why": {
                                "type": "string"
                              },
                              "declared_at": {
                                "type": "string"
                              },
                              "current": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "conclusion",
                              "declared_at",
                              "current"
                            ]
                          },
                          "variance_required": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "state",
                          "definition_hash",
                          "subject",
                          "matched",
                          "opened_at"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "mode",
                      "question",
                      "trigger",
                      "obligation"
                    ]
                  }
                },
                "ungoverned": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "open_question": {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-open-question-states"
                          },
                          "definition_hash": {
                            "type": "string"
                          },
                          "subject": {
                            "type": "string"
                          },
                          "matched": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "related": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "x-discern-vocabulary": "x-discern-related-checkpoint-kinds"
                                },
                                "for_path": {
                                  "type": "string"
                                },
                                "path": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "for_path",
                                "path"
                              ]
                            }
                          },
                          "opened_at": {
                            "type": "string"
                          },
                          "reopened_at": {
                            "type": "string"
                          },
                          "declaration": {
                            "type": "object",
                            "properties": {
                              "conclusion": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-declaration-conclusions"
                              },
                              "why": {
                                "type": "string"
                              },
                              "declared_at": {
                                "type": "string"
                              },
                              "current": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "conclusion",
                              "declared_at",
                              "current"
                            ]
                          },
                          "variance_required": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "state",
                          "definition_hash",
                          "subject",
                          "matched",
                          "opened_at"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "open_question"
                    ]
                  }
                },
                "economics": {
                  "type": "object",
                  "properties": {
                    "efforts": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "rows": {
                      "maxItems": 16,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "efforts_fired": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "efforts_landed": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "fires": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "declared": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "declared_unchanged": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "declared_unmet": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "reopened": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "variances": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "abandoned": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "median_declare_s": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "efforts_fired",
                          "efforts_landed",
                          "fires",
                          "declared",
                          "declared_unchanged",
                          "declared_unmet",
                          "reopened",
                          "variances",
                          "abandoned"
                        ]
                      }
                    },
                    "omitted": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "efforts",
                    "rows",
                    "omitted"
                  ]
                },
                "drops": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "scope": {
                            "type": "string",
                            "const": "policy"
                          },
                          "checkpoint": {
                            "type": "null"
                          },
                          "mode": {
                            "type": "null"
                          },
                          "policy_commit": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-policy-checkpoint-drop-reasons"
                          },
                          "account": {
                            "type": "string",
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "scope",
                          "checkpoint",
                          "mode",
                          "reason",
                          "account"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "scope": {
                            "type": "string",
                            "const": "checkpoint"
                          },
                          "checkpoint": {
                            "type": "string"
                          },
                          "mode": {
                            "type": "string",
                            "enum": [
                              "stop",
                              "advise"
                            ],
                            "x-discern-vocabulary": "x-discern-checkpoint-modes"
                          },
                          "policy_commit": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-entry-checkpoint-drop-reasons"
                          },
                          "account": {
                            "type": "string",
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "scope",
                          "checkpoint",
                          "mode",
                          "policy_commit",
                          "reason",
                          "account"
                        ]
                      }
                    ]
                  }
                },
                "advisories": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "checkpoints"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernProgressResult": {
      "title": "DiscernProgressResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "progress"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "handle": {
                  "type": "string"
                },
                "record_path": {
                  "type": "string"
                },
                "operation": {
                  "type": "object",
                  "properties": {
                    "verb": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "branch": {
                      "type": "string"
                    },
                    "started_at": {
                      "type": "number"
                    },
                    "finished_at": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "verb",
                    "path",
                    "started_at"
                  ]
                },
                "executor": {
                  "type": "string",
                  "x-discern-vocabulary": "x-discern-executor-states"
                },
                "executor_reason": {
                  "type": "string"
                },
                "observed_at": {
                  "type": "number"
                },
                "last_activity_at": {
                  "type": "number"
                },
                "waits": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "state": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-wait-states"
                      },
                      "reason": {
                        "type": "string"
                      },
                      "next": {
                        "type": "string"
                      },
                      "started_at": {
                        "type": "number"
                      },
                      "updated_at": {
                        "type": "number"
                      },
                      "elapsed_ms": {
                        "type": "number",
                        "minimum": 0
                      },
                      "finished_at": {
                        "type": "number"
                      },
                      "capacity": {
                        "type": "object",
                        "properties": {
                          "in_use": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "limit": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "in_use",
                          "limit"
                        ]
                      },
                      "condition": {
                        "type": "object",
                        "properties": {
                          "condition": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-await-conditions"
                          },
                          "branch": {
                            "type": "string"
                          },
                          "trunk": {
                            "type": "string"
                          },
                          "observed": {
                            "type": "object",
                            "properties": {
                              "proof_status": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-await-proof-statuses"
                              },
                              "worktree": {
                                "type": "string"
                              },
                              "tip": {
                                "type": "string"
                              },
                              "landed": {
                                "type": "boolean"
                              },
                              "trunk_start": {
                                "type": "string"
                              },
                              "trunk_head": {
                                "type": "string"
                              },
                              "behind": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "string",
                                    "const": "unknown"
                                  }
                                ]
                              },
                              "incoming_overlap": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "overlap_total": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            }
                          },
                          "timeout_s": {
                            "type": "number"
                          },
                          "resume": {
                            "type": "string",
                            "minLength": 15,
                            "maxLength": 15,
                            "pattern": "^C1-[0-9A-HJKMNP-TV-Z]{4}-[0-9A-HJKMNP-TV-Z]{4}-[0-9A-HJKMNP-TV-Z]{2}$"
                          }
                        },
                        "required": [
                          "condition",
                          "trunk",
                          "observed",
                          "timeout_s"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "state",
                      "reason",
                      "next",
                      "started_at",
                      "updated_at",
                      "elapsed_ms"
                    ]
                  }
                },
                "outcome": {
                  "type": "string",
                  "x-discern-vocabulary": "x-discern-operation-outcomes"
                },
                "progress": {
                  "type": "object",
                  "properties": {
                    "phase": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-progress-phases"
                    },
                    "state": {
                      "type": "string"
                    },
                    "candidate_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "type": "string"
                    },
                    "operation_handle": {
                      "type": "string"
                    },
                    "next": {
                      "type": "string"
                    },
                    "owner_must_act": {
                      "type": "boolean"
                    },
                    "work": {
                      "type": "object",
                      "properties": {
                        "producer": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-work-states"
                        },
                        "units": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string"
                            },
                            "completed": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "total": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "completed",
                            "total"
                          ]
                        },
                        "results": {
                          "type": "object",
                          "properties": {
                            "passed": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "failed": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "skipped": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        "active": {
                          "readOnly": true,
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "elapsed_ms": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "partial": {
                          "type": "boolean"
                        },
                        "output_path": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "producer"
                      ]
                    },
                    "attempt_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "phase",
                    "state",
                    "candidate_id",
                    "reason"
                  ]
                },
                "producers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "producer": {
                        "type": "string"
                      },
                      "state": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-work-states"
                      },
                      "units": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string"
                          },
                          "completed": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "total": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "kind",
                          "completed",
                          "total"
                        ]
                      },
                      "results": {
                        "type": "object",
                        "properties": {
                          "passed": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "failed": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "skipped": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        }
                      },
                      "active": {
                        "readOnly": true,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "elapsed_ms": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "partial": {
                        "type": "boolean"
                      },
                      "output_path": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "producer"
                    ]
                  }
                },
                "failures": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "producer": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      },
                      "file": {
                        "type": "string"
                      },
                      "line": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "reproduce_cmd": {
                        "type": "string"
                      },
                      "partial": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "producer",
                      "name",
                      "message",
                      "partial"
                    ]
                  }
                },
                "timings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "category": {
                        "type": "string"
                      },
                      "interval_id": {
                        "type": "string"
                      },
                      "started_at": {
                        "type": "number"
                      },
                      "finished_at": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "category",
                      "interval_id",
                      "started_at",
                      "finished_at"
                    ]
                  }
                },
                "result": {},
                "result_truncated": {
                  "type": "boolean"
                },
                "result_path": {
                  "type": "string"
                },
                "result_retention_error": {
                  "type": "string"
                },
                "account": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "handle",
                "operation",
                "executor",
                "account"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernStandardsResult": {
      "title": "DiscernStandardsResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "standards"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "producer_executions": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "producer_evidence": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "producer": {
                        "type": "string"
                      },
                      "use": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-producer-evidence-uses"
                      },
                      "closure": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-producer-closures"
                      },
                      "reason": {
                        "type": "string"
                      },
                      "evidence_id": {
                        "type": "string"
                      },
                      "from": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "producer",
                      "use",
                      "closure",
                      "reason"
                    ]
                  }
                },
                "standards": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "direction": {
                        "type": "string",
                        "enum": [
                          "up",
                          "down"
                        ],
                        "x-discern-vocabulary": "x-discern-proposal-directions"
                      },
                      "limit": {
                        "type": "number"
                      },
                      "margin": {
                        "type": "number",
                        "minimum": 0
                      },
                      "measurement": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-standard-measurements"
                      },
                      "value": {
                        "type": "number"
                      },
                      "verdict": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-standard-verdicts"
                      },
                      "duration_s": {
                        "type": "number"
                      },
                      "replayed_from": {
                        "type": "string"
                      },
                      "pin_eligible": {
                        "type": "boolean"
                      },
                      "pin_target": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "name",
                      "direction",
                      "limit",
                      "measurement"
                    ]
                  }
                },
                "pinned": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "from": {
                        "type": "number"
                      },
                      "to": {
                        "type": "number"
                      },
                      "measured": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "name",
                      "from",
                      "to",
                      "measured"
                    ]
                  }
                },
                "proposal": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-proposal-statuses"
                    },
                    "proposal": {
                      "type": "object",
                      "properties": {
                        "standard": {
                          "type": "string"
                        },
                        "commit": {
                          "type": "string"
                        },
                        "bound_commit": {
                          "type": "string"
                        },
                        "measured_commit": {
                          "type": "string"
                        },
                        "definition_fingerprint": {
                          "type": "string"
                        },
                        "trunk": {
                          "type": "string"
                        },
                        "trunk_commit": {
                          "type": "string"
                        },
                        "direction": {
                          "type": "string",
                          "enum": [
                            "up",
                            "down"
                          ],
                          "x-discern-vocabulary": "x-discern-proposal-directions"
                        },
                        "trunk_limit": {
                          "type": "number"
                        },
                        "proposed_limit": {
                          "type": "number"
                        },
                        "measurement": {
                          "type": "number"
                        },
                        "delta": {
                          "type": "number"
                        },
                        "reason": {
                          "type": "string"
                        },
                        "evidence_paths": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "required": [
                        "standard",
                        "commit",
                        "bound_commit",
                        "measured_commit",
                        "definition_fingerprint",
                        "trunk",
                        "trunk_commit",
                        "direction",
                        "trunk_limit",
                        "proposed_limit",
                        "measurement",
                        "delta",
                        "reason",
                        "evidence_paths"
                      ]
                    }
                  },
                  "required": [
                    "status",
                    "proposal"
                  ]
                },
                "proposal_batch": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-proposal-statuses"
                    },
                    "proposals": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "standard": {
                            "type": "string"
                          },
                          "commit": {
                            "type": "string"
                          },
                          "bound_commit": {
                            "type": "string"
                          },
                          "measured_commit": {
                            "type": "string"
                          },
                          "definition_fingerprint": {
                            "type": "string"
                          },
                          "trunk": {
                            "type": "string"
                          },
                          "trunk_commit": {
                            "type": "string"
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "up",
                              "down"
                            ],
                            "x-discern-vocabulary": "x-discern-proposal-directions"
                          },
                          "trunk_limit": {
                            "type": "number"
                          },
                          "proposed_limit": {
                            "type": "number"
                          },
                          "measurement": {
                            "type": "number"
                          },
                          "delta": {
                            "type": "number"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "evidence_paths": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        },
                        "required": [
                          "standard",
                          "commit",
                          "bound_commit",
                          "measured_commit",
                          "definition_fingerprint",
                          "trunk",
                          "trunk_commit",
                          "direction",
                          "trunk_limit",
                          "proposed_limit",
                          "measurement",
                          "delta",
                          "reason",
                          "evidence_paths"
                        ]
                      }
                    }
                  },
                  "required": [
                    "status",
                    "proposals"
                  ]
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernStandardsProposeResult": {
      "title": "DiscernStandardsProposeResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "standards propose"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "producer_executions": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "producer_evidence": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "producer": {
                        "type": "string"
                      },
                      "use": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-producer-evidence-uses"
                      },
                      "closure": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-producer-closures"
                      },
                      "reason": {
                        "type": "string"
                      },
                      "evidence_id": {
                        "type": "string"
                      },
                      "from": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "producer",
                      "use",
                      "closure",
                      "reason"
                    ]
                  }
                },
                "standards": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "direction": {
                        "type": "string",
                        "enum": [
                          "up",
                          "down"
                        ],
                        "x-discern-vocabulary": "x-discern-proposal-directions"
                      },
                      "limit": {
                        "type": "number"
                      },
                      "margin": {
                        "type": "number",
                        "minimum": 0
                      },
                      "measurement": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-standard-measurements"
                      },
                      "value": {
                        "type": "number"
                      },
                      "verdict": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-standard-verdicts"
                      },
                      "duration_s": {
                        "type": "number"
                      },
                      "replayed_from": {
                        "type": "string"
                      },
                      "pin_eligible": {
                        "type": "boolean"
                      },
                      "pin_target": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "name",
                      "direction",
                      "limit",
                      "measurement"
                    ]
                  }
                },
                "pinned": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "from": {
                        "type": "number"
                      },
                      "to": {
                        "type": "number"
                      },
                      "measured": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "name",
                      "from",
                      "to",
                      "measured"
                    ]
                  }
                },
                "proposal": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-proposal-statuses"
                    },
                    "proposal": {
                      "type": "object",
                      "properties": {
                        "standard": {
                          "type": "string"
                        },
                        "commit": {
                          "type": "string"
                        },
                        "bound_commit": {
                          "type": "string"
                        },
                        "measured_commit": {
                          "type": "string"
                        },
                        "definition_fingerprint": {
                          "type": "string"
                        },
                        "trunk": {
                          "type": "string"
                        },
                        "trunk_commit": {
                          "type": "string"
                        },
                        "direction": {
                          "type": "string",
                          "enum": [
                            "up",
                            "down"
                          ],
                          "x-discern-vocabulary": "x-discern-proposal-directions"
                        },
                        "trunk_limit": {
                          "type": "number"
                        },
                        "proposed_limit": {
                          "type": "number"
                        },
                        "measurement": {
                          "type": "number"
                        },
                        "delta": {
                          "type": "number"
                        },
                        "reason": {
                          "type": "string"
                        },
                        "evidence_paths": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "required": [
                        "standard",
                        "commit",
                        "bound_commit",
                        "measured_commit",
                        "definition_fingerprint",
                        "trunk",
                        "trunk_commit",
                        "direction",
                        "trunk_limit",
                        "proposed_limit",
                        "measurement",
                        "delta",
                        "reason",
                        "evidence_paths"
                      ]
                    }
                  },
                  "required": [
                    "status",
                    "proposal"
                  ]
                },
                "proposal_batch": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-proposal-statuses"
                    },
                    "proposals": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "standard": {
                            "type": "string"
                          },
                          "commit": {
                            "type": "string"
                          },
                          "bound_commit": {
                            "type": "string"
                          },
                          "measured_commit": {
                            "type": "string"
                          },
                          "definition_fingerprint": {
                            "type": "string"
                          },
                          "trunk": {
                            "type": "string"
                          },
                          "trunk_commit": {
                            "type": "string"
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "up",
                              "down"
                            ],
                            "x-discern-vocabulary": "x-discern-proposal-directions"
                          },
                          "trunk_limit": {
                            "type": "number"
                          },
                          "proposed_limit": {
                            "type": "number"
                          },
                          "measurement": {
                            "type": "number"
                          },
                          "delta": {
                            "type": "number"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "evidence_paths": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        },
                        "required": [
                          "standard",
                          "commit",
                          "bound_commit",
                          "measured_commit",
                          "definition_fingerprint",
                          "trunk",
                          "trunk_commit",
                          "direction",
                          "trunk_limit",
                          "proposed_limit",
                          "measurement",
                          "delta",
                          "reason",
                          "evidence_paths"
                        ]
                      }
                    }
                  },
                  "required": [
                    "status",
                    "proposals"
                  ]
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernRefreshResult": {
      "title": "DiscernRefreshResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "refresh"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "agents_written": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "mcp_wired": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "hooks_wired": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "worktree_app_wired": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "project_rules_wired": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "proof_notes_fetch_changed": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "adr_index_written": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "skills": {
                  "type": "object",
                  "properties": {
                    "copied": {
                      "type": "number"
                    },
                    "linked": {
                      "type": "number"
                    },
                    "pruned": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "copied",
                    "linked",
                    "pruned"
                  ]
                },
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "agents_written",
                "mcp_wired",
                "hooks_wired",
                "worktree_app_wired",
                "project_rules_wired",
                "adr_index_written",
                "skills",
                "errors"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernTidyResult": {
      "title": "DiscernTidyResult",
      "x-discern-stability": "evolving",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "tidy"
        },
        "data": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-config-issue-kinds"
                  },
                  "path": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ]
              }
            }
          },
          "required": [
            "issues"
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernImpactResult": {
      "title": "DiscernImpactResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "impact"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "scopes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "preview_actions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "scope": {
                        "type": "string"
                      },
                      "command": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "scope",
                      "command"
                    ]
                  }
                },
                "membership": {
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "string"
                    },
                    "present": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "scope",
                    "present"
                  ]
                }
              },
              "required": [
                "scopes"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernCouplingResult": {
      "title": "DiscernCouplingResult",
      "x-discern-stability": "evolving",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "coupling"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string",
                  "x-discern-vocabulary": "x-discern-coupling-modes"
                },
                "changed": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "target": {
                  "type": "string"
                },
                "partners": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "path": {
                        "type": "string"
                      },
                      "from": {
                        "type": "string"
                      },
                      "cochanges": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "of": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "confidence": {
                        "type": "number"
                      },
                      "lift": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "path",
                      "from",
                      "cochanges",
                      "of",
                      "confidence",
                      "lift"
                    ]
                  }
                },
                "excluded_generated": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "path": {
                        "type": "string"
                      },
                      "group": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "group"
                    ]
                  }
                },
                "a": {
                  "type": "string"
                },
                "b": {
                  "type": "string"
                },
                "together": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "of_a": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "of_b": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "commits": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "sha": {
                        "type": "string"
                      },
                      "date": {
                        "type": "string"
                      },
                      "subject": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "sha",
                      "date",
                      "subject"
                    ]
                  }
                }
              },
              "required": [
                "mode",
                "partners"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernAwaitResult": {
      "title": "DiscernAwaitResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "await"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "condition": {
                  "type": "string",
                  "x-discern-vocabulary": "x-discern-await-conditions"
                },
                "branch": {
                  "type": "string"
                },
                "trunk": {
                  "type": "string"
                },
                "met": {
                  "type": "boolean"
                },
                "elapsed_ms": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "timeout_s": {
                  "type": "number"
                },
                "timeout_basis": {
                  "type": "string",
                  "x-discern-vocabulary": "x-discern-await-timeout-bases"
                },
                "requested_timeout_s": {
                  "type": "number"
                },
                "observed": {
                  "type": "object",
                  "properties": {
                    "proof_status": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-await-proof-statuses"
                    },
                    "worktree": {
                      "type": "string"
                    },
                    "tip": {
                      "type": "string"
                    },
                    "landed": {
                      "type": "boolean"
                    },
                    "trunk_start": {
                      "type": "string"
                    },
                    "trunk_head": {
                      "type": "string"
                    },
                    "behind": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "string",
                          "const": "unknown"
                        }
                      ]
                    },
                    "incoming_overlap": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "overlap_total": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  }
                },
                "resume": {
                  "type": "string",
                  "minLength": 15,
                  "maxLength": 15,
                  "pattern": "^C1-[0-9A-HJKMNP-TV-Z]{4}-[0-9A-HJKMNP-TV-Z]{4}-[0-9A-HJKMNP-TV-Z]{2}$"
                },
                "retry_after_s": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "retry_basis": {
                  "type": "string",
                  "x-discern-vocabulary": "x-discern-await-timeout-bases"
                }
              },
              "required": [
                "condition",
                "trunk",
                "met",
                "elapsed_ms",
                "timeout_s",
                "timeout_basis",
                "observed"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernPatternsResult": {
      "title": "DiscernPatternsResult",
      "x-discern-stability": "evolving",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "patterns"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "logbook": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "active"
                            }
                          },
                          "required": [
                            "kind"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "archive"
                            },
                            "filename": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "filename"
                          ]
                        }
                      ]
                    },
                    "events": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "unparsed": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "setup_era": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "months": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "first_at": {
                      "type": "string"
                    },
                    "last_at": {
                      "type": "string"
                    },
                    "branches": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "recording": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "source",
                    "events",
                    "unparsed",
                    "setup_era",
                    "months",
                    "branches",
                    "recording"
                  ]
                },
                "population": {
                  "type": "object",
                  "properties": {
                    "analyzed": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "agent": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "human": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "automation": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "unknown": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "identities": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agent": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "runs": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "agent",
                          "label",
                          "runs"
                        ]
                      }
                    }
                  },
                  "required": [
                    "analyzed",
                    "agent",
                    "human",
                    "automation",
                    "unknown",
                    "identities"
                  ]
                },
                "findings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "detector": {
                        "type": "string"
                      },
                      "family": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-detector-families"
                      },
                      "scope": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-detector-scopes"
                      },
                      "tone": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-finding-tones"
                      },
                      "subject": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string",
                        "minLength": 1
                      },
                      "series": {
                        "maxItems": 24,
                        "type": "array",
                        "items": {
                          "type": "number"
                        }
                      },
                      "observed": {
                        "type": "string"
                      },
                      "evidence": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "number"
                        }
                      },
                      "basis": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "minLength": 1
                          },
                          "coverage": {
                            "type": "object",
                            "properties": {
                              "comparable": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "denominator": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "unit": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "comparable",
                              "denominator",
                              "unit"
                            ]
                          },
                          "validation_state": {
                            "type": "object",
                            "properties": {
                              "version": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "complete": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "version",
                              "complete"
                            ]
                          },
                          "matched_conditions": {
                            "maxItems": 16,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "dimension": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "values": {
                                  "minItems": 1,
                                  "maxItems": 16,
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "distinct": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "omitted": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "dimension",
                                "values",
                                "distinct",
                                "omitted"
                              ]
                            }
                          },
                          "differing_conditions": {
                            "maxItems": 16,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "dimension": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "values": {
                                  "minItems": 1,
                                  "maxItems": 16,
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "distinct": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "omitted": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "dimension",
                                "values",
                                "distinct",
                                "omitted"
                              ]
                            }
                          },
                          "excluded_events": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "limitations": {
                            "maxItems": 16,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "values": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "number"
                                },
                                "kind": {
                                  "type": "string",
                                  "x-discern-vocabulary": "x-discern-evidence-value-kinds"
                                }
                              },
                              "required": [
                                "value",
                                "kind"
                              ]
                            }
                          }
                        },
                        "required": [
                          "kind",
                          "coverage",
                          "validation_state",
                          "matched_conditions",
                          "differing_conditions",
                          "excluded_events",
                          "limitations",
                          "values"
                        ]
                      },
                      "strength": {
                        "type": "number"
                      },
                      "next_step": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "detector",
                      "family",
                      "scope",
                      "tone",
                      "summary",
                      "observed",
                      "evidence",
                      "strength",
                      "next_step"
                    ]
                  }
                },
                "findings_total": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "investigations": {
                  "maxItems": 12,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1
                      },
                      "finding_ids": {
                        "minItems": 1,
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "subject": {
                        "type": "string"
                      },
                      "observations": {
                        "minItems": 1,
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "finding_id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "subject": {
                              "type": "string"
                            },
                            "observed": {
                              "type": "string",
                              "minLength": 1
                            },
                            "denominator": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "number",
                                  "minimum": 0
                                },
                                "unit": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "value",
                                "unit"
                              ]
                            },
                            "values": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {
                                "type": "object",
                                "properties": {
                                  "value": {
                                    "type": "number"
                                  },
                                  "kind": {
                                    "type": "string",
                                    "x-discern-vocabulary": "x-discern-evidence-value-kinds"
                                  }
                                },
                                "required": [
                                  "value",
                                  "kind"
                                ]
                              }
                            }
                          },
                          "required": [
                            "finding_id",
                            "observed",
                            "denominator",
                            "values"
                          ]
                        }
                      },
                      "evidence_boundary": {
                        "type": "object",
                        "properties": {
                          "validation_versions": {
                            "maxItems": 4,
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "complete_validation_state": {
                            "type": "boolean"
                          },
                          "setup_conditions": {
                            "maxItems": 16,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "dimension": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "values": {
                                  "minItems": 1,
                                  "maxItems": 16,
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "distinct": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "omitted": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "dimension",
                                "values",
                                "distinct",
                                "omitted"
                              ]
                            }
                          },
                          "excluded_events": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "limitations": {
                            "maxItems": 16,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        },
                        "required": [
                          "validation_versions",
                          "complete_validation_state",
                          "setup_conditions",
                          "excluded_events",
                          "limitations"
                        ]
                      },
                      "summary": {
                        "type": "string",
                        "minLength": 1
                      },
                      "observed": {
                        "type": "string",
                        "minLength": 1
                      },
                      "diagnostic_action": {
                        "type": "string",
                        "minLength": 1
                      },
                      "falsifier": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "id",
                      "title",
                      "finding_ids",
                      "observations",
                      "evidence_boundary",
                      "summary",
                      "observed",
                      "diagnostic_action",
                      "falsifier"
                    ]
                  }
                },
                "detectors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "family": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-detector-families"
                      },
                      "scope": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-detector-scopes"
                      },
                      "tier": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-detector-tiers"
                      },
                      "status": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-detector-statuses"
                      },
                      "considered": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "threshold": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "findings": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "title",
                      "family",
                      "scope",
                      "tier",
                      "status",
                      "considered",
                      "threshold",
                      "findings"
                    ]
                  }
                },
                "stats": {
                  "type": "object",
                  "properties": {
                    "series_days_per_point": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "accepted": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "branches": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "insertions": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "deletions": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "files": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "commits": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "cleanups": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "per_day": {
                          "maxItems": 24,
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "biggest": {
                          "type": "object",
                          "properties": {
                            "branch": {
                              "type": "string"
                            },
                            "lines": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "files": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "day": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "lines",
                            "files",
                            "day"
                          ]
                        },
                        "best_day": {
                          "type": "object",
                          "properties": {
                            "day": {
                              "type": "string"
                            },
                            "accepted": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "day",
                            "accepted"
                          ]
                        },
                        "longest_streak": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "count",
                        "branches",
                        "insertions",
                        "deletions",
                        "files",
                        "commits",
                        "cleanups",
                        "longest_streak"
                      ]
                    },
                    "gate": {
                      "type": "object",
                      "properties": {
                        "runs": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "greens": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "first_try_green_branches": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "gated_branches": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "longest_green_streak": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "current_green_streak": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "check_hours": {
                          "type": "number"
                        },
                        "greens_per_day": {
                          "maxItems": 24,
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        }
                      },
                      "required": [
                        "runs",
                        "greens",
                        "first_try_green_branches",
                        "gated_branches",
                        "longest_green_streak",
                        "current_green_streak",
                        "check_hours"
                      ]
                    },
                    "validation_workflows": {
                      "type": "object",
                      "properties": {
                        "runs": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "branches": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "by_verb": {
                              "minItems": 3,
                              "maxItems": 3,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "verb": {
                                    "type": "string",
                                    "x-discern-vocabulary": "x-discern-validation-verbs"
                                  },
                                  "runs": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "branches": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "clean": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "dirty": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "unknown": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "successes": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "failures": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "retries": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  }
                                },
                                "required": [
                                  "verb",
                                  "runs",
                                  "branches",
                                  "clean",
                                  "dirty",
                                  "unknown",
                                  "successes",
                                  "failures",
                                  "retries"
                                ]
                              }
                            },
                            "evidence": {
                              "type": "object",
                              "properties": {
                                "denominator": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "complete": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "incomplete": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "unattributed": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "denominator",
                                "complete",
                                "incomplete",
                                "unattributed"
                              ]
                            },
                            "dirty_state": {
                              "type": "object",
                              "properties": {
                                "denominator": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "tracked_only": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "untracked_only": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "mixed": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "unclassified": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "denominator",
                                "tracked_only",
                                "untracked_only",
                                "mixed",
                                "unclassified"
                              ]
                            }
                          },
                          "required": [
                            "total",
                            "branches",
                            "by_verb",
                            "evidence",
                            "dirty_state"
                          ]
                        },
                        "cycles": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "branches": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "routes": {
                              "minItems": 3,
                              "maxItems": 3,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "route": {
                                    "type": "string",
                                    "x-discern-vocabulary": "x-discern-validation-routes"
                                  },
                                  "cycles": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "branches": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "runs": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "successful_cycles": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "successful_runs": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "failed_cycles": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "failed_runs": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "retried_cycles": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "retry_runs": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  }
                                },
                                "required": [
                                  "route",
                                  "cycles",
                                  "branches",
                                  "runs",
                                  "successful_cycles",
                                  "successful_runs",
                                  "failed_cycles",
                                  "failed_runs",
                                  "retried_cycles",
                                  "retry_runs"
                                ]
                              }
                            },
                            "precommit_to_clean_gate": {
                              "type": "object",
                              "properties": {
                                "cycles": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "branches": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "runs": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "retry_runs": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "cycles",
                                "branches",
                                "runs",
                                "retry_runs"
                              ]
                            }
                          },
                          "required": [
                            "total",
                            "branches",
                            "routes",
                            "precommit_to_clean_gate"
                          ]
                        },
                        "cohorts": {
                          "type": "object",
                          "properties": {
                            "denominator_cycles": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "denominator_runs": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "identities": {
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "agent": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "cycles": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "runs": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "test_first_cycles": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "commit_first_cycles": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "successful_cycles": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "failed_cycles": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "retried_cycles": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  }
                                },
                                "required": [
                                  "agent",
                                  "label",
                                  "cycles",
                                  "runs",
                                  "test_first_cycles",
                                  "commit_first_cycles",
                                  "successful_cycles",
                                  "failed_cycles",
                                  "retried_cycles"
                                ]
                              }
                            },
                            "below_minimum": {
                              "type": "object",
                              "properties": {
                                "cohorts": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "cycles": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "runs": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "cohorts",
                                "cycles",
                                "runs"
                              ]
                            },
                            "unattributed": {
                              "type": "object",
                              "properties": {
                                "cycles": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "runs": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "cycles",
                                "runs"
                              ]
                            }
                          },
                          "required": [
                            "denominator_cycles",
                            "denominator_runs",
                            "identities",
                            "below_minimum",
                            "unattributed"
                          ]
                        }
                      },
                      "required": [
                        "runs",
                        "cycles"
                      ]
                    },
                    "cycles": {
                      "type": "object",
                      "properties": {
                        "started": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "completed": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "under_day": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "median_hours": {
                          "type": "number"
                        },
                        "fastest_hours": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "started",
                        "completed",
                        "under_day",
                        "median_hours",
                        "fastest_hours"
                      ]
                    },
                    "standards": {
                      "type": "object",
                      "properties": {
                        "pins": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "standards": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "trend": {
                          "maxItems": 24,
                          "type": "array",
                          "items": {
                            "type": "number"
                          }
                        },
                        "most_improved": {
                          "type": "object",
                          "properties": {
                            "standard": {
                              "type": "string"
                            },
                            "from": {
                              "type": "number"
                            },
                            "to": {
                              "type": "number"
                            },
                            "better_percent": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "standard",
                            "from",
                            "to",
                            "better_percent"
                          ]
                        }
                      },
                      "required": [
                        "pins",
                        "standards"
                      ]
                    },
                    "agents": {
                      "type": "object",
                      "properties": {
                        "detected": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "per_day": {
                          "maxItems": 24,
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "identities": {
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "agent": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "runs": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "done_runs": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "greens": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "per_day": {
                                "maxItems": 24,
                                "type": "array",
                                "items": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              }
                            },
                            "required": [
                              "agent",
                              "label",
                              "runs",
                              "done_runs",
                              "greens"
                            ]
                          }
                        },
                        "below_minimum": {
                          "type": "object",
                          "properties": {
                            "agents": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "runs": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "agents",
                            "runs"
                          ]
                        },
                        "unattributed_runs": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "detected",
                        "identities",
                        "unattributed_runs"
                      ]
                    },
                    "checkpoints": {
                      "type": "object",
                      "properties": {
                        "efforts": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "rows": {
                          "maxItems": 16,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "efforts_fired": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "efforts_landed": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "fires": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "declared": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "declared_unchanged": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "declared_unmet": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "reopened": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "variances": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "abandoned": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "median_declare_s": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "efforts_fired",
                              "efforts_landed",
                              "fires",
                              "declared",
                              "declared_unchanged",
                              "declared_unmet",
                              "reopened",
                              "variances",
                              "abandoned"
                            ]
                          }
                        },
                        "omitted": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "efforts",
                        "rows",
                        "omitted"
                      ]
                    },
                    "breadth": {
                      "type": "object",
                      "properties": {
                        "branches": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "active_days": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "span_days": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "first_day": {
                          "type": "string"
                        },
                        "last_day": {
                          "type": "string"
                        },
                        "busiest_day": {
                          "type": "object",
                          "properties": {
                            "day": {
                              "type": "string"
                            },
                            "branches": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "day",
                            "branches"
                          ]
                        },
                        "branches_per_day": {
                          "maxItems": 24,
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "peak_in_flight": {
                          "type": "object",
                          "properties": {
                            "branches": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "day": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "branches",
                            "day"
                          ]
                        }
                      },
                      "required": [
                        "branches",
                        "active_days",
                        "span_days"
                      ]
                    }
                  },
                  "required": [
                    "accepted",
                    "gate",
                    "validation_workflows",
                    "standards",
                    "agents",
                    "breadth"
                  ]
                },
                "completion": {
                  "type": "object",
                  "properties": {
                    "window": {
                      "type": "object",
                      "properties": {
                        "first_at": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "last_at": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "first_at",
                        "last_at"
                      ]
                    },
                    "observations": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "duplicate_observations": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "conflicting_identities": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "conflicting_component_receipts": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "efforts": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "candidates": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "attempts": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "executor_operations": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "component_receipts": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "executed_component_groups": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "reused_receipts": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "unknown_component_use_identity": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "producer_executions": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "extractor_executions": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "producer_results": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "producer_result_missing": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "unknown_command_identity": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "conflicting_command_identities": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "unmatched_command_results": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "producer_work_ms": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "latencies": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "observations": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "unknown": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "median_ms": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "min_ms": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "max_ms": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "observations",
                          "unknown",
                          "median_ms",
                          "min_ms",
                          "max_ms"
                        ]
                      }
                    },
                    "timing": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "observations": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "unknown": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "sum_ms": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "elapsed_ms": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "observations",
                          "unknown",
                          "sum_ms",
                          "elapsed_ms"
                        ]
                      }
                    },
                    "observed_wall": {
                      "type": "object",
                      "properties": {
                        "observations": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "unknown": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "sum_ms": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "elapsed_ms": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "observations",
                        "unknown",
                        "sum_ms",
                        "elapsed_ms"
                      ]
                    },
                    "invalidations": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "validation_runs": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "reuse_only_runs": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "proofs": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "limitations": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "window",
                    "observations",
                    "duplicate_observations",
                    "conflicting_identities",
                    "conflicting_component_receipts",
                    "efforts",
                    "candidates",
                    "attempts",
                    "executor_operations",
                    "component_receipts",
                    "executed_component_groups",
                    "reused_receipts",
                    "unknown_component_use_identity",
                    "producer_executions",
                    "timing",
                    "observed_wall",
                    "invalidations",
                    "proofs",
                    "limitations"
                  ]
                }
              },
              "required": [
                "logbook",
                "population",
                "findings",
                "investigations",
                "detectors"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernPatternsResetResult": {
      "title": "DiscernPatternsResetResult",
      "x-discern-stability": "evolving",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "patterns reset"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "dir": {
                  "type": "string"
                },
                "removed": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "file": {
                        "type": "string"
                      },
                      "bytes": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "file",
                      "bytes"
                    ]
                  }
                },
                "bytes": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "events": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "unparsed": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "first_at": {
                  "type": "string"
                },
                "last_at": {
                  "type": "string"
                },
                "impacts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string"
                      },
                      "phrase": {
                        "type": "string"
                      },
                      "surface": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "key",
                      "phrase",
                      "surface"
                    ]
                  }
                },
                "recovery_path": {
                  "type": "string"
                }
              },
              "required": [
                "dir",
                "removed",
                "bytes",
                "events",
                "unparsed",
                "impacts"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernPatternsSealResult": {
      "title": "DiscernPatternsSealResult",
      "x-discern-stability": "evolving",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "patterns seal"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "source_dir": {
                  "type": "string"
                },
                "destination_dir": {
                  "type": "string"
                },
                "archive_file": {
                  "type": "string"
                },
                "archive_path": {
                  "type": "string"
                },
                "files": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "file": {
                        "type": "string"
                      },
                      "bytes": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "file",
                      "bytes"
                    ]
                  }
                },
                "source_bytes": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "archive_bytes": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "events": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "unparsed": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "first_at": {
                  "type": "string"
                },
                "last_at": {
                  "type": "string"
                },
                "recovery_path": {
                  "type": "string"
                }
              },
              "required": [
                "source_dir",
                "destination_dir",
                "archive_file",
                "archive_path",
                "files",
                "source_bytes",
                "archive_bytes",
                "events",
                "unparsed"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernPatternsArchivesResult": {
      "title": "DiscernPatternsArchivesResult",
      "x-discern-stability": "evolving",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "patterns archives"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "dir": {
                  "type": "string"
                },
                "archives": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "filename": {
                        "type": "string"
                      },
                      "events": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "unparsed": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "bytes": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "first_at": {
                        "type": "string"
                      },
                      "last_at": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "filename",
                      "events",
                      "unparsed",
                      "bytes"
                    ]
                  }
                }
              },
              "required": [
                "dir",
                "archives"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernDeskResult": {
      "title": "DiscernDeskResult",
      "x-discern-stability": "evolving",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "desk"
        },
        "data": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-config-issue-kinds"
                  },
                  "path": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ]
              }
            }
          },
          "required": [
            "issues"
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernEnterResult": {
      "title": "DiscernEnterResult",
      "x-discern-stability": "evolving",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "enter"
        },
        "data": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-config-issue-kinds"
                  },
                  "path": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ]
              }
            }
          },
          "required": [
            "issues"
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernStatusResult": {
      "title": "DiscernStatusResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "status"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "managed_version": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-managed-version-states"
                    },
                    "running": {
                      "type": "string"
                    },
                    "managed": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "state",
                    "running"
                  ]
                },
                "managed_currency_unavailable": {
                  "type": "string"
                },
                "release_reminder": {
                  "type": "string"
                },
                "emergency_validation": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "landing_id": {
                        "type": "string"
                      },
                      "head": {
                        "type": "string"
                      },
                      "reason": {
                        "type": "string"
                      },
                      "exceptions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "requirement": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "^[A-Za-z0-9_-]+$"
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "job",
                                    "scope",
                                    "standard"
                                  ],
                                  "x-discern-vocabulary": "x-discern-requirement-kinds"
                                },
                                "definition": {
                                  "type": "string",
                                  "pattern": "^[0-9a-f]{64}$"
                                }
                              },
                              "required": [
                                "id",
                                "kind",
                                "definition"
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed",
                                "unrun",
                                "stale"
                              ],
                              "x-discern-vocabulary": "x-discern-exception-states"
                            },
                            "evidence_id": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "requirement",
                            "state",
                            "evidence_id"
                          ]
                        }
                      },
                      "state": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-exception-validation-states"
                      },
                      "resolved_by": {
                        "type": "object",
                        "properties": {
                          "candidate_id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "proof_id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "candidate_id",
                          "proof_id"
                        ]
                      },
                      "next_action": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "landing_id",
                      "head",
                      "reason",
                      "exceptions",
                      "state",
                      "next_action"
                    ]
                  }
                },
                "location": {
                  "type": "string",
                  "x-discern-vocabulary": "x-discern-locations"
                },
                "root": {
                  "type": "string"
                },
                "project": {
                  "type": "string"
                },
                "worktree": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "branch": {
                          "type": "string"
                        },
                        "site": {
                          "type": "string"
                        },
                        "port": {
                          "type": "number"
                        },
                        "db": {
                          "type": "string"
                        },
                        "seed": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "resources": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "id",
                        "branch",
                        "site",
                        "port",
                        "db",
                        "seed",
                        "resources"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "git": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "branch": {
                          "type": "string"
                        },
                        "trunk": {
                          "type": "string"
                        },
                        "clean": {
                          "type": "boolean"
                        },
                        "changed_files": {
                          "type": "number"
                        },
                        "behind_trunk": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "string",
                                  "const": "unknown"
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "ahead_trunk": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "string",
                                  "const": "unknown"
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "incoming_overlap": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "branch",
                        "trunk",
                        "clean",
                        "changed_files",
                        "behind_trunk",
                        "ahead_trunk"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "scopes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "preview_actions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "scope": {
                        "type": "string"
                      },
                      "command": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "scope",
                      "command"
                    ]
                  }
                },
                "gate": {
                  "type": "object",
                  "properties": {
                    "jobs": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "scope_gates": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "jobs",
                    "scope_gates"
                  ]
                },
                "standards": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "landed_proof_stale": {
                  "type": "object",
                  "properties": {
                    "commit": {
                      "type": "string"
                    },
                    "ref": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "commit",
                    "ref",
                    "reason"
                  ]
                },
                "landed_proof_unsupported": {
                  "type": "object",
                  "properties": {
                    "commit": {
                      "type": "string"
                    },
                    "ref": {
                      "type": "string"
                    },
                    "format": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "commit",
                    "ref",
                    "format"
                  ]
                },
                "landed_exception": {
                  "type": "object",
                  "properties": {
                    "commit": {
                      "type": "string"
                    },
                    "ref": {
                      "type": "string"
                    },
                    "landing_id": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "exceptions": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "validation": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-exception-validation-states"
                    }
                  },
                  "required": [
                    "commit",
                    "ref",
                    "landing_id",
                    "reason",
                    "exceptions",
                    "validation"
                  ]
                },
                "pending_tracked_refresh": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "tracked_refresh_plan_errors": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "tracked_ignored_artifacts": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "setup_completion": {
                  "type": "string",
                  "x-discern-vocabulary": "x-discern-setup-completion-evidence"
                },
                "setup_unfinished": {
                  "type": "object",
                  "properties": {
                    "pending_markers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "known_jobs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "wired": {
                            "type": "boolean"
                          },
                          "not_applicable": {
                            "type": "boolean",
                            "const": true
                          }
                        },
                        "required": [
                          "name",
                          "wired"
                        ]
                      }
                    },
                    "assurance": {
                      "type": "object",
                      "properties": {
                        "known_jobs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-known-job-states"
                              },
                              "not_applicable": {
                                "type": "boolean",
                                "const": true
                              },
                              "reason": {
                                "type": "string"
                              },
                              "self_supplied": {
                                "type": "boolean",
                                "const": true
                              }
                            },
                            "required": [
                              "name",
                              "state"
                            ]
                          }
                        },
                        "enforced": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "known_total": {
                          "type": "number"
                        },
                        "not_applicable": {
                          "type": "number"
                        },
                        "verdict": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-assurance-verdicts"
                        },
                        "completion": {
                          "type": "object",
                          "properties": {
                            "standards": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "shared": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "producer": {
                                    "type": "string"
                                  },
                                  "standards": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "required": [
                                  "producer",
                                  "standards"
                                ]
                              }
                            },
                            "candidate_bound": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "declared": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "standards",
                            "shared",
                            "candidate_bound",
                            "declared"
                          ]
                        }
                      },
                      "required": [
                        "known_jobs",
                        "enforced",
                        "total",
                        "verdict"
                      ]
                    }
                  },
                  "required": [
                    "pending_markers",
                    "known_jobs"
                  ]
                },
                "unlanded_branches": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "parked_tasks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "branch": {
                        "type": "string"
                      },
                      "head": {
                        "type": "string"
                      },
                      "parked_at": {
                        "type": "string"
                      },
                      "task": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "branch": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "title_source": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-title-sources"
                          },
                          "brief": {
                            "type": "string"
                          },
                          "created_from": {
                            "type": "object",
                            "properties": {
                              "ref": {
                                "type": "string",
                                "minLength": 1
                              },
                              "commit": {
                                "type": "string",
                                "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
                              }
                            },
                            "required": [
                              "ref",
                              "commit"
                            ]
                          },
                          "unavailable_reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "branch",
                          "title",
                          "title_source"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "branch",
                      "head",
                      "parked_at",
                      "task"
                    ]
                  }
                },
                "parked_tasks_unavailable": {
                  "type": "object",
                  "properties": {
                    "reason": {
                      "type": "string"
                    },
                    "next_command": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "reason",
                    "next_command"
                  ]
                },
                "contained_refs": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "branch": {
                        "type": "string"
                      },
                      "contained_in": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "branch",
                      "contained_in"
                    ]
                  }
                },
                "queue": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/DiscernSubmissionRow"
                  }
                },
                "operation": {
                  "type": "object",
                  "properties": {
                    "verb": {
                      "type": "string"
                    },
                    "branch": {
                      "type": "string"
                    },
                    "handle": {
                      "type": "string"
                    },
                    "latest": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "verb",
                    "handle"
                  ]
                },
                "recent_completed_tasks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "branch": {
                        "type": "string"
                      },
                      "head": {
                        "type": "string"
                      },
                      "completed_at": {
                        "type": "string"
                      },
                      "proof_line": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "branch",
                      "completed_at"
                    ]
                  }
                },
                "reappeared_worktree_paths": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "path": {
                        "type": "string"
                      },
                      "removed_at": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-reappeared-path-kinds"
                      },
                      "contents": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "contents_truncated": {
                        "type": "boolean"
                      },
                      "entries": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "cleanup_blocked_reason": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "removed_at",
                      "kind",
                      "contents",
                      "contents_truncated",
                      "entries"
                    ]
                  }
                },
                "gate_proof": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-proof-statuses"
                    },
                    "path": {
                      "type": "string"
                    },
                    "recorded": {
                      "type": "string"
                    },
                    "head": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "proof": {
                      "$ref": "#/$defs/DiscernProofSummary"
                    },
                    "checkpoint_drops": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "scope": {
                                "type": "string",
                                "const": "policy"
                              },
                              "checkpoint": {
                                "type": "null"
                              },
                              "mode": {
                                "type": "null"
                              },
                              "policy_commit": {
                                "type": "string"
                              },
                              "reason": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-policy-checkpoint-drop-reasons"
                              },
                              "account": {
                                "type": "string",
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "scope",
                              "checkpoint",
                              "mode",
                              "reason",
                              "account"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "scope": {
                                "type": "string",
                                "const": "checkpoint"
                              },
                              "checkpoint": {
                                "type": "string"
                              },
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "stop",
                                  "advise"
                                ],
                                "x-discern-vocabulary": "x-discern-checkpoint-modes"
                              },
                              "policy_commit": {
                                "type": "string"
                              },
                              "reason": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-entry-checkpoint-drop-reasons"
                              },
                              "account": {
                                "type": "string",
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "scope",
                              "checkpoint",
                              "mode",
                              "policy_commit",
                              "reason",
                              "account"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "status"
                  ]
                },
                "landed_proof": {
                  "type": "object",
                  "properties": {
                    "commit": {
                      "type": "string"
                    },
                    "commit_at": {
                      "type": "string"
                    },
                    "ref": {
                      "type": "string"
                    },
                    "proof": {
                      "$ref": "#/$defs/DiscernProofSummary"
                    },
                    "issuer": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The issuer's asserted display name. A verified signature protects this text from alteration; trust policy decides who the signing key represents."
                        },
                        "email": {
                          "type": "string",
                          "description": "The issuer's asserted email address. A verified signature protects this text from alteration; trust policy decides who the signing key represents."
                        },
                        "key": {
                          "type": "string",
                          "description": "The issuer's asserted key or key reference. Verifiers use their signing profile and trust policy rather than trusting this value on its own."
                        }
                      },
                      "description": "Identity details asserted by the Proof payload. A verified Dead Simple Signing Envelope (DSSE) signature protects these details from alteration but does not establish who controls the signing key. Current writers leave them absent."
                    },
                    "brief": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "commit",
                    "ref",
                    "proof"
                  ]
                },
                "landing_authority": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "authorized",
                        "conversation-required"
                      ],
                      "x-discern-vocabulary": "x-discern-landing-authority-kinds"
                    },
                    "source": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-consent-sources"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "standing_scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "uncovered_scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "uncovered_unscoped_total": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "uncovered_generated_total": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "uncovered": {
                      "maxItems": 6,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "generated": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "path",
                          "scopes"
                        ]
                      }
                    },
                    "uncovered_total": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "kind"
                  ]
                },
                "fleet": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "path": {
                        "type": "string"
                      },
                      "is_main": {
                        "type": "boolean"
                      },
                      "is_current": {
                        "type": "boolean"
                      },
                      "branch": {
                        "type": "string"
                      },
                      "registration": {
                        "type": "object",
                        "properties": {
                          "head": {
                            "type": "string"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "prunable": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "head",
                          "locked",
                          "prunable"
                        ]
                      },
                      "branch_reachable": {
                        "type": "boolean"
                      },
                      "filesystem": {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-fleet-filesystem-states"
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "state"
                        ]
                      },
                      "clean": {
                        "type": "boolean"
                      },
                      "changed_files": {
                        "type": "number"
                      },
                      "ahead": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "string",
                            "const": "unknown"
                          }
                        ]
                      },
                      "behind": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "string",
                            "const": "unknown"
                          }
                        ]
                      },
                      "last_activity": {
                        "type": "string"
                      },
                      "last_action": {
                        "type": "object",
                        "properties": {
                          "verb": {
                            "type": "string"
                          },
                          "outcome": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-fleet-action-outcomes"
                          },
                          "at": {
                            "type": "string"
                          },
                          "failed_stage": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "verb",
                          "outcome",
                          "at"
                        ]
                      },
                      "running": {
                        "type": "object",
                        "properties": {
                          "verb": {
                            "type": "string"
                          },
                          "started": {
                            "type": "string"
                          },
                          "elapsed_ms": {
                            "type": "number",
                            "minimum": 0
                          },
                          "typical_duration_ms": {
                            "type": "number",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "verb",
                          "started",
                          "elapsed_ms"
                        ]
                      },
                      "contained_in": {
                        "type": "string"
                      },
                      "git_unavailable": {
                        "type": "boolean"
                      },
                      "git_failure": {
                        "type": "object",
                        "properties": {
                          "command": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "command",
                          "reason"
                        ]
                      },
                      "id": {
                        "type": "string"
                      },
                      "port": {
                        "type": "number"
                      },
                      "resources": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      "setup": {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-fleet-setup-states"
                          },
                          "marker": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-setup-marker-states"
                          },
                          "journal": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-setup-journal-statuses"
                              },
                              "path": {
                                "type": "string"
                              },
                              "steps": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "command": {
                                      "type": "string"
                                    },
                                    "state": {
                                      "type": "string",
                                      "x-discern-vocabulary": "x-discern-setup-journal-step-states"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "command",
                                    "state"
                                  ]
                                }
                              },
                              "reason": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "status",
                              "steps"
                            ]
                          },
                          "repair": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-setup-repair-kinds"
                              },
                              "command": {
                                "type": "string"
                              },
                              "reason": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "command",
                              "reason"
                            ]
                          }
                        },
                        "required": [
                          "state",
                          "marker"
                        ]
                      },
                      "task": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "branch": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "title_source": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-title-sources"
                          },
                          "brief": {
                            "type": "string"
                          },
                          "created_from": {
                            "type": "object",
                            "properties": {
                              "ref": {
                                "type": "string",
                                "minLength": 1
                              },
                              "commit": {
                                "type": "string",
                                "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
                              }
                            },
                            "required": [
                              "ref",
                              "commit"
                            ]
                          },
                          "unavailable_reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "branch",
                          "title",
                          "title_source"
                        ]
                      },
                      "broken": {
                        "type": "boolean"
                      },
                      "integration": {
                        "type": "object",
                        "properties": {
                          "owner": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-integration-owners"
                          },
                          "for_branch": {
                            "type": "string"
                          },
                          "awaiting_judgment": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "owner",
                          "for_branch"
                        ]
                      },
                      "gate_proof": {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-proof-statuses"
                          },
                          "path": {
                            "type": "string"
                          },
                          "recorded": {
                            "type": "string"
                          },
                          "head": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "proof": {
                            "$ref": "#/$defs/DiscernProofSummary"
                          },
                          "checkpoint_drops": {
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "scope": {
                                      "type": "string",
                                      "const": "policy"
                                    },
                                    "checkpoint": {
                                      "type": "null"
                                    },
                                    "mode": {
                                      "type": "null"
                                    },
                                    "policy_commit": {
                                      "type": "string"
                                    },
                                    "reason": {
                                      "type": "string",
                                      "x-discern-vocabulary": "x-discern-policy-checkpoint-drop-reasons"
                                    },
                                    "account": {
                                      "type": "string",
                                      "maxLength": 500
                                    }
                                  },
                                  "required": [
                                    "scope",
                                    "checkpoint",
                                    "mode",
                                    "reason",
                                    "account"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "scope": {
                                      "type": "string",
                                      "const": "checkpoint"
                                    },
                                    "checkpoint": {
                                      "type": "string"
                                    },
                                    "mode": {
                                      "type": "string",
                                      "enum": [
                                        "stop",
                                        "advise"
                                      ],
                                      "x-discern-vocabulary": "x-discern-checkpoint-modes"
                                    },
                                    "policy_commit": {
                                      "type": "string"
                                    },
                                    "reason": {
                                      "type": "string",
                                      "x-discern-vocabulary": "x-discern-entry-checkpoint-drop-reasons"
                                    },
                                    "account": {
                                      "type": "string",
                                      "maxLength": 500
                                    }
                                  },
                                  "required": [
                                    "scope",
                                    "checkpoint",
                                    "mode",
                                    "policy_commit",
                                    "reason",
                                    "account"
                                  ]
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "status"
                        ]
                      },
                      "landing_authority": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "authorized",
                              "conversation-required"
                            ],
                            "x-discern-vocabulary": "x-discern-landing-authority-kinds"
                          },
                          "source": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-consent-sources"
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "standing_scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "uncovered_scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "uncovered_unscoped_total": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "uncovered_generated_total": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "warnings": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "uncovered": {
                            "maxItems": 6,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "path": {
                                  "type": "string"
                                },
                                "scopes": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "generated": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "path",
                                "scopes"
                              ]
                            }
                          },
                          "uncovered_total": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "kind"
                        ]
                      }
                    },
                    "required": [
                      "path",
                      "is_main",
                      "is_current",
                      "branch"
                    ]
                  }
                },
                "fleet_total": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "fleet_collisions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "branches": {
                        "type": "array",
                        "prefixItems": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "string"
                          }
                        ],
                        "minItems": 2,
                        "maxItems": 2,
                        "items": false
                      },
                      "total": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "branches",
                      "total"
                    ]
                  }
                },
                "adr_collisions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "number": {
                        "type": "string"
                      },
                      "branches": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "number",
                      "branches"
                    ]
                  }
                },
                "projection": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-status-projection-modes"
                    },
                    "omitted": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    }
                  },
                  "required": [
                    "mode"
                  ]
                }
              },
              "required": [
                "location",
                "root",
                "worktree",
                "git",
                "standards",
                "projection"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                },
                "projection": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-status-projection-modes"
                    },
                    "omitted": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    }
                  },
                  "required": [
                    "mode"
                  ]
                }
              },
              "required": [
                "issues",
                "projection"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernStartResult": {
      "title": "DiscernStartResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "start"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "branch": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "from": {
                  "type": "string"
                },
                "behind_trunk": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "task": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "branch": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "title_source": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-title-sources"
                    },
                    "brief": {
                      "type": "string"
                    },
                    "created_from": {
                      "type": "object",
                      "properties": {
                        "ref": {
                          "type": "string",
                          "minLength": 1
                        },
                        "commit": {
                          "type": "string",
                          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
                        }
                      },
                      "required": [
                        "ref",
                        "commit"
                      ]
                    },
                    "unavailable_reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "branch",
                    "title",
                    "title_source"
                  ]
                },
                "name_note": {
                  "type": "string"
                },
                "landing_authority": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "authorized",
                        "conversation-required"
                      ],
                      "x-discern-vocabulary": "x-discern-landing-authority-kinds"
                    },
                    "source": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-consent-sources"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "standing_scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "uncovered": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "generated": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "path",
                          "scopes"
                        ]
                      }
                    },
                    "uncovered_scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "uncovered_unscoped_total": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "uncovered_generated_total": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "kind"
                  ]
                }
              },
              "required": [
                "id",
                "branch",
                "path",
                "from",
                "task"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernWorktreeRenameResult": {
      "title": "DiscernWorktreeRenameResult",
      "x-discern-stability": "evolving",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "worktree rename"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "previous_title": {
                  "type": "string"
                },
                "task": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "branch": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "title_source": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-title-sources"
                    },
                    "brief": {
                      "type": "string"
                    },
                    "created_from": {
                      "type": "object",
                      "properties": {
                        "ref": {
                          "type": "string",
                          "minLength": 1
                        },
                        "commit": {
                          "type": "string",
                          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
                        }
                      },
                      "required": [
                        "ref",
                        "commit"
                      ]
                    },
                    "unavailable_reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "branch",
                    "title",
                    "title_source"
                  ]
                }
              },
              "required": [
                "path",
                "previous_title",
                "task"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernWorktreeEnsureResult": {
      "title": "DiscernWorktreeEnsureResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "worktree ensure"
        },
        "data": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-config-issue-kinds"
                  },
                  "path": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ]
              }
            }
          },
          "required": [
            "issues"
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernAcceptResult": {
      "title": "DiscernAcceptResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "accept"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "revision": {
                  "type": "object",
                  "properties": {
                    "path": {
                      "type": "string"
                    },
                    "branch": {
                      "type": "string"
                    },
                    "head": {
                      "type": "string"
                    },
                    "proof": {
                      "type": "object",
                      "properties": {
                        "candidate_id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "proof_id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "required": [
                        "candidate_id",
                        "proof_id"
                      ]
                    }
                  },
                  "required": [
                    "path",
                    "branch",
                    "head",
                    "proof"
                  ]
                },
                "submission": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-submission-states"
                    },
                    "authority": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "authorized",
                            "conversation-required"
                          ],
                          "x-discern-vocabulary": "x-discern-landing-authority-kinds"
                        },
                        "source": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-consent-sources"
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "standing_scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "uncovered": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "scopes": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "generated": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "path",
                              "scopes"
                            ]
                          }
                        },
                        "uncovered_scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "uncovered_unscoped_total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "uncovered_generated_total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "warnings": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "kind"
                      ]
                    },
                    "replaces": {
                      "type": "string"
                    },
                    "submission_id": {
                      "type": "string"
                    },
                    "submitted_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "state",
                    "authority"
                  ]
                },
                "checkpoint_preparation": {
                  "type": "object",
                  "properties": {
                    "policy": {
                      "type": "string"
                    },
                    "outstanding": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "mode": {
                            "type": "string",
                            "enum": [
                              "stop",
                              "advise"
                            ],
                            "x-discern-vocabulary": "x-discern-checkpoint-modes"
                          },
                          "question": {
                            "type": "string"
                          },
                          "question_file": {
                            "type": "string"
                          },
                          "teach": {
                            "type": "string"
                          },
                          "reference": {
                            "type": "string"
                          },
                          "matched": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "related": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "x-discern-vocabulary": "x-discern-related-checkpoint-kinds"
                                },
                                "for_path": {
                                  "type": "string"
                                },
                                "path": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "for_path",
                                "path"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "mode",
                          "question",
                          "matched"
                        ]
                      }
                    },
                    "declared_met": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "question": {
                            "type": "string"
                          },
                          "question_file": {
                            "type": "string"
                          },
                          "teach": {
                            "type": "string"
                          },
                          "reference": {
                            "type": "string"
                          },
                          "declared_at": {
                            "type": "string"
                          },
                          "matched": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "related": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "x-discern-vocabulary": "x-discern-related-checkpoint-kinds"
                                },
                                "for_path": {
                                  "type": "string"
                                },
                                "path": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "for_path",
                                "path"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "declared_at"
                        ],
                        "description": "One checkpoint question the agent declared met, with the declaration time. Agent evidence: recorded, not machine-verified."
                      }
                    },
                    "declared_unmet": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "question": {
                            "type": "string"
                          },
                          "question_file": {
                            "type": "string"
                          },
                          "teach": {
                            "type": "string"
                          },
                          "reference": {
                            "type": "string"
                          },
                          "why": {
                            "type": "string"
                          },
                          "declared_at": {
                            "type": "string"
                          },
                          "matched": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "related": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "x-discern-vocabulary": "x-discern-related-checkpoint-kinds"
                                },
                                "for_path": {
                                  "type": "string"
                                },
                                "path": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "for_path",
                                "path"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "why",
                          "declared_at"
                        ],
                        "description": "One checkpoint question the agent declared unmet, with its rationale and declaration time. Landing requires an owner-authorized variance."
                      }
                    },
                    "advise": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "mode": {
                            "type": "string",
                            "enum": [
                              "stop",
                              "advise"
                            ],
                            "x-discern-vocabulary": "x-discern-checkpoint-modes"
                          },
                          "question": {
                            "type": "string"
                          },
                          "question_file": {
                            "type": "string"
                          },
                          "teach": {
                            "type": "string"
                          },
                          "reference": {
                            "type": "string"
                          },
                          "matched": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "related": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "x-discern-vocabulary": "x-discern-related-checkpoint-kinds"
                                },
                                "for_path": {
                                  "type": "string"
                                },
                                "path": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "for_path",
                                "path"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "mode",
                          "question",
                          "matched"
                        ]
                      }
                    },
                    "review": {
                      "type": "object",
                      "properties": {
                        "enforcement": {
                          "type": "string",
                          "const": "reported"
                        },
                        "status": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-checkpoint-review-statuses"
                        },
                        "unreviewed": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "stop",
                                  "advise"
                                ],
                                "x-discern-vocabulary": "x-discern-checkpoint-modes"
                              },
                              "question": {
                                "type": "string"
                              },
                              "question_file": {
                                "type": "string"
                              },
                              "teach": {
                                "type": "string"
                              },
                              "reference": {
                                "type": "string"
                              },
                              "matched": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "related": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "x-discern-vocabulary": "x-discern-related-checkpoint-kinds"
                                    },
                                    "for_path": {
                                      "type": "string"
                                    },
                                    "path": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "for_path",
                                    "path"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "mode",
                              "question",
                              "matched"
                            ]
                          }
                        }
                      },
                      "required": [
                        "enforcement",
                        "status"
                      ]
                    },
                    "drops": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "scope": {
                                "type": "string",
                                "const": "policy"
                              },
                              "checkpoint": {
                                "type": "null"
                              },
                              "mode": {
                                "type": "null"
                              },
                              "policy_commit": {
                                "type": "string"
                              },
                              "reason": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-policy-checkpoint-drop-reasons"
                              },
                              "account": {
                                "type": "string",
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "scope",
                              "checkpoint",
                              "mode",
                              "reason",
                              "account"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "scope": {
                                "type": "string",
                                "const": "checkpoint"
                              },
                              "checkpoint": {
                                "type": "string"
                              },
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "stop",
                                  "advise"
                                ],
                                "x-discern-vocabulary": "x-discern-checkpoint-modes"
                              },
                              "policy_commit": {
                                "type": "string"
                              },
                              "reason": {
                                "type": "string",
                                "x-discern-vocabulary": "x-discern-entry-checkpoint-drop-reasons"
                              },
                              "account": {
                                "type": "string",
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "scope",
                              "checkpoint",
                              "mode",
                              "policy_commit",
                              "reason",
                              "account"
                            ]
                          }
                        ]
                      }
                    },
                    "advisories": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "integration_judgment": {
                  "$ref": "#/$defs/DiscernIntegrationJudgment"
                },
                "emergency_validation": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "landing_id": {
                        "type": "string"
                      },
                      "head": {
                        "type": "string"
                      },
                      "reason": {
                        "type": "string"
                      },
                      "exceptions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "requirement": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "^[A-Za-z0-9_-]+$"
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "job",
                                    "scope",
                                    "standard"
                                  ],
                                  "x-discern-vocabulary": "x-discern-requirement-kinds"
                                },
                                "definition": {
                                  "type": "string",
                                  "pattern": "^[0-9a-f]{64}$"
                                }
                              },
                              "required": [
                                "id",
                                "kind",
                                "definition"
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed",
                                "unrun",
                                "stale"
                              ],
                              "x-discern-vocabulary": "x-discern-exception-states"
                            },
                            "evidence_id": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "requirement",
                            "state",
                            "evidence_id"
                          ]
                        }
                      },
                      "state": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-exception-validation-states"
                      },
                      "resolved_by": {
                        "type": "object",
                        "properties": {
                          "candidate_id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "proof_id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "candidate_id",
                          "proof_id"
                        ]
                      },
                      "next_action": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "landing_id",
                      "head",
                      "reason",
                      "exceptions",
                      "state",
                      "next_action"
                    ]
                  }
                },
                "emergency": {
                  "type": "object",
                  "properties": {
                    "candidate_id": {
                      "type": "string"
                    },
                    "candidate": {
                      "type": "object",
                      "properties": {
                        "attempt_id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sources": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "effort_id": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "^[A-Za-z0-9_-]+$"
                              },
                              "branch": {
                                "type": "string",
                                "pattern": "^refs\\/heads\\/[^\\s~^:?*\\[\\\\]+$"
                              },
                              "head": {
                                "type": "string",
                                "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
                              },
                              "tree": {
                                "type": "string",
                                "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
                              }
                            },
                            "required": [
                              "effort_id",
                              "branch",
                              "head",
                              "tree"
                            ]
                          }
                        },
                        "predecessor": {
                          "type": "string",
                          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
                        },
                        "head": {
                          "type": "string",
                          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
                        },
                        "tree": {
                          "type": "string",
                          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
                        },
                        "policy": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        },
                        "requirement_set": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        },
                        "integration": {
                          "type": "object",
                          "properties": {
                            "procedure": {
                              "type": "string",
                              "const": "merge-trunk"
                            }
                          },
                          "required": [
                            "procedure"
                          ]
                        }
                      },
                      "required": [
                        "attempt_id",
                        "sources",
                        "predecessor",
                        "head",
                        "tree",
                        "policy",
                        "requirement_set"
                      ]
                    },
                    "reason": {
                      "type": "string"
                    },
                    "exceptions": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "requirement": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "^[A-Za-z0-9_-]+$"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "job",
                                  "scope",
                                  "standard"
                                ],
                                "x-discern-vocabulary": "x-discern-requirement-kinds"
                              },
                              "definition": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{64}$"
                              }
                            },
                            "required": [
                              "id",
                              "kind",
                              "definition"
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "failed",
                              "unrun",
                              "stale"
                            ],
                            "x-discern-vocabulary": "x-discern-exception-states"
                          },
                          "evidence_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "requirement",
                          "state",
                          "evidence_id"
                        ]
                      }
                    },
                    "confirmation": {
                      "type": "string"
                    },
                    "preparation": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "number"
                    },
                    "landing_id": {
                      "type": "string"
                    },
                    "outcome": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-emergency-outcomes"
                    },
                    "note": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-emergency-note-statuses"
                    },
                    "cleanup": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-emergency-cleanups"
                    }
                  }
                },
                "queue": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/DiscernSubmissionRow"
                  }
                },
                "landings": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/DiscernLandingOutcome"
                  }
                },
                "root": {
                  "type": "string"
                },
                "consent": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-consent-sources"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "source"
                  ]
                },
                "checkpoint_drops": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "scope": {
                            "type": "string",
                            "const": "policy"
                          },
                          "checkpoint": {
                            "type": "null"
                          },
                          "mode": {
                            "type": "null"
                          },
                          "policy_commit": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-policy-checkpoint-drop-reasons"
                          },
                          "account": {
                            "type": "string",
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "scope",
                          "checkpoint",
                          "mode",
                          "reason",
                          "account"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "scope": {
                            "type": "string",
                            "const": "checkpoint"
                          },
                          "checkpoint": {
                            "type": "string"
                          },
                          "mode": {
                            "type": "string",
                            "enum": [
                              "stop",
                              "advise"
                            ],
                            "x-discern-vocabulary": "x-discern-checkpoint-modes"
                          },
                          "policy_commit": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string",
                            "x-discern-vocabulary": "x-discern-entry-checkpoint-drop-reasons"
                          },
                          "account": {
                            "type": "string",
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "scope",
                          "checkpoint",
                          "mode",
                          "policy_commit",
                          "reason",
                          "account"
                        ]
                      }
                    ]
                  }
                },
                "scopes_changed": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "landing": {
                  "type": "object",
                  "properties": {
                    "recovery_performed": {
                      "type": "boolean"
                    },
                    "trunk_landed": {
                      "type": "boolean"
                    },
                    "worktree_removed": {
                      "type": "boolean"
                    },
                    "branch_deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "recovery_performed",
                    "trunk_landed",
                    "worktree_removed",
                    "branch_deleted"
                  ]
                },
                "authority_warnings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "proof_line": {
                  "type": "string"
                },
                "variances": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/DiscernAuthorizedVariance"
                  }
                },
                "standard_approvals": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "standard": {
                        "type": "string"
                      },
                      "commit": {
                        "type": "string"
                      },
                      "bound_commit": {
                        "type": "string"
                      },
                      "measured_commit": {
                        "type": "string"
                      },
                      "definition_fingerprint": {
                        "type": "string"
                      },
                      "trunk": {
                        "type": "string"
                      },
                      "trunk_commit": {
                        "type": "string"
                      },
                      "direction": {
                        "type": "string",
                        "enum": [
                          "up",
                          "down"
                        ],
                        "x-discern-vocabulary": "x-discern-proposal-directions"
                      },
                      "trunk_limit": {
                        "type": "number"
                      },
                      "proposed_limit": {
                        "type": "number"
                      },
                      "measurement": {
                        "type": "number"
                      },
                      "delta": {
                        "type": "number"
                      },
                      "reason": {
                        "type": "string"
                      },
                      "evidence_paths": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "required": [
                      "standard",
                      "commit",
                      "bound_commit",
                      "measured_commit",
                      "definition_fingerprint",
                      "trunk",
                      "trunk_commit",
                      "direction",
                      "trunk_limit",
                      "proposed_limit",
                      "measurement",
                      "delta",
                      "reason",
                      "evidence_paths"
                    ]
                  }
                },
                "standard_approvals_required": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "proposal": {
                        "type": "object",
                        "properties": {
                          "standard": {
                            "type": "string"
                          },
                          "commit": {
                            "type": "string"
                          },
                          "bound_commit": {
                            "type": "string"
                          },
                          "measured_commit": {
                            "type": "string"
                          },
                          "definition_fingerprint": {
                            "type": "string"
                          },
                          "trunk": {
                            "type": "string"
                          },
                          "trunk_commit": {
                            "type": "string"
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "up",
                              "down"
                            ],
                            "x-discern-vocabulary": "x-discern-proposal-directions"
                          },
                          "trunk_limit": {
                            "type": "number"
                          },
                          "proposed_limit": {
                            "type": "number"
                          },
                          "measurement": {
                            "type": "number"
                          },
                          "delta": {
                            "type": "number"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "evidence_paths": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        },
                        "required": [
                          "standard",
                          "commit",
                          "bound_commit",
                          "measured_commit",
                          "definition_fingerprint",
                          "trunk",
                          "trunk_commit",
                          "direction",
                          "trunk_limit",
                          "proposed_limit",
                          "measurement",
                          "delta",
                          "reason",
                          "evidence_paths"
                        ]
                      },
                      "token": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$"
                      }
                    },
                    "required": [
                      "proposal",
                      "token"
                    ]
                  }
                },
                "proof_note": {
                  "type": "object",
                  "properties": {
                    "fetch": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-proof-note-fetch-modes"
                        },
                        "status": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-proof-note-fetch-statuses"
                        },
                        "remotes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "added": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "removed": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "errors": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "mode",
                        "status",
                        "remotes",
                        "added",
                        "removed",
                        "errors"
                      ]
                    },
                    "write": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-proof-note-write-statuses"
                        },
                        "ref": {
                          "type": "string"
                        },
                        "commit": {
                          "type": "string"
                        },
                        "merged_refs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "reason": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "ref",
                        "commit",
                        "merged_refs"
                      ]
                    }
                  },
                  "required": [
                    "fetch",
                    "write"
                  ]
                },
                "ignored_file_changes": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-ignored-file-change-statuses"
                    },
                    "changed_roots": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "changed_total": {
                      "type": "number"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "changed_roots",
                    "changed_total",
                    "truncated"
                  ]
                },
                "gate_validation": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-gate-validation-modes"
                    },
                    "proof": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "x-discern-vocabulary": "x-discern-proof-statuses"
                        },
                        "path": {
                          "type": "string"
                        },
                        "recorded": {
                          "type": "string"
                        },
                        "head": {
                          "type": "string"
                        },
                        "reason": {
                          "type": "string"
                        },
                        "proof": {
                          "$ref": "#/$defs/DiscernProofSummary"
                        },
                        "checkpoint_drops": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "scope": {
                                    "type": "string",
                                    "const": "policy"
                                  },
                                  "checkpoint": {
                                    "type": "null"
                                  },
                                  "mode": {
                                    "type": "null"
                                  },
                                  "policy_commit": {
                                    "type": "string"
                                  },
                                  "reason": {
                                    "type": "string",
                                    "x-discern-vocabulary": "x-discern-policy-checkpoint-drop-reasons"
                                  },
                                  "account": {
                                    "type": "string",
                                    "maxLength": 500
                                  }
                                },
                                "required": [
                                  "scope",
                                  "checkpoint",
                                  "mode",
                                  "reason",
                                  "account"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "scope": {
                                    "type": "string",
                                    "const": "checkpoint"
                                  },
                                  "checkpoint": {
                                    "type": "string"
                                  },
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "stop",
                                      "advise"
                                    ],
                                    "x-discern-vocabulary": "x-discern-checkpoint-modes"
                                  },
                                  "policy_commit": {
                                    "type": "string"
                                  },
                                  "reason": {
                                    "type": "string",
                                    "x-discern-vocabulary": "x-discern-entry-checkpoint-drop-reasons"
                                  },
                                  "account": {
                                    "type": "string",
                                    "maxLength": 500
                                  }
                                },
                                "required": [
                                  "scope",
                                  "checkpoint",
                                  "mode",
                                  "policy_commit",
                                  "reason",
                                  "account"
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "status"
                      ]
                    }
                  },
                  "required": [
                    "mode",
                    "proof"
                  ]
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernUpdateResult": {
      "title": "DiscernUpdateResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "update"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "behind": {
                  "type": "number"
                },
                "fast_forward": {
                  "type": "boolean"
                },
                "commits": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "sha": {
                        "type": "string"
                      },
                      "subject": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "sha",
                      "subject"
                    ]
                  }
                },
                "commits_total": {
                  "type": "number"
                },
                "commits_truncated": {
                  "type": "boolean"
                },
                "files": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "path": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "added": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "removed": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "path",
                      "status",
                      "added",
                      "removed"
                    ]
                  }
                },
                "files_total": {
                  "type": "number"
                },
                "files_truncated": {
                  "type": "boolean"
                },
                "overlap": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "overlap_total": {
                  "type": "number"
                },
                "scopes_incoming": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "auto_resolved": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "regenerated": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "range": {
                  "type": "object",
                  "properties": {
                    "base": {
                      "type": "string"
                    },
                    "before": {
                      "type": "string"
                    },
                    "main": {
                      "type": "string"
                    },
                    "after": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "base",
                    "before",
                    "main"
                  ]
                }
              },
              "required": [
                "behind",
                "fast_forward",
                "commits",
                "commits_total",
                "commits_truncated",
                "files",
                "files_total",
                "files_truncated",
                "overlap",
                "overlap_total",
                "scopes_incoming",
                "range"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernIdentityResult": {
      "title": "DiscernIdentityResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "identity"
        },
        "data": {
          "anyOf": [
            {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "field"
                    },
                    "field": {
                      "type": "string",
                      "x-discern-vocabulary": "x-discern-identity-fields"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "field",
                    "value"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "resource"
                    },
                    "name": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "name",
                    "value"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "resources"
                    },
                    "resources": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "kind",
                    "resources"
                  ]
                }
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernScriptsResult": {
      "title": "DiscernScriptsResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "scripts"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "scripts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "directory": {
                  "type": "string"
                }
              },
              "required": [
                "scripts",
                "directory"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernWorktreeResult": {
      "title": "DiscernWorktreeResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "worktree"
        },
        "data": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-config-issue-kinds"
                  },
                  "path": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ]
              }
            }
          },
          "required": [
            "issues"
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernWorktreeSetupResult": {
      "title": "DiscernWorktreeSetupResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "worktree setup"
        },
        "data": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-config-issue-kinds"
                  },
                  "path": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ]
              }
            }
          },
          "required": [
            "issues"
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernWorktreeTeardownResult": {
      "title": "DiscernWorktreeTeardownResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "worktree teardown"
        },
        "data": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-config-issue-kinds"
                  },
                  "path": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ]
              }
            }
          },
          "required": [
            "issues"
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernWorktreeDropResult": {
      "title": "DiscernWorktreeDropResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "worktree drop"
        },
        "data": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-config-issue-kinds"
                  },
                  "path": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ]
              }
            }
          },
          "required": [
            "issues"
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernWorktreeParkResult": {
      "title": "DiscernWorktreeParkResult",
      "x-discern-stability": "evolving",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "worktree park"
        },
        "data": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-config-issue-kinds"
                  },
                  "path": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ]
              }
            }
          },
          "required": [
            "issues"
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernWorktreePruneResult": {
      "title": "DiscernWorktreePruneResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "worktree prune"
        },
        "data": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-config-issue-kinds"
                  },
                  "path": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ]
              }
            }
          },
          "required": [
            "issues"
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernSkillsResult": {
      "title": "DiscernSkillsResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "skills"
        },
        "data": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-config-issue-kinds"
                  },
                  "path": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ]
              }
            }
          },
          "required": [
            "issues"
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernSkillsListResult": {
      "title": "DiscernSkillsListResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "skills list"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "skills": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "source": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-skill-sources"
                      },
                      "overrides_bundled": {
                        "type": "boolean"
                      },
                      "has_bundled": {
                        "type": "boolean"
                      },
                      "excluded": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "name",
                      "source",
                      "overrides_bundled",
                      "has_bundled",
                      "excluded"
                    ]
                  }
                }
              },
              "required": [
                "skills"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernSkillsEjectResult": {
      "title": "DiscernSkillsEjectResult",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "plan": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "details": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "steps": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-kinds"
                  },
                  "label": {
                    "type": "string"
                  },
                  "disposition": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-step-dispositions"
                  },
                  "note": {
                    "type": "string"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "disposition"
                ]
              }
            }
          },
          "required": [
            "title",
            "details",
            "steps"
          ]
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-kinds"
              },
              "label": {
                "type": "string"
              },
              "disposition": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-step-dispositions"
              },
              "note": {
                "type": "string"
              },
              "group": {
                "type": "string"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "ok",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "x-discern-vocabulary": "x-discern-step-outcomes"
              },
              "advisory": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-advisory-kinds"
                  },
                  "evidence": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "next_action": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "evidence",
                  "next_action"
                ]
              },
              "duration_s": {
                "type": "number"
              },
              "output_path": {
                "type": "string"
              },
              "output_lines": {
                "type": "number"
              },
              "error_like_lines": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "label",
              "disposition",
              "outcome"
            ]
          }
        },
        "waited_ms": {
          "type": "number",
          "minimum": 0
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "warning"
                ],
                "x-discern-vocabulary": "x-discern-diagnostic-severities"
              },
              "message": {
                "type": "string"
              },
              "reproduce_cmd": {
                "type": "string"
              },
              "output": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              },
              "output_path": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "line": {
                "type": "number"
              },
              "col": {
                "type": "number"
              },
              "rule": {
                "type": "string"
              },
              "fix_available": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "severity",
              "message",
              "reproduce_cmd"
            ]
          }
        },
        "diagnostic_evidence": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string"
            },
            "digest": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "shown": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "repeats": {
              "type": "array",
              "items": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            }
          },
          "required": [
            "path",
            "digest",
            "bytes",
            "total",
            "shown",
            "repeats"
          ]
        },
        "hints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "x-discern-vocabulary": "x-discern-advisory-kinds"
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "next_action": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "kind",
              "evidence",
              "next_action"
            ]
          }
        },
        "error": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-error-slugs"
        },
        "message": {
          "type": "string"
        },
        "verb": {
          "type": "string",
          "const": "skills eject"
        },
        "data": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "dest_abs": {
                  "type": "string"
                },
                "dest_rel": {
                  "type": "string"
                },
                "skills_dir_persisted": {
                  "type": "boolean"
                },
                "materialized": {
                  "type": "object",
                  "properties": {
                    "copied": {
                      "type": "number"
                    },
                    "linked": {
                      "type": "number"
                    },
                    "pruned": {
                      "type": "number"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "copied",
                    "linked",
                    "pruned",
                    "errors"
                  ]
                }
              },
              "required": [
                "name",
                "dest_abs",
                "dest_rel",
                "skills_dir_persisted",
                "materialized"
              ]
            },
            {
              "type": "object",
              "properties": {
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "x-discern-vocabulary": "x-discern-config-issue-kinds"
                      },
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ]
                  }
                }
              },
              "required": [
                "issues"
              ]
            }
          ]
        }
      },
      "required": [
        "ok",
        "verb"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/DiscernResultState"
        }
      ]
    },
    "DiscernProofSummary": {
      "title": "DiscernProofSummary",
      "type": "object",
      "properties": {
        "completion": {
          "type": "object",
          "properties": {
            "candidate_id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "proof_id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "required": [
            "candidate_id",
            "proof_id"
          ]
        },
        "branch": {
          "type": "string"
        },
        "trunk": {
          "type": "string"
        },
        "head": {
          "type": "string"
        },
        "files_total": {
          "type": "number"
        },
        "insertions": {
          "type": "number"
        },
        "deletions": {
          "type": "number"
        },
        "line": {
          "type": "string"
        },
        "mode": {
          "type": "string",
          "enum": [
            "strict",
            "report"
          ],
          "x-discern-vocabulary": "x-discern-validation-modes"
        },
        "checkpoint_drops": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "const": "policy"
                  },
                  "checkpoint": {
                    "type": "null"
                  },
                  "mode": {
                    "type": "null"
                  },
                  "policy_commit": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-policy-checkpoint-drop-reasons"
                  },
                  "account": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "scope",
                  "checkpoint",
                  "mode",
                  "reason",
                  "account"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "const": "checkpoint"
                  },
                  "checkpoint": {
                    "type": "string"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "stop",
                      "advise"
                    ],
                    "x-discern-vocabulary": "x-discern-checkpoint-modes"
                  },
                  "policy_commit": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string",
                    "x-discern-vocabulary": "x-discern-entry-checkpoint-drop-reasons"
                  },
                  "account": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "scope",
                  "checkpoint",
                  "mode",
                  "policy_commit",
                  "reason",
                  "account"
                ]
              }
            ]
          }
        },
        "standard_proposals": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "standard": {
                "type": "string"
              },
              "commit": {
                "type": "string"
              },
              "bound_commit": {
                "type": "string"
              },
              "measured_commit": {
                "type": "string"
              },
              "definition_fingerprint": {
                "type": "string"
              },
              "trunk": {
                "type": "string"
              },
              "trunk_commit": {
                "type": "string"
              },
              "direction": {
                "type": "string",
                "enum": [
                  "up",
                  "down"
                ],
                "x-discern-vocabulary": "x-discern-proposal-directions"
              },
              "trunk_limit": {
                "type": "number"
              },
              "proposed_limit": {
                "type": "number"
              },
              "measurement": {
                "type": "number"
              },
              "delta": {
                "type": "number"
              },
              "reason": {
                "type": "string"
              },
              "evidence_paths": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": [
              "standard",
              "commit",
              "bound_commit",
              "measured_commit",
              "definition_fingerprint",
              "trunk",
              "trunk_commit",
              "direction",
              "trunk_limit",
              "proposed_limit",
              "measurement",
              "delta",
              "reason",
              "evidence_paths"
            ]
          }
        }
      },
      "required": [
        "branch",
        "trunk",
        "head",
        "files_total",
        "insertions",
        "deletions",
        "line"
      ],
      "description": "The compact Proof claim: branch, trunk, validated commit, whole-diff statistics, and the one-line rendered Proof."
    },
    "DiscernHelpCommand": {
      "title": "DiscernHelpCommand",
      "type": "object",
      "properties": {
        "path": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "description": {
          "type": "string"
        },
        "aliases": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "hidden": {
          "type": "boolean"
        },
        "args": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "optional": {
                "type": "boolean"
              },
              "variadic": {
                "type": "boolean"
              }
            },
            "required": [
              "name",
              "optional",
              "variadic"
            ]
          }
        },
        "usage": {
          "type": "string"
        },
        "options": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "flags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "description": {
                "type": "string"
              },
              "type_definition": {
                "type": "string"
              },
              "arity": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "value_types": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "default_value": {},
              "hidden": {
                "type": "boolean"
              },
              "global": {
                "type": "boolean"
              }
            },
            "required": [
              "flags",
              "description",
              "type_definition",
              "arity",
              "value_types",
              "default_value",
              "hidden",
              "global"
            ]
          }
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DiscernHelpCommand"
          }
        }
      },
      "required": [
        "path",
        "description",
        "aliases",
        "hidden",
        "args",
        "usage",
        "options",
        "children"
      ]
    },
    "DiscernSubmissionRow": {
      "title": "DiscernSubmissionRow",
      "type": "object",
      "properties": {
        "effort": {
          "type": "string"
        },
        "branch": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "head": {
          "type": "string"
        },
        "submitted_at": {
          "type": "string"
        },
        "authority": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-submission-authorities"
        },
        "authority_source": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-authority-sources"
        },
        "granted_at": {
          "type": "string"
        },
        "position": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "readiness": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-submission-readiness"
        },
        "reason": {
          "type": "string"
        },
        "integration": {
          "type": "boolean"
        },
        "operation_handle": {
          "type": "string"
        }
      },
      "required": [
        "effort",
        "branch",
        "path",
        "head",
        "submitted_at",
        "authority",
        "position",
        "readiness"
      ],
      "description": "One landing-queue row derived from an effort's submission record: the branch, the exact submitted commit, whether a recorded grant covers it, and the one sentence that says why it waits."
    },
    "DiscernIntegrationJudgment": {
      "title": "DiscernIntegrationJudgment",
      "type": "object",
      "properties": {
        "composition": {
          "type": "string"
        },
        "decision": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-integration-decisions"
        },
        "awaiting": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "composition",
        "decision",
        "awaiting"
      ],
      "description": "The served decision moment of a retained integration composition: the receipt a continuation must name, the decision kind that continues it, and the checkpoint ids awaiting that decision."
    },
    "DiscernLandingOutcome": {
      "title": "DiscernLandingOutcome",
      "type": "object",
      "properties": {
        "effort": {
          "type": "string"
        },
        "branch": {
          "type": "string"
        },
        "head": {
          "type": "string"
        },
        "selected": {
          "type": "boolean"
        },
        "status": {
          "type": "string",
          "x-discern-vocabulary": "x-discern-landing-statuses"
        },
        "landed_commit": {
          "type": "string"
        },
        "integrated": {
          "type": "boolean"
        },
        "consent": {
          "type": "object",
          "properties": {
            "source": {
              "type": "string",
              "x-discern-vocabulary": "x-discern-consent-sources"
            },
            "scopes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "source"
          ]
        },
        "reason": {
          "type": "string"
        },
        "proof_line": {
          "type": "string"
        }
      },
      "required": [
        "effort",
        "branch",
        "head",
        "selected",
        "status"
      ],
      "description": "One attempted landing in an acceptance call: the submission it names, whether it was the selected one, its broad terminal state, and the exact commit that reached the trunk when one did."
    },
    "DiscernAuthorizedVariance": {
      "title": "DiscernAuthorizedVariance",
      "type": "object",
      "properties": {
        "checkpoint": {
          "type": "string"
        },
        "definition_hash": {
          "type": "string"
        },
        "subject": {
          "type": "string"
        },
        "why": {
          "type": "string"
        }
      },
      "required": [
        "checkpoint",
        "definition_hash",
        "subject",
        "why"
      ],
      "description": "Owner authorization to land one declared-unmet checkpoint, bound to the exact declaration (checkpoint, definition hash, subject fingerprint, rationale) and the commit it landed with. Never a future policy."
    },
    "DiscernDoctorMcpToolResult": {
      "title": "DiscernDoctorMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernDoctorResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernMapMcpToolResult": {
      "title": "DiscernMapMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernMapResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernDocsMcpToolResult": {
      "title": "DiscernDocsMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernDocsResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernDoneMcpToolResult": {
      "title": "DiscernDoneMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernDoneResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernPrepareMcpToolResult": {
      "title": "DiscernPrepareMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernPrepareResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernTestMcpToolResult": {
      "title": "DiscernTestMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernTestResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernImprovementMcpToolResult": {
      "title": "DiscernImprovementMcpToolResult",
      "x-discern-stability": "evolving",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernImprovementResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernCheckpointsMcpToolResult": {
      "title": "DiscernCheckpointsMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernCheckpointsResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernProgressMcpToolResult": {
      "title": "DiscernProgressMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernProgressResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernStandardsMcpToolResult": {
      "title": "DiscernStandardsMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernStandardsResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernRefreshMcpToolResult": {
      "title": "DiscernRefreshMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernRefreshResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernImpactMcpToolResult": {
      "title": "DiscernImpactMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernImpactResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernCouplingMcpToolResult": {
      "title": "DiscernCouplingMcpToolResult",
      "x-discern-stability": "evolving",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernCouplingResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernAwaitMcpToolResult": {
      "title": "DiscernAwaitMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernAwaitResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernPatternsMcpToolResult": {
      "title": "DiscernPatternsMcpToolResult",
      "x-discern-stability": "evolving",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernPatternsResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernStatusMcpToolResult": {
      "title": "DiscernStatusMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernStatusResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernStartMcpToolResult": {
      "title": "DiscernStartMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernStartResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernAcceptMcpToolResult": {
      "title": "DiscernAcceptMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernAcceptResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernUpdateMcpToolResult": {
      "title": "DiscernUpdateMcpToolResult",
      "type": "object",
      "properties": {
        "content": {
          "description": "One authored Markdown presentation that is sufficient without structuredContent.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "The contract-authored Markdown projection of the prepared DiscernResult."
              }
            },
            "required": [
              "type",
              "text"
            ]
          }
        },
        "structuredContent": {
          "$ref": "#/$defs/DiscernUpdateResult",
          "description": "The compact structured projection, sufficient without text content."
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content",
        "structuredContent",
        "isError"
      ]
    },
    "DiscernCliJsonResult": {
      "title": "DiscernCliJsonResult",
      "description": "Any `discern <command> --json` result. Consumers with a known verb should prefer the per-verb schema referenced by x-discern-contracts for clearer validation errors.",
      "oneOf": [
        {
          "$ref": "#/$defs/DiscernRootResult"
        },
        {
          "$ref": "#/$defs/DiscernSetupResult"
        },
        {
          "$ref": "#/$defs/DiscernSetupBeginResult"
        },
        {
          "$ref": "#/$defs/DiscernSetupVerifyResult"
        },
        {
          "$ref": "#/$defs/DiscernSetupStepResult"
        },
        {
          "$ref": "#/$defs/DiscernSetupDoneResult"
        },
        {
          "$ref": "#/$defs/DiscernSetupAcceptResult"
        },
        {
          "$ref": "#/$defs/DiscernUpgradeResult"
        },
        {
          "$ref": "#/$defs/DiscernUninstallResult"
        },
        {
          "$ref": "#/$defs/DiscernDoctorResult"
        },
        {
          "$ref": "#/$defs/DiscernReleasesResult"
        },
        {
          "$ref": "#/$defs/DiscernLicensesResult"
        },
        {
          "$ref": "#/$defs/DiscernTriangleResult"
        },
        {
          "$ref": "#/$defs/DiscernMapResult"
        },
        {
          "$ref": "#/$defs/DiscernDocsResult"
        },
        {
          "$ref": "#/$defs/DiscernHelpResult"
        },
        {
          "$ref": "#/$defs/DiscernConfigResult"
        },
        {
          "$ref": "#/$defs/DiscernDoneResult"
        },
        {
          "$ref": "#/$defs/DiscernPrepareResult"
        },
        {
          "$ref": "#/$defs/DiscernTestResult"
        },
        {
          "$ref": "#/$defs/DiscernImprovementResult"
        },
        {
          "$ref": "#/$defs/DiscernCheckpointsResult"
        },
        {
          "$ref": "#/$defs/DiscernProgressResult"
        },
        {
          "$ref": "#/$defs/DiscernStandardsResult"
        },
        {
          "$ref": "#/$defs/DiscernStandardsProposeResult"
        },
        {
          "$ref": "#/$defs/DiscernRefreshResult"
        },
        {
          "$ref": "#/$defs/DiscernTidyResult"
        },
        {
          "$ref": "#/$defs/DiscernImpactResult"
        },
        {
          "$ref": "#/$defs/DiscernCouplingResult"
        },
        {
          "$ref": "#/$defs/DiscernAwaitResult"
        },
        {
          "$ref": "#/$defs/DiscernPatternsResult"
        },
        {
          "$ref": "#/$defs/DiscernPatternsResetResult"
        },
        {
          "$ref": "#/$defs/DiscernPatternsSealResult"
        },
        {
          "$ref": "#/$defs/DiscernPatternsArchivesResult"
        },
        {
          "$ref": "#/$defs/DiscernDeskResult"
        },
        {
          "$ref": "#/$defs/DiscernEnterResult"
        },
        {
          "$ref": "#/$defs/DiscernStatusResult"
        },
        {
          "$ref": "#/$defs/DiscernStartResult"
        },
        {
          "$ref": "#/$defs/DiscernWorktreeRenameResult"
        },
        {
          "$ref": "#/$defs/DiscernWorktreeEnsureResult"
        },
        {
          "$ref": "#/$defs/DiscernAcceptResult"
        },
        {
          "$ref": "#/$defs/DiscernUpdateResult"
        },
        {
          "$ref": "#/$defs/DiscernIdentityResult"
        },
        {
          "$ref": "#/$defs/DiscernScriptsResult"
        },
        {
          "$ref": "#/$defs/DiscernWorktreeResult"
        },
        {
          "$ref": "#/$defs/DiscernWorktreeSetupResult"
        },
        {
          "$ref": "#/$defs/DiscernWorktreeTeardownResult"
        },
        {
          "$ref": "#/$defs/DiscernWorktreeDropResult"
        },
        {
          "$ref": "#/$defs/DiscernWorktreeParkResult"
        },
        {
          "$ref": "#/$defs/DiscernWorktreePruneResult"
        },
        {
          "$ref": "#/$defs/DiscernSkillsResult"
        },
        {
          "$ref": "#/$defs/DiscernSkillsListResult"
        },
        {
          "$ref": "#/$defs/DiscernSkillsEjectResult"
        }
      ]
    },
    "DiscernMcpJsonResult": {
      "title": "DiscernMcpJsonResult",
      "description": "Any MCP tool result object returned by discern's MCP server. Its structuredContent is the same DiscernResult envelope exposed by the corresponding CLI command; content carries an independently sufficient authored Markdown projection.",
      "oneOf": [
        {
          "$ref": "#/$defs/DiscernDoctorMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernMapMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernDocsMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernDoneMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernPrepareMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernTestMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernImprovementMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernCheckpointsMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernProgressMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernStandardsMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernRefreshMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernImpactMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernCouplingMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernAwaitMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernPatternsMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernStatusMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernStartMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernAcceptMcpToolResult"
        },
        {
          "$ref": "#/$defs/DiscernUpdateMcpToolResult"
        }
      ]
    }
  },
  "x-discern-contracts": [
    {
      "id": "root",
      "verb": "discern",
      "commands": [
        "discern"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernRootResult"
    },
    {
      "id": "setup",
      "verb": "setup",
      "commands": [
        "setup"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernSetupResult"
    },
    {
      "id": "setupBegin",
      "verb": "setup begin",
      "commands": [
        "setup begin"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps",
          "instruction-refresh"
        ],
        "optional_advisories": [
          "setup-machinery-commit-failed"
        ],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernSetupBeginResult"
    },
    {
      "id": "setupVerify",
      "verb": "setup verify",
      "commands": [
        "setup verify"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernSetupVerifyResult"
    },
    {
      "id": "setupStep",
      "verb": "setup step",
      "commands": [
        "setup step"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernSetupStepResult"
    },
    {
      "id": "setupDone",
      "verb": "setup done",
      "commands": [
        "setup done"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps",
          "setup-completion"
        ],
        "optional_advisories": [
          "checkpoint-evidence-dropped",
          "setup-unproven-completion",
          "proof-recording-unavailable",
          "acceptance-cleanup-incomplete",
          "setup-marker-commit-failed"
        ],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernSetupDoneResult"
    },
    {
      "id": "setupAccept",
      "verb": "setup accept",
      "commands": [
        "setup accept"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps",
          "setup-landing"
        ],
        "optional_advisories": [
          "proof-recording-unavailable",
          "acceptance-cleanup-incomplete"
        ],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "owner"
      },
      "schema": "#/$defs/DiscernSetupAcceptResult"
    },
    {
      "id": "upgrade",
      "verb": "upgrade",
      "commands": [
        "upgrade"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps",
          "instruction-refresh"
        ],
        "optional_advisories": [
          "generated-attribute-pattern-untranslated"
        ],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernUpgradeResult"
    },
    {
      "id": "uninstall",
      "verb": "uninstall",
      "commands": [
        "uninstall"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [
          "uninstall-strip-incomplete"
        ],
        "refusal": "failure",
        "cancellation": "successful-no-effect",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernUninstallResult"
    },
    {
      "id": "doctor",
      "verb": "doctor",
      "commands": [
        "doctor"
      ],
      "mcp_tool": "discern_doctor",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "doctor-checks"
        ],
        "optional_advisories": [
          "doctor-warning"
        ],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernDoctorResult",
      "mcp_tool_result_schema": "#/$defs/DiscernDoctorMcpToolResult"
    },
    {
      "id": "releases",
      "verb": "releases",
      "commands": [
        "releases"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernReleasesResult"
    },
    {
      "id": "licenses",
      "verb": "licenses",
      "commands": [
        "licenses"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernLicensesResult"
    },
    {
      "id": "triangle",
      "verb": "triangle",
      "commands": [
        "triangle"
      ],
      "stability": "evolving",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernTriangleResult"
    },
    {
      "id": "map",
      "verb": "map",
      "commands": [
        "map"
      ],
      "mcp_tool": "discern_map",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernMapResult",
      "mcp_tool_result_schema": "#/$defs/DiscernMapMcpToolResult"
    },
    {
      "id": "docs",
      "verb": "docs",
      "commands": [
        "docs"
      ],
      "mcp_tool": "discern_docs",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernDocsResult",
      "mcp_tool_result_schema": "#/$defs/DiscernDocsMcpToolResult"
    },
    {
      "id": "help",
      "verb": "help",
      "commands": [
        "help"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernHelpResult"
    },
    {
      "id": "config",
      "verb": "config",
      "commands": [
        "config",
        "config set-job",
        "config set-scope",
        "config set-standard",
        "config set",
        "config get",
        "config array",
        "config has",
        "config subsections",
        "config keys",
        "config explain"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernConfigResult"
    },
    {
      "id": "done",
      "verb": "done",
      "commands": [
        "done"
      ],
      "mcp_tool": "discern_done",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps",
          "gate-finish"
        ],
        "optional_advisories": [
          "checkpoint-evidence-dropped",
          "execution-cap-unavailable",
          "governing-config-key-ignored",
          "landing-authority-unverified",
          "proof-recording-unavailable",
          "standards-limits-unverified"
        ],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernDoneResult",
      "mcp_tool_result_schema": "#/$defs/DiscernDoneMcpToolResult"
    },
    {
      "id": "prepare",
      "verb": "prepare",
      "commands": [
        "prepare"
      ],
      "mcp_tool": "discern_prepare",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [
          "execution-cap-unavailable",
          "governing-config-key-ignored"
        ],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernPrepareResult",
      "mcp_tool_result_schema": "#/$defs/DiscernPrepareMcpToolResult"
    },
    {
      "id": "test",
      "verb": "test",
      "commands": [
        "test"
      ],
      "mcp_tool": "discern_test",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [
          "execution-cap-unavailable"
        ],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernTestResult",
      "mcp_tool_result_schema": "#/$defs/DiscernTestMcpToolResult"
    },
    {
      "id": "improvement",
      "verb": "improvement",
      "commands": [
        "improvement"
      ],
      "mcp_tool": "discern_improvement",
      "stability": "evolving",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernImprovementResult",
      "mcp_tool_result_schema": "#/$defs/DiscernImprovementMcpToolResult"
    },
    {
      "id": "checkpoints",
      "verb": "checkpoints",
      "commands": [
        "checkpoints"
      ],
      "mcp_tool": "discern_checkpoints",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [
          "checkpoint-evidence-dropped"
        ],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernCheckpointsResult",
      "mcp_tool_result_schema": "#/$defs/DiscernCheckpointsMcpToolResult"
    },
    {
      "id": "progress",
      "verb": "progress",
      "commands": [
        "progress"
      ],
      "mcp_tool": "discern_progress",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernProgressResult",
      "mcp_tool_result_schema": "#/$defs/DiscernProgressMcpToolResult"
    },
    {
      "id": "standards",
      "verb": "standards",
      "commands": [
        "standards"
      ],
      "mcp_tool": "discern_standards",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [
          "execution-cap-unavailable",
          "standards-limits-unverified"
        ],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernStandardsResult",
      "mcp_tool_result_schema": "#/$defs/DiscernStandardsMcpToolResult"
    },
    {
      "id": "standardsPropose",
      "verb": "standards propose",
      "commands": [
        "standards propose"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernStandardsProposeResult"
    },
    {
      "id": "refresh",
      "verb": "refresh",
      "commands": [
        "refresh"
      ],
      "mcp_tool": "discern_refresh",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps",
          "refresh-artifacts"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernRefreshResult",
      "mcp_tool_result_schema": "#/$defs/DiscernRefreshMcpToolResult"
    },
    {
      "id": "tidy",
      "verb": "tidy",
      "commands": [
        "tidy"
      ],
      "stability": "evolving",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernTidyResult"
    },
    {
      "id": "impact",
      "verb": "impact",
      "commands": [
        "impact"
      ],
      "mcp_tool": "discern_impact",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernImpactResult",
      "mcp_tool_result_schema": "#/$defs/DiscernImpactMcpToolResult"
    },
    {
      "id": "coupling",
      "verb": "coupling",
      "commands": [
        "coupling"
      ],
      "mcp_tool": "discern_coupling",
      "stability": "evolving",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernCouplingResult",
      "mcp_tool_result_schema": "#/$defs/DiscernCouplingMcpToolResult"
    },
    {
      "id": "await",
      "verb": "await",
      "commands": [
        "await"
      ],
      "mcp_tool": "discern_await",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "successful-no-effect",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernAwaitResult",
      "mcp_tool_result_schema": "#/$defs/DiscernAwaitMcpToolResult"
    },
    {
      "id": "patterns",
      "verb": "patterns",
      "commands": [
        "patterns"
      ],
      "mcp_tool": "discern_patterns",
      "stability": "evolving",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernPatternsResult",
      "mcp_tool_result_schema": "#/$defs/DiscernPatternsMcpToolResult"
    },
    {
      "id": "patternsReset",
      "verb": "patterns reset",
      "commands": [
        "patterns reset"
      ],
      "stability": "evolving",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "successful-no-effect",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernPatternsResetResult"
    },
    {
      "id": "patternsSeal",
      "verb": "patterns seal",
      "commands": [
        "patterns seal"
      ],
      "stability": "evolving",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "successful-no-effect",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernPatternsSealResult"
    },
    {
      "id": "patternsArchives",
      "verb": "patterns archives",
      "commands": [
        "patterns archives"
      ],
      "stability": "evolving",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernPatternsArchivesResult"
    },
    {
      "id": "desk",
      "verb": "desk",
      "commands": [
        "desk"
      ],
      "stability": "evolving",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "successful-no-effect",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernDeskResult"
    },
    {
      "id": "enter",
      "verb": "enter",
      "commands": [
        "enter"
      ],
      "stability": "evolving",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernEnterResult"
    },
    {
      "id": "status",
      "verb": "status",
      "commands": [
        "status"
      ],
      "mcp_tool": "discern_status",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [
          "landing-authority-unverified"
        ],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernStatusResult",
      "mcp_tool_result_schema": "#/$defs/DiscernStatusMcpToolResult"
    },
    {
      "id": "start",
      "verb": "start",
      "commands": [
        "start"
      ],
      "mcp_tool": "discern_start",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [
          "landing-authority-unverified",
          "optional-resource-unavailable"
        ],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "not-applicable",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernStartResult",
      "mcp_tool_result_schema": "#/$defs/DiscernStartMcpToolResult"
    },
    {
      "id": "worktreeRename",
      "verb": "worktree rename",
      "commands": [
        "worktree rename"
      ],
      "stability": "evolving",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernWorktreeRenameResult"
    },
    {
      "id": "worktreeEnsure",
      "verb": "worktree ensure",
      "commands": [
        "worktree ensure"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [
          "optional-resource-unavailable"
        ],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernWorktreeEnsureResult"
    },
    {
      "id": "accept",
      "verb": "accept",
      "commands": [
        "accept"
      ],
      "mcp_tool": "discern_accept",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps",
          "accept-landing"
        ],
        "optional_advisories": [
          "acceptance-cleanup-incomplete",
          "checkpoint-evidence-dropped",
          "checkout-clean-observation-unavailable",
          "ignored-file-observation-unavailable",
          "landing-authority-unverified",
          "proof-recording-unavailable"
        ],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "owner"
      },
      "schema": "#/$defs/DiscernAcceptResult",
      "mcp_tool_result_schema": "#/$defs/DiscernAcceptMcpToolResult"
    },
    {
      "id": "update",
      "verb": "update",
      "commands": [
        "update"
      ],
      "mcp_tool": "discern_update",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernUpdateResult",
      "mcp_tool_result_schema": "#/$defs/DiscernUpdateMcpToolResult"
    },
    {
      "id": "identity",
      "verb": "identity",
      "commands": [
        "identity"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernIdentityResult"
    },
    {
      "id": "scripts",
      "verb": "scripts",
      "commands": [
        "scripts"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernScriptsResult"
    },
    {
      "id": "worktree",
      "verb": "worktree",
      "commands": [
        "worktree"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernWorktreeResult"
    },
    {
      "id": "worktreeSetup",
      "verb": "worktree setup",
      "commands": [
        "worktree setup"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [
          "optional-resource-unavailable"
        ],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernWorktreeSetupResult"
    },
    {
      "id": "worktreeTeardown",
      "verb": "worktree teardown",
      "commands": [
        "worktree teardown"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernWorktreeTeardownResult"
    },
    {
      "id": "worktreeDrop",
      "verb": "worktree drop",
      "commands": [
        "worktree drop"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernWorktreeDropResult"
    },
    {
      "id": "worktreePark",
      "verb": "worktree park",
      "commands": [
        "worktree park"
      ],
      "stability": "evolving",
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernWorktreeParkResult"
    },
    {
      "id": "worktreePrune",
      "verb": "worktree prune",
      "commands": [
        "worktree prune"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "successful-no-effect",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernWorktreePruneResult"
    },
    {
      "id": "skills",
      "verb": "skills",
      "commands": [
        "skills"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernSkillsResult"
    },
    {
      "id": "skillsList",
      "verb": "skills list",
      "commands": [
        "skills list"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "not-applicable",
        "partial_effect": "not-applicable",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernSkillsListResult"
    },
    {
      "id": "skillsEject",
      "verb": "skills eject",
      "commands": [
        "skills eject"
      ],
      "completion_policy": {
        "required_postconditions": [
          "declared-outcome",
          "executed-steps",
          "skill-materialization"
        ],
        "optional_advisories": [],
        "refusal": "failure",
        "cancellation": "failure",
        "partial_effect": "failure",
        "no_op": "success",
        "recovery_owner": "caller"
      },
      "schema": "#/$defs/DiscernSkillsEjectResult"
    }
  ],
  "x-discern-error-slugs": [
    "active_worktrees",
    "ambiguous",
    "apply_failed",
    "awaiting_consent",
    "awaiting_declaration",
    "awaiting_standard_approval",
    "awaiting_variance",
    "below_min_score",
    "brief_unparseable",
    "checkout_failed",
    "checkpoint_evidence_unavailable",
    "config_template_unavailable",
    "confirmation_required",
    "conflict",
    "desk_already_active",
    "detached_head",
    "diagrams_misaligned",
    "dirty_worktree",
    "edit_failed",
    "gate_failed",
    "gitignore_template_unavailable",
    "identity_failed",
    "incomplete",
    "internal_error",
    "invalid_arguments",
    "invalid_config",
    "invalid_config_file",
    "invalid_migrated_config",
    "invalid_settings_file",
    "invalid_toml",
    "invalid_value",
    "no_docs",
    "no_map",
    "no_project",
    "no_repository",
    "no_trunk",
    "not_main_checkout",
    "not_on_setup_branch",
    "not_on_trunk",
    "partial_acceptance",
    "partial_materialization",
    "partial_refresh",
    "pin_failed",
    "precondition_failed",
    "proposal_failed",
    "proposal_stale",
    "provisioned_resources",
    "read_failed",
    "renamed_command",
    "renamed_config_key",
    "report_only_proof",
    "schema_version_too_new",
    "script_not_a_command",
    "script_not_executable",
    "setup_plan_failed",
    "setup_unfinished",
    "skills_eject_failed",
    "tables_malformed",
    "templates_not_found",
    "tidy_parse_failed",
    "tidy_write_failed",
    "unchanged_tree_rerun",
    "unknown_category",
    "unknown_command",
    "unknown_key",
    "unknown_standard",
    "unknown_step",
    "unknown_target",
    "write_denied"
  ],
  "x-discern-advisory-kinds": [
    "acceptance-cleanup-incomplete",
    "checkpoint-evidence-dropped",
    "checkout-clean-observation-unavailable",
    "doctor-warning",
    "execution-cap-unavailable",
    "generated-attribute-pattern-untranslated",
    "governing-config-key-ignored",
    "ignored-file-observation-unavailable",
    "landing-authority-unverified",
    "optional-resource-unavailable",
    "proof-recording-unavailable",
    "setup-unproven-completion",
    "setup-machinery-commit-failed",
    "setup-marker-commit-failed",
    "standards-limits-unverified",
    "uninstall-strip-incomplete"
  ],
  "x-discern-step-kinds": [
    "job",
    "scope-gate",
    "merge-check",
    "standards-limits-check",
    "tracked-artifacts-check",
    "instructions-check",
    "skills-check",
    "tracked-refresh-check",
    "resource-create",
    "resource-destroy",
    "git",
    "task-metadata",
    "setup-step",
    "repository-ensure",
    "checkout-clean-check",
    "setup-ensure",
    "env",
    "refresh",
    "tidy",
    "standard"
  ],
  "x-discern-step-dispositions": [
    "run",
    "skip",
    "gate"
  ],
  "x-discern-failed-stages": [
    "fix",
    "build",
    "check",
    "test",
    "check/test",
    "scope_gates",
    "tree_drift",
    "generated_drift",
    "refresh_drift",
    "tracked_artifacts",
    "instructions",
    "skills",
    "skill_frontmatter",
    "adr_numbers",
    "adr_index",
    "map_integrity",
    "merge",
    "standards",
    "write_denied",
    "validation_inputs"
  ],
  "x-discern-actors": [
    "project",
    "discern"
  ],
  "x-discern-config-issue-kinds": [
    "unknown_root_section"
  ],
  "x-discern-policy-checkpoint-drop-reasons": [
    "merge_base_unresolved",
    "governing_config_unreadable",
    "governing_config_invalid",
    "open_question_store_unreadable",
    "open_question_store_corrupt",
    "declaration_evidence_unavailable",
    "strand_check_unavailable"
  ],
  "x-discern-entry-checkpoint-drop-reasons": [
    "checkpoint_missing_question",
    "checkpoint_question_file_missing",
    "checkpoint_question_file_invalid_path",
    "checkpoint_question_file_not_regular",
    "checkpoint_question_file_oversized",
    "checkpoint_question_file_invalid_utf8",
    "checkpoint_question_file_unreadable",
    "checkpoint_question_source_conflict",
    "checkpoint_selector_conflict",
    "checkpoint_unknown_scope",
    "effort_diff_unreadable",
    "trigger_content_unavailable",
    "trigger_history_unavailable",
    "when_spawn_failed",
    "when_timeout",
    "when_invalid_exit",
    "when_cancelled",
    "when_input_failed",
    "when_input_cleanup_failed",
    "when_output_limit",
    "open_question_store_rebuilt",
    "subject_unavailable",
    "open_question_store_write_failed"
  ],
  "x-discern-consent-sources": [
    "conversation",
    "standing-grant",
    "effort-grant"
  ],
  "x-discern-trigger-vetoes": [
    "empty_matched_set",
    "generated_only",
    "excluded_only",
    "kinds",
    "adds_matching",
    "removes_matching",
    "new_directory",
    "binary",
    "unless_changed",
    "min_changed_files",
    "min_changed_lines",
    "deletion_dominant",
    "similar_new_file",
    "min_commits"
  ],
  "x-discern-related-checkpoint-kinds": [
    "similar_existing",
    "map_explanation"
  ],
  "x-discern-checkpoint-obligations": [
    "none",
    "will_open",
    "awaiting_declaration",
    "reopened",
    "declared_met",
    "declared_unmet",
    "unknown"
  ],
  "x-discern-checkpoint-review-statuses": [
    "not_needed",
    "unreviewed"
  ],
  "x-discern-open-question-states": [
    "awaiting_declaration",
    "declared_met",
    "declared_unmet",
    "reopened"
  ],
  "x-discern-declaration-conclusions": [
    "met",
    "unmet"
  ],
  "x-discern-proof-statuses": [
    "honored",
    "report_only",
    "missing",
    "stale",
    "dirty",
    "unavailable",
    "read_failed"
  ],
  "x-discern-await-proof-statuses": [
    "honored",
    "report_only",
    "missing",
    "stale",
    "dirty",
    "unavailable",
    "read_failed",
    "no-worktree"
  ],
  "x-discern-gate-proof-recording-statuses": [
    "recorded",
    "diagnostic",
    "pending",
    "skipped_dirty",
    "skipped_head_moved",
    "unavailable",
    "record_failed",
    "cleared",
    "clear_failed"
  ],
  "x-discern-gate-completion-kinds": [
    "diagnostic",
    "complete",
    "pending"
  ],
  "x-discern-gate-validation-modes": [
    "proof",
    "rerun"
  ],
  "x-discern-standard-measurements": [
    "measured",
    "replayed",
    "skipped",
    "cancelled",
    "stale"
  ],
  "x-discern-standard-verdicts": [
    "improved",
    "held",
    "regressed"
  ],
  "x-discern-standards-limits-statuses": [
    "verified",
    "proposed",
    "loosened",
    "unverified",
    "parse_failed"
  ],
  "x-discern-proposal-statuses": [
    "recorded",
    "rebound",
    "replaced",
    "unchanged",
    "recovered"
  ],
  "x-discern-producer-evidence-uses": [
    "executed",
    "reused"
  ],
  "x-discern-producer-closures": [
    "declared",
    "candidate"
  ],
  "x-discern-proof-note-fetch-modes": [
    "local",
    "fetch"
  ],
  "x-discern-proof-note-fetch-statuses": [
    "local",
    "wired",
    "unchanged",
    "no_remote",
    "failed"
  ],
  "x-discern-proof-note-write-statuses": [
    "recorded",
    "already_present",
    "record_failed",
    "missing_proof"
  ],
  "x-discern-submission-authorities": [
    "pre-authorized",
    "awaiting-owner"
  ],
  "x-discern-authority-sources": [
    "effort-grant",
    "standing-grant"
  ],
  "x-discern-submission-readiness": [
    "ready",
    "waiting"
  ],
  "x-discern-submission-states": [
    "planned",
    "queued"
  ],
  "x-discern-landing-statuses": [
    "landed",
    "refused",
    "failed"
  ],
  "x-discern-integration-decisions": [
    "declaration",
    "variance"
  ],
  "x-discern-integration-owners": [
    "live",
    "interrupted"
  ],
  "x-discern-ignored-file-change-statuses": [
    "disabled",
    "baseline_missing",
    "newer",
    "unavailable",
    "unchanged",
    "changed"
  ],
  "x-discern-emergency-outcomes": [
    "preview",
    "prepared",
    "landed",
    "not-landed",
    "recovery"
  ],
  "x-discern-emergency-note-statuses": [
    "pending",
    "published",
    "failed"
  ],
  "x-discern-emergency-cleanups": [
    "removed",
    "kept",
    "failed"
  ],
  "x-discern-exception-validation-states": [
    "outstanding",
    "resolved"
  ],
  "x-discern-await-conditions": [
    "green",
    "landed",
    "trunk-moved"
  ],
  "x-discern-await-timeout-bases": [
    "explicit",
    "cli",
    "long-client",
    "strict-client",
    "unknown-client",
    "cache-window"
  ],
  "x-discern-progress-phases": [
    "producer",
    "queue",
    "pending",
    "operation"
  ],
  "x-discern-executor-states": [
    "running",
    "gone",
    "unknown"
  ],
  "x-discern-operation-outcomes": [
    "completed",
    "failed",
    "cancelled"
  ],
  "x-discern-work-states": [
    "running",
    "passed",
    "failed",
    "cancelled"
  ],
  "x-discern-wait-states": [
    "waiting",
    "resumed",
    "unmet",
    "cancelled",
    "failed",
    "unavailable"
  ],
  "x-discern-locations": [
    "main",
    "worktree"
  ],
  "x-discern-status-projection-modes": [
    "orientation",
    "full"
  ],
  "x-discern-managed-version-states": [
    "unknown",
    "equal",
    "running-newer",
    "project-managed-by-newer"
  ],
  "x-discern-title-sources": [
    "recorded",
    "identity-fallback",
    "unavailable-fallback"
  ],
  "x-discern-reappeared-path-kinds": [
    "directory",
    "file",
    "symlink",
    "other"
  ],
  "x-discern-fleet-filesystem-states": [
    "directory",
    "missing",
    "other",
    "unreadable"
  ],
  "x-discern-fleet-action-outcomes": [
    "ok",
    "failed",
    "partial",
    "refused"
  ],
  "x-discern-fleet-setup-states": [
    "ready",
    "incomplete",
    "unavailable"
  ],
  "x-discern-setup-marker-states": [
    "present",
    "missing",
    "unavailable"
  ],
  "x-discern-setup-journal-statuses": [
    "missing",
    "recorded",
    "unavailable"
  ],
  "x-discern-setup-journal-step-states": [
    "not_started",
    "running",
    "completed"
  ],
  "x-discern-setup-repair-kinds": [
    "retry",
    "manual"
  ],
  "x-discern-identity-fields": [
    "id",
    "site",
    "branch",
    "port",
    "db",
    "seed",
    "worktree"
  ],
  "x-discern-setup-phases": [
    "fresh",
    "in_progress",
    "done"
  ],
  "x-discern-setup-completion-evidence": [
    "proven",
    "unproven"
  ],
  "x-discern-known-job-states": [
    "enforced",
    "deferred",
    "absent"
  ],
  "x-discern-assurance-verdicts": [
    "full",
    "partial",
    "minimal"
  ],
  "x-discern-setup-plan-actions": [
    "create",
    "skip",
    "merge",
    "append",
    "remove"
  ],
  "x-discern-setup-moment-kinds": [
    "explanation",
    "progress",
    "decision",
    "completion"
  ],
  "x-discern-setup-decision-kinds": [
    "model-selection",
    "project-name-confirmation",
    "project-intent-gap",
    "gate-protection-change",
    "authored-source-collision",
    "owner-policy-conflict",
    "subsystem-sanity-check",
    "worktree-resource-policy",
    "documentation-claim-gap",
    "external-reference-inspection",
    "landing-choice"
  ],
  "x-discern-relay-protections": [
    "adaptive",
    "verbatim-list"
  ],
  "x-discern-setup-conflict-kinds": [
    "existing_instructions",
    "dirty_worktree",
    "not_a_repo",
    "missing_git_identity"
  ],
  "x-discern-setup-done-completions": [
    "created",
    "replayed",
    "validated",
    "unproven"
  ],
  "x-discern-setup-done-stages": [
    "marker_commit",
    "refresh",
    "doctor",
    "worktree_probe",
    "done",
    "proof"
  ],
  "x-discern-setup-done-refresh-stages": [
    "refresh",
    "final_tree"
  ],
  "x-discern-setup-rollbacks": [
    "not_needed",
    "owned_commit_removed",
    "retained"
  ],
  "x-discern-reactivation-check-kinds": [
    "mcp",
    "cli"
  ],
  "x-discern-trust-action-kinds": [
    "verify-configuration",
    "trust-directory",
    "approve-hook",
    "enable-hooks",
    "approve-tools"
  ],
  "x-discern-trust-fact-kinds": [
    "path",
    "config-key",
    "config-value",
    "flag",
    "environment-variable"
  ],
  "x-discern-setup-accept-no-op-reasons": [
    "no_git_repository",
    "already_on_target"
  ],
  "x-discern-config-reconcile-kinds": [
    "section",
    "key",
    "banner",
    "marker"
  ],
  "x-discern-gitignore-reconcile-kinds": [
    "create-block",
    "replace-block"
  ],
  "x-discern-gitattributes-reconcile-kinds": [
    "create-block",
    "replace-block",
    "remove-block"
  ],
  "x-discern-config-operations": [
    "array",
    "subsections",
    "keys"
  ],
  "x-discern-config-explain-kinds": [
    "section",
    "family",
    "key"
  ],
  "x-discern-doctor-check-statuses": [
    "ok",
    "warn",
    "fail"
  ],
  "x-discern-manual-kinds": [
    "tutorial",
    "guide",
    "explanation",
    "reference",
    "troubleshooting"
  ],
  "x-discern-doc-matches": [
    "complete",
    "partial",
    "metadata"
  ],
  "x-discern-legal-document-kinds": [
    "license",
    "notice"
  ],
  "x-discern-release-repository-states": [
    "recorded",
    "missing",
    "malformed",
    "unavailable",
    "newer",
    "outside-repository"
  ],
  "x-discern-release-state-write-statuses": [
    "saved",
    "unchanged",
    "unavailable",
    "newer",
    "skipped"
  ],
  "x-discern-skill-sources": [
    "authored",
    "bundled"
  ],
  "x-discern-next-action-kinds": [
    "fix",
    "review",
    "decide"
  ],
  "x-discern-checkpoint-recommendations": [
    "checkpoints.review",
    "checkpoints.graduate"
  ],
  "x-discern-rule-statuses": [
    "pass",
    "partial",
    "fail"
  ],
  "x-discern-detector-families": [
    "trajectory",
    "gate-fit",
    "behavior",
    "funnel"
  ],
  "x-discern-detector-scopes": [
    "branch",
    "session",
    "project"
  ],
  "x-discern-detector-tiers": [
    "inline",
    "batch"
  ],
  "x-discern-detector-statuses": [
    "fired",
    "quiet",
    "insufficient-evidence"
  ],
  "x-discern-finding-tones": [
    "good",
    "neutral",
    "attention"
  ],
  "x-discern-evidence-value-kinds": [
    "observed",
    "estimated"
  ],
  "x-discern-validation-verbs": [
    "prepare",
    "test",
    "done"
  ],
  "x-discern-validation-routes": [
    "test-first",
    "commit-first",
    "unattributed"
  ],
  "x-discern-coupling-modes": [
    "diff",
    "query",
    "evidence"
  ]
}
