Skip to content

feat: add 'copilot' as primary target name (alias for vscode)#228

Merged
danielmeppiel merged 2 commits intomainfrom
feat/copilot-target-alias
Mar 10, 2026
Merged

feat: add 'copilot' as primary target name (alias for vscode)#228
danielmeppiel merged 2 commits intomainfrom
feat/copilot-target-alias

Conversation

@danielmeppiel
Copy link
Collaborator

Summary

Add copilot as the recommended user-facing target name for the GitHub Copilot / Cursor / Codex / Gemini output format. The existing vscode and agents values continue to work as aliases — no breaking changes.

Motivation

The target system uses vscode as the canonical name, but users interact with "GitHub Copilot", "Cursor", "Codex", etc. — not "VS Code" as a platform. Using --target copilot is more intuitive and aligns with Discussion #148 (APM Strategic Direction RFC).

Approach: Alias-only (not full rename)

Rather than renaming the internal TargetType from "vscode" to "copilot" across ~20 source files, ~6 test files, and ~6 doc files, this PR takes the minimal alias approach:

  • Entry points accept "copilot" and map it to the internal "vscode" value
  • Internal code unchanged — zero regression risk, zero git blame damage
  • User-facing docs updated to show copilot as the primary name

This keeps the door open for a full internal rename later if desired, without any risk now.

Changes

Source (4 files)

  • src/apm_cli/core/target_detection.pydetect_target() accepts "copilot" in both explicit and config paths; get_target_description() supports "copilot" key
  • src/apm_cli/cli.py — compile --target Choice list shows copilot first
  • src/apm_cli/commands/pack.py — pack --target Choice list includes copilot
  • src/apm_cli/bundle/packer.py_TARGET_PREFIXES maps "copilot" to .github/ prefixes

Tests (1 file, 3 new tests)

  • test_explicit_target_copilot_maps_to_vscode — explicit --target copilot → internal "vscode"
  • test_config_target_copilotapm.yml target: copilot → internal "vscode"
  • test_copilot_descriptionget_target_description("copilot") returns expected description

Docs (4 files)

  • compilation.md — target tables, examples, and config show copilot as primary
  • concepts.md — "Copilot Target" heading instead of "VSCode/GitHub Target"
  • dependencies.md — example comment uses copilot target
  • integrations.md — compile example uses --target copilot

Test Results

1801 passed, 94 skipped in 97s

Add 'copilot' as the recommended user-facing target name for the
GitHub Copilot / Cursor / Codex / Gemini output format. The existing
'vscode' and 'agents' values continue to work as aliases.

Changes:
- detect_target() accepts 'copilot' in both explicit and config paths
- CLI compile and pack commands list 'copilot' first in --target choices
- Bundle packer recognizes 'copilot' in target prefix mapping
- get_target_description() returns description for 'copilot' key
- Tests: 3 new test cases for copilot alias behavior
- Docs: compilation, concepts, dependencies, integrations updated

Internal TargetType remains 'vscode' — no rename, no breaking changes.
Copilot AI review requested due to automatic review settings March 10, 2026 14:43
danielmeppiel added a commit to microsoft/apm-action that referenced this pull request Mar 10, 2026
Align with microsoft/apm#228 — 'copilot' is now the recommended
user-facing target name. 'vscode' remains valid as an alias.

- action.yml: target description lists copilot first
- README.md: examples and inputs table show copilot as primary
danielmeppiel added a commit to microsoft/apm-action that referenced this pull request Mar 10, 2026
Align with microsoft/apm#228 — 'copilot' is now the recommended
user-facing target name. 'vscode' remains valid as an alias.

- action.yml: target description lists copilot first
- README.md: examples and inputs table show copilot as primary
Copy link
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

Adds copilot as the primary, user-facing --target name (aliasing to internal vscode) across CLI entry points and docs, to better match how users think about the output format (Copilot/Cursor/Codex/Gemini).

Changes:

  • Accept copilot in target detection (explicit flag + apm.yml config) while preserving internal "vscode" behavior.
  • Update apm compile and apm pack CLI --target choices/help text to include copilot.
  • Update docs to present copilot as the primary target and add tests covering the alias behavior.

Reviewed changes

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

Show a summary per file
File Description
tests/unit/core/test_target_detection.py Adds tests ensuring copilot maps to internal vscode and has a description.
src/apm_cli/core/target_detection.py Extends target parsing to accept copilot; adds description entry.
src/apm_cli/commands/pack.py Adds copilot to --target choice list and clarifies aliasing in help text.
src/apm_cli/cli.py Adds copilot to compile --target choices and updates help text to describe aliasing.
src/apm_cli/bundle/packer.py Adds copilot to target prefix mapping for packing filters.
docs/integrations.md Updates example to use --target copilot.
docs/dependencies.md Updates comment/example wording to refer to copilot target.
docs/concepts.md Renames concept section heading to “Copilot Target”.
docs/compilation.md Updates auto-detect table, examples, and config to show copilot as primary + notes aliases.

Add UserTargetType that includes user-facing aliases (copilot, agents).
Use it for get_target_description() parameter type. Normalize aliases
to internal value inside the function instead of duplicating dict keys.

Addresses PR review feedback on type inconsistency.
@danielmeppiel danielmeppiel merged commit 49ae2b6 into main Mar 10, 2026
6 checks passed
@danielmeppiel danielmeppiel deleted the feat/copilot-target-alias branch March 10, 2026 15:02
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