Skip to content

Refactor CLI agent guidance to concise routing#128

Merged
chubes4 merged 1 commit into
mainfrom
refactor/126-concise-agents-guidance
Jul 27, 2026
Merged

Refactor CLI agent guidance to concise routing#128
chubes4 merged 1 commit into
mainfrom
refactor/126-concise-agents-guidance

Conversation

@chubes4

@chubes4 chubes4 commented Jul 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace exhaustive reflected command injection with stable Extra Chill CLI ownership, intent-based routing, multisite guidance, and discovery.
  • Remove AGENTS-only reflection and non-CLI command-class autoloading while leaving the runtime command registry and WP_CLI::add_command() behavior unchanged.
  • Add focused contracts for retained routes, command-prefix preservation, multisite targeting, bounded output, and authoritative live discovery.

Why

Injecting every mutable CLI action and PHPDoc summary made Extra Chill CLI the largest AGENTS.md contributor and duplicated the contract already exposed by WP-CLI. It increased prompt size and coupled guidance composition to command-class reflection. This follows the coordinated concise-routing approach from Extra-Chill/data-machine-code#950, Automattic/intelligence#898, and Extra-Chill/wp-coding-agents#299: AGENTS.md keeps stable ownership, default routing, safety/policy, and discovery, while live help owns exhaustive mutable detail.

Default routes retained

  • Platform health and analytics: extrachill platform health, extrachill analytics summary
  • Events and venues: extrachill events --help, extrachill venues --help
  • Artists, users, and community: extrachill artists --help, extrachill users --help, extrachill community --help
  • Content and newsletters: extrachill content --help, extrachill newsletter --help
  • Diagnostics: extrachill analytics errors, extrachill analytics 404 summary, extrachill cache status

Multisite and discovery

The renderer preserves the composed WP-CLI command prefix exactly, including an existing --url target. The guidance directs agents to use --url=<site-url> for abilities or data owned by another network site and states that an untargeted invocation uses the main site.

wp ... extrachill --help and nested wp ... extrachill <namespace> --help are explicitly authoritative for the complete live command, subcommand, and options contract.

Rendered size

  • Before: 148 lines / 10,444 bytes
  • After: 16 lines / 1,810 bytes
  • Reduction: 132 lines / 8,634 bytes

Verification

  • php tests/AgentsMdSectionTest.php - passed
  • All 14 declared standalone test commands in homeboy.json - passed
  • php -l for all changed PHP files - passed
  • homeboy review lint extrachill-cli --path=<worktree> --changed-only --placement=local --summary - passed with PHPCS and PHPStan clean
  • homeboy review test extrachill-cli --path=<worktree> --skip-lint --placement=local --json-summary - the new test passed, then the aggregate Codebox runner hit the pre-existing get_user_by() redeclaration in ConcertTrackingCommandTest.php; tracked separately in Fix standalone test stubs under the Homeboy Codebox runner #127. The same full declared suite passes when run through its configured standalone commands.

Closes #126

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor AGENTS guidance from exhaustive CLI inventory to concise routing

1 participant