Skip to content

[proof-card-redesign] Proof card visual redesign on a shared render vocabulary#319

Merged
rpatricksmith merged 9 commits into
mainfrom
feature/proof-card-redesign
Jun 9, 2026
Merged

[proof-card-redesign] Proof card visual redesign on a shared render vocabulary#319
rpatricksmith merged 9 commits into
mainfrom
feature/proof-card-redesign

Conversation

@rpatricksmith

Copy link
Copy Markdown
Collaborator

Anatomia Proof — Proof card visual redesign on a shared render vocabulary

PASS · 31/31 assertions satisfied · 13/16 ACs met · 0 deviations

Contract Compliance

ID Says Status
A001 The render module provides all six building blocks the cards are built from ✅ SATISFIED
A002 A section divider shows its label and fills the line to a fixed width ✅ SATISFIED
A003 A section divider can show a summary aligned to the right edge ✅ SATISFIED
A004 The header box keeps its established width so existing cards stay stable ✅ SATISFIED
A005 The header box can render rounded corners for the proof card ✅ SATISFIED
A006 The header box renders square corners by default so the health card is unchanged ✅ SATISFIED
A007 Labelled rows line their values up into a clean column ✅ SATISFIED
A008 Number columns in the stat grid line up on their right edge ✅ SATISFIED
A009 An over-long cell is trimmed so it never breaks the grid's alignment ✅ SATISFIED
A010 The proportion bar falls back to plain ASCII characters when block glyphs are off ✅ SATISFIED
A011 Each verification status maps to its own status symbol ✅ SATISFIED
A012 The proof card shows the verdict prominently in its header ✅ SATISFIED
A013 Every section of the card is introduced by an inset divider rule ✅ SATISFIED
A014 The Contract section summarises how many assertions were satisfied ✅ SATISFIED
A015 Passing assertions are summarised in one line rather than listed individually ✅ SATISFIED
A016 A failed assertion is always shown in full with its plain-English statement ✅ SATISFIED
A017 A deviated assertion is shown with the detail of how it deviated ✅ SATISFIED
A018 The Findings section leads with a count of issues by severity ✅ SATISFIED
A019 When findings overflow the list, the card points to the full data instead of a dead end ✅ SATISFIED
A020 The card never trails off with a bare 'and N more' ✅ SATISFIED
A021 The cost breakdown shows cached tokens, so each session's cost reconciles ✅ SATISFIED
A022 The cost breakdown shows input and output tokens per session ✅ SATISFIED
A023 The cost breakdown ends with a clearly separated total and the price-table version ✅ SATISFIED
A024 Whether the build is complete is stated on one line ✅ SATISFIED
A025 The whole card fits within a standard 80-column terminal ✅ SATISFIED
A026 An unpriced model is shown honestly as not-available, never as free ✅ SATISFIED
A027 The card lays out correctly with color disabled, so layout never depends on color ✅ SATISFIED
A028 The machine-readable JSON output is unchanged by this visual redesign ✅ SATISFIED
A029 The card without a provenance section still reads as a finished receipt ✅ SATISFIED
A030 A card with many agent sessions stays aligned ✅ SATISFIED
A031 A failing card shows its failed and deviated assertions in full ✅ SATISFIED

Generated by Anatomia · Ship with proof.

Summary

  • Introduces utils/render.ts, a shared, pure terminal-render vocabulary (six primitives + lifted helpers) that the proof, scan, and health cards can converge on instead of each re-deriving box/section/grid/glyph logic.
  • Rebuilds the ana proof <slug> human card on those primitives: rounded header with verdict and cost, inset section rules with roll-ups, a contract proportion bar, collapsed passing assertions with failures/deviations shown in full, and a Provenance grid with input/output/cache tokens per session and a separated TOTAL.
  • Credibility: unpriced sessions render n/a, and an entirely-unpriced run now shows an n/a TOTAL rather than a misleading $0.00 — a real future trigger is a new model id missing from pricing.ts.
  • ana proof health adopts the shared header primitive with square corners, leaving its output byte-identical; the --json render path is untouched.
  • Golden snapshot tests are pinned to UTC so they are deterministic in CI while the product keeps rendering local time for users.

Pipeline Artifacts

  • Scope: .ana/plans/active/proof-card-redesign/scope.md
  • Spec: .ana/plans/active/proof-card-redesign/spec.md
  • Build Report: .ana/plans/active/proof-card-redesign/build_report.md
  • Verify Report: .ana/plans/active/proof-card-redesign/verify_report.md

Verification

  • Result: PASS
  • Phases: 1 verified
  • Tests: See verify report

Co-authored-by: Ana build@anatomia.dev

rpatricksmith and others added 9 commits June 9, 2026 02:09
…+ primitive tests

Six pure terminal-render primitives (headerBox, sectionRule, keyValueRows,
statGrid, proportionBar, statusGlyph) plus lifted formatTokenCount, columnWidth,
BOX, and a visibleWidth/truncateCell pair for ANSI-safe alignment. 23 unit tests.

Co-authored-by: Ana <build@anatomia.dev>
… header adopts headerBox

formatHumanReadable is reconstructed entirely on utils/render: rounded headerBox
headline (verdict · feature) with surface · duration[ · cost] subtitle; inset
sectionRules with roll-ups; a contract proportionBar + collapsed counted line
with UNSATISFIED/DEVIATED (and the folded-in Deviations detail) rendered
individually; Findings/Build Concerns via one shared severity-list helper with an
actionable --json overflow; and a Provenance statGrid surfacing in/out/cache
tokens with a TOTAL footer under a rule. formatHealthDisplay adopts headerBox with
default (square) corners -> byte-identical. Duplicated BOX/getStatusIcon/
formatTokenCount/columnWidth/SEVERITY_ORDER-sort removed. Adds golden snapshots
across five fixtures; updates the format assertions broken by the redesign.

Co-authored-by: Ana <build@anatomia.dev>
…ns unchanged

Co-authored-by: Ana <build@anatomia.dev>
Co-authored-by: Ana <build@anatomia.dev>
Co-authored-by: Ana <build@anatomia.dev>
…ass in CI

The card renders its header timestamp in local time (correct UX for a CLI
receipt). The golden snapshots were captured in the author's zone (MDT), so
under CI's UTC the timestamp shifted (16:40 -> 22:40) and all 5 snapshots failed
deterministically. Pin process.env.TZ=UTC for the golden suite (restored in
afterAll) and regenerate the snapshots so they match on every runner while the
product keeps rendering local time for real users.

Fixes A029/A030/A031, AC10.

Co-authored-by: Ana <build@anatomia.dev>
…d/Codex edges

(a) The Provenance TOTAL footer rendered `$${provTotalCost.toFixed(2)}`
unconditionally, so an all-unpriced run (every session on a model missing from
pricing.ts — a real future trigger when a new model id ships) advertised a paid
run as `$0.00`, the exact "free run" lie A026 guards against. The per-session
cost already rendered `n/a`; the footer now does too when no session is priced.

(b) Add two golden fixtures for AC7 alignment cases no fixture exercised:
  - all-unpriced run: proves the n/a TOTAL above and `not.toContain('$0.00')`
    on the genuine all-unpriced edge (the existing unpriced fixture mixes
    priced + unpriced, so it passed that check on a gap).
  - counts-unavailable + Codex (cache_create=0): the no-derived session renders
    as a loud free line out of the grid; the Codex cache column sums create+read
    and stays aligned.

Closes the A026 risk and the AC7 coverage gap from the verify report.

Co-authored-by: Ana <build@anatomia.dev>
Co-authored-by: Ana <build@anatomia.dev>
Co-authored-by: Ana <build@anatomia.dev>
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
anatomia Ready Ready Preview, Comment Jun 9, 2026 9:27am

Request Review

@rpatricksmith rpatricksmith merged commit eb79576 into main Jun 9, 2026
5 checks passed
@rpatricksmith rpatricksmith deleted the feature/proof-card-redesign branch June 9, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant