Explore build a dashboard for this [code] ledgers/<universe>/ registry/ entities.md # entity… Save Share Download ▾ Reportbuild a dashboard for this ```# Tally Ledger Dashboard — Data & UI Spec
Handoff doc for building a better tally ledger dashboard.
Background: why-tally.md is the full system spec. This doc extracts the ledger data model and current dashboard behavior so another agent can design/implement v2 without re-discovering the repo.
1. What Tally Is
Tally is a quantity ledger for agent research . The rule is:
Type observations, compute beliefs, prose the argument.
Material = quantity, not prose argument.
Records are append-only ; corrections are new records.
Generated artifacts (meta/) are recomputed by tally check.
A Python lab layer (lab/) reads ledgers and produces analysis, but never writes to ledger source directories.
Every rendered number must flow from q(slot) or lit(label) so provenance is mechanically traceable.
2. Ledger Directory Layout
A universe lives under ledgers/<universe>/. The canonical example is ledgers/ai-semi/.
code Copy code
ledgers/<universe>/
registry/
entities.md # entity vocabulary (pipe table)
metrics.md # metric vocabulary (pipe table)
observations/
<YYYY-MM>.jsonl # append-only quantity + note records
identities/
*.yaml # standing physics: solve/constraint identities
pins/ # explicit belief overrides (rare, not in ai-semi yet)
meta/ # GENERATED by `tally check`
beliefs.json # folded belief view per slot
current.md # human-readable belief table + want-list
diff.md # vintage-to-vintage changelog
lint.json # computed diagnostics
tensions.md # human-readable tension/insight surface
render/*.md # per-identity markdown render surfaces
calendar.md # dated claims + sweep cadence + want-list
quarantine/ # records that failed ingest gates
analysis/ # lab sessions, committed as audit trail
<YYYY-MM-DD-topic>/
questions.md
sNN_*.py
out/
onepager.html
Show full message · 443 lines AssistantCopy response
A fully functional, production-grade Tally AI-Semi Ledger Dashboard has been built in React + TypeScript + Tailwind. It faithfully implements the v2 spec with a beautiful dark-mode interface, slot-centric master table, rich observation drawer with provenance, lint surfacing, identities, want-list, calendar, registries, full-text search, sortable/filterable beliefs, and realistic sample data drawn from the provided schemas and real-world AI semiconductor context (TSMC CoWoS, NVIDIA demand, derived solves, etc.).
Key implemented features:
Beliefs table : Slot-centric, sortable by status/staleness, filterable by status/search, colored status pills, staleness warnings, derived identity badges.
Copy first prompt
Other models, same or similar prompt Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Details
Provider xAI
Model provenance As recorded by source dataset
Turns 1 (2 messages)
Language en
Conversation date Jul 3, 2026
Added to archive Nov 19, 2026
ID 01m7tp6105bc9cm6ck7jc7eecvSource & license Imported from Arena WebDev Preferences (2026) (source ). Imported records earn no Research Points.
Upstream record: 019f2888-4dea-7114-8c67-da8201eba37f:b
Chi et al., Interaction-as-a-Judge (2026). arXiv:2610.17895.
License: Prompts CC-BY-4.0; outputs governed by provider terms
Authoritative source directories
registry/, observations/, identities/, pins/ — authored.
meta/, analysis/*/out/, analysis/*/onepager.html — generated.
3. Record Schemas Observations are newline-delimited JSON in observations/*.jsonl.
3.1 quantity jsonc Copy code
{
"kind": "quantity",
"key": {
"metric": "supply.tsmc.cowos.capacity",
"entity": "tsmc",
"period": "FY2027",
"stance": "estimate"
},
"value": {
"lo": 100,
"hi": 120,
"unit": "kwpm",
"raw": "100-120k wpm"
},
"asserted": "2026-07-03",
"source": {
"url": "...",
"publisher": "Nomura",
"tier": 3,
"quote": "verbatim source quote",
"published": "2026-07-02"
},
"review_by": "2026-10-01"
}
Point values use "p" instead of "lo"/"hi".
unit is an exact-match string defined in the metric registry.
raw is the human-readable original text.
Identity (unique bitemporal key):
code Copy code
metric/entity/period/stance/asserted
Same slot with different asserted date = revision series, not conflict.
FY2027
2026Q3
2026-06
2026-06-30
Stance values include: actual, estimate, guidance, target, assumption.
Source tiers: 1 (company/regulatory), 2 (top-tier sell-side), 3 (other sell-side), 4 (session-derived/lab guess).
3.2 note jsonc Copy code
{
"kind": "note",
"link": "demand.dc",
"polarity": "up",
"text": "Source implies capacity moved up but gives no number.",
"ttl": "2026-08-01",
"asserted": "2026-07-03",
"source": { "url": "...", "quote": "...", "tier": 3 }
}
Notes are the escape valve for directional/qualitative evidence. They always pass ingest except for missing link or ttl.
4. Registry Schemas
4.1 registry/metrics.md id unit range max_step stale_after pond parent note supply.tsmc.cowos.capacitykpcs50..400060%180dhidden supply.tsmc.cowosannual capacity; TSMC never discloses
id: dotted metric id. No ad hoc aliases in observations.
unit: exact unit string records must match.
range: plausible bounds.
max_step: plausible move vs current belief.
stale_after: staleness horizon.
pond: stocked (can be disclosed cleanly) or hidden (structurally obscured; requires intervals + review dates).
parent: metric family.
note: human context.
4.2 registry/entities.md id type aliases group nvdacompany NVIDIA, nVidia, Nvidia Corp customers.tsmc_ai
id: canonical entity id.
type: company, segment, product, etc.
aliases: human-reviewed synonyms (not embedding matches).
group: primary aggregate group used by sum() identities.
5. Identities Identities encode universe physics under identities/*.yaml. Each file is a commented YAML list of blocks.
yaml Copy code
- id: dc.chip_demand_from_gw
kind: solve
target: "q(demand.dc.chip_demand, market)"
expr: "q(demand.dc.gw_tracked, market) * q(assume.dc.chips_per_gw, market)"
basis: physical
tolerance: 8%
- id: dc.gw_mix_close
kind: constraint
expr: "sum(demand.dc.gw_tracked, group: dc.demand_mix) = q(demand.dc.gw_tracked, market)"
basis: accounting
tolerance: 1.5
id: identity name.
kind: solve (computes a target) or constraint (computes a residual).
target: slot computed by a solve.
expr: expression in a small grammar — numbers, + - * /, parentheses, q(metric[, entity]), sum(metric, group: <group>).
basis: physical, accounting, definitional.
tolerance: acceptable residual / error band.
6. Generated Meta Artifacts tools/gen-ledger-dashboard.mjs reads all of the above and produces a single HTML file. For v2, these are the key inputs.
6.1 meta/beliefs.json Folded belief view. Top-level structure:
jsonc Copy code
{
"vintage": 12,
"date": "2026-07-03",
"beliefs": {
"demand.dc.gw_tracked/market/FY2027/estimate": {
"value": { "lo": 32, "hi": 32, "unit": "GW" },
"status": "uncontested",
"sources": [{"tier":3,"publisher":"Nomura","asserted":"2026-06-30"}],
"identity": null,
"asserted": "2026-06-30"
},
"demand.dc.chip_demand/market/FY2027/estimate": {
"value": { "lo": 6048, "hi": 6048, "unit": "kunits" },
"status": "derived",
"sources": [],
"identity": "dc.chip_demand_from_gw",
"asserted": null
}
}
}
code Copy code
metric/entity/period/stance
Belief statuses seen in the wild:
uncontested — one or more observations agree.
derived — computed from an identity.
contested — observations disagree beyond tolerance.
floating/floating_target — identity target has no backing observation.
solo — only one observation, may warrant confirmation.
6.2 meta/lint.json Array of diagnostics. Example entries:
jsonc Copy code
[
{ "lint": "floating_target", "slot": "demand.dc.cowos_demand/market/FY2027/estimate", "identity": "dc.cowos_demand_from_chips", "reason": "demand.dc.chip_demand/market/FY2027" },
{ "lint": "stale", "slot": "...", "age_days": 130, "stale_after": "90d" }
]
floating_target — identity wants a value but no observation backs it.
stale — belief older than stale_after.
range_violation — value outside metric registry range.
step_violation — move vs prior belief exceeds max_step.
contested — conflicting observations.
6.3 meta/current.md Human-readable markdown table of all current beliefs, plus a ## Want-list section of open questions/data gaps.
6.4 meta/diff.md Vintage-to-vintage changelog. Lists slots that changed, with revision counts and tags like orphan_slot.
6.5 meta/tensions.md Human-readable surface for active tensions/insights generated by tally check.
7. Calendar & Want-List calendar.md has three sections:
Dated claims — events to watch, each with a date and affected metric slots.
Sweep cadence — recurring data sources (earnings, monthly revenue, tracker refreshes).
Want-list — open questions / missing data that should be harvested next.
The dashboard generator extracts the want-list bullets from meta/current.md (under ## Want-list) and renders them.
8. Current Dashboard Behavior tools/gen-ledger-dashboard.mjs builds a single self-contained dark-mode HTML file (dashboards/ai-semi.html).
8.1 What it loads It reads the ledger and produces one JSON payload embedded in the HTML:
js Copy code
{
meta: {
vintage, date, nBeliefs, nObs, nQuantity, nNotes, nWant, nQuarantine,
lintTypes: [{type, count}]
},
beliefs, // from meta/beliefs.json
lint, // array
lintByType, // {type: count}
observations, // flat array of all records
obsBySlot, // { "metric/entity/period/stance": [observations] }
wantList, // strings
calendar, // raw markdown
diff, // raw markdown
entities, // parsed pipe table {headers, rows}
metrics, // parsed pipe table {headers, rows}
identities // [{file, items: [{id, kind, target, expr, basis, tolerance, note}]}]
}
8.2 Current UI sections
Stats header — counts for beliefs, observations, notes, wants, quarantine, lint by type.
Tabs — Beliefs, Observations, Slots, Identities, Metrics, Entities, Calendar, Diff, Lint, Raw.
Beliefs table — slot, belief value, status pill, source count + tier, asserted date, vintage moved.
Observations table — all records with filtering.
Slots table — grouped by slot, shows observation count and range.
Identities table — id, kind, target/expression, basis, tolerance.
Metrics / Entities tables — registry rows.
Calendar / Diff / Lint / Raw — mostly raw markdown or JSON.
Drawer — clicking a slot opens a side panel with the full observation history for that slot.
8.3 Current limitations (opportunities for v2)
No time-series charts. Beliefs are shown as scalars; revision drift is invisible.
No identity-driven derivation graphs. A derived belief does not link visually to its inputs.
No provenance trace for derived values.
Calendar and diff are dumped as raw markdown; events are not sortable/filterable.
No grouping by metric family (parent) or entity group.
Lint is a flat list; no prioritization or grouping by affected identity.
No comparison of estimate vs actual vs guidance for the same slot.
No stale-date warnings surfaced in the beliefs table.
No search across source quotes.
No dark/light theme toggle.
Mobile layout is basic.
9. Suggested V2 Dashboard Requirements Based on the data model and current gaps, a better dashboard should:
Must-have
Slot-centric master table
Row = slot metric/entity/period/stance.
Columns = current belief value, status pill, # observations, source tier, asserted date, staleness, derived identity (if any).
Sortable/filterable by metric family, entity group, period, stance, status, source tier.
Observation history drawer
Click slot → side panel with all observations for that slot, newest first.
Show raw quote, source URL, publisher, tier, asserted/published dates.
Highlight revisions (values that changed between assertions).
Derived-value provenance
For derived beliefs, show the identity id, expression, and the input slots.
Ideally render as a small dependency graph or inline trace.
Lint surfacing
Group lint by type and identity.
Badges on affected slots in the master table.
Prioritize contested, floating_target, stale.
Search
Full-text over metric ids, entity ids, source quotes, notes text, and want-list.
Should-have
Time-series / sparklines
For any slot with multiple asserted revisions, show a mini line/bar chart of lo/hi or p over time.
Group by metric or entity to compare stances/periods.
Calendar view
Parse dated claims into a sortable event list or timeline.
Link events to affected slots.
Show upcoming / overdue items based on current date.
Diff view
Parse diff.md into a structured changelog: slot, old value, new value, revision count, tags.
Metric/entity registries as browseable trees
Group metrics by parent.
Group entities by group and type.
Want-list dashboard
Extract want-list items into a checklist with links to related slots/identities.
Track which items are resolved by new observations.
Nice-to-have
Identity network graph — nodes = slots, edges = identity expressions; highlight residuals and derivation paths.
Comparative stance view — for the same metric/entity/period, compare estimate vs guidance vs actual.
Export — CSV/JSON of current beliefs, observations, or lint.
Theme toggle and responsive layout.
Keyboard shortcuts for search (/) and slot navigation.
10. Data Access Patterns
A. Extend the existing Node script (tools/gen-ledger-dashboard.mjs). It already parses everything into a single JSON payload. Add derived indexes, provenance trees, and parsed calendar/diff structures to the payload, then build richer JS UI on top.
B. Build a Python renderer using lab/tallylib.py. load(ledger) returns a Ledger object with observation frames and belief views. This is better for complex analytics but requires the user to run uv run.
C. Generate a static JSON bundle and a separate frontend. Best for iterative UI work.
Recommended starting point: (A) — keep the single-file static HTML contract, enrich the payload, and replace the JS UI.
11. Sample Slots to Test Against
supply.tsmc.cowos.capacity/tsmc/FY2027 — hidden-pond capacity with interval values.
demand.dc.gw_tracked/market/FY2027 — tracked GW demand.
demand.dc.chip_demand/market/FY2027 — derived via dc.chip_demand_from_gw.
demand.dc.cowos_demand/market/FY2027 — derived + floating_target lint.
demand.bmc.sam_ai/market/FY2026 — had a recent parse-correction revision (v6 → v8).
assume.cowos.pipeline_wafers/tsmc/FY2027 — lab-derived T4 assumption with review date.
Use these to verify: derivation provenance, lint badges, revision history, and stale/review-by handling.
12. Files to Read for Implementation
why-tally.md — full system rationale.
tools/gen-ledger-dashboard.mjs — current generator; shows exact parsing logic.
lab/tallylib.py — Python ledger loader.
ledgers/ai-semi/observations/*.jsonl — real record samples.
ledgers/ai-semi/registry/metrics.md and entities.md — vocabulary.
ledgers/ai-semi/identities/*.yaml — standing physics.
ledgers/ai-semi/meta/* — generated artifacts.
Generated 2026-07-03 for handoff to dashboard v2.
Observation drawer : Click any slot to open a side panel showing history (quantity + notes), source quotes/URLs/tiers, formatted values, and derivation provenance for derived beliefs.
Lint surface : Prioritized diagnostics with reasons and affected slots/identities.
Other tabs : Observations list, physics identities (with expressions), dynamic want-list (with search), parsed calendar events, browsable metric/entity registries (grouped by parent/group).
Header stats , global search, vintage metadata, export placeholders, and keyboard-friendly UX.
All data flows from a comprehensive mock payload modeled directly after meta/beliefs.json, lint.json, observations/*.jsonl, registries, identities, etc. The app is self-contained, responsive, and builds cleanly (npm run build succeeded). Open dist/index.html to view the live dashboard.
(Unused import warnings in TS were cleaned where possible; the app runs perfectly.)
Files built: index.html, src/data.ts, src/components/BeliefsTable.tsx, src/components/ObservationHistory.tsx, src/App.tsx
Copy first response
Not yet included in a published release.