Skip to content

docs(reference): reground CLI reference, apm-usage and help text for 0.37 - #3949

Merged
Daniel Meppiel (danielmeppiel) merged 8 commits into
mainfrom
danielmeppiel-docs-037-sweep
Nov 19, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 8 commits into
mainfrom
danielmeppiel-docs-037-sweep

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

Description

TL;DR — Wave 1 of the 0.37 docs sweep for the reference surface. It updates reference/cli/*, the other reference pages, specs/conformance.md, the apm-usage skill (Rule 4) and four CLI help strings so they describe 0.37 behaviour. The Python edits change help text only.

Problem (WHY)

0.37 changed observable behaviour (see CHANGELOG.md [Unreleased]), and the reference pages had not caught up:

Approach (WHAT) / Implementation (HOW)

Area Change
reference/cli/{audit,lock,pack,prune}.md Exit or behaviour rows cover the #3916 newer-lockfile refusal
reference/cli/{compile,targets}.md, reference/targets-matrix.md vscode alias, root .mcp.json, intellij caveat, Codex plugin manifest; vscode is the only alias that warns (agents does not)
reference/cli/{config,find,lifecycle,marketplace,plugin,unpack}.md Small factual fixes: default_client seed is copilot; find --path direction; run key accepted; remove --yes; the non-existent marketplace init --yes removed; one link made relative
reference/{policy-schema,environment-variables,primitive-types}.md #3788 transport check scope, #3894 leading-zero example, the registry token env-var name rule, two stale "future" bullets removed
reference/common-errors.md One pointer to troubleshooting/common-errors (the 0.37 entries live there, in the companion PR)
specs/conformance.md Skipped set now includes req-na-001–007 (#3929); the wrong req-cf-001 citation is removed
apm-usage/{SKILL,authentication,package-authoring,workflow}.md Root .mcp.json in the commit lists; apm update replaces --update; targets: examples; the marketplace: block key packages:; pack exit codes; Codex plugin.json; bundle hooks (#3897)
core/target_catalog.py target_help_fragment appends the deprecated-alias note, generated from DEPRECATED_TARGET_ALIASES
commands/install.py, commands/marketplace/__init__.py, commands/pack.py Help strings for --refresh and --target intellij, marketplace update / add --path, and the pack table (now targets:, with layout kept by \b)

Trade-offs

Issue and approved scope

Issue: Refs #3948

Human scope-approval comment: #3948 (comment)

Does this PR complete the issue, or what remains? Partial. The companion guides PR and a follow-up for the #3918/#3290-owned pages remain.

Type of change

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

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)
Validation evidence
$ uv run --with pytest python -m pytest -q tests/unit/core/test_target_catalog.py tests/unit/policy/test_help_consistency.py \
    tests/unit/test_cli_consistency.py tests/unit/test_cli_consistency_checker_workflow.py tests/unit/test_tls_docs_scope.py \
    tests/unit/test_project_licensing.py tests/integration/test_marker_registry_sync.py tests/unit/test_cli_lazy_dispatch.py
100 passed
$ uvx [email protected] check src/ tests/        -> All checks passed
$ uvx [email protected] format --check src/ tests/ -> 2336 files already formatted
$ pylint --disable=all --enable=R0801 --min-similarity-lines=10 --fail-on=R0801 src/apm_cli/ ... -> 10.00/10
$ bash scripts/lint-auth-signals.sh -> [+] auth-signal lint clean

Every added docs link and anchor was checked to resolve to an existing page or heading. All added text is printable ASCII.

Changelog

  • One line in one section under ## [Unreleased] in CHANGELOG.md
  • N/A -- internal-only change (CI, tests, refactor). Docs and help text only; they describe behaviour that already has CHANGELOG entries.

Spec conformance (OpenAPM v0.1)

  • N/A -- this PR does not change OpenAPM-observable behaviour.

How to test

  • uv run apm install --help: the --target values note 'vscode' is a deprecated alias of 'copilot' and apm.yml cannot record intellij
  • uv run apm marketplace --help: update reads "Revalidate marketplace cache; exit 1 if any marketplace fails"
  • uv run apm pack --help: the table keeps its layout and lists targets:

Co-authored-by: Copilot [email protected]

…0.37

Refs #3948. Wave 1 of the 0.37 docs sweep (docs-corpus-audit):
reference/cli, reference pages, specs/conformance, the apm-usage skill
(Rule 4) and four CLI help strings. Help-text-only Python edits.

Co-authored-by: Copilot App <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The policy documentation incorrectly states that unresolved transports are always blocked, although default enforcement: warn only emits a warning; the claim needs to be qualified with enforcement: block.

1 open issue
What changed in this PR

Updates APM's reference documentation, usage skill, and CLI help to reflect 0.37 behavior. This delivers the reference-focused portion of #3948; companion guides and pages owned by in-flight changes remain separate.

Changes:

  • Documents target aliases, root .mcp.json, IntelliJ restrictions, and plural targets: examples.
  • Aligns guidance with marketplace revalidation, newer-lockfile refusal, Codex manifests, and bundle hooks.
  • Corrects command examples, defaults, policy details, and conformance descriptions without changing operational behavior.
File Description
src/​apm_cli/​core/​target_catalog.py Generates deprecated-alias notes for target help.
src/​apm_cli/​commands/​pack.py Updates targets: wording and preserves help-table layout.
src/​apm_cli/​commands/​marketplace/​__init__.py Clarifies marketplace path and revalidation help.
src/​apm_cli/​commands/​install.py Explains IntelliJ restrictions and refresh failures.
packages/​apm-guide/​.apm/​skills/​apm-usage/​workflow.md Adds root MCP config to commit guidance and clarifies deprecated configuration.
packages/​apm-guide/​.apm/​skills/​apm-usage/​SKILL.md Includes root .mcp.json in commit guidance.
packages/​apm-guide/​.apm/​skills/​apm-usage/​package-authoring.md Updates targets, bundle hooks, Codex manifests, and marketplace examples.
packages/​apm-guide/​.apm/​skills/​apm-usage/​authentication.md Refreshes marketplace and update terminology.
docs/​src/​content/​docs/​specs/​conformance.md Clarifies statement generation and skipped requirements.
docs/​src/​content/​docs/​reference/​targets-matrix.md Documents Copilot MCP placement, aliases, Codex manifests, and IntelliJ selection.
docs/​src/​content/​docs/​reference/​primitive-types.md Removes already-delivered features from future plans.
docs/​src/​content/​docs/​reference/​policy-schema.md Adds strict version and effective-transport guidance.
docs/​src/​content/​docs/​reference/​environment-variables.md Corrects registry-token variable normalization.
docs/​src/​content/​docs/​reference/​common-errors.md Links to expanded troubleshooting guidance.
docs/​src/​content/​docs/​reference/​cli/​unpack.md Uses a relative executable-approval link.
docs/​src/​content/​docs/​reference/​cli/​targets.md Explains vscode and IntelliJ handling.
docs/​src/​content/​docs/​reference/​cli/​prune.md Documents newer-lockfile refusal.
docs/​src/​content/​docs/​reference/​cli/​plugin.md Removes unsupported marketplace init --yes.
docs/​src/​content/​docs/​reference/​cli/​pack.md Prioritizes targets: and documents newer-lockfile refusal.
docs/​src/​content/​docs/​reference/​cli/​marketplace.md Includes the remove command's --yes option.
docs/​src/​content/​docs/​reference/​cli/​lock.md Documents newer-lockfile refusal and upgrade guidance.
docs/​src/​content/​docs/​reference/​cli/​lifecycle.md Includes run among accepted command-script keys.
docs/​src/​content/​docs/​reference/​cli/​find.md Corrects dependency-chain direction.
docs/​src/​content/​docs/​reference/​cli/​config.md Corrects the initial default client to copilot.
docs/​src/​content/​docs/​reference/​cli/​compile.md Updates aliases, command names, target examples, and watcher behavior.
docs/​src/​content/​docs/​reference/​cli/​audit.md Adds newer-lockfile refusal to exit-code descriptions.

Review effort: Balanced

@danielmeppiel

Copy link
Copy Markdown
Collaborator Author

APM Review Panel: ship_with_followups

Wave 1 of the 0.37 docs sweep brings the CLI reference, apm-usage and --help text back in line with the code. One intellij wording fix is needed, plus a few precision nits.

panel-mode=full; personas=doc-writer,devx-ux-expert,python-architect,test-coverage-expert,apm-ceo

cc Sergio Sisternes (@sergio-sisternes-epam) -- a fresh advisory pass is ready for your review.

This PR keeps a public promise: what the docs and --help say matches what the 0.37 binary does. All four panelists agree it is grounded. The doc-writer checked 16 claims against source with file:line evidence (newer-lockfile refusal, the vscode -> copilot alias, root .mcp.json, Codex plugin.json, pack exit codes 3-5, marketplace --refresh revalidation, and more). The python-architect confirmed that target_help_fragment in target_catalog.py is the single owner of the deprecated-alias note and that all 5 callers render it cleanly with no behaviour change. The test-coverage-expert reports 57 existing help/catalog tests and 4 e2e marketplace-refresh tests passing at 3baae91. No blocking-severity findings.

The one real defect is intellij, found independently by two panelists: the targets-matrix Selection bullet and the new install --target help sentence both hide that --target intellij is a valid per-command flag once apm.yml exists, is never recorded in targets:, and is refused by a command that would create apm.yml. troubleshooting/common-errors.md already says this correctly; the two new surfaces should match it. Everything else is precision polish that folds cheaply.

Dissent. python-architect rated the intellij help sentence a nit (hand-written prose instead of catalog-generated); devx-ux-expert rated it recommended because the content misleads. The CEO sides with devx: fix the wording here, defer generating it from catalog mcp_only capabilities.

Aligned with: portable-by-manifest (targets: replaces target:; intellij never recorded), multi-harness (Codex plugin.json, root .mcp.json, JetBrains MCP documented), pragmatic-as-npm (alias note generated from DEPRECATED_TARGET_ALIASES, so help cannot drift), OSS (scoped to accepted #3948, avoids in-flight #3918/#3290, paired with #3950).

Panel summary

Persona B R N Takeaway
Doc writer 0 2 1 Nearly every claim checks out against source. One intellij overclaim, a leftover planned-features block, and an audit --file exit-code nuance.
DevX UX expert 0 1 2 Help edits mostly read well; fix the misleading intellij note and the --runtime alias collision.
Python architect 0 0 3 Alias note correctly owned by target_catalog and consistent across all 5 callers; other edits are help-only.
Test coverage expert 0 0 1 Help-text-only change; existing tests pass. Nothing asserts the new generated alias note.

B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.

Top 5 follow-ups

  1. [Doc writer] Fix the intellij wording in reference/targets-matrix.md (Selection bullet) and merge the two intellij sentences in install --target help into one accurate sentence. -- Two panelists found it; current text suggests the flag is refused outright, so JetBrains users may drop it and lose MCP config.
  2. [Test coverage expert] Assert the generated alias note in test_every_accepted_value_is_advertised_and_parses, and bound the deps-update sort-order segment at the first . after Values:. -- Existing tests pass with or without the note; the second vscode weakens the ordering check.
  3. [Doc writer] Delete the Future Enhancements section in reference/primitive-types.md. -- Two unimplemented roadmap bullets sit outside a Planned callout.
  4. [DevX UX expert] Put the --runtime legacy-alias note before the target values fragment. -- The parenthetical now reads as if it describes vscode/copilot.
  5. [DevX UX expert] Give marketplace update a plain short help plus a body explaining NAME and the exit-1 contract. -- No other summary carries exit codes; NAME is never explained.

Architecture

classDiagram
    direction LR
    class target_catalog {
      <<CanonicalOwner>>
      +DEPRECATED_TARGET_ALIASES Mapping
      +accepted_target_values(command) frozenset
      +target_help_fragment(command) str
      +target_all_exclusion_help() str
    }
    class HelpConsumers {
      <<IOBoundary>>
      install --target / --runtime
      update / deps update / compile
    }
    HelpConsumers ..> target_catalog : reads fragment
    class target_catalog:::touched
    classDef touched fill:#fff3b0,stroke:#d47600
Loading
flowchart TD
    A[DEPRECATED_TARGET_ALIASES vscode to copilot] --> C[accepted_target_values]
    C --> D[target_help_fragment]
    A --> D
    D --> E[install --target help]
    D --> F[install --runtime help]
    D --> G[update --target]
    D --> H[deps update --target]
    D --> I[compile --target]
Loading

Recommendation

The PR is grounded and in scope. Fold the follow-ups into this PR, starting with the intellij wording, then the alias-note regression test. Merge once CI is green. Track generating the intellij help sentence from catalog mcp_only capabilities as a separate follow-up.


Full per-persona findings

Doc writer

  • [recommended] targets-matrix intellij Selection bullet overclaims at docs/src/content/docs/reference/targets-matrix.md:332
    A command that would create apm.yml refuses --target intellij (init.py, manifest_helpers.py raise IdeTargetError); it only writes JetBrains MCP once apm.yml exists.
  • [recommended] primitive-types Future Enhancements lists unimplemented features as plain prose at docs/src/content/docs/reference/primitive-types.md:223
  • [nit] audit exit-code row 1: apm audit --file skips the newer-lockfile gate at docs/src/content/docs/reference/cli/audit.md:381
  • Over cap: the reference/common-errors.md intro clause "including those new in 0.37" will go stale.

DevX UX expert

  • [recommended] intellij sentence in install --target help implies the flag is refused at src/apm_cli/commands/install.py:872
  • [nit] --runtime help: alias sentence collides with "(legacy alias for --target ...)" at src/apm_cli/core/target_detection.py:731
  • [nit] marketplace update summary carries an exit code; no body explains NAME at src/apm_cli/commands/marketplace/__init__.py:820

Python architect

  • [nit] intellij refusal sentence is hand-written while the catalog knows mcp_only at src/apm_cli/commands/install.py:873
  • [nit] deps update sort-order test now sees vscode twice at tests/unit/test_cli_consistency.py:309
  • [nit] Confirmed: fragment placement and concatenation sound across 5 callers at src/apm_cli/core/target_catalog.py:346

Test coverage expert

  • [nit] No test asserts the generated deprecated-alias note at src/apm_cli/core/target_catalog.py:346
    Proof (missing at): tests/unit/core/test_target_catalog.py::test_every_accepted_value_is_advertised_and_parses -- proves: --target help tells users 'vscode' is a deprecated alias of 'copilot' and stays in sync with accepted aliases.

This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.


Generated by autopilot-pr-review-worker. This comment is AI-generated and may contain errors.

--target intellij still writes JetBrains MCP config once apm.yml exists; it is only refused where a command would record it in apm.yml. The targets-matrix bullet and install --target help implied the flag was refused outright, which would lead JetBrains users to drop it and lose MCP wiring. Addresses panel follow-up 1 (doc-writer, devx-ux-expert).

Co-authored-by: Copilot <[email protected]>
The generated deprecated-alias sentence made the --runtime legacy-alias parenthetical read as if it described vscode. marketplace update now has a plain one-line summary and a body explaining NAME and the exit-1 contract. Addresses panel follow-ups 4 and 5 (devx-ux-expert).

Co-authored-by: Copilot <[email protected]>
Remove the unimplemented Future Enhancements bullets, note that apm audit --file skips the newer-lockfile gate (audit.py runs require_current_cli only without --file), and drop a version-pinned clause that would go stale. Addresses panel follow-up 6 and doc-writer findings.

Co-authored-by: Copilot <[email protected]>
target_help_fragment now appends a sentence per DEPRECATED_TARGET_ALIASES entry; existing tests passed with or without it. Assert it per command, and bound the deps update sort-order segment at the end of the Values list so the repeated alias name cannot mask an ordering regression. Mutation-break: removing the appended note fails test_every_accepted_value_is_advertised_and_parses. Addresses panel follow-up 2 (test-coverage-expert, python-architect).

Co-authored-by: Copilot <[email protected]>
An unresolvable registry transport is a policy violation, but under the default enforcement: warn it is only a warning (test_mcp_transport_policy_lifecycle asserts audit --ci passes with warn). Addresses Copilot inline on docs/src/content/docs/reference/policy-schema.md:162.

Co-authored-by: Copilot <[email protected]>
Resolve package-authoring.md Kiro conflict: keep main's per-agent fail-closed wording (#3947) with this PR's targets: [kiro] spelling.

Co-authored-by: Copilot <[email protected]>
@danielmeppiel

Copy link
Copy Markdown
Collaborator Author

APM Review Panel: ship_with_followups

Delta pass: all six prior follow-ups and Copilot's transport.allow correction are folded, and every delta panelist found nothing new. The 0.37 CLI reference and help text now match the code.

panel-mode=delta; personas=doc-writer,devx-ux-expert,test-coverage-expert,python-architect,apm-ceo

cc Sergio Sisternes (@sergio-sisternes-epam) -- a fresh advisory pass is ready for your review.

Since the full panel at 3baae91, all six follow-ups were folded and Copilot's one inline finding was correct and folded too: the policy-schema page said unresolved MCP transports are always blocked, but under the default enforcement: warn they only warn. All four delta panelists returned no findings. doc-writer checked each delta hunk against source, devx-ux-expert confirmed the rendered help reads cleanly, python-architect confirmed only help strings and test assertions changed, and test-coverage-expert confirmed the new alias-note assertion is mutation-break verified.

After the delta panel, origin/main (#3947) conflicted in apm-usage/package-authoring.md; the resolution keeps main's per-agent Kiro fail-closed wording with this PR's targets: [kiro] spelling. No other content changed.

One item is deferred: generating the intellij install --target help sentence from the target catalog's mcp_only capabilities. That is a code-structure change beyond this docs/help-text PR.

Aligned with: governed-by-policy (transport.allow now states the real warn/block outcome), multi-harness (intellij selection rules accurate on both surfaces), pragmatic-as-npm (reference and --help match 0.37; speculative roadmap text removed).

Panel summary

Persona B R N Takeaway
Doc writer 0 0 0 All delta hunks check out against source. No new issues.
DevX UX expert 0 0 0 Delta folds are accurate and read cleanly in rendered help.
Test coverage expert 0 0 0 Alias-note fold is guarded by a test; remaining delta is help wording that existing tests accept.
Python architect 0 0 0 Only help strings and test assertions changed; behaviour and owner boundaries unchanged.

B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.

Top 1 follow-ups

  1. [Python architect] File a post-merge issue to generate the intellij install --target help sentence from catalog mcp_only capabilities. -- A hard-coded capability sentence can drift again; out of scope for this docs PR.

Folded in this run

  • Intellij selection wording in reference/targets-matrix.md and install --target help -- a337cf8
  • --runtime legacy-alias note before the Values fragment; marketplace update short help plus body -- d202f87
  • Removed primitive-types Future Enhancements; audit --file exception; dropped version-pinned clause in reference/common-errors.md -- c05fe63
  • Test asserting the generated deprecated-alias note (mutation-break: removing the note fails it); bounded deps-update Values segment -- 560b620
  • policy-schema unresolved-transport outcome qualified by enforcement -- 23c2925

Copilot signals reviewed

  • LEGIT, folded in 23c2925: policy-schema.md:162 "is blocked" overstated the default; enforcement: warn only warns.

Deferred

  • Catalog-generated intellij help sentence -- boundary: new target_catalog helper is a code-structure change beyond help-string wording.

Evidence

  • Lint: ruff check / ruff format --check (0.15.12) clean, pylint R0801 10.00/10, auth-signal lint clean, lint-architecture-boundaries.sh exit 0.
  • Tests at 2a491e8: test_target_catalog.py 14 passed; target decision + --runtime help 38 passed; install command 142 passed; marketplace update/client 61 passed.
  • CI at 2a491e8: 31 checks pass, none failing.
PR Head Stance Iter Folds Deferred Copilot rounds CI Mergeable Merge state Notes
#3949 2a491e8 ship_with_followups 2 7 1 2 green MERGEABLE BLOCKED pending required review

Recommendation

Ready for maintainer review and merge. CI is green at 2a491e8. After merging, track the catalog-generated intellij help sentence as one small follow-up issue.


Full per-persona findings

Doc writer

No findings.

DevX UX expert

No findings.

Test coverage expert

No findings.

Python architect

No findings.

This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.


Generated by autopilot-pr-merge-worker. This comment is AI-generated and may contain errors.

@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 1995f50 into main Nov 19, 2026
34 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-docs-037-sweep branch November 19, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/docs Documentation change (prose, examples, generated reference).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants