Make a dashboard
Dashboards here are single HTML files: inline CSS, an inlined DATA object,
and the tiny chart helper already inside the template. They open in any
browser with no build step, CDN, or platform dependency. That's the
contract; never break it by adding external references.
Procedure
- Get the numbers right first. Source everything from
data/ snapshots
(pull fresh ones per AGENTS.md "Answering questions from data" if
needed), interpreted through data/ontology/. A dashboard is a report, so
the same "never invent a number" rule applies.
- Copy
reports/_templates/dashboard.html to the folder of the report
it supports (reports/qmr/<q>/, reports/recurring/<domain>/, or
reports/adhoc/YYYY-MM-DD-<question>/). A dashboard never lives alone;
if there's no report yet, create one from reports/_templates/report.md.
- Fill it in: title, date, the
DATA object, and the render calls;
the template documents its own helpers (bigNumber, barChart,
lineChart, table) with examples. Apply brand/tokens.json colors if
filled. Keep it to the few views that answer the question; a dashboard
with twenty charts answers nothing. Then remove data-example="replace"
from the <html> tag and the example line from the footer: the check
refuses a dashboard that still carries the template's numbers.
- List sources: the footer's data-sources line gets the exact snapshot
paths used, same as a report's "Data used" section.
BI mode
With a warehouse-bi integration wired (the Wired table in
integrations/README.md), also write a spec the team can build in its BI
tool: one section per dashboard in memory/knowledge/dashboards.md, created the first time and updated in place later.
Each section lists the metrics by their data/ontology/metrics.md names,
the filters (period, segment, channel), and for every metric the snapshot
and column it comes from today, so the warehouse model maps to the same
definitions. Never build in the BI tool itself: the spec is the proposal,
and a person builds it or approves it.
Rules
- One file, no external requests: check you added no
<script src>,
<link>, or web-font references.
- Charts label their units and time ranges; deltas say what they're deltas
against.
1---2name: make-dashboard3description: Turn data into a self-contained HTML dashboard beside its report, or a spec for the team's BI tool. Use when asked for a dashboard, chart or visual view, or when a report's answer is too multidimensional for prose.4license: MIT5---67# Make a dashboard89Dashboards here are single HTML files: inline CSS, an inlined `DATA` object,10and the tiny chart helper already inside the template. They open in any11browser with no build step, CDN, or platform dependency. That's the12contract; never break it by adding external references.1314## Procedure15161. **Get the numbers right first.** Source everything from `data/` snapshots17 (pull fresh ones per AGENTS.md "Answering questions from data" if18 needed), interpreted through `data/ontology/`. A dashboard is a report, so19 the same "never invent a number" rule applies.202. **Copy `reports/_templates/dashboard.html`** to the folder of the report21 it supports (`reports/qmr/<q>/`, `reports/recurring/<domain>/`, or22 `reports/adhoc/YYYY-MM-DD-<question>/`). A dashboard never lives alone;23 if there's no report yet, create one from `reports/_templates/report.md`.243. **Fill it in**: title, date, the `DATA` object, and the render calls;25 the template documents its own helpers (`bigNumber`, `barChart`,26 `lineChart`, `table`) with examples. Apply `brand/tokens.json` colors if27 filled. Keep it to the few views that answer the question; a dashboard28 with twenty charts answers nothing. Then remove `data-example="replace"`29 from the `<html>` tag and the example line from the footer: the check30 refuses a dashboard that still carries the template's numbers.314. **List sources**: the footer's data-sources line gets the exact snapshot32 paths used, same as a report's "Data used" section.3334## BI mode3536With a `warehouse-bi` integration wired (the Wired table in37`integrations/README.md`), also write a spec the team can build in its BI38tool: one section per dashboard in `memory/knowledge/dashboards.md`, created the first time and updated in place later.39Each section lists the metrics by their `data/ontology/metrics.md` names,40the filters (period, segment, channel), and for every metric the snapshot41and column it comes from today, so the warehouse model maps to the same42definitions. Never build in the BI tool itself: the spec is the proposal,43and a person builds it or approves it.4445## Rules4647- One file, no external requests: check you added no `<script src>`,48 `<link>`, or web-font references.49- Charts label their units and time ranges; deltas say what they're deltas50 against.