Repository navigation
Description
Microsoft Agent Package Manager (APM) behaves in a similar manner to other package managers, allowing packages to declare dependencies on other packages. Below are the apm.yml files for a parent core language agnostic coding standards package and a dependent language specific package. In some cases a child package will show linkage to the core package. In other cases, the core package is represented as a duplicate node in the graph.
Core package apm.yml file
name: coding-standards-core
version: 1.0.4
description: General code standards and clean code evaluation standards applicable to all languages.Package with dependency on core apm.yml file
name: coding-standards-csharp
version: 1.1.0
description:
C# and .NET coding standards including services, repositories, HTTP clients, cross-cutting concerns, and unit testing.
dependencies:
apm:
- MyPrivateGithubOrg/apm-internal-marketplace/packages/coding-standards-coreNotably, the first two path segments are the github org and repo and the remaining path portion is the path within the repo.
The directed graph was constructed using GPT 5.4 and root cause analyzed using the same
Root cause: the extractor has no canonical rule for APM package dependencies, so coding-standards-core gets materialized as whatever local node a chunk happened to invent first. That fragments one real dependency target into multiple graph nodes, and some package edges end up pointing at different stand-ins.
In the fresh graph there are already three different core-related nodes:
coding-standards-core packagefrompackages/coding-standards-core/apm.ymlcoding-standards-corefrompackages/coding-standards-python/apm.ymlcoding-standards-core dependencyfrompackages/coding-standards-python-fastapi/SKILL.md
The key tell is that some edges point to a node whose ID is anchored to the wrong source file. For example, several Go standards docs reference target ID coding_standards_python_apm_coding_standards_core, which is a node sourced from Python’s apm.yml, not from Go. That means the semantic subagent created one shared “coding-standards-core” concept inside a mixed chunk and anchored it to an arbitrary file in that chunk, then reused that ID for unrelated files.
So the failure is:
- Dependencies are being extracted semantically from YAML/docs instead of structurally canonicalized to the actual package node in
packages/coding-standards-core/apm.yml. - Node IDs are file-anchored by design (
{parent}_{file}_{entity}), which is fine for file-local concepts but wrong for a global package identity. - Cross-file chunk extraction reuses whichever local core node was created first, so one chunk can anchor core to Python, another to FastAPI prose, while another correctly points to the real core package node.
That is why packages that truly depend on the same core package do not all connect through one hub: the graph has multiple semantically equivalent but structurally different targets for “coding-standards-core.”
Activity
Parse package manifests into canonical package nodes + depends_on edg…
safishamsi commentedon Jun 19, 2026
Fixed on v8 in
8e6ba9d.Root cause (verified on current code):
apm.ymlis a.ymldocument, so it was handled by the LLM semantic path, and there's no package-manifest parser. Eachapm.ymlwas extracted independently and the LLM assigned file-anchored node ids, so the core package got a different id from its own manifest than from each dependent'sdependency:reference — and nothing collapsed them (build's id-dedup needs exact-id matches; the #1145 ghost-merge only merges LLM→AST, and there's no AST node for.yml). The "intermittent" behavior was LLM id nondeterminism.Fix: a new deterministic
manifest_ingestmodule parsesapm.yml(pluspyproject.toml,go.mod,pom.xml) into one canonical package node per package, keyed by name (pkg_<name>via the sharedids.make_idrecipe), withdepends_onedges. Manifests are classified as CODE so they take the deterministic path and the LLM never sees them (no competing file-anchored nodes), and package nodes are exempt from the file-stem prefix remap so the canonical id stays stable across manifests.Verified on your example:
coding-standards-corereferenced by both the C# and Python packages is now a single node (pkg_coding_standards_core) with twodepends_onedges pointing at it — no duplicate. External dependencies (not in the corpus) leave a dangling edge that build prunes, rather than fabricating a node. 8 regression tests added; full suite green.Parse package manifests into canonical package nodes + depends_on edg…