Refactor CLI agent guidance to concise routing#128
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WP_CLI::add_command()behavior unchanged.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
extrachill platform health,extrachill analytics summaryextrachill events --help,extrachill venues --helpextrachill artists --help,extrachill users --help,extrachill community --helpextrachill content --help,extrachill newsletter --helpextrachill analytics errors,extrachill analytics 404 summary,extrachill cache statusMultisite and discovery
The renderer preserves the composed WP-CLI command prefix exactly, including an existing
--urltarget. 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 --helpand nestedwp ... extrachill <namespace> --helpare explicitly authoritative for the complete live command, subcommand, and options contract.Rendered size
Verification
php tests/AgentsMdSectionTest.php- passedhomeboy.json- passedphp -lfor all changed PHP files - passedhomeboy review lint extrachill-cli --path=<worktree> --changed-only --placement=local --summary- passed with PHPCS and PHPStan cleanhomeboy review test extrachill-cli --path=<worktree> --skip-lint --placement=local --json-summary- the new test passed, then the aggregate Codebox runner hit the pre-existingget_user_by()redeclaration inConcertTrackingCommandTest.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