{
  "handle": "Hysteresis",
  "mechanism": "Asymmetric Thresholds: {{state}} change from A→B requires crossing threshold T_up. {{state}} change from B→A requires crossing lower threshold T_down. Gap between thresholds prevents oscillation near boundary. Thresholds fixed or adaptive. It uses a {{dampen}} effect on state transitions, requiring the signal to cross distinct upper and lower thresholds to switch modes.",
  "gloss": "Preventing oscillation via asymmetric thresholds",
  "failure_modes": [
    "Stuck {{state}}: the band is wide enough that the signal never reaches `lower_threshold` again.",
    "Chatter: the band is narrow enough that noise alone crosses both thresholds."
  ],
  "invariants": [
    "`upper_threshold` is strictly greater than `lower_threshold`.",
    "The gap between them is at most `max_gap`.",
    "A→B needs `upper_threshold` crossed; B→A needs `lower_threshold` crossed."
  ],
  "parameters": [
    {
      "name": "upper_threshold",
      "type": "Float",
      "range": "[0.0, 1.0]",
      "description": "Level the signal must exceed to switch from A to B."
    },
    {
      "name": "lower_threshold",
      "type": "Float",
      "range": "[0.0, 1.0]",
      "description": "Level the signal must fall below to switch back from B to A."
    },
    {
      "name": "max_gap",
      "type": "Float",
      "range": "(0.0, 1.0)",
      "description": "Widest permitted band between the thresholds, so the system can still return."
    }
  ],
  "_meta": {
    "tier": 2,
    "ring": 0,
    "supersedes": [
      "sema:Hysteresis#mh:SHA-256:78b01a1947793415b84de8f1883f9e3853f08e62b6647a38e51048d4ecbeb33a",
      "sema:Hysteresis#mh:SHA-256:f1dfdb23e9c63915250dc6ff0b8447d728649aa00a69a0f57b6ce9d0c6f534a7"
    ],
    "path": [
      "Infrastructure",
      "Primitives"
    ]
  },
  "sema_id": "sema:Hysteresis#mh:SHA-256:c2d174f3fa513ed81bcd5b731aa651a3e4662a671748e514d758582657a5bf9a",
  "sema_ref": "Hysteresis#c2d1",
  "sema_stub": "c2d1",
  "dependencies": {
    "references": {
      "dampen": "sema:Dampen#mh:SHA-256:c07e9b7b22cbda8523effcfd455f554578e47081f0d07bf9001e45f2a871b831",
      "state": "sema:State#mh:SHA-256:4f25e6a16ccd37dc0bc154cccc7055cb504d49daa8b712f372a425eb6c7b8cb2"
    }
  },
  "sema_layer": "Infrastructure",
  "sema_category": "Primitives",
  "used_by": {
    "references": {
      "EbbFlowSync": "sema:EbbFlowSync#mh:SHA-256:c68ee6aee66d266b40bf18152658a65d26e210aac458011629d39b131f3461f7",
      "OsmoticFilter": "sema:OsmoticFilter#mh:SHA-256:239a63d284e0676746b9ec3bd2e957eeec5d80d42e84b066e9b74f937cd5bd1e"
    }
  }
}
