# ✂ Burndown & burnup — the first of THREE report views (E41). They are the
# only views in this library the dashboard does not place: they belong to the
# optional report at surfaces/report.yaml, which nothing publishes until you
# declare it (see that file's header). A named view nobody places costs the
# bake nothing at all — that is what a view LIBRARY is for (0019).
#
# `history:` is the chart's SECOND source: instead of bucketing issues by the
# status they carry NOW, it walks the operational event log and buckets them
# by the status they carried THEN. Every word below is this format's own —
# `Status` is the column declared in format.yaml, and the three groups name
# values from its declared enum. Rename a status there and this view follows;
# invent one here and the load refuses by name.
view:
  label: Burndown
  widgets:
    - widget: chart
      label: Remaining vs completed
      note: >-
        Open issues at the end of each day (burndown) against issues that
        reached Done (burnup). The second burnup line is SCOPE — open plus
        done — so work that arrived mid-window cannot hide behind a flat
        completion curve.
      # ONE operational block. `issues` is tier: operational, so it has an
      # event log; a canonical block's history IS its git history and this
      # binding is refused on one by name.
      from: issues
      history:
        of: Status
        since: "-28d"        # -28d · -12w · -6m, or an ISO date; re-resolved
                             # against the READER's clock on a live page
        every: day           # day · week · month (UTC; weeks start Monday)
        open:      [Triage, Backlog, Todo, In Progress, In Review]
        done:      [Done]
        cancelled: [Canceled, Duplicate]
      x: { label: Day }
      series:
        - { mark: burndown, label: Remaining }
        - { mark: burnup,   label: Completed, scope: true }
