{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://litlfred.github.io/bootstrap/0.1.0/schemas/discussion.input.schema.json",
  "$comment": "Generated by the bootstrap toolset (https://github.com/litlfred/bootstrap-tools, scripts/gen-bootstrap-schemas.ts) from its Zod source — do not edit; change the Zod.",
  "title": "Discussion Input",
  "description": "The occasion for asking: what the agent already knows, and which unknown is still open. Deliberately small — a Bootstrapping Agent has read one README and can look nothing up, so an input it cannot populate is an input that stops the process.",
  "type": "object",
  "properties": {
    "open": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "harness",
          "repositories"
        ]
      },
      "description": "Which unknowns this exchange is to settle. At least one, or there is nothing to ask."
    },
    "askedOf": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "person",
            "agent"
          ]
        },
        "id": {
          "description": "Session id, handle or name, where one is known. Absent is normal for a person.",
          "type": "string"
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false,
      "description": "Who is being asked. The two participant kinds are symmetric — the same skill serves human-to-agent and agent-to-agent — but the answer's weight differs, so the kind is recorded rather than inferred."
    },
    "candidates": {
      "description": "Harnesses the agent has already narrowed to from context — a repository whose root already holds a declaration, `<name>.json`, is not a blank slate. Narrowing first is what keeps this to one question.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "knownRepositories": {
      "description": "Repositories already evident from the checkout, each with the part it is known to play. Offered so the participant confirms or corrects rather than recites.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Clone URL or path. Not required to be reachable — a Bootstrapping Agent may have been told about a repository it cannot yet fetch."
          },
          "role": {
            "type": "string",
            "enum": [
              "read-from",
              "written-to"
            ],
            "description": "Which part this repository plays. A flat list loses the distinction, and the distinction is the whole reason for determining them: it is where the new declaration lands."
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "url",
          "role"
        ],
        "additionalProperties": false
      }
    },
    "context": {
      "description": "What the agent read to get this far, in one or two sentences. Lets the participant answer without re-establishing the situation.",
      "type": "string"
    }
  },
  "required": [
    "open",
    "askedOf"
  ],
  "additionalProperties": false
}
