{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hackshop-dev/json-schema/hackshop-dev-plan-response-schema.json",
  "title": "PlanResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hackshop-dev-openapi.json#/components/schemas/PlanResponse",
  "type": "object",
  "properties": {
    "inferred_needs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "inferred_size": {
      "type": "string"
    },
    "budget_usd": {
      "type": [
        "number",
        "null"
      ]
    },
    "fit": {
      "type": "string",
      "enum": [
        "all",
        "partial",
        "none"
      ],
      "description": "none when no board that meets the hard needs fits the budget."
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "difficulty_note": {
      "type": "string",
      "description": "Present when the idea needs movement or arms."
    },
    "intake": {
      "type": "object",
      "properties": {
        "complete": {
          "type": "boolean"
        },
        "missing": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "complete",
        "missing"
      ]
    },
    "questions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/IntakeQuestion"
      },
      "description": "The intake questions still unanswered."
    },
    "picks": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Pick"
      }
    },
    "terms": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "next_steps": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "inferred_needs",
    "fit",
    "notes",
    "warnings",
    "intake",
    "questions",
    "picks"
  ],
  "$defs": {
    "Difficulty": {
      "type": "object",
      "properties": {
        "level": {
          "type": "string",
          "enum": [
            "green",
            "blue",
            "black"
          ]
        },
        "label": {
          "type": "string",
          "enum": [
            "Beginner",
            "Intermediate",
            "Expert"
          ]
        },
        "short": {
          "type": "string"
        },
        "why": {
          "type": "string"
        }
      },
      "required": [
        "level",
        "label",
        "why"
      ]
    },
    "IntakeQuestion": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "enum": [
            "size",
            "interaction",
            "sensing",
            "budget"
          ]
        },
        "question": {
          "type": "string"
        },
        "why": {
          "type": "string"
        },
        "options": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string"
              },
              "value": {
                "type": "string"
              },
              "needs": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "size": {
                "type": "string"
              },
              "budget_usd": {
                "type": "number"
              }
            },
            "required": [
              "label",
              "value"
            ]
          }
        }
      },
      "required": [
        "id",
        "question",
        "why",
        "options"
      ]
    },
    "Pick": {
      "type": "object",
      "properties": {
        "device_id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "platform_id": {
          "type": "string"
        },
        "support": {
          "type": "string",
          "enum": [
            "official",
            "possible"
          ]
        },
        "tier_label": {
          "type": "string"
        },
        "why": {
          "type": "string"
        },
        "gaps": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "needs_met": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "est_total_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "All-in estimate: board plus required parts."
        },
        "within_budget": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "price_label": {
          "type": [
            "string",
            "null"
          ]
        },
        "difficulty": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Difficulty"
            }
          ]
        },
        "build_page_url": {
          "type": "string",
          "format": "uri"
        },
        "agent_brief_url": {
          "type": "string",
          "format": "uri"
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Board-specific flashing warnings."
        },
        "caveats": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "device_id",
        "name",
        "why",
        "needs_met",
        "build_page_url"
      ]
    }
  }
}