Guide

Content Transformer architecture

Maintainer overview of the provider registry, transformation pipeline, cache, and async path.

Flow

Flow

Transform path

5 relationships
Sync transforms return immediately; async schedules a job.

Providers

Provider_Registry holds implementations of interface-provider.php:

ClassSlugSpec notes
Plain_Text_Providerplain-textincludes/format-specs/plain-text.md
Apple_News_Providerapple-newsincludes/format-specs/apple-news.md
Email_Provideremailincludes/format-specs/email-html.md

Each provider exposes name, slug, output type, and availability checks.

Pipeline and cache

Transformation_Pipeline::transform( $post_id, $provider_slug, $force ) builds prompts, calls AI, and returns a Transformation_Result. Transformation_Cache stores results and status for later GET /status and GET /result.

Pass force to bypass cache. Async REST requests use Action_Scheduler_Handler when Action Scheduler is available.

AI experiment ability

includes/ai-experiment/ registers the Abilities API tool and optional experiment wiring. The ability runs the same pipeline synchronously and supports multisite site_id via platform AI utils.

Key files

PathRole
includes/class-bootstrap.phpLoads providers, pipeline, REST, CLI, ability
includes/pipeline/Pipeline, prompt builder, result
includes/api/class-rest-controller.phpREST routes
includes/cache/class-transformation-cache.phpStatus and result cache
includes/async/class-action-scheduler-handler.phpQueued transforms
includes/cli/class-cli-command.phpwp prc content-transformer

Was this helpful?