Skip to content

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

Closed

Description

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

Activity

  1. added 4 commits that reference this issue on Apr 9, 2026
    286e172
    f67705d
    880a208
    b782402
  2. added 2 commits that reference this issue on May 19, 2026
    428c17e
    a0f0a08
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions