{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/Soleone/showcase/main/schema/portfolio.schema.json",
  "title": "portfolio.json",
  "description": "Which projects a portfolio shows and how much it cares about each, in portfolio order. Facts about each project live in its own showcase.json.",
  "type": "object",
  "required": ["projects"],
  "additionalProperties": false,
  "patternProperties": {
    "^x-": {}
  },
  "properties": {
    "$schema": { "type": "string" },
    "roots": {
      "type": "array",
      "items": { "type": "string", "minLength": 1 },
      "description": "Folders showcase scans for projects to review. ~ and $VARS are expanded. Each project is a folder in one of them, or in a folder inside one (like $SRC/category/project)."
    },
    "ignored": {
      "type": "array",
      "items": { "type": "string", "minLength": 1 },
      "description": "Ids of discovered projects you decided against, so they stop coming back for review."
    },
    "projects": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id"],
        "additionalProperties": false,
        "patternProperties": {
          "^x-": {}
        },
        "properties": {
          "id": { "type": "string", "minLength": 1, "description": "Stable identifier, e.g. local:notecli." },
          "title": { "type": ["string", "null"], "description": "Fallback when the project has no showcase.json." },
          "priority": {
            "enum": ["high", "mid", "low", null],
            "description": "Sets the target tier: high S, mid A, low C."
          },
          "path": {
            "type": ["string", "null"],
            "minLength": 1,
            "description": "Local checkout. ~ and $VARS are expanded; relative paths resolve from this file."
          },
          "repo": { "type": ["string", "null"], "format": "uri" }
        }
      }
    }
  }
}
