Skip to content

fix(cli): CLI consistency report findings(#903)#910

Merged
danielmeppiel merged 11 commits into
microsoft:mainfrom
shreejaykurhade:codex/cli-consistency-fixes
Apr 26, 2026
Merged

fix(cli): CLI consistency report findings(#903)#910
danielmeppiel merged 11 commits into
microsoft:mainfrom
shreejaykurhade:codex/cli-consistency-fixes

Conversation

@shreejaykurhade
Copy link
Copy Markdown
Contributor

@shreejaykurhade shreejaykurhade commented Apr 24, 2026

Description

Fixes the CLI consistency issues reported on 2026-04-24 for APM 0.9.2. #903

Implemented

  • Fixed apm experimental <subcommand> --help so list, enable, disable, and reset show their own subcommand-specific help.
  • Expanded apm mcp install --help to include NAME and supported MCP install options.
  • Updated apm run script output from a leading space to [>] Running script: ....
  • Removed trailing periods from apm pack --dry-run and apm unpack --dry-run help text.
  • Added -y short alias for apm runtime remove --yes.
  • Removed trailing period from the top-level apm outdated description.
  • Added a full apm experimental section to docs/src/content/docs/reference/cli-commands.md.
  • Added regression tests for CLI help and output consistency.
  • Removed unused imports from the affected formatter file.
  • Kept uv.lock aligned with pyproject.toml package version 0.9.2.

Fixes #


Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (where applicable)

Test commands

uv run pytest tests/unit/test_cli_consistency.py tests/unit/test_mcp_command.py -q
# Result: 45 passed

uv run pytest tests/unit/test_cli_consistency.py tests/unit/test_mcp_command.py tests/unit/test_outdated_command.py tests/integration/test_pack_unpack_e2e.py -q
# Result: 70 passed, 2 skipped

uv run pytest tests/unit -q
# Result: 5306 passed, 1 warning

Docs validation

npm run build

Result: docs build completed successfully and internal links are valid.

Manual CLI verification

  • apm experimental list --help
  • apm experimental enable --help
  • apm experimental disable --help
  • apm experimental reset --help
  • apm mcp install --help
  • apm runtime remove --help
  • apm pack --help
  • apm unpack --help
  • apm --help

@shreejaykurhade shreejaykurhade changed the title fixed bugs and improved perf and docs Fix CLI consistency report findings #903 Apr 24, 2026
@shreejaykurhade shreejaykurhade changed the title Fix CLI consistency report findings #903 Fix CLI consistency report findings(#903) Apr 24, 2026
@shreejaykurhade shreejaykurhade changed the title Fix CLI consistency report findings(#903) fix(cli): CLI consistency report findings(#903) Apr 24, 2026
@sergio-sisternes-epam sergio-sisternes-epam added the panel-review Trigger the apm-review-panel gh-aw workflow label Apr 25, 2026
Copy link
Copy Markdown
Contributor

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

This PR addresses CLI consistency report findings for APM 0.9.2 by fixing broken --help surfaces, aligning CLI output/help formatting, and documenting the apm experimental command family in the Starlight CLI reference.

Changes:

  • Fix apm experimental <subcommand> --help routing by removing problematic Click group context settings.
  • Expand apm mcp install to expose NAME + relevant options and forward them to apm install --mcp ...; add regression tests.
  • Normalize CLI output/help text (status symbol for apm run script, remove trailing punctuation, add -y alias for runtime remove) and update CLI reference docs.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
uv.lock Bumps apm-cli lock version to 0.9.2.
tests/unit/test_mcp_command.py Extends help/forwarding assertions for apm mcp install.
tests/unit/test_cli_consistency.py Adds regression tests for help/output consistency items.
src/apm_cli/output/script_formatters.py Updates script header output to use [>] running status.
src/apm_cli/commands/runtime.py Adds -y alias for runtime remove --yes.
src/apm_cli/commands/pack.py Removes trailing periods from --dry-run help strings.
src/apm_cli/commands/outdated.py Removes trailing period from outdated command description.
src/apm_cli/commands/mcp.py Adds explicit NAME + options for mcp install and constructs forwarded argv.
src/apm_cli/commands/experimental.py Removes group context_settings that broke subcommand help.
docs/src/content/docs/reference/cli-commands.md Documents apm mcp install args/options and adds full apm experimental section.

Comment thread src/apm_cli/commands/mcp.py Outdated
Comment on lines +185 to +189
_, post_dd = _split_argv_at_double_dash(_get_invocation_argv())
if post_dd:
pre_args = ctx.args[: len(ctx.args) - len(post_dd)]
forwarded = ["install", "--mcp", *pre_args, "--", *post_dd]
forwarded.extend(["--", *post_dd])
else:
forwarded = ["install", "--mcp", *ctx.args]
forwarded.extend(ctx.args)
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

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

When the invocation includes a -- separator, this branch appends only the post--- tokens and drops any extra pre--- args captured in ctx.args (e.g., install flags not explicitly modeled on apm mcp install). That changes the alias semantics and can silently lose forwarded options whenever post--- argv is present. Preserve forwarding of any pre--- extra args in addition to re-inserting the separator (and add a regression test for an unknown/pre--- flag + post--- argv).

Copilot uses AI. Check for mistakes.
Comment on lines 125 to 128
@runtime.command(help="Remove an installed runtime")
@click.argument("runtime_name", type=click.Choice(["copilot", "codex", "llm"]))
@click.confirmation_option(prompt="Are you sure you want to remove this runtime?", help="Confirm the action without prompting")
@click.confirmation_option("--yes", "-y", prompt="Are you sure you want to remove this runtime?", help="Confirm the action without prompting")
def remove(runtime_name):
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

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

This change adds the -y alias for apm runtime remove, but the apm-guide CLI reference used by the apm-usage skill still lists apm runtime remove with only --yes in its key flags table. Please update packages/apm-guide/.apm/skills/apm-usage/commands.md accordingly so the generated guidance stays consistent with the CLI.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

APM Expert Review Panel — PR #910

Scope: CLI consistency fixes — mcp install options surfacing, experimental context_settings, [>] status symbol, -y alias, trailing-period normalisation, doc expansion, regression tests.

Verdict: APPROVE with one actionable request (CHANGELOG entry) and two low-severity notes.


Python Architect

PASS

The mcp_install refactor is the right architectural move. Replacing blind ctx.args forwarding with explicit @click.option declarations gives Click's type system a chance to validate inputs before they reach the inner cli.main() call. The forwarding loop is readable and exhaustive.

One subtle observation: context_settings={"ignore_unknown_options": True, "allow_extra_args": True} is correctly retained on mcp_install — it is still needed so that post--- argv tokens (captured via _get_invocation_argv() / _split_argv_at_double_dash) do not trigger a Click parse error before the raw-argv seam fires. The ctx.args tail-append (forwarded.extend(ctx.args)) should be a no-op in practice because all known positional/flag slots are now declared, but it acts as a safety net for any edge-case extra tokens. No structural concern.

Removing context_settings from the experimental group is correct. Those settings were vestigial — the group's invoke_without_command + named subcommands never needed ignore_unknown_options; subcommand routing handles option scoping naturally.

Unused rich.tree / rich.box imports removed cleanly.


CLI Logging Expert

PASS

[>] Running script: {name} is the correct fix. The prior " Running script: {name}" (leading space, no bracket symbol) was inconsistent with every other status line in the codebase. [>] maps to the running key in STATUS_SYMBOLS — right semantic, right token. The regression test (test_script_run_header_uses_running_status_symbol) pins this against future drift. Good.

No direct _rich_* calls were added outside of CommandLogger scope. Output paths unchanged.


DevX UX Expert

PASS

Three UX improvements that matter:

  1. apm mcp install NAME [OPTIONS] — previously --help showed nothing but a terse forwarding note. Now it surfaces all supported flags with proper types and descriptions. Discoverability jump from near-zero to npm-comparable. The doc update in cli-commands.md matches the code exactly.

  2. -y, --yes on runtime remove — the short alias is the convention (npm -y, brew install -y). Users muscle-memorise -y; requiring --yes was a paper cut.

  3. Trailing-period normalisation — minor but correct. Click renders command descriptions in a list where inconsistent terminal punctuation is visually jarring. Consistency wins.

The expanded apm experimental documentation is thorough and matches the implemented subcommand surface.


Supply Chain Security Expert

PASS — no new surface

The mcp_install refactor is a security improvement: inputs now go through Click's type system (click.Choice(["stdio", "http", "sse", "streamable-http"]) for --transport, string validation for --url, etc.) before being assembled into the forwarded arg list. The old code forwarded raw ctx.args with no type enforcement. The --no-policy flag forwards to install's existing --no-policy flag, which is already gated in install.py. No new auth/path/integrity surface introduced.

No os.getenv in new code. No path construction from user input outside existing guards.


OSS Growth Hacker — side-channel to CEO

The apm mcp install NAME [OPTIONS] help improvement is a first-run conversion unlock. Previously a new user running apm mcp install --help got a stub; now they get a full option surface comparable to npm install. This removes a friction point that was silently dropping contributors at the "try it" stage. No WIP/growth-strategy.md update required — this is a bug fix, not a positioning move.


APM CEO — Arbitration & Strategic Call

APPROVE — one blocking ask, two non-blocking notes

No specialist disagreements to arbitrate. Strategic read:

This PR is infrastructure polish that pays down UX debt before it compounds. The mcp install surface improvement and the experimental doc expansion are the kind of changes that make the "5-minute first run" goal achievable. Ship it.

[BLOCKING] Missing CHANGELOG entry

Per repo convention (Keep a Changelog + project rules), every PR touching code, tests, or docs must have an ## [Unreleased] entry. This PR has none. The version in pyproject.toml is already 0.9.2 (released 2026-04-23), so the correct target section is [Unreleased]. A single ### Changed bullet covering the substance is sufficient:

### Changed
- `apm mcp install` now declares all options explicitly (`--transport`, `--url`, `--env`, `--header`, `--mcp-version`, `--registry`, `--dev`, `--dry-run`, `--force`, `--no-policy`, `-v`) — improves `--help` discoverability and type-validates inputs before forwarding to `apm install --mcp`. (#910)
- `apm runtime remove` now accepts `-y` as a short alias for `--yes`. (#910)
- `apm experimental` group no longer sets `ignore_unknown_options`/`allow_interspersed_args` — subcommand routing handles option scoping correctly without them. (#910)
- `[>] Running script:` header now uses the canonical STATUS_SYMBOLS bracket notation instead of a bare leading space. (#910)
- Help text trailing-period normalisation across `pack`, `unpack`, `outdated`. (#910)

[NON-BLOCKING] ctx.args tail-append in mcp_install

else:
    forwarded.extend(ctx.args)

With all options now explicitly declared, ctx.args will be empty in every normal invocation. The line is harmless but may confuse future contributors who wonder what it's for. A one-line comment (# safety net for any undeclared extra tokens) or removal would improve clarity.

[NON-BLOCKING] PR title

"fixed bugs and improved perf and docs" understates the mcp install discoverability improvement, which is the most user-impactful change in the PR. Consider "cli: surface mcp install options, -y alias, [>] symbol, doc expansion" for changelog readability. Not blocking.


Quality Gate Summary

Reviewer Status Notes
Python Architect [+] PASS Refactor sound; context_settings removal correct
CLI Logging Expert [+] PASS [>] symbol correct; no output regressions
DevX UX Expert [+] PASS Discoverability jump on mcp install; -y alias; docs match
Supply Chain Security [+] PASS No new surface; type validation is an improvement
APM CEO [!] APPROVE pending CHANGELOG Add [Unreleased] entry before merge
OSS Growth Hacker [i] Noted First-run conversion improved

Bottom line: one CHANGELOG line away from merge.

Generated by PR Review Panel for issue #910 · ● 730.4K ·

Copy link
Copy Markdown
Collaborator

@sergio-sisternes-epam sergio-sisternes-epam left a comment

Choose a reason for hiding this comment

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

Review: fix(cli): CLI consistency report findings (#903)

Thanks for the thorough consistency sweep, @shreejaykurhade. Most of the changes here are clean, well-tested, and welcome. However, two changes need to be reverted, and the mcp install rewrite needs a different approach.

Review methodology: This review incorporates findings from the APM Review Panel -- independent assessments from the Python Architect (structural patterns, drift risk) and DevX UX Expert (command-surface ergonomics, alias semantics). Both reached the same conclusion on the mcp install change independently.


What you need to do

1. Revert the uv.lock version bump

The 0.9.1 -> 0.9.2 change does not belong in a bugfix PR. Version bumps are handled in the release process. Please revert uv.lock to its original state.

2. Revert the mcp install option duplication in mcp.py and use the epilog approach instead

The current approach replaces transparent argument forwarding with 11 explicit @click.option declarations and manual argv reconstruction. This has two problems:

  • Already incomplete: 8 install --mcp options are missing from the duplicated surface (--target/-t, --global/-g, --runtime, --exclude, --update, --trust-transitive-mcp, --parallel-downloads, --only). Running apm mcp install myserver --target cursor will error instead of forwarding.
  • Creates permanent sync burden: every future install option must be mirrored in decorators, function signature, forwarding block, docs, and tests. The Python Architect rated this as O(options^2) maintenance vs O(1) for the passthrough. The DevX UX Expert called it "the CLI equivalent of copy-paste inheritance."
  • Introduces a bug: when -- separator is present, pre--- extra args are silently dropped (also flagged by Copilot).

What to do instead: Restore the original ignore_unknown_options + allow_extra_args forwarding, but add a declared NAME argument and use Click's epilog= parameter to list common options. This gives --help discoverability without any sync burden. See the inline comment on mcp.py for the recommended code pattern.

3. Resolve merge conflicts

The PR currently has a dirty merge state.


Non-blocking improvements (nice to have in this PR)

  • pack.py: the trailing-period removal is incomplete -- --force and --output still end with periods. An all-or-nothing sweep per file avoids internal inconsistency.
  • runtime.py: update packages/apm-guide/.apm/skills/apm-usage/commands.md to include the -y alias (also flagged by Copilot).
  • test_cli_consistency.py: the outdated column-width assertion is fragile -- checking exact spacing will break if Click changes column padding. Assert the substring without padding instead.

What works well (no changes needed)

  • experimental group fix -- restores subcommand --help routing; root-caused correctly
  • runtime remove -y -- good parity with deps clean and marketplace remove
  • [>] status symbol -- matches STATUS_SYMBOLS convention
  • apm experimental docs -- thorough, matches existing reference structure
  • Regression tests -- well-targeted, lock the --help contract

Comment thread src/apm_cli/commands/mcp.py
Comment thread src/apm_cli/commands/mcp.py Outdated
Comment on lines +185 to +189
_, post_dd = _split_argv_at_double_dash(_get_invocation_argv())
if post_dd:
pre_args = ctx.args[: len(ctx.args) - len(post_dd)]
forwarded = ["install", "--mcp", *pre_args, "--", *post_dd]
forwarded.extend(["--", *post_dd])
else:
forwarded = ["install", "--mcp", *ctx.args]
forwarded.extend(ctx.args)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Bug: pre--- extra args silently dropped when -- is present.

Old code preserved both pre- and post--- args:

pre_args = ctx.args[: len(ctx.args) - len(post_dd)]
forwarded = ["install", "--mcp", *pre_args, "--", *post_dd]

New code only forwards post--- tokens:

forwarded.extend(["--", *post_dd])  # pre-DD ctx.args: gone

This silently drops flags before -- that are not in the explicit option list, breaking existing working invocations. Also flagged by Copilot.

Comment on lines +127 to 128
@click.confirmation_option("--yes", "-y", prompt="Are you sure you want to remove this runtime?", help="Confirm the action without prompting")
def remove(runtime_name):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: update packages/apm-guide/.apm/skills/apm-usage/commands.md to include the -y alias so generated guidance stays consistent with the CLI. (Also flagged by Copilot.)

Comment thread uv.lock Outdated
[[package]]
name = "apm-cli"
version = "0.9.1"
version = "0.9.2"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Revert: version bump does not belong in a bugfix PR.

0.9.1 -> 0.9.2 should be handled in the release process, not bundled with CLI consistency fixes. It forces version coordination on every other in-flight PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread src/apm_cli/commands/pack.py
Comment on lines +57 to +60
assert result.exit_code == 0
assert "outdated Show outdated locked dependencies." not in result.output
assert "outdated Show outdated locked dependencies" in result.output

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: this assertion is fragile. Checking exact column spacing ("outdated Show...") will break if Click changes column widths. Consider asserting just the substring without padding.

@@ -140,7 +140,6 @@ def _handle_unknown_flag(name: str, logger: CommandLogger) -> None:
@click.group(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good fix. Removing context_settings restores subcommand --help routing -- exactly the right call.

def test_script_run_header_uses_running_status_symbol():
formatter = ScriptExecutionFormatter(use_color=False)

assert formatter.format_script_header("build", {})[0] == "[>] Running script: build"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Well-targeted regression tests that lock the --help contract. Good addition.

@shreejaykurhade
Copy link
Copy Markdown
Contributor Author

shreejaykurhade commented Apr 25, 2026

@sergio-sisternes-epam @danielmeppiel
Addressed the requested changes:

  • restored mcp install passthrough with NAME + epilog
  • reverted uv.lock version bump
  • resolved runtime merge conflicts preserving -y and main’s runtime list
  • updated commands.md and fragile help assertion

@danielmeppiel danielmeppiel added panel-review Trigger the apm-review-panel gh-aw workflow and removed panel-review Trigger the apm-review-panel gh-aw workflow labels Apr 26, 2026
@github-actions
Copy link
Copy Markdown

APM Review Panel Verdict

Disposition: REQUEST_CHANGES (one required pre-merge fix, then approve)


Per-persona findings

Python Architect:

This is a routine CLI consistency fix. No class hierarchies change; the touched code is entirely procedural Click decorators and output strings.

1. OO / class diagram

classDiagram
    direction TB
    class ScriptExecutionFormatter {
      <<IOBoundary>>
      -use_color bool
      -console Console
      +format_script_header(name, params) List
      +format_completion() List
      +_styled(text, style) str
    }
    class ExperimentalGroup {
      <<Pure>>
      invoke_without_command=True
      +experimental(ctx, verbose)
    }
    class McpInstallCommand {
      <<Pure>>
      ignore_unknown_options=True
      allow_extra_args=True
      +mcp_install(ctx, name)
    }
    class PackCommand {
      <<Pure>>
      +pack_cmd(ctx, ...)
      +unpack_cmd(ctx, ...)
    }
    class RuntimeCommand {
      <<Pure>>
      +remove(runtime_name)
    }
    class CommandLogger {
      +progress(msg)
      +error(msg)
    }
    ExperimentalGroup ..> CommandLogger : creates
    McpInstallCommand ..> CommandLogger : creates
    PackCommand ..> CommandLogger : creates
    RuntimeCommand ..> CommandLogger : creates
    ScriptExecutionFormatter ..> Console : "[I/O]"

    class ScriptExecutionFormatter:::touched
    class ExperimentalGroup:::touched
    class McpInstallCommand:::touched
    class PackCommand:::touched
    class RuntimeCommand:::touched
    classDef touched fill:#fff3b0,stroke:#d47600
Loading

2. Execution flow diagram

Key behavioral change: mcp_install now declares name as an explicit positional argument.

flowchart TD
    A["apm mcp install NAME [..opts] [-- cmd argv]"]
    A --> B["Click: name=NAME\nctx.args=[..opts]"]
    B --> C{"post '--' args\nin raw argv?"}
    C -- yes --> D["_split_argv_at_double_dash()\n[FS] reads sys.argv"]
    C -- no --> E["forwarded =\n['install','--mcp', name, *ctx.args]"]
    D --> F["forwarded =\n['install','--mcp', name, *pre_args,\n'--', *post_dd]"]
    F --> G["cli.main(forwarded, standalone_mode=False)"]
    E --> G
    G --> H["[install] apm install --mcp NAME [..opts]"]

    style D fill:#ffe8b0,stroke:#c07000
Loading

Previously name was the implicit first element of ctx.args; the forwarded list was ["install", "--mcp", *ctx.args]. Functionally equivalent output, but the new declaration:

  • fails fast with Click's "Missing argument 'NAME'" when name is omitted
  • allows apm mcp install --help to show the command's own help (epilog) instead of forwarding --help to apm install --mcp --help

experimental.py: removing context_settings={"allow_interspersed_args": True, "ignore_unknown_options": True} from the @click.group is the correct fix. Those settings caused the group to consume options intended for subcommands, breaking apm experimental list --help.

Design patterns

  • Used in this PR: none -- straight-line procedural code, appropriate for the scope.
  • Pragmatic suggestion: none -- the current shape is the simplest correct design at this scope.

Bug: tests/unit/test_mcp_command.py:494 asserts assert "--mcp-version" in result.output but the mcp.py epilog does NOT include --mcp-version. After this PR, apm mcp install --help shows the command's own help (Click intercepts --help before requiring NAME); the epilog lists --transport / --url / --env / --header / --registry but omits --mcp-version. This assertion will fail in CI. Fix: add " --mcp-version VER Pin registry entry to a specific version\n" to the epilog string in src/apm_cli/commands/mcp.py.


CLI Logging Expert: All output changes are correct. script_formatters.py adopts [>] -- the right STATUS_SYMBOLS["running"] bracket notation for in-progress operations -- in both the color and no-color paths. Unused rich.tree.Tree and rich.box imports are removed. No _rich_* calls introduced directly in command functions; all output still routes through ScriptExecutionFormatter or CommandLogger. Missing newline at end of file also fixed. No logging anti-patterns.


DevX UX Expert: All ergonomic improvements align with package-manager conventions.

  • -y alias for --yes on runtime remove: standard (npm -y, brew -y). Correct.
  • Trailing period removal from help strings: consistent with npm/cargo/gh. Correct.
  • apm experimental <sub> --help fix: this was a genuine discoverability break. Users who typed apm experimental list --help received the group help, not the list subcommand help. The fix is essential.
  • apm mcp install NAME now fails fast with a clear "Missing argument 'NAME'" message rather than silently forwarding an empty name. Better ergonomics.
  • Docs sync: cli-commands.md gains a full apm experimental reference and apm mcp install option table. packages/apm-guide/.apm/skills/apm-usage/commands.md updated with -y alias. Rule 4 complied with.

Minor nit (not a blocker): pack.py (unpack section) still has --skip-verify ("Skip bundle completeness check.") and --force ("Deploy despite critical hidden-character findings.") with trailing periods, inconsistent with the other options cleaned up in this PR. Fine to address in a follow-up.


Supply Chain Security Expert: No security findings. The mcp_install forwarding logic is structurally equivalent before and after this PR -- name moves from the implicit first element of ctx.args to an explicitly declared argument; the final forwarded args list is the same. No new path construction, no new env var reads, no new subprocess calls, no new HTTP calls. Fails-closed posture is unchanged.


Auth Expert: Not activated -- the diff touches only CLI command surface files (experimental.py, mcp.py, outdated.py, pack.py, runtime.py), an output formatter (script_formatters.py), tests, and docs; none of these affect authentication, token management, credential resolution, or host classification.


OSS Growth Hacker: Positive conversion signal. This PR directly improves discoverability on two growing surfaces: apm experimental (the feature-flag system) and apm mcp install (the MCP ecosystem on-ramp). Better --help output = fewer drop-offs at first contact. The -y alias delivers the "fast path for power users" feel that package manager users expect. Story fit: "APM 0.9.2 polish: every --help now works, every flag is documented" -- clean CHANGELOG beat.

Side-channel to CEO: the missing --mcp-version in the epilog is a discovery gap worth fixing before merge. Version pinning is a key trust signal for enterprise users evaluating MCP server adoption; hiding it from --help undermines that narrative.


CEO arbitration

All five specialists are in agreement: this is a low-risk, high-value consistency patch that improves discoverability and ergonomics with no security or architectural regressions. The only concrete blocker is the --mcp-version epilog/test mismatch -- one line to add to src/apm_cli/commands/mcp.py. Once that fix lands, this PR ships a clean, story-shaped 0.9.2 beat: every subcommand help works, every flag is discoverable, -y saves the keystroke your users expect. The Growth Hacker's side-channel point on --mcp-version as a trust/discovery signal reinforces the security expert's "fails closed" posture and is worth the single-line fix. No disagreements to arbitrate; disposition stands at REQUEST_CHANGES pending that one fix, then APPROVE.


Required actions before merge

  1. src/apm_cli/commands/mcp.py -- add --mcp-version to epilog. tests/unit/test_mcp_command.py:494 asserts assert "--mcp-version" in result.output but the epilog does not include it. CI will fail. Add the following line to the epilog string (after the --registry line):
    "  --mcp-version VER    Pin registry entry to a specific version\n"

Optional follow-ups

  • src/apm_cli/commands/pack.py (unpack section, ~line 107): --skip-verify ("Skip bundle completeness check.") and --force ("Deploy despite critical hidden-character findings.") still carry trailing periods; consider a uniform cleanup pass in a follow-up PR for full consistency.
  • Add a CHANGELOG.md entry under ## [Unreleased] / Fixed covering the help-text and output-symbol consistency improvements from this PR (per the Keep a Changelog convention in the repo).

Generated by PR Review Panel for issue #910 · ● 621.2K ·

@shreejaykurhade
Copy link
Copy Markdown
Contributor Author

shreejaykurhade commented Apr 26, 2026

@danielmeppiel @sergio-sisternes-epam Fixed the requested pre-merge issue by adding --mcp-version to the apm mcp install --help epilog.

Verified with:
python -m apm_cli.cli mcp install --help
python -m pytest tests\unit\test_mcp_command.py::TestMcpInstallAlias::test_help_shows_alias_message_and_example

The help output now includes:
--mcp-version VER Pin registry entry to a specific version

@danielmeppiel danielmeppiel added this pull request to the merge queue Apr 26, 2026
Merged via the queue into microsoft:main with commit 6d93836 Apr 26, 2026
9 checks passed
@danielmeppiel danielmeppiel mentioned this pull request Apr 27, 2026
3 tasks
danielmeppiel added a commit that referenced this pull request Apr 27, 2026
* chore(release): cut 0.9.4

CHANGELOG entry for 0.9.4 covers all 7 PRs merged since v0.9.3:

- #974 SKILL_BUNDLE day-0 install parity (Added)
- #954 automate apm-triage-panel workflow (Added)
- #970 python-architect mermaid classDiagram trap (Changed)
- #911 REQUESTS_CA_BUNDLE TLS validation (Fixed)
- #971 triage-panel project-sync dispatch (Fixed)
- #910 CLI consistency cleanup (Fixed)
- #958 issue templates label taxonomy (Fixed)
- #953 docs auto-deploy after bot-cut releases (Fixed)

Open milestone 0.9.4 issues (41) reassigned to 0.9.5.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore(changelog): tighten 0.9.4 entries (so-what for developers)

Refactor per Keep-a-Changelog spirit: lead with developer impact,
trim agent-internals prose, group maintainer-only changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore(changelog): add #660 install.sh air-gapped entry to 0.9.4

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
sergio-sisternes-epam pushed a commit that referenced this pull request May 19, 2026
* fixed bugs and improved perf and docs

* fix(cli): restore mcp install passthrough forwarding

* fix(cli): resolve runtime remove merge conflict

* fix(cli): document --mcp-version in mcp install help

---------

Co-authored-by: Daniel Meppiel <51440732+danielmeppiel@users.noreply.github.com>
sergio-sisternes-epam pushed a commit that referenced this pull request May 19, 2026
* chore(release): cut 0.9.4

CHANGELOG entry for 0.9.4 covers all 7 PRs merged since v0.9.3:

- #974 SKILL_BUNDLE day-0 install parity (Added)
- #954 automate apm-triage-panel workflow (Added)
- #970 python-architect mermaid classDiagram trap (Changed)
- #911 REQUESTS_CA_BUNDLE TLS validation (Fixed)
- #971 triage-panel project-sync dispatch (Fixed)
- #910 CLI consistency cleanup (Fixed)
- #958 issue templates label taxonomy (Fixed)
- #953 docs auto-deploy after bot-cut releases (Fixed)

Open milestone 0.9.4 issues (41) reassigned to 0.9.5.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore(changelog): tighten 0.9.4 entries (so-what for developers)

Refactor per Keep-a-Changelog spirit: lead with developer impact,
trim agent-internals prose, group maintainer-only changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore(changelog): add #660 install.sh air-gapped entry to 0.9.4

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

panel-review Trigger the apm-review-panel gh-aw workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants