comment-draft-replies is a WordPress plugin that drafts a reply to each eligible reader comment with a language model and holds it beside the comment for a moderator. It is for sites where editors have little time to answer readers. Licence MIT. Version v0.1.0, released 18 November 2026.
It was written from scratch from an idea, as one of the utilities described on the engineering blog. It has not run on a live site, and its PRD says “measured result: none yet”.
Some comments deserve an answer: a question about a fact, a correction, a fair challenge. Editors rarely have time to write those answers, so readers wait and then stop asking. Sites that hold every comment for moderation make it worse, because a comment can sit unseen for days.
A model can write a first draft in seconds. It cannot be allowed to publish. It can be wrong, it can be baited by a hostile comment, it can be told what to say by text hidden in a comment, and it speaks in the site’s name. What was missing was a tool that drafts the reply, puts it in front of an editor beside the comment, and publishes nothing until a person clicks.
On comment_post, Intake runs inside a catch-all so a reader’s comment is never affected. It makes three database reads and no HTTP call. An eligible comment gets one INSERT IGNORE row, and a unique key on the comment id makes a repeated hook call a no-op. A skip writes one comment meta entry with reason codes, so a moderator can see why a comment got no draft.
The intake rules cover comment type (the empty type and comment are treated alike), spam and trash state, staff, the plugin’s own replies, post state, length bounds, links, contact details, blocked words, the author’s history, rate limits and the daily cap. A filter, cdreplies_should_draft, can veto but never force.
Runner works from WP-Cron, WP-CLI or an optional gen-queue job. It claims a draft with a conditional update that stores a random token, re-checks the comment and post, reads the switch and any hold fresh, takes a cap slot, makes one call, and validates. Drafts live in their own table, not the comments table, so they cannot reach comment queries, feeds, counts or page caches.
The model sees the site name and language, optional voice notes, the post title and excerpt, up to three earlier comments in the thread and the comment. It sees the commenter’s name only if you allow it. It never sees email, IP address, user agent, website or user id. Reader text sits inside marked data blocks the prompt says not to obey.
Publishing goes through Review\Publisher, the only place a reply is created, and then through core’s wp_new_comment(). Core sends the notifications it sends for any hand-written reply. A typical setup:
define('CDREPLIES_PROVIDER_KEY', 'your-key');
define('CDREPLIES_DISABLED', true); // stops everything at once
moderate_comments and edit_post capabilities. Application passwords get a 401.CDREPLIES_DISABLED forces it on.An independent review of the build PR fixed these before the merge.
The review also fixed the script check, which wrongly flagged a Hindi reply to a Hindi comment containing English words, and corrected the three optional integrations to match the released contracts of their sibling plugins.
wp_insert_comment() directly, such as imports, do not fire comment_post and get no draft. Use the backfill command on purpose.No issues are open on the repo. Test status: this is v0.1.0. There are 149 PHPUnit tests with 958 assertions pass on PHP 8.3 against a throwaway MySQL 8.0, with PHPStan level 8 and phpcs clean. The model calls are tested against stubs and a mock transport, and the plugin has not run on a live site. The CI workflow has not run on GitHub, and there is no production mileage.
It needs PHP 8.1 or later and WordPress 6.4 or later. Without Composer you can supply your own caller through the cdreplies_model_caller filter, and an example is in the repo.
cd wp-content/plugins
git clone https://github.com/IndianOpinion/comment-draft-replies.git
cd comment-draft-replies
composer install --no-dev