{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://studybrave.com/schemas/route/0.1.0.json",
  "title": "Route",
  "description": "Artifact produced by P-003. A ninety-day route: one capability, one artifact, one proof.",
  "type": "object",
  "required": [
    "artifact_type",
    "protocol",
    "version",
    "selection",
    "artifact",
    "proof",
    "route",
    "budget",
    "kill_conditions"
  ],
  "additionalProperties": false,
  "properties": {
    "artifact_type": {
      "const": "route"
    },
    "protocol": {
      "const": "P-003"
    },
    "version": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+\\.\\d+$"
    },
    "started_at": {
      "type": "string",
      "description": "ISO 8601. Supplied by the runtime, not the model."
    },
    "adversary_mode": {
      "type": "boolean",
      "default": false
    },
    "selection": {
      "type": "object",
      "required": [
        "capability",
        "tier_from",
        "tier_to"
      ],
      "additionalProperties": false,
      "properties": {
        "capability": {
          "type": "string",
          "description": "Exactly one. Two capabilities is a route for neither."
        },
        "tier_from": {
          "type": "string",
          "enum": [
            "claimed",
            "studied",
            "practised"
          ]
        },
        "tier_to": {
          "type": "string",
          "enum": [
            "studied",
            "practised",
            "demonstrated"
          ]
        },
        "appears_in_avoided": {
          "type": "boolean",
          "description": "True if this capability was listed in the Self Map's wanted_but_avoided."
        },
        "adjacency_check": {
          "type": "string",
          "description": "The agent's assessment of whether this is the comfortable neighbour of the real target, and the subject's answer."
        },
        "predicted_stall_point": {
          "type": "string",
          "description": "Where the Self Map's abandonment_signature predicts this will stop, if a signature exists."
        }
      }
    },
    "artifact": {
      "type": "object",
      "required": [
        "what",
        "inspectable_by_others",
        "minimum_viable_form"
      ],
      "additionalProperties": false,
      "properties": {
        "what": {
          "type": "string",
          "description": "A noun. Not 'improved skills'."
        },
        "inspectable_by_others": {
          "type": "boolean",
          "description": "Must be true. Unjudged work cannot reach the demonstrated tier."
        },
        "scope": {
          "type": "string",
          "description": "Concrete enough that 'finished' is unambiguous on day ninety."
        },
        "minimum_viable_form": {
          "type": "string",
          "description": "The smallest version that still counts. The difference between a hard quarter and a failed one."
        }
      }
    },
    "proof": {
      "type": "object",
      "required": [
        "person",
        "question",
        "when",
        "agreed"
      ],
      "additionalProperties": false,
      "properties": {
        "person": {
          "type": "string",
          "description": "An identifiable person. Not 'the community', not 'employers'."
        },
        "relationship": {
          "type": "string"
        },
        "question": {
          "type": "string",
          "description": "Specific. 'What do you think' produces nothing usable."
        },
        "when": {
          "type": "string",
          "description": "A date inside the ninety days."
        },
        "agreed": {
          "type": "boolean"
        },
        "securing_agreement_is_checkpoint_1": {
          "type": "boolean"
        }
      }
    },
    "route": {
      "type": "object",
      "required": [
        "day_30",
        "day_60",
        "day_90"
      ],
      "additionalProperties": false,
      "properties": {
        "day_30": {
          "$ref": "#/definitions/checkpoint"
        },
        "day_60": {
          "$ref": "#/definitions/checkpoint"
        },
        "day_90": {
          "$ref": "#/definitions/checkpoint"
        }
      }
    },
    "budget": {
      "type": "object",
      "required": [
        "available_minutes",
        "estimated_minutes",
        "time_ratio",
        "adjusted_minutes",
        "fits"
      ],
      "additionalProperties": false,
      "properties": {
        "available_minutes": {
          "type": "number",
          "minimum": 0,
          "description": "hours_per_week from the Self Map, times 13, minus lost weeks."
        },
        "lost_weeks_allowance": {
          "type": "number",
          "description": "Weeks expected lost, taken from the subject's last thirteen, not from a default."
        },
        "estimated_minutes": {
          "type": "number",
          "minimum": 0,
          "description": "The subject's own estimate."
        },
        "time_ratio": {
          "type": "number",
          "minimum": 0,
          "description": "Median from P-002. The measured one, not a revised one."
        },
        "budget_basis": {
          "type": "string",
          "enum": [
            "measured",
            "estimated"
          ],
          "description": "'estimated' when fewer than six Reckonings exist. The route is then built on a wish, and says so."
        },
        "adjusted_minutes": {
          "type": "number",
          "description": "estimated_minutes times time_ratio."
        },
        "fits": {
          "type": "boolean"
        },
        "scope_cut_to_minimum": {
          "type": "boolean"
        }
      }
    },
    "kill_conditions": {
      "type": "array",
      "minItems": 3,
      "description": "Written on day zero. Not revisable after day thirty.",
      "items": {
        "type": "object",
        "required": [
          "condition",
          "type",
          "falsifiable"
        ],
        "additionalProperties": false,
        "properties": {
          "condition": {
            "type": "string",
            "description": "Checkable by a stranger holding the record, in one look."
          },
          "type": {
            "type": "string",
            "enum": [
              "checkpoint",
              "evidence",
              "cost"
            ]
          },
          "falsifiable": {
            "type": "boolean",
            "description": "Must be true. 'If I lose motivation' is not a kill condition."
          },
          "check_on": {
            "type": "string"
          }
        }
      }
    },
    "cost_of_stopping": {
      "type": "string",
      "description": "What is concretely lost if abandoned at day 45. Usually smaller than assumed; recording it now is what makes the kill conditions usable later."
    },
    "conditions_locked_after": {
      "type": "string",
      "description": "Day 30. A kill condition editable when it triggers is not a kill condition."
    },
    "summary": {
      "type": "string",
      "description": "Short, plain. No assurance that it is achievable."
    }
  },
  "definitions": {
    "checkpoint": {
      "type": "object",
      "required": [
        "state"
      ],
      "additionalProperties": false,
      "properties": {
        "state": {
          "type": "string",
          "description": "What exists by then. A state, not an activity."
        },
        "windows": {
          "type": "string",
          "description": "Specific hours from the Self Map attention ledger."
        },
        "minutes_allocated": {
          "type": "number",
          "minimum": 0
        }
      }
    }
  }
}
