Skip to content

[BUG] apm install never deploys local .apm/ primitives to .claude/ because claude isn't a registered runtime #751

@dsaad68

Description

@dsaad68

Describe the bug

apm install --target claude does not deploy the project's local .apm/ primitives (agents, skills, instructions) to .claude/, even though the code paths for that deployment shipped in v0.7.4 (#95), v0.8.10 (#527), and v0.8.11 (#542). .claude/agents/, .claude/skills/, and .claude/rules/ remain empty. Claude Code never discovers the package's content.

Root cause: apm install iterates over installed runtimes, and the runtime registry is hardcoded to {copilot | codex | llm}claude is not a recognized runtime, so its deployment code is unreachable. The verbose log confirms it: using all installed runtimes: copilot, codex.

To Reproduce

Steps to reproduce the behavior:

  1. Create a minimal project with local .apm/ content and an existing .claude/ directory:
    mkdir repro && cd repro
    mkdir -p .apm/agents .apm/skills/my-skill .apm/instructions .claude
    cat > apm.yml <<'EOF'
    name: repro
    version: 1.0.0
    target: claude
    dependencies:
      apm: []
    EOF
    cat > .apm/agents/hello.agent.md <<'EOF'
    ---
    name: hello
    description: Says hello
    ---
    # Hello
    EOF
    cat > .apm/skills/my-skill/SKILL.md <<'EOF'
    ---
    name: my-skill
    description: A test skill
    ---
    # My Skill
    EOF
    cat > .apm/instructions/rules.instructions.md <<'EOF'
    ---
    description: Test rule
    applyTo: "**/*.md"
    ---
    Be concise.
    EOF
  2. Run: apm install --target claude --verbose
  3. Inspect: ls -la .claude/
  4. See that .claude/ contains no agents/, skills/, or rules/ subdirectories — only what was there before.

apm install --target claude --dry-run likewise plans zero primitive deployments.

Expected behavior

After apm install --target claude, Claude Code's native discovery directories should be populated from local .apm/ content:

.claude/
├── agents/
│   └── hello.md
├── skills/
│   └── my-skill/
│       └── SKILL.md
└── rules/
    └── rules.md

This matches the documented behavior in the CLI reference:

"After integrating dependencies, apm install deploys primitives from the project's own .apm/ directory (instructions, prompts, agents, skills, hooks, commands) to target directories (.github/, .claude/, .cursor/, etc.). … This works even with zero dependencies — just apm.yml and .apm/ content is enough."

In v0.8.11 this only holds for .github/, not .claude/.

Environment (please complete the following information):

  • OS: macOS 15.3.0 (Darwin 25.3.0, Apple Silicon)
  • Python Version: 3.13.13
  • APM Version: 0.8.11 (81082e2)
  • Claude Code Version: 2.1.112 (installed via brew install --cask claude-code@latest/opt/homebrew/bin/claude)

Logs

apm install --target claude --verbose in the repro directory:

[>] Installing dependencies from apm.yml...
Parsed apm.yml: 0 APM deps, 0 MCP deps
No APM dependencies found in apm.yml
No scripts detected, using all installed runtimes: copilot, codex
[*] Installation complete.

apm runtime list:

┏━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Status   ┃ Runtime    ┃ Description              ┃ Details                       ┃
┡━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ [+]      │ copilot    │ GitHub Copilot CLI       │ /opt/homebrew/bin/copilot     │
│ [+]      │ codex      │ OpenAI Codex CLI         │ /opt/homebrew/bin/codex       │
│ Not      │ llm        │ Simon Willison's LLM     │                               │
│ installed│            │                          │                               │
└──────────┴────────────┴──────────────────────────┴───────────────────────────────┘

apm runtime setup --help:

Usage: apm runtime setup [OPTIONS] {copilot|codex|llm}

Note: claude is absent from the runtime enum entirely — despite /opt/homebrew/bin/claude being on PATH and functional (claude --version2.1.112 (Claude Code)).

Additional context

  • Tried --target claude on the CLI, pinning target: claude in apm.yml, and both together — same result.
  • Pre-creating .claude/agents/, .claude/skills/, and .claude/rules/ before install does not help.
  • apm compile --target claude does write a CLAUDE.md (instructions-only), but does not touch .claude/agents/ or .claude/skills/ (per the design split documented in #94).

Likely fix: register claude as a first-class runtime in the same enum as copilot / codex / llm, with a simple PATH-based detector (looking for claude / claude-code). That would make apm runtime list surface it and let the existing .claude/ deployment code in PR #95 / #527 / #542 actually run. Alternatively, decouple the local .apm/.claude/ deployment from the per-runtime iteration so it fires whenever .claude/ exists or --target claude is specified, independent of the runtime registry.

Related issues / PRs

  • #94 — original request to deploy agents + skills to .claude/
  • #95.claude/agents/*.md deployment (v0.7.4)
  • #527.claude/rules/*.md deployment (v0.8.10)
  • #542 — scope-resolved target profiles (v0.8.11)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageNew issue, not yet reviewed by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions