Skip to content

apm compile --target claude silently skips dependency instructions without --local-only #631

@chkp-roniz

Description

@chkp-roniz

Summary

apm compile --target claude silently produces no CLAUDE.md when compiling dependency instructions. The distributed optimizer reports Instruction Processing: 0.0ms and exits successfully without generating any output file. Adding --local-only fixes it.

Reproduction

mkdir test && cd test
apm init
apm install chkp-roniz/cc-rubber-duck --target claude
apm compile --target claude --verbose

Expected: CLAUDE.md is generated with the package's instruction content.

Actual: Compilation reports success but processes 0 instructions and writes no file:

[*] Starting context compilation...
[i] Compiling for CLAUDE.md (Claude Code) - explicit --target flag
Verbose mode: showing source attribution and optimizer analysis
  Project Analysis: 0.2ms
  Instruction Processing: 0.0ms
[+] Compilation completed successfully!

Workaround

apm compile --target claude --local-only

This correctly finds the instruction in apm_modules/chkp-roniz/cc-rubber-duck/instructions/rubber-duck.instructions.md, runs the full optimizer, and generates CLAUDE.md:

Instruction Processing: 1.0ms
...
Generated 1 CLAUDE.md file
+- Context efficiency:    100.0%

Details

  • --validate correctly finds the instruction (1 instructions), so the primitive is discoverable
  • The copilot and all targets exhibit the same 0-instruction behavior (without --local-only)
  • The package instruction has applyTo: "**/*" frontmatter
  • apm_modules/ is in the default exclusion list — the distributed optimizer may be applying this exclusion to dependency instruction scanning, while --local-only bypasses it

Environment

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions