Files
prautoblogger/includes/providers/interface-research-judge.php
peptiderepo 344412c4e7 feat(phase2b): P2b.1 — Research_Fanout + Research_Judge (curate stage) (#178, v0.28.0)
Additive: parallel research fan-out (curl_multi, quorum, cost-reserve-before-dispatch) + curate judge (dedup/score/run_sources). Live Economy path untouched; Authority activates at P2b.4. QA APPROVE-WITH-P2 685c40b; CI green (PHPUnit verified on VPS runner).

Agent-Session: prab-phase2b-1-merge
2026-06-24 07:40:23 +07:00

27 lines
988 B
PHP

<?php
declare(strict_types=1);
/**
* Contract for the research judge that curates fan-out results.
*
* @see core/class-research-judge.php — Primary implementation.
* @see ARCHITECTURE.md — Phase 2b curate stage.
*/
interface PRAutoBlogger_Research_Judge_Interface {
/**
* Deduplicate and score the fan-out results; write keep/discard decisions
* to run_sources; return kept sources for the draft stage.
*
* @param string $run_id Run UUID.
* @param string $item_key Article-scoped item key.
* @param array<int, array{sources: array<int, array{url: string, title: string, excerpt: string, relevance: float}>, agent_role: string}> $fanout_results Agent results from Research_Fanout::dispatch().
* @return array<int, array{url: string, title: string, excerpt: string, relevance: float, quality_score: float}> Kept, deduplicated, scored sources.
*/
public function curate(
string $run_id,
string $item_key,
array $fanout_results
): array;
}