AI-powered editorial feedback for WordPress Gutenberg editor using WordPress 6.9's Notes feature.
The AI Feedback plugin integrates AI-powered content review directly into the WordPress block editor. It leverages the native Notes API (WordPress 6.9+) to provide contextual, block-level feedback on your content.
- 🤖 AI-Powered Reviews: Get intelligent feedback on content quality, tone, flow, and design
- 📝 Native Notes Integration: Feedback appears as WordPress block comments
- ⚙️ Configurable Settings: Choose AI models, focus areas, and target tone
- 🔄 Multiple AI Providers: Support for Claude, GPT-4, Gemini, and more
- 💬 Conversational Feedback: Reply to AI suggestions and get clarifications (Phase 4)
- 🎯 Focus Areas: Content Quality, Tone & Voice, Flow & Structure, Design & Formatting
- WordPress: 6.9 or higher
- PHP: 8.0 or higher
- Plugins: WordPress AI Experiments plugin
- Node.js: 18.0 or higher (for development)
- npm: 9.0 or higher (for development)
The AI Feedback plugin requires the WordPress AI Experiments plugin to be installed and activated. The AI Experiments plugin provides:
- Centralized AI settings screen for configuring API keys
- Support for multiple AI providers (Anthropic, OpenAI, Google Gemini, etc.)
- Common interface for AI configuration across WordPress plugins
Install the AI Experiments plugin first:
- Go to WordPress Admin → Plugins → Add New
- Search for "AI Experiments" or "AI"
- Click "Install Now" and then "Activate"
- Configure your AI provider API keys in Settings → AI
git clone https://github.com/yourusername/ai-feedback.git
cd ai-feedback# Install PHP dependencies
composer install
# Install JavaScript dependencies
npm install# Production build
npm run build
# Development build with watch
npm run start# Start WordPress environment
npm run env:start
# The site will be available at http://localhost:8889
# Login: admin / passwordIf using wp-env, the plugin is automatically activated. Otherwise:
- Copy the plugin folder to
wp-content/plugins/ai-feedback - Go to WordPress Admin → Plugins
- Activate "AI Feedback"
The plugin uses the WordPress PHP AI Client which works in conjunction with the WordPress AI Experiments plugin for managing AI provider credentials.
Option 1: Using the AI Experiments Plugin (Recommended)
Configure your AI provider through the WordPress admin interface:
- Go to Settings → AI in WordPress admin
- Select your preferred AI provider (Anthropic, OpenAI, Google Gemini, etc.)
- Enter your API key
- Save settings
Option 2: Using wp-config.php
Alternatively, you can configure your AI provider directly in wp-config.php:
// For Anthropic Claude (default)
define( 'ANTHROPIC_API_KEY', 'your-api-key-here' );
// For OpenAI
define( 'OPENAI_API_KEY', 'your-api-key-here' );
// For Google Gemini
define( 'GOOGLE_AI_API_KEY', 'your-api-key-here' );The plugin sets these defaults on activation:
- Default Model: Claude Sonnet 4
- Focus Areas: Content, Tone, Flow
- Target Tone: Professional
You can change these in the plugin sidebar within the block editor.
- Open a post in the block editor
- Click the AI Feedback icon in the toolbar (or open from "Options" menu)
- Adjust settings if needed:
- Select AI model
- Choose focus areas
- Set target tone
- Click Review Document
- AI will analyze your content and attach notes to relevant blocks
- 📝 Notes appear as indicators on blocks with feedback
- Click a note indicator to read the feedback
- Each note includes:
- Title: Brief summary
- Feedback: Detailed explanation
- Suggestion: Actionable recommendation (if applicable)
- Severity: 🟢 Suggestion, 🟡 Important, 🔴 Critical
Once implemented, you'll be able to:
- Click on a note to open it
- Type a reply asking for clarification
- AI will respond with context-aware suggestions
ai-feedback/
├── ai-feedback.php # Main plugin file
├── includes/ # PHP classes
│ ├── class-plugin.php # Bootstrap
│ ├── class-settings-controller.php
│ └── ...
├── src/ # JavaScript/React source
│ ├── index.js # Entry point
│ ├── store/ # WordPress data store
│ ├── components/ # React components
│ └── index.scss # Styles
├── build/ # Compiled assets (gitignored)
├── tests/ # Test files
└── docs/ # Documentation
# Development
npm run start # Watch mode with hot reload
npm run build # Production build
npm run format # Format code with Prettier
# Linting
npm run lint:js # ESLint
npm run lint:css # Stylelint
npm run lint:pkg-json # Package.json validation
npm run lint:php # PHPCS + PHPStan
# Testing
npm run test:unit # JavaScript unit tests
npm run test:php # PHP unit tests
composer test # PHP unit tests (alternative)
npm run test:e2e # End-to-end tests
npm run test:all # Run JS linting and tests
# WordPress Environment
npm run env:start # Start wp-env
npm run env:stop # Stop wp-env
npm run env:clean # Clean wp-env
# Build
npm run plugin-zip # Create release zip# JavaScript tests (Jest)
npm run test:unit
# PHP tests (PHPUnit)
composer test
# E2E tests (Playwright)
npm run test:e2e
# Run all tests
npm run test:allThe plugin follows:
- PHP: WordPress Coding Standards
- JavaScript: WordPress ESLint configuration
- CSS: WordPress Stylelint configuration
All pull requests automatically run through GitHub Actions CI/CD:
- ✅ JavaScript linting (ESLint, Stylelint, Prettier)
- ✅ PHP linting (PHPCS, PHPStan)
- ✅ JavaScript unit tests (Jest)
- ✅ PHP unit tests (PHPUnit) across PHP 8.1-8.3
See docs/CI.md for details on running checks locally and setting up branch protection.
- Settings Controller: REST API for settings management
- Review Service: Orchestrates document analysis (Phase 2)
- Reply Service: Handles conversational feedback (Phase 4)
- Notes Manager: Creates and manages Notes (Phase 3)
- Prompt Builder: Constructs AI prompts (Phase 2)
- WordPress Data Store: State management with
@wordpress/data - React Components: UI built with WordPress components
- REST API Integration: Communicates with PHP backend
Editor → Plugin Sidebar → Data Store → REST API → PHP Services → AI Client → AI Provider
↓
Editor ← Notes API ← Notes Manager ← Response Parser ← AI Client ← AI Response
Current phase: Phase 5 (Polish & Release) — in progress. Phase 4 (Conversation Loop) is the remaining major feature and has not yet started.
- Plugin scaffold with build system
- Plugin sidebar UI with settings
- Model selector with provider grouping
- Focus areas and tone selection
- Settings REST API with caching
- WordPress data store (selectors, actions, reducer)
- Review button with loading states
- Review Service with block parsing
- Prompt engineering for different focus areas
- AI response parsing and validation
- Review REST endpoint
- Error handling and rate limiting
- Notes Manager for WordPress Notes API
- Block-level note indicators
- Note resolution tracking
- Review history display
- Reply detection hook (#131)
- Context-aware reply prompts / Reply Service (#132)
- Async reply processing (#133)
- Conversation threading UI (#134)
- Accessibility: skip links, visible focus indicators, WCAG AA color contrast, ARIA live regions, descriptive screen reader labels
- Onboarding: first-run welcome modal, empty state guidance
- AI quality: few-shot examples, block-type specific instructions, multi-language support, deduplication
- Health check REST endpoint
- E2E infrastructure with Playwright
- Abilities API integration
- Streaming responses
- Performance optimization
- Accessibility audit (final sweep)
- Complete documentation
- Release v1.0.0
See docs/API.md for complete REST API documentation.
See docs/TESTING.md for comprehensive testing guide.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow WordPress coding standards
- Write tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting PR
GPL v2 or later
- Requires WordPress AI Experiments plugin
- Built with WordPress PHP AI Client
- Uses WordPress 6.9+ Notes API
- Powered by AI providers: Anthropic, OpenAI, Google
- Issues: GitHub Issues
- Documentation: docs/
- WordPress: Requires 6.9+
- Plugin scaffold and build system
- Settings UI, REST API, and data store
- Model selection with provider grouping
- Focus areas and tone configuration
- Document review with AI provider integration (Anthropic, OpenAI, Gemini)
- Prompt builder with focus-area and block-type specific instructions
- Few-shot examples for consistent AI output
- Multi-language feedback support
- Feedback deduplication and grouping
- WordPress Notes API integration (block-level comments)
- Health check REST endpoint
- Accessibility: skip links, visible focus indicators, WCAG AA color contrast, ARIA live regions
- Onboarding: first-run welcome modal, empty state guidance
- E2E test infrastructure with Playwright
- Phase 4: Conversational replies to AI feedback
- Phase 5: Abilities API, streaming responses, performance optimization, final accessibility audit, complete documentation, v1.0.0 release
Built with ❤️ for WordPress