cli: unify datamachine agent / agents — one noun, one class#1174
Merged
cli: unify datamachine agent / agents — one noun, one class#1174
Conversation
Realigns 'agent' with the project's singular/plural aliasing convention (flow/flows, pipeline/pipelines, post/posts, handler/handlers, etc.). Before: datamachine agent → MemoryCommand datamachine agents → AgentsCommand datamachine memory → MemoryCommand After: datamachine agent → AgentsCommand (aliased to plural) datamachine agents → AgentsCommand (unchanged) datamachine memory → MemoryCommand (canonical home for memory ops) Users can now reflexively type 'wp datamachine agent list' (like every other DM noun) and get the expected AgentsCommand dispatch instead of 'Error: list is not a registered subcommand of datamachine agent'. Breaking: 'wp datamachine agent <memory-verb>' (read, write, search, paths, sections, compose, daily, files) no longer works — callers migrate to 'wp datamachine memory <verb>', which has been a registered alias for the same class since day one. Docs + MemoryCommand docblocks/usage strings updated to use the canonical 'wp datamachine memory' form throughout. Historical CHANGELOG entries left untouched. Closes #1172 AI assistance: Yes Tool(s): Claude Code (Opus 4.7) Used for: drafted the Bootstrap.php swap, swept doc references from 'wp datamachine agent <memory-verb>' to 'wp datamachine memory <verb>', and updated MemoryCommand docblocks/error strings. Chris reviewed the plan in issue #1172 and greenlit the hard-swap path.
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.
Closes #1172.
Summary
Realigns
datamachine agent/datamachine agentswith the project's singular/plural aliasing convention. Every other DM noun (flow/flows, pipeline/pipelines, post/posts, handler/handlers, job/jobs, block/blocks, step-type/step-types, processed-item/processed-items, setting/settings, log/logs, link/links) routes both forms to the same class.agentwas the lone outlier, routing toMemoryCommandinstead of theAgentsCommandthatagentsroutes to.Change
One-line swap in
inc/Cli/Bootstrap.php:Post-fix command map:
wp datamachine agent <verb>AgentsCommand(new — aliased to plural)wp datamachine agents <verb>AgentsCommand(unchanged)wp datamachine memory <verb>MemoryCommand(unchanged — canonical home for memory ops)Users can now reflexively type
wp datamachine agent list,agent show,agent create— matching the muscle memory from every other noun — and get the expected dispatch instead ofError: 'list' is not a registered subcommand of 'datamachine agent'.Breaking change
The singular memory-verb forms are gone:
Low blast radius per #1172's analysis:
wp datamachine memory <verb>has been a registered alias forMemoryCommandsince day one, so every caller has a stable replacement; theagentsingular was never intuitive for memory ops (natural English is "agent's memory", not "agent read"); and external callers are small in number today.Docs swept
README.md— discovery command updateddocs/overview.md— discovery command updateddocs/core-system/wp-cli.md—agentsection renamed tomemory, alias list updated, workflow example migrateddocs/core-system/wordpress-as-agent-memory.md— all path-discovery and memory-access snippets migrated (17 refs)docs/core-system/daily-memory-system.md— daily-memory CLI section migrated (6 refs)docs/core-system/ephemeral-workflows.md— stale reference fixed (agent→chat)inc/Cli/Commands/MemoryCommand.php— all 52 docblock examples +WP_CLI::error()usage strings migratedinc/Engine/AI/ComposableFileInvalidation.php— comment updateddocs/CHANGELOG.mdleft untouched per repo convention (homeboy generates it at release time from git commits).Acceptance criteria
wp datamachine agent list|create|show|delete|rename|access|config|export|import|token|cleanup-legacy-context-filesroute toAgentsCommand(aliased to plural)wp datamachine agents ...continues to work unchangedwp datamachine memory ...continues to work unchanged and is the canonical home for memory-file opswp datamachine agent <memory-verb>updated towp datamachine memory <verb>Commit message covers the breaking rename + points to the replacement; that becomes the user-facing changelog entry on release.
AI assistance
wp datamachine agent <memory-verb>towp datamachine memory <verb>, updated MemoryCommand docblocks/error strings. Chris filed the planning issue (CLI: unifydatamachine agent/datamachine agents— one noun, one class (like every other DM noun) #1172) and greenlit the hard-swap path; I executed the mechanical changes against that plan.