Description
Running apm install on a project that has both external APM dependencies in apm.yml and local rules in the root .apm/ directory only deploys the external packages' rules -- the root-level .apm/ is silently ignored.
Reproduction
my-project/
├── apm.yml # has external dep
└── .apm/
└── instructions/
└── my-rules.instructions.md # never deployed
# apm.yml
name: my-project
version: 1.0.0
dependencies:
apm:
- some-org/some-package
apm install -t claude
# some-org/some-package rules deployed -> .claude/rules/ OK
# my-rules.instructions.md -> NOT deployed
The same problem occurs even with no external deps at all -- apm install exits with "All dependencies are up to date" and deploys nothing.
Workaround (from Discussion #595)
Move rules into a sub-directory and add a stub apm.yml:
my-project/
├── apm.yml # depends on ./agent
└── agent/
├── apm.yml # required stub
└── .apm/instructions/my-rules.instructions.md
This is unnecessary boilerplate and the expected behavior should work without it.
Root Cause
_install_apm_dependencies() has two early-return guards that check whether the resolved dependency list is empty. Both return before the target detection and integrator setup happen, so the project root's own .apm/ directory is never processed. The integration pipeline only ever runs against paths inside apm_modules/.
Expected Behavior
apm install should deploy primitives from the project root's own .apm/ directory alongside any external dependencies, without requiring a sub-package stub.
Refs: Discussion #595
Description
Running
apm installon a project that has both external APM dependencies inapm.ymland local rules in the root.apm/directory only deploys the external packages' rules -- the root-level.apm/is silently ignored.Reproduction
The same problem occurs even with no external deps at all --
apm installexits with "All dependencies are up to date" and deploys nothing.Workaround (from Discussion #595)
Move rules into a sub-directory and add a stub
apm.yml:This is unnecessary boilerplate and the expected behavior should work without it.
Root Cause
_install_apm_dependencies()has two early-return guards that check whether the resolved dependency list is empty. Both return before the target detection and integrator setup happen, so the project root's own.apm/directory is never processed. The integration pipeline only ever runs against paths insideapm_modules/.Expected Behavior
apm installshould deploy primitives from the project root's own.apm/directory alongside any external dependencies, without requiring a sub-package stub.Refs: Discussion #595