From 6adad9e9345473702a471d48772370ad22176a39 Mon Sep 17 00:00:00 2001 From: "homeboy-ci[bot]" <266378653+homeboy-ci[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 21:22:06 -0400 Subject: [PATCH] refactor: drop generic WordPress guidance --- inc/Runtime/AgentsMdSections.php | 44 ------------------------------ tests/smoke-agents-md-sections.php | 6 ++++ 2 files changed, 6 insertions(+), 44 deletions(-) diff --git a/inc/Runtime/AgentsMdSections.php b/inc/Runtime/AgentsMdSections.php index 9a8acd15..4df3ca68 100644 --- a/inc/Runtime/AgentsMdSections.php +++ b/inc/Runtime/AgentsMdSections.php @@ -50,8 +50,6 @@ public static function register(): void { self::register_auto_generated_marker($wp); self::register_datamachine_section($wp); self::register_workspace_inventory_section($wp); - self::register_abilities_section(); - self::register_wordpress_source_section(); self::register_multisite_section($wp); } @@ -175,48 +173,6 @@ private static function register_workspace_inventory_section( string $wp ): void ); } - private static function register_abilities_section(): void { - self::register_section( - 'AGENTS.md', 'abilities', 20, function () { - return <<<'MD' -## Abilities - -WordPress Abilities are the universal tool surface. Plugins register abilities that are automatically available via REST API, MCP, and chat. - -Data Machine Code does not currently register a WP-CLI abilities discovery command. Use the active runtime tool listings exposed to MCP/chat/REST, and plugin-specific `--help` output, before assuming what's available. -MD; - }, array( - 'label' => 'Abilities', - 'description' => 'WordPress Abilities API discovery.', - 'owner' => 'data-machine-code', - 'freshness' => 'static', - 'conditions' => 'Always registered when Data Machine Code and composable memory section registration are available.', - ) - ); - } - - private static function register_wordpress_source_section(): void { - self::register_section( - 'AGENTS.md', 'wordpress-source', 30, function () { - return <<<'MD' -## WordPress Source (Read-Only Reference) - -These directories are **read-only reference material** — grep and read them to understand code, but never edit them directly. All code changes go through the workspace (see Code above). - -- `wp-content/plugins/` — plugin source (read-only) -- `wp-content/themes/` — theme source (read-only) -- `wp-includes/` — WordPress core (read-only) -MD; - }, array( - 'label' => 'WordPress Source', - 'description' => 'Pointers to WordPress source directories.', - 'owner' => 'data-machine-code', - 'freshness' => 'static', - 'conditions' => 'Always registered when Data Machine Code and composable memory section registration are available.', - ) - ); - } - private static function register_multisite_section( string $wp ): void { if ( ! is_multisite() ) { return; diff --git a/tests/smoke-agents-md-sections.php b/tests/smoke-agents-md-sections.php index d03eada7..5cab9ad4 100644 --- a/tests/smoke-agents-md-sections.php +++ b/tests/smoke-agents-md-sections.php @@ -70,6 +70,12 @@ function assert_not_contains( string $needle, string $haystack, string $message if ( ! isset($sections['datamachine-code']) ) { throw new RuntimeException('datamachine-code section was not registered'); } + if ( ! isset($sections['workspace-inventory']) ) { + throw new RuntimeException('workspace-inventory section was not registered'); + } + if ( isset($sections['abilities']) || isset($sections['wordpress-source']) ) { + throw new RuntimeException('generic WordPress guidance must be registered by wp-coding-agents'); + } $render = $sections['datamachine-code']['callback']; $default = $render();