Skip to content

MDM-19 add command catalog discovery#3

Merged
dudash merged 2 commits into
mainfrom
codex-mdm-19-command-catalog
May 17, 2026
Merged

MDM-19 add command catalog discovery#3
dudash merged 2 commits into
mainfrom
codex-mdm-19-command-catalog

Conversation

@dudash
Copy link
Copy Markdown
Owner

@dudash dudash commented May 17, 2026

Summary

  • Add mdm commands --json as an agent-readable command catalog envelope.
  • Include command paths, args, flags, output modes, formats, examples, docs/skill pointers, and safety metadata.
  • Add catalog drift coverage against Clap definitions and an integration test for the emitted catalog.
  • Update the agent CLI contract and mdm-cli-inspection skill docs to use the catalog as the tactical discovery layer.
  • Fix clippy warnings surfaced by CI.

Validation

  • cargo fmt
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --test cli
  • cargo test
  • scripts/test-skills.sh --skill mdm-cli-inspection

Copilot AI review requested due to automatic review settings May 17, 2026 22:08
@dudash dudash merged commit 1789177 into main May 17, 2026
6 checks passed
@dudash dudash deleted the codex-mdm-19-command-catalog branch May 17, 2026 22:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --json emitting a command_catalog.v1 envelope and add drift checks against Clap subcommand paths.
  • Refactor CLI JSON/plain/pretty printing call sites via an OutputSpec struct.
  • Update agent contract docs and mdm-cli-inspection skill 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.

Comment thread skills/README.md
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.
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.

2 participants