MDM-19 add command catalog discovery#3
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an agent-readable command catalog to the mdm CLI to enable local command discovery (including safety/IO metadata and examples), and updates agent-facing docs/skills plus tests to keep the catalog aligned with the Clap command surface.
Changes:
- Introduce
mdm commands/mdm commands --jsonemitting acommand_catalog.v1envelope and add drift checks against Clap subcommand paths. - Refactor CLI JSON/plain/pretty printing call sites via an
OutputSpecstruct. - Update agent contract docs and
mdm-cli-inspectionskill references; add an integration test for the catalog.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/cli.rs |
Adds the commands subcommand, implements the command catalog, refactors output plumbing, and adds catalog drift/unit tests. |
tests/cli.rs |
Adds an integration test validating mdm commands --json envelope and key catalog properties. |
src/importer.rs |
Small refactors to address clippy warnings (no behavior change intended). |
docs/AGENT_CLI_CONTRACT.md |
Documents mdm commands --json and the new command_catalog.v1 envelope shape/expectations. |
skills/README.md |
Updates skill overview to mention using mdm commands --json for discovery. |
skills/mdm-cli-inspection/SKILL.md |
Adds guidance to use the command catalog for local discovery. |
skills/mdm-cli-inspection/references/query-and-export.md |
Adds a note about mdm commands --json usage. |
skills/mdm-cli-inspection/references/command-patterns.md |
Adds a discovery section showing how to use the catalog. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| It also distinguishes command `--json` response envelopes from | ||
| `mdm export --format json`, which remains raw map document JSON for downstream | ||
| tools. | ||
| tools, and can use `mdm commands --json` as the local command discovery layer. |
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
mdm commands --jsonas an agent-readable command catalog envelope.mdm-cli-inspectionskill docs to use the catalog as the tactical discovery layer.Validation
cargo fmtcargo clippy --all-targets --all-features -- -D warningscargo test --test clicargo testscripts/test-skills.sh --skill mdm-cli-inspection