{
  "openapi": "3.0.3",
  "info": {
    "title": "Praetor API",
    "version": "AI-powered specification generation platform API",
    "description": "1.0.0"
  },
  "paths": {
    "/projects": {
      "get": {
        "operationId": "listProjects",
        "summary": "List all projects",
        "tags": [
          "Project"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of projects",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectList"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createProject",
        "summary": "Create a new Project",
        "tags": [
          "Project"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Project created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/projects/{id}": {
      "get": {
        "operationId": "getProject",
        "summary": "Get a Project by ID",
        "tags": [
          "Project"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Project details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "updateProject",
        "summary": "Update a Project",
        "tags": [
          "Project"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteProject",
        "summary": "Delete a Project",
        "tags": [
          "Project"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Project deleted"
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/userstories": {
      "get": {
        "operationId": "listUserStorys",
        "summary": "List all userstories",
        "tags": [
          "UserStory"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of userstories",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserStoryList"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createUserStory",
        "summary": "Create a new UserStory",
        "tags": [
          "UserStory"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserStoryInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "UserStory created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserStory"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/userstories/{id}": {
      "get": {
        "operationId": "getUserStory",
        "summary": "Get a UserStory by ID",
        "tags": [
          "UserStory"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "UserStory details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserStory"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "updateUserStory",
        "summary": "Update a UserStory",
        "tags": [
          "UserStory"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserStoryInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "UserStory updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserStory"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteUserStory",
        "summary": "Delete a UserStory",
        "tags": [
          "UserStory"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "UserStory deleted"
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/kits": {
      "get": {
        "operationId": "listKits",
        "summary": "List all kits",
        "tags": [
          "Kit"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of kits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KitList"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createKit",
        "summary": "Create a new Kit",
        "tags": [
          "Kit"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KitInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Kit created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Kit"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/kits/{id}": {
      "get": {
        "operationId": "getKit",
        "summary": "Get a Kit by ID",
        "tags": [
          "Kit"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Kit details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Kit"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "updateKit",
        "summary": "Update a Kit",
        "tags": [
          "Kit"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KitInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Kit updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Kit"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteKit",
        "summary": "Delete a Kit",
        "tags": [
          "Kit"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Kit deleted"
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/workflows": {
      "get": {
        "operationId": "listWorkflows",
        "summary": "List all workflows",
        "tags": [
          "Workflow"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of workflows",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowList"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createWorkflow",
        "summary": "Create a new Workflow",
        "tags": [
          "Workflow"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Workflow created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workflow"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/workflows/{id}": {
      "get": {
        "operationId": "getWorkflow",
        "summary": "Get a Workflow by ID",
        "tags": [
          "Workflow"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workflow"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "updateWorkflow",
        "summary": "Update a Workflow",
        "tags": [
          "Workflow"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Workflow updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workflow"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteWorkflow",
        "summary": "Delete a Workflow",
        "tags": [
          "Workflow"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Workflow deleted"
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Project": {
        "type": "object",
        "description": "A specification project",
        "properties": {
          "id": {
            "type": "string",
            "description": "Project ID",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Project name"
          },
          "description": {
            "type": "string",
            "description": "Project description"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "discovery",
              "planning",
              "specification",
              "complete"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "id",
          "name"
        ]
      },
      "ProjectInput": {
        "type": "object",
        "description": "Input for creating/updating Project",
        "properties": {
          "id": {
            "type": "string",
            "description": "Project ID",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Project name"
          },
          "description": {
            "type": "string",
            "description": "Project description"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "discovery",
              "planning",
              "specification",
              "complete"
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "Creation timestamp",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "description": "Last update timestamp",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "ProjectList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Project"
            }
          },
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          }
        }
      },
      "UserStory": {
        "type": "object",
        "description": "A user story specification",
        "properties": {
          "id": {
            "type": "string",
            "description": "Story ID",
            "format": "uuid"
          },
          "projectId": {
            "type": "string",
            "description": "Associated project",
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "description": "Story title"
          },
          "description": {
            "type": "string",
            "description": "Story description"
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "ready",
              "in_progress",
              "done"
            ]
          },
          "acceptanceCriteria": {
            "type": "array",
            "description": "Acceptance criteria"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "id",
          "projectId",
          "title"
        ]
      },
      "UserStoryInput": {
        "type": "object",
        "description": "Input for creating/updating UserStory",
        "properties": {
          "id": {
            "type": "string",
            "description": "Story ID",
            "format": "uuid"
          },
          "projectId": {
            "type": "string",
            "description": "Associated project",
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "description": "Story title"
          },
          "description": {
            "type": "string",
            "description": "Story description"
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "ready",
              "in_progress",
              "done"
            ]
          },
          "acceptanceCriteria": {
            "type": "array",
            "description": "Acceptance criteria"
          }
        },
        "required": [
          "id",
          "projectId",
          "title"
        ]
      },
      "UserStoryList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserStory"
            }
          },
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          }
        }
      },
      "Kit": {
        "type": "object",
        "description": "A code generation kit",
        "properties": {
          "id": {
            "type": "string",
            "description": "Kit ID",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Kit name"
          },
          "description": {
            "type": "string",
            "description": "Kit description"
          },
          "version": {
            "type": "string",
            "description": "Kit version"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "deprecated"
            ]
          },
          "metadata": {
            "type": "object",
            "description": "Kit metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "id",
          "name"
        ]
      },
      "KitInput": {
        "type": "object",
        "description": "Input for creating/updating Kit",
        "properties": {
          "id": {
            "type": "string",
            "description": "Kit ID",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Kit name"
          },
          "description": {
            "type": "string",
            "description": "Kit description"
          },
          "version": {
            "type": "string",
            "description": "Kit version"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "deprecated"
            ]
          },
          "metadata": {
            "type": "object",
            "description": "Kit metadata"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "KitList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Kit"
            }
          },
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          }
        }
      },
      "Workflow": {
        "type": "object",
        "description": "A workflow definition",
        "properties": {
          "id": {
            "type": "string",
            "description": "Workflow ID",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Workflow name"
          },
          "description": {
            "type": "string",
            "description": "Workflow description"
          },
          "type": {
            "type": "string",
            "enum": [
              "discovery",
              "planning",
              "specification",
              "generation"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "completed",
              "failed"
            ]
          },
          "config": {
            "type": "object",
            "description": "Workflow configuration"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "id",
          "name"
        ]
      },
      "WorkflowInput": {
        "type": "object",
        "description": "Input for creating/updating Workflow",
        "properties": {
          "id": {
            "type": "string",
            "description": "Workflow ID",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Workflow name"
          },
          "description": {
            "type": "string",
            "description": "Workflow description"
          },
          "type": {
            "type": "string",
            "enum": [
              "discovery",
              "planning",
              "specification",
              "generation"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "completed",
              "failed"
            ]
          },
          "config": {
            "type": "object",
            "description": "Workflow configuration"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "WorkflowList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Workflow"
            }
          },
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "details": {
            "type": "object"
          }
        },
        "required": [
          "code",
          "message"
        ]
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "InternalError": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "tags": [],
  "servers": [
    {
      "url": "/api",
      "description": "API Server"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ]
}