Skip to content

[BUG] Subpath install marks dependency as orphaned and skips instruction processing in compile #99

@sergio-sisternes-epam

Description

@sergio-sisternes-epam

Describe the bug
Installing an APM dependency from a repository subpath (owner/repo/subdir) succeeds and downloads files, but dependency instructions from .apm/instructions are not effectively processed by apm compile.
At the same time, dependency status appears inconsistent (orphaned / unknown) in dependency views.

To Reproduce
Steps to reproduce the behavior:

  1. Start from an empty folder.
  2. Run command:
    apm install <owner>/<repo>/<path>
  3. Verify instruction files exist:
    find apm_modules -path "*/.apm/instructions/*" -type f
  4. Run:
    apm deps list
    apm deps tree
    apm compile --verbose
  5. Observe:
    • dependency appears orphaned/unknown in dependency views
    • compile reports near-zero instruction processing despite instruction files existing on disk

Expected behavior
A clear and concise description of what you expected to happen:

  • Subpath-installed dependency should be recognized consistently in dependency views
  • apm compile --verbose should process instruction files from installed dependency content
  • Dependency instructions should be included in compile-time context behavior for Copilot target

Environment (please complete the following information):

  • OS: macOS
  • Python Version: N/A (APM bundled binary install)
  • APM-CLI Version: 0.7.3
  • VSCode Version (if relevant): N/A (reproduced from terminal)

Logs

Clean repro outputs (real run):

### apm --version
Agent Package Manager (APM) CLI version 0.7.3

### [apm.yml](http://_vscodecontentref_/0)
name: apm-tests
version: 1.0.0
description: APM project for apm-tests
author: sergio-sisternes-epam
dependencies:
  apm:
  - <owner>/<repo>/<path>
  mcp: []
scripts: {}

### [apm.lock](http://_vscodecontentref_/1)
lockfile_version: '1'
generated_at: '2026-02-24T13:58:40.715819+00:00'
apm_version: 0.7.3
dependencies:
- repo_url: <owner>/<repo>
  host: github.com
  resolved_commit: unknown
  virtual_path: <path>
  is_virtual: true

### apm deps list
📋 APM Dependencies
Package: <owner>/<repo>/<path>
Version: 1.0.0
Source: orphaned
Context: 2 files
Workflows: 1 workflows

⚠️  1 orphaned package(s) found (not in [apm.yml](http://_vscodecontentref_/2)):
  • <owner>/<repo>/<path>

### apm deps tree
apm-tests (local)
└── agent-library@unknown
    └── no context or workflows

### apm compile --verbose
⚙️ Starting context compilation...
Compiling for AGENTS.md (VSCode/Copilot) - detected .github/ folder
Verbose mode: showing source attribution and optimizer analysis
⏱️  📊 Project Analysis: 0.7ms
⏱️  🎯 Instruction Processing: 0.0ms
✅ Compilation completed successfully!

### installed instructions in apm_modules
[code-modernisation.instructions.md](http://_vscodecontentref_/3)
[modernisation.instructions.md](http://_vscodecontentref_/4)

### .github/instructions
(no files)

### .github files (relevant)
[ts.tech-lead-apm.agent.md](http://_vscodecontentref_/5)
[modernisation-readiness-apm.prompt.md](http://_vscodecontentref_/6)
[code-modernisation.instructions.md](http://_vscodecontentref_/7)
[modernisation.instructions.md](http://_vscodecontentref_/8)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions