Skip to content

refactor: extract report-renderer into agent-reliability-core — ADR-4 complete - #20

Merged
MarouaBoud merged 3 commits into
mainfrom
feat/extract-report-renderer
Sep 2, 2026
Merged

MarouaBoud merged 3 commits into
mainfrom
feat/extract-report-renderer

Conversation

@MarouaBoud

Copy link
Copy Markdown
Member

Summary

Extracts the last shared primitive — report-renderer (ADR-4) — completing the agent-reliability-core extraction. Implements the seam from the design note (#19), approved as closed section set + [render] extra.

The seam

Rendering is split into a domain-agnostic presentation model in core and a per-tool adapter that stays in each tool:

RunReport ──to_report()──▶ core.report.Report (Badge + KpiRow/Table/Callout/Note) ──▶ HTML / terminal
  • core agent_reliability_core.report: the closed section vocabulary, the oxblood Theme (tone→hex + tone→Rich style), and both renderers. HTML/terminal backends are the opt-in [render] extra (jinja2+rich); the model + theme are dependency-free.
  • stampede: RunReport/build_report/to_dict unchanged (JSON contract + determinism intact). New observer/report_view.to_report() adapter; renderer.py is now two delegating functions with identical signatures; the stampede template is deleted.

Verified

  • 131 tests pass (incl. 3 standalone core render tests importing only agent_reliability_core.report, and a stampede adapter test).
  • Visual parity checked: rendered HTML still carries every section, the grade badge, the confusion bars, and the #6b1f2a oxblood token; theme is overridable.
  • ruff + mypy clean on both packages; core wheel bundles the generic template.

ADR-4 complete

All four primitives are now extracted: trace-format, concurrency-core, persona-pack, report-renderer. agent-reliability-core is a real, independently-tested distribution the siblings (mcp-probe, costbomb, mockworld) can consume.

@MarouaBoud
MarouaBoud merged commit 074a16a into main Sep 2, 2026
4 checks passed
@MarouaBoud
MarouaBoud deleted the feat/extract-report-renderer branch September 2, 2026 13:18
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