{
  "id": "devops/kubectl-describe",
  "family": "kubernetes-describe",
  "description": "Compact kubectl describe output while preserving metadata, status, events, and failures.",
  "match": {
    "toolNames": ["exec"],
    "argv0": ["kubectl"],
    "argvIncludes": [["describe"]]
  },
  "transforms": {
    "stripAnsi": true,
    "dedupeAdjacent": true,
    "trimEmptyEdges": true
  },
  "filters": {
    "keepPatterns": [
      "^(Name|Namespace|Priority|Node|Status|IP|Controlled By|Containers|Conditions|Events):",
      "^\\s*(Type|Reason|Age|From|Message)\\s+",
      "error|warn|failed|back-off|crashloop|unhealthy|timeout",
      "^\\s*Warning\\s+",
      "^\\s*Normal\\s+"
    ]
  },
  "summarize": {
    "head": 10,
    "tail": 8
  },
  "failure": {
    "preserveOnFailure": true,
    "head": 12,
    "tail": 12
  },
  "counters": [
    {
      "name": "warning",
      "pattern": "warning|back-off|failed|unhealthy",
      "flags": "i"
    },
    {
      "name": "event",
      "pattern": "^\\s*(Warning|Normal)\\s+",
      "flags": "m"
    }
  ]
}
