Editorial Studio, Rules & Bulk
AI turns ProcessWire’s page and entry editors into a governed editorial studio powered by EditorialEngine, ConversationService, ProposalApplier, MainRuleCatalog, FieldScopeMatcher, and BulkEditorialService.
Editorial Rules & Field Scopes
Section titled “Editorial Rules & Field Scopes”Rules (ai-rules + built-in MainRuleCatalog) keep generated copy factually grounded and structurally safe:
- Target Scopes: Narrow a rule to
global,task:writing,task:structured,task:translation,task:audit,task:vision,task:artifact,template:<name>, orblueprint:<type>. - Field Scopes (
FieldScopeMatcher): Restrict which fields an assistant may read or write using glob and negation patterns (for exampleseo.*, metadata.*, -seo.robots_noindex). - Quality Validation (
EditorialQualityValidator): Validates generated proposals against length limits, banned phrases, and structural constraints before presenting them to editors.
Brand Voices
Section titled “Brand Voices”Define one default site voice (is_default) or specialized voices per audience (for example aegean-editorial for luxury charter guests vs. a concise technical voice for broker portals). Each voice carries target_audience, tone_summary, and banned_phrases.
Assistants & Embedded InputfieldAiChat
Section titled “Assistants & Embedded InputfieldAiChat”Built-in assistants (SEO & Search Optimizer, Contextual Localizer, Editorial Copywriter, Structured Content & Block Composer, Visual Accessibility & Media Intelligence, Pre-Publish Editorial Auditor, and Knowledge & Site Search Assistant) work immediately inside:
- Page Edit & Entry Edit (
InputfieldAiChat): Embeds a self-contained AI drawer (dist/InputfieldAiChat.{js,css}) backed byConversationServiceso editors chat with context from the current page and review field diffs viaProposalApplierbefore saving. - Editorial Sandbox: Test prompts, rules, and field proposals safely in Setup -> AI -> Editorial Sandbox.
Bulk Editorial Operations (BulkEditorialService)
Section titled “Bulk Editorial Operations (BulkEditorialService)”Run an assistant across dozens or hundreds of pages or entries asynchronously through BulkEditorialQueue:
$ai = Ai::requireInstance($wire);$bulk = $ai->bulk();
// 1. Dispatch a queued batch of proposals$batchId = $bulk->dispatchBulk([ 'assistant' => 'seo-optimizer', 'selector' => 'template=yacht, limit=50', 'dry_run' => false,]);
// 2. Inspect progress and generated proposals$summary = $bulk->batchSummary($batchId);
// 3. Apply approved proposals (or roll back the entire batch safely)$bulk->applyBatch($batchId);// $bulk->rollbackBatch($batchId);