feat(phase2b): P2b.4 — tier routing + Authority pipeline + citation/imagery gates (#181, v0.31.0)
Authority_Pipeline orchestrator (research→curate→draft→editorial→seo→publish gate) + per-category tier router behind master flag prautoblogger_authority_pipeline_enabled (DEFAULT OFF — zero behavior change until enabled). Cost-ceiling halts→hold; citation + imagery gates. QA APPROVE b086079; CI green (phpcs+phpunit VPS-verified). Agent-Session: prab-phase2b-4-merge
This commit is contained in:
41
includes/providers/interface-authority-pipeline.php
Normal file
41
includes/providers/interface-authority-pipeline.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* Authority Pipeline Interface
|
||||
*
|
||||
* Contract for the full Authority-tier article generation pipeline.
|
||||
*
|
||||
* @package PRAutoBlogger
|
||||
* @since 0.31.0
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Full Authority-tier article generation pipeline.
|
||||
*
|
||||
* Implementations must orchestrate: research → curate → draft →
|
||||
* editorial → seo → publish gate, with cost-governor reserve/settle
|
||||
* on every stage and cost-ceiling halt → HOLD semantics.
|
||||
*
|
||||
* @see core/class-authority-pipeline.php — Production implementation.
|
||||
*/
|
||||
interface PRAutoBlogger_Authority_Pipeline_Interface {
|
||||
|
||||
/**
|
||||
* Run the full Authority-tier pipeline for one article.
|
||||
*
|
||||
* @param string $run_id Unique run identifier.
|
||||
* @param PRAutoBlogger_Article_Idea $idea The article idea to process.
|
||||
* @param PRAutoBlogger_Cost_Tracker $cost_tracker Active cost tracker for this run.
|
||||
* @return array{generated: int, published: int, rejected: int, cost: float, status: string} Pipeline result.
|
||||
*/
|
||||
public function run(
|
||||
string $run_id,
|
||||
PRAutoBlogger_Article_Idea $idea,
|
||||
PRAutoBlogger_Cost_Tracker $cost_tracker
|
||||
): array;
|
||||
}
|
||||
35
includes/providers/interface-tier-router.php
Normal file
35
includes/providers/interface-tier-router.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Tier Router Interface
|
||||
*
|
||||
* Contract for resolving the generation tier (authority / economy) for an article idea.
|
||||
*
|
||||
* @package PRAutoBlogger
|
||||
* @since 0.31.0
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves Authority vs Economy generation tier for a given article idea.
|
||||
*
|
||||
* Implementations read the per-category tier map and the master feature flag.
|
||||
* When the master flag is OFF, resolve() MUST return 'economy' unconditionally
|
||||
* to guarantee zero behaviour change in production.
|
||||
*
|
||||
* @see core/class-tier-router.php — Production implementation.
|
||||
*/
|
||||
interface PRAutoBlogger_Tier_Router_Interface {
|
||||
|
||||
/**
|
||||
* Resolve the generation tier for an article idea.
|
||||
*
|
||||
* @param PRAutoBlogger_Article_Idea $idea The article idea to route.
|
||||
* @return string 'authority' or 'economy'
|
||||
*/
|
||||
public function resolve( PRAutoBlogger_Article_Idea $idea ): string;
|
||||
}
|
||||
Reference in New Issue
Block a user