{
  "$defs": {
    "BarsSinceValueRef": {
      "additionalProperties": false,
      "description": "Completed source-frame bars since condition last held within the window, in bars.\n\nStart and event windows update after decisions: bar t sees observations through t-1.\nEntry windows update before invested decisions, include t, and reset only on opening\nfrom flat and are absent while flat. Entry windows are refused in gates and event\nstudies; entry conditions may read them, and formula sizing refuses them when their\nabsence necessarily prevents the first entry. Guarded sizing can be admitted when\nthe guard is available while flat and a branch can size before entry. Historical\naccount state is never replayed. State survives paper checkpoints. Offset is refused.\nBind leaf routes or use at; this value has no\nroute fields. Inputs join at their finest frame; coarser children read their last\ncompleted bar and retain their history and readiness.\n\nKnown gaps: a raw trailing ratchet does not reset after firing; an entry window\nincludes the whole bar of a midbar scheduled fill and only the owning entry rule\nresets it. Scale-ins and partial exits do not reset it. Scheduled rules see their\nobserved frame included.\nObserves warmup without trading; historical, routed and stateful consumption is\nrefused. Direct arithmetic and conditional consumption is supported.\nConditions admit compare, range, always_true and boolean composition over market\nvalues; cross, latch and other memoryful conditions are refused. Unknown matches\ndo not count or capture.\nAbsent until condition first holds. Start/event windows read zero on the bar after\nthe matching bar; entry windows include the current bar and read zero on that bar.",
      "properties": {
        "condition": {
          "$ref": "../defs.json#/$defs/EventAggregatePredicate"
        },
        "kind": {
          "const": "bars_since",
          "title": "Kind",
          "type": "string"
        },
        "window": {
          "$ref": "../defs.json#/$defs/Since"
        }
      },
      "required": [
        "kind",
        "condition",
        "window"
      ],
      "title": "BarsSinceValueRef",
      "type": "object"
    }
  },
  "$ref": "#/$defs/BarsSinceValueRef"
}
