-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Feature Overview & Value
Summary:
This feature generates a concise summary of a post or page’s full content, stored as structured data and optionally inserted into the post via a Gutenberg block. It is intended to support both inline readability (e.g., top-of-post overview) and structured metadata use cases (e.g., internal search, preview cards, assistive technologies). The summary is generated automatically when sufficient content exists, but it is not inserted into the post unless the author chooses to do so. Authors can review and edit the summary, and optionally insert it into the post using a Gutenberg block.
Why it matters:
Long-form content can be difficult for users to scan or assess quickly, especially on mobile. Summaries help readers orient themselves and decide whether to engage, improving UX, accessibility, and engagement. At the same time, structured summaries are valuable for site features like internal search previews, on-page navigation, or SEO overlays. By allowing authors to generate a smart, editable summary once and reuse it in multiple ways, this feature supports both content quality and performance.
Use Cases:
- A long-form blog post includes a short summary at the top to help readers understand the topic at a glance.
- A documentation page uses a generated summary to support internal site search results.
- A publisher inserts summaries into featured cards, mobile overlays, or accessibility toggles.
Gutenberg-first but data-agnostic:
- The summary is stored in post meta, not block content.
- It can be inserted into the content via a Gutenberg block or accessed programmatically (e.g.,
get_post_meta()or a helper function). - Non-Gutenberg implementations can surface it via classic templates or custom filters.
User Interaction Flow
Overview:
The summary is generated automatically when the post or page content reaches a certain length threshold, but is not inserted into the post by default. Authors can view and edit the summary from the editor interface and choose whether or not to place it in the visible post body using a Gutenberg block. This provides a clean default while preserving full editorial control.
Behavior Details
- Automatic Generation
- Once the post/page content exceeds a threshold (e.g., ~200 words), the system automatically generates a summary using AI.
- Alternatively to having this be seamless for the user, we might also consider only generating when the content itself is more or less finished as it makes it difficult to determine when to generate an excerpt based on content length. This could either be something that is manually triggered or is triggered when the content is saved.
- Also worth considering the PrePublishPanel here if we decide to not auto-generate the summary, prompting a user prior to publishing to generate a summary if none exists.
- The summary is saved as post meta and is not added to the content unless the user takes action.
- Summary Preview and Edit Access
- In the sidebar (or inspector panel), a “Content Summary” section shows the generated summary.
- Users can edit the summary directly in this panel.
- Optionally includes character or word count guidance.
- Optional Insertion via Gutenberg Block
- Users can insert a “Summary” block into their post, which pulls the current summary value. Alternatively, this might not need to be a custom block, it could be inserted as a core block instead (i.e. paragraph blocks).
- The block can be placed anywhere (typically top-of-post) and updated if the summary is edited.
- Regeneration and Deletion
- A small “Regenerate Summary” button allows users to overwrite the current AI output if desired.
- If the summary is deleted, no further automatic attempts are made unless manually triggered.
- Error Handling
- If the AI generation fails, the field remains empty.
- Optional fallback message: “Couldn’t generate summary. You can write your own or try again later.”
Editorial Handling
Tone and Voice:
- Summary should be factual, neutral, and informative.
- Avoid persuasive tone, humor, or exaggerated language.
- Write in complete sentences; avoid fragments or marketing-style phrasing.
Length and Format:
- Target length is 2–3 sentences or ~50–100 words.
- Summary should provide a high-level view of the core message and structure of the content.
- Output must be plain text with no HTML formatting, emojis, or special characters.
Editability:
- Authors can edit the summary in the sidebar panel.
- Any edits are persisted and reflected in the inserted block (if used).
- Edits do not retrigger generation unless reset or cleared by the user.
Placement Guidance (for authors):
- Recommend placing the summary block near the top of the post, below the title or introductory paragraph.
- Use cases may vary by content type; themes can provide guidance via templates or inline helpers.
Technical Requirements (High-Level)
AI Input Requirements:
- Post title
- Full post or page content
- Optional truncation if content exceeds token limits (e.g. max 1500 words)
- No user input required to initiate
AI Output Requirements:
- One plain-text summary string
- Target 2–3 sentences, max ~100 words
- Must be clean, UTF-8 compliant, and suitable for direct display or programmatic use
Trigger Conditions:
- Auto-generates after post/page content exceeds 200-word threshold
- Triggered only if no existing summary exists
- Regeneration must be explicitly requested by the user
Storage & Access:
- Saved in post meta (
_content_summaryor similar key) - Accessible via template tags, REST API, and block editor
- Does not affect
post_contentunless inserted manually
Fail States & UX Expectations:
- Generation failure results in empty summary state with non-blocking fallback message
- No automatic retries unless initiated by the user
Model Agnosticism:
- Compatible with any model supported by the AI Services plugin (e.g., OpenAI, Claude, self-hosted LLMs)
- Prompt logic should be modular and override-friendly
Privacy & Config:
- API keys and endpoint logic handled by AI Services plugin
- No summary content is stored externally; generation happens per request
Extensibility Notes:
- Future versions may support:
- Summary style presets (e.g., concise, bulleted, SEO-optimized)
- Multiple summary types (reader preview vs. search snippet)
- Automatic placement recommendations based on theme or content type
Design mockups
Version 1
Version 2
Props to Lina Wiezkowiak for the product definition, Rachael Cortellessa for the designs, and Darin Kotter for technical review of both.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status