Repository navigation
Description
Is your feature request related to a problem? Please describe.
When a dependency is a subdirectory of a repository (path:), APM fetches and deploys only that subdirectory. The repository's LICENSE (or NOTICE) at its root is never fetched, deployed or recorded. Projects commit the deployed files, as the docs recommend for reproducibility and for CI and cloud agents. So every committed copy of a permissively licensed skill loses the licence notice. MIT, BSD and Apache-2.0 all require that notice to be kept with copies.
Reproduction with APM 0.35.0:
targets: [copilot]
dependencies:
apm:
- git: https://github.com/mattpocock/skills.git
path: skills/productivity/grilling
ref: 4ae2317ddb22b046e26455e4f9c9b3aaaf62212dAfter apm install:
.agents/skills/grilling/holdsSKILL.mdandagents/openai.yamlonly;apm_modules/mattpocock/skills/skills/productivity/grilling/has noLICENSE;apm.lock.yamlhas no licence information;- yet the repository has an MIT
LICENSEat its root at that commit.
The same applies to whole-repository packages whose LICENSE sits outside the deployed primitive folders.
Describe the solution you'd like
The licence travels with what APM installs, so a project that commits deployed files stays compliant without extra steps. For example:
- Record it: resolve the nearest
LICENSE/COPYING/NOTICEfile from the package path up to the repository root at the resolved commit, and record its SPDX identifier (where it can be detected) and path inapm.lock.yaml. This would also feed the SBOM export in Deepen install-time integrity: signature verification, SBOM, provenance #1777, which currently says licence data isn't present. - Carry it: deploy that file alongside each skill (for example
.agents/skills/grilling/LICENSE), or write one aggregated third-party notices file per project, kept up to date byinstallanduninstalland checked byapm audit. - Optional policy: let
apm-policy.ymlallow or deny licences, or require a detectable licence.
You'd know it works when installing the example above leaves an MIT notice next to the deployed skill, or in a notices file, and in the lockfile.
Describe alternatives you've considered
- Copying the licence by hand after each install: it's easy to forget, and
apm auditdoesn't know about it. - Depending on the whole repository instead of a subdirectory: the licence still isn't a deployed primitive, and it installs more than wanted.
- Keeping a hand-written third-party notices file in the consuming project: it works, but every consumer has to discover and maintain it.
Additional context
Related: #1777, which covers SBOM and provenance export, and notes that licence data isn't recorded.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
danielmeppiel commentedon Nov 12, 2026
Decision: approve
Area: project
Scope: For packages materialized from a repository subdirectory (and whole-repo packages whose primitives sit below the root), copy the nearest LICENSE, LICENSE.*, COPYING or NOTICE file found from the package path up to the repository root at the locked commit, verbatim and uninterpreted, into the materialized package and next to each deployed skill directory; record its source path and hash in apm.lock.yaml; keep install, uninstall and audit consistent.
Done when: Installing the subdirectory reproduction from this issue leaves the repository's MIT LICENSE, byte-identical, in the materialized package and alongside the deployed grilling skill; apm.lock.yaml records the license file source path and hash; uninstall removes the carried copies; apm audit reports a missing or modified carried copy; packages with no such file in that path range behave as today; tests cover subdirectory and whole-repo cases; docs and the packages/apm-guide apm-usage guide describe the behavior.
Out of scope: SPDX detection or inferring a license from file text (APM keeps the declared-license model of #1777); license allow or deny policy; an aggregated notices file; changes to lock export formats.
Review contact: Daniel Meppiel (@danielmeppiel)
danielmeppiel commentedon Nov 12, 2026
The scope record above was approved by Daniel Meppiel (@danielmeppiel) on 2026-11-12. Thank you Alex Broad (@alex-broad) for the precise reproduction. The approved part is narrow: carry the nearest license or notice file verbatim and record it in the lockfile. Detecting or inferring licenses from file text, and license policy, remain declined: APM keeps the declared-license model from #1777 (it trusts the declared license field and never concludes a license from file text). Contributors may comment here to claim the work.
Generated by issue-reduction-lane-h. This comment is AI-generated and may contain errors.
refactor(install): keep carried-licence bookkeeping in source_helpers (…
chore: drop stray .github/mcp.json test artifact
fix(install): carry licences after plugin normalization; byte-only co…
test(install): unit traps for carried-licence guards (#3556)
feat(install): carry the source licence with subdirectory packages (#…
fix(tests): restore release-gate lanes for 0.36.0 (#3723)