{
  "$id": "https://lanekeeper.dev/schema/config.json",
  "title": "Lanekeeper configuration (.lanekeeper/config.yml)",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "base": {
      "description": "Branch lanes are compared against. Auto-detected (origin/HEAD, then origin/main, …) when unset.",
      "type": "string"
    },
    "mode": {
      "default": "warn",
      "description": "warn: tell agents about clashes. block: deny edits that would create a high-severity clash.",
      "type": "string",
      "enum": [
        "warn",
        "block"
      ]
    },
    "languages": {
      "default": "auto",
      "description": "Reserved: every supported language is analyzed today, whatever this says.",
      "anyOf": [
        {
          "type": "string",
          "const": "auto"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "ignore": {
      "default": [],
      "description": "Globs left out of analysis, e.g. [\"**/*.generated.ts\"].",
      "maxItems": 1000,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 512
      }
    },
    "reportThreshold": {
      "default": 0.6,
      "description": "Minimum confidence for a clash to be reported.",
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "rules": {
      "default": {},
      "description": "Per-rule overrides by rule id (R1–R9): enabled, severity. R10 comes from CI and isn't affected.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "enum": [
          "R1",
          "R2",
          "R3",
          "R4",
          "R5",
          "R6",
          "R7",
          "R8",
          "R9",
          "R10"
        ]
      },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "enabled": {
            "default": true,
            "type": "boolean"
          },
          "severity": {
            "type": "string",
            "enum": [
              "info",
              "warn",
              "high"
            ]
          }
        },
        "additionalProperties": false
      }
    },
    "claims": {
      "default": {},
      "type": "object",
      "properties": {
        "defaultTtl": {
          "default": "30m",
          "description": "How long a claim lasts unless renewed by edits.",
          "type": "string",
          "pattern": "^(\\d+)(ms|s|m|h|d)?$"
        }
      },
      "additionalProperties": false
    },
    "daemon": {
      "default": {},
      "type": "object",
      "properties": {
        "idleTimeout": {
          "default": "30m",
          "description": "The daemon stops after this long without activity.",
          "type": "string",
          "pattern": "^(\\d+)(ms|s|m|h|d)?$"
        }
      },
      "additionalProperties": false
    },
    "ci": {
      "default": {},
      "type": "object",
      "properties": {
        "testCommand": {
          "description": "Test command for the GitHub Action's combined check.",
          "type": "string"
        },
        "buildCommand": {
          "description": "Build command for the GitHub Action's combined check.",
          "type": "string"
        },
        "maxPairs": {
          "default": 6,
          "description": "Most pull request pairs the Action builds and tests together.",
          "type": "integer",
          "minimum": 0,
          "maximum": 50
        }
      },
      "additionalProperties": false
    },
    "cost": {
      "default": {},
      "type": "object",
      "properties": {
        "pricing": {
          "default": {},
          "description": "Your rates, USD per million tokens, by model id or id prefix: { input, output, cacheRead, cacheWrite }. They replace the built-in estimates for those models.",
          "type": "object",
          "propertyNames": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "input": {
                "type": "number",
                "minimum": 0
              },
              "output": {
                "type": "number",
                "minimum": 0
              },
              "cacheRead": {
                "type": "number",
                "minimum": 0
              },
              "cacheWrite": {
                "type": "number",
                "minimum": 0
              }
            },
            "required": [
              "input",
              "output",
              "cacheRead",
              "cacheWrite"
            ],
            "additionalProperties": false
          }
        },
        "acceptReportedUsage": {
          "default": false,
          "description": "Let agents without a readable transcript report their token usage through the MCP tool lanekeeper_report_usage.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "sync": {
      "default": {},
      "type": "object",
      "properties": {
        "enabled": {
          "default": false,
          "description": "Sync lanes with your team (Team plan): with this on, linked machines (lk sync on) share their lanes.",
          "type": "boolean"
        },
        "hashedSymbols": {
          "default": false,
          "description": "Send symbol names, paths, branches and lane names hashed with the team key in .lanekeeper/sync.key (lk sync key), so the server sees only hashes. Without the key, team sync stays off rather than send plain names.",
          "type": "boolean"
        },
        "shareIntents": {
          "default": false,
          "description": "Ignored here: sharing each session's one-line intent with the team is a per-developer opt-in, read only from the clone's own .git/lanekeeper/sync.json, so a committed config can't turn it on for everyone. Off by default: intents stay local.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
