primus.optimization.report_actions module

Deterministic operator-facing action projections for optimization reports.

primus.optimization.report_actions.build_action_projection(rows: Sequence[Mapping[str, Any]]) → dict[str, Any]

Group every score into exactly one deterministic operator workstream.

primus.optimization.report_actions.build_decision_summary(overview: Mapping[str, Any], disposition_counts: Mapping[str, Any]) → dict[str, str]

Return one honest, backend-authored conclusion for the current revision.

primus.optimization.report_actions.build_guideline_code_conflict_workstream(issues: Sequence[Mapping[str, Any]]) → dict[str, Any] | None

Project diagnosed guideline/code conflicts into one actionable workstream.

The input is already the stakeholder-safe issue projection. This function deliberately preserves the diagnosis claim and supporting evidence rather than collapsing the finding into the generic technical-repair bucket.