Skip to content

feat: Plugin coexistence — apm pack --format plugin, apm init --plugin, devDependencies #378

@danielmeppiel

Description

@danielmeppiel

Summary

Implement plugin coexistence support per WIP/plugin-coexistence-spec-v2.md. This makes APM the supply chain layer FOR the plugin ecosystem by enabling APM-authored packages to be exported as valid standalone Copilot CLI / Claude Code plugin directories.

Key Changes

Phase 1: apm pack --format plugin

  • New plugin_exporter.py module transforms .apm/ layout → plugin-native directory
  • Maps agents, skills, prompts→commands, instructions, hooks, MCP configs
  • Generates output plugin.json (from existing or synthesized from apm.yml)
  • Flattens dependency components with lockfile-order-wins collision model
  • Filters out devDependencies from output
  • Output is a valid standalone plugin — no APM runtime needed to consume

Phase 2: apm init --plugin

  • New --plugin flag creates plugin.json + apm.yml (2 files, nothing else)
  • Name validation per plugin spec (kebab-case, max 64 chars)

Phase 3: devDependencies full support

  • APMPackage model: dev_dependencies field
  • apm install --dev flag
  • Resolver + lockfile is_dev tracking
  • Pack excludes dev deps from output

Phase 4: Pure plugin consumption polish

  • Root-level discovery patterns for plugin-native repos
  • Verify end-to-end install of plugin.json-only repos

Design Decisions

  • .apm/ layout retained — no deprecation, no migration
  • apm pack default behavior unchanged — plugin export is behind --format plugin
  • No breaking changes — all new functionality behind flags
  • Zero vendor lock-in: plugin output needs no APM runtime

Spec

See WIP/plugin-coexistence-spec-v2.md for full specification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions