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

Open

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/distributionInstallers (curl/PowerShell/Brew/Scoop), self-update, devcontainer, codespaces.
    type/bugSomething does not work as documented.
    on Nov 12, 2026
  2. added
    status/needs-designDesign discussion required before implementation; not scope approval by itself.
    pillar/producePillar: author, package, publish and patch with confidence
    on Nov 12, 2026
  3. danielmeppiel commented on Nov 12, 2026

    @danielmeppiel
    CollaboratorAuthor

    Decision (maintainer): deferred to 0.37.0.

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/distributionInstallers (curl/PowerShell/Brew/Scoop), self-update, devcontainer, codespaces.pillar/producePillar: author, package, publish and patch with confidencestatus/needs-designDesign discussion required before implementation; not scope approval by itself.type/bugSomething does not work as documented.

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions