Skip to content

[BUG] apm pack --format plugin for a multi-target producer ships one primitive in several renderings, and a Claude consumer keeps the wrong one #3686

Closed

Description

Describe the bug

When the producer's apm.yml targets more than one runtime (for example claude and copilot) and a dependency has an agent and an applyTo-scoped instruction, the plugin bundle contains both renderings: agents/reviewer.agent.md and agents/reviewer.md, instructions/x.instructions.md and instructions/x.md (plus .mdc with cursor). Installing the bundle into a fresh Claude project prints "Skipped .claude/rules/x.md: file exists with different content" and keeps the Copilot rendering, so a **/*.py-scoped instruction loses its scoping in Claude. The pack output already says bundles are target-agnostic.

To reproduce

  1. Producer targets [claude, copilot], depends on a package with an agent and an instruction with applyTo: "**/*.py".
  2. apm pack --format plugin, then install the bundle into a fresh Claude project.

Expected behavior

One rendering per primitive in the bundle, and the consumer gets the correct target rendering.

Actual behavior

Duplicate renderings, a collision warning, and the wrong rule kept.

Options

  1. Keep only the Claude rendering per primitive stem.
  2. Build plugin components from the source primitive once (target-agnostic).
  3. Deterministic stem precedence with a warning.

Found by the 0.36.0 pre-release lifecycle sweep, round 2 (#3649). Same behavior on v0.35.1, so this is not a 0.36 regression.

Activity

  1. added
    area/distribution
    type/bug
    on Nov 12, 2026
  2. added
    status/needs-design
    pillar/produce
    on Nov 12, 2026
  3. danielmeppiel commented on Nov 12, 2026

    @danielmeppiel
    CollaboratorAuthor

    Decision (maintainer): deferred to 0.37.0.

  4. danielmeppiel commented on Nov 21, 2026

    @danielmeppiel
    CollaboratorAuthor

    Moved from 0.38.0 to 0.39.0 in the 0.38 release cut (2026-11-21). Scope and acceptance are unchanged.

  5. 18 remaining items

  6. added 3 commits that reference this issue on Nov 23, 2026
  7. moved this from In Progress to Todo in APM Roadmapon Nov 23, 2026
  8. moved this from Todo to In Progress in APM Roadmapon Nov 23, 2026
  9. added a commit that references this issue on Nov 23, 2026
  10. moved this from In Progress to Done in APM Roadmapon Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/distributionpillar/producestatus/acceptedtype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions