Add an ai_disclosure_workflow submodule: drive the human-review exemption from Content Moderation transitions
Problem / Motivation
The human-review exemption is currently an honor-system checkbox: nothing connects it to an actual editorial process. Sites using Content Moderation already have that process — an article can be published in an "AI generated" state and later reviewed by a human — but the disclosure does not follow along; someone must remember to update it by hand.
The data model already has the right hinge: review does not change provenance (the grade — "this was AI-generated" stays true forever), it changes the exemption, which is exactly what the human_review flag together with the grade's review_exemptible flag computes.
Proposed resolution
Add an ai_disclosure_workflow submodule connecting disclosures to core Workflows / Content Moderation:
- Mapping config per workflow, stored as third-party settings on the workflow config entity and edited on the workflow form (the same pattern Content Moderation uses): map states or transitions to disclosure outcomes — e.g. state
ai_generated→ profile "AI generated, unreviewed"; transition tohuman_reviewed→ sethuman_review = TRUEor switch to the reviewed profile. - Trigger via
hook_entity_presave()on moderated entities, comparing original and new moderation state (core dispatches no transition event). On a mapped transition, update the disclosure field on that revision. - Moderation state, disclosure field and revision author are all revisioned, so "who reviewed and what changed" lines up per revision — and dovetails with the planned audit submodule (#14 (closed)).
- Optionally, a mapped review transition can auto-accept a matching pending suggestion from the recorder API, tying automated recording and human review into the same editorial moment.
Guardrails
- Map transitions to review status / profile only — never fabricate provenance (a review transition must not turn "AI generated" into "human only").
- The automation must be skippable when an editor has set an explicit custom disclosure on the item.