------Z --- --
102105012

Report QC and Publish Gate

Checks a draft analyst report against the production template (DTG, grid, recommendation, EEI status, grounded summary) and stages the lifecycle move to Pending Review with a fix list when the template is short.

PrewiredLineage Recorder (QC pass)v0.1.0trigger: eventwf.s2.report-qc
Doctrine

Quality control as a checked contract, not a request to the model. Feeds the decision lineage chain: what was published, complete, on which data. Assessment sections 4.4 and 4.6.

Human gate: The cell lead approves the move. A failing template never advances.

Trigger: A report enters Draft (today: run manually against any draft).

Template check resultsFix list or staged transition
The pipeline (4 steps, Arazzo shaped)
  1. 01Select the draftRETRIEVElistReporting

    Pull the target report, or the newest analyst report sitting in Draft.

    Success criteria
    • Exactly one draft selected
    Outputs
    report
  2. 02Check the templateREASONcheckReportTemplate

    Verify DTG, MGRS, recommendation, EEI status where required, summary substance, classification line, and the RFI link.

    Success criteria
    • Every check result traces to a field on the record
    • A fix list produced when any check fails
    Outputs
    checkResultsfixList
  3. 03Cell lead reviewsHUMAN GATECell leadapprover: Cell lead

    The owning cell lead reviews the QC result before the lifecycle moves.

    Success criteria
    • Human review recorded
    Outputs
    review
  4. 04Stage the lifecycle moveACT (simulated)transitionReport

    Move Draft to Pending Review when the template passes and the lead approves.

    Success criteria
    • Transition staged only on a passing template
    Outputs
    stagedTransition
Dry run console
Reads are live. Writes are simulated. Nothing changes until a human gate clears.
Agentic binding (the wire, when approved)
s2-fusion-intel-apireportQcPublishGate

Wired mode performs transitionReport after the gate; dry run reports pass or fail.

Prerequisites live in src/lib/agentic/client.remote.ts.template: published OpenAPI description, accepted Arazzo documents, a scoped server side credential, and an approved agent runtime. Until then, the selector stays on the local dry run engine.

Foundry / MSS twin (after migration)
AIP Logic validation function on the Report action

The template check becomes a submission criterion on the transition Action.