Skip to content

chore(compile): remove legacy .chatmode.md primitive type #840

@sergio-sisternes-epam

Description

@sergio-sisternes-epam

Context

Follow-up to the dogfooding PR (closes #695 / #792). The repo's own agent primitives have been migrated to .apm/agents/*.agent.md and the legacy .chatmode.md format is no longer used anywhere in microsoft/apm.

Primitive discovery still scans for the legacy format everywhere:

# src/apm_cli/primitives/discovery.py
LOCAL_PRIMITIVE_PATTERNS = {
    'chatmode': [
        "**/.apm/agents/*.agent.md",
        "**/.github/agents/*.agent.md",
        "**/*.agent.md",
        # Legacy support (.chatmode.md)
        "**/.apm/chatmodes/*.chatmode.md",
        "**/.github/chatmodes/*.chatmode.md",
        "**/*.chatmode.md",
    ],
    ...
}

Matching legacy patterns also exist in DEPENDENCY_PRIMITIVE_PATTERNS and DEPENDENCY_GITHUB_PRIMITIVE_PATTERNS, plus any related parsing / integrator / test fixtures.

Proposal

  1. Deprecation notice -- one release cycle. Emit a [!] warning when any .chatmode.md file is discovered, pointing contributors at .agent.md.
  2. Ecosystem sweep -- audit the public marketplace / known APM packages for any consumer still shipping .chatmode.md. Publish a migration guide if found.
  3. Removal PR -- drop the legacy patterns from discovery.py, remove the chatmode integrator fallback, and update tests / docs.

Removing the format simplifies discovery, shrinks the test surface, and removes the chatmode / agent naming confusion for new contributors.

Open questions

  • Do we want the deprecation warning gated on target=all / target=copilot specifically, or unconditional?
  • Is there data on how many published packages still use .chatmode.md? If zero, we can skip straight to removal.

Labels

breaking-change, compilation, tech-debt

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cliCLI command surface, flags, help text (cross-cutting).area/docs-sitedocs/src/content (Starlight), README, doc generation.area/package-authoringapm pack/unpack, plugin authoring, vendoring guidance, bundle format.priority/lowAccepted but not time-sensitivestatus/acceptedDirection approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).type/refactorInternal restructure, no behavior change.

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions