{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/shapelessai/json-schema/shapelessai-onboarding-schema.json",
  "title": "Onboarding",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/shapelessai-openapi.json#/components/schemas/Onboarding",
  "type": "object",
  "properties": {
    "percent": {
      "type": "integer",
      "description": "The completion ring, 20 (endowed) to 100."
    },
    "sections": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "score": {
            "type": "integer"
          },
          "weight": {
            "type": "integer"
          }
        }
      }
    },
    "open": {
      "type": "array",
      "description": "One file per open section, most valuable first; empty when done.",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "PUT /api/workspace/file with this path."
          },
          "question": {
            "type": "string",
            "description": "The one-line ask the screen shows."
          },
          "gainPercent": {
            "type": "integer",
            "description": "What answering it adds to the ring."
          },
          "questions": {
            "type": "array",
            "description": "The file's headings as questions; write answers under them as markdown.",
            "items": {
              "type": "object",
              "properties": {
                "level": {
                  "type": "integer"
                },
                "question": {
                  "type": "string"
                },
                "hint": {
                  "type": "string"
                }
              }
            }
          }
        },
        "required": [
          "path",
          "question",
          "gainPercent",
          "questions"
        ]
      }
    },
    "done": {
      "type": "boolean"
    },
    "how": {
      "type": "string"
    }
  },
  "required": [
    "percent",
    "sections",
    "open",
    "done",
    "how"
  ]
}