Add AI assisted content review utilizing WordPress Notes#260
Add AI assisted content review utilizing WordPress Notes#260jeffpaul merged 37 commits intoWordPress:developfrom
Conversation
…her information about each block and send along an API request. Process that response properly and add notes as needed
…ck and skip sending those blocks for processing
… returning results as LLMs struggle to do that deduping. Update our system instructions to be more robust
…ceholder function into a shared utility
…tent we send to limit the token usage. Update docs
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #260 +/- ##
=============================================
+ Coverage 55.67% 57.48% +1.80%
- Complexity 516 563 +47
=============================================
Files 32 35 +3
Lines 2660 2907 +247
=============================================
+ Hits 1481 1671 +190
- Misses 1179 1236 +57
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…Remove the limit on total blocks and individual block content length we process
…e. Add proper tests for this
…estions that aren't either a 1 or 2
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
…e content properly, especially for image alt text. Ensure tags aren't stripped from instructions
…ipping tags or doing nothing
jeffpaul
left a comment
There was a problem hiding this comment.
Only minimal feedback from testing, nice work...
- Post-review the "## suggestions added." text under the "Review with AI" button could perhaps be amended to "## suggestions added, view those Notes here." that links to either the
All notessidebar/tray or theView notesfloating notes view. - Not totally sold on this, but perhaps update the displayname from "AI Reviewer" to "WordPress AI"?
- In the "Reviewing... (#/##)" text that appears while the post is being processed, do the numbers relate to the number of blocks being processed? If so, let's perhaps adjust there to "Reviewing blocks... (# of ##)" to make that a bit more clear.
- I'm starting to think removing "AI", "with AI", etc sort of copy might be helpful to simplify things. In which case perhaps we update the button copy from "Review with AI" to "Suggest Refinements", "Suggest Improvements", "Generate Review Notes", "Suggest Changes", or whatever resonates best for this initial version. Depending on what button text we use, we might want to adjust the Experiment name on the Settings page.
- Depending on the button naming above, we might adjust the experiment settings description as well as the helper text in the editor sidebar. At least hyphenating block-by-block and capitalizing Notes where used (and ideally making those two text items more similar).
…ress AI. Few other minor text changes
…a link to open the floating Notes view after processing
This has been updated now to
Updated to
Yes, numbers here are the blocks that have been processed and total blocks. Updated this now to
Went with
Made a handful of text edits to ensure we use Notes everywhere (instead of notes) and added those hyphens. Also a few other minor updates to ensure things are consistent. |
What?
Closes #251
Adds an AI assisted content review process
Why?
Provides a quick and easy way to get high-level feedback of your content prior to publishing. Will check things like grammar, spelling, accessibility and SEO.
How?
Review_Notesexperiment andReview_NotesAbilityreview-notesAbility, which will send the block content, block type and surrounding content to AI with instructions on what to look forNote
After the review is done, a save is required to keep the connection between a note and a block. This is how notes work in the block editor, where it adds some metadata to the block attribute. We could trigger an autosave though I know I've gotten feedback on other PRs not to do that.
Use of AI Tools
Used Claude Code running Sonnet 4.6 to help build out a plan and execute on that initial plan. Lots of manual refinement along the way.
Testing Instructions
npm i && npm run build && composer installGenerate Review Notesbutton in the post status sidebar and click on itScreenshots