hired.alignment.diff
Deterministic diff between two alignment reports.
Used by the alignment-review workflow (heavy mode) to surface what changed between an existing report and a freshly regenerated one — so the change set is auditable and reviewable before anything is applied. Requirements are matched by their verbatim text (stable across regenerations); the diff reports bucket moves, verdict changes, and added/removed requirements and clarifications.
See misc/docs/DESIGN.md §6 and the alignment-review agent.
- hired.alignment.diff.diff_reports(old: dict, new: dict) dict[str, Any][source]
Return a structured diff of two alignment-report dicts.
Both inputs are
AlignmentReport.model_dump()dicts. The result has:verdict_changed/verdict_old/verdict_newfit_old/fit_newbucket_changes: list of{requirement, from, to}for requirements whose bucket moved (the heart of a refresh — typically UNKNOWN→known as Q&A resolves false negatives)added/removed: requirement texts present in only one versionclarifications_resolved: clarifying questions in old but not new
- hired.alignment.diff.summarize_diff(diff: dict) str[source]
A short human-readable summary of
diff_reports()output.