feat(agents-md): contribute homeboy CLI section when on PATH#56
Merged
Conversation
062cb0c to
5d20678
Compare
753aaee to
ba2fb41
Compare
Adds optional Homeboy awareness to data-machine-code. When the `homeboy` Rust CLI (https://github.com/Extra-Chill/homeboy) is callable from this host's shell, AGENTS.md gains a `## Homeboy` section that teaches agents the verb surface and the release-automation rules they must respect inside Homeboy-managed repos. Why this lives here: data-machine-code is the bridge between WordPress and an external coding-agent runtime. Surfacing extra CLI tools the runtime can call (`homeboy`, on top of `git`, `wp-cli`, etc.) is exactly the kind of thing that belongs in the bridge layer. Homeboy itself stays PHP-free. What the section teaches agents (only when `homeboy` is on PATH): - The verb surface — `audit`, `lint`, `test`, `git <verb>`, `deploy`, `component list`, `release` — with `homeboy --help` as the canonical source of truth for the full list. - Release-automation rules for any repo with a `homeboy.json`: - NEVER edit `CHANGELOG.md` — Homeboy generates it from conventional commits at release time. - NEVER hand-bump version strings — Homeboy rewrites version targets declared in `homeboy.json` automatically from `feat:` / `fix:` / `BREAKING CHANGE` commits. - Use conventional commits; `feat:` / `fix:` trigger releases. Mirrors how DMC's existing `## Abilities` section works: teach the discovery primitive (`homeboy --help`), trust the CLI to be its own source of truth. Don't enumerate state in AGENTS.md that the tool can list itself. `DataMachineCode\Homeboy` mirrors the shape of `Environment`: - `is_available()` — single shell probe via `command -v homeboy`, memoized for the request lifecycle. - `reset_cache()` — test-only seam. Hard-gated on `Environment::has_shell()` so hosts with `shell_exec` disabled get a graceful false, never a fatal. Tests: tests/smoke-homeboy.php — 5 assertions on the probe across no-shell / empty-PATH / synthetic-on-PATH / memoization / reset_cache branches. Pure-PHP, no WP bootstrap, deterministic via PATH override.
ba2fb41 to
eeac395
Compare
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
When the
homeboyRust CLI is on PATH, AGENTS.md gains a## Homeboysection that maps the verbs agents reach for and the repo-level rules they must respect.Adds:
inc/Homeboy.php— capability helper. Singlecommand -v homeboyprobe, memoized, hard-gated onEnvironment::has_shell().wordpress-sourceandmultisite).tests/smoke-homeboy.php— 5 assertions across no-shell / empty-PATH / synthetic-on-PATH / memoization / reset_cache.Design
Sits on top of #57 (DMC = WP↔runtime bridge). Mirrors the house style of
## Data Machineand## Abilities: terse map, bold sub-labels, one discoverability hint at the end. The CLI is its own source of truth —homeboy --helpenumerates everything; this section calls out the verbs agents should reach for and the repo rules that protect release automation.Section content (preview)
Tests
Pure-PHP, no WP bootstrap. Deterministic via PATH override.
AI assistance
release,deploy,fleetas primary; missedbenchandrig); second draft over-explained ("prefer-over-raw-git" essay paragraphs). Chris pushed back on both ("you overcorrected"; "match the house style — minimal, clean map") and the section was tightened to mirror## Data Machinedensity.