Making WordPress.org

Changeset 14725


Ignore:
Timestamp:
03/17/2026 03:06:51 PM (4 weeks ago)
Author:
obenland
Message:

WP.org Abilities: Improve tool schemas and reduce duplication in prompts

Add URI format hints to URL inputs, clarify mutually exclusive options in descriptions, and use a consistent base class across all abilities.
Prompts now reference workflows instead of duplicating instructions.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/plugins/plugin-directory
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/plugins/plugin-directory/class-ability-base.php

    r14710 r14725  
    3737     * Load the plugin-directory autoloader and switch to the plugins blog.
    3838     *
    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.
     39     * Permanently switches to the plugins blog for the remainder of the request.
     40     * All plugin-directory abilities expect to run in this context.
    4241     */
    4342    protected static function maybe_load_plugin_directory(): void {
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/plugins/plugin-directory/prompts/class-address-review-feedback.php

    r14710 r14725  
    8080## Step 4: Re-validate
    8181
    82 After all fixes:
    83 1. Re-run Plugin Check locally to ensure no new issues were introduced:
    84 ```bash
    85 wp plugin check {$plugin_slug} --categories=plugin_repo --format=json --error-severity=7 --warning-severity=6 --include-low-severity-errors --exclude-checks=prefixing
    86 ```
    87 2. Review the fixes against `wporg://plugins/plugin-directory/plugin-guidelines`
     82After all fixes, use the `wporg/plugins/plugin-directory/run-plugin-check` prompt with the plugin path to re-run Plugin Check and ensure no new issues were introduced.
     83
     84Review the fixes against `wporg://plugins/plugin-directory/plugin-guidelines`.
    8885
    8986## Step 5: Resubmit
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/plugins/plugin-directory/prompts/class-prepare-plugin.php

    r14709 r14725  
    9393## Step 4: Run Plugin Check Locally
    9494
    95 Run the Plugin Check (PCP) plugin locally using WP-CLI:
     95Use the `wporg/plugins/plugin-directory/run-plugin-check` prompt with plugin_path `{$plugin_path}` to run and resolve all Plugin Check issues.
    9696
    97 ```bash
    98 wp plugin check {$plugin_path} --categories=plugin_repo --format=json --error-severity=7 --warning-severity=6 --include-low-severity-errors --exclude-checks=prefixing
    99 ```
    100 
    101 If PCP is not installed, install it first: `wp plugin install plugin-check --activate`
    102 
    103 Fix all ERRORs before proceeding. See `wporg://plugins/plugin-directory/plugin-check-guide` for details.
     97Fix all ERRORs before proceeding.
    10498
    10599## Step 5: Check Slug Availability
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/plugins/plugin-directory/resources/class-plugin-check-guide.php

    r14712 r14725  
    1010namespace WordPressdotorg\Abilities\Plugins\Plugin_Directory\Resources;
    1111
     12use WordPressdotorg\Abilities\Plugins\Plugin_Directory\Ability_Base;
     13
    1214defined( 'ABSPATH' ) || exit;
    1315
     
    1517 * Plugin_Check_Guide class.
    1618 */
    17 class Plugin_Check_Guide {
     19class Plugin_Check_Guide extends Ability_Base {
    1820
    1921    /**
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/plugins/plugin-directory/tools/class-submit-plugin.php

    r14724 r14725  
    5252                        'zip_url'       => array(
    5353                            'type'        => 'string',
     54                            'format'      => 'uri',
    5455                            'description' => 'URL to download the plugin ZIP from. Must be a publicly accessible HTTPS URL ending in .zip. Preferred for larger plugins. Provide exactly one of zip_url or zip_base64.',
    5556                        ),
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/plugins/plugin-directory/tools/class-validate-readme.php

    r14712 r14725  
    3535                        'content' => array(
    3636                            'type'        => 'string',
    37                             'description' => 'The full text content of the readme.txt or readme.md file to validate.',
     37                            'description' => 'The full text content of the readme.txt or readme.md file to validate. Provide either content or url, not both.',
    3838                        ),
    3939                        'url'     => array(
    4040                            'type'        => 'string',
    41                             'description' => 'URL to a readme.txt or readme.md file to fetch and validate. Must end in readme.txt or readme.md.',
     41                            'format'      => 'uri',
     42                            'description' => 'URL to a readme.txt or readme.md file to fetch and validate. Must end in readme.txt or readme.md. Provide either url or content, not both.',
    4243                        ),
    4344                    ),
Note: See TracChangeset for help on using the changeset viewer.