Making WordPress.org

Changeset 14710


Ignore:
Timestamp:
03/13/2026 04:50:39 PM (4 weeks ago)
Author:
obenland
Message:

WP.org Abilities: Add plugin status and review feedback tool.

Introduce a new MCP tool that returns plugin submission status and
reviewer feedback from HelpScout for plugins owned by the authenticated
user. Strips boilerplate from review emails to keep responses focused
on actionable issues.

Also adds output schemas and MCP annotations (idempotent, destructive)
to both tools, and updates the address-review-feedback prompt to
reference the new tool name.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/class-registrar.php

    r14709 r14710  
    5656        // Tools.
    5757        Plugin_Directory\Tools\Validate_Readme::register();
     58        Plugin_Directory\Tools\Get_Plugin_Status::register();
    5859
    5960        // Prompts.
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/plugins/plugin-directory/class-ability-base.php

    r14709 r14710  
    2828
    2929    /**
    30      * Register the plugin-directory autoloader if it hasn't been loaded yet.
     30     * Blog ID for the plugin directory (wordpress.org/plugins) in the multisite network.
    3131     *
    32      * This is needed when abilities reference classes from the plugin-directory
    33      * plugin (e.g. Readme\Validator, Trademarks) that may not be autoloaded yet.
     32     * @var int
     33     */
     34    const PLUGINS_BLOG_ID = 367;
     35
     36    /**
     37     * Load the plugin-directory autoloader and switch to the plugins blog.
     38     *
     39     * Registers the plugin-directory autoloader so abilities can reference classes
     40     * like Readme\Validator and Trademarks, and switches to the plugins blog so
     41     * queries run against the correct posts table.
    3442     */
    3543    protected static function maybe_load_plugin_directory(): void {
     
    5159            WP_PLUGIN_DIR . '/plugin-directory'
    5260        );
     61
     62        switch_to_blog( self::PLUGINS_BLOG_ID );
    5363
    5464        $loaded = true;
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/plugins/plugin-directory/prompts/class-address-review-feedback.php

    r14703 r14710  
    6060Help me address the review feedback for my plugin `{$plugin_slug}` submitted to the WordPress.org plugin directory.
    6161
    62 ## Step 1: Fetch Review Feedback
     62## Step 1: Fetch Plugin Status and Review Feedback
    6363
    64 Use the `wporg/get-review-feedback` tool with slug `{$plugin_slug}` to retrieve the reviewer's feedback.
     64Use the `wporg/plugins/plugin-directory/get-plugin-status` tool with slug `{$plugin_slug}` to retrieve the latest reviewer feedback. If the plugin status is not "pending", there is no actionable feedback to address.
    6565
    6666## Step 2: Parse Each Issue
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/plugins/plugin-directory/tools/class-validate-readme.php

    r14709 r14710  
    4040                    'required'   => array( 'content' ),
    4141                ),
     42                'output_schema'       => array(
     43                    'type'       => 'object',
     44                    'properties' => array(
     45                        'errors'   => array(
     46                            'type'                 => 'object',
     47                            'description'          => 'Validation errors that must be fixed before submission.',
     48                            'additionalProperties' => array( 'type' => 'string' ),
     49                        ),
     50                        'warnings' => array(
     51                            'type'                 => 'object',
     52                            'description'          => 'Warnings that should be reviewed and fixed if applicable.',
     53                            'additionalProperties' => array( 'type' => 'string' ),
     54                        ),
     55                        'notes'    => array(
     56                            'type'                 => 'object',
     57                            'description'          => 'Informational notes and suggestions.',
     58                            'additionalProperties' => array( 'type' => 'string' ),
     59                        ),
     60                    ),
     61                ),
    4262                'execute_callback'    => array( __CLASS__, 'execute' ),
    4363                'permission_callback' => '__return_true',
    4464                'meta'                => array(
    4565                    'mcp'         => array( 'type' => 'tool' ),
    46                     'annotations' => array( 'readonly' => true ),
     66                    'annotations' => array(
     67                        'readonly'     => true,
     68                        'idempotent'   => true,
     69                        'destructive'  => false,
     70                    ),
    4771                ),
    4872            )
Note: See TracChangeset for help on using the changeset viewer.