{
  "openapi": "3.1.0",
  "info": {
    "title": "boss-skills API",
    "description": "v1 轻量 HTTP API for boss-skills judgement system. 任何 HTTP client (curl / Hermes / OpenClaw / 自写 runtime) 都能调用. 完整 Phase 0-5 流水线推迟到 v2 async API.",
    "version": "0.1.0"
  },
  "paths": {
    "/v1/healthz": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "Healthz",
        "description": "Liveness probe · 始终返回 200 (除非 server 死掉)",
        "operationId": "healthz_v1_healthz_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/version": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "Version",
        "description": "vault + skill + git commit 版本信息",
        "operationId": "version_v1_version_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/panels": {
      "get": {
        "tags": [
          "config"
        ],
        "summary": "List Panels",
        "description": "列出 panels/*.yaml · 含 anchor_slug + judges 元数据 (v0.2.1+ multi-anchor)",
        "operationId": "list_panels_v1_panels_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PanelsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/anchors": {
      "get": {
        "tags": [
          "config"
        ],
        "summary": "List Anchors",
        "description": "列出 anchors/*/ 子目录 · 含 perspective skill 状态 + raw dirs (v0.2.1+ B 档)",
        "operationId": "list_anchors_v1_anchors_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnchorsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/attribution/check": {
      "post": {
        "tags": [
          "action"
        ],
        "summary": "Run Attribution Check",
        "description": "触发 attribution_check.py run · 同步返回 summary",
        "operationId": "run_attribution_check_v1_attribution_check_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttributionRunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttributionRunResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AnchorInfo": {
        "properties": {
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "perspective_skill_exists": {
            "type": "boolean",
            "title": "Perspective Skill Exists",
            "description": "anchors/<slug>/perspective/SKILL.md exists"
          },
          "raw_dirs": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Raw Dirs"
          },
          "readme_excerpt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Readme Excerpt"
          }
        },
        "type": "object",
        "required": [
          "slug",
          "perspective_skill_exists"
        ],
        "title": "AnchorInfo"
      },
      "AnchorsResponse": {
        "properties": {
          "anchors": {
            "items": {
              "$ref": "#/components/schemas/AnchorInfo"
            },
            "type": "array",
            "title": "Anchors"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "default_anchor_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Anchor Slug"
          }
        },
        "type": "object",
        "required": [
          "anchors",
          "count"
        ],
        "title": "AnchorsResponse"
      },
      "AttributionRunRequest": {
        "properties": {
          "dry_run": {
            "type": "boolean",
            "title": "Dry Run",
            "description": "True 则不写盘, False 真跑",
            "default": true
          },
          "case_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Case Id",
            "description": "限定单个 case, 如 'C-9999-0001' 或目录名 '_demo-acmeco-strategy'"
          }
        },
        "type": "object",
        "title": "AttributionRunRequest"
      },
      "AttributionRunResponse": {
        "properties": {
          "invoked_at": {
            "type": "string",
            "title": "Invoked At"
          },
          "today": {
            "type": "string",
            "title": "Today"
          },
          "total_checked": {
            "type": "integer",
            "title": "Total Checked"
          },
          "by_status": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "By Status"
          },
          "raw_output": {
            "type": "string",
            "title": "Raw Output"
          }
        },
        "type": "object",
        "required": [
          "invoked_at",
          "today",
          "total_checked",
          "by_status",
          "raw_output"
        ],
        "title": "AttributionRunResponse"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HealthResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "description": "ok / degraded / down"
          },
          "timestamp": {
            "type": "string",
            "title": "Timestamp",
            "description": "ISO 8601 UTC"
          }
        },
        "type": "object",
        "required": [
          "status",
          "timestamp"
        ],
        "title": "HealthResponse"
      },
      "JudgeInfo": {
        "properties": {
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "display_name_cn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name Cn"
          },
          "judge_category": {
            "type": "string",
            "title": "Judge Category",
            "description": "anchor / dimension"
          },
          "skill_path": {
            "type": "string",
            "title": "Skill Path"
          },
          "always_active": {
            "type": "boolean",
            "title": "Always Active",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "slug",
          "judge_category",
          "skill_path"
        ],
        "title": "JudgeInfo"
      },
      "PanelInfo": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "anchor_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anchor Slug",
            "description": "multi-anchor 绑定 (v0.2.1+)"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "judges": {
            "items": {
              "$ref": "#/components/schemas/JudgeInfo"
            },
            "type": "array",
            "title": "Judges"
          },
          "scoring_lenses": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Scoring Lenses"
          }
        },
        "type": "object",
        "required": [
          "name",
          "display_name",
          "judges"
        ],
        "title": "PanelInfo"
      },
      "PanelsResponse": {
        "properties": {
          "panels": {
            "items": {
              "$ref": "#/components/schemas/PanelInfo"
            },
            "type": "array",
            "title": "Panels"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "panels",
          "count"
        ],
        "title": "PanelsResponse"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VersionResponse": {
        "properties": {
          "skill": {
            "type": "string",
            "title": "Skill",
            "description": "skill name from frontmatter, e.g. 'boss'"
          },
          "skill_version": {
            "type": "string",
            "title": "Skill Version",
            "description": "skill version, e.g. 'v0.1.0'"
          },
          "vault_version": {
            "type": "string",
            "title": "Vault Version",
            "description": "vault version from CLAUDE.md, e.g. 'v0.2.1'"
          },
          "git_commit": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Git Commit",
            "description": "HEAD short hash if in git repo"
          },
          "api_version": {
            "type": "string",
            "title": "Api Version",
            "description": "HTTP API version",
            "default": "v1"
          }
        },
        "type": "object",
        "required": [
          "skill",
          "skill_version",
          "vault_version"
        ],
        "title": "VersionResponse"
      }
    }
  }
}