feat: v1 rename + print-grade visual report system (Deep Teal & Graphite), live-validated on O2C & P2P - #3
Merged
Merged
Conversation
…age chrome, bar/donut) Reviewed our rendered PDF page-by-page against Akhilesh's prior report (now seen as a PDF): our content/narrative matches or beats his bar, but the document PRESENTATION fell short. This closes that gap. Document craft: - Branded cover page (teal geometric, AuroPro mark) — domain + brand; client name only when known AND not suppressed (honours the existing leak-suppression). - Table of Contents page with section numbers + dotted leaders. - Print stylesheet: @page A4 margins, break-inside:avoid on cards/tables/charts/panels, break-after:avoid on headings — clean pagination, no mid-element splits. - scripts/make_pdf.py: renders the suite to one print-quality PDF with native running header (title + brand) and footer (page numbers + Confidential). CSS position:fixed repeats unreliably across print pages, so chrome is done via the PDF tool's margin boxes. Charts / visuals (pure inline SVG, offline-safe, grounded inputs only): - New 'unfulfilled orders by channel' bar (EDI vs Manual vs Email) — code-derived in build.derive_charts() from the grounded findings, never model-set. - value_bar_svg + render_charts helpers; value/feasibility plot gains 4 quadrant labels + shaded 'do first' zone so empty space reads as the map, not missing data. - _metric now prepends the formatted grounded figure when the model's chip text lacks a number (e.g. '€30.7M — aggregate divergence addressed'). - KPI tiles lay out 5-across in print. models: SynthesisContent.charts (code-owned). 160 tests, 100% coverage, pyrefly clean, grounding + factual-report-01 guards hold. pypdf added (dev, for the PDF merge).
… merged PDFs Both suites re-rendered with cover, TOC, print stylesheet, new charts; plus single-file PDFs (out/o2c-report.pdf, out/p2p-report.pdf) via scripts/make_pdf.py. P2P charts empty by design (no multi-channel count breakdown in its data).
(Empty commit; the prior two pushes did not register a CI run. Local gate is green: 160 tests, 100% coverage, pyrefly clean.)
…ges (no sparse whitespace) Validated the actual rendered PDFs page-by-page (not just markup) and found the committed PDFs were poor: cover floated in a box with whitespace, Chrome's DEFAULT date/url header+footer showed (make_pdf's --print-to-pdf-header-template flags are silently ignored in headless), and aggressive break rules left pages ~half empty. Charts WERE in the HTML and rendered on screen — the gap was the print/PDF layer. Fix (CSS @page margin boxes render reliably in headless Chrome): - Full-bleed teal/slate cover via @page cover { margin:0 } (210x297mm). - Running chrome via @page margin boxes: brand top-right, Confidential bottom-left, Page N bottom-right — no heading collisions. - Relaxed breaks: keep small blocks whole (charts/KPIs/panels/rows); tall prose cards may split so pages fill. O2C 31->29 pages. - make_pdf.py: dropped the non-working template flags; suppress Chrome's own chrome and let the CSS @page boxes show, then concatenate. Verified visually on BOTH domains, HTML + PDF: full-bleed cover, page chrome, all charts render, pages fill. Regenerated suites + merged PDFs. 160 tests, 100%, pyrefly clean.
Rename the engine directory to v1/ ahead of the visual-system upgrade. git mv preserves history; updated all path references (CI working-dir, pre-commit pyrefly path + filter, .gitignore, README/CONTRIBUTING/SECURITY/CODEOWNERS/templates/research docs, in-tree docstrings/comments, .env.example, doctor, smoke_test). Also split three single-line def helpers (tools._round_*, render px/py) into two-line defs — removes a coverage branch-arc quirk and reads cleaner. Verified from v1/: 160 tests, 100% coverage, pyrefly clean, doctor PASS. Suites + PDFs regenerated under v1/.
… serif display) Spec-driven (specs/001-report-visual-system: constitution + spec + plan + tasks; identity approved). Phase 0 establishes the visual identity: - Palette: deep teal #0f7c8c is now the single brand accent (replaces generic blue), anchored to the cover; sparing warm bronze #c8772e reserved for highest-impact emphasis; cohesive teal chart-series ramp. CSS :root tokens + an 8px spacing scale. - Display type: system serif stack (Iowan/Charter/Georgia — offline-safe) on headings, cover title, big stat numbers — authored editorial feel, not generic-AI sans. - Recoloured all inline-SVG helpers (flow/data-flow/bars/bubble/donut + series) to teal. - Section-number chip + KPI icon styles staged for Phase 1. Includes the spec-kit scaffolding + the visual-system spec/plan/tasks/constitution. Rendering-only; numbers unchanged. 160 tests, 100% coverage, pyrefly clean.
- Teal section-number chips on numbered h2 headings (1.1, 1.2, ...) via a post-render wrapper — designed heading rhythm instead of plain underlines. h1 / unnumbered untouched. - KPI tiles get a small inline-SVG category glyph (currency / pie / alert / bulb / doc), chosen by what the tile measures; serif numbers from Phase 0. - Recoloured remaining blues (metric chips, table headers, .chip, sidebar) to teal family. - Tests for _secnum_chips + _kpi_icon. 162 tests, 100% coverage, pyrefly clean.
Report 05 was mostly empty text bullets. Added roadmap_timeline_svg: three teal horizon columns (H1/H2/H3 with window labels), a NOW->LATER time arrow, item cards with an opportunity dot, and the detailed horizon bullets retained below. Positions encode horizon + item order only (no quantitative claim); empty roadmap -> omitted. Pure SVG, teal house-style, break-inside:avoid. 163 tests, 100% coverage, pyrefly clean.
- derive_charts now emits the unfulfilled-by-channel breakdown as BOTH a magnitude bar (Report 02) and a share-of-failures donut (Report 06, 'Where the failures concentrate'). Every segment is a real grounded count (1196/320/111) — nothing derived or subtracted. - render_charts gains a filter so the same grounded series shows as magnitude on one report and share on another without duplicating on a page. - Donut + bar share the teal series ramp + takeaway captions; donut legend uppercases EDI. - Tests updated (bar+donut series, kinds filter). 163 tests, 100% coverage, pyrefly clean, grounding holds.
…eport 04) Report 04 before/after was two plain text columns. Now a visual transformation: a grey Today panel, a teal connecting arrow, and a teal-tinted With-the-change panel, each with the numbered steps. Step text unchanged. Responsive (arrow rotates on narrow). 163 tests, 100% coverage, pyrefly clean.
…suites Phase-5 review caught a latent domain-agnostic bug: r03/r04 hardcoded O2C dependency strings leaked into P2P. Now derived from each opportunity's own dependencies -> actual titles. Regenerated both suites + PDFs with the full visual system. Chart values re-validated vs raw. 163 tests, 100% coverage, pyrefly clean, grounding holds both domains.
Per decision: the spec-kit scaffold (.specify/), the visual-system specs/, and the CLAUDE.md stub are local workflow artifacts, not committed to the repo. Removed from tracking (files remain on disk) and gitignored. The implemented work stands on its own.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Builds on the merged #2. Two themes: (1) make the Discovery Report a genuine print-grade,
visually distinctive deliverable, and (2) rename
prototype/→v1/ahead of versioned work.Rendering layer only — the discovery/synthesis logic and every number are unchanged and re-validated.
1. Rename
prototype/→v1/git mv(history preserved); updated all path references (CI working-dir, pre-commit pyreflypath + filter,
.gitignore, README/CONTRIBUTING/SECURITY/CODEOWNERS/templates/research docs,in-tree docstrings). Verified green from
v1/.2. Print-grade PDF (fixes a real "sparse / generic" complaint)
Validated the rendered PDFs page-by-page (not just markup) and fixed:
@page cover { margin:0 }.@pagemargin boxes (brand top-right, Confidential + page numberbottom) — replaces Chrome's broken header-template flags; no heading collisions.
scripts/make_pdf.pyproduces one print-quality PDF per domain.3. Visual system — "Deep Teal & Graphite", editorial-consulting
Distinct from the generic AI-report look:
display type (offline-safe), section-number heading chips, KPI category icons.
opportunity dots — was a near-empty text page.
(R06) — pure inline SVG, teal house-style, values grounded, omitted where data is absent.
4. Bug fixes surfaced by visual review
("Customer Master Reconciliation", "AI Credit Decisioning") that leaked into the P2P report —
now derived generically from each opportunity's own dependencies → its actual titles.
defhelpers to remove a coverage branch-arc quirk (cleaner too).Anti-fabrication discipline (unchanged, still enforced)
"Code does the math; the LLM does the reasoning." Every chart/KPI/figure traces to a verified
finding; visuals omit themselves when grounded data is absent; Report 01 stays factual. Verified by
the synthesis grounding gate and by independent recomputation from raw inputs.
Validation
Manual 320 / Email 111 — exact).
(P2P renders the same system, zero code changes; omits charts it has no data for).
fail_under=100), pyrefly clean, groundingOut of scope
not committed (by request).