{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://thruput.se/agents/schemas/repository/repository.schema.json",
  "title": "Repository",
  "description": "How every repository is laid out. Each property is a location in the file tree, named in its description relative to the repository root, and its value is what lives there",
  "type": "object",
  "required": [
    "readme",
    "plans",
    "adrs"
  ],
  "properties": {
    "readme": {
      "$ref": "#/$defs/Readme"
    },
    "plans": {
      "$ref": "#/$defs/Plans"
    },
    "adrs": {
      "$ref": "#/$defs/Adrs"
    }
  },
  "$defs": {
    "Readme": {
      "description": "The usage documentation of the repository, at README.md",
      "type": "object"
    },
    "Plans": {
      "description": "The plans, one directory per problem, under docs/plans",
      "type": "array"
    },
    "Adrs": {
      "description": "The Architecture Decision Records, which together form the Architectural Direction, under docs/adrs",
      "type": "array",
      "items": {
        "$ref": "adr.schema.json"
      }
    }
  },
  "examples": [
    {
      "readme": {},
      "plans": [],
      "adrs": []
    }
  ]
}
