{
  "openapi": "3.1.0",
  "info": {
    "title": "DecisionGATE runtime",
    "version": "0.1.0",
    "description": "Ethical pre-execution filter. Sequential PASS/REVISE/BLOCK. wrap (shell exec) is not hosted. Freedom without clarity is chaos. Clarity without force is wisdom."
  },
  "servers": [
    {
      "url": "https://decisiongate-download-tracker.vibelock.workers.dev"
    }
  ],
  "paths": {
    "/v1/health": {
      "get": {
        "operationId": "health",
        "summary": "Liveness",
        "responses": {
          "200": {
            "description": "ok",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/check": {
      "post": {
        "operationId": "check",
        "summary": "Run the five gates (CLI check).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "statement": {
                    "type": "string",
                    "description": "Concrete proposal statement (CLI --statement)."
                  },
                  "evidence": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ],
                    "description": "Facts/data (CLI --evidence)."
                  },
                  "impacts_positive": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ],
                    "description": "CLI --impact-pos."
                  },
                  "impact_pos": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "impacts_negative": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ],
                    "description": "CLI --impact-neg."
                  },
                  "impact_neg": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "values": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "commitments": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "constraints": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "accountable_person": {
                    "type": "string",
                    "description": "CLI --accountable."
                  },
                  "accountable": {
                    "type": "string"
                  },
                  "overrides": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Optional human override to REVISE with a note."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gate report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "motto": {
                      "type": "string"
                    },
                    "final_state": {
                      "type": "string",
                      "enum": [
                        "PASS",
                        "REVISE",
                        "BLOCK"
                      ]
                    },
                    "blocked_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "lineage": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "PASS",
                              "REVISE",
                              "BLOCK"
                            ]
                          },
                          "feedback": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "proposal": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/evaluate": {
      "post": {
        "operationId": "evaluate",
        "summary": "Same sequential gates as check; returns PASS/REVISE/BLOCK + motto.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "statement": {
                    "type": "string",
                    "description": "Concrete proposal statement (CLI --statement)."
                  },
                  "evidence": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ],
                    "description": "Facts/data (CLI --evidence)."
                  },
                  "impacts_positive": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ],
                    "description": "CLI --impact-pos."
                  },
                  "impact_pos": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "impacts_negative": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ],
                    "description": "CLI --impact-neg."
                  },
                  "impact_neg": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "values": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "commitments": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "constraints": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "accountable_person": {
                    "type": "string",
                    "description": "CLI --accountable."
                  },
                  "accountable": {
                    "type": "string"
                  },
                  "overrides": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Optional human override to REVISE with a note."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gate report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "motto": {
                      "type": "string"
                    },
                    "final_state": {
                      "type": "string",
                      "enum": [
                        "PASS",
                        "REVISE",
                        "BLOCK"
                      ]
                    },
                    "blocked_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "lineage": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "PASS",
                              "REVISE",
                              "BLOCK"
                            ]
                          },
                          "feedback": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "proposal": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}