Skip to content

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 combine reusable Markdown guardrails with explicit read/write FieldScopeMatcher policies.

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>, or blueprint:<type>.
  • Field Scopes (FieldScopeMatcher): Restrict which fields an assistant may read or write using glob and negation patterns (for example seo.*, 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 standardize tone, target audience, sentence rhythm, and banned phrases across all editorial assistants.

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 bind a model tier, ordered rules, a brand voice, field scopes, and target workspaces (Page Edit, Entry Edit, Sandbox, MCP).

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 by ConversationService so editors chat with context from the current page and review field diffs via ProposalApplier before 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);

Next steps