Skip to content

Align default prompts with the 6-step prompt formula#1139

Open
kmgalanakis wants to merge 1 commit into
developfrom
feat/730-default-prompts-6-step-formula
Open

Align default prompts with the 6-step prompt formula#1139
kmgalanakis wants to merge 1 commit into
developfrom
feat/730-default-prompts-6-step-formula

Conversation

@kmgalanakis

@kmgalanakis kmgalanakis commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description of the Change

Restructure every default prompt into a consistent persona → task → context → format → tone layout. Preserve the {{WORDS}}/{{TITLE}}/ {{AUTHOR}} runtime tokens and fix the Content Resizing settings placeholders to pull from get_prompt(). Reframe the stale "default prompt" reference in the prompt-examples doc.

Closes #730

How to test the Change

  1. Check out this branch on a site with a generative AI Provider configured (e.g. OpenAI ChatGPT), and confirm nothing is broken on activation.
  2. For each generative AI Feature, open its settings and confirm the "ClassifAI default" entry in the prompt repeater now shows the restructured prompt (persona → task → context → format → tone): Title
    Generation, Excerpt Generation, Content Resizing (both Condense and Expand), Key Takeaways, Content Generation, Descriptive Text Generator, Image Tags Generator, and Image Text Extraction.
  3. On Content Resizing, clear the Condense/Expand prompt fields and confirm the greyed-out placeholder now shows the full default prompt instead of the old one-line text.
  4. Generate an excerpt on a post and confirm the target word count and post title still shape the output (i.e. the {{WORDS}}/{{TITLE}}/{{AUTHOR}} tokens are still substituted). If WooCommerce is active,
    repeat on a product for the WooCommerce title/excerpt variants.
  5. Run each Feature end-to-end and confirm output is produced with no errors and respects the format rules — e.g. title in sentence case (≤ 70 chars), excerpt as a single paragraph, alt text ≤ 200 chars
    with no "Image of…" prefix, 2–4 standalone key takeaways with no heading, and OCR transcribing text verbatim (returning none when the image has no text).
  6. Confirm any previously-saved custom prompt is left untouched — only the original "ClassifAI default" entry updates.
  7. Run PHPCS (composer run lint) and confirm the changed prompt files pass.

Changelog Entry

Changed - Rewrote the default prompts for all generative AI Features into a consistent, structured format based on the 6-step prompt formula for better default generations.
Fixed - Content Resizing settings now show the full default prompt as placeholder text, matching the other Features.

Credits

Props @kmgalanakis

Checklist:

Open WordPress Playground Preview

Restructure every default prompt into a consistent persona → task →
context → format → tone layout. Preserve the {{WORDS}}/{{TITLE}}/
{{AUTHOR}} runtime tokens and fix the Content Resizing settings
placeholders to pull from get_prompt(). Reframe the stale "default
prompt" reference in the prompt-examples doc.
@kmgalanakis kmgalanakis requested review from a team, dkotter and jeffpaul as code owners July 9, 2026 13:02
@kmgalanakis kmgalanakis self-assigned this Jul 9, 2026
@github-actions github-actions Bot added this to the 3.9.0 milestone Jul 9, 2026
@github-actions github-actions Bot added the needs:code-review This requires code review. label Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

✅ WordPress Plugin Check Report

✅ Status: Passed

📊 Report

All checks passed! No errors or warnings found.


🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider updates to default ClassifAI prompts

1 participant