{
 "library": "bootstrap",
 "version": "0.11.0",
 "root": "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5",
 "license": null,
 "slug": "RegimeSense",
 "ref": "RegimeSense#8bba",
 "hash": "sema:RegimeSense#mh:SHA-256:8bba125c54467eac428d5257f67617a947a4041c04da0bdcb2ade774056b0e14",
 "stub": "8bba",
 "layer": "Mind",
 "type": "Inference",
 "summary": "Detecting structural breaks in reality",
 "mechanism": "An anomaly detector that continuously tracks divergence between the agent's internal model predictions and observed reality. It calculates a Regime Stability Score (RSS) as the rolling average of prediction accuracy over a window. High surprisal (low accuracy) indicates regime instability. When RSS drops below threshold, it signals that the underlying generative process has changed. It continuously monitors prediction error via DriftWatch#2913, triggering OntologyAdapt#a541 or Quorum#2a33 if the error signal crosses the regime-change threshold.",
 "invariants": [
  "Stability Break#5003: RSS below `stability_threshold` across the window signals a regime break.",
  "The RSS window is `window_size` observations, fixed in advance rather than chosen per evaluation."
 ],
 "parameters": [
  {
   "name": "stability_threshold",
   "type": "Float",
   "range": "[0.0, 1.0]",
   "description": "RSS threshold below which regime break is detected"
  },
  {
   "name": "window_size",
   "type": "Integer",
   "range": "[10, 1000]",
   "description": "Number of observations in the rolling average window"
  }
 ],
 "signature": [],
 "preconditions": [
  "Agent#e127 has a predictive model generating expectations",
  "Observations are timestamped and comparable to predictions"
 ],
 "postconditions": [
  "Alert raised if regime break detected",
  "RSS score computed for current window"
 ],
 "failure_modes": [
  "False Positives: Noise#fd12 spikes triggering unnecessary accommodations.",
  "Lag: RSS is a trailing indicator, so regime shifts are detected after-the-fact.",
  "Threshold Gaming: Setting threshold too high causes missed shifts; too low causes constant alerts."
 ],
 "domain": "",
 "caution": "",
 "sources": [],
 "name": "RegimeSense",
 "builds_on": [
  {
   "alias": "ontology_adapt",
   "relation": "references",
   "library": "bootstrap",
   "slug": "OntologyAdapt",
   "ref": "OntologyAdapt#a541",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/OntologyAdapt"
  },
  {
   "alias": "quorum",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Quorum",
   "ref": "Quorum#2a33",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Quorum"
  },
  {
   "alias": "agent",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Agent",
   "ref": "Agent#e127",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Agent"
  },
  {
   "alias": "drift_watch",
   "relation": "references",
   "library": "bootstrap",
   "slug": "DriftWatch",
   "ref": "DriftWatch#2913",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/DriftWatch"
  },
  {
   "alias": "break",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Break",
   "ref": "Break#5003",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Break"
  },
  {
   "alias": "noise",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Noise",
   "ref": "Noise#fd12",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Noise"
  }
 ],
 "related": [
  {
   "alias": null,
   "relation": "related",
   "library": "bootstrap",
   "slug": "Edgehold",
   "ref": "Edgehold#7073",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Edgehold"
  }
 ],
 "used_by": [
  {
   "slug": "Edgehold",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Edgehold"
  },
  {
   "slug": "SurprisalUpdate",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/SurprisalUpdate"
  }
 ],
 "url": "https://semahash.org/vocabularies/bootstrap/patterns/RegimeSense",
 "md_url": "https://semahash.org/vocabularies/bootstrap/patterns/RegimeSense.md",
 "library_url": "https://semahash.org/vocabularies/bootstrap"
}
