hired.alignment.report#
Render an AlignmentReport to Markdown or HTML.
Verdict-first (BLUF), evidence-quoted, banded — deliberately not a single false-precision percentage. The four buckets are grouped so the reader sees, in order: what’s strong, what transfers, what’s learnable (with the AI-leverage note), what’s genuinely hard, and what we still need to ask.
Formats are a strategy registry (REPORT_RENDERERS, dispatched by
render_report()): add one by registering a report -> str function. The
HTML renderer is a single self-contained page (inline CSS, light/dark aware, no
external assets), suitable for opening in a browser or publishing as-is.
See misc/docs/DESIGN.md §6, and the research in
misc/docs/research/jd-candidate-matching.md.
Module Attributes
|
Functions
|
Render |
|
Render the report as a self-contained HTML page (inline CSS, no assets). |
|
Render the report as a Markdown string. |
- hired.alignment.report.REPORT_RENDERERS: dict[str, Callable[[AlignmentReport], str]] = {'html': <function render_report_html>, 'markdown': <function render_report_markdown>, 'md': <function render_report_markdown>}#
format name -> renderer. Register a new format by adding an entry.
- hired.alignment.report.render_report(report, fmt='markdown')[source]#
Render
report(a model or its JSON dict) in the named format.>>> from hired.alignment import AlignmentReport, Verdict, Recommendation >>> r = {'job_id': 'ds', 'verdict': {'recommendation': 'apply'}} >>> render_report(r).splitlines()[0] '# Alignment: ds' >>> render_report(r, 'pdf') Traceback (most recent call last): ... ValueError: Unknown report format 'pdf'; choose from: html, markdown, md
- Return type:
- hired.alignment.report.render_report_html(report)[source]#
Render the report as a self-contained HTML page (inline CSS, no assets).
>>> from hired.alignment import AlignmentReport, Verdict, Recommendation >>> page = render_report_html(AlignmentReport(job_id='ds', company='Acme <Inc>', ... verdict=Verdict(recommendation=Recommendation.APPLY, headline='Go'))) >>> page.startswith('<!doctype html>'), 'Acme <Inc>' in page (True, True)
- Return type: