{
  "handle": "ComputeBudget",
  "mechanism": "The cognitive governor that prevents analysis paralysis. It acts as a dual-ledger {{gate}}, weighing the {{value}} of a {{task}} against the {{budget}} to ensure return on investment (ROI). It enforces stopping rules when the cost of thinking exceeds the value of the solution.",
  "gloss": "Economic governor for cognitive spend",
  "failure_modes": [
    "Analysis Paralysis: Spending more on estimation than the task is worth.",
    "Penny Wise: Rejecting necessary deep thinking for high-stakes/high-complexity problems.",
    "Cost estimation is itself costly (meta-cost problem).",
    "Uncertainty about uncertainty makes expected_gain hard to calculate.",
    "Risk of penny-wise pound-foolish: refusing decomposition on hard problems because estimate was wrong."
  ],
  "invariants": [
    "Hard ceiling: total execution cost cannot exceed `max_budget`."
  ],
  "preconditions": [
    "Current resource balance available",
    "{{task}} value estimated"
  ],
  "postconditions": [
    "Budget constraints injected into {{task}} context",
    "Execution strategy Selected (Direct vs Recursive)"
  ],
  "parameters": [
    {
      "name": "max_budget",
      "type": "PositiveInteger",
      "range": "unspecified",
      "description": "The ceiling, in `unit`. Deliberately uncapped."
    },
    {
      "name": "roi_threshold",
      "type": "Float",
      "range": "[0.1, 2.0]",
      "description": "Expected value required per unit spent before work proceeds. Scales how demanding the gate is; it does not license spending past the ceiling."
    },
    {
      "name": "estimation_share",
      "type": "Ratio",
      "range": "(0.0, 0.5]",
      "description": "Share of the budget estimation may consume before it must return."
    },
    {
      "name": "unit",
      "type": "Enum",
      "range": "{Tokens, USD, Ms}",
      "description": "Cost unit"
    }
  ],
  "_meta": {
    "tier": 1,
    "ring": 0,
    "related": [
      "OptimalStop",
      "Satisfice",
      "TimeboxThink"
    ],
    "supersedes": [
      "sema:ComputeBudget#mh:SHA-256:3b9875661465a1a0cdc12e60774114d0ac69510b4fae677c81c47ea3a84b99b1",
      "sema:ComputeBudget#mh:SHA-256:47c6eb12f7537f418cdfa9358a501b394d3b4460dd2f8c85560687b1e782b8c2"
    ],
    "path": [
      "Mind",
      "Strategy"
    ]
  },
  "sema_ref": "ComputeBudget#4091",
  "sema_id": "sema:ComputeBudget#mh:SHA-256:4091ac7c6677342920dc53808d02830e35c5849f2af1bb9ba7749c576d37478e",
  "sema_stub": "4091",
  "dependencies": {
    "references": {
      "budget": "sema:Budget#mh:SHA-256:4e3e536c9ecec8c1b0af017cfd0a26ba00e9f96047de4a690bf9d3db7f3720ef",
      "gate": "sema:Gate#mh:SHA-256:664dd801873a87e8aa3d67499e27e7c47923d5c0cdd129af6c09a7531ed7de15",
      "task": "sema:Task#mh:SHA-256:a85010f508f85055170c396c8fa390125c1206888c565ac10651f3969a339f8d",
      "value": "sema:Value#mh:SHA-256:37fd75758d04cdd7f57a636ccb5394d463713d60c33b694e37ab71f4a5a896f8"
    }
  },
  "sema_layer": "Mind",
  "sema_category": "Strategy",
  "used_by": {
    "references": {
      "Bid": "sema:Bid#mh:SHA-256:647f5a901a75ad0c5535dd1a16a2e2eb1f4295d88e55b592f101ea393c9d23b1",
      "EpistemicROI": "sema:EpistemicROI#mh:SHA-256:b0d863d10c0d67edc218444b72c75f05127b899af6ac0295899b6506cba9acc7",
      "Reason": "sema:Reason#mh:SHA-256:81ec8196c7c1c761fe353c8d26463bcb61b54f844aa3422a40019f82ef202321",
      "StrategicReading": "sema:StrategicReading#mh:SHA-256:b5d55501ddb51aa919170851ca51a337ae3b7bb29fd941190db809487e2b028c"
    },
    "composes_with": {
      "OptimisticSolver": "sema:OptimisticSolver#mh:SHA-256:63aaa2e083c615a967019ce3aa709f431ff624aafce8b90ed6229144c102fda8",
      "PolymorphicSolver": "sema:PolymorphicSolver#mh:SHA-256:f7fe4635a7520f918c823f0047d6fed8e38fd820c1970ef4623cc8fd78d2b0bd"
    }
  }
}
