{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "now-lines.schema.json",
  "title": "Current-action lines",
  "description": "The canonical lines a run writes with `phase-tracker.sh now`, one set per phase. The tracker caps each at `cap` characters after runtime values are substituted, so a template is already too long when it exceeds the cap empty. lint-now-lines.mjs holds this file and the phase docs to each other.",
  "type": "object",
  "additionalProperties": false,
  "required": ["cap", "phases"],
  "properties": {
    "$comment": { "type": "string" },
    "cap": {
      "type": "integer",
      "minimum": 20,
      "maximum": 200,
      "description": "Characters the tracker keeps. Beyond it the line is cut, so a longer template loses its end rather than being refused."
    },
    "phases": {
      "type": "object",
      "minProperties": 1,
      "description": "Keyed by the phase id as a string, matching schemas/phases.json.",
      "propertyNames": { "pattern": "^[0-9]+$" },
      "additionalProperties": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name", "lines"],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "The phase's name, which must be the one phases.json gives it."
          },
          "lines": {
            "type": "array",
            "minItems": 1,
            "description": "What this phase says it is doing. Angle brackets mark a runtime value.",
            "items": { "type": "string", "minLength": 1 }
          }
        }
      }
    }
  }
}
