Skip to content

OpenAPM v0.1

OpenAPM v0.1 is the normative specification of the APM package format, manifest, lockfile, and policy semantics. It is the contract implementers, conformance testers, and enterprise reviewers build against. If you are learning how to USE APM, start with the consumer, producer, or enterprise guides — this page defines what APM IS, not how to operate it.

This document is an editor’s Working Draft of OpenAPM, version 0.1. It is published to invite review, implementation feedback, and adversarial critique. It MAY be updated, replaced, or made obsolete at any time. Citing this document as anything other than work in progress is inappropriate.

OpenAPM is published under the Apache License 2.0.

Version 0.1 is a 0.x editor’s draft under semantic-version-zero discipline: no backward-compatibility guarantee applies until version 1.0. Each 0.x minor MAY introduce breaking changes with the migration window described in Section 9.

Editors track feedback in microsoft/apm and amend per the process in Section 9.3.

OpenAPM defines the on-disk file formats, dependency-resolution semantics, primitive type system, deployment matrix, and governance policy format used by the Agent Package Manager (APM). A conforming producer authors an apm.yml manifest; a conforming consumer resolves the declared dependencies, writes an apm.lock.yaml lockfile, and deploys primitives to the directories the targets matrix specifies; a conforming governance implementation evaluates an apm-policy.yml policy against the install plan before any byte is written to disk. The wire contract between consumers and registry servers is not normative in v0.1 and is reserved for v0.2 (see Appendix B).

  1. Introduction
  2. Conventions
  3. Terminology
  4. Manifest format (apm.yml)
  5. Lockfile format (apm.lock.yaml)
  6. Policy format (apm-policy.yml)
  7. Dependency resolution
  8. Primitive type system and target matrix
  9. Versioning and amendment process
  10. Security considerations
  11. Conformance
  12. Conformance test methodology
  13. Appendix A: Normative JSON Schemas (inline)
  14. Appendix B: Registry HTTP API (reserved for v0.2)
  15. Appendix C: Index of normative statements
  16. Appendix D: Revision history
  17. Appendix E: Editorial reconciliation notes

Goals.

  • Define an interoperable on-disk format (apm.yml, apm.lock.yaml, apm-policy.yml) that any conformant tool can read and write.
  • Specify dependency resolution semantics precisely enough that two independent implementations produce equivalent lockfiles from the same manifest and remote state.
  • Specify a target-matrix contract (detection signals and deploy directories) so consumers can pin deploy paths against the spec rather than against a single implementation.
  • Specify a governance policy format that lets organisations gate installs without forking the consumer toolchain.

Non-goals (v0.1).

  • The registry HTTP wire contract. The companion document registry-http-api.md is informational in v0.1 and is reserved for normative inclusion in v0.2 once independent server implementations exist.
  • The on-disk format of any third-party plugin distribution channel (such as the Claude-Code plugin marketplace). The OPTIONAL marketplace: block in the manifest is normative as input; the generated marketplace.json artifact is governed externally and tracked additively.
  • The runtime API of any harness or IDE. OpenAPM describes what is written to disk and where; it does not describe what a harness reads from that disk.
  • Account, billing, identity, or audit-log semantics for hosted registries.
  • Publisher identity, signature verification, and attestation envelopes are out of scope for OpenAPM v0.1 and reserved for v0.2. See Section 10.12.
  • Reproducible-build determinism of registry archives (mtime/uid/gid normalisation, tar member ordering beyond filesystem-natural order) is out of scope for OpenAPM v0.1 and reserved for v0.2.
  • Version withdrawal (yank, deprecate, supersede) for published versions is out of scope for OpenAPM v0.1 and reserved for v0.2. See Section 7.9.
  • Workspace / monorepo composition (shared lockfile across sibling packages, intra-workspace resolve-to-local, workspace publish) is out of scope for OpenAPM v0.1 and reserved for v0.2; current monorepo usage is supported via local-path dependencies per Section 4.3.5. See Section 4.8.
  • The v0.1 consumer-side integrity model is self-sufficient against a non-conforming registry (hash-verify-before-extract, re-verify-on-frozen); residual gaps (availability, version-immutability, publisher identity) are closed normatively in v0.2.

1.2 Relationship to existing APM reference documentation

Section titled “1.2 Relationship to existing APM reference documentation”

The reference pages under docs/src/content/docs/reference/ are non-normative companions to this specification:

Companion pageRole
manifest-schema.mdField reference and examples for Section 4.
lockfile-spec.mdLifecycle table and examples for Section 5.
policy-schema.mdField reference and examples for Section 6.
primitive-types.mdConceptual model for Section 8.
package-types.mdProducer-side layout decision tree for Section 8.
targets-matrix.mdPer-target support matrix; informational supplement to Section 8.
registry-http-api.mdReserved; v0.2 normative surface, v0.1 informational only.

Where a companion describes behaviour, this specification binds it. Where a companion and this specification disagree, this specification wins. Editorial notes in this document call out reconciliations between the companion corpus and the implementation.

  • OpenAPM v0.1 carries 152 normative statements (147 MUST, 5 SHOULD) indexed in Appendix C.
  • All on-disk files defined by this specification are YAML 1.2 parsed under the safe subset defined in req-mf-020. A complete YAML safe-subset profile (anchor/alias handling, tag whitelist, octal-coercion treatment) is reserved for v0.2.
  • Field names are snake_case unless they mirror an external contract (such as tagPattern in the OPTIONAL marketplace block).
  • All examples in this document are ASCII-only. Implementations encountering non-ASCII bytes in OpenAPM files MUST treat them as UTF-8 and either preserve them on round-trip or reject them at parse time with a diagnostic. Unicode normalisation (NFC), IDNA for hosts, bidi-safe rendering, and locale-of-diagnostics are out of scope for v0.1 and reserved for v0.2 (see Section 1.4).
  • “Implementation” means any program that produces, consumes, or evaluates an OpenAPM file. A given implementation MAY claim more than one conformance class.

OpenAPM v0.1 distinguishes two host-related concepts that earlier drafts conflated:

  • Implementation-default host — the host an implementation uses when the manifest omits default_host: (see Section 4.2.4). This is an implementation choice, not a spec mandate; the reference APM CLI’s implementation-default host is github.com.
  • Wire-format host — the host literal that appears in a dependency identifier or lockfile entry. Canonical normalisation (see req-mf-009) strips the project’s default_host: only.

Internationalization considerations (reserved for v0.2). v0.1 does not normatively specify IDNA normalisation for hosts, Unicode normalisation form (NFC) for package or owner names, bidi-safe rendering of identifiers, or diagnostic locale. v0.2 will close this gap. v0.1 implementations SHOULD compare names byte-for-byte after the canonical normalisation defined in req-mf-009.


The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 (RFC 2119, RFC 8174) when, and only when, they appear in all capitals.

Lowercase variants of these words (“must”, “should”, and so on) carry no normative weight and are descriptive prose.

Every normative statement in this document carries a stable identifier of the form req-<group>-<NNN> (for example req-mf-001) anchored directly above the statement. These identifiers are stable across errata; a renumbering requires a minor version bump as defined in Section 9.2.

Conformance classes are defined normatively in Section 11.1; the four roles are Producer, Consumer, Registry (one MUST applies in v0.1; the wire contract remains reserved), and Governance. An implementation MUST declare which conformance class(es) it claims when asserting OpenAPM conformance (see Section 11.2).


This section defines the terms used throughout this document. Where a term has a separate normative definition (for example “primitive type”), the definition section is cross-linked.

TermDefinition
ManifestThe apm.yml file for one package or installation scope. Defined in Section 4.
LockfileThe apm.lock.yaml file recording one installation scope’s resolved state. Defined in Section 5.
Installation scopeThe isolated manifest, lockfile, and target-configuration boundary for an install. A project scope is rooted at the consumer project. A user scope is independent of any project root and uses an implementation-defined user location disclosed by the consumer’s conformance statement.
PolicyAn apm-policy.yml file evaluated by a Governance implementation. Defined in Section 6.
PackageA unit identified by a manifest (apm.yml) or by a recognised package layout (see Section 8.1).
PrimitiveA typed unit of agent configuration (instruction, prompt, agent, skill, command, hook, or mcp server). Defined in Section 8.1.
TargetA named runtime harness (for example copilot, claude, cursor). Defined in Section 8.4.
Deploy directoryThe on-disk root under which a target’s primitives are placed by apm install. Defined in Section 8.5.
Source-declared capability restrictionAn agent-primitive field whose documented purpose is to narrow the tools, actions, or resources the converted agent may invoke (for example, a tools allowlist).
Direct dependencyA dependency declared in the consumer’s own apm.yml.
Transitive dependencyA dependency declared in the apm.yml of a resolved package, not in the consumer’s own apm.yml.
Virtual packageA dependency targeting a subdirectory or file within a repository rather than the whole repository. Defined in Section 4.3.3.
RegistryA remote service that serves package archives over HTTP. The wire contract is reserved for v0.2.
git-semverA dependency form whose ref: is a semver range matched against remote git tags. Defined in Section 7.3.
ConstraintThe version selector recorded for a dependency (a semver range, a literal tag, a branch name, a commit SHA, or None).
DriftA divergence between the lockfile and either the manifest (declaration drift) or the deployed files on disk (integrity drift).
Self-entryThe synthesized lockfile entry that accounts for primitives the project itself contributes. Defined in Section 5.3.
Frozen installAn install operation that refuses to write or rewrite the lockfile, fails on any missing package pin or MCP declaration mismatch, and gates validation before any lockfile, target-configuration, deployment, or cache write. Defined in Section 5.5.
Host classThe equivalence set of network hosts that share a single credential scope (see Section 10.3). Two hosts are in the same class iff their registrable domain (the eTLD+1 per the Public Suffix List) is identical, OR they are explicitly aliased via registries.<name>.aliases: (see Section 4.2.3). For example, github.contoso.com shares a host class with contoso.com, not with github.com. Implementation-specific operator overrides to this default assignment are governed by req-sc-013.
Configuration signalAny manifest declaration or implementation-specific operator setting that binds a hostname to a host class. Defined in req-sc-013.
Implementation-default hostThe host an implementation uses when the manifest omits default_host:. The choice is implementation-defined; see Section 1.4.
Wire-format hostThe host literal as it appears in a dependency identifier or lockfile entry after canonical normalisation.
Hash envelopeA digest serialised as <algo>:<hex> (for example sha256:abcd...). See req-lk-016.
Conformance classOne of the four roles defined in Section 11.1.
ConformantSatisfies all MUST-level requirements for a claimed conformance class.
Conforming fileAn OpenAPM file that parses without error under the rules of Sections 4-6.

4.1 Document structure and required fields

Section titled “4.1 Document structure and required fields”

The project-scope manifest is a single YAML 1.2 document located at the project root, filename apm.yml. A user-scope manifest, when supported, uses the user location declared under req-tg-014.

[req-mf-001] A conforming producer implementation MUST emit a manifest whose top-level document node is a YAML 1.2 mapping. A conforming consumer implementation MUST reject any manifest whose top-level node is not a mapping, with a diagnostic naming the file.

[req-mf-002] A conforming producer implementation MUST include a top-level field name whose value is a non-empty string.

[req-mf-003] A conforming producer implementation MUST include a top-level field version whose value is a string.

[req-mf-004] A conforming producer implementation SHOULD emit a version value matching the official semver 2.0.0 reference regular expression (semver 2.0.0 Section 9):

^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$

A conforming consumer SHOULD emit a non-blocking diagnostic when version does not match this pattern. Numeric-looking version strings MUST be quoted in YAML to prevent integer/float coercion.

[req-mf-006] A conforming consumer implementation MUST preserve unknown top-level keys when rewriting the manifest, so that manifests authored against a later revision of this specification round-trip through an older consumer without data loss.

[req-mf-020] A conforming consumer implementation MUST parse manifest, lockfile, and policy documents under the YAML safe subset: (a) scalars are strings unless explicitly typed via the canonical YAML 1.2 tags !!int, !!float, or !!bool; (b) &anchor / *alias constructs MUST be rejected with a diagnostic; (c) custom (non-!!) tags MUST be rejected; (d) YAML 1.1 octal coercion (0NN interpreted as base-8) MUST NOT be applied. The complete safe-subset profile is reserved for v0.2; v0.1 implementations MUST at minimum enforce clauses (a)-(d).

[req-ext-001] A conforming consumer implementation MUST treat any mapping key matching the pattern x-[a-z][a-z0-9-]* at any nesting level of a manifest, lockfile, or policy document as a vendor-extension key. Vendor-extension keys MUST be ignored during semantic interpretation, MUST NOT cause parse-time errors, and MUST be preserved byte-equivalent on round-trip. The same rule applies to vendor-extension keys inside dependencies.apm[], dependencies.mcp[], lockfile per-entry mappings, and policy sub-blocks. See Section 4.6.2.

[req-ext-002] This specification and all future revisions of OpenAPM MUST NOT define normative keys beginning with the prefix x-. The namespace is reserved exclusively for vendor extensions.

A minimal conforming manifest:

name: my-project
version: 1.0.0

The manifest top-level fields are:

FieldRequiredType
nameyesstring
versionyesstring (semver 2.0.0 per req-mf-004)
descriptionnostring
authornostring
licensenostring (SPDX identifier RECOMMENDED)
default_hostnostring; see Section 4.2.4 and req-mf-019
targetnostring, list of strings, or null; deprecated in favor of targets by amendment 0.1.61 (adopted 2026-11-19; see Appendix D); mutually exclusive with targets (see req-tg-008)
targetsnostring or non-empty list of lowercase canonical identifiers, the alias vscode (deprecated by amendment 0.1.61, adopted 2026-11-19; denotes copilot), or all; mutually exclusive with target (see Section 4.2.1 and req-tg-008)
typenostring (advisory, see Section 4.2.2)
scriptsnomapping string -> string
includesnoliteral auto or list of paths
registriesnomapping; see Section 4.2.3
dependenciesnomapping with OPTIONAL keys apm, mcp, conflict_resolution
devDependenciesnomapping with OPTIONAL keys apm, mcp
compilationnomapping
policynomapping; consumer-side policy hooks
marketplacenomapping; producer authoring block, see Section 4.7
marketplacesnolist; root project marketplace map, see Section 4.2.5
x-<name>novendor extension, see Section 4.6.2

The canonical set of target identifiers registered by this specification at v0.1 is:

copilot, claude, cursor, codex, gemini, antigravity, opencode, windsurf, agent-skills, hermes, grok-bot, all

The legacy alias agents MAY appear under target: in input manifests; when the manifest is rewritten it MUST be normalised to copilot, and it is not admitted under targets:. The legacy alias vscode is deprecated: it MAY appear under target: and under targets: wherever a target identifier is accepted, including dependency-entry targets subsets and user-scope manifests; it denotes the copilot target with no MCP configuration destination of its own; and a conforming consumer MUST treat it exactly as copilot, including in target selection, in the req-tg-008 effective target intersection, in the MCP configuration destination, and in recorded lockfile state. A consumer that writes a lock entry MUST record copilot, never vscode, in target_subset and subset_pairings; a consumer that reads a lock entry recording vscode MUST read it as copilot, dropping any resulting duplicate and restoring the canonical sort order, before the req-rs-018 consistency and frozen-replay comparisons, so a recorded vscode alone is not a selection change. When normalising agents or vscode, an implementation that rewrites a manifest MUST replace the alias in place with copilot and drop any resulting duplicate, keeping the first occurrence. A consumer may emit a deprecation warning for vscode during the Section 9.5 window, typically for manifests the user authors, and may omit it for dependency manifests; the warning does not affect target selection. Singular target: is likewise deprecated in favor of targets:. The Section 9.5 migration window for both deprecations started on 2026-11-19, when amendment 0.1.61 was adopted; no removal is scheduled, and the window stays open until a later revision removes the deprecated form, subject to the Section 9.5 minimum of 90 days. (Amendment 0.1.61, adopted 2026-11-19; see Appendix D.)

Note (non-normative). Per-target MCP configuration destinations are published in the OpenAPM Target Registry v0.1 companion. At this revision copilot (and therefore vscode) writes project MCP servers to the workspace-root .mcp.json, the same project file the claude target writes. Earlier companion revisions listed .github/mcp.json for copilot and .vscode/mcp.json for vscode. Because the file is shared, req-mf-026 applies to every write to it whichever target selected the server, and entry ownership is per file under req-mf-027: deactivating one target does not remove entries that another active target still selects. A consumer that wrote entries to a retired destination is expected to remove only the entries it can show it wrote, in the sense of req-mf-026, and to report the rest.

The internal fallback value minimal MUST NOT be set explicitly in a manifest; it is reserved for the auto-detection fallback described in Section 8.4. In an auto-detect context, minimal denotes the no-target-detected profile that emits AGENTS.md only; all denotes the union of every registered auto-detectable target (see Section 8.4). A target is auto-detectable when the OpenAPM Target Registry publishes at least one detection predicate for it; a target registered without a detection predicate is explicit-only and MUST be selected explicitly. At v0.1 the explicit-only targets are agent-skills, antigravity, hermes, and grok-bot, so all excludes them.

Concrete per-target detection signals and deploy roots are documented in the non-normative companion “OpenAPM Target Registry v0.1” (see Section 8); the companion holds the table contents and is amended additively, except where an Appendix D row announces a change to an existing entry (as amendment 0.1.61 does for the copilot project MCP configuration destination); this specification binds the schema only.

[req-mf-005] A conforming producer implementation MUST reject any value of target (or any element of a target list) that is not either: (a) a member of the canonical set or a recognised alias; OR (b) a vendor-extension identifier matching x-[a-z][a-z0-9-]*-[a-z][a-z0-9-]* (the x-<vendor>-<name> form). The diagnostic MUST name the offending token.

[req-tg-004] A conforming consumer implementation MUST accept target identifiers matching x-[a-z][a-z0-9-]*-[a-z][a-z0-9-]* at parse time and MUST route detection, deployment, and conformance evaluation for such identifiers to a vendor-registered handler. In the absence of a registered handler, the consumer MUST emit a diagnostic naming the unsupported identifier and MUST NOT silently ignore the entry. Vendors MAY register new targets without spec amendment via this namespace.

Editorial note. Editorial reconciliation between the canonical set above and the legacy aliases is consolidated in Appendix E.

The type field MAY take one of the values instructions, skill, hybrid, or prompts. Its semantic content is advisory in v0.1: package behaviour is driven by the on-disk layout recognised in Section 8.1, not by this field. Future revisions MAY assign behavioural meaning; conformant consumers MUST NOT reject a manifest solely on the basis of the type field’s value when that value is one of the four listed above. Editorial reconciliation with the companion is in Appendix E.

The registries block MAY declare REST-based registries the project consumes. The block is OPTIONAL; absence of the block means git-resolution-only.

[req-mf-014] A conforming producer implementation MUST ensure that every registries.<name>.url value begins with https:// or http://. Other URL schemes MUST be rejected at parse time.

[req-mf-015] A conforming producer implementation MUST reject unknown keys inside any registries.<name> entry at parse time, except for vendor-extension keys matching x-[a-z][a-z0-9-]* (see req-ext-001). This constraint is a typo guard and prevents silent acceptance of mistyped keys.

[req-sc-006] A conforming consumer implementation MUST treat any registries.<name>.url that uses the http:// scheme as a parse-time error unless one of the following is true: (a) the entry sets insecure: true explicitly; OR (b) the host is the loopback address (127.0.0.0/8, ::1) or an RFC 1918 private address (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16). The diagnostic MUST name the offending registry.

Optional fields on a registries.<name> mapping:

FieldTypeNotes
urlstringREQUIRED; scheme constrained by req-mf-014.
insecurebooleanWhen true, allows http://. See req-sc-006.
aliasesstring[]Additional host names that share this registry’s host class. See Section 10.3.

Example:

registries:
internal:
url: https://artifactory.example.com/artifactory/api/skills/internal
aliases:
- mirror.example.com
default: internal

The OPTIONAL default_host: top-level field selects the host that canonical normalisation strips from shorthand dependency identifiers (see Section 4.3.4). When omitted, the consumer uses its implementation-default host; this specification does not mandate github.com or any other value for the implementation-default.

[req-mf-019] A conforming consumer implementation that encounters a default_host: value MUST treat that value as the only host stripped by canonical normalisation per req-mf-009. When the manifest omits default_host:, the consumer MAY apply its implementation-default host but MUST document that choice in its conformance statement (see Section 11.2). A consumer MUST NOT strip any host other than the one selected by default_host: or the declared implementation-default.

The OPTIONAL top-level marketplaces: list binds the marketplace names that a project’s marketplace references (object entries with name and marketplace keys) resolve through. Each entry is a mapping with a REQUIRED name (ASCII letters, digits, ., _ and -), a REQUIRED source (a catalog location: a Git repository URL or shorthand, a direct catalog URL, or a local path) and an OPTIONAL ref. Marketplace references remain non-normative in v0.1 (see Section 7.1); the requirements below apply to a consumer that resolves them.

marketplaces:
- name: contoso
source: https://github.com/contoso/agent-marketplace
ref: main
dependencies:
apm:
- { name: security-review, marketplace: contoso }

[req-mf-028] A conforming consumer implementation that resolves marketplace references MUST accept a marketplaces: list in the root project manifest and MUST: (a) reject, with a diagnostic naming the manifest and the entry index, an entry that is not a mapping, lacks name or source, carries an unknown key, or repeats a name (compared case-insensitively); (b) while resolving that project, resolve a reference whose marketplace name the list declares through the declared entry, never through a same-named catalog registered in user or machine configuration; (c) treat declared names as local to the manifest and record, for every marketplace reference it resolves from a remote catalog, the catalog origin (not the name) and the resolved commit in the lockfile; and (d) never persist a declared entry to any user-level or machine-level marketplace registry.

[req-mf-029] A conforming consumer implementation that resolves marketplace references MUST refuse to install a dependency whose own manifest declares marketplaces:, with a diagnostic naming the dependency. When the root project manifest declares marketplaces:, the consumer MUST also fail resolution of a transitive marketplace reference whose marketplace name the root list does not declare, with a diagnostic naming that marketplace and the root manifest entry to add.

Note (non-normative). A declared catalog is reviewed intent of the same kind as a committed Git URL; declaring it grants no trust beyond the consumer’s policy. The reference implementation offers an organization policy allow-list for declared catalog origins; that policy key is implementation-defined in v0.1.

The OPTIONAL dependencies block has two OPTIONAL list-valued keys: apm for agent primitive packages, and mcp for MCP servers. Implementations MAY encounter unknown sibling keys (such as future dependency kinds) and MUST preserve them on rewrite per req-mf-006.

Each dependencies.apm entry MAY be a string conforming to the following grammar (RFC 5234 ABNF):

dependency = url-form / shorthand-form / local-path-form
url-form = url-scheme clone-url
url-scheme = "https://" / "http://" / "ssh://git@" / "git@"
clone-url = host [ ":" port ] "/" owner "/" repo
[ "/" virtual-path ] [ "#" ref ]
shorthand-form = [ host "/" ] owner "/" repo
[ "/" virtual-path ] [ "#" ref ]
local-path-form = local-prefix path-tail
local-prefix = "./" / "../" / "/" / "~/" / ".\" / "..\" / "~\"
path-tail = 1*pchar
host = 1*( ALPHA / DIGIT / "-" / "." )
port = 1*DIGIT ; range 1-65535
owner = 1*( ALPHA / DIGIT / "-" / "_" )
repo = 1*( ALPHA / DIGIT / "-" / "_" / "." )
virtual-path = segment *( "/" segment )
segment = 1*( ALPHA / DIGIT / "-" / "_" / "." )
ref = 1*VCHAR
pchar = ALPHA / DIGIT / "/" / "\" / ":" / "." / "-" / "_" / "~"

clone-url MAY include a :port segment on https://, http://, and ssh://git@ forms. local-path-form paths beginning with a backslash-prefixed local-prefix are normalised to POSIX form on read; see Section 4.3.4.

ABNF productions are interpreted per RFC 5234. ALPHA, DIGIT, and VCHAR are the core rules from RFC 5234 Appendix B.1.

[req-mf-007] A conforming consumer implementation MUST parse string-form dependencies.apm entries per the grammar above. Implementations MUST reject any string that does not satisfy one of the three productions, with a diagnostic identifying the offending entry.

An object-form entry uses one of two identity keys, git: or id:, and MUST NOT use both on the same entry.

FieldRequiredNotes
gityes for git-sourced; mutually excl. idClone URL or shorthand. Special value parent defined below.
idyes for registry-sourced; mutually excl. git<owner>/<repo> registry identity.
registrynoRegistry name; defaults to project default if omitted.
versionyes (registry form)Opaque version selector; semver range when registry publishes semver.
refnoBranch, tag, semver range, or commit SHA (git form).
pathno / yes (local form)Subpath within repo, or local filesystem path.
aliasnoLocal install-directory override; see req-mf-025.
skillsnoSkill-subset selection for dependencies that expose selectable skills (see Section 8.1); merged across edges per req-rs-018.

[req-mf-025] A conforming consumer implementation that supports dependency aliases MUST validate a supplied alias, after trimming surrounding whitespace, as a non-empty string containing only ASCII letters, digits, periods, underscores, and hyphens, excluding the reserved names . and ... It MUST reject an invalid alias with a diagnostic identifying the alias. Names such as .safe, safe., foo..bar, and my-skill.v2 remain valid. The alias selects a directory directly below apm_modules; before using that destination, the consumer MUST reject a path that resolves, including through symlinks, to apm_modules itself or outside it.

An alias changes placement, not repository identity, source path, or revision. The validated, trimmed token, preserving ASCII case and periods, is the canonical alias used for placement and lock emission. Trimming is permitted canonicalization under req-cf-001; subsequent round trips preserve the canonical token. The lock-entry schema describes canonical writer output; readers trim input before validation. Consumers MUST preserve the resolved dependency reference’s canonical alias in its lock entry and restore it for subsequent materialization, replay, and removal. Lock readers MUST apply the same alias validation. An absent alias retains the existing unaliased layout; consumers MUST NOT infer an alias from package inventory such as name. Local source references, including ../sibling, retain their declaring source anchor independently of alias placement. This requirement does not expand source-path permissions; repository-relative references in remote packages remain bounded by the authenticated clone root.

Alias support follows the optional-feature disclosure in Section 11.2. Older readers may preserve the unknown alias field without implementing its placement semantics; field preservation alone does not establish alias lifecycle support.

[req-mf-011] A conforming consumer implementation MUST reject any object-form entry that sets both id: and git: on the same entry. The diagnostic MUST name the entry and the conflicting keys.

[req-mf-022] A conforming consumer implementation that applies a non-empty skills: subset to a dependency that exposes selectable skills (see Section 8.1) and deploys zero skills from that dependency because no selected name matches an available skill MUST emit a default-visible diagnostic before the install operation returns. The diagnostic MUST identify the dependency, the requested skill names, and the available skill names (or state that none are available). The consumer MUST fail the install operation with a nonzero status and MUST preserve previously deployed skill files and their ownership records for that dependency. It MUST NOT interpret an unsatisfied selection as an intentional request to remove those files.

[req-mf-010] A conforming consumer implementation MUST treat the literal sentinel git: parent as valid only inside a transitively resolved package whose clone coordinates are known to the resolver. The resolver MUST expand parent to the parent package’s host, repo_url, and resolved ref, with virtual_path taken from path. The literal parent MUST NOT appear in the lockfile as durable identity (repo_url or source).

[req-mf-024] A conforming consumer implementation MUST NOT silently rewrite an existing id:-form (registry-sourced) manifest entry into a git:-form entry when persisting a subsequent CLI-driven manifest update (e.g. an additive --skill pin) for the same dependency identity. When a CLI-parsed reference is ambiguous about its source (git vs. registry) but an existing manifest entry for the same identity already resolves to the registry source, the implementation MUST honor the existing entry’s source when serializing the updated entry. If an update would otherwise replace a registry-sourced entry with a non-registry-shaped entry, the implementation MUST reject the update with a diagnostic naming the identity, rather than silently converting it.

A dependency MAY target a subdirectory or a file within a repository rather than the whole repository.

[req-mf-008] A conforming consumer implementation MUST classify virtual packages by file extension only and MUST NOT infer kind from path segments. A virtual_path ending in .prompt.md, .instructions.md, or .agent.md is a file; any other path is a subdirectory. On-disk shape of a subdirectory virtual package is resolved by probing for apm.yml first.

4.3.4 Canonical normalisation (writer requirements)

Section titled “4.3.4 Canonical normalisation (writer requirements)”

[req-mf-009] A conforming consumer implementation MUST normalise dependency entries to canonical form when rewriting the manifest. The canonical form strips only the host that matches the project’s default_host: value (per req-mf-019) or, if default_host: is omitted, the consumer’s declared implementation-default host. SCP-style git URLs (git@host:owner/repo.git) and https:// URLs targeting the selected default host MUST be normalised to the shorthand form owner/repo. Non-default hosts MUST retain their FQDN. A consumer MUST NOT hard-code stripping of any specific host literal; the selection is configured per project.

[req-mf-016] A conforming consumer implementation MUST recognise dependency strings beginning with ./, ../, /, ~/, .\, ..\, or ~\ as local-path entries. The resolver MUST refuse any local-path entry whose normalised form contains .. segments that would escape the project root, with a diagnostic naming the offending path.

The OPTIONAL dependencies.mcp list declares MCP servers. Each entry is either a registry string or an object. Object-form fields are defined in manifest-schema.md Section 4.2.

[req-mf-012] A conforming consumer implementation MUST reject any self-defined MCP server entry (one where registry: false) that: (a) omits transport; (b) sets transport: stdio but omits command; (c) sets transport to http, sse, or streamable-http but omits url. When transport: stdio is in effect, the command value MUST be a single binary path with no embedded whitespace unless the entry also supplies an args key (including an explicit empty list); a path containing spaces without an args sibling MUST be rejected at parse time.

The OPTIONAL devDependencies block has the same structure as dependencies. Entries declared under devDependencies are installed locally but excluded from packed plugin bundles produced by the producer toolchain.

4.5 Variable references in MCP env/headers and runtime arguments

Section titled “4.5 Variable references in MCP env/headers and runtime arguments”

Values inside mcp[].env and mcp[].headers MAY contain three placeholder syntaxes:

SyntaxSourceResolution
${VAR}host environmentNormalised to ${env:VAR} for native interpolation ({env:VAR} for OpenCode; kept as ${VAR} in project-scoped Claude Code configuration, see req-mf-026); resolved at install for others.
${env:VAR}host environmentTranslated to {env:VAR} for OpenCode and to ${VAR} in project-scoped Claude Code configuration; passed through where natively supported; resolved at install otherwise.
${input:<id>}interactive promptNative where supported; otherwise the placeholder MUST NOT be silently rendered as literal text.

GitHub Actions templates (${{ ... }}) MUST be left untouched.

[req-mf-013] A conforming consumer implementation MUST resolve ${VAR}, ${env:VAR}, and ${input:<id>} placeholders per the dispatch matrix above and MUST NOT emit a generated config file in which an unsupported placeholder is silently passed through as literal text. When an unsupported placeholder is encountered for the active target, the consumer MUST emit a diagnostic and MAY refuse to write the generated config.

Registry OCI/Docker package runtime_arguments and package_arguments entries MAY contain bare {name} templates in their value or default fields. An entry’s variables map declares metadata for variable names across the package; isSecret: true marks a name secret. This syntax is distinct from the ${...} env/header forms above.

[req-mf-023] A conforming consumer implementation that renders a registry OCI/Docker MCP package to VS Code configuration MUST apply a resolved non-secret variable value to every {name} occurrence across the package’s runtime and package arguments, including an occurrence whose argument does not repeat the variable metadata. Secret classification is package-scoped: once any entry declares a name with isSecret: true, the consumer MUST use the VS Code secret input reference for every occurrence of that name rather than write the resolved secret value into generated configuration bytes. The consumer MUST NOT write a literal unresolved {name} template to generated VS Code configuration; when a required runtime-argument variable cannot be resolved, it MUST emit a diagnostic and MAY decline that package’s target configuration.

[req-mf-026] A conforming consumer implementation that writes an MCP server to a project-scoped Claude Code .mcp.json MUST write each ${VAR} or ${env:VAR} reference that the rendered server places in command, args, env, url or headers as the native ${VAR} reference, and MUST NOT write the variable’s resolved value there. Static values and ${VAR:-default} references MUST be written as declared. When an existing entry for the same server holds values where the rendered server has references, the consumer MUST replace that entry only if it can show that it wrote it: the entry matches the native write hash the consumer recorded for it, or expanding the declared references from the current environment reproduces it exactly. Otherwise the consumer MUST leave the entry unchanged, MUST end the install with a non-zero result, and MUST emit a diagnostic naming the affected fields. Diagnostics about these references MUST name variables and fields only, never their values. User-scoped Claude Code configuration is outside this requirement.

[req-mf-027] When two or more targets write project-scoped MCP servers to the same configuration file (for example, at this revision the Target Registry v0.1 companion lists the workspace-root .mcp.json for both claude and copilot), a conforming consumer implementation attributes each entry it wrote in that file to the file, not only to the target that selected the server:

  • (a) It MUST treat an entry it recorded as written for one of those targets as its own, not as a foreign entry, when another of those targets selects the same server, and MUST apply to that entry the checks it applies to its own entries, including req-mf-026.
  • (b) When it stops selecting a server for one of those targets, for example because that target is deactivated, it MUST NOT remove the entry while another active target that writes the same file still selects the server, and it MUST treat the entry as owned for that remaining target from then on, retaining a native write hash recorded for the entry where one exists.
  • (c) When no active target that writes the file selects the server, the consumer MAY remove the entry, subject to its other ownership rules, including req-mf-026.

Entries the consumer did not write, user-scoped MCP configuration, and targets whose project MCP configuration files are distinct are outside req-mf-027.

The OPTIONAL policy block records consumer-side controls for governance integration (such as a pinned hash of the leaf apm-policy.yml). Its sub-fields are documented in the companion page and are enforced normatively in Section 6. The manifest policy: block pins the discovered policy bytes by hash, defending against MITM or registry-side rewrite between discovery and evaluation; see Section 6.1.

[req-mf-018] A conforming consumer implementation MUST accept only sha256, sha384, or sha512 as the value of policy.hash_algorithm. Values of md5, sha1, or any other algorithm MUST be rejected at parse time. When policy.hash is set and policy.hash_algorithm is omitted, the algorithm MUST be inferred from the <algo>: prefix of the digest value. The algorithm allow-list applies to the digest of the discovered policy bytes, not to a recursive hash of the manifest field itself.

OpenAPM reserves the key prefix x- (lowercase ASCII) for vendor-defined extensions at every mapping level of every document this specification defines: manifest top-level, every nested mapping within dependencies, devDependencies, registries, policy, compilation, marketplace; lockfile top-level and per-entry mappings (see Section 5.2); and policy top-level and every nested mapping (see Section 6).

Key shape is x-[a-z][a-z0-9-]*. Vendors SHOULD further namespace their keys as x-<vendor>-<name> (for example x-acme-telemetry) to avoid collision between independent vendors.

req-ext-001, req-ext-002, and req-ext-003 govern reader and writer behaviour for this namespace. Round-trip preservation is the load-bearing guarantee: a manifest authored with x-acme-telemetry: MUST survive a read -> mutate -> write cycle through any conforming consumer byte-equivalent, even if the consumer ascribes no semantics to the key.

[req-ext-003] A conforming consumer implementation MUST treat every top-level manifest key whose name matches x-[a-z][a-z0-9-]* as a vendor extension, as defined by req-ext-001. The consumer MUST preserve each such key and its value on the parsed package in declaration order, MUST NOT validate or interpret the value, and MUST NOT fail parse because of it. When the consumer records a dependency resolved from that manifest, it MUST copy those keys onto that dependency’s lockfile entry under the optional extensions mapping, preserving declaration order, and MUST omit extensions when the mapping is empty so an entry that declares no extensions stays byte-identical to one written without the field. YAML mapping key order is normative for this field: the serialized extensions mapping follows the source declaration order. For any other top-level key it does not recognise, the consumer MUST produce a non-failing warning naming that key and MUST NOT fail parse or install solely because that key is unknown. This warning does not waive independent validation, policy, or security failures. This warning does not relax req-mf-006: a writer that rewrites the manifest MUST still preserve unknown top-level keys. Recorded extension values are not a trust anchor and MUST NOT change lockfile_version.

4.7 Marketplace authoring block (normative input)

Section titled “4.7 Marketplace authoring block (normative input)”

The OPTIONAL marketplace block declares the producer’s marketplace authoring metadata. The on-disk shape of the marketplace.json artifact that a producer toolchain emits from this block is outside the scope of this specification; the input format defined here is normative.

[req-mf-017] A conforming producer implementation MUST validate every marketplace.packages[].source value against the following rules and MUST reject any entry that fails them at parse time: (a) .. path segments are refused; (b) URL forms with userinfo (user@host), ports, or query strings are refused; (c) URL schemes other than https:// are refused for remote sources; (d) local sources MUST begin with ./.

Workspace / monorepo composition (shared lockfile across sibling packages, intra-workspace resolve-to-local, workspace publish) is out of scope for v0.1 and reserved for v0.2. Current monorepo usage is fully supported in v0.1 via local-path dependencies per Section 4.3.5. A future v0.2 surface will reserve a top-level workspaces: glob list, declare the root apm.yml lockfile as single source of truth, and normatively pin intra-workspace deps to local paths.

[req-mf-021] In v0.1, a conforming producer MUST NOT declare a top-level workspaces: key in apm.yml. A conforming consumer encountering a top-level workspaces: key in a v0.1 manifest MUST emit a non-blocking diagnostic naming the key as reserved for v0.2 and MUST NOT attach any semantics to its value. The diagnostic MUST NOT fail install.

4.8.1 Root source replacements (proposed capability)

Section titled “4.8.1 Root source replacements (proposed capability)”

This is an opt-in capability proposal for issue #3180, not workspace composition or a change to the reserved workspaces: key. Section 9.3 reviewer approvals and public comment remain pending. Staging its implementation and schema artifacts does not ratify the proposal or identify a first supporting release. Consumers not providing this capability acquire no new mandatory feature.

The manifest selector is https://microsoft.github.io/apm/specs/schemas/manifest-source-replacements-v1.schema.json. The following obligations apply to consumers providing this capability.

[req-rpl-001] A conforming consumer providing root source replacements MUST require the explicit manifest selector above before accepting a replace: key, and MUST validate its list of rules and bind them as follows:

  • Each rule has exactly for and with. for contains a nonempty explicit-host Git locator and optional package-directory path. with is either a nonempty local path, or an explicit Git locator with a required nonempty ref and optional package-directory path. Unknown fields, shorthand Git locators, embedded refs, query strings, HTTP credentials and single-primitive selectors are rejected. HTTPS, SSH and SCP-style Git locators are supported; an original HTTP selector can redirect to a secure source, but an HTTP selected source is rejected.
  • Match the original (normalized host, port, repository, package subpath) exactly, using the existing dependency-coordinate normalization. Ref, alias and display name are not selector dimensions. Duplicate normalized selectors are rejected. Local, registry, marketplace and parent-inheritance references do not match.
  • Apply the root table once to every original edge, including direct, transitive and diamond requests, before graph deduplication and immutable-source admission. A selected source does not trigger another replacement. Dependency-owned rules do not redirect the consumer. Incompatible original identities sharing an existing materialization slot, and logical or physical dependency cycles, are refused rather than resolved by arbitrary winner selection.

[req-rpl-002] A conforming consumer providing this capability MUST keep original identity as graph, lock-entry and materialization ownership, including alias, skill and target selections and every incoming request, while using the selected source for transport, authentication, ref resolution, cache acquisition, content scanning, integrity and policy evaluation. Replacement MUST NOT grant executable consent or bypass existing security checks. Policy matching, including the effective host under req-pl-018 clause (g), evaluates the selected package, not the original package. Original ref constraints are provenance, not constraints on the fully substituted source; immutable obligations introduced by the selected source’s own dependencies still apply.

Relative selected local paths are anchored to the root manifest directory, including intentional siblings; explicit absolute and home-relative paths retain their normal local-path meaning. Nested local dependencies resolve relative to their selected parent’s source. Missing selected content MUST NOT fall back upstream. Install and update MUST use the selected source; update MUST retain an explicit fork SHA and refresh a mutable fork ref. Removing a rule returns that identity upstream on the next non-frozen resolution. Audit MUST verify selected-source evidence without repair; outdated MUST query the selected fork and reports a local replacement as not remotely comparable. Dry-run MUST remain read-only and may return its existing successful but explicitly incomplete preview for unavailable metadata. Uninstall MUST use surviving selected-source manifests, preserve shared dependencies, and refuse destructive cleanup if reachability is incomplete.

[req-rpl-003] A conforming consumer providing this capability MUST write the proposed lockfile_version: "3" when a root replacement table is present, including replace: [], and record its complete normalized table as top-level replacements, including dormant rules. The written table MUST preserve manifest declaration order. Each matched Git-owned entry retains its original coordinates and records replacement: {source: ..., requests: [...]}. A matched entry MUST NOT carry entry-level source or local_path; replacement.source is its sole selected-source record. source has the selected with shape. Each nonempty incoming-request record contains parent, ref, skills, targets, dev and alias; nullable fields and explicit empty selections remain distinguishable. Parent values are exact original lock keys. Existing resolved-commit/tag and content-hash fields describe selected bytes; a local replacement has no fabricated Git commit. Git-fork content retains the existing req-lk-015 integrity obligation over selected bytes; this proposal does not claim to discharge any implementation’s existing conformance debt. Local content_hash retains the documented implementation-specific tree convention under the v0.2 canonical-tree reservation; req-rpl-004 requires a trustworthy baseline using that convention, not a newly invented algorithm. Malformed evidence, evidence inconsistent with the recorded table, or a matched entry missing its evidence is rejected on read.

The capability does not reinterpret version "1" or "2". Without a replacement table, their existing rules apply; removal of the table permits returning from "3" to "2", not a downgrade from "2" to "1". Unknown-version refusal remains governed by req-lk-004. Neither an additive field nor this proposal can retrofit support into an older client. Tested v0.25.0, v0.32.0 and v0.33.0 refuse this candidate; v0.24.1 can ignore replacement intent and is unsafe for these manifests and lockfiles. No universal minimum-safe-version claim follows.

[req-rpl-004] A conforming consumer providing this capability MUST compare the complete normalized manifest and locked replacement tables before a frozen install mutates state, including dormant rules and the distinction between absent and explicitly empty tables. A changed table is refused. For reachable selected local sources and their local dependencies, frozen verification requires trustworthy locked content evidence and current source bytes under the existing local-content verification contract; missing baseline, missing source and changed content are refused without lock, deployment or cache mutation. Comparison uses the normalized set of rules, not serialization order. Equivalent locator spelling does not create a table change when canonical normalization produces the same rule. This extends req-lk-006; it does not permit frozen resolution to accept changed replacement intent.

This section’s normative statements are:


The project-scope lockfile is a single YAML 1.2 document at the project root, filename apm.lock.yaml. A user-scope lockfile, when supported, uses the user location declared under req-tg-014. A lockfile records the pinned resolved state of every dependency the consumer has resolved from the manifest, plus the set of files the consumer itself contributes (the self-entry).

[req-lk-001] A conforming consumer implementation MUST emit a lockfile whose top-level document node is a YAML 1.2 mapping with at minimum the keys lockfile_version (string) and dependencies (list). Additional top-level keys defined by this specification are generated_at, apm_version, mcp_servers, mcp_configs, local_deployed_files, local_deployed_file_hashes, and attestations (the last reserved for v0.2 per Section 10.12). Vendor-extension top-level keys (x-*) are permitted per req-ext-001.

Example (informative, minimal):

lockfile_version: "1"
apm_version: "0.6.4"
dependencies:
- repo_url: github.com/octocat/example
resolved_commit: "7f3c9a4d2e1b8c7f0a9e6d5c4b3a2918f7e6d5c4"
resolved_ref: v1.2.0
content_hash: "sha256:a1b2c3d4e5f60718293a4b5c6d7e8f90112233445566778899aabbccddeeff00"
depth: 1
deployed_files:
- .github/instructions/example.instructions.md

Each element of dependencies describes one resolved package. The following fields are recognised by this specification; producers and consumers MUST emit only fields whose values are set and MUST preserve unknown fields on round-trip. Field availability is monotonic in lockfile_version: a field defined here is valid in both "1" and "2". The "v2 only" annotation used in earlier drafts is removed (see req-lk-002).

FieldNotes
repo_urlCanonical repo identity. REQUIRED for git-sourced entries. Cache isolation additionally follows req-rs-016.
materialization_repo_urlOptional source-cased repository identifier following the same host/owner/repo-path grammar as repo_url, used to reconstruct materialization and generated-link paths. See req-lk-022.
aliasOptional validated install-directory override, independent of source identity and inventory name. See req-mf-025.
hostFQDN when not inferable from repo_url.
portNon-standard port. Validated to 1..65535 on read.
registry_prefixPath prefix when resolved via registry proxy.
resolved_refUser-supplied ref (branch, tag, SHA).
resolved_commitExact 40-character lowercase hexadecimal commit SHA-1.
tree_sha256Reserved for v0.2: hash envelope over the canonical git tree (Section 5.6.4). Not the v0.1 integrity anchor; see content_hash.
versionRegistry entries carry the registry-resolved selector for reinstall; git/local entries MAY carry a dependency-apm.yml-derived inventory value per req-lk-019.
virtual_pathSubpath inside repo for virtual packages.
is_virtualBoolean.
depthTree depth (0 = self, 1 = direct, >1 = transitive).
resolved_byrepo_url of the parent that pulled this transitive dep.
package_typeOne of apm_package, skill_bundle, etc.
skill_subsetSelected skill names for dependencies that expose selectable skills (see Section 8.1); the union over all declaring edges per req-rs-018.
target_subsetConsumer-side per-dependency target subset; the union over all declaring edges per req-rs-018.
subset_pairingsOptional exact per-target skill selection, present only when skill_subset x target_subset would over-select. See req-rs-018.
deployed_filesProject-relative paths the consumer wrote for this entry.
deployed_file_hashespath -> <algo>:<hex> for the files in deployed_files.
sourcelocal for path deps, registry for registry deps; absent for git.
resolved_urlRegistry archive download URL (advisory; see req-rs-009).
resolved_hashHash envelope (sha256:<hex>) of the registry archive bytes. Trust anchor.
local_pathOriginal path for local deps.
content_hashHash envelope (sha256:<hex>) of a package’s tree; its byte stream follows lockfile_version per req-lk-016. REQUIRED for git-sourced entries as their integrity anchor (req-lk-015).
is_devTrue when declared under devDependencies.
constraintgit-semver discriminator: the original semver range from the manifest (verbatim).
resolved_taggit-semver selected tag, or advisory tag provenance for a full-SHA git-literal update under req-rs-017.
resolved_atgit-semver: ISO 8601 UTC timestamp; advisory (see Section 7.3).
nameSelf-asserted display/inventory name; non-identity (see req-lk-019).
extensionsOptional mapping of top-level keys matching x-[a-z][a-z0-9-]* from the dependency manifest, in declaration order. Omitted when empty. Values are not interpreted (see req-ext-003). Manifest-origin metadata, distinct from per-entry x-<name> keys.
native_pluginOptional mapping, present only when the consumer natively activated this entry’s plugin under Section 8.5.11: name (declared plugin name), root (deployed plugin root as a POSIX path relative to the deploy root of its scope, the project root or the user home at user scope: .agents/plugins/<name>), fingerprint (the req-na-002 root digest, without the executable-bit byte at project scope, a sha256:<hex-lowercase> envelope per req-lk-016; not the req-na-005 approval digest, and not itself an approval), and marketplace ({name, path}: the binding its activation entries were declared under, which a later run reads as the previous binding under req-na-004). Informative: install, including a frozen install (--frozen or equivalent), records it only after the lockfile gates pass and then reconciles settings from it; a restore redeploys only bytes whose root digest equals fingerprint; audit recomputes the root digest on the materialized source and on the deployed root without writing (see req-na-002, req-na-005 and Section 5.5). A consumer MAY record beside it native_declared, the targets whose settings held its true enable value when the lock was written, to tell its own req-na-004 values from user edits; it is advisory and not trust-bearing: it is not an approval and has no identity, replay or ownership role. (Amendments 0.1.65, 0.1.66 and 0.1.74.)
attestationsReserved for v0.2 (publisher provenance).
x-<name>Vendor extension (per req-ext-001).

[req-lk-003] A conforming consumer implementation MUST record both repo_url and resolved_commit for every git-sourced dependency entry. For every registry-sourced dependency entry the consumer MUST instead record resolved_url and resolved_hash (in addition to repo_url, which carries package identity). When the manifest reference is a full 40-character commit SHA, a conformance audit MUST treat a different lockfile resolved_commit as a consistency failure.

[req-lk-011] A conforming consumer implementation MUST omit fields whose values are unset (no null placeholders) and MUST preserve fields it does not recognise when round-tripping a lockfile. This includes vendor-extension keys per req-ext-001.

[req-lk-012] A conforming consumer implementation MUST compute deployed_file_hashes and local_deployed_file_hashes as SHA-256 hash envelopes (sha256:<hex-lowercase>) over the canonical content of each deployed file. The canonical content is defined as follows: if the file’s bytes decode as UTF-8 and contain no NUL (0x00) byte (a text file), the canonical content is those bytes with every \r\n sequence replaced by \n (a lone \r is left unchanged); otherwise (a binary file) the canonical content is the raw bytes as written to disk. Directory entries (paths ending in /) MUST NOT have a hash entry. The hash envelope <algo>:<hex> form defined by req-lk-016 applies uniformly.

The text-file line-ending normalization makes the recorded hash platform-invariant: a file that git materializes with \r\n on a core.autocrlf=true checkout and with \n on a POSIX checkout yields one identical hash, so the record side (install) and the verify side (req-lk-017, apm audit) agree across operating systems (apm#1952). Preserving a lone \r is deliberate: only the benign \r\n -> \n platform difference is made hash-invisible, while a bare carriage return — which a terminal or parser may treat as an overwrite — still changes the hash. This domain matches the drift-replay normalizer, so the two integrity surfaces agree on what constitutes a content change.

[req-lk-013] A conforming consumer implementation MUST verify the resolved_hash against the actual SHA-256 of the registry archive bytes before extracting the archive to disk. On mismatch, the install MUST fail closed with a diagnostic naming the entry, the expected hash, and the actual hash, and MUST NOT extract or partially extract the archive.

[req-lk-014] A conforming consumer implementation MUST preserve vendor-extension keys (x-[a-z][a-z0-9-]*) at every mapping level of the lockfile — top-level and per-entry — on round-trip. See req-ext-001.

[req-lk-019] A conforming consumer implementation MUST treat the optional name field, and any dependency-apm.yml-derived version value, as self-asserted inventory metadata only — recorded to support human-readable listing and audit reporting, never as a trust anchor. A consumer MUST preserve both fields on round-trip per req-lk-011, and MUST NOT derive any identity or deduplication decision from them. For git/local entries, a dependency-apm.yml-derived version MUST NOT drive frozen replay; replay derives from resolved_ref, resolved_commit, resolved_tag/constraint, and the recorded hash envelopes (see req-lk-003, req-lk-008). For registry entries, the registry-resolved version MAY remain the exact registry selection used for reinstall, but the integrity anchor is the recorded resolved_hash required by req-lk-013. The presence of name or dependency-apm.yml-derived version is additive and MUST NOT change lockfile_version (both are valid in "1" and "2").

[req-lk-022] A conforming consumer implementation that case-folds any component of a repository identifier (authority or path) for identity comparison and retains a different source spelling MUST record that spelling in the optional materialization_repo_url field. The consumer MUST validate that materialization_repo_url, under the same host-specific repository normalization rule defined by req-rs-016, identifies the same package as repo_url; a mismatch MUST fail closed. It MUST NOT use materialization_repo_url as an identity, deduplication, cache, sort, or trust key, and its presence MUST NOT change lockfile_version.

Note: When materialization_repo_url is absent the consumer derives materialization paths from repo_url directly; absence is not an error.

When reconstructing a dependency, materializing it under apm_modules/, or generating a relative link back to that materialization, the consumer MUST prefer the retained source spelling. Case-folding applies only to repository-identity path components; an in-repository virtual_path and virtual-file leaf remain case-sensitive. If exactly one existing package path differs only in case-foldable repository components, the consumer MUST either migrate it transactionally to the retained spelling or fail without creating a duplicate. If multiple physical paths match one identity, the consumer MUST fail closed without deleting any candidate path.

For this requirement, a transactional migration completes every case-only rename before the retained path is used, journals each completed rename, and restores the original spelling before returning from any caught failure. A consumer MAY use a temporary sibling path when its filesystem cannot apply a case-only rename directly; the temporary path MUST remain inside the materialization root and MUST NOT be treated as an installed package. This rollback contract does not claim process-crash atomicity; an interrupted temporary path is recovery state that a consumer MUST preserve for inspection rather than delete without verification.

[req-lk-020] When an install that is not frozen under req-lk-006 rewrites deployed_files or local_deployed_files and the manifest declares a target field, a conforming consumer implementation MUST preserve paths attributable to (a) the current install targets, (b) another declared target, or (c) an implementation-recognized target whose activation is outside the manifest target field. A path is attributable to a target when its top-level deploy root, Registry-documented filename pattern, or target-specific URI scheme identifies that target; shared deploy roots are partitioned by the filename patterns required by req-tg-002. It MUST remove a prior path attributable to none of those targets. This reconciliation applies identically to per-entry deployed_files and top-level local_deployed_files, and the consumer MUST apply each preserve-or-remove decision to the corresponding deployed_file_hashes or local_deployed_file_hashes entry. If the manifest does not declare a target field, or the consumer cannot determine which target governs a prior path, the consumer MUST preserve that path and its corresponding hash entry rather than remove it solely because it was not written by the current install. During orphan cleanup, the consumer MUST preserve any path freshly deployed by an active dependency in the current install, even when the same path is also recorded by a prior lockfile entry under a different dependency identity.

[req-lk-021] When a non-frozen install, compile, or update rewrites deployed state and the implementation maintains merge-based hook configuration (a shared, non-per-file configuration document for a target that supports the hooks primitive type, together with an ownership record identifying which entries the consumer itself wrote), a conforming consumer implementation MUST apply the same preserve-or-remove decision defined by req-lk-020 to that merge-based hook configuration. For a consumer-owned entry attributable to a specific dependency, “current install targets” in clause (a) below means that dependency’s effective intersection under req-tg-008. It MUST remove only the consumer-owned entries — and any ownership record left empty by that removal — attributable to a target that is not attributable to (a) the current install targets, (b) another declared target, or (c) an implementation-recognized target whose activation is outside the manifest target field. It MUST preserve every entry that does not carry the consumer’s own ownership attribution, regardless of target, and every consumer-owned entry for a target that remains attributable under (a)-(c).

A well-formed ownership attribution to a foreign or unresolvable owner identity does not identify an entry as consumer-owned and MUST be preserved. If the manifest does not declare a target field, or the consumer cannot determine which target governs a prior entry, the consumer MUST preserve that entry and its ownership attribution, mirroring req-lk-020’s indeterminate case. If the merge-based hook configuration document is already absent for a target while its ownership record remains, a conforming consumer MUST still apply this requirement’s preserve-or-remove decision to that orphaned ownership record: after verifying the record is well-formed, it MUST remove a record attributable to none of (a)-(c) above, and MUST preserve a record attributable to a target that remains attributable under (a)-(c). A consumer that encounters a merge-based hook configuration document or ownership record that is malformed or cannot be parsed MUST leave that document or record unmodified and emit an actionable diagnostic naming the affected path, rather than partially or silently repairing it. This requirement does not mandate how ownership is recorded (inline marker vs. a separate ownership record) or which merge-hook targets exist; it binds only the preserve-or-remove decision once ownership is determinate.

[req-lk-024] When a conforming consumer implementation deletes a deployed file because the lockfile lists it (cleanup of paths a dependency no longer deploys, of dependencies no longer declared, or of paths an uninstall or prune removes), it MUST delete that file only when evidence shows the consumer deployed the bytes currently on disk: either a local deployment record, written by the consumer on this installation when it wrote the file, whose content hash matches the file, or byte equality, over the canonical content domain of req-lk-012, with what the locked version of the owning dependency renders for that path. Except under the consent exception below, a lockfile content hash alone MUST NOT authorize the deletion: it proves content, not that the consumer deployed it. Without such evidence, or when the file differs from it, the consumer MUST keep the file and emit a diagnostic naming its path and the manual resolution, except as the consent exception below permits. A consumer that needs the dependency’s source to establish the render MUST establish it before removing that source. Removing a consumer-managed final symbolic link removes no file content and is outside this requirement. One consent exception applies, only to an uninstall the user explicitly consents to on that invocation. It covers a file that lacks evidence because the consumer read its local deployment records without error and holds none for the file (an absent record store holds none; a store that exists but cannot be read or parsed does not qualify), and because the consumer attempted, and failed, to produce any render of the locked dependencies that own the path. For such a file the consumer MAY delete it when its content hash, over the canonical domain of req-lk-012, equals the one distinct content hash the lockfile records for that path across all its owning dependencies, compared per req-lk-016 (a bare hexadecimal value reads as sha256; a value naming another algorithm does not match). The consumer MUST re-evaluate every condition of this exception immediately before removing the file, and MUST name each file so deleted and state that its lockfile hash was the basis. The consumer MUST NOT apply the exception to a path that a dependency remaining after the uninstall also lists, when a deployment record or a render shows different bytes, when a render lacks the path, when the lockfile records no hash or two or more distinct hashes for the path, or when the file is unreadable or is not a regular file (a symbolic link included), and MUST NOT infer consent from another option, an environment variable, configuration, or manifest or lockfile content.

[req-lk-016] A conforming consumer implementation MUST emit hash values as <algo>:<hex> envelopes (for example sha256:abcd...) in every position where this specification records a digest: resolved_hash, deployed_file_hashes (each value), local_deployed_file_hashes (each value), content_hash, tree_sha256, and any future hash field. The <algo> token MUST be one of sha256, sha384, or sha512 per req-mf-018. Readers MUST accept bare 64-character lowercase hexadecimal values as sha256:<hex> for v0.1 backward-compatibility; writers MUST emit the explicit envelope form. Bare-hex reader-tolerance is retained for v0.1 backward-compat only. v0.2 will remove reader-tolerance and require the sha256: envelope unconditionally. v0.1 Writers SHOULD already emit the envelope on every hash field for forward compatibility (this deprecation horizon supersedes earlier drafts that left the bare-hex form open-ended). The byte stream a package content_hash digests is named by lockfile_version. In a version "4" lockfile it is the SHA-256 of the concatenation, over every regular file of the package tree that the implementation’s tree convention selects, taken in ascending byte-wise order of the file’s POSIX relative path encoded as UTF-8, of: that relative path, one NUL (0x00) byte, and the 32-byte raw SHA-256 digest of the file’s bytes (the framing of Section 8.5.11 without its executable-bit byte). In versions "1" to "3" it is the implementation’s legacy tree stream. A consumer MUST verify every content_hash with the stream its lockfile’s version names. A consumer that rewrites a version "1" to "3" lockfile during a writable install MAY promote it to "4", and then MUST re-hash every package content_hash with the version "4" stream from bytes that verified against the recorded value or that it fetched and accepted in that same operation; when any package row cannot be so re-hashed it MUST keep the lockfile’s version and every recorded content_hash unchanged. A frozen install (req-lk-006), apm audit, and any operation that does not otherwise write the lockfile MUST NOT promote it or rewrite any content_hash.

[req-lk-017] A conforming consumer implementation executing a frozen install (see req-lk-006) MUST re-verify every entry in deployed_file_hashes and local_deployed_file_hashes against the on-disk content, hashed over the canonical domain defined by req-lk-012, and MUST fail closed on mismatch. The diagnostic MUST name the offending path, the expected envelope, and the observed envelope. The same re-verification MUST run on apm audit.

5.2.1 Staged replacement recovery (proposed)

Section titled “5.2.1 Staged replacement recovery (proposed)”

PROPOSED amendment 0.1.52, implementing the bounded recovery behavior accepted in issue #3293. Section 9.3 review and public comment remain pending. Inclusion in this working draft, its requirement index, or its conformance tests is not evidence of adoption or a released implementation.

For this section, staged dependency replacement means preparing a candidate outside its final package-materialization path before atomically creating or replacing that path. Direct writes without a separate candidate are outside this capability.

[req-lk-023] A conforming consumer implementation providing staged dependency replacement MUST preserve the following recovery guarantees:

  1. Candidate download or activation failure produces a nonzero install result identifying the failed operation, affected path, and original error, including the actual filesystem error where applicable. A later rollback or cleanup failure is reported alongside that original failure, not substituted for it.
  2. Such failure, before committing the replacement, preserves existing lockfile bytes and restores the prior package and manifest through the implementation’s transaction mechanism where filesystem access permits. If restoration is denied, the consumer retains available prior data or backups and identifies their recovery locations and the denied operation; it does not claim that rollback completed.
  3. A failed recovery of one package does not prevent independent package or manifest restoration attempts. Cleanup preserves active staging, unknown or legacy roots, and retained prior-data backups; it removes only paths established as safe, inactive, implementation-owned staging without following symlinked staging roots or deleting outside the authorized staging boundary. A later retry after the obstruction clears uses a fresh candidate, not an incomplete clone target.
  4. Once replacement is committed, backup-disposal failure is reported with residual paths, without rolling the validated replacement back to an old backup that disposal may already have partially removed.

This proposal does not extend transaction coverage to arbitrary lifecycle scripts or promise successful filesystem operations under persistent OS or endpoint-policy denial. Validation-before-activation, pin verification, atomic replacement, and existing security requirements remain unchanged, including req-lk-013 and req-lk-015 on retries. Under Section 9.2 this adds a conditional recovery obligation, not behavior-neutral errata; consumers without staged replacement acquire no new replacement capability. The optional-feature disclosure in Section 11.2 item 3 covers this capability.

A project that ships its own primitives records the files it deploys under local_deployed_files and local_deployed_file_hashes at the top level. When the lockfile is loaded, consumers MAY synthesize an in-memory virtual dependency entry keyed by "." for uniform iteration over owned files. The synthesized entry MUST NOT be written back to YAML; the flat local_deployed_* fields are the on-disk source of truth.

The synthesized entry, when present in memory, has:

  • repo_url: <self>
  • source: local
  • local_path: "."
  • depth: 0
  • is_dev: true

This isolation prevents the orphan-cleanup logic of one dependency from removing files attributed to another (see Section 10.7).

5.4 Lockfile versions (1, 2, 4) and bumping rules

Section titled “5.4 Lockfile versions (1, 2, 4) and bumping rules”

This specification defines two lockfile schema versions, "1" and "2". Both are valid on-disk formats; "2" is a strict superset of "1". Editorial reconciliation with the companion is consolidated in Appendix E.

Version "4" (amendment 0.1.68) admits every field of the earlier versions, including the version "3" replacement state below, and changes only the byte stream a package content_hash digests, as defined by req-lk-016. A consumer that does not recognise "4" refuses the lockfile under req-lk-004; it never verifies a version "4" digest with an earlier stream.

The separately proposed opt-in source-replacement capability uses "3" under req-rpl-003. It is not an adopted expansion of the base version set.

[req-lk-002] A conforming consumer implementation MUST set lockfile_version: "2" when at least one entry in dependencies has source: registry. When no entry has source: registry, the consumer MAY emit either "1" or "2". The version is monotonic: once a consumer writes lockfile_version: "2" to a given lockfile, subsequent rewrites of that lockfile by any conforming consumer MUST NOT demote the version to "1", even if the registry-sourced entry is removed. A consumer SHOULD tolerate reading either "1" or "2" regardless of which version it prefers on write.

[req-lk-004] A conforming consumer implementation MUST refuse to operate on a lockfile whose lockfile_version value is not one of the versions it recognises, with a diagnostic that explicitly offers the user a choice of either upgrading the consumer or regenerating the lockfile from the manifest.

The lockfile is the contract apm audit validates the workspace against.

[req-lk-005] A conforming consumer implementation MUST treat two lockfiles as semantically equivalent if they differ only in the presence or values of generated_at and apm_version. A no-op install operation MUST NOT rewrite a lockfile whose only changed fields would be these two. generated_at is optional, advisory metadata. Consumers MUST omit generated_at from newly created lockfiles unless explicit user or deployment configuration requests it. When an existing lockfile omits generated_at, a consumer MUST NOT reintroduce it solely as metadata during a later write unless that configuration opts in. Consumers operating in privacy-sensitive deployments SHOULD omit both provenance fields to avoid leaking tool version or build-time information. When a consumer writes a lockfile, the dependencies list MUST be ordered ascending lexicographically by the tuple (repo_url, virtual_path); entries without virtual_path sort as if virtual_path were the empty string. Two lockfiles differing only in entry order are semantically equivalent under this requirement, but a write-back MUST canonicalise to the pinned order so frozen-install diffs are stable across implementations.

[req-lk-006] A conforming consumer implementation MUST support a frozen-install mode in which the lockfile is never written or rewritten. Before any lockfile, target configuration, deployment, or cache mutation (target configuration means on-disk state a target-deploy step may write per Section 8.5; cache mutation means persistent resolver or materialiser state per Section 7.2), the install MUST fail when the lockfile is absent, when any direct package dependency has no pin, or when the manifest’s direct MCP declarations differ from the lockfile’s recorded MCP server names or configurations. Direct MCP declarations comprise entries under both dependencies.mcp and devDependencies.mcp. A mismatch exists when the set of declared MCP names differs from either the names in mcp_servers or the keys in mcp_configs, or when a shared name’s derived configuration is not key-order-insensitive structurally equal to its mcp_configs value. Variable placeholders are compared as literal strings, not expanded. An operation whose effect would insert, remove, or modify a manifest dependency entry MUST be rejected in frozen mode before that modification takes effect. The frozen-install operation is opt-in in v0.1 via --frozen (or equivalent); a future minor revision will flip the default to “frozen when a lockfile is present” (deferred to v0.x minor, see Section 9.2).

[req-lk-018] A conforming consumer implementation SHOULD default to frozen-install behaviour when the CI environment variable is truthy (defined as: present and not the literal strings "", "0", "false", case-insensitive). The user MAY override the SHOULD-default via explicit non-frozen invocation. This SHOULD-on-CI rule is a transition step toward the v0.x default flip in req-lk-006.

[req-lk-007] A conforming consumer implementation SHOULD skip the download step when a local checkout already matches the locked commit. This optimisation MUST NOT change observable behaviour; the post-install workspace state MUST be identical to a fresh install.

Proposed obsolete dependency-claim repair (informative)

Section titled “Proposed obsolete dependency-claim repair (informative)”

The accepted implementation scope in apm#3281 distinguishes a missing desired file from an obsolete claim for an already-absent file. The former remains drift under req-lk-017. The proposed repair handles the latter during an ordinary, non-frozen install, at project or user scope, without resetting or uninstalling the dependency.

Retirement requires successful, authoritative, complete reintegration of the dependency in the processed target scope and current source selection proving it no longer deploys the path. Missing bytes, a directory prefix, a saved hash, or a list of copied files alone do not establish that proof. File lists, corresponding hashes, and any canonical ownership ledger would change together, including when an older lockfile has no ledger. The proposal does not require a new lockfile format.

The repair removes metadata only, not disk content. Desired paths, other owners, unprocessed targets, and failed, skipped, incomplete, or refused selections retain their claims. Present edited, untracked, or ambiguously owned content gains no deletion, adoption, or detachment authority. Existing no-hash compatibility, project-self cleanup, and imperative bundle cleanup are outside this change. Audit does not perform the repair; frozen install remains subject to req-lk-006 and does not migrate claims.

This proposal would introduce a narrow obsolete-claim exception to the target-based preservation rule in req-lk-020; it does not reinterpret that rule as proof of current source membership. It adds no normative requirement or conformance claim and does not assert that the repair is available in a released consumer. Amendment status remains governed by Section 9.3.

5.6 git-semver fields (constraint, resolved_tag, resolved_at)

Section titled “5.6 git-semver fields (constraint, resolved_tag, resolved_at)”

When the resolver picks a git tag from a semver range (see Section 7.3), it records three additional fields on the resolved entry. These fields are valid in both lockfile_version: "1" and "2" (see req-lk-002). The presence of constraint identifies the git-semver shape. A git-literal entry updated under req-rs-017 has no constraint; its optional resolved_tag is advisory provenance and does not change replay or trust semantics.

[req-lk-008] A conforming consumer implementation MUST record constraint, resolved_tag, and resolved_at on every git-semver lockfile entry. constraint MUST be the original semver range from the manifest (verbatim). resolved_tag MUST be the literal tag string the range resolved to. resolved_at MUST be an ISO 8601 UTC timestamp of the resolution event and is advisory; it MUST NOT be used as a tie-breaker in replay.

[req-lk-009] A conforming consumer implementation MUST replay a previously locked git-semver resolution (reusing the locked resolved_tag) when the manifest’s current semver constraint is equal to the locked constraint. A different manifest constraint MUST trigger re-resolution against the remote.

[req-lk-010] A conforming consumer implementation MUST, when performing an explicit update operation against a direct git-semver dependency, purge the dependency’s install path before re-resolving so that the download callback re-runs even when the resolved tag is unchanged. This guards against the regression where a cached install path masks a re-resolution event.

resolved_commit is a SHA-1 identifier and serves as a stable content pointer in v0.1, but SHA-1 alone is below the 2026 collision-resistance floor and MUST NOT be relied on as the sole integrity anchor. To close the SHA-1 gap, every git-sourced lockfile entry carries a content_hash envelope over the package tree (req-lk-015); its byte stream follows lockfile_version per req-lk-016.

The canonical git tree hash, recorded as tree_sha256, is reserved for v0.2. Its candidate definition (informative in v0.1) is the SHA-256 over the following byte representation of the resolved tree:

<line> ::= <mode-octal> SP <name-utf8> SP <blob-sha256-hex> LF
<canonical-tree> ::= <line>* (entries sorted lexicographically by name)

<mode-octal> is the four- or six-digit POSIX-style file mode (100644, 100755, 120000, 040000); <name-utf8> is the filesystem name; <blob-sha256-hex> is the lowercase hexadecimal SHA-256 of the blob bytes. Subdirectories recurse: a subdirectory entry uses mode 040000 and its blob-sha256 is itself the SHA-256 of the subdirectory’s canonical tree representation. Lines are LF-terminated and UTF-8 encoded; entries are sorted byte-wise by name.

[req-lk-015] A conforming consumer implementation MUST compute and record content_hash, a sha256 envelope over the package tree (req-lk-016), for every git-sourced lockfile entry. On a frozen install (see req-lk-006) and on apm audit, the consumer MUST re-compute content_hash from the package tree at resolved_commit and MUST fail closed when the recomputed value differs from the recorded value. The diagnostic MUST name the entry, the expected envelope, and the observed envelope. A v0.1 lockfile may also carry tree_sha256; it does not replace content_hash.

Editorial note. resolved_commit is a SHA-1 identifier. The git project’s SHA-1-to-SHA-256 object-format transition is ongoing; until SHA-1 collisions are observed in the wild against the git object format, resolved_commit is retained as the canonical pointer, with content_hash providing collision-resistant integrity in v0.1 and the canonical tree_sha256 reserved for v0.2. A future revision will track resolved_commit_sha256 once git’s SHA-256 object-format is widely deployed.

Editorial note. Canonical-tree definition for local-path content_hash is reserved for v0.2; v0.1 consumers MAY use platform-native walk order but MUST document their choice in their conformance statement.

This section’s normative statements are:


A Governance implementation reads zero or one discovered apm-policy.yml file per install operation. An install or update operation that also accepts an explicit policy source composes it with the discovered policy under req-pl-022.

[req-pl-001] A conforming governance implementation MUST discover the active policy in the following priority order: (1) an explicit --policy <ref> argument provided by the user; (2) any registered discovery provider invoked in the configured order (see Section 6.1.1 and req-pl-011). No other discovery mechanism MAY be substituted for this order. When no provider yields a policy, no policy is applied. An install or update operation that also accepts an explicit policy source composes it with the discovered policy under req-pl-022.

[req-pl-021] A conforming governance implementation MUST, when an explicit --policy <ref> argument names a concrete policy source (rather than requesting discovery) and that source cannot be resolved, fetched, or parsed into a valid policy, terminate the governance operation non-zero with a diagnostic that names the ref and the cause. It MUST NOT fall back to discovery or proceed as though no policy applies, and the effective fetch_failure default MUST NOT relax this outcome. A previously fetched valid policy that the implementation serves from cache under its documented stale-cache rules counts as resolved. An operator-level switch that disables policy enforcement for the whole invocation is outside this requirement, because the ref is never loaded; an implementation that honours such a switch MUST state in its diagnostics that the explicit ref was not enforced.

[req-pl-022] A conforming governance implementation that accepts an explicit policy source on an install or update operation in addition to discovery MUST: (a) evaluate the operation against the merge of the discovered effective policy, as parent, and the explicit policy, as child, under the tighten-only rules of Section 6.4 (req-pl-006), so the explicit source can add constraints but never relax, remove, or replace a discovered one; (b) when no policy is discovered, evaluate the operation against the explicit policy alone; (c) when the explicit source cannot be resolved, fetched, or parsed into a valid policy, or publishes none, terminate the operation non-zero before any deployment write, with a diagnostic that names the source (credentials redacted) and the cause, whatever the consumer policy.fetch_failure_default (Section 4.6.1) says; a failure of the discovered policy keeps its own routing; and (d) report every policy source in effect for the operation. A previously fetched valid policy served from cache under the documented stale-cache rules counts as resolved. The manifest policy.hash pin (Section 4.6.1) continues to cover only the discovered policy. An operator-level switch that disables policy enforcement for the whole invocation is outside this requirement.

OpenAPM v0.1 defines discovery as a pluggable extension point. A discovery provider is a named function that, given a project’s remote git context, MAY return a policy reference (URL or local path). The reference initial provider registered by this specification is github-owner-dotgithub, which fetches <owner>/.github/apm-policy.yml from the same host as the project’s remote when the remote host matches the consumer’s implementation-default host. Additional providers (for example gitlab-project-yml, local-fallback) are registered in the non-normative “OpenAPM Discovery Provider Registry v0.1” companion document.

[req-pl-011] A conforming governance implementation MUST expose discovery as a registered, ordered list of providers (the default order is implementation-defined and MUST be documented in the conformance statement). Providers MUST be selectable per project via the policy discovery: block. A consumer MUST NOT hard-code a host-specific discovery convention as the sole discovery path. The github-owner-dotgithub provider is the registered v0.1 default, NOT a specification-mandated discovery mechanism.

[req-pl-012] A conforming governance implementation that needs to identify the “project’s remote” for discovery MUST select the git remote named origin if present; if origin is absent but exactly one git remote exists, that remote MUST be used; if multiple non-origin remotes exist, discovery MUST fail closed with a diagnostic naming the candidates; if no remote exists, no discovery is attempted.

Because the default discovery host is implementation-defined (see req-mf-019), two conformant Consumers MAY yield different policy discoveries for the same project when they default to different hosts (for example, one defaults to github.com, another to gitlab.com). Projects wanting deterministic discovery across heterogeneous Consumers SHOULD (a) declare default_host: explicitly in apm.yml, and (b) select the discovery provider explicitly in apm-policy.yml’s discovery: block. No new normative statement is added by this note; it is interpretive guidance for the existing MUSTs in Section 6.1.1.

A policy declares an enforcement value of off, warn, or block.

ModeBehaviour
offPolicy is reported but never gates an operation.
warnViolations print warnings, exit code remains 0. Default.
blockViolations print errors and exit non-zero; install aborts before disk write.

When fetch_failure is unset, the effective value is warn. The default applies independently of the enforcement mode default and is the value a conforming governance implementation MUST use when the field is absent from the policy document.

[req-pl-002] A conforming governance implementation MUST, when the effective enforcement value is block and at least one violation is detected, cause the install operation to abort before any byte is written to disk for the proposed install.

[req-pl-010] A conforming governance implementation MUST, when the effective fetch_failure value is block and the policy cannot be fetched or parsed, abort the install operation with a fail-closed diagnostic. The same MUST hold when fetch_failure is block and a transitively extends:’d policy fails to fetch.

The dependencies policy block governs APM dependency declarations.

FieldSemantic
allowList of patterns matched against the canonical dependency package path: repository coordinate plus any virtual path, with the # suffix excluded; a host-qualified pattern also requires the effective host per req-pl-018 clause (g). Tri-state (see Section 6.5); case treatment per req-pl-018.
denyAlways wins over allow; host-qualified pattern matching per req-pl-018 clause (g); case treatment per req-pl-018.
requireExact packages every consumer manifest must include; host matching per req-pl-018 clause (g); case treatment per req-pl-018.
require_resolutionproject-wins / policy-wins / block for required-package version conflicts. Default project-wins when unset.
max_depthMaximum transitive dependency depth. Default 50.
require_pinned_constraintWhen true, flags unbounded direct deps as violations.

[req-pl-007] A conforming governance implementation that honours require_pinned_constraint: true MUST flag, as a violation routed through the active enforcement value, every direct APM dependency whose constraint is one of: (a) no ref at all; (b) the literal *; (c) a bare branch name; (d) an unbounded lower-bound range such as >=X.Y without an upper bound. Transitive dependencies MUST NOT be flagged by this rule.

[req-pl-008] A conforming governance implementation that honours require_pinned_constraint: true MUST classify the following as pinned (no violation): (a) a 40-character commit SHA; (b) a literal semver tag matching v?\d+\.\d+\.\d+; (c) a bounded semver range (containing an upper bound); (d) a dependency with source: registry; (e) a local-path dependency.

[req-pl-018] A conforming governance implementation MUST apply the following dependency-policy identity rules:

(a) The match subject is the canonical dependency package path, which omits the host: its repository coordinate plus any virtual in-repository path, with any # reference suffix excluded. A host-qualified pattern additionally constrains the host under clause (g); a hostless allow or deny pattern matches the path on every host, and a require entry is host-bound under clause (g). A registry name is never part of this match subject and is compared literally wherever it appears in policy operands. This statement governs glob matching for dependencies.allow and dependencies.deny, plus exact identity matching for dependencies.require. A require entry is exact: * characters are literal, and its package portion is the text before the first #. This statement changes case treatment only; it does not change which subject string is matched. Normalization under this statement applies at match time only. Policy-chain intersection, union, and deduplication under Section 6.4 compare authored entries byte-exactly.

(b) A Governance implementation MUST apply to policy operands the repository path case rule disclosed under Section 11.2 item 6. This is the same rule governed by req-rs-016 clause (3) where the implementation also claims the Consumer class. A registry-sourced dependency, including one resolved through a registry prefix, has case-insensitive repository-coordinate segments; this source rule applies regardless of the case rule for its host. Local-path and marketplace dependencies, plus dependencies on every host not documented as case-insensitive under Section 11.2, remain case-sensitive. The Governance implementation MUST NOT substitute a different case rule from the one disclosed for that host or registry source.

(c) The dependency subject determines a repository-coordinate segment count N, before any virtual in-repository path. The same N bounds both operands: only the first N U+002F-separated segments of the subject and pattern are eligible for case-insensitive comparison. Normalization maps only U+0041 through U+005A to U+0061 through U+007A. Every other code point is compared literally; Unicode case folding, locale-sensitive mapping, and normalization forms are outside v0.1 per Section 1.4. For the avoidance of doubt, this statement never applies outside the fields named in clause (a): normalization MUST NOT extend into a virtual in-repository path, a reference suffix after #, a registry name, an MCP server name, or an unmanaged-file workspace path.

(d) For a glob pattern, the eligible prefix from clause (c) is further truncated to the segments strictly before the first pattern segment that contains **. The effective case-insensitive prefix is therefore the lesser of N and that segment index; every remaining segment on both operands is compared byte-exactly. A fused ** is a ** token sharing a segment with one or more other characters, for example Sec**.

(e) dependencies.deny MUST retain precedence over dependencies.allow after normalization. Where clause (b) or clause (d) requires byte-exact matching, a deny pattern that differs only in case does not match. Policy authors who intend to deny multiple distinct spellings on such a source or after such a truncation must enumerate those spellings. The residual security boundary is described in Section 10.8.

(f) A conforming governance implementation MUST evaluate every pattern-bearing policy field named in Section 6.5 under that section’s pattern grammar. It MUST NOT add character-class, brace, or escape expansion.

(g) A dependencies.allow or dependencies.deny pattern whose first U+002F-separated segment contains U+002E and does not begin with U+002E is host-qualified; a pattern beginning with ./ or ../ is therefore a hostless local-path pattern. That segment, with any trailing colon followed by one to five ASCII digits (U+0030 through U+0039) removed, and any single trailing U+002E removed, names a host; the remaining segments are the path pattern matched under clauses (a) through (f). A host-qualified pattern matches a dependency only when the dependency’s effective host equals the named host after mapping only U+0041 through U+005A to U+0061 through U+007A. The effective host is the host written in the dependency reference or, when none is written, the host resolution selects for it: the default_host: of the manifest that declares the dependency, when declared (Section 4.2.4), otherwise the implementation-default host (Section 1.4), with any trailing colon followed by one to five ASCII digits (U+0030 through U+0039) removed, and any single trailing U+002E removed. Ports are ignored on both sides; the host segment is compared literally with no wildcard expansion, and no other host (including a subdomain or a longer name sharing a prefix) matches. Local-path dependencies have no host and never match a host-qualified pattern. Shorthand, HTTPS and SSH references to the same repository MUST yield the same result. This clause applies to direct and transitive dependencies wherever dependencies.allow and dependencies.deny are evaluated. A dependencies.require entry splits its host under the same rule and names exactly one host, using the same effective host and the same ASCII mapping: a host-qualified entry identifies a dependency only when the dependency’s effective host equals the named host, and a hostless entry identifies a dependency only when the dependency’s effective host is the implementation-default host of the evaluating governance implementation; a consumer manifest default_host: never changes the host a hostless entry names. A local-path dependency has no host and is identified by a hostless entry. A dependency whose effective host contains no U+002E and is not the implementation-default host cannot be identified by a require entry at this revision, because no entry can name that host. When an entry identifies more than one evaluated dependency (for example the same path on one host with different ports), the first in the order the check evaluates dependencies, which for dependencies declared in one manifest is their declaration order, is the one identified; a later dependency the entry also identifies is not evaluated for that entry. Every check that evaluates a require entry MUST resolve it to that same dependency on the manifest and the lockfile side, reading the lock entry by that dependency’s own lockfile identity (Section 5.2), not by re-matching the entry text against lockfile fields. It MUST treat an entry that identifies no dependency as a violation routed through the active enforcement value (Section 6.2), and MUST NOT skip such an entry.

The mcp block governs MCP server declarations, including transitive ones.

The compilation block governs apm compile outputs. Sub-field semantics are documented in the companion policy-schema.md and are non-normative in v0.1; the merge rules in Section 6.4 reference only the field family compilation.*.

The manifest block governs the shape of the consumer manifest itself (required fields, scripts allow/deny, explicit-includes requirement).

The unmanaged_files block governs files in primitive target directories that are not recorded in apm.lock.yaml. directories names the managed primitive target trees to scan, action selects the response (ignore | warn | deny), and exclude is a glob allow-list of workspace paths to suppress from the report. Its glob patterns use the syntax in Section 6.5, but workspace paths remain byte-exact and case-sensitive; dependency identity normalization under req-pl-018 does not apply.

[req-pl-015] A conforming governance implementation MUST, when it evaluates policy over a populated primitive target tree (for example during an audit), report unmanaged artifacts with the following completeness guarantees:

(a) It MUST surface every file under a managed primitive target directory that is neither recorded in apm.lock.yaml nor matched by a configured unmanaged_files.exclude glob.

(b) Each surfaced path MUST be reported with the reason it is unmanaged (that it is not tracked in apm.lock.yaml). Where the path also matches a configured dependency or MCP deny pattern, the report MUST additionally carry a supplemental conflict note naming that pattern; this note is enrichment only and never itself causes a tracked path to be surfaced. Where the primitive type is determinable, the surfaced entry MUST carry its inferred primitive type; where it is not determinable, the type annotation MUST be omitted.

(c) A path matched by a configured unmanaged_files.exclude glob MUST NOT be surfaced, even when it also matches a deny pattern.

This requirement governs the completeness of unmanaged-artifact reporting only: whether a surfaced artifact yields a non-passing audit result remains governed by unmanaged_files.action per the merge table in Section 6.4, so req-pl-015 is not an enforcement claim.

The security block declares opt-in supply-chain controls. Every key defaults to false (off), so a policy that omits the block behaves exactly as it did before these keys existed.

  • security.integrity.require_hashes (boolean, default false): when true, the install operation fails closed if any resolved non-local dependency selected for installation lacks a recorded content hash (the content_hash lockfile field) in apm.lock.yaml. Local dependencies are exempt (they are anchored by deployed-file hashes, not a package digest).
  • security.audit.fail_on_drift (boolean, default false): when true, a bare apm audit exits non-zero if lockfile drift is detected or the drift check cannot complete.

The normative behaviour for both keys is specified in Section 6.8. Both merge by logical OR across an extends: chain (see Section 6.4): once any ancestor sets a key to true, a descendant cannot relax it back to false.

Policies form a chain via extends:.

[req-pl-003] A conforming governance implementation MUST limit the extends: chain depth to 5 layers maximum and MUST reject cycles in the chain with a diagnostic naming the cycle members.

[req-pl-004] A conforming governance implementation MUST pin an extends: reference to the host class (see Section 10.3) of the leaf policy. A policy fetched from one host class MUST NOT extend a policy fetched from any other host class; cross-host-class extends: MUST be rejected at parse time.

[req-pl-006] A conforming governance implementation MUST merge a policy chain per the following table:

Field familyMerge rule
enforcementStricter wins (block > warn > off).
fetch_failureStricter wins (block > warn; unset is the warn default).
*.allow listsSet intersection, byte-exact on each entry’s UTF-8 text. null is transparent.
*.deny listsUnion, deduplicated byte-exact, parent order preserved.
*.require listsUnion, deduplicated byte-exact, parent order preserved.
dependencies.max_depthmin(parent, child).
dependencies.require_resolutionStricter wins (block > policy-wins > project-wins).
mcp.self_definedStricter wins (deny > warn > allow).
mcp.trust_transitiveLogical AND.
manifest.scriptsStricter wins (deny > allow).
unmanaged_files.actionStricter wins (deny > warn > ignore).
unmanaged_files.excludeUnion, deduplicated (byte-exact on each pattern’s UTF-8 string), parent order preserved (additive: a child adds exclusions and cannot clear a parent’s; null and [] both preserve the parent list).
security.integrity.require_hashesLogical OR (once true, stays true).
security.audit.fail_on_driftLogical OR (once true, stays true).

These merge operations compare authored entries before dependency evaluation. Case-variant entries remain distinct during union and deduplication, and case-variant allow entries can intersect to an empty list. req-pl-018 normalization applies only when the merged policy is matched against a dependency subject.

6.5 Allow-list / deny-list tri-state semantics

Section titled “6.5 Allow-list / deny-list tri-state semantics”

[req-pl-005] A conforming governance implementation MUST treat list-valued allow/deny/require fields as a three-state value: (a) field omitted (or explicit null) means “no opinion” and is transparent during merge; (b) explicit empty list [] means “explicitly empty” and overrides the parent for that field; (c) non-empty list [...] carries the listed entries and merges per the table in Section 6.4.

Pattern grammar (normative through req-pl-018 clause (f)). Pattern-bearing dependencies.allow, dependencies.deny, MCP allow/deny, and unmanaged_files.exclude entries are matched against the whole subject and are anchored at both ends. * matches zero or more characters other than U+002F (/). ** matches zero or more characters including U+002F, including when fused with other characters in one segment. Every other character is literal; there is no character-class, brace, or escape expansion. req-pl-018 changes only case treatment for dependency identities and does not change this grammar.

[req-pl-009] A conforming governance implementation MUST emit a warning (never a parse error) when it encounters an unknown top-level key in apm-policy.yml. This guarantees newer policy files load on older clients without breaking the install. Vendor-extension keys matching x-[a-z][a-z0-9-]* are recognised per req-ext-001 and MUST NOT produce a warning; they are preserved silently. See also req-ext-001.

A small policy chain:

# .github/apm-policy.yml in contoso/.github
name: contoso-baseline
extends: contoso-enterprise/policy
enforcement: block
fetch_failure: block
dependencies:
allow:
- contoso/*
- microsoft/apm-skills-*
deny:
- "*/legacy-*"
require:
- contoso/security-baseline
require_pinned_constraint: true
max_depth: 25
manifest:
scripts: deny
required_fields:
- description
- license

The security.integrity and security.audit blocks declare opt-in, fail-closed controls. req-pl-013 and req-pl-014 are default-off; a policy that omits these two controls is unaffected by them. req-pl-016 is an exception: it defines an unconditional integrity invariant that applies regardless of policy configuration, independent of any security.audit control.

[req-pl-013] A conforming governance implementation that honours security.integrity.require_hashes: true MUST fail the install operation with a fail-closed diagnostic when any resolved non-local dependency selected for installation lacks a recorded content hash (the content_hash lockfile field) in apm.lock.yaml. The same fail-closed behaviour MUST hold when the lockfile is absent or unreadable at the point of the check. Local dependencies are exempt; they are anchored by deployed-file hashes rather than a package content hash.

[req-pl-014] A conforming governance implementation that honours security.audit.fail_on_drift: true MUST cause the audit operation to terminate with a non-zero exit status when lockfile drift is detected, or when the drift check fails to complete (for example, an unreadable or corrupt local dependency graph). A drift check that is merely skipped for an advisory reason, such as a cache miss, does not by itself alter the exit status. When security.audit.fail_on_drift is absent or false, detected drift MUST be reported without, by itself, altering the audit exit status.

[req-pl-016] A conforming governance implementation MUST treat a canonical deployment-ledger owner (a dependency-identity reference recorded as an owner of a deployment row in apm.lock.yaml) that does not resolve to a dependency entry in apm.lock.yaml as a hard integrity failure, independent of the security.audit.fail_on_drift control. This failure is distinct from the ordinary deployed-file drift governed by req-pl-014: an owner is a durable ownership record carried in the lockfile, not an edit to a deployed file, so a stale owner MUST surface even when security.audit.fail_on_drift is absent or false. When at least one such stale ownership record is present, an audit operation MUST terminate with a non-zero exit status in both its default and CI modes, and MUST NOT mutate any deployed byte (for example under a strip operation) while the ownership record remains invalid. When a deployment locator (the target-qualified identifier of a single tracked deployment row in the ledger) resolves to more than one owner and any one of those owners does not resolve in apm.lock.yaml, the hard-failure and mutation-block obligations apply to the entire audit operation, not only to the paths co-owned by the stale owner. The diagnostic MUST name each affected deployment locator together with its invalid owner reference(s), and MUST carry a single remediation directing the operator to reconcile ownership (prune the departed owners, then re-audit).

[req-pl-017] A conforming governance implementation discovering an organization policy from Azure DevOps MUST request apm/apm-policy as its primary project and repository coordinate. It MAY use a fresh cache entry for that primary coordinate; primary and legacy cache entries MUST remain distinct. It MAY request or use the legacy _apm/_apm coordinate only when the primary request received an HTTP 404 response. It MUST NOT try that legacy coordinate after authentication, authorization, network, timeout, rate-limit, malformed-response, or other non-404 failures. When the legacy coordinate supplies a policy, the implementation MUST emit one actionable migration warning naming apm/apm-policy.

deployed-prompt-audit is an OPTIONAL governance capability, distinct from policy unmanaged-file evaluation (req-pl-015), source materialization scanning (req-sc-015), and drift checking (req-pl-014). Concrete paths, native keys, check algorithms and output serialization are implementation-defined; the following requirements govern the declared scope, not arbitrary filesystem content.

[req-pl-019] A conforming governance implementation claiming deployed-prompt-audit MUST identify its supported targets, project or user scopes, recognized primitive locations and native formats, prompt checks and intentional exclusions in its conformance statement. The declared profile MUST include at least one prompt-bearing location or field and one specified content check. A workspace with no matching content may nevertheless have complete, empty coverage. Within that declared profile, the implementation MUST:

(a) discover recognized deployed primitives independently of ownership records, including untracked content and shared native configuration in the declared scope, using the same target location and format definitions as the Consumer deployment implementation identified by its conformance statement. A Governance implementation may consume those definitions from another implementation; claiming this capability does not require implementing deployment or claiming the Consumer class;

(b) distinguish discovery from prompt-check applicability: check prompt-bearing text, including decoded native prompt fields, while reporting recognized command-only hooks as not applicable to prompt checks, without treating their commands or executable bodies as prompts;

(c) report incomplete coverage, with an affected location and reason, when a recognized surface cannot be read or interpreted, including an unsupported native format or version; terminate the audit non-zero for incomplete coverage in default and CI modes, even without policy; and

(d) distinguish coverage from content findings in its reports, identify native prompt findings by field location, distinguish decoded prompt coordinates from physical file coordinates, and render untrusted locations and diagnostics as literal text rather than active markup or display-control characters in human-facing output.

A valid non-prompt entry does not fail this capability by itself. Unrelated files outside the declared primitive scope are not incomplete coverage merely because they were not inspected. These rules do not change hash verification, executable trust or drift policy.

[req-pl-020] A conforming governance implementation claiming deployed-prompt-audit MUST treat discovery as read-only evidence, not as ownership, execution approval or permission to remediate. It MUST NOT execute hooks, follow symlink files or directories, or widen traversal to unrelated transcripts or user configuration to perform that audit. If it offers automatic prompt-content remediation, it MUST preserve shared native configuration, user-scoped prompt content, and content outside the project root rather than rewriting or deleting them, report affected protected locations for manual review, and fail a remediation request that would touch such content before writing any selected content. User-scoped content remains protected even when the user’s home directory is the deployment traversal root. This automatic-discovery capability does not redefine a separately documented operation on an explicitly selected individual file. Existing ownership and integrity checks, including req-pl-016, remain applicable; this capability grants no additional mutation authority.

This section’s normative statements are:


A consumer MUST classify every dependency declaration into exactly one of the following five reference kinds, evaluated in the order listed:

  1. local — local-path-form strings or object entries lacking a git: and id: key with a path: to the filesystem.
  2. registry — object entries with id: and (implicit or explicit) registry:.
  3. git-semver — object or string entries whose ref: value matches a semver-range pattern (for example ^1.2.0, ~2.0, >=1.0,<2.0).
  4. git-literal — git URL or shorthand with a literal ref: (commit SHA, tag, branch).
  5. marketplace — non-normative in v0.1; producer-side authoring artifact only. A consumer that resolves marketplace references binds their names per Section 4.2.5.

[req-rs-008] A conforming consumer implementation MUST classify every dependency by the priority above as a deterministic function of the entry alone (no remote calls, no implementation defaults). Two conforming consumers presented with the same entry MUST produce the same kind classification.

[req-rs-001] A conforming consumer implementation MUST resolve dependencies by breadth-first traversal of the dependency tree, in the declaration order of each manifest. When the same package identity (<owner>/<repo> or registry identity) is reached via multiple constraint paths (a “diamond”), the consumer MUST apply the following tri-modal policy:

  1. Intersection-pick (default). If every reachable constraint for the identity has a non-empty intersection, the consumer MUST select the highest version satisfying every constraint in the intersection. The selected version is recorded in the lockfile; the chain that contributed the binding tightest constraint is recorded as resolved_by.
  2. Empty-intersection fail-closed. If the intersection of reachable constraints is empty, the install MUST fail with a diagnostic naming both root-to-conflict chains. Silent first-wins resolution MUST NOT be substituted.
  3. Nest mode (opt-in). The manifest MAY declare dependencies.conflict_resolution: nest, which instructs the consumer to allow multiple versions of the same identity co-existing under distinct deploy paths (npm-style nesting). Nest mode is OPTIONAL in v0.1; its on-disk layout normative pin is reserved for v0.2. In v0.1, the on-disk deploy layout for conflict_resolution: nest is reserved (see Section 4.8 and the future workspaces semantics). A conforming consumer encountering dependencies.conflict_resolution: nest in a v0.1 manifest MUST refuse the install with a normative diagnostic naming the key as reserved-for-v0.2 and citing this section.

[req-rs-013] A conforming consumer implementation MUST refuse to install a v0.1 manifest declaring dependencies.conflict_resolution: nest, emitting a normative diagnostic that names the conflict_resolution: nest key as reserved for v0.2 and cites Section 7.2 clause (3).

[req-rs-010] A conforming consumer implementation producing an empty-intersection diagnostic per req-rs-001 clause (2) MUST format the diagnostic so that it lists, for each chain, the ordered sequence of <owner>/<repo>@<constraint> entries from the root manifest to the conflicting entry, separated by ->. Both chains MUST be named; the diagnostic MUST be deterministic for a given install plan.

[req-rs-016] A conforming consumer implementation MUST preserve a minimum safe repository identity through dependency resolution, every in-memory or persistent cache layer, shared clone reuse, and materialisation. This identity is an implementation-private safety boundary, not a wire artifact. It consists of:

  1. the literal authority hostname, compared case-insensitively after ASCII lowercasing and independently of the Host class or aliases: equivalence used for credential scope;
  2. an explicit non-default port, where :443 for HTTPS, :22 for SSH, :80 for HTTP, and :9418 for git transport are equivalent to an absent port; and
  3. the complete repository path after first removing all trailing U+002F (/) characters and then removing at most one trailing literal .git suffix. Path comparison MUST be case-sensitive by default. A dependency with source: registry, including one resolved through a registry prefix, has case-insensitive repository-coordinate segments regardless of host documentation; the source rule takes precedence over the host rule. A consumer MUST apply that registry rule at every cache layer. For every other source, a consumer MAY case-fold paths for a host it documents as case-insensitive in its conformance statement (see Section 11.2) only when every cache layer applies the same rule. The same source and host rules govern policy operands under req-pl-018; repository identity and policy matching MUST NOT diverge. Before comparison, a consumer MUST NOT percent-decode the path, collapse . or .. segments, or coalesce repeated internal slashes; traversal-bearing dependency paths remain subject to parse-time rejection.

Credential material in URL userinfo, query strings, and fragments MUST NOT contribute to repository identity; credential handling remains subject to req-sc-007. An implementation MAY over-partition its private cache by non-credential transport context (for example scheme or SSH username), but MUST NOT omit any minimum identity component above. This cache identity is distinct from the manifest canonicalisation in req-mf-009.

Two dependency declarations whose minimum identities differ MUST NOT share cached source material solely because they use the same ref or have a common repository-path prefix. A consumer MAY reuse cached source material only when minimum identity and resolved commit are equal, or, before a commit is known within one resolution operation, when the literal ref tokens are character-equal. Identity and ref equality MUST NOT override a failed integrity check; the consumer MUST discard or re-fetch material that fails the applicable integrity obligations in req-lk-013 and req-lk-015.

[req-rs-006] A conforming consumer implementation MUST stop transitive resolution at a configurable depth cap whose default value is 50. The Governance class MAY tighten this cap via policy.dependencies.max_depth (see Section 6.3.1). Exceeding the cap MUST cause the install to fail with a diagnostic naming the chain at which the cap was reached.

[req-rs-003] A conforming consumer implementation MUST classify the ref: of any git dependency into one of three kinds: (a) semver — the ref value parses as a semver range per Section 7.3.1; (b) literal — the ref value is a commit SHA, a literal tag (matching v?\d+\.\d+\.\d+ or a non-semver tag), or a branch name; (c) none — the entry has no ref: at all.

[req-rs-002] A conforming consumer implementation MUST, when resolving a git-semver dependency, list the remote git tags of the repository, dereference annotated tags to their peeled commit object (lightweight and annotated tags are treated equivalently thereafter), discard any tag whose name fails to parse under the semver dialect of Section 7.3.1 without diagnostic, filter the remainder to those matching the manifest’s semver range under the same dialect, and pin the highest matching tag in the lockfile. Pre-release tags MUST be excluded from selection unless explicit opt-in is signalled per Section 7.3.1. The selected tag, the original constraint, and the resolution timestamp MUST be written per req-lk-008.

[req-rs-007] A conforming consumer implementation MUST evaluate every semver range expression in a manifest or lockfile under the node-semver dialect as pinned in Section 7.3.1. No implementation-defined hedging is permitted.

OpenAPM v0.1 pins the semver-range dialect to node-semver (https://github.com/npm/node-semver) as its normative reference, with version precedence and pre-release ordering inherited from Semantic Versioning 2.0.0 Section 11 (https://semver.org/spec/v2.0.0.html). The conformance oracle for this section is tests/fixtures/spec-conformance/resolution/semver-dialect.json (see Section 12.4).

Range operators (normative).

OperatorSemantics
^x.y.zCompatible-with-X: matches >= x.y.z, < (x+1).0.0 when x > 0; >= 0.y.z, < 0.(y+1).0 when x == 0 and y > 0; >= 0.0.z, < 0.0.(z+1) when x == 0 and y == 0.
~x.y.zApproximately equivalent: >= x.y.z, < x.(y+1).0. ~x.y (no patch) is equivalent to >= x.y.0, < x.(y+1).0.
>=, >, <=, <, =Comparator-form: standard inequality on semver precedence.
x.y.z, *Wildcard: any version (subject to pre-release exclusion).
Range list (comma or whitespace)Logical AND: >=1.0.0, <2.0.0 matches versions satisfying both comparators.
||Logical OR: ^1 || ^2 matches versions satisfying either range list.
x.y.z - a.b.cHyphen range: equivalent to >= x.y.z, <= a.b.c.

Build metadata. Build metadata (anything after + in a version) MUST be ignored for precedence comparisons per semver 2.0.0 Section 10. Two versions differing only in build metadata compare as equal.

[req-rs-014] When two candidate tags have equal precedence under semver 2.0.0 Section 11 (i.e. they differ only in build-metadata identifier), a conforming consumer MUST select the tag whose name compares highest under bytewise ASCII ordering of the full tag string. This rule eliminates non-determinism in build-metadata ties.

Pre-release ordering. Pre-release ordering follows semver 2.0.0 Section 11: numeric identifiers compare numerically, ASCII alphanumeric identifiers compare lexicographically in ASCII order, numeric identifiers always have lower precedence than alphanumeric identifiers, and a larger set of pre-release fields has higher precedence than a smaller set when all preceding fields are equal.

Pre-release opt-in (normative). A pre-release tag (per semver 2.0.0 Section 9) MAY be selected only when at least one of the following is true:

  1. The manifest range expression itself contains a pre-release identifier on the same [major, minor, patch] tuple as the candidate tag (node-semver “include-prerelease in same range” semantics). For example, >=1.2.0-alpha <1.3.0 permits 1.2.0-beta and 1.2.0, but does NOT permit 1.3.0-alpha.
  2. The manifest dependency entry declares prerelease: true (explicit opt-in across the whole range).

When neither (1) nor (2) holds, every candidate tag with a non-empty pre-release identifier MUST be discarded from the candidate set before highest-match selection.

0.x quirk. Per semver 2.0.0 Section 4, anything 0.x.y is considered unstable; the caret operator narrows accordingly as defined above (^0.2.3 matches >= 0.2.3, < 0.3.0, NOT >= 0.2.3, < 1.0.0). This is the node-semver convention and is adopted normatively.

Determinism. The selection function is a deterministic function of (range expression, candidate-tag set, opt-in signal). Two conforming consumers presented with the same inputs MUST select the same tag.

7.4 Transitive resolution and conflict policy

Section titled “7.4 Transitive resolution and conflict policy”

Conflicts at the primitive level (multiple sources providing a primitive with the same name) are governed by Section 8.3. Conflicts at the package level (multiple resolution paths reaching the same package identity at different constraints) are governed by req-rs-001’s tri-modal policy.

Design rationale (non-normative). The tri-modal policy replaces v0’s silent first-wins behaviour. Empty-intersection fail-closed is the correctness default: a consumer that downgrades a dep silently to satisfy a transitive constraint produces audit drift the workspace owner did not author. The intersection-pick default is conservative; nest-mode is the escape hatch for ecosystems that cannot live without parallel versions. A future v0.2 may introduce policy.dependencies.resolver: to let Governance pick the mode centrally.

A worked example showing primitive- and package-level conflicts composing:

# Manifest:
dependencies:
apm:
- acme/foo#^1.2.0 # direct: depth 1, constraint ^1.2.0
- acme/bar#^2.0.0 # direct: depth 1, constraint ^2.0.0
# acme/bar transitively pulls acme/foo#^1.5.0 (depth 2).
# Intersection of ^1.2.0 and ^1.5.0 is [>=1.5.0, <2.0.0]: pick highest
# tag in [1.5.0, 2.0.0) per req-rs-001 clause (1).
# If acme/bar instead pulled acme/foo#^2.0.0, intersection is empty
# and install fails closed per req-rs-001 clause (2).

Lockfile fragment for the 3-chain intersection case (per req-rs-010, resolved_by records the chain contributing the binding tightest constraint):

# Three chains reach acme/foo:
# root -> acme/foo#^1.2.0 (depth 1, lo=1.2.0)
# root -> acme/bar#^2.0.0 -> acme/foo#^1.5.0 (depth 2, lo=1.5.0)
# root -> acme/baz#^3.0.0 -> acme/qux#^1.0.0 -> acme/foo#~1.7.0
# (depth 3, lo=1.7.0)
# Intersection: [>=1.7.0, <2.0.0]. Pick highest tag in that range.
# The tightest lower bound is contributed by acme/baz -> acme/qux,
# so `resolved_by` records that chain.
dependencies:
- repo_url: github.com/acme/foo
resolved_tag: v1.7.4
constraint: "~1.7.0"
resolved_by: "acme/baz#^3.0.0 -> acme/qux#^1.0.0 -> acme/foo#~1.7.0"
depth: 3

Several edges can reach one dependency identity: a root manifest entry plus transitive manifest entries, or several transitive entries. Each edge can narrow what the consumer deploys from that dependency with an object-form skills: subset (Section 4.3.2) and a consumer-side per-dependency target subset (item (b) of req-tg-008). An edge’s selection is the product of its skill set and its target set. An omitted skill subset selects every selectable skill; an omitted target subset selects every target.

[req-rs-018] A conforming consumer implementation that supports per-dependency skill or target subsets MUST derive the deployment selection of a dependency reached by more than one edge from all of those edges:

  1. Exact pairing. A selectable skill is selected for a target if and only if at least one edge selects both that skill and that target. The consumer MUST NOT deploy a skill into a target that no single edge pairs with it, even when one edge selects the skill and another edge selects the target. It MUST NOT omit a skill-target pair that any edge selects.
  2. All absorbs. An edge that omits an axis selects everything on that axis for that edge. A narrower selection on another edge MUST NOT reduce it.
  3. Order independence. The derived selection, and the lock fields that record it (skill_subset, target_subset, and subset_pairings), MUST be identical for every manifest declaration order, edge discovery order, and edge depth. The consumer MUST NOT substitute a first-wins or last-wins choice among edges.
  4. Lock recording. The lock entry MUST record the derived selection so that replay, audit, and removal can reconstruct each target’s skills without re-reading manifests. skill_subset records the union of selected skill names and target_subset the union of selected targets; each is omitted when any edge selects all on that axis. When those two fields, read as a product, would select a pair that no edge selects, the entry MUST also carry subset_pairings in the canonical form below. Writers MUST omit subset_pairings when the product of the two fields is exact.
  5. Consistency. A reader MUST treat a malformed subset_pairings value, or one whose skill and target unions differ from skill_subset and target_subset, as invalid lock state: a non-frozen install re-derives the selection, while frozen install and audit fail with a diagnostic naming the dependency. An entry without subset_pairings denotes the product of its two flat fields.
  6. Frozen replay. Under frozen install, when the selection derived from the current manifests differs from the recorded selection, the consumer MUST fail before deployment with a diagnostic naming the dependency and stating that its subset selection changed. It MUST NOT deploy either selection.

Canonical subset_pairings form. Each element is a mapping with optional skills and targets keys, each a non-empty list sorted in ascending code-point order; an omitted key means all on that axis. The union of the elements’ products equals the derived selection. When the derived selection includes skills that apply to every target (because at least one edge omits its target subset), the first element has no targets key and carries those skills. Each further element carries one complete skill set that some target receives when that set differs from the first element’s skills (or every distinct set, when there is no such first element), with the sorted list of exactly the targets that receive it. Elements with a targets key are ordered lexicographically by their targets lists (element-wise ascending code-point comparison; a shorter list sorts before a longer list it prefixes). Two equal selections therefore canonicalize to identical data structures. Vendor-extension keys (req-ext-001) inside subset_pairings elements are not part of the canonical form: writers MUST NOT emit them, and readers MUST treat their presence as a malformed value under clause 5.

The derived target union is item (b) of req-tg-008; items (a) and (c) still narrow it, and within the resulting effective target intersection each target receives only the skills paired with it. A skills: subset narrows skills only. This requirement does not change dependency identity (req-rs-016), deduplication, or resolved_by (req-rs-010). Per-dependency subset selection support follows the optional-feature disclosure in Section 11.2.

Example (informative): acme/a declares acme/bundle with skills: [alpha] and targets: [claude], and acme/b declares it with skills: [gamma] and targets: [copilot]. alpha deploys only for claude and gamma only for copilot:

- repo_url: github.com/acme/bundle
skill_subset: [alpha, gamma]
target_subset: [claude, copilot]
subset_pairings:
- skills: [alpha]
targets: [claude]
- skills: [gamma]
targets: [copilot]

[req-rs-004] A conforming consumer implementation MUST treat a manifest entry whose ref: is a semver range as equivalent to its locked counterpart (no drift) when, and only when, the locked constraint value is character-equal to the manifest’s current range. Any difference, including whitespace, MUST trigger re-resolution.

[req-rs-015] A conforming consumer implementation performing a non-update install (that is, not an apm update and not an explicit --refresh/re-resolution invocation) MUST replay a lockfile entry that records a resolved_commit for a git-literal or untagged-branch entry per req-rs-003 by reusing that recorded commit as the resolution result WITHOUT issuing a network ref-resolution — no commits-API query, no git ls-remote, and no clone for ref discovery (illustrative, not exhaustive) — for that entry, provided drift detection against the manifest reference does not require re-resolution. An advisory resolved_tag recorded under req-rs-017 does not change this requirement’s applicability. Object fetch to materialise content at the already-resolved commit is not constrained by this requirement. When the manifest reference for the entry has changed so that the recorded pin no longer matches (drift — defined for entries scoped by this requirement as: the manifest ref value is not character-equal to the lockfile resolved_ref for that entry, or the entry has been removed from the manifest; semver-range drift is governed separately by req-rs-004), or under an explicit apm update / --refresh invocation (req-rs-011, req-rs-012), the consumer MUST re-resolve the reference over the network as usual. The recorded resolved_commit is the lockfile’s resolution anchor (req-lk-003); content integrity remains subject to content_hash (req-lk-015) and resolved_hash (req-lk-013). Notwithstanding the prohibition above, a consumer that holds no recorded outcome of the reachability verification described here for the entry’s repository identity, the endpoint it would contact and the commit MUST, before reusing the recorded commit, verify once that the recorded commit is reachable from a branch or tag of the entry’s origin; the verification MAY use more than one request to the origin, such as a ref advertisement followed by a fetch limited to commit objects. Reachable means the recorded commit is the peeled target of, or an ancestor of, a ref the origin advertises under refs/heads/ or refs/tags/; no other ref namespace counts, and neither fetchability of the commit by its identifier nor objects the consumer already holds establish reachability. When the consumer’s own configuration rewrites the origin URL to another endpoint (Section 7.5.1), that endpoint’s advertised branches and tags answer the verification and the outcome stands only for that endpoint; an offline cache is not an endpoint for this purpose. This verification is not a ref-resolution, and not a remote tag enumeration, for the purposes of this requirement (including the replay rule of req-rs-017 that cites it), even when it uses a ref advertisement, and MUST NOT select a commit other than the recorded one. When the origin is contacted and no branch or tag of it reaches the recorded commit, the consumer MUST refuse the entry before fetching or deploying its content, with a message naming the entry, the commit and a remedy (for example pinning a commit that a branch or tag of the origin reaches), and MUST NOT record the commit as verified; refusing an entry is not a change of the resolution result. When the origin cannot be contacted, the consumer MUST refuse the entry (fail closed) with a message naming the entry and stating that one verification with access to its origin is required, and MUST NOT treat the commit as verified. Refusing an entry under this requirement fails the operation: the consumer MUST exit non-zero and MUST NOT rewrite the lockfile. An entry that the consumer’s own registry proxy configuration routes through a proxy, so that the consumer contacts no origin for it, is exempt from this verification. After a verification that finds the commit reachable, in an operation that completes and is not a preview, dry-run or read-only operation, the consumer MUST record the outcome, so that later non-update replays of that entry issue no ref-resolution or reachability-verification request for it. The consumer MUST keep the recorded outcome in consumer-local state keyed by the full commit identifier, the entry’s repository identity (req-rs-016) and the endpoint contacted (for lookup, the endpoint the consumer would contact for the entry under its configuration); it MUST NOT store the outcome in, or read it from, the lockfile, the manifest or any other file distributed with the project, and an outcome recorded for one origin or endpoint MUST NOT admit the same commit for another. A preview, dry-run or read-only operation MAY verify without recording, and an operation that fails MUST NOT record an outcome.

NOTE (non-normative). This requirement makes a warm install of an already-locked, already-verified reference network-free at the resolution step, which is what permits reproducible and offline-capable resolution for commit-pinned and branch-tracking entries not covered by the semver-range equivalence of req-rs-004. For entries scoped by this requirement, the reachability verification keeps a replay from pinning a commit that no branch or tag of its origin contains; a commit reused under req-rs-004, and a commit taken from the manifest when the entry is re-resolved, are outside this verification in this revision. The recorded outcome reflects the origin at verification time and is not revisited. It is local to the consumer: an environment without it, such as a fresh CI runner or a cache created before this revision, contacts the origin once per origin, contacted endpoint and commit, so offline replay needs one earlier replay with origin access on that consumer state, or a registry proxy route that the consumer’s own configuration sets. Discarding the consumer-local state makes the next replay verify again.

OpenAPM v0.1 anchors trust on the recorded resolved_hash, not on the recorded resolved_url. This permits enterprise mirrors, content-addressable proxies, and offline caches to substitute for the origin URL without lockfile churn. The first replay of an unverified git commit still needs the contact that req-rs-015 requires; an offline cache does not satisfy it.

Registry-class implementations participating in mirror resolution MUST satisfy req-rg-001 (Registry-class trust anchor).

[req-rs-009] A conforming consumer implementation MUST permit the fetch of a registry-sourced dependency to be satisfied by any registry declared in the project’s apm.yml registries: block, or by any policy-declared mirror, provided that the bytes returned by the mirror hash to the lockfile’s recorded resolved_hash. The resolved_url field is advisory in v0.1: a mismatch between the mirror URL and resolved_url MUST NOT fail the install when the hash matches. A hash mismatch MUST fail closed per req-lk-013, regardless of which registry served the bytes.

Editorial note (non-normative). The mirror-tolerance property of req-rs-009 holds against the recorded resolved_hash, not against bytes reconstructed from the upstream source. Mirror operators MUST replicate the original archive bytes verbatim; rebuilding the archive on the mirror (even from the same source revision) will produce a different resolved_hash and break the mirror-tolerance guarantee until v0.2 introduces reproducible-build determinism (see Section 1.1 non-goals).

[req-rs-005] A conforming consumer implementation that exposes a “why is this dependency present” diagnostic command MUST compute the answer by walking the lockfile bottom-up from the target entry to the root, returning the set of root-to-target chains that include the target. Chains MUST be returned in lexicographic order of the root-to-target path tuple. The walker MUST operate offline against the lockfile alone, MUST be safe against cycles (no infinite recursion), and MUST produce deterministic output for a given lockfile.

OpenAPM v0.1 defines the semantics of an explicit “update” operation so that two conforming consumers produce the same lockfile delta from the same inputs.

[req-rs-011] A conforming consumer implementation that exposes an apm update (or equivalent) command MUST, when invoked without a package argument, re-resolve every direct dependency. Dependencies other than full-SHA git-literal entries MUST resolve against their current manifest constraint while leaving that constraint unchanged, and the consumer MUST rewrite their lockfile pins to the new highest matching version. A full-SHA git-literal entry follows req-rs-017 when the consumer offers that update extension. The consumer MUST re-resolve all transitive dependencies as a side-effect and MUST honour the active Governance policy’s require_pinned_constraint rule (req-pl-007).

[req-rs-012] A conforming consumer implementation that exposes apm update <name> MUST scope re-resolution to the named package and its subtree only, MUST hold every other resolved entry at its prior pin, and MUST refuse to operate on a frozen install (see req-lk-006) without an explicit override flag. When the named package is a direct full-SHA git-literal entry and the consumer offers the req-rs-017 extension, that entry follows req-rs-017; the consumer MUST NOT rewrite a transitive package manifest.

[req-rs-017] A conforming consumer implementation that offers an update extension for a git-literal dependency pinned to a full hexadecimal commit ID MUST form one candidate set from annotated tags whose peeled object has been verified as a commit and whose parsed semantic version has an empty pre-release identifier under Section 7.3.1. A 0.x.y version with an empty pre-release identifier remains eligible. The consumer MUST NOT select a branch or lightweight tag.

A candidate tag name MUST use one of v{version}, {name}--v{version}, {name}-v{version}, or the bare {version}. For a repository dependency, name is the final repository path component after removing at most one trailing .git; for a selected virtual subdirectory, it is the final non-empty virtual-path component. The consumer MUST select the candidate with the highest version under Section 7.3.1 precedence. When candidates have equal precedence, it MUST apply the bytewise ASCII full-tag-string tie break in req-rs-014, independently of remote record order. A winning candidate whose peeled commit equals the current pin is a no-op.

When the authoritative upstream contains no eligible tag, the consumer MUST retain the current commit ID, emit a default-visible diagnostic, and continue resolving other dependencies in the requested update scope. A transport failure, an invalid or all-zero object ID, an invalid tag refname, a duplicate tag ref record, or a peeled tag record without its base record MUST fail the update before any manifest or lockfile write. An otherwise eligible annotated tag that peels to a tree, blob, or other non-commit object is also a fatal outcome, not an ignored candidate. These failures MUST NOT be converted into the retained-pin outcome.

For a successful replacement, the consumer MUST rewrite only the direct root-manifest entry’s ref to the selected peeled commit. The matching lockfile entry MUST record that same commit in resolved_ref and resolved_commit, and MUST record the selected tag in resolved_tag as advisory provenance. The tag does not change the entry’s git-literal reference kind and does not become a trust anchor. A later non-update install MUST replay the full commit without remote tag enumeration under req-rs-015. A retained-pin outcome MUST leave the direct manifest entry and its resolved lock values unchanged.

A no-argument update applies this rule to every direct full-SHA git-literal entry. A package-scoped update applies it only to the named direct entry; ordinary subtree resolution continues, but transitive package manifests MUST NOT be rewritten. The consumer MUST finish candidate validation for every scoped direct entry before writing either the manifest or lockfile. A retained-pin outcome is entry-local and does not stop unrelated scoped updates. Any fatal outcome named above aborts the requested update scope and leaves both files unchanged.

Range-widening update modes (for example apm update --aggressive, which would mutate the manifest’s range upper bounds) are reserved for v0.2.

OpenAPM v0.1 defines a minimal producer release contract so that git-semver resolvers (req-rs-002) bind to the same artifact every consumer sees.

[req-pr-004] A conforming producer publishing a git tag intended for consumption via git-semver MUST ensure that the tag points at a commit whose apm.yml version field is equal to the tag (modulo an OPTIONAL leading v prefix). For example, the tag v2.3.1 MUST point at a commit whose apm.yml contains version: "2.3.1". The tag name MUST match ^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-((0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ (this matches the semver.org 2.0.0 regex modulo the optional leading v). A conforming consumer SHOULD verify this alignment after git checkout of the resolved tag and SHOULD emit a non-blocking diagnostic on mismatch.

[req-pr-005] A conforming producer publishing release tags SHOULD sign tags via a publicly verifiable mechanism (for example sigstore, GPG, or SSH-signed git tags). Signature verification is not enforced by v0.1 consumers; the SHOULD is advisory and feeds the v0.2 provenance work (see Section 10.12).

Release publication itself is out of scope for the v0.1 CLI surface. The canonical publication flow is whichever tag-and-release mechanism the producer’s git host provides; on GitHub, that is gh release create or the microsoft/apm-action mode: release workflow. No apm pack --create-tag or apm pack --push surface is defined by v0.1; producers MUST NOT depend on such a surface.

7.9 Version withdrawal (reserved for v0.2)

Section titled “7.9 Version withdrawal (reserved for v0.2)”

Version withdrawal (yank, deprecate, supersede) for published versions is out of scope for OpenAPM v0.1 and reserved for v0.2. A future surface will define: yanked: true (consumers MUST NOT select for fresh resolution, MAY honour for existing locks with SHOULD-warn), superseded_by: <version>, and Governance refuse_yanked: block | warn | off. Producers needing withdrawal semantics in v0.1 MUST rely on out-of-band advisories.

A consumer with the manifest:

name: web-app
version: "1.0.0"
default_host: github.com
dependencies:
apm:
- contoso/security-baseline#^2.0
- git: https://gitlab.example.com/acme/coding-standards.git
ref: main

resolves to the lockfile:

lockfile_version: "2"
apm_version: "0.7.0"
dependencies:
- repo_url: github.com/contoso/security-baseline
resolved_commit: "a1b2c3d4e5f6789012345678901234567890abcd"
resolved_ref: "^2.0"
constraint: "^2.0"
resolved_tag: v2.3.1
resolved_at: "2026-05-10T20:14:00+00:00"
content_hash: "sha256:0102030405060708091011121314151617181920212223242526272829303132"
depth: 1
- repo_url: gitlab.example.com/acme/coding-standards
resolved_commit: "f6e5d4c3b2a1098765432109876543210fedcba9"
resolved_ref: main
content_hash: "sha256:abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd"
depth: 1

The example uses lockfile_version: "2" even though no registry-sourced entry is present; per req-lk-002, this is permitted. Once written as "2", this lockfile MUST NOT be demoted to "1" on subsequent rewrites.

7.11 Conformance requirements (resolution)

Section titled “7.11 Conformance requirements (resolution)”

This section’s normative statements are:


8. Primitive type system and target matrix

Section titled “8. Primitive type system and target matrix”

This specification recognises seven primitive types: instructions, prompts, agents, skills, commands, hooks, and mcp. A primitive is a typed unit of agent configuration sourced from one of the recognised package layouts:

  • APM package (.apm/ directory). Primitives live under typed subdirectories (.apm/skills/, .apm/agents/, …) and are hoisted individually into deploy directories.
  • Skill bundle (SKILL.md at root, optionally with apm.yml = hybrid). The whole directory is copied to <deploy>/skills/<name>/.
  • Skill collection (skills/<name>/SKILL.md nested). Each nested skill is promoted to <deploy>/skills/<name>/.
  • Plugin collection (plugin.json / .claude-plugin/). Artifacts are mapped into deploy directories per the plugin manifest.

[req-pr-006] For a Plugin collection, a conforming consumer MUST resolve plugin.json skills as follows. Only an omitted skills key permits conventional skills/<name>/SKILL.md discovery. A present key MUST be a string or a list of strings and replaces that discovery: an explicit empty list contributes no skills. The plugin root is the collection root containing .claude-plugin/, not the manifest directory. Each declared path MUST be relative to that root; every traversed path component, derived child, and SKILL.md MUST remain within that root and MUST NOT be a symlink. A declared directory containing a regular SKILL.md is one skill named by its final path component; a declared directory without SKILL.md contributes only immediate child directories containing a regular SKILL.md, each named by its final path component. A missing, unreadable, malformed, escaping, or symlinked entry MUST contribute no skill, and a consumer MUST NOT fall back to undeclared root discovery. Consumers MUST canonicalize accepted paths relative to the plugin root: repeated spellings of one canonical source deduplicate to one leaf, while every contribution whose derived leaf name maps to more than one canonical source contributes no skill. Only the resulting names are eligible for enumeration, selection, or deployment.

[req-pr-007] A conforming consumer implementation MUST, when copying a declared Plugin collection component source, canonicalize the non-symlink source root selected for that component. A consumer-generated staging subtree is the materialization root created by the current operation and every descendant of that root. The consumer MUST prune every such staging subtree before traversing the source.

A package exposes selectable skills when layout resolution identifies a container for individually addressable named skill entries, whether that container currently yields zero or more entries. This includes an APM package with a .apm/skills/ container, a skill collection, and a plugin collection with a named-skills container. A skill bundle with SKILL.md at its root deploys as a unit and does not expose selectable skills.

[req-pr-001] A conforming consumer implementation MUST attach a source attribution to every discovered primitive. The attribution MUST be local for primitives sourced from the project’s own .apm/ directory and MUST be of the form dependency:<name> for primitives sourced from a resolved dependency.

[req-pr-002] A conforming consumer implementation MUST cause local primitives to override dependency primitives of the same name and same primitive type. The conflict MUST be recorded in the consumer’s diagnostic surface and MUST be inspectable by the user.

[req-pr-003] A conforming consumer implementation MUST process dependencies in the order they are declared in the manifest (direct deps first, transitive deps appended in lockfile order). When two dependencies provide primitives with the same name and same type, the first declared dependency wins; later dependencies’ versions MUST NOT replace the resolved primitive.

8.3.1 Unmanaged skill-file preflight (proposed)

Section titled “8.3.1 Unmanaged skill-file preflight (proposed)”

[req-pr-008] A conforming consumer that deploys skills as files MUST, by default and without requiring an opt-in flag, refuse an install with a nonzero result per clause (b) when its complete effective selected skill-deployment plan (all skill files the consumer would write during this install, computed by clause (a)) contains a differing unmanaged destination file. A differing unmanaged destination file is an existing file that the consumer’s deployment-ownership rules do not establish as managed and whose raw bytes differ from the exact bytes the consumer would write at deployment after applying the same target-specific rendering transforms used for that destination. A shared directory or skill name alone MUST NOT establish either file ownership or this conflict.

(a) The consumer MUST inspect the complete selected plan at its preparation/selection boundary (source selection and effective-target resolution are complete but native deployment has not begun), including standalone skills, package subskills and selected project-local skills, every selected physical destination, and every supported selected scope. Source selection, effective targets and authorization decisions MUST be the same for inspection and deployment. The result MUST NOT depend on target order; targets sharing one physical destination do not create independent ownership. Excluded or withheld sources MUST NOT enter the inspected deployment plan.

(b) A known conflict MUST cause a nonzero result before any native deployment from the plan, any manifest or lockfile write representing successful installation of that plan, or collateral cleanup attributable to the rejected install operation, including retirement of selected or obsolete dependencies’ deployed files. This preserves the conflicting user file, earlier native bytes, manifest intent and existing ownership/hash records, including prior partial installations and repeated attempts. Acquisition and cache/materialization preparation MAY remain; this requirement does not promise rollback for arbitrary scripts, later races or unrelated failures. Frozen operations remain subject to req-lk-006.

(c) The ordinary diagnostic MUST identify the skill, dependency or local source, conflicting path and affected targets, state refusal and offer a viable nondestructive correction: for example, renaming the local skill or an existing valid selection that excludes the conflict. A consumer auditing this condition MUST distinguish unresolved ownership conflict from modification of a managed file, preserve native bytes and recorded state, and MUST NOT recommend an ordinary reinstall as if it could resolve the unchanged conflict. When the consumer emits machine-readable findings, they MUST retain that distinction using a distinguishing category or type in its existing structured output.

This requirement does not prohibit existing identical-content recovery, grant ownership over ambiguous legacy state, or redefine managed primitive priority under req-pr-002 and req-pr-003. Existing explicit destructive replacement remains an operator choice, not default recovery advice; this amendment adds no replacement permission or security-scan bypass. It does not change native-plugin registration, MCP policy, or collision policy for agents, prompts or instructions.

Proposal and migration status. PR #3314 records the behavior accepted in issue #3202. Warning/success on a known differing unmanaged skill file becomes whole-plan refusal; this is a new hard conformance obligation, not behavior-neutral errata or an interpretation of the audit-only req-pl-015. Valid narrowing or renaming the local skill is the nondestructive migration path. The Section 9.3 review and public comment process remains pending; issue acceptance, implementation tests and this proposed text do not constitute ratification, publication or a release commitment. Section 9.5 migration obligations are not waived.

Proposed shared-skill preservation amendment (informative)

Section titled “Proposed shared-skill preservation amendment (informative)”

PR #3313 implements the accepted repair in issue #3288: reinstalling one package preserves another package’s separately owned files in a shared skill directory. It retains APM’s existing last-writer behavior for the exact overlapping managed file. This differs from the first-declared rule in req-pr-003; accepting the repair does not adopt a specification exception or establish conformance to that rule.

The proposed amendment would distinguish an admitted replacement of an exact managed skill file from replacement of the whole skill directory. The last successfully materialized replacement would own that file and its verified hash. Separately owned sibling assets and valid claims from other packages or targets would survive. Canonical deployment records and compatibility file/hash views would describe the same successfully deployed state, without recording a failed replacement as successful.

Source-file removal, dependency removal and target narrowing would use the existing ownership-aware cleanup decision: a surviving valid claim keeps the physical file; removing the last claim permits safe cleanup, not unconditional deletion. User edits, untracked files, ambiguous legacy provenance and existing no-hash protections remain outside automatic ownership adoption. Ordinary installation would converge without a frozen-only workaround; frozen replay would not resurrect relinquished claims or upgrade sources. Audit remains read-only and continues to detect actual drift.

This is a proposed narrow exception for shared managed skill files, not a change to local-priority rules, native plugin identity or consent, unmanaged-file policy, dependency traversal, or the semantics of other primitive types. It does not make competing skill bodies simultaneously usable. The installed-CLI preservation scenarios are implementation evidence, not evidence that this proposal is adopted. Changing the existing precedence obligation is not behavior-neutral errata: adoption needs the next-minor and migration treatment in Sections 9.2-9.5. Non-author review, public comment and adoption remain pending. The normative text, requirement identifiers and conformance enumerations are unchanged by this informative proposal.

When the user has not specified a target via --target or in the manifest’s target: field, the consumer auto-detects from filesystem signals. The concrete table of per-target detection signals and deploy roots is published in the non-normative “OpenAPM Target Registry v0.1” companion document (see targets-matrix.md). Vendors MAY register new targets without a spec amendment via the x-<vendor>-<name> extension namespace (see req-tg-004).

[req-tg-001] A conforming consumer implementation MUST honour the per-target detection predicate published in the registered OpenAPM Target Registry for every spec-registered target identifier and for every vendor-registered identifier (req-tg-004). Auto-detection MUST activate a target only when its registered predicate fires; no other filesystem signal MAY substitute for, or augment, the registered predicate. A target registered without a detection predicate MUST NOT be auto-detected and MUST be excluded from the expansion of all; such an explicit-only target MUST be selected explicitly via --target <name> or via the manifest’s target: field. At v0.1 the explicit-only targets are agent-skills, antigravity, hermes, and grok-bot. When no detection signal fires, the consumer MAY fall back to a minimal profile that emits AGENTS.md only.

OpenAPM v0.1 establishes .agents/ as an ecosystem convention: the cross-tool deploy root for primitives shared between targets that opt into convergence. Per-target deploy roots are published in the non-normative OpenAPM Target Registry v0.1 companion.

[req-tg-002] A conforming consumer implementation MUST deploy primitives only under the deploy root(s) registered for the active target in the OpenAPM Target Registry. No target’s installer MAY write files outside its registered root(s); writing outside the registered root MUST be treated as an implementation defect, not a runtime warning. When two targets register the same deploy root (for example two targets that both share .agents/), each target OWNS only the file-name patterns documented for that target in the Registry; .agents/ is partitioned by subdirectory (.agents/skills/, .agents/commands/, .agents/prompts/, .agents/rules/, …) so that distinct targets do not contend for the same on-disk patterns.

[req-tg-003] A conforming consumer implementation MUST deploy skills to .agents/skills/<name>/SKILL.md for every target that supports the skills primitive type, unless the user has explicitly opted out of skill-convergence via the documented opt-out switch. This cross-tool convergence ensures a single skill bundle serves every harness without per-target duplication.

[req-tg-005] A conforming consumer implementation that deploys target-native per-file instruction rules MUST honour the registered rule filename pattern and frontmatter mapping for the active target. For the antigravity target, instruction rules MUST be written under .agents/rules/<name>.md; when the source instruction’s applyTo resolves to one or more patterns, the emitted frontmatter MUST represent them as trigger: glob plus a globs field. To reduce sources of divergence in deployed-file content hashes across conforming implementations (contributing to the canonical-content equivalence check of req-lk-012), globs MUST be emitted as a single YAML double-quoted string scalar, whether applyTo resolves to one glob pattern or to several, whose value joins the resolved patterns in declaration order, duplicates retained, with the two-character separator , (comma, space); before joining, each resolved pattern is re-encoded so that every backslash outside a bracket character class [...] is written as two backslashes and every comma outside brace alternation {...} and outside a bracket character class is written as \,, and all other characters, including commas inside {...} or [...], are emitted unchanged; globs MUST NOT be emitted as a YAML sequence. The emitted frontmatter block MUST consist of exactly a --- line, the trigger line, the globs line when present (after trigger), and a closing --- line, with no other keys, followed by one empty line and then the instruction body with its leading line breaks removed. Within the globs value every code point above U+007F MUST be written as a lowercase-hex \uXXXX escape (a UTF-16 surrogate pair above U+FFFF). When applyTo is absent or resolves to zero patterns (for example an empty or whitespace-only string, a separators-only string such as ,, or an empty sequence), the emitted rule file MUST carry a frontmatter block declaring trigger: always_on and no globs field. Compile-time deduplication MUST treat only those files whose names derive from the currently-resolved instruction primitives (specifically, for each resolved instruction primitive of name N the derived filename is .agents/rules/N.md; the authoritative set is the lockfile deployed_files list when a lockfile is present, falling back to manifest instruction entries on first install) as deployed rules; any other .md file under .agents/rules/ MUST NOT be treated as a deployed rule and MUST NOT suppress instruction content in AGENTS.md.

Editorial note. req-tg-005 names the antigravity deploy path, frontmatter keys, trigger values and globs encoding in the normative text rather than delegating them to the non-normative Target Registry companion (contrast req-tg-002). This is a deliberate, scoped exception: the antigravity rules directory shares the .agents/ root that req-tg-002 partitions, so the deduplication and non-suppression guarantees above require normative precision about the filename derivation. A future revision MAY relocate the concrete antigravity filename pattern and frontmatter mapping to the Registry companion once a cross-target instruction-rule schema is registered, retaining only the target-agnostic honour and dedup MUSTs here. The trigger: always_on block for unscoped rules exists because the target discards rule files without a valid trigger (target rule documentation: https://antigravity.google/docs/rules); the single-string globs encoding tracks that published schema and is pinned for req-lk-012 hash reproducibility, so a change upstream is handled by amendment under Section 9. The target documents no escape for a comma inside a pattern; patterns containing brace alternation or an escaped literal comma are emitted as specified above, but how the target matches them is not guaranteed by this specification.

[req-tg-006] A conforming consumer implementation that converts an agent primitive into a target-native format MUST either preserve each source-declared capability restriction semantically or emit an actionable diagnostic. Semantic preservation requires the same effective capability ceiling (the maximal set of tools, actions, or resources the restriction permits); a translation that widens, narrows, or cannot represent the restriction exactly is non-preserving. The diagnostic MUST identify the source agent and each discarded field and MUST state that exact preservation failed. For a widening or an unrepresentable restriction, it MUST state that the generated agent may have broader capability access; for a verified narrowing, it MUST state that access is narrower than declared. When several fields are discarded, one diagnostic enumerating all of them or separate diagnostics for each field MAY be used. The diagnostic MUST appear in the consumer’s default (non-verbose) output and MUST be rendered before the overall operation returns; this requirement does not mandate a nonzero exit status. If source agent frontmatter cannot be parsed as a mapping, the consumer MUST instead emit a default-visible diagnostic stating that capability restrictions could not be verified before the overall operation returns.

Editorial note. Concrete target-native encodings for capability restrictions are intentionally unspecified in v0.1. A future revision may register them through the Target Registry companion or the amendment process in Section 9.3 without weakening the preservation-or-diagnostic contract above.

[req-tg-009] A conforming consumer implementation that deploys an agent primitive into a target-native format with a fixed, enumerable capability vocabulary MUST fail closed: if any source-declared tool falls outside the target’s approved capability set, the implementation MUST NOT write the agent’s target artifact (zero bytes, no partial file) and MUST emit an actionable diagnostic identifying the unsupported tool value(s) and the approved set. This fail-closed evaluation MUST be performed prior to any content-identity adoption fast-path; an existing on-disk artifact whose bytes match the source MUST NOT cause an agent with unrepresentable capabilities to be adopted or retained in the deployed-files record. This gate is evaluated per agent primitive independently; failure for one agent MUST NOT prevent deployment of other, vocabulary-conformant agent primitives from the same dependency or install operation. This evaluation applies only to agents whose target is included in the effective intersection computed under req-tg-008; agents whose target is already excluded by that intersection are not subject to this gate.

Editorial note. The approved capability set for each target is the vocabulary enumerated in the OpenAPM Target Registry companion entry for that target at the spec version the consumer declares conformance to. A conformance test suite MUST pin the exact companion version it validates against. A future revision may promote this pinning to a standalone normative requirement and define a machine-readable vocabulary schema; until then, conformance testing is scoped to the sets published in the companion.

[req-tg-015] A conforming consumer implementation providing the Codex-native agent conversion capability MUST preserve a source-declared model or model_reasoning_effort string value in its native top-level placement (top-level TOML key) in the generated Codex agent file, and MUST leave either field absent from the generated file when it is absent from the source. This clause does not require or imply preservation of any other config.toml-native key, and does not define behavior for any other conversion target. A source-declared model or model_reasoning_effort value that is not a YAML string scalar is not subject to preservation under this clause, and the consumer MUST still emit a diagnostic for it. That diagnostic MUST identify the field name but MUST NOT include the rejected value.

When that same consumer, converting to the Codex-native format, drops a declared frontmatter field that is neither a req-tg-006 capability restriction nor one of the two fields named above, it MUST emit a diagnostic naming the source agent, and MUST bound both (a) the number of dropped field names it names explicitly, and (b) the displayed length of each named field name, each to a finite, implementation-documented limit (the named-field-name limit MUST be at least one when at least one field was dropped); each named field name MUST be sanitized to printable ASCII (U+0020 through U+007E), replacing or escaping any byte outside that range before display; the diagnostic MUST NOT include the dropped field’s value. req-tg-006’s existing capability-restriction diagnostic is unaffected and continues to apply on its own terms.

Editorial note. model and model_reasoning_effort select a model or reasoning-effort level, not a tool, action, or resource ceiling, so they fall outside req-tg-006’s capability-restriction scope and its widening/narrowing diagnostic framing. This requirement is scoped to consumers that already provide Codex-native agent conversion; it does not standardize dropped-metadata handling for any other target, and does not introduce a new vendor-namespaced metadata system. The two fields are native Codex agent settings; their string values are opaque to this specification. This clause does not prescribe TOML field ordering or a cross-target diagnostic-output contract.

[req-tg-007] A conforming consumer implementation that completes a non-dry-run, project-scope install MUST emit a default-visible, actionable diagnostic before returning when all of the following are true: (a) at least one package was installed during this operation; (b) the full installed dependency tree, including packages installed during earlier operations, contains an instruction primitive; and (c) at least one active target is classified as requiring post-install root-context compilation in the companion target support matrix. The diagnostic MUST name the follow-up compilation operation (for example, apm compile or an equivalent) and only the applicable root context output classes (for example, AGENTS.md, CLAUDE.md, or GEMINI.md) for the active targets. The consumer MUST NOT emit this diagnostic for a dry run, an install that installed no package, an installed dependency tree without instruction primitives, or a target set with no active target classified as requiring post-install root-context compilation. An unclassified target MUST NOT trigger the diagnostic by itself.

Editorial note. The presence check covers the consumer’s complete installed dependency store because a later install can make instructions from an earlier dependency newly relevant to an active target. The requirement does not prescribe a lockfile field for this check: compile-only instruction sources are not necessarily deployed outputs.

8.5.3 Package-declared target restrictions

Section titled “8.5.3 Package-declared target restrictions”

[req-tg-008] For each dependency, a conforming consumer implementation MUST integrate target-scoped primitives only into the intersection of (a) the project’s currently active targets, (b) the target subset authorized by the consumer for that dependency, and (c) the dependency package’s declared target: or targets: set when that set is restrictive. This computed set is the dependency’s effective target intersection. The mechanism for (b) is implementation-defined; when the consumer has no explicit per-dependency authorization mechanism or subset, (b) adds no restriction.

The package set is restriction-only: it MUST NOT activate a target or expand either (a) or (b). Omitting both package fields, or including the universal all value, adds no package-side restriction. Scalar and list spellings under target: accept the aliases defined in Section 4.2.1; targets: accepts lowercase identifiers from the canonical set in Section 4.2.1, the deprecated alias vscode (which a consumer treats exactly as copilot, including in recorded lockfile state, per Section 4.2.1), and the literal all sentinel. In the effective target intersection, a declared set containing vscode restricts deployment exactly as the same set with vscode replaced by copilot would, and vscode does not activate, add, or remove any other target. The all token remains a literal no-restriction sentinel and MUST NOT be expanded to the auto-detectable target set during this intersection. A null value under singular target: is treated as field omission for legacy compatibility; a consumer MUST reject an empty string or empty list. A declaration with both fields (even when either value is null), a null or empty targets: value, a targets: token that is not canonical, vscode, or all, or a target: token that does not satisfy req-mf-005 MUST be rejected before target-scoped deployment with a diagnostic naming the invalid declaration or token.

When no explicit package field exists, a consumer MAY infer an additional legacy hook-only restriction from the final path component. The consumer strips the final extension, lowercases the ASCII stem, and matches either hooks-<token> or a contiguous rightmost sequence of hyphen-delimited tokens immediately before -hooks. It resolves that sequence from right to left against its registered filename-target token table; unmatched segments terminate the sequence. This filename filter is applied after the effective intersection and MUST only narrow it. A consumer MUST NOT infer a package restriction from a generic or otherwise unmatched filename. Producers SHOULD migrate to explicit target: or targets: declarations. When an update narrows the intersection, consumer-owned merge-based hook entries and their ownership record MUST be reconciled under req-lk-021, while entries without the consumer’s own ownership attribution remain preserved.

8.5.4 Project-scoped native hook execution

Section titled “8.5.4 Project-scoped native hook execution”

[req-tg-010] A conforming consumer implementation that deploys a project-scoped hook into a target-native configuration whose hook command may be launched with a working directory outside the consumer project MUST anchor the generated command to the consumer project through that target’s portable project-directory environment variable. The command MUST execute successfully when that variable identifies the consumer project, MUST preserve the hook’s relative path beneath that project, and MUST NOT embed an absolute consumer checkout path. For Claude project hooks, such a consumer MUST reject a hook path containing a dollar sign or backtick, because either character can cause the target shell to reinterpret a path component.

Editorial note. For Claude project hooks, the portable variable is CLAUDE_PROJECT_DIR in POSIX commands and $env:CLAUDE_PROJECT_DIR in PowerShell commands. This requirement permits target-specific command syntax; it does not prescribe a shell for other targets.

8.5.5 Agent Plugins v1 native-lifecycle deployment boundary

Section titled “8.5.5 Agent Plugins v1 native-lifecycle deployment boundary”

[req-tg-011] A conforming consumer implementation MUST treat a schema-bearing Agent Plugins v1 dependency as opaque at the deployment boundary unless an applicable target-native lifecycle admits it. Dependency acquisition, materialization beneath the resolved dependency root, and lock identity recording MAY occur before that boundary. When the effective target intersection computed under req-tg-008 does not select an applicable native lifecycle, the consumer MUST skip deployment of that dependency and emit one actionable diagnostic, MUST NOT run a legacy primitive integrator for it, and MUST NOT create target-native registration, settings, catalog, or ownership state for it. The materialized package and lock state MAY remain. This skip is dependency-scoped: ordinary dependencies in the same install MUST remain eligible for their normal deployment, and a --dry-run invocation MUST report the same per-dependency deployment decision without mutating state. If an earlier operation registered the dependency but the current effective target intersection no longer selects that native lifecycle, the consumer MUST retire the dependency’s consumer-owned catalog, activation, and ownership entries through the rollback unit in req-tg-013.

Editorial note. This requirement governs the deployment boundary only. A machine-verifiable consumer lifecycle now exists: req-tg-013 defines native registration for a consumer that exposes one. “Applicable” is determined from successful Agent Plugins schema parsing, the effective target intersection in req-tg-008, and the admission gates referenced by req-tg-013, not from whether a host binary happens to be installed. This requirement still does not itself define that lifecycle, and it does not mandate any preferred-default change.

[req-tg-012] When a conforming consumer implementation resolves an implementation-defined plugin-root placeholder in a hook command, it MUST treat a placeholder enclosed in matching quotation marks and followed by a forward slash (/) or backslash (\) path separator outside the closing quote as equivalent to the placeholder and path enclosed together in one double-quoted span, regardless of the source quote character. The generated command MUST preserve balanced quoting, and any environment-variable expression retained in that command MUST remain live for target expansion. If any implementation-defined plugin-root placeholder remains unresolved, the consumer MUST emit a default-visible diagnostic before the operation returns; it MUST NOT silently deploy the unresolved command.

Editorial note. A plugin-root placeholder has the form ${NAME}; each consumer documents the fixed set of names it recognizes for its targets. ${PLUGIN_ROOT} is an illustrative spelling. For example, "${PLUGIN_ROOT}"/hooks/probe.py normalizes to "${PLUGIN_ROOT}/hooks/probe.py".

8.5.7 Agent Plugins v1 native-lifecycle registration

Section titled “8.5.7 Agent Plugins v1 native-lifecycle registration”

[req-tg-013] A conforming consumer implementation that exposes a machine-verifiable native lifecycle for a schema-bearing Agent Plugins v1 dependency MAY register that dependency with a target-native plugin host when the acquired and materialized dependency has passed Agent Plugins schema parsing, the effective target intersection computed under req-tg-008 selects that host, and the applicable lock-integrity obligations (req-lk-013, req-lk-015), authorized source-plan scan (req-sc-015), and executable authorization (req-sc-009, req-sc-010, req-sc-011, and req-sc-014) admit the package. Admission during install, update, restore, uninstall, and prune MUST NOT locate, invoke, or version-check the target-native host binary. When the dependency is registered, the consumer MUST NOT additionally project that package’s primitives, so a single dependency is deployed exactly once. The consumer MUST NOT copy the package into the target’s private plugin state; the registration MUST reference the materialized package in place beneath the resolved dependency root. A single aggregate registration per install scope MUST cover both directly declared and transitively resolved Agent Plugin dependencies that passed the admission conditions above, without changing their depth and resolved_by lockfile fields defined in Section 5.2.

A consumer MUST exclude from plugin-name claimant selection every Agent Plugin dependency that did not pass the admission conditions above. It MUST NOT register such a dependency. Among admitted dependencies that declare the same plugin name, a directly declared dependency MUST win over a transitive dependency. Two admitted claimants at the same precedence MUST cause the aggregate registration to fail with an actionable diagnostic naming both claimants. A consumer MUST NOT silently repoint a ledger-recorded owner to a different admitted transitive claimant. An admitted directly declared claimant MAY replace a recorded transitive owner under the direct-precedence rule, but the ownership record and registration MUST update in the same rollback unit. A post-lifecycle reconciliation after uninstall, prune, or restore MAY downgrade a residual same-precedence or transitive-repoint collision to an actionable diagnostic so cleanup can continue, but it MUST omit every ambiguous or changed-owner entry and MUST NOT commit a new owner for that plugin name.

The consumer MUST record registration ownership in consumer-owned state. A consumer that reserves a marketplace identifier and activation-key suffix for its generated registration MAY treat that namespace as consumer-owned only while its exact expected directory-marketplace entry is present or being created. It MUST refuse an existing conflicting entry that uses the reserved marketplace identifier before treating the activation-key suffix as owned. Its ownership record is the primary evidence for later reconciliation and removal. If that record is missing, the consumer MAY re-adopt an existing entry only when it is exactly the directory-marketplace entry the consumer would generate. It MAY then reconcile the reserved activation-key suffix from the aggregate registration. Its conformance statement MUST identify any reserved marketplace identifier and activation-key suffix. Registration and removal MUST preserve unrelated host JSON keys and values semantically; stable JSON serialization MAY reformat the document. Invalid JSON, including JSONC comments, MUST fail closed before overwrite. Catalog, ownership-record, and settings writes MUST commit as one rollback unit so a failed write leaves no partial new registration. Removal MUST retire only entries in that consumer-owned rollback unit and MUST preserve settings outside the reserved marketplace identifier and activation suffix.

Editorial note. “Machine-verifiable” qualifies the consumer lifecycle, not the runtime present on an operator’s machine. A consumer can qualify compatibility at release or build time with a pinned real-host lifecycle suite; this implementation uses tests/integration/test_copilot_native_plugin_binary_lifecycle.py. Operators remain responsible for supplying a compatible runtime. In this implementation the host is GitHub Copilot CLI, the reserved marketplace identifier is apm, activation keys use the @apm suffix, and the ownership ledger lives under apm_modules. Manual *@apm activation keys are unsupported while the exact APM directory-marketplace entry is present because reconciliation owns that reserved namespace. This requirement does not prescribe that host, namespace, or compatibility version for other consumers. A directory-marketplace entry points the host at a generated catalog rooted in the materialized dependency directory; it does not copy package content into the host’s private plugin state.

Editorial note (amendment 0.1.65). For a dependency natively activated under the profile in Section 8.5.11, req-na-002 replaces the placement beneath the resolved dependency root with the deployed plugin root, and req-na-004 makes the lockfile the ownership record. All other obligations of this requirement still apply.

[req-tg-014] A conforming consumer implementation that supports a user installation scope MUST disclose in its conformance statement the user-scope manifest and lockfile locations and the versioned target-capability declaration it uses to determine user-scope MCP support. The consumer MUST treat a target without that declared capability as unsupported.

When the consumer installs an MCP server into a user scope, it MUST resolve the effective target selection from the first applicable source in this order: an explicit target selection; a non-empty user-scope manifest restriction that does not contain the literal no-restriction sentinel all; a configured user default; then user-scope runtime discovery. Once a source selects one or more targets, the consumer MUST NOT consult a lower-precedence source. Project-scoped target-detection signals outside the user scope MUST NOT constrain the discovery step. A manifest all token is treated as no restriction and therefore does not suppress lower-precedence user-scope defaults or discovery.

Before creating or modifying the user-scope manifest, lockfile, or target configuration for the attempted MCP entry, the consumer MUST partition the selected targets by the declared user-scope MCP capability. If no supported target remains, it MUST emit an actionable diagnostic and MUST NOT make a persistent mutation or fall back to discovery. For a mixed set, the supported subset MUST become the effective target set; the consumer MUST diagnose every unsupported target, MUST NOT write its target configuration, and MUST NOT fall back to discovery. If it persists an explicit mixed selection as a user-scope manifest restriction, it MUST serialize only the supported subset using target identifiers whose replay selects the same runtimes; it MUST NOT persist an unsupported member or remap one to a different supported runtime.

8.5.9 Cursor-native hook installation: fail-closed validation and Claude-import coexistence

Section titled “8.5.9 Cursor-native hook installation: fail-closed validation and Claude-import coexistence”

[req-tg-016] A conforming consumer implementation that provides Cursor-native hook installation MUST fail closed when converting a source-declared hook configuration into that Cursor-native format: if any source-declared event, top-level configuration key, or handler field falls outside the vocabulary of events, top-level keys, and handler fields the implementation accepts for Cursor-native hooks, the implementation MUST NOT write the Cursor-native hook artifact (zero bytes, no partial file) and MUST emit an actionable diagnostic naming the unrecognized value(s). Implementations SHOULD document or programmatically expose the set of accepted source-format identifiers so that conformance claims are independently verifiable.

[req-tg-017] A conforming consumer implementation that provides Cursor-native hook installation, when the project or user scope also has a Claude-settings hook import in effect for the same scope, MUST detect before writing whether installing or retaining the Cursor-native hook configuration would create or extend an observable overlap with that Claude-imported hook configuration, for both install orders (Claude-import-first and Cursor-native-first). On a detected overlap the implementation MUST reject the write with an actionable diagnostic rather than merge, redirect, or broaden either side’s accepted input, and MUST NOT alter the Claude import’s own settings.

(a) For the purposes of this requirement, “observable overlap” is a non-empty intersection, after alias normalization, between the set of (event identifier, handler kind, handler content) tuples claimed by the Cursor-native configuration and those claimed by the in-effect Claude-settings import.

(b) Alias normalization maps each side’s source-declared event identifier to the vocabulary of event identifiers this implementation accepts for Cursor-native hooks (see req-tg-016); req-tg-016 leaves that accepted vocabulary implementation-defined, so this clause does not assert that req-tg-016 itself fixes a concrete alias-to-identifier mapping.

(c) Two entries for the same event identifier but a different handler kind or different handler content are not an overlap, since the same event MAY legitimately carry distinct, independently-triggered handlers on each side; handler-content comparison is a literal-string comparison performed after this implementation’s existing deployed-package-root substitutions, and it does not trim whitespace or infer executable- or matcher-level equivalence between differently-formatted handler commands.

(d) Declared source package ownership is the exception to that content comparison: when the installing implementation’s own internal provenance marker (recorded for later reinstall/removal cleanup and never written into the Claude side) already attributes an entry on the Cursor-native side and an entry on the Claude-imported side to the SAME source package for the same event, that pairing counts as an overlap regardless of handler kind or handler content, because that package would otherwise claim two independently-activated copies of its own hook for the same event.

(e) This provenance check and the rest of the tuple comparison both apply identically for both install orders; neither is evaluated only for Cursor-native-first or only for Claude-import-first.

(f) Absence of a provenance marker on an entry (for example, because the entry predates this implementation’s tracking, or an externally edited settings file dropped the sidecar) is not itself malformed configuration and is not redefined as an overlap; without an established same-package attribution on both sides, the event falls back to the ordinary (event identifier, handler kind, handler content) tuple comparison like any other entry. This implementation’s existing fail-closed handling for an actually unreadable or structurally invalid configuration document is unrelated to, and not triggered by, ordinary marker absence. This is an APM consumer-side coexistence policy choice, not a bare event-identifier-only comparison.

Editorial note. The event vocabulary, the Claude-to-Cursor event aliases, and the two-key (version, hooks) top-level shape this implementation validates are drawn from Cursor’s own hook reference and third-party-hook reference as published at https://cursor.com/docs/hooks and https://cursor.com/docs/reference/third-party-hooks (fetched 2026-10-03). As with req-tg-009’s target-native capability encodings, these concrete vendor-specific vocabularies are intentionally kept out of the normative text above; a future harness implementing the same Cursor-native capability may accept a different, equally fail-closed vocabulary as the vendor surface evolves. The vendor reference also documents a prompt handler kind alongside command; this note does not assert that the accepted vocabulary covers every hook feature Cursor documents, only that whatever vocabulary an implementation does accept is enforced fail-closed. The rejection in req-tg-017 is an APM consumer-side safety policy, not a reflection of Cursor’s own documented default: the vendor’s third-party-hook reference states that when hooks exist in multiple locations “All matching hooks from every source run” (merge, not reject). Likewise, the unknown-key rejection in req-tg-016 is this implementation’s own conservative conversion policy; the cited vendor example shows only version and hooks as top-level keys but does not itself document the top-level shape as closed to extension.

8.5.10 Cursor universal instruction intent

Section titled “8.5.10 Cursor universal instruction intent”

[req-tg-018] A conforming consumer implementation that deploys an instruction primitive for the cursor target at project or user scope MUST write the target-native rule as <name>.mdc under the target’s rules/ directory. When the source instruction’s normalized applyTo value resolves to exactly one universal ** pattern (whether written as a scalar, a whitespace-padded scalar, or a single-item YAML sequence), the emitted frontmatter MUST contain alwaysApply: true and MUST NOT contain a globs field. For any other non-empty applyTo set, including a set that combines ** with scoped patterns, the emitted frontmatter MUST NOT contain alwaysApply and MUST encode the source patterns in globs. When applyTo is absent, empty, or null, the emitted frontmatter MUST omit both alwaysApply and globs.

Editorial note. This requirement pins when a Cursor rule applies, not how scoped patterns are serialized; the globs representation remains the deliberate comma-joined Cursor form. It adds no source frontmatter field and does not infer always-on intent from mixed or missing patterns. Native semantics follow Cursor’s rules documentation (https://cursor.com/docs/rules): alwaysApply: true includes a rule in every chat, while globs attaches it to matching files.

This subsection defines when a consumer may install a whole plugin by declaring it to a target’s own plugin loader, instead of projecting the plugin’s primitives into target directories. Part A states what a target needs to offer. Part B states what a consumer that activates plugins this way guarantees. Part C records, informatively, how known targets qualify.

Terms used in this subsection:

  • Plugin root: the directory of a resolved dependency that holds the plugin manifest and every resource the plugin references by a path relative to that directory.
  • Profile root: .agents/plugins/ in the project directory at project scope, and .agents/plugins/ in the user’s home directory at user scope. This is a subdirectory partition of .agents/ in the sense of req-tg-002.
  • Activation entries: the target’s documented marketplace declaration (for the native-eligible targets in Part C, Claude Code and GitHub Copilot CLI, an extraKnownMarketplaces entry) and its documented per-plugin enable switch (for those targets, an enabledPlugins key of the form <plugin>@<marketplace>).
  • Natively activate: deploy a plugin root under the profile root and write activation entries so that the target loads that plugin itself.
  • Split install: deploy a plugin’s primitives through the consumer’s ordinary per-primitive deployment for the target (the per-primitive rules of Section 8 outside this subsection), without activation entries.
8.5.11.1 Part A: target requirements (normative)
Section titled “8.5.11.1 Part A: target requirements (normative)”

A target qualifies for a scope (project or user) and a client version when its published documentation, for that scope and version, establishes all five criteria below. Observed behavior, source code, and undocumented files are evidence for Part C; they do not establish a criterion. Published documentation means vendor documentation at a stable URL, or help text shipped in a cited client version.

  • A1. Documented settings scopes. The target documents a settings file at user scope and at project scope that accepts the activation entries, and documents the precedence between those files and any local or managed settings layer.
  • A2. In-place directory marketplace. The target documents a marketplace source of type local directory whose listed plugins load from their path inside that directory, without being copied into the target’s private state, and accepts a plugin source path relative to the marketplace directory when the marketplace is declared at project scope, and, at project scope, documents how a relative directory path in the marketplace declaration resolves.
  • A3. Declarative enable. The target documents a per-plugin enable switch keyed by plugin and marketplace, such that a plugin listed by a declared A2 marketplace and switched on loads at a session start in a trusted scope, with no install command, RPC call, or interactive step other than the target’s own trust prompt.
  • A4. No automatic update of directory sources. The target documents that it does not fetch, refresh, or replace plugin content from a local directory source on its own. Loaded content changes only when the directory content changes.
  • A5. Documented cross-target reading. When the target reads settings or catalog files at a scope that another target also reads, the target documents which of those files it reads and the precedence between them and its own files. A target that reads no other target’s files at that scope meets A5. At project scope, a target that documents which other target’s files it reads but not the precedence also meets A5 for a consumer that discloses, in its conformance statement, the file priority it verified against a cited client version, with a conformance test that runs that client where it is installed and skips where it is not (amendment 0.1.74).

[req-na-001] A conforming consumer implementation that natively activates plugins MUST do so only for a target that the effective target intersection of req-tg-008 selects, and only at a scope and client version for which that target qualifies under criteria A1 to A5. A target whose qualification is unknown does not qualify. The consumer MUST disclose in its conformance statement each target and scope it natively activates, the oldest client version it qualified, and the published source it relies on for each criterion. The consumer qualifies the client versions it discloses, and the operator supplies a compatible client; the consumer is not required to detect the installed client version, and req-na-003 forbids doing so during lifecycle operations.

Editorial note. Each criterion names a capability that at least one target already documents: A1, Claude Code settings precedence (https://code.claude.com/docs/en/settings-reference) and GitHub Copilot CLI settings files (https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-config-dir-reference); A2, Claude Code in-place plugins (https://code.claude.com/docs/en/plugins/loading, “In-place and copied plugins”) and Copilot CLI path-sourced plugins that “load live from their real directory” (https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-plugin-reference); A3, Claude Code project marketplaces, where contributors need no install when a local directory or file marketplace lists the plugin with a relative-path source (https://code.claude.com/docs/en/plugins/org), and Copilot repository settings, where plugins “are installed if missing and turned on” once the folder is trusted (copilot help config, GitHub Copilot CLI 1.0.114); A4, Claude Code in-place plugins, which load the current source files at every session start (https://code.claude.com/docs/en/plugins/loading), and Copilot CLI, which auto-updates only the built-in awesome-copilot marketplace and ignores a repository-level autoUpdate (https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-plugin-reference); A5, Copilot CLI, which documents that it reads a repository’s .claude/settings.json and .claude/settings.local.json and never ~/.claude/settings.json (https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-config-dir-reference). Sources were read on 2026-11-19.

8.5.11.2 Part B: consumer guarantees (normative)
Section titled “8.5.11.2 Part B: consumer guarantees (normative)”

[req-na-002] A conforming consumer implementation that natively activates plugins under req-na-001 MUST derive the set of activated plugins at a scope only from the lockfile it writes or replays for that scope. For each activated plugin it MUST deploy exactly the plugin root covered by the approval in req-na-005, copied from the locked and materialized bytes, to <profile root>/<plugin>/, where <plugin> is the plugin’s declared name. The consumer MUST refuse, before any write and with an actionable diagnostic naming the plugin, a declared name that is empty, begins with . (which covers ., .., .git, and .claude-plugin), ends with . or a space, or contains /, \, @, :, or a byte in the range 0x00 to 0x1F or equal to 0x7F, and two plugins activated at one scope whose names are equal under Unicode default case folding. Among plugins activated at one scope that declare the same name, the claimant selection of req-tg-013 applies whatever the plugin format. The consumer MUST verify, without following symbolic links, that each deployed path resolves inside the profile root. A plugin whose manifest references a path that resolves outside its directory has no plugin root and MUST NOT be natively activated. It MUST record in the lock entry (the native_plugin field of Section 5.2) the deployed plugin root and one root digest covering the path, bytes, and executable bit of every file in that root, and MUST treat a deployed root whose recomputed digest differs from the recorded one as drift under Section 5.5; its drift diagnostic MUST name the plugin and the expected and observed root digests. The root digest is a hash envelope of the form sha256:<hex-lowercase> defined by req-lk-016. It is the SHA-256 of the concatenation, over every regular file in the plugin root except any file whose relative path has a component equal to .git, at any depth, and except every file whose relative path has a first component equal to apm.yml or .apm (which covers a root apm.yml file and every file under a root .apm/ directory), whether or not the consumer generated them, taken in ascending byte-wise order of the file’s POSIX relative path encoded as UTF-8, with no Unicode normalization, of: that relative path, one NUL (0x00) byte, one byte x (0x78) when the file is owner-executable or - (0x2D) otherwise, and the 32-byte raw SHA-256 digest of the file’s bytes. File bytes are not line-ending normalized, unlike req-lk-012. At project scope, where the deployed plugin roots and the lockfile are project files shared between machines, the recorded root digest MUST omit the executable-bit byte, so it equals the approval digest construction of req-na-005; the consumer MUST still compare the deployed root with the materialized source under the executable-bit-including construction on the machine that deploys it, before it writes activation entries, and MUST NOT record that comparison in the lockfile (amendment 0.1.74). Files so excluded MUST NOT be deployed under the profile root, and a plugin whose manifest references an excluded path MUST NOT be natively activated. A symbolic link anywhere in the plugin root makes that root ineligible for native activation. A plugin that is ineligible under this requirement MUST be handled as req-na-006 handles a target that does not qualify: it is split-installed or refused, subject to req-tg-011, with a default-visible diagnostic that names the plugin and the reason, and never skipped silently. It MUST NOT deploy other content of the resolved package there. It MUST generate <profile root>/.claude-plugin/marketplace.json listing exactly the activated plugins at that scope, each with a source path relative to the profile root and no remote source. The consumer MUST NOT declare the resolved dependency root to a target as a marketplace for such a plugin. At project scope the deployed plugin roots and the generated marketplace file are project files, and the consumer MUST NOT add them to a version-control ignore file. For a schema-bearing Agent Plugins v1 dependency activated under this subsection, the deployed plugin root takes the place of the materialized package beneath the resolved dependency root in the in-place reference obligation of req-tg-013.

Editorial note. The root digest is computed over raw bytes, so a checkout filter that rewrites line endings in a committed project-scope plugin root is reported as drift. At project scope the recorded digest omits the executable bit (amendment 0.1.74), so a teammate’s checkout on a file system that does not carry the bit, or with Git’s file-mode tracking off, still matches the committed lock; the bit is compared on the deploying machine between the materialized source and the deployed root instead. At user scope the lock is per-machine and the recorded digest keeps the bit.

[req-na-003] A conforming consumer implementation that natively activates plugins MUST declare them only by writing the target’s documented activation entries into the settings file the target documents for that scope under A1. The marketplace declaration MUST be a local directory source that points at the profile root. At project scope the declaration MUST use a relative path, resolved as the target documents under A2, and MUST NOT use an absolute path. The consumer MUST NOT write any other settings key for this purpose, MUST NOT write the target’s private state (including plugin caches and installed-plugin or known-marketplace registries), and MUST NOT write trust decisions or update settings such as autoUpdate. During install, update, restore, uninstall, and prune, it MUST NOT locate, invoke, or version-check a target-native binary, CLI, or RPC endpoint in order to activate, register, or remove a plugin.

[req-na-004] A conforming consumer implementation that natively activates plugins MUST compute the activation entries, deployed plugin roots, and generated marketplace entries it owns at a scope only from the previous and the next lockfile for that scope, together with the expected marketplace source binding (the marketplace name and the profile-root path it points at). It MUST add what the next lockfile requires and MUST remove only what the previous lockfile produced with the same binding. It MUST preserve every other settings key and value semantically, MUST write an enable value of true only when that key is absent, and MUST NOT change an existing false enable value or remove a key whose value is false, except that at project scope, in the settings file of a target that also reads another target’s settings file at lower priority, the enable key of a plugin the consumer declares to that other target is the consumer’s own: it writes false there when the plugin’s effective targets exclude the reading target, and changes or removes that key as those targets or the lockfile change (cross-target suppression, amendment 0.1.74). When the previous lockfile is missing or unreadable and the settings file already holds an entry under the consumer’s marketplace name, the consumer MUST report that in an actionable diagnostic, MUST NOT remove any existing activation entry, and MAY add what the next lockfile requires; a first activation with no such entry needs no diagnostic. When the binding has moved (the expected marketplace name or profile-root path differs from the binding the previous lockfile’s entries were produced under, recorded as native_plugin.marketplace per Section 5.2), or an entry under the consumer’s marketplace name points at a different source, the consumer MUST report the conflict in an actionable diagnostic, MUST NOT write, delete, or overwrite any activation entry under either name, and MUST NOT declare another marketplace that points at the same profile root while an entry under the previous binding remains. A settings file the consumer cannot parse MUST fail closed before any overwrite. Settings, generated marketplace, and deployed-root writes for one operation MUST commit as one rollback unit, so a failed operation leaves no partial new activation. The consumer MUST NOT create a receipt, ledger, or other ownership file for native activation; for a dependency in scope of req-tg-013, the lockfile is the consumer-owned ownership record that requirement names. Under the profile root the consumer owns only the plugin roots that the previous or next lockfile produced and the generated marketplace file; it MUST NOT modify or remove any other entry there. A directory at <profile root>/<plugin>/ that the previous lockfile did not produce is not owned: the consumer MUST NOT overwrite it unless its recomputed root digest equals the one the next lockfile records, and otherwise MUST refuse, before any write, with an actionable diagnostic that names the plugin and the path.

[req-na-005] A conforming consumer implementation that natively activates plugins MUST write an enable value of true for a natively activated plugin only when an approval covers the content of its plugin root, identified by the approval digest of that root rather than by package name, version label, or source location, and the lock-integrity obligations (req-lk-013, req-lk-015), the authorized source-plan scan (req-sc-015), and executable authorization (req-sc-009, req-sc-010, req-sc-011, and req-sc-014) admit it, whether or not it is a schema-bearing Agent Plugins v1 dependency. The approval mechanism is the consumer’s own; it MUST be bound to the approval digest and disclosed in the consumer’s conformance statement. The approval digest is the req-na-002 root digest construction over the same file set, order and encoding, with the executable-bit byte omitted: for each file, its relative path, one NUL (0x00) byte, and the 32-byte raw SHA-256 digest of its bytes. Like the root digest, it is a sha256:<hex-lowercase> envelope as defined by req-lk-016; it is distinct from the root digest recorded as native_plugin.fingerprint (Section 5.2), and a recorded root digest is not an approval. Files that req-na-002 excludes from the root digest are outside the approval digest as well, so an approval never covers them. It binds paths and bytes only, so an approval recorded on one operating system still covers the same content on another whose file system does not carry the executable bit. The req-na-002 root digest, which includes that bit, still gates integrity between the materialized source, the deployed root, and the lock. When no such approval covers the content of a plugin the consumer would natively activate, the consumer MUST NOT deploy that content under the profile root, MUST NOT declare it to any target, MUST NOT declare it in a disabled state, and MUST emit a default-visible diagnostic that names the plugin. It MUST NOT replace a deployed plugin root with content the approval does not cover. When the next lockfile would pin content that no approval covers for a previously activated plugin, the consumer MUST either keep that plugin’s previous lock entry (including its recorded plugin root and root digest), the previously deployed root, and its activation entries unchanged, and emit a default-visible diagnostic that names the plugin and states that the update was not applied; or retire the deployed root and its activation entries in the same rollback unit as the lock write. The written lock MUST NOT record a root digest, or an approval digest if the consumer records one there, for content the consumer did not deploy.

[req-na-006] A conforming consumer implementation that natively activates plugins under req-na-001 MUST NOT natively activate a plugin for a target and scope that does not qualify under req-na-001, and MUST NOT write that target’s private state or activation entries for it under this subsection. For a plugin it would otherwise natively activate at such a target and scope, it MUST either split-install the plugin or refuse it, and in both cases MUST emit a default-visible diagnostic that names the target, the scope, and the criterion that is unmet or unknown, identified by its label (A1 to A5). It MUST NOT split-install a plugin silently, and a --dry-run invocation MUST report the same decision without mutating state. Where req-tg-011 makes a dependency opaque at the deployment boundary, that requirement governs instead of split install. This requirement does not restrict a registration made under req-tg-013 without native activation as this subsection defines it, nor a consumer that does not natively activate plugins.

[req-na-007] A conforming consumer implementation that natively activates plugins MUST give its generated marketplace a name that is deterministic, stable across clones of the same project at project scope, where the project is identified by a project identity the consumer discloses in its conformance statement, different between different projects, and different between project scope and user scope; at project scope the name MUST NOT depend on the user, the host, or the absolute checkout path. Before writing activation entries, it MUST refuse to use a marketplace name that an existing entry in the target’s settings files at that scope already declares with a different source, and MUST emit an actionable diagnostic naming that entry.

Editorial note. Claude Code keeps one marketplace registry per user, keyed by name. In the 2026-11-19 study, two repositories that declared the same marketplace name ran the other repository’s SessionStart hook after a project switch, which is why req-na-007 requires names that differ per project. This subsection does not prescribe how the name is derived.

8.5.11.3 Part C: target qualification (informative)
Section titled “8.5.11.3 Part C: target qualification (informative)”

The table records how every target in the consumer’s target catalog measures against Part A, from vendor documentation and isolated runs on 2026-11-19: Claude Code, GitHub Copilot CLI and Codex from issue #3094 (see the design record), and the other targets from the issue #3922 survey. Catalog target names are in parentheses where the product name differs. It is not normative and does not qualify a target for a consumer; a consumer’s conformance statement does that under req-na-001.

Target (client version)A1A2A3A4A5Classification
Claude Code (2.1.322)Met: user, project and local settings files with documented precedenceMet: directory marketplaces load in place; relative paths at project scopeMet: relative-path plugins in a local marketplace need no install; a user-scope declaration loaded and ran its SessionStart hook in the first session, with no claude commandMet: in-place plugins load current source at every session startMet: Claude reads no other target’s settingsNative-eligible. User scope is delivered by #3290; project scope by #3921
GitHub Copilot CLI (1.0.114)Met: ~/.copilot/settings.json and .github/copilot/settings.json (and .local), with managed settings taking precedenceMet: path-sourced plugins in a local directory marketplace load liveMet: repository plugins are installed if missing and turned on after folder trustMet: auto-update applies only to awesome-copilot; repository autoUpdate is ignoredUser scope: met. Project scope: Copilot documents reading .claude/settings.json and .claude/settings.local.json but not the same-key precedence against .github/copilot/settings*.json; met under the amended A5 for a consumer that discloses the order .claude/settings.json < .claude/settings.local.json < .github/copilot/settings.json < .github/copilot/settings.local.json (later wins), verified against Copilot CLI 1.0.112, an earlier client than the 1.0.114 cited for A1 to A4 (the test skips without the client)Native-eligible at user scope, and at project scope under the A5 file-priority test (#3921)
OpenAI Codex CLI (0.170.0)Met: user and trusted-project config.tomlNot met: Codex installs plugins into its own cache rather than loading them in placeNot met (see below)UnknownUnknownSplit (fails A3; A2 also not met)
Cursor (cursor; IDE 3.30.14, agent CLI 2026.11.19)Not met: plugins are installed into a project or user scope from the UI; the only settings key, user-scope enabled_plugins in ~/.cursor/settings.json, appears only in a CLI changelog entry, with no schema or precedenceNot met: marketplaces are git repositories; local plugins are copied into ~/.cursor/plugins/localNot met: marketplace plugins need an Install step; enabled_plugins is keyed by folder path, not by plugin and marketplaceUnknown: refresh is documented only for GitHub-imported marketplacesUnknown for plugin catalogs: hooks read .claude/settings*.json and ~/.claude/settings.json, and skills read .agents/skills/, with documented precedenceSplit (fails A1, A2, A3)
Windsurf, now Devin Desktop (windsurf; Desktop 3.14.30825, Devin CLI 3000.14.30821)Not met: project .devin/config.json documents only permissions, read_config_from and hooks; user plugin state is a personal manifest in Devin CloudNot met: devin plugins install --local links one folder in place, at user scope only; there is no directory marketplaceNot met: devin plugins install after sign-in, or an Install step in the UIMet for --local links, which are live; git sources refreshMet for the documented imports (AGENTS.md, .claude/skills/, MCP from .claude/settings.json, .cursor/rules/) under read_config_from; plugin catalogs are not coveredSplit (fails A1, A2, A3)
Gemini CLI (gemini; 0.70.0)Not met: user and workspace settings.json have documented precedence, but no key declares or enables an extensionNot met: no marketplace; gemini extensions install copies, and gemini extensions link loads one directory in place by commandNot met: only gemini extensions install, link or enable establish or enable an extensionUnknown: the scope of --auto-update for local sources is not statedMet: reads no other target’s extension or settings filesSplit (fails A1, A2, A3)
Google Antigravity (antigravity; App 2.33.0, CLI agy 1.5.13)Not met: ~/.gemini/antigravity-cli/settings.json has no plugin keys, and no project settings file accepts plugin entriesNot met: only the official marketplace is accepted, and installs copy into ~/.gemini/config/plugins/; a folder under <workspace>/.agents/plugins/ is documented to activate in that project in placeNot met: no per-plugin enable switch; workspace plugins activate by presenceUnknownMet: documents its reads of .agents/, AGENTS.md and GEMINI.md; Claude plugins are imported once by agy plugin import, not read liveSplit (fails A1, A2, A3)
Kiro (kiro; IDE 1.4.236, CLI 3.5.0)Not met: Powers exist at user scope only (~/.kiro/powers/), and no settings key declares or enables a powerNot met: a local folder is imported into Kiro’s local registry by an Install stepNot met: needs the IDE Install step, /powers install, or kiro-cli powers installUnknown: only a manual “Check for updates” against the remote is documentedMet: reads AGENTS.md; no other target’s plugin or settings files are documentedSplit (fails A1, A2, A3)
OpenCode (opencode; 2.3.2)Not met: user, project and managed opencode.json have documented precedence, but they take direct plugins entries, not a marketplace declaration and enable switchNot met: no marketplace concept; a local plugin directory loads in place from a path relative to its config fileNot met as defined: no switch keyed by plugin and marketplace, although a plugins path entry loads with no install commandMet: opencode plugin update skips local pluginsMet: documents reads of .claude/skills/, .agents/skills/ and CLAUDE.md with precedence; reads no other target’s plugin filesSplit (fails A1, A2, A3); its plugin unit is a JavaScript or TypeScript module, not a manifest bundle
Grok Build (grok-build; 1.0.89)User scope: met with gaps (~/.grok/config.toml, and enabledPlugins read from ~/.claude/settings.json). Project scope: not met; .grok/config.toml accepts [plugins] names but no marketplace declarationNot met: local path marketplaces exist, but installing a marketplace plugin copies it into ~/.grok/installed-plugins/Not met: a declared marketplace installs nothing until grok plugin install; in the isolated run a declared directory marketplace, enabledPlugins and a trusted folder loaded no pluginUnknown: session-start auto-update is documented globally, with no statement for local sourcesNot met at project scope: reads .claude/ settings, plugins and marketplaces, .agents/skills/ and AGENTS.md, without documented precedence against .grok/Split (fails A1 at project scope, A2, A3, A5 at project scope)
Hermes Agent (hermes; 0.23.2)Not met: one user-scope ~/.hermes/config.yaml; project-local plugins are documented as not loadedNot met: plugins are cloned into ~/.hermes/plugins/; no directory marketplaceNot met: hermes plugins install, then enable; plugins.enabled is keyed by plugin name onlyMet: plugins update only on hermes plugins update unless plugins.auto_apply is setMet: documents its .agents/skills/ and context-file reads with precedenceSplit (fails A1, A2, A3); its plugin unit is a Python plugin (plugin.yaml)
OpenClaw (openclaw; 2026.11.6)User scope: not met as defined; ~/.openclaw/openclaw.json accepts plugins.load.paths and plugins.entries.<id>.enabled, with no other layer. Project scope: not metNot met: marketplaces are install-time sources, and openclaw plugins install --marketplace copies into ~/.openclaw/extensions/Not met as defined: enable is keyed by plugin id only; in the isolated run a Claude-format plugin directory declared in plugins.load.paths and enabled loaded in place with no install commandMet for plugins.load.paths, which are operator-managed and skipped by openclaw plugins updateMet: reads Claude, Codex, Cursor and Agent Plugins manifests inside a plugin directory in a documented detection order; reads no other target’s settingsSplit (fails A1, A2, A3)
GitHub Copilot app (copilot-app; 1.4.3)Unknown: the app is documented as “built on GitHub Copilot CLI”, but its docs do not name the settings files it reads for pluginsUnknown: app docs add marketplaces by GitHub or Git URL; local marketplace folders appear only in the app changelogUnknown: app docs describe a Browse and Install stepUnknownUnknownUnknown (A1 to A5 undocumented for the app)
Microsoft 365 Copilot Cowork (copilot-cowork; cloud service, docs of 2026-11-18)Not met: no local settings file; plugins are managed in the Microsoft 365 admin center and a per-user toggleNot met: plugins are uploaded app packages; Claude plugins are converted on uploadNot met: admin-center or UI upload, or atk installNot applicable: no directory sourceUnknownSplit (fails A1, A2, A3)
GitHub Copilot for JetBrains IDEs (intellij; plugin 1.21.1)Unknown: managed policy supports enabledPlugins and extraKnownMarketplaces, but no user or project settings file is documented for JetBrainsUnknown: GitHub’s plugin docs do not list JetBrains IDEs among plugin surfacesUnknownUnknownUnknownUnknown (A1 to A5 undocumented). The consumer’s intellij target configures MCP only
Grok Cloud (grok-cloud)Not applicableNot applicableNot applicableNot applicableNot applicableNot applicable: xAI documents no separate Grok Cloud product; the .grok/skills/ location is documented by Grok Build
Grok Bot (grok-bot; hosted)Not applicableNot applicableNot applicableNot applicableNot applicableNot applicable: a hosted agent whose plugins are in-app connectors; no settings files or file-based plugin loader are documented
Agent Skills (agent-skills)Not applicableNot applicableNot applicableNot applicableNot applicableNot applicable: a meta target for the Agent Skills format, not a client

Codex A3 evidence, 2026-11-19, Codex 0.170.0, isolated CODEX_HOME, trusted project: a hand-written [marketplaces.<name>] entry with source_type = "local" is discovered, but [plugins."<plugin>@<name>"] enabled = true leaves the plugin installed: false, and a real session start does not install it. Per the Codex source and plugin documentation, a local plugin is installed only by codex plugin add, a git marketplace upgrade, or the desktop or TUI plugin browser (https://developers.openai.com/plugins/build/plugins). Codex therefore gets explicit split install under req-na-006, except for a schema-bearing Agent Plugins v1 dependency, which req-tg-011 keeps opaque at the deployment boundary: it is skipped with one actionable diagnostic rather than split-installed.

Survey detail, issue #3922, 2026-11-19. The table below records, for each surveyed target, the native unit and format, the settings files and scopes, whether a local source loads in place or is copied, whether enabling needs an install step, update behaviour, and trust. It is evidence for the table above, not a qualification.

TargetNative unit and formatSettings files and scopesIn place or copiedInstall step to enableUpdateTrust
cursorPlugin: Agent Plugins root plugin.json, or .cursor-plugin/plugin.json; catalog .cursor-plugin/marketplace.jsonProject or user scope chosen at install; team and enterprise layers in the dashboard; user enabled_plugins is undocumented beyond the changelogCopied into ~/.cursor/plugins/local; symlinks outside it are skipped; --plugin-dir loads one directory per runYes: UI Install, or reload after copying a local pluginMarketplace re-index on Auto Refresh (GitHub imports) or manual RefreshWorkspace trust exists and is off by default; marketplace plugins are reviewed by Cursor
windsurfPlugin: .devin-plugin/plugin.json, then .claude-plugin/plugin.json, then root plugin.jsonOrganization, team, session, .devin/config.local.json, .devin/config.json, ~/.config/devin/config.json; repo-level plugin lists are documented inconsistently--local links in place; remote sources are fetchedYes: devin plugins install (sign-in required) or the Customize pageGit sources float to the tracked branch; sha pins are fixed; local links are liveInstall-time trust prompt (-y skips it); hooks do not load in Restricted Mode
geminiExtension: gemini-extension.jsonSystem defaults, user ~/.gemini/settings.json, workspace .gemini/settings.json, system overridesinstall copies; link records the source path and loads it in placeYes: gemini extensions install, link or enable--auto-update for installed extensionsUntrusted folders cannot install or update extensions, and their MCP servers do not connect
antigravityPlugin: root plugin.json or .antigravity-plugin/plugin.jsonUser ~/.gemini/antigravity-cli/settings.json (no plugin keys); plugins.json discovery manifestsInstalls copy into ~/.gemini/config/plugins/; <workspace>/.agents/plugins/<plugin>/ is read in placeYes for marketplace plugins (agy plugin install); no for workspace .agents/plugins/Not documented for directory sourcestrustedWorkspaces; gating of workspace plugins is not documented
kiroPower: Agent Plugins plugin.json, or legacy POWER.mdUser ~/.kiro/ only for Powers; project .kiro/ for MCP, steering, skills and hooksImported into a local registry; location not documentedYes: IDE Install, /powers install, or kiro-cli powers installManual “Check for updates”No trust prompt documented; tool calls follow Kiro permissions
opencodePlugin: JavaScript or TypeScript package (Plugin.define)User ~/.config/opencode/opencode.json, project opencode.json or .opencode/opencode.json, managed system directory (highest)Local paths and .opencode/plugins/ load in place; npm and git packages are cachedNo for local paths; missing packages install in the background at startupLocal plugins are not updated; unpinned packages are checked at startupNo workspace trust prompt documented; managed policies can deny a plugin
grok-buildPlugin: Claude-compatible plugin.json and .claude-plugin/marketplace.json (also .grok-plugin/)User ~/.grok/config.toml, ~/.claude/settings.json; project .grok/config.toml, .claude/settings.jsonMarketplace installs copy into ~/.grok/installed-plugins/; [plugins] paths load in placeYes for marketplace plugins (grok plugin install); no for [plugins] paths after folder trustSession-start auto-update, can be pinned offUnified folder trust
hermesPlugin: Python package with plugin.yaml and register(ctx)User ~/.hermes/config.yaml onlyCloned into ~/.hermes/plugins/; symlinks are tolerated but untrackedYes: hermes plugins install, then enable (prompt defaults to no)Manual, or opt-in plugins.auto_applyOpt-in allow-list; install-time security scan and capability consent
openclawPlugin: openclaw.plugin.json, or a Claude, Codex, Cursor or Agent Plugins bundleUser ~/.openclaw/openclaw.json onlyplugins.load.paths and install --link load in place; install copies into ~/.openclaw/extensions/No for plugins.load.paths; yes for marketplace plugins (with capability consent)Local paths skipped; managed plugins on openclaw plugins updateplugins.allow and deny; workspace-origin plugins off by default; provenance warning for config paths
copilot-appPlugin, as in Copilot CLINot documented for the app; managed settings list the app as a supported clientNot documentedYes per app docs: Browse, then InstallNot documentedNot documented
copilot-coworkMicrosoft 365 app package (manifest.json with agentSkills and agentConnectors)Admin center and per-user toggle; no local fileUploaded to the serviceYes: admin or user upload, or atk installService-managedAdmin approval
intellijPlugin, per the JetBrains plugin changelogManaged policy only is documentedNot documentedNot documentedNot documentedNot documented
grok-cloud, grok-bot, agent-skillsNone that can be declared in a fileNoneNot applicableNot applicableNot applicableNot applicable

Primary sources for the survey, read on 2026-11-19: Cursor, https://cursor.com/docs/plugins, https://cursor.com/docs/reference/plugins, https://cursor.com/docs/cli/changelog and https://cursor.com/docs/reference/third-party-hooks; Windsurf, https://docs.devin.ai/cli/extensibility/plugins/overview, https://docs.devin.ai/cli/reference/configuration/global-vs-local and https://docs.devin.ai/cli/reference/configuration/read-config-from; Gemini CLI, https://github.com/google-gemini/gemini-cli/blob/main/docs/extensions/reference.md and https://github.com/google-gemini/gemini-cli/blob/main/docs/reference/configuration.md; Antigravity, https://antigravity.google/docs/plugins, https://antigravity.google/docs/customization-discovery and https://antigravity.google/docs/settings; Kiro, https://kiro.dev/docs/powers/installation and https://kiro.dev/docs/configuration; OpenCode, https://opencode.ai/docs/plugins/ and https://opencode.ai/docs/config/; Grok Build, https://docs.x.ai/build/features/skills-plugins-marketplaces and https://github.com/xai-org/grok-build/blob/main/crates/codegen/xai-grok-pager/docs/user-guide/09-plugins.md; Hermes Agent, https://hermes-agent.nousresearch.com/docs/user-guide/features/plugins and https://hermes-agent.nousresearch.com/docs/user-guide/configuration; OpenClaw, https://docs.openclaw.ai/tools/plugin, https://docs.openclaw.ai/plugins/bundles and https://docs.openclaw.ai/cli/plugins/uninstall-and-update; GitHub Copilot app, https://docs.github.com/en/copilot/concepts/copilot-surfaces/github-copilot-app and https://docs.github.com/en/copilot/how-tos/github-copilot-app/customize-github-copilot-app; Copilot Cowork, https://learn.microsoft.com/en-us/copilot/cowork/cowork-plugins and https://learn.microsoft.com/en-us/copilot/cowork/cowork-manage-plugins; JetBrains, https://docs.github.com/en/copilot/concepts/customizations/plugins and https://docs.github.com/en/copilot/reference/enterprise-administrators/enterprise-managed-settings; Grok Bot, https://docs.x.ai/grok-bot/overview, and for Grok Cloud no match in https://docs.x.ai/llms-full.txt; Agent Skills, https://agentskills.io/specification.

Isolated runs used a throwaway home directory and no credentials: Gemini CLI 0.70.0 (gemini extensions link records the source path in a stub file rather than a symbolic link, and install copies); Antigravity agy 1.5.13 (agy plugin validate reports that a directory with only .claude-plugin/plugin.json “doesn’t load as is”); OpenCode 2.3.2 (a plugins path entry and a .opencode/plugins/ directory loaded in place); Grok Build 1.0.89 (see A3 above); OpenClaw 2026.11.6 (see A3 above). Cursor agent CLI 2026.11.19 and Devin CLI 3000.14.30821 were installed, but their plugin commands need sign-in, so no plugin load was observed.

Cross-target evidence relevant to A5 for the native-eligible targets: Antigravity documents that a plugin folder under <workspace>/.agents/plugins/ activates in that project, which is the project-scope profile root of this subsection, and Grok Build’s shipped documentation says it reads marketplaces declared in a project .claude/settings.json. Whether either target loads a plugin root deployed for another target is format dependent and is not settled here.

Known residuals that do not fail Part A for Claude Code: its per-user marketplace registry (addressed by req-na-007); worktrees resolve a relative directory path against the main checkout; and with a relative path, a project-scope plugin loads from the second session onward. The GitHub Copilot implementation route described in req-tg-013 moved to this profile under #3921, and registrations recorded in its earlier ownership ledger are migrated. Because Copilot also reads a repository’s .claude/settings.json, a consumer that activates a plugin at project scope for Claude Code alone writes a false enable value for it in .github/copilot/settings.json, which Copilot reads later, so Copilot leaves it off; that value is the consumer’s own entry under req-na-004.

8.6 Per-target primitive support (informational)

Section titled “8.6 Per-target primitive support (informational)”

The matrix of which primitive types each target supports is informational and additive: new harness adapters MAY add support without a spec revision. The current matrix is in the companion targets-matrix.md.

8.7 Conformance requirements (primitives and targets)

Section titled “8.7 Conformance requirements (primitives and targets)”

OpenAPM follows the semver discipline at the document level:

  • 0.x — editor’s drafts. Each minor MAY introduce breaking changes with the migration window in Section 9.5.
  • 1.0 — first stable cut. Strictly additive within the 1.x major.
  • 2.x and beyond — breaking changes require a major bump.

9.2 Breaking vs. non-breaking change definition

Section titled “9.2 Breaking vs. non-breaking change definition”

Non-breaking (allowed within a minor):

  • Adding a new OPTIONAL field to manifest, lockfile, or policy.
  • Adding a new enum value to a non-conformance-critical enum (for example a new target name registered in the Target Registry companion).
  • Adding a new conformance test for behaviour already required.
  • Making an evaluation deterministic when no normative statement previously defined it, the specification already named the field and its purpose, no field is removed, renamed, or retyped, and no existing fail-closed obligation is relaxed. The Appendix D row for the amendment MUST name every verdict class that can change. This does not license changing an evaluation already defined by a normative statement.

Breaking (requires a minor bump with migration window):

  • Removing or renaming a field.
  • Changing the type or required-ness of a field.
  • Tightening a SHOULD to a MUST. (Tightening introduces a new hard-conformance bar; it requires migration even when most implementations already meet the bar.)
  • Loosening a MUST to a SHOULD.
  • Promoting a parse-time warning to a parse-time error.
  • Bumping lockfile_version for non-additive changes.
  1. An issue is filed in microsoft/apm with a spec/openapm-vN.x label.
  2. An editor’s-draft PR amends docs/src/content/docs/specs/openapm-vN.x.md.
  3. A reviewer panel of at minimum two non-author reviewers (one with implementation experience, one with consumer/integrator experience) approves.
  4. A 14-day public comment period follows panel approval.
  5. Merged amendments append to Appendix D with a req-xxx-level diff.

Errata are clarifications that do not change implementation behaviour. They are merged inline with an [Errata YYYY-MM-DD] footnote and summarised at the top of Appendix D. A new revision (minor bump) is required for any change that satisfies the breaking-change definition in Section 9.2.

Breaking changes MUST be announced in the previous minor’s revision history (so integrators see the announcement while building against the still-supported minor). A minimum of 90 days MUST elapse between announcement and removal. Consumers SHOULD emit deprecation warnings during the migration window.

Note (non-normative). Amendment 0.1.61, adopted on 2026-11-19, opened two migration windows on that date: the deprecated vscode target alias and the deprecated singular target: field (see Section 4.2.1). No removal is scheduled for either; each window stays open until a later revision removes the deprecated form, subject to the 90-day minimum above. Deprecation horizons stated elsewhere in this specification, such as the bare-hex reader tolerance in req-lk-016, are unaffected.

The marketplace input block (manifest Section 4.7) is part of the manifest format. The shape of the emitted marketplace.json artifact is governed externally; this specification tracks upstream changes additively and does not bind the emitted artifact.


This section enumerates the attack surfaces this specification addresses, and maps each to the normative requirement(s) that mitigate it. Attack surfaces marked deferred to v0.2 identify a mitigation that exists in v0.1 but whose normative wire-level treatment lands with the registry HTTP API.

Threat. An adversary publishes a package with the same name as an internal package on a public registry; the consumer’s resolver fetches the public copy instead of the internal one.

v0.1 posture. Absent an active Governance policy, OpenAPM v0.1 has NO consumer-class mitigation for dependency confusion: the unprotected consumer install MUST be assumed vulnerable, and this specification does not claim otherwise. Mitigations below are Governance-class controls that an organisation MUST opt into.

Mitigations (Governance-class only). The Governance class’s allow/deny tri-state (req-pl-005, req-pl-006) lets an organisation pin acceptable sources. The require_pinned_constraint rule (req-pl-007) forces the consumer to declare intent explicitly, surfacing the dependency for review. A v0.2 registry_source.allow_non_registry: false toggle closes the bypass in-band; v0.1 relies on policy review.

Consumer-default cache isolation. Cross-repository cache substitution is distinct from registry name confusion: a consumer that keys cached source material by a path prefix or ref alone can serve bytes from one repository for a different declared repository. req-rs-016 requires complete minimum repository identity at every cache layer and forbids that reuse.

Threat. A lookalike package name (acm/security-baseline instead of acme/security-baseline) lures the consumer into installing a hostile package.

v0.1 posture. Absent an active Governance policy, OpenAPM v0.1 has NO consumer-class mitigation for typosquatting. Lookalike detection, vendor-distance scoring, and registry-side disambiguation are reserved for v0.2 and are explicitly out of scope for the v0.1 consumer.

Mitigations (Governance-class only). Canonical normalisation (req-mf-009) collapses cosmetic differences and makes name comparisons stable for policy authors. require_pinned_constraint (req-pl-007) forces explicit refs, raising review value. Allow/deny lists (req-pl-005, req-pl-006) gate the acceptable name space.

Threat. A credential issued for github.com is forwarded to evil.example.com during a cross-host clone, leaking the token.

Mitigations.

[req-sc-003] A conforming consumer implementation MUST resolve credentials per host class (as defined in Section 3 and as alias-extended via req-sc-006), and MUST NOT forward a credential resolved for one host class to a request targeting another host class. Credential scope MUST be observable in the consumer’s diagnostic surface. When a fetch follows an HTTP redirect (3xx) whose target hostname classifies into a different host class than the originating request per req-sc-005, the consumer MUST drop the originating Authorization header (and any other credential material attached for the originating host class) before issuing the redirected request. Credentials for the destination host class MAY be re-resolved per this requirement.

[req-sc-013] A conforming consumer implementation that permits operator configuration to assign a literal authority hostname to a host class: (a) it MUST select exactly one effective host class before credential resolution. For this requirement, a configuration signal is any manifest declaration or implementation-specific operator setting that binds a hostname to a host class. (b) If two or more configuration signals claim the same literal authority hostname, the precedence MUST be deterministic and documented in the consumer’s conformance statement.

For each request and transport child process spawned to fetch or validate the dependency (for example a git client or credential helper), the consumer: (c) it MUST resolve, attach, and expose only credential material belonging to the selected host class; and (d) credential material belonging to an unselected class MUST NOT be resolved, attached, or inherited by that child process. The consumer MUST actively suppress ambient credential material (for example environment variables) that the child process would otherwise inherit from a parent scope. Literal credential values remain subject to the redaction obligation of req-sc-007; source descriptors MAY appear in the diagnostic surface required by req-sc-003.

(e) An explicit non-default port (using the protocol-default equivalences in req-rs-016 item (2)) in the dependency reference MUST remain part of both the transport endpoint and credential scope. The port narrows credential lookup within the already-selected host class; it does not create a distinct host class.

[req-sc-005] A conforming consumer implementation that classifies two distinct hostnames as the same host class for the purposes of credential reuse MUST do so on the basis of (a) identical eTLD+1 per the Public Suffix List (https://publicsuffix.org), (b) an explicit aliases: entry in the project’s apm.yml registries: block (see Section 4.2.3 and req-sc-006), or (c) membership of both hostnames in the built-in GitHub-operated host class: github.com and every *.ghe.com host, plus a GitHub Enterprise Server host only when the operator names it through the GITHUB_HOST setting, never through a manifest. An implementation that uses (c) MUST document the class in its conformance statement and apply it under the determinism and precedence rules of req-sc-013. Basis (c) covers only those hosts; it does not widen (a) or (b) for any other host. Implementations MUST NOT collapse two hostnames onto the same host class on any other basis (such as DNS CNAME chains, TLS SAN entries, or shared HTTP redirects). A host-class assignment produced by a configuration signal exercised under req-sc-013 is not subject to this prohibition.

[req-sc-007] A conforming consumer implementation MUST redact credential material (tokens, basic-auth passwords, bearer strings) so that such material MUST NOT appear in any user-facing diagnostic, log, error message, packed bundle, lockfile, or persisted audit record. The diagnostic that reveals “credential X was used for host Y” MUST identify the credential by source descriptor (for example GITHUB_APM_PAT environment variable), not by literal value. The Producer toolchain MUST refuse to pack any file whose path matches the configurable secret-pattern set (default patterns: .env, .env.*, *.pem, *.key, id_rsa, id_ed25519); the pattern set MAY be extended via policy. See also the broader token-leakage mitigation row in Section 10.11.

[req-sc-008] A conforming consumer implementation SHOULD refuse to attach a credential to a git-over-HTTP fetch whose URL scheme is not https://, unless the target host is the loopback address (127.0.0.0/8, ::1) or the target registry is declared with insecure: true per req-sc-006.

Threat. An adversary edits apm.lock.yaml to swap a commit SHA or a deployed-file hash and ship a malicious payload that still “passes” a naive integrity check.

Mitigations.

[req-sc-001] A conforming consumer implementation MUST compute and record a SHA-256 content hash for every deployed file (per req-lk-012) and MUST re-verify those hashes on audit. Files present in deployed_files whose on-disk hash does not match the recorded hash MUST be reported as a content-integrity violation.

In addition, req-lk-013 verifies registry archive bytes before extraction, and req-lk-017 re-verifies deployed-file hashes on every frozen install. The combination prevents an attacker from tampering with installed files without detection.

Threat. DNS or MITM redirection points a registry URL at an attacker-controlled host serving a manipulated archive.

Mitigation. req-lk-013 anchors trust in the archive’s SHA-256 (per the hash envelope at req-lk-016), not the URL: a tampered archive fails closed before extraction. The mirror-tolerance rule (req-rs-009) preserves this property: a mirror MAY serve the bytes, but the bytes MUST still hash to the lockfile’s recorded resolved_hash. Registry-class implementations participating in this trust chain MUST satisfy req-rg-001. A v0.2 normative TLS-only requirement on the registry HTTP wire (reserved in Appendix B) augments this in-band.

In addition:

[req-sc-004] A conforming consumer implementation MUST constrain registry archive extraction so that (a) the archive content-type is application/gzip over a tar payload (tar.gz) or application/zip (zip); implementations MUST reject any other archive container in v0.1; (b) the uncompressed archive size MUST NOT exceed a configurable cap whose default value is 100 MB; (c) the number of entries in the archive MUST NOT exceed a configurable cap whose default value is 10,000, counted as entries are read rather than taken from any declared count; and (d) extraction MUST refuse any entry whose path would traverse outside the destination, any absolute path, any symbolic or hard link, and any duplicate entry path (see also req-sc-002). The same limit set, (b) through (d), applies identically to tar.gz and zip. Violations MUST fail closed, and no entry of a violating archive may remain extracted.

10.6 Malicious package execution at install time

Section titled “10.6 Malicious package execution at install time”

Threat. A hostile package’s scripts: block executes during install.

Mitigation. This specification does not authorise apm install to execute any scripts: entry. The producer-side scripts: block is a named-entry registry consumed by an explicit user invocation (such as apm run <name>). Governance MAY further forbid scripts: declarations via manifest.scripts: deny. The absence of an install-time execution path is the load-bearing mitigation; the policy block is defence in depth.

10.7 Unverified content cleanup (file integrators)

Section titled “10.7 Unverified content cleanup (file integrators)”

Threat. A hostile transitive dependency claims authority over files outside its real deployment footprint, causing the cleanup logic to remove files belonging to another dependency or to the project itself.

Mitigations. req-tg-002 constrains each target to its registered deploy root(s). The self-entry isolation in Section 5.3 prevents the cleanup logic of one dependency from claiming the project’s own files. Orphan detection MUST scope per-dependency, not globally. For supported dependency aliases, req-mf-025 constrains destinations and records canonical placement for later cleanup. Containment alone does not establish ownership or authorize deletion of existing content. req-lk-024 requires deployment evidence, not a lockfile hash alone, before a lockfile-driven deletion; its only exception is an uninstall the user explicitly consents to per invocation, limited to files no deployment record or render can speak for. Under that consent the deletion rests on the provenance of the lockfile: a tampered lockfile can direct the deletion of any file whose current bytes it records, confined to paths the uninstall removes and named in its output, so a user consents only for a lockfile of trusted provenance. Because a render that can be produced takes precedence over the exception, the same uninstall can keep a file online and delete it offline.

Threat. A consumer manifest exploits parser ambiguity (an unknown key, a malformed extends: chain) to silently skip the governance gate.

Mitigations. req-pl-009 makes unknown policy keys a warning, not a silent acceptance, and preserves them as x-* extensions. req-pl-010 fails closed on fetch failure when configured. req-pl-002 blocks before disk write. req-pl-003 caps extends: depth to thwart amplification attacks. req-pl-018 prevents a case-variant repository spelling from bypassing an allow-list or deny-list when resolution treats both spellings as one package identity. On a case-sensitive source, differently cased repository paths remain distinct and policy authors must enumerate the spellings they intend to deny. The same normalization widens dependencies.allow matching on a case-insensitive source, so an upgrade can admit a case-variant spelling that previously missed. Clause (d) of req-pl-018 leaves segments at and after recursive-glob ambiguity byte-exact, including on a case-insensitive source. A hostless pattern governs the same repository path on every reachable host; clause (g) of req-pl-018 lets governance authors bind a pattern to one exact host, including the default host used for references written without one. A require entry that identifies a remote dependency is bound to one host, so a same-path package on another host cannot satisfy it. A dependency fetched through a consumer-configured registry proxy keeps its declared identity, so its provenance rests on that proxy configuration. A hostless require entry names the evaluating implementation’s default host, which can differ between environments; authors of a policy evaluated across such environments write host-qualified require entries.

Section titled “10.9 Archive path-traversal (zip-slip / symlink escape)”

Threat. A crafted tarball or zip with .. segments, absolute paths, or symlinks writes files outside the extraction root.

Mitigation.

[req-sc-002] A conforming consumer implementation MUST reject any archive entry whose extracted path would contain .. segments, would be absolute, or would be a symbolic or hard link. Extraction MUST fail closed on the first such entry; partial extractions MUST be cleaned up. The archive container, size, and entry-count limits of req-sc-004 MUST be enforced in addition.

Threat. A consumer’s policy.hash_algorithm accepts a weak digest (MD5, SHA-1) and an attacker exploits collision weakness to serve a manipulated policy that matches the recorded digest.

Mitigation. req-mf-018 restricts the allowed algorithms to sha256, sha384, and sha512, rejecting weaker choices at parse time. The lockfile hash envelope (req-lk-016) makes the digest algorithm explicit on every stored hash, foreclosing algorithm-ambiguity attacks.

#Attack surfaceMitigation requirement(s)Posture
1Dependency confusionreq-pl-005, req-pl-006, req-pl-007Governance-only
2Typosquattingreq-mf-009, req-pl-005, req-pl-007Governance-only
3Token leakage across hostsreq-sc-003, req-sc-005, req-sc-007, req-sc-008, req-sc-013Consumer-default
4Lockfile tamperingreq-lk-012, req-lk-013, req-lk-016, req-lk-017, req-sc-001; req-rs-018 for subset-selection scope (re-derived outside frozen mode, rejected under frozen install)Consumer-default
5Registry impersonationreq-lk-013, req-rs-009, req-sc-004; v0.2 TLS-only deferredConsumer-default
6Malicious package execution at install timeNo install-time execution path; req-pl-006 defenceConsumer-default
7Unverified content cleanupreq-tg-002, req-lk-020, req-lk-021, req-lk-024, req-lk-023 when staged replacement is provided; req-mf-025 for supported aliases; self-entry isolationConsumer-default
8Policy bypass via crafted manifestreq-pl-002, req-pl-009, req-pl-010, req-pl-018Governance-only
9Archive path-traversalreq-sc-002, req-sc-004Consumer-default
10Hash-algorithm downgradereq-mf-018, req-lk-016Consumer-default
11Unauthorised executable primitive deploymentreq-sc-009Consumer-default
12Approval grant propagation via VCSreq-sc-010, req-na-005Consumer-default
13Org executable denial bypassed by project/user grantreq-sc-011Consumer-default
14Required-package audit false-positive on withheld executablereq-sc-012Consumer-default
15Cross-repository cache substitutionreq-rs-016Consumer-default
16Silent capability-scope widening via lossy target conversionreq-tg-006; default-visible conversion diagnosticConsumer-default
17Cross-target primitive deploymentreq-tg-008, req-lk-021Consumer-default
18Case-collision materialization confusionreq-lk-022, req-rs-016Consumer-default
19Executable deployment in non-interactive contextsreq-sc-014Consumer-default
20Source-only or symlinked package content materializationreq-sc-015Consumer-default
21Native plugin namespace collision or ownership-ledger lossreq-tg-013Consumer-default
22Silent hook passthrough or double-activation via native-format conversionreq-tg-016, req-tg-017Consumer-default
23Partial native deployment with false successful-state persistencereq-pr-008Consumer-default
24Manifest-directed dependency redirection via a root replacement tablereq-rpl-001, req-rpl-002, req-rpl-004Consumer-default when capability is provided
25Native activation of unlocked or unapproved plugin content, or of settings the consumer does not ownreq-na-001, req-na-002, req-na-003, req-na-004, req-na-005, req-na-006, req-na-007, req-sc-015Consumer-default when native activation is provided
26Transitive MCP server trusted by a lockfile edit, a persisted one-off opt-in or a changed definitionreq-sc-016, req-sc-011Consumer-default

For Codex conversion metadata diagnostics, req-tg-015 separately constrains field-name display and excludes dropped values. This diagnostic-safety contract is distinct from row 16’s capability-scope preservation.

10.12 Publisher provenance and attestations (reserved for v0.2)

Section titled “10.12 Publisher provenance and attestations (reserved for v0.2)”

Publisher provenance (cryptographic attestations binding a specific package version to a specific publisher identity) is out of scope for OpenAPM v0.1 and reserved for v0.2. The lockfile’s attestations: field (per req-lk-001) and the producer-side tag-signing SHOULD (req-pr-005) are reserved hooks for this future surface. A future surface will define: in-toto / SLSA provenance binding format; sigstore verification semantics; Governance policy.dependencies.require_attestation enforcement modes; and the registry HTTP wire envelope (alongside Appendix B).

Threat. A dependency package deploys executable code — hooks, bin executables, MCP server configurations, or canvas extensions — that runs on the developer’s machine without explicit consent. A transitive dependency’s MCP server can also be trusted through lockfile state, a persisted one-off opt-in, or an approval that survives a change to the server definition.

Mitigations.

[req-sc-009] A conforming consumer implementation MUST, when the consuming project’s apm.yml contains an allowExecutables block, deny deployment of any executable primitive (hooks, bin executables, MCP server configurations, and canvas extensions) from a dependency package unless that package is explicitly listed in the effective approval set for the corresponding executable type. A consumer MUST fail closed when the allowExecutables block is present but the package is absent from the approval set: the primitive MUST NOT be deployed.

[req-sc-010] A conforming consumer implementation that provides an interactive approval mechanism for executable primitives MUST persist per-user approval decisions in a location that is isolated from the project manifest (apm.yml) and is not tracked by version control alongside project files by default. The consumer MUST NOT write interactive approval decisions into the project apm.yml, so that one developer’s approval cannot propagate implicitly to other developers who clone or share the project.

[req-sc-016] A conforming consumer implementation MUST admit an MCP server declared by a transitive dependency (a package that is not a direct dependency of the consuming project) whose declaration is self-defined (registry: false, see req-mf-012), names its own registry (sets registry to a registry location), or overlays configuration (sets any of command, args, env, headers, url, cwd or an extension field on a registry reference), only when (a) the consuming project’s manifest re-declares the server, in which case the consumer deploys the consuming manifest’s declaration, and a grant bound to the dependency’s declaration does not apply; (b) a grant in the consuming project’s manifest, or in the per-user approval location of req-sc-010, binds the declaring package, the server name and a fingerprint of the server definition that matches the current definition, the manifest grant deciding when both bind the same server; or (c) the operator opts in for that invocation. A grant in a dependency’s own manifest MUST NOT satisfy (b). The fingerprint MUST be a full-length sha256:<64 lowercase hex> digest compared in full, never by prefix, computed from the declaration in the declaring package’s installed source (never from the lockfile) over the server name and every field that determines what runs or where it connects: at least transport, command, args, env and headers (placeholders kept unresolved), url, cwd, registry, version, package, tools and extension fields, plus the resolved registry entry when the declaration names its own registry or overlays configuration. A consumer MUST treat a fingerprint it cannot compute or does not recognize as not matching. A consumer MUST NOT derive that consent from the lockfile, MUST NOT persist a per-invocation opt-in, and MUST NOT deploy the server when a bound fingerprint no longer matches, even under (c); in that case it MUST emit a default-visible diagnostic that names the declaring package and the server. A grant that binds a fingerprint, a re-declaration and an opt-in are each evaluated after the organization denial of req-sc-011 and never override it. An audit of committed project state MAY disregard the per-user approval location. When the organization policy in effect sets mcp.trust_transitive to false, or leaves it unset while setting any restriction (a field with a non-default value; metadata and enforcement alone are not restrictions), the consumer MUST admit an MCP server declared by a transitive dependency, of any declaration form including a plain registry reference, only when the policy’s mcp.allow matches the server name; a grant under (b) and an opt-in under (c) do not override this, and a re-declaration under (a) makes the server the consuming project’s own declaration, judged as a direct one. Under enforcement: block the consumer MUST fail the operation before deploying such a server; under enforcement: warn it MUST emit a default-visible diagnostic naming the server, as for an mcp.deny match. An audit of committed project state MUST report each such server as a policy violation. A policy that sets no restriction imposes nothing here.

A grant under (b) recorded in the consuming manifest by an explicit operator command is an authored, reviewable manifest edit that is meant to propagate with the project; it is not an interactive approval decision under req-sc-010. At this revision, content-bound grants are normative only for MCP servers; other executable types remain governed by req-sc-009 and req-sc-010. At this revision the manifest key that records a (b) grant and the byte construction of the fingerprint input are implementation-defined and documented by the implementation; a grant therefore travels with the project between users of one implementation but is not guaranteed to be recognized by another, which treats it as not matching.

10.14 Executable trust precedence and audit fidelity

Section titled “10.14 Executable trust precedence and audit fidelity”

Threat. Two failure modes defeat centralized executable governance. First, a project-level or user-level approval re-enables an executable primitive that an organization policy has denied, or the install-time gate and the post-install audit reach different trust conclusions for the same primitive (a split-brain that lets a denied primitive read as trusted, or the reverse). Second, a governance requirement mandating that a package be present is reported as unmet merely because that package’s executable primitives were withheld from deployment, making it impossible to both mandate a package and let a consumer withhold its executables.

Mitigations.

[req-sc-011] A conforming consumer implementation MUST resolve every executable-primitive trust decision through a single deny-wins precedence relation in which an organization policy denial (an executables.deny entry or executables.deny_all in an applicable apm-policy.yml per Section 6) overrides any project-level or user-level grant for the same package and executable type. A consumer MUST reach the identical allow-or-deny outcome for identical inputs whether the decision gates deployment at install time, is verified by a frozen install against the lockfile, or classifies an already-installed primitive at audit time. A consumer MUST NOT allow a project apm.yml grant or a user-local approval to re-enable an executable primitive that an applicable organization policy denies.

[req-sc-012] A conforming consumer implementation that evaluates a governance requirement mandating the presence of a package (per Section 6) MUST determine satisfaction of that requirement from the presence of the package in the resolved lockfile, and MUST NOT condition it on whether that package’s executable primitives were deployed. When a required package is present but one or more of its executable primitives are withheld from deployment by the trust resolution of req-sc-011, a consumer MUST treat the presence requirement as satisfied and MUST surface each withheld executable as a diagnostic signal distinct from any missing-package violation.

Threat. An operator runs apm install in a non-interactive context (piped output, CI pipeline, --frozen mode) and a marketplace plugin deploys bin/ executables to the developer tool’s PATH without any visible consent signal, because the per-invocation warning is swallowed by log redirection.

Mitigation.

[req-sc-014] A conforming consumer implementation that supports a per-invocation consent flag for bin/ executable deployment MUST deny that deployment by default when its standard output is not connected to a terminal (i.e., the output stream is not a TTY), unless the operator has explicitly opted in for that invocation. An explicit per-invocation opt-in (for example --trust-bin) overrides the non-interactive default and permits deployment. An explicit per-invocation opt-out (for example --no-trust-bin) overrides the non-interactive default and denies deployment even when the output IS a terminal. The allowExecutables policy gate req-sc-009 is evaluated before per-invocation consent and always takes precedence: a policy-level denial cannot be overridden by a per-invocation opt-in.

10.16 Authorized source-plan materialization

Section titled “10.16 Authorized source-plan materialization”

Threat. A package can hide hostile content in a source-only file or a symlink entry, then reach a primitive target through a lifecycle path that does not reuse the authorization and scan decision made for ordinary install.

Mitigation.

[req-sc-015] A conforming consumer implementation MUST derive exactly one authorized source-file set after target, package-subset, and executable authorization for every primitive-materialization lifecycle, including install and re-integration after uninstall. The set MUST exclude symlink files and MUST NOT traverse symlinked directories. The consumer MUST apply any pre-deployment content security scan to the full set before any source-derived target write and MUST materialize primitive files only from that same set; each primitive-integrator materialization path MUST consume the canonical set rather than derive a second classifier. If a selected file violates a blocking scan policy, the consumer MUST reject that materialization before writing a source-derived target file unless the operator explicitly forces the install. The consumer MUST NOT scan or materialize a source-only file merely because it is present in the package tree. The executable authorization used to derive the set remains governed by req-sc-009.

10.17 Native plugin namespace and ownership recovery

Section titled “10.17 Native plugin namespace and ownership recovery”

Threat. A foreign marketplace entry captures a consumer’s reserved identifier, or loss of the consumer-owned ledger causes registration cleanup to overwrite unrelated host settings or retain stale activation keys.

Mitigation. req-tg-013 permits namespace recovery only from the exact directory-marketplace entry the consumer would generate, refuses a foreign collision, reconciles only the declared reserved activation-key suffix, preserves unrelated JSON values semantically, and commits catalog, ledger, and settings writes as one rollback unit.

Threat. Native activation loads unlocked, unapproved, or unscanned plugin content, captures another project’s marketplace name, or rewrites settings the consumer does not own.

Mitigation. Section 8.5.11 derives activation only from the lockfile, admits content through the gates of req-na-005 bound to the approval digest of the plugin root, checks deployed roots against the root digest of req-na-002, writes only documented activation entries (req-na-003), derives ownership from the previous and next lockfile (req-na-004), and requires per-project marketplace names (req-na-007).

Residual. Committed project-scope plugin roots and activation entries load at session start without a consumer run, so a clone loads the committed bytes, which a consumer checks against the recorded root digest only when it next runs. A per-user approval does not travel with the clone, and the target’s own trust prompt is the remaining gate. A committed true enable entry is a version-control enablement path that req-sc-010 does not cover (see Section 10.11, row 12); it is not an approval under req-na-005 for any other user. Because the approval digest of req-na-005 omits the executable bit, a change that only sets or clears that bit on an approved plugin root stays covered by the existing approval; the lock then records the new req-na-002 root digest, and the executable-authorization gates that req-na-005 also applies (req-sc-009, req-sc-010, req-sc-011, req-sc-014) still decide whether that content is admitted.


This specification defines four conformance classes; this section is the sole normative home for them. The forward pointer in Section 2 is editorial.

ClassRole
ProducerEmits a conforming apm.yml; optionally emits a conforming apm.lock.yaml. Conformance hooks: tag-release contract (req-pr-004, req-pr-005).
ConsumerParses apm.yml, resolves dependencies per Section 7, writes apm.lock.yaml, deploys primitives per Section 8.
RegistryReserved for v0.2. One normative anchor in v0.1: see req-rg-001 (trust-anchor expectation).
GovernanceParses apm-policy.yml, evaluates per Section 6, gates a Consumer install.

An implementation MAY claim more than one class. A toolchain component that packs a project (the “producer toolchain”) typically acts as both Producer (it writes the manifest) and single-tenant Consumer (it validates the manifest and writes a lockfile for its own pack).

Section-level conformance summaries (Section 4.9, Section 5.7, Section 6.9, Section 7.11, Section 8.7) are reader-aids that restate the Appendix C rows for the section’s class. Appendix C is the canonical source of truth; on any conflict between a section summary and Appendix C, Appendix C wins.

An implementation claiming OpenAPM v0.1 conformance MUST publish a conformance statement identifying:

  1. Which conformance class(es) it claims.
  2. The version of the specification it conforms to (v0.1).
  3. The list of OPTIONAL features it implements.
  4. Any limitations or non-conformance points, with rationale.
  5. Any additional conformance-statement content required by a specific requirement, including reserved namespace disclosure under req-tg-013, native activation qualification under req-na-001, and fixture citations under req-cf-002.
  6. If it claims the Governance class, or documents a case-insensitive host under req-rs-016, the repository-coordinate case rule for every such host. Registry sources are case-insensitive under req-rs-016 and req-pl-018; the conformance statement records that fixed rule rather than choosing it. The declared host rule MUST agree across repository identity and policy matching. In v0.1 this information is a named prose section; a machine-readable carrier is reserved in Section 12.6.

req-mf-001, req-mf-002, req-mf-003, req-mf-004, req-mf-005, req-mf-014, req-mf-015, req-mf-017, req-mf-021, req-ext-002, req-pr-004, req-pr-005 (SHOULD).

req-mf-006, req-mf-007, req-mf-008, req-mf-009, req-mf-010, req-mf-011, req-mf-012, req-mf-013, req-mf-016, req-mf-018, req-mf-019, req-mf-020, req-mf-021, req-mf-022, req-mf-023, req-mf-024, req-mf-025, req-mf-026, req-mf-027, req-mf-028, req-mf-029, req-ext-001, req-ext-003, req-lk-001, req-lk-002, req-lk-003, req-lk-004, req-lk-005, req-lk-006, req-lk-007 (SHOULD), req-lk-008, req-lk-009, req-lk-010, req-lk-011, req-lk-012, req-lk-013, req-lk-014, req-lk-015, req-lk-016, req-lk-017, req-lk-018 (SHOULD), req-lk-019, req-lk-020, req-lk-021, req-lk-022, req-lk-023 (proposed staged-replacement capability), req-lk-024, req-rs-001, req-rs-002, req-rs-003, req-rs-004, req-rs-005, req-rs-006, req-rs-007, req-rs-008, req-rs-009, req-rs-010, req-rs-011, req-rs-012, req-rs-013, req-rs-014, req-rs-015, req-rs-016, req-rs-017, req-rs-018, req-pr-001, req-pr-002, req-pr-003, req-tg-001, req-pr-006, req-pr-007, req-pr-008, req-tg-002, req-tg-003, req-tg-004, req-tg-005, req-tg-006, req-tg-007, req-tg-008, req-tg-009, req-tg-010, req-tg-011, req-tg-012, req-tg-013, req-tg-014, req-tg-015, req-tg-016, req-tg-017, req-tg-018, req-na-001, req-na-002, req-na-003, req-na-004, req-na-005, req-na-006, req-na-007, req-sc-001, req-sc-002, req-sc-003, req-sc-004, req-sc-005, req-sc-006, req-sc-007, req-sc-008 (SHOULD), req-sc-009, req-sc-010, req-sc-011, req-sc-012, req-sc-013, req-sc-014, req-sc-015, req-sc-016, req-cf-001, req-cf-002.

Consumers providing the proposed root-source-replacement capability additionally conform to req-rpl-001, req-rpl-002, req-rpl-003, req-rpl-004.

[req-rg-001] A conforming Registry implementation (reserved for v0.2 wire normativity) MUST serve archive bytes such that the SHA-256 of those bytes equals the digest the Registry advertises for the version, and MUST NOT mutate previously published (name, version) bytes. When a Registry receives a publish request for an (name, version) it has previously served, the Registry MUST either (a) reject the publish request with a diagnostic identifying the existing version, or (b) accept it ONLY if the submitted archive bytes are byte-identical to the previously-served bytes (idempotent republish). A Registry MUST NOT replace the bytes of a previously-served (name, version) under any circumstance. This is the trust anchor on which req-lk-013 and req-rs-009 depend; v0.2 will formalise the surrounding HTTP wire envelope.

req-pl-001, req-pl-002, req-pl-003, req-pl-004, req-pl-005, req-pl-006, req-pl-007, req-pl-008, req-pl-009, req-pl-010, req-pl-011, req-pl-012, req-pl-013, req-pl-014, req-pl-015, req-pl-016, req-pl-017, req-pl-018, req-pl-019, req-pl-020, req-pl-021, req-pl-022.

11.4 Worked conformance examples (informative)

Section titled “11.4 Worked conformance examples (informative)”

A minimal artifact a Producer emits:

apm.yml
name: contoso/security-baseline
version: "2.3.1"
description: Security baseline skills and instructions for contoso projects.
license: MIT
target: [copilot, claude]
dependencies:
apm:
- contoso/common-prompts#^1.0.0

This artifact satisfies req-mf-001, req-mf-002, req-mf-003, req-mf-004, req-mf-005.

A Consumer reading the manifest above produces the lockfile:

lockfile_version: "2"
apm_version: "0.7.0"
dependencies:
- repo_url: github.com/contoso/common-prompts
resolved_commit: "a1b2c3d4e5f6789012345678901234567890abcd"
resolved_ref: "^1.0.0"
constraint: "^1.0.0"
resolved_tag: v1.4.2
resolved_at: "2026-05-10T20:14:00+00:00"
content_hash: "sha256:0102030405060708091011121314151617181920212223242526272829303132"
depth: 1
deployed_files:
- .github/prompts/review.prompt.md
deployed_file_hashes:
.github/prompts/review.prompt.md: "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"

This artifact satisfies req-lk-001, req-lk-002, req-lk-003, req-lk-008, req-lk-011, req-lk-012, req-lk-015, req-lk-016, and (via the resolution that produced it) req-rs-001, req-rs-002.

The following policy chain is evaluated by a Governance implementation; an install that resolves to the lockfile in Section 11.4.2 is accepted (no unbounded direct deps, dependency in contoso/* allow-list) and is written to disk:

name: contoso-baseline
enforcement: block
fetch_failure: block
dependencies:
allow:
- contoso/*
require_pinned_constraint: true
max_depth: 25

This evaluation exercises req-pl-002, req-pl-005, req-pl-007, req-pl-008.

Reserved for v0.2 wire-format normativity. A Registry claiming conformance against the v0.1 trust-anchor requirement (req-rg-001) MUST publish an addendum statement enumerating the immutability guarantees and the digest algorithm served.


Every normative MUST, SHOULD, or MAY statement in this document carries a stable id="req-xxx" anchor immediately preceding the statement. These IDs are the contract between the specification and its conformance suite: the test suite cites IDs, the specification publishes them.

12.2 Hybrid binding (statement-anchored + fixture-anchored)

Section titled “12.2 Hybrid binding (statement-anchored + fixture-anchored)”

This specification adopts a hybrid conformance binding:

  • Statement-anchored: every MUST/SHOULD/MAY carries a req-xxx ID. Conformance-suite tests reference the ID either in a docstring or via a pytest marker (@pytest.mark.req("req-mf-005")).
  • Fixture-anchored: a subset of requirements that lend themselves to black-box file-in / file-out testing (round-trip, malicious archive, merge-table, semver dialect) MUST additionally carry a fixture directory under tests/fixtures/spec-conformance/. The seed fixture tree shipped at spec publication is enumerated in Section 12.4.

A single CI job named Spec conformance is RECOMMENDED. The job:

  1. Treats the HTML requirement anchors (<a id="req-XXX"></a>) in the spec body as the canonical statement list, and treats both the informative machine-readable manifest at docs/public/specs/manifests/openapm-v0.1.requirements.yml (see Section 12.6) and the Appendix C table as derived projections that MUST agree with the canonical anchors. The v0.2 promotion will move the manifest from informative to normative.
  2. Walks the conformance suite for ID references (docstrings, markers, or fixture directory names) and builds the set of referenced IDs.
  3. Fails if any declared ID has zero references (orphan in the spec) or any referenced ID is not declared (orphan in the tests).
  4. As a guard against drift in the non-normative companions, the same job MAY fail when any MUST, SHOULD, or MAY token appears in docs/src/content/docs/reference/** (the companion pages SHOULD NOT carry normative keywords).

[req-cf-002] A Consumer or Producer claiming OpenAPM v0.1 conformance MUST publish a conformance statement (see Section 11.2) that cites the test invocation exercising every req-XXX statement in its declared class against the seed fixture tree under tests/fixtures/spec-conformance/. The conformance statement MUST list, for each req-XXX in scope, the fixture path and the assertion that exercises it.

The conformance seed fixture tree shipped with this specification lives at tests/fixtures/spec-conformance/. Concrete on-disk files:

tests/fixtures/spec-conformance/
README.md
manifest/
valid-minimal.yml
invalid-missing-name.yml
invalid-no-source-key.yml
x-extension-roundtrip.yml
lockfile/
materialization-sort-exclusion.yml
v1-git-only.yml
v2-with-registry.yml
round-trip-unknown-fields.yml
policy/
valid-extends.yml
invalid-extends-cycle.yml
resolution/
semver-dialect.json
source-plan/
req-sc-015.json
native-activation/
req-na-004.json

Conformance-suite expansion (additional fixtures for archive path-traversal, merge-table cases, etc.) tracks here in subsequent revisions; the seed set above is the v0.1 minimum that implementations can run against immediately.

The lockfile fixture materialization-sort-exclusion.yml exercises materialization_repo_url sort-exclusion while v1-git-only.yml exercises transactional spelling migration and collision refusal through the req-lk-022 conformance oracles.

The source-plan/req-sc-015.json oracle describes selected materialized content, source-only content, and excluded symlink files and directories for req-sc-015. A consumer uses the oracle to demonstrate that scanning and materialization share the same authorized source set through both install and re-integration; each lifecycle result matches the oracle’s authorized paths.

The native-activation/req-na-004.json oracle gives previous and next lockfile plugin sets with settings content before an operation, and the settings content and conflict diagnostics expected afterwards, for req-na-004. A consumer uses it to show that it adds only what the next lockfile needs, removes only what the previous lockfile produced, preserves unrelated keys, explicit false values and manual keys under its marketplace name, reports a moved, renamed, or foreign binding instead of deleting it, leaves unparseable settings untouched, and declares a relative path at project scope.

[req-cf-001] A conforming Consumer implementation MUST satisfy an idempotent round-trip on any conforming manifest and lockfile: re-parsing and re-serialising either artifact MUST produce a byte-equivalent file (modulo trailing newline and YAML flow-style cosmetics that the implementation is permitted to canonicalise per Section 4.3.4 and Section 5.2). Unknown top-level keys, x-* extension entries (per req-ext-001, req-lk-014), and fields the implementation does not understand MUST be preserved verbatim across round-trip.

12.6 Machine-readable conformance manifest (reserved for v0.2)

Section titled “12.6 Machine-readable conformance manifest (reserved for v0.2)”

A machine-readable manifest enumerating every normative requirement, its keyword (MUST/SHOULD/MAY), its class, and its associated fixture path is reserved for v0.2. The shape will permit a conformance-suite runner to enumerate requirements without parsing the prose, and will permit cross-implementation result aggregation. v0.1 implementations satisfy the “enumerable requirements” property via the prose anchors and the Appendix C index table.

As of v0.1.1 an informative companion manifest ships at docs/public/specs/manifests/openapm-v0.1.requirements.yml with the shape sketched above (id, keyword, section, conformance_class, plus optional fixture/oracle paths and round-trip carve-outs). The companion is informative and exists to seed the v0.2 normative promotion; it is also the trip wire the spec-conformance CI job uses to detect silent drift between the canonical spec anchors, the Appendix C reader-aid table, and the test marker coverage. Implementations MAY consume it in v0.1 but MUST NOT depend on its presence for normative conformance until v0.2 lifts the reservation.


External documents, tooling, and conformance statements MUST cite this specification using a stable URL. Three shortlinks are provided under the published docs site:

URLResolves toUse when
https://microsoft.github.io/apm/spec/v0.1This document (v0.1)Toolchain or test fixture pin. Versioned URLs are immortal: a versioned URL never moves, never 404s, never redirects to a different version.
https://microsoft.github.io/apm/spec/latestNewest ratified versionHuman citation in prose. Toolchains MUST NOT pin to latest; pin to a versioned URL.
https://microsoft.github.io/apm/specAlias of latestShort prose citation. Same restriction as latest — do not pin tooling.

Each schema’s embedded $id identifies it. Toolchains MUST pin to that URL verbatim; schema files are byte-immortal there for this version’s lifetime. The published manifest-v0.1.schema.json and lockfile-v0.1.schema.json URLs and bytes remain unchanged and available; Appendix A selects this amendment’s distinct resources.

Appendix A. Normative JSON Schemas (inline)

Section titled “Appendix A. Normative JSON Schemas (inline)”

The schemas below define this specification’s normative structural contract.

Planned. Amendment 0.1.48 selects a corrected manifest resource; amendment 0.1.46 selects an independent lockfile resource that adds manifest extensions to the 0.1.41 lockfile contract, and amendment 0.1.60 selects a further lockfile resource that adds target_subset and subset_pairings (req-rs-018) to the 0.1.46 contract, and amendment 0.1.68 selects a lockfile resource that adds version "4" (req-lk-016) to the 0.1.60 contract. All use distinct $id URLs. The earlier v0.1 and 0.1.41 manifest resources and the 0.1.41, 0.1.46 and 0.1.60 lockfile resources remain available with unchanged IDs and bytes. Human approval and the public comment period under Section 9.3 remain pending; listing these URLs does not establish approval or publication.

SchemaAuthoritative source (in-tree)
Manifest (apm.yml)schemas/manifest-v0.1.48.schema.json (JSON Schema 2020-12; proposed).
Lockfile (apm.lock.yaml)schemas/lockfile-v0.1.68.schema.json (JSON Schema 2020-12; proposed).
Policy (apm-policy.yml)schemas/policy-v0.1.schema.json (JSON Schema 2020-12).
Proposed replacement manifestschemas/manifest-source-replacements-v1.schema.json, distinct opt-in candidate, not ratified.
Proposed replacement lock version 3schemas/lockfile-source-replacements-v1.schema.json, distinct candidate, not ratified.
Claude-Code marketplace (informational, emitted output)tests/fixtures/schemas/claude-code-marketplace.schema.json
Claude-Code plugin (informational, emitted output)tests/fixtures/schemas/claude-code-plugin.schema.json

Consumers checking the structural constraints for req-mf-025 can use the 0.1.41 resources (noting their known rejections of valid dependency forms described below) or the corrected 0.1.48 manifest candidate. The latter checks Git subpaths, registry identities and the MCP forms already defined in Sections 4.3.2 and 4.3.6, including req-mf-011 and req-mf-012, in both dependency blocks. Consumers checking dependency source-identity constraints under req-mf-011 and MCP transport obligations under req-mf-012 should validate against the 0.1.48 resource or the prose directly; the older resources reject valid forms for those requirements. Changing prose or upgrading a CLI does not change a cached schema’s bytes. Adopting the new explicit identity requires its publication and a supporting CLI.

The selected 0.1.46 lockfile schema additionally checks the extensions mapping’s key names for req-ext-003; its values remain unconstrained. Validation against older structural schemas does not waive newer prose or runtime requirements.

The replacement resources stage the structural part of proposal 0.1.54. Their semantic constraints (canonical matching, table/evidence agreement, source verification and graph safety) are defined in Section 4.8.1 and exercised against the consumer; schema validation alone does not establish them. No earlier schema URL or bytes are replaced. Offline validators load both candidate resources and their referenced 0.1.48 manifest and 0.1.46 lockfile resources; no network fetch is required.

src/apm_cli/policy/schema.py is a non-normative cross-reference; the policy JSON Schema is authoritative. Manifest and lockfile validation are JSON-Schema-only in v0.1; a reference Python validator MAY be added in a future minor revision without normative effect.

Where a JSON Schema and the prose of this specification disagree, the prose is authoritative and the schema is treated as an errata candidate.


Appendix B. Registry HTTP API (reserved for v0.2)

Section titled “Appendix B. Registry HTTP API (reserved for v0.2)”

The registry HTTP API is non-normative in v0.1.

The companion page registry-http-api.md is informational. v0.2 of this specification will define the wire contract normatively once independent server implementations exist. Until then, conforming Consumers MAY implement the wire contract described in the companion page but MUST NOT claim normative Registry conformance against v0.1, with the single exception of the trust-anchor expectation in req-rg-001.

Reserved for inclusion in v0.2 (sketch only, non-normative in v0.1):

  • Archive container binding on the registry wire (application/gzip over tar, or application/zip, under the identical limits of req-sc-004).
  • Publisher attestation envelope (in-toto / SLSA; binds version to publisher identity; see Section 10.12).
  • Yank / withdrawal semantics (see Section 7.9).

The class slot is reserved so that v0.2 does not require renumbering of conformance classes.


Conditional requirements retain the applicability limits in their bodies. In particular, req-lk-023 applies only to the proposed staged-replacement capability, not every consumer implementation. The consent exception of req-lk-024 applies only to an uninstall the user explicitly consents to on that invocation.

IDKeywordSectionClass
req-mf-001MUST4.1producer
req-mf-002MUST4.1producer
req-mf-003MUST4.1producer
req-mf-004SHOULD4.1producer
req-mf-005MUST4.2.1producer
req-mf-006MUST4.1consumer
req-mf-007MUST4.3.1consumer
req-mf-008MUST4.3.3consumer
req-mf-009MUST4.3.4consumer
req-mf-010MUST4.3.2consumer
req-mf-011MUST4.3.2consumer
req-mf-012MUST4.3.6consumer
req-mf-013MUST4.5consumer
req-mf-014MUST4.2.3producer
req-mf-015MUST4.2.3producer
req-mf-016MUST4.3.5consumer
req-mf-017MUST4.7producer
req-mf-018MUST4.6.1consumer
req-mf-019MUST4.2.4consumer
req-mf-020MUST4.1consumer
req-mf-021MUST4.8producer
req-mf-022MUST4.3.2consumer
req-mf-023MUST4.5consumer
req-mf-024MUST4.3.2consumer
req-mf-025MUST4.3.2consumer
req-mf-026MUST4.5consumer
req-mf-027MUST4.5consumer
req-mf-028MUST4.2.5consumer
req-mf-029MUST4.2.5consumer
req-ext-001MUST4.1consumer
req-ext-002MUST4.1producer
req-ext-003MUST4.6.2consumer
req-lk-001MUST5.1consumer
req-lk-002MUST5.4consumer
req-lk-003MUST5.2consumer
req-lk-004MUST5.4consumer
req-lk-005MUST5.5consumer
req-lk-006MUST5.5consumer
req-lk-007SHOULD5.5consumer
req-lk-008MUST5.6consumer
req-lk-009MUST5.6consumer
req-lk-010MUST5.6consumer
req-lk-011MUST5.2consumer
req-lk-012MUST5.2consumer
req-lk-013MUST5.2consumer
req-lk-014MUST5.2consumer
req-lk-015MUST5.6.4consumer
req-lk-016MUST5.2consumer
req-lk-017MUST5.2consumer
req-lk-018SHOULD5.5consumer
req-lk-019MUST5.2consumer
req-lk-020MUST5.2consumer
req-lk-021MUST5.2consumer
req-lk-022MUST5.2consumer
req-lk-023MUST5.2.1consumer
req-lk-024MUST5.2consumer
req-pl-001MUST6.1governance
req-pl-002MUST6.2governance
req-pl-003MUST6.4governance
req-pl-004MUST6.4governance
req-pl-005MUST6.5governance
req-pl-006MUST6.4governance
req-pl-007MUST6.3.1governance
req-pl-008MUST6.3.1governance
req-pl-009MUST6.6governance
req-pl-010MUST6.2governance
req-pl-011MUST6.1.1governance
req-pl-012MUST6.1.1governance
req-pl-013MUST6.8governance
req-pl-014MUST6.8governance
req-pl-015MUST6.3.5governance
req-pl-016MUST6.8governance
req-pl-017MUST6.8governance
req-pl-018MUST6.3.1governance
req-pl-019MUST6.8.1governance
req-pl-020MUST6.8.1governance
req-pl-021MUST6.1governance
req-pl-022MUST6.1governance
req-rs-001MUST7.2consumer
req-rs-002MUST7.3consumer
req-rs-003MUST7.3consumer
req-rs-004MUST7.5consumer
req-rs-005MUST7.6consumer
req-rs-006MUST7.2consumer
req-rs-007MUST7.3consumer
req-rs-008MUST7.1consumer
req-rs-009MUST7.5.1consumer
req-rs-010MUST7.2consumer
req-rs-011MUST7.7consumer
req-rs-012MUST7.7consumer
req-rs-013MUST7.2consumer
req-rs-014MUST7.3.1consumer
req-rs-015MUST7.5consumer
req-rs-016MUST7.2consumer
req-rs-017MUST7.7consumer
req-rs-018MUST7.4.1consumer
req-pr-001MUST8.2consumer
req-pr-002MUST8.3consumer
req-pr-003MUST8.3consumer
req-pr-004MUST7.8producer
req-pr-005SHOULD7.8producer
req-pr-006MUST8.1consumer
req-pr-007MUST8.1consumer
req-pr-008MUST8.3.1consumer
req-tg-001MUST8.4consumer
req-tg-002MUST8.5consumer
req-tg-003MUST8.5consumer
req-tg-004MUST4.2.1consumer
req-tg-005MUST8.5consumer
req-tg-006MUST8.5consumer
req-tg-007MUST8.5consumer
req-tg-008MUST8.5.3consumer
req-tg-009MUST8.5.1consumer
req-tg-010MUST8.5.4consumer
req-tg-011MUST8.5.5consumer
req-tg-012MUST8.5.6consumer
req-tg-013MUST8.5.7consumer
req-tg-014MUST8.5.8consumer
req-tg-015MUST8.5.1consumer
req-tg-016MUST8.5.9consumer
req-tg-017MUST8.5.9consumer
req-tg-018MUST8.5.10consumer
req-na-001MUST8.5.11consumer
req-na-002MUST8.5.11consumer
req-na-003MUST8.5.11consumer
req-na-004MUST8.5.11consumer
req-na-005MUST8.5.11consumer
req-na-006MUST8.5.11consumer
req-na-007MUST8.5.11consumer
req-sc-001MUST10.4consumer
req-sc-002MUST10.9consumer
req-sc-003MUST10.3consumer
req-sc-004MUST10.5consumer
req-sc-005MUST10.3consumer
req-sc-006MUST4.2.3consumer
req-sc-007MUST10.3consumer
req-sc-008SHOULD10.3consumer
req-sc-009MUST10.13consumer
req-sc-010MUST10.13consumer
req-sc-011MUST10.14consumer
req-sc-012MUST10.14consumer
req-sc-013MUST10.3consumer
req-sc-014MUST10.15consumer
req-sc-015MUST10.16consumer
req-sc-016MUST10.13consumer
req-rg-001MUST11.3.3registry
req-cf-001MUST12.5consumer
req-cf-002MUST12.3consumer
req-rpl-001MUST4.8.1consumer
req-rpl-002MUST4.8.1consumer
req-rpl-003MUST4.8.1consumer
req-rpl-004MUST4.8.1consumer

Total normative statements: 152 (147 MUST, 5 SHOULD).


VersionDateChanges
0.12026-05-10Initial editor’s Working Draft.
0.1-r22026-05-17Round-2 adversarial revision. Closed mandatory FOLDs F1-F10: pinned semver dialect (node-semver + semver 2.0.0); tri-modal transitive conflict resolution; vendor-host neutrality (default_host, pluggable policy discovery, host class via PSL+aliases); hash envelope on every stored hash; canonical git tree-hash definition; mirror-tolerant fetch; producer release contract (tag-version alignment, SHOULD-sign); update operation semantics; lockfile_version monotonicity; reserved-slot prose for 11 deferrals (workspaces, x-* extensions, machine-readable conformance, update —aggressive, frozen-default flip, target registry companion, version yank, attestations, registry HTTP, mirror-tolerance, .agents/ partition); inline JSON Schemas in Appendix A; YAML safe subset; archive container binding; credential redaction. Conformance-statement count: 56 -> 83. Companion seed fixture tree shipped under tests/fixtures/spec-conformance/.
0.1.12026-05-24v1.1 editorial+defensive fold. Closed convergent round-2 followups: Section 12.3 CI-binding MUST-for-claim (req-cf-002); req-mf-019 class reclassification (producer -> consumer); three stale heading labels in req-cf-001 and Appendix E.4; depEntry oneOf source-key requirement plus new fixture manifest/invalid-no-source-key.yml; normative-count reconciliation across Section 1.3, Appendix C trailer, and this row; bare-hex pattern anchored to exactly 64 hex characters; req-sc-007 redaction scope extended to packed bundles, lockfiles, and audit records, plus producer secret-pattern refuse-to-pack rule; workspaces MUST-NOT-use in v0.1 (req-mf-021); nest-mode reject-in-v0.1 (req-rs-013); tag-name regex tightened to the semver.org 2.0.0 reference grammar; build-metadata tie-break rule (req-rs-014); mirror-tolerance editorial note (replicate-verbatim); req-rg-001 cross-references added in Section 7.5.1 and Section 10.5; bare-hex reader-tolerance deprecation horizon; interoperability informative note Section 6.1.2; conformance-summary precedence rule in Section 11.1; wildcard typo x.y.x -> x.y.z; resolved_by worked-example fragment in Section 7.4. Statement count: 83 -> 87. Drift-detection scaffolding lands in-spec and in-tree (informative machine-readable manifest at docs/public/specs/manifests/openapm-v0.1.requirements.yml; 4-way orphan_check + spec-conformance pytest suite + generated CONFORMANCE.{md,json} at repo root); Section 12.3 language updated to identify HTML anchors as the canonical source. No normative count change.
0.1.22026-05-28Round-3 spec-guardian editorial fold (no new normative statements; statement count remains 87). Section 11.3.2 Consumer enumeration appended [req-rs-014] and [req-cf-002] (closing drift vs Appendix C). req-lk-005 extended: writers MUST canonicalise the dependencies list in ascending lexicographic order of (repo_url, virtual_path) so frozen-install diffs are stable across implementations. req-sc-003 extended: consumers MUST drop the originating Authorization header before issuing a cross-host-class redirect (closes the mirror-redirect token-leak surface in Section 10.3). req-rg-001 extended with publish-side idempotency clause: a Registry MUST either reject a republish or accept ONLY if bytes are byte-identical to the previously-served bytes. Section 6.2 + Section 6.3.1 defaults pinned: fetch_failure defaults to warn and dependencies.require_resolution defaults to project-wins (mirrored as advisory "default" annotations in policy-v0.1.schema.json). Manifest schema conflict_resolution enum aligned to prose: renamed intersect -> intersection-pick, dropped nest from the v0.1 enum (nest remains reserved-for-v0.2 per req-rs-013, now noted via schema $comment). Mode B silent-extension detector landed in .github/workflows/spec-conformance.yml and tests/spec_conformance/mode_b_detector.sh; closes the named sole-implementer rot risk by gating PRs that add substantive code under critical paths (primitives/, deps/, policy/, registry/, runtime/, install/, integration/) without a spec citation, with auditable apm-spec-waiver: opt-out.
0.1.32026-06-16Spec-citation fold for the declarable integrity policy keys. Added two governance MUSTs under a new Section 6.8 “Integrity controls”: [req-pl-013] (security.integrity.require_hashes — fail-closed install when a resolved non-local dependency lacks a recorded hash in apm.lock.yaml, or the lockfile is absent/unreadable) and [req-pl-014] (security.audit.fail_on_drift — audit exits non-zero on detected or indeterminate drift). Both keys are default-off and merge by logical OR (tighten-not-relax). Added the non-normative Section 6.3.6 security field reference and two merge-table rows; renumbered the governance conformance trailer 6.8 -> 6.9. Statement count: 87 -> 89 (84 MUST, 5 SHOULD). NOTE: a sibling spec-citation amendment also edits the shared count sites (Section 1.3, Appendix C trailer, this revision history); whichever lands second reconciles the cumulative total and takes the union of the added Appendix C rows.
0.1.42026-06-16Normative addition (semver-zero 0.x minor): added [req-pl-015] (Section 6.3.5, governance MUST) codifying unmanaged-artifact surfacing completeness — a governance implementation evaluating policy over a populated primitive target tree MUST surface every file under a managed primitive target directory that is neither recorded in apm.lock.yaml nor matched by a configured unmanaged_files.exclude glob, each with its unmanaged reason and a supplemental dependency/MCP deny-conflict note where applicable; the inferred primitive type is carried where determinable and omitted otherwise; an excluded path MUST NOT be surfaced even when it also matches a deny pattern. The requirement body is structured as sub-clauses (a)/(b)/(c) so each obligation is individually citable. Added the unmanaged_files.exclude row to the Section 6.4 merge table (additive union, deduplicated, parent order preserved). The requirement governs reporting COMPLETENESS only; enforcement stays governed by unmanaged_files.action. Reconciled with the sibling 0.1.3 amendment (req-pl-013/req-pl-014): cumulative statement count 89 -> 90 (85 MUST, 5 SHOULD); Appendix C carries the union of all three new governance rows.
0.1.52026-06-20Spec-citation fold for the executable primitive approval gate. Added new Section 10.13 “Executable primitive approval gate” with two consumer MUSTs: [req-sc-009] (deny deployment of any hook, bin, MCP server, or canvas extension from a dependency not listed in the effective allowExecutables approval set when the block is present — fail closed) and [req-sc-010] (persist interactive approval decisions user-locally, not in the project apm.yml, so one developer’s approval cannot propagate via VCS to teammates). Added rows 11 and 12 to the Section 10.11 summary table. Section 11.3.2 Consumer enumeration and Appendix C updated. Statement count: 90 -> 92 (87 MUST, 5 SHOULD).
0.1.62026-06-25Spec-citation fold for executable trust precedence and audit fidelity. Added Section 10.14 with two consumer MUSTs: [req-sc-011] (executable trust resolves through one deny-wins precedence; an org executables.deny/deny_all overrides any project or user grant; the install gate and the audit MUST reach the identical outcome via the shared resolver) and [req-sc-012] (a required package’s audit asserts lockfile presence, not executable deployment; a present-but-withheld required package satisfies the presence requirement and surfaces a distinct withheld-executable signal). Added rows 13 and 14 to the Section 10.11 summary table. Section 11.3.2 and Appendix C updated. Statement count 92 -> 94 (89 MUST, 5 SHOULD).
0.1.72026-06-27Spec-citation fold for lockfile inventory metadata (closes the #1888 Mode-B silent-extension gate). Added [req-lk-019] (Section 5.2, consumer MUST): the optional per-entry name and version fields are self-asserted inventory metadata only — preserved on round-trip per [req-lk-011], never a trust anchor, and never an identity, deduplication, or frozen-replay key (identity/replay derive solely from repo_url, resolved_commit, resolved_tag/constraint, and the recorded hash envelopes); their presence is additive and MUST NOT change lockfile_version. Added the name row to the Section 5.2 per-entry field table and broadened the version row note to non-semver sources; added name to the entry $defs in lockfile-v0.1.schema.json (sibling of declared_license). Section 11.3.2 Consumer enumeration and Appendix C updated. Statement count: 94 -> 95 (90 MUST, 5 SHOULD).
0.1.82026-06-29Normative amendment (semver-zero 0.x minor) to [req-lk-012]: redefined the deployed_file_hashes / local_deployed_file_hashes domain from “bytes as written to disk” to the canonical content — UTF-8 text (decodable, no NUL byte) is hashed over its \r\n -> \n normalized form (a lone \r is preserved); binary is hashed raw. This makes the per-deployed-file hash platform-invariant so apm audit --ci no longer reports a false content-integrity drift when a file is checked out with \r\n on Windows (core.autocrlf=true) and \n on POSIX (apm#1952); it harmonizes content-integrity with the drift-replay normalizer. Preserving a bare \r keeps the carriage-return smuggling vector hash-visible. [req-lk-017] reworded to re-verify against the [req-lk-012] canonical domain rather than raw on-disk bytes (consistency, not a new obligation). Migration: lockfiles whose hashes were recorded on Windows before this amendment carry \r\n-domain hashes; one apm install re-records them in the canonical domain. No statement-count change (existing MUST modified, none added); 95 (90 MUST, 5 SHOULD). Subject to the Section 9.3 amendment panel + comment window.
0.1.92026-07-04Spec-citation fold for network-free lockfile replay (closes the srobroek Mode-B silent-extension gate on the lockfile-seeded resolver cache). Added [req-rs-015] (Section 7.5, consumer MUST): a non-update install (not apm update and not --refresh/re-resolution) MUST replay a lockfile entry that records a resolved_commit by reusing that recorded commit as the resolution result without issuing any network ref-resolution — no commits-API query, no git ls-remote, no clone — for that entry, PROVIDED drift detection against the manifest reference does not require re-resolution; on drift or under an explicit apm update/--refresh ([req-rs-011], [req-rs-012]) the consumer MUST re-resolve over the network as usual. The recorded resolved_commit is the lockfile’s resolution anchor ([req-lk-003]); replaying it is scoped to entries recording a resolved_commit WITHOUT a resolved_tag (git-literal and untagged-branch entries per [req-rs-003]), leaves content integrity subject to tree_sha256 ([req-lk-015]) and resolved_hash ([req-lk-013]), and defines drift locally as the manifest ref no longer being character-equal to the lockfile resolved_ref; this makes a warm install of an already-locked reference network-free at the resolution step, extending the reproducible-and-offline resolution guarantee to commit-pinned and branch-tracking entries not covered by the semver-range equivalence of [req-rs-004]. Section 7.11 and Section 11.3.2 Consumer enumerations and Appendix C updated. Statement count: 95 -> 96 (91 MUST, 5 SHOULD). Subject to the Section 9.3 amendment panel + comment window.
0.1.102026-07-04Spec-citation fold for Antigravity native instruction rules (closes the #1984 Mode-B silent-extension gate). Added [req-tg-005] (Section 8.5, consumer MUST): Antigravity instruction rules are deployed under .agents/rules/<name>.md, applyTo is rendered as trigger: glob plus globs (scalar or sequence), and compile-time deduplication only treats expected Antigravity rule filenames as deployed rules so unrelated .md files cannot suppress AGENTS.md content. Added antigravity to the Section 4.2.1 canonical target set and clarified that all excludes explicit-only targets. Statement count: 96 -> 97 (92 MUST, 5 SHOULD).
0.1.112026-07-09Spec-guardian editorial+defensive fold on the Antigravity instruction-rule contract (no new normative statements; statement count remains 97 (92 MUST, 5 SHOULD)). Section 4.2.1: defined the auto-detectable vs explicit-only target taxonomy deterministically (a target is auto-detectable when the OpenAPM Target Registry publishes at least one detection predicate) and rewrote the all expansion to key off it, naming agent-skills and antigravity as the v0.1 explicit-only set (with a Section 8.4 cross-reference). [req-tg-001] extended: a target registered without a detection predicate MUST NOT be auto-detected and MUST be excluded from all, generalising the prior agent-skills-only clause to cover antigravity. [req-tg-005] extended: pinned a canonical globs representation (YAML scalar for exactly one glob, YAML block sequence for two or more, no frontmatter block when applyTo is absent) so deployed-file content hashes are reproducible across implementations; redefined the deduplication scope from “expected Antigravity rule filenames” to filenames derived from the currently-resolved instruction primitives recorded in apm.lock.yaml and the manifest, closing a fail-open interpretation where an unrelated .agents/rules/*.md file could suppress AGENTS.md content; lowercased the antigravity identifier and added an editorial note scoping the normative citation of the concrete deploy path. [req-tg-002] subdirectory-partition list updated to include .agents/rules/. No normative count change.
0.1.122026-07-10Spec-citation fold for inactive-target lockfile reconciliation. Added [req-lk-020] (Section 5.2, consumer MUST): a non-frozen rewrite with a declared target set preserves paths attributable to current, another declared, or implementation-recognized targets that activate outside the manifest; removes prior paths attributable to none of them; applies the same decision to per-entry and top-level deployed-file lists and hash maps; and preserves prior paths when no target set is declared or attribution is indeterminate. Statement count: 97 -> 98 (93 MUST, 5 SHOULD).
0.1.132026-07-14Defensive clarification of existing lockfile requirements (no new normative statements; statement count remains 98 (93 MUST, 5 SHOULD)). [req-lk-003] now requires a conformance audit to reject disagreement between a full-SHA manifest pin and resolved_commit. [req-lk-020] now preserves paths freshly deployed by an active dependency when orphan cleanup encounters the same path under a prior dependency identity.
0.1.142026-07-15Spec-citation fold for complete repository identity through resolution and materialization (closes #2191). Added [req-rs-016] (Section 7.2, consumer MUST): repository identity includes normalized host, explicit port, and the complete credential-free repository path; distinct identities MUST NOT share cached source material merely because they use the same ref or a common path prefix; identical identity and ref MAY reuse cached source material. Section 7.11 and Section 11.3.2 Consumer enumerations and Appendix C updated. Statement count: 98 -> 99 (94 MUST, 5 SHOULD).
0.1.152026-07-15Spec-citation fold for lossy agent target conversion (closes the #2181 Mode-B silent-extension gate). Added [req-tg-006] (Section 8.5, consumer MUST): target-native agent conversion either preserves source-declared capability restrictions exactly or emits a default-visible, actionable diagnostic naming the source agent, each discarded field, and the broader-access risk before the overall operation returns; malformed or non-mapping frontmatter receives an unverifiable-restriction diagnostic. The requirement does not define a target-native restriction encoding or mandate a nonzero exit status. Statement count: 99 -> 100 (95 MUST, 5 SHOULD).
0.1.162026-07-17Spec-citation fold for dropped-target merge-hook reconciliation (closes the #2253 Mode-B silent-extension gate). Added [req-lk-021] (Section 5.2, consumer MUST): extends [req-lk-020]‘s target-reconciliation preserve/remove decision to merge-based hook configuration and its ownership record, since that state is deliberately outside deployed_files/local_deployed_files tracking and so was never reachable by req-lk-020’s literal text — narrowing a project’s declared target set now also reconciles the dropped target’s consumer-owned merge-hook entries, while preserving entries not carrying consumer ownership and preserving state for targets still attributable per req-lk-020’s own (a)-(c) test. Section 11.3.2 Consumer enumeration and Appendix C updated. Statement count: 100 -> 101 (96 MUST, 5 SHOULD).
0.1.172026-07-17Spec-citation fold for deployment-ledger owner integrity (closes the PR #2292 Mode-B silent-extension gate on the policy engine and audit exit contract). Added [req-pl-016] (Section 6.8, governance MUST): a canonical deployment-ledger owner that does not resolve to a dependency entry in apm.lock.yaml is a hard integrity failure, independent of security.audit.fail_on_drift; an audit MUST exit non-zero in BOTH default and CI modes when such a stale ownership record is present, MUST NOT mutate deployed bytes (for example under strip) while ownership is invalid, and MUST name each affected locator with its invalid owner(s) plus one reconcile-ownership remediation. Explicitly distinguished from ordinary deployed-file drift, which stays advisory in default mode per [req-pl-014]; a durable ownership record is not a file edit, so its staleness surfaces unconditionally. Reconciled the Section 6.9 and Section 11.3.4 governance enumerations (the latter also gained the previously-missing [req-pl-015] row). Section 1.3 and Appendix C count sites updated. Statement count: 101 -> 102 (97 MUST, 5 SHOULD).
0.1.182026-07-17Spec-citation fold for project-scope post-install compilation guidance (closes #2057). Added [req-tg-007] (Section 8.5, consumer MUST): after a non-dry-run project install adds a package, a consumer that finds dependency instruction primitives for an active root-context compilation target emits a default-visible diagnostic naming the follow-up compile operation and root context output class. The diagnostic is suppressed for dry runs, no-op installs, trees without dependency instructions, and target sets that deploy instructions as native per-file rules. Section 8.7 and Section 11.3.2 Consumer enumerations and Appendix C updated. Statement count: 102 -> 103 (98 MUST, 5 SHOULD).
0.1.192026-07-18Spec-citation fold for stale persisted skill subsets (closes #2116). Added [req-mf-022] (Section 4.3.2, consumer MUST): when a non-empty manifest skills: subset matches no available skill in a dependency that exposes selectable skills, the consumer emits a default-visible diagnostic naming the dependency plus the requested and available skill names before install returns; the diagnostic does not by itself require a nonzero install status. Section 11.3.2 Consumer enumeration and Appendix C updated. Statement count: 103 -> 104 (99 MUST, 5 SHOULD).
0.1.202026-07-30Defensive amendment of [req-lk-006] (no new normative statement; count remains 104 (99 MUST, 5 SHOULD)): frozen validation now covers direct MCP server names and configurations as well as package pins, runs before lockfile, target-config, deployment, or cache mutation, and rejects manifest dependency mutation.
0.1.212026-07-31Spec-citation fold for package-declared target restrictions (closes #2321 Mode-B silent-extension gate). Added [req-tg-008] (Section 8.5.3, consumer MUST): a consumer MUST treat a package’s declared target:/targets: field as a restriction-only filter on all target-scoped primitive integration; if the field resolves to a non-empty set that does not contain all, the consumer MUST NOT deliver that package’s primitives to any active integration target not in the declared set; the filter composes by intersection with the consumer-side per-dependency targets: filter and can only narrow, never expand. Section 8.7, Section 11.3.2 Consumer enumeration, and Appendix C updated. Statement count: 104 -> 105 (100 MUST, 5 SHOULD).
0.1.222026-07-31Spec-citation fold for deterministic configured-host credential isolation (closes #2338). Added [req-sc-013] (Section 10.3, consumer MUST): a consumer selects one effective host class before credential resolution, applies documented deterministic precedence when configuration signals overlap, exposes only credentials belonging to the selected class to requests and child processes, and preserves an explicit non-default port in both transport and credential scope. Clarified [req-sc-005] so this configured override is not prohibited by its default host-class collapse rule. Section 1.3, Section 10.11, Section 11.3.2 Consumer enumeration, and Appendix C updated. Statement count: 105 -> 106 (101 MUST, 5 SHOULD).
0.1.232026-07-31Spec-citation fold for case-preserving dependency materialization (closes #2347). Added [req-lk-022] (Section 5.2, consumer MUST): a consumer that case-folds repository identity but retains different source spelling records materialization_repo_url, validates it maps to the same canonical identity, excludes it from identity/cache/sort/trust decisions, preserves exact virtual-path casing, and either transactionally migrates one stale case variant or fails closed without deleting colliding paths. Defined rollback semantics for case-only rename and preserved interrupted recovery state. Added the field to the lockfile schema and conformance fixture, plus migration and collision conformance oracles. Hardened lockfile schema: repo_url now carries minLength: 1 to match the prose requirement that git-sourced entries provide a non-empty canonical identifier (req-lk-003). Section 5.7, Section 10.11, Section 11.3.2, and Appendix C updated. Statement count: 106 -> 107 (102 MUST, 5 SHOULD).
0.1.242026-08-03Spec-citation fold for fail-closed Kiro agent vocabulary gate (closes #2089 Mode-B silent-extension gate). Added [req-tg-009] (Section 8.5.1, consumer MUST): a consumer deploying an agent primitive into a target with a fixed, enumerable capability vocabulary MUST fail closed — writing zero bytes and emitting an actionable diagnostic — if any source-declared tool falls outside the approved set; the gate fires per agent independently and does not block vocabulary-conformant sibling agents; the gate applies only to targets included in the effective intersection under [req-tg-008]; content-identity fast-paths are not exempt. Added editorial note naming the Target Registry companion as the vocabulary authority and mandating version-pinning for conformance testing. Section 8.7, Section 11.3.2 Consumer enumeration, and Appendix C updated. Statement count: 107 -> 108 (103 MUST, 5 SHOULD).
0.1.252026-08-03Spec-citation fold for portable project-scoped Claude hooks (closes #2408 Mode-B silent-extension gate). Added [req-tg-010] (Section 8.5.4, consumer MUST): a project-scoped native hook that may launch outside the consumer project anchors its generated command through the target portable project-directory environment variable, preserves the relative hook path, executes successfully when the variable identifies the consumer project, and never embeds an absolute checkout path; shell-expansion path syntax is rejected. Claude uses CLAUDE_PROJECT_DIR in POSIX and $env:CLAUDE_PROJECT_DIR in PowerShell. Section 8.7, Section 11.3.2 Consumer enumeration, and Appendix C updated. Statement count: 108 -> 109 (104 MUST, 5 SHOULD).
0.1.262026-08-03Spec-citation fold for VS Code OCI/Docker MCP runtime argument resolution (closes #2438). Added [req-mf-023] (Section 4.5, consumer MUST): a non-secret runtime variable resolves every {name} occurrence across package runtime and package arguments, an unresolved template is never written literally, and package-scoped secret metadata uses VS Code secret-input references instead of generated config bytes. Section 4.9, Section 11.3.2, and Appendix C updated. Statement count: 109 -> 110 (105 MUST, 5 SHOULD).
0.1.272026-08-03Spec-citation fold for object-form registry identity preservation on CLI-driven manifest updates (closes the PR #2166 Mode-B silent-extension gate). Added [req-mf-024] (Section 4.3.2, consumer MUST): a consumer MUST NOT silently rewrite an existing id:-form (registry-sourced) manifest entry into a git:-form entry when persisting a subsequent CLI-driven update (e.g. an additive --skill pin) for the same dependency identity; when a CLI-parsed reference is ambiguous about its source but an existing manifest entry for the same identity already resolves to the registry source, the existing entry’s source MUST be honored, and an update that would otherwise replace a registry-sourced entry with a non-registry-shaped entry MUST be rejected with a diagnostic naming the identity. Section 4.9 and Section 11.3.2 Consumer enumerations and Appendix C updated. Statement count: 110 -> 111 (106 MUST, 5 SHOULD).
0.1.282026-08-06Spec-citation fold for per-invocation executable consent in non-interactive contexts (closes #1620 Mode-B silent-extension gate). Added [req-sc-014] (Section 10.15, consumer MUST): a consumer that supports a per-invocation consent flag for bin/ executable deployment MUST deny deployment by default when stdout is not a TTY, unless the operator has explicitly opted in for that invocation; an explicit opt-in overrides the non-interactive default and permits deployment; an explicit opt-out overrides the default and denies deployment even in a terminal; the allowExecutables policy gate [req-sc-009] is evaluated first and always takes precedence. Added row 19 to the Section 10.11 summary table. Section 11.3.2 Consumer enumeration and Appendix C updated. Statement count: 111 -> 112 (107 MUST, 5 SHOULD).
0.1.292026-08-22Spec-citation fold for the Agent Plugins v1 native-lifecycle deployment boundary (closes #2522 Mode-B silent-extension gate). Added [req-tg-011] (Section 8.5.5, consumer MUST): a consumer treats a schema-bearing Agent Plugins v1 dependency as opaque to legacy primitive projection and requires an applicable target-native lifecycle for deployment. The original boundary wording was refined by 0.1.35 to permit acquisition, materialization, and lock recording before a dependency-scoped deployment skip, while ordinary dependencies in the same install remain eligible for deployment and --dry-run reports the same decision without mutation. Section 8.7 and Appendix C updated. Statement count: 112 -> 113 (108 MUST, 5 SHOULD).
0.1.302026-08-23Spec-citation fold for plugin-root hook command resolution (closes #2639 Mode-B silent-extension gate). Added [req-tg-012] (Section 8.5.6, consumer MUST): a consumer that resolves plugin-root placeholders treats a matching quoted placeholder followed by an outside path separator equivalently to the fully quoted path, preserves balanced expandable quoting, and emits a default-visible diagnostic instead of silently deploying any supported placeholder that remains unresolved. Section 8.7, Section 11.3.2, and Appendix C updated. Statement count: 113 -> 114 (109 MUST, 5 SHOULD).
0.1.312026-08-23Spec-citation fold for Azure DevOps organization-policy discovery. Added [req-pl-017] (Section 6.8, governance MUST): discovery uses apm/apm-policy first and can use legacy _apm/_apm only after an HTTP 404; all non-404 failures stop without fallback, and a successful legacy fallback emits one actionable migration warning. Section 6.9, Section 11.3.4, and Appendix C updated. Statement count: 114 -> 115 (110 MUST, 5 SHOULD).
0.1.322026-08-23Spec-citation fold for authoritative legacy plugin skill declarations (closes #2537). Added [req-pr-006] (Section 8.1, consumer MUST): omitted skills alone enables conventional discovery; a string or list replaces discovery; explicit empty, invalid, escaping, symlinked, and duplicate-derived entries contribute no skills; declared containers contribute only immediate child skills; and only resulting names are eligible for enumeration, selection, or deployment. Section 8.7, Section 11.3.2, Appendix C, and conformance coverage updated. Statement count: 115 -> 116 (111 MUST, 5 SHOULD).
0.1.332026-08-23Spec-citation fold for authorized pre-deployment scan scope (closes #2490 Mode-B silent-extension gate). Added [req-sc-015] (Section 10.16, consumer MUST): a consumer derives one post-authorization source-file set for every install and uninstall re-integration materialization lifecycle; excludes symlink files and does not traverse symlinked directories; scans and materializes only that set; rejects a selected blocking finding before a source-derived target write; and does not scan or materialize source-only package files. Added row 20 to the Section 10.11 summary table. Reconciled with concurrent [req-pl-017] and [req-pr-006] and retained all amendments. Section 1.3, Section 11.3.2, and Appendix C updated. Statement count: 116 -> 117 (112 MUST, 5 SHOULD).
0.1.342026-08-25Spec-citation fold for root-declared Plugin component staging containment (closes #2556). Added [req-pr-007] (Section 8.1, consumer MUST): a consumer canonicalizes the non-symlink component-source root and prunes the current operation’s materialization subtree before traversal. Section 8.7, Section 11.3.2, Appendix C, and conformance coverage updated. Statement count: 117 -> 118 (113 MUST, 5 SHOULD).
0.1.352026-08-27Stale-spec (Mode C) amendment recording a machine-verifiable native Agent Plugins lifecycle. Added [req-tg-013] (Section 8.5.7, consumer MUST): schema, effective-target, integrity, security, and executable admission drives one aggregate direct-plus-transitive registration per scope without locating, invoking, or version-checking a host binary during lifecycle operations; packages remain materialized in place and opaque to legacy projection; direct dependencies win plugin-name collisions over transitive dependencies, same-precedence collisions fail, and recorded ownership does not silently repoint to a transitive claimant; a consumer-owned marketplace identifier and activation suffix are reserved only with the exact generated directory-marketplace entry; the ownership record is primary evidence, while missing-record recovery may re-adopt only that exact entry and reconcile the reserved namespace; foreign collisions and invalid JSON fail closed; unrelated JSON values are preserved semantically though stable serialization may reformat them; and catalog, ownership-record, and settings writes form one rollback unit. Revised [req-tg-011] to clarify that acquisition, materialization, and lock recording may precede target exclusion, which creates no target registration or primitive projection and does not block ordinary dependencies in the same batch. Compatibility is qualified at release or build time by the pinned real-host lifecycle suite; runtime availability is the operator’s responsibility. Added the native plugin namespace and ownership-recovery threat to Section 10. Section 8.7, Section 11.3.2 Consumer enumeration, Appendix C, and conformance coverage updated. Statement count: 118 -> 119 (114 MUST, 5 SHOULD).
0.1.362026-08-29Editorial and defensive alignment for [req-tg-011] and [req-tg-013]. Named the [req-tg-008] result as the effective target intersection; scoped aggregate registration and plugin-name claimant selection to dependencies that passed admission; required target contraction to retire consumer-owned native registration; required advisory uninstall, prune, and restore reconciliation to omit ambiguous or changed-owner plugin entries without blocking cleanup; restored exact removal boundaries; defined directory-marketplace entries; and added reserved namespace disclosure to Section 11.2. Added conformance coverage for direct-owner promotion, advisory collision cleanup, and transitive owner-repoint refusal. Statement count remains 119 (114 MUST, 5 SHOULD).
0.1.372026-09-01Spec-citation fold for safe full-SHA revision-pin updates (closes #2511 Mode-B silent-extension gate). Added [req-rs-017] (Section 7.7, consumer MUST): a consumer extension may replace a full commit pin only with the peeled commit of the highest eligible non-prerelease annotated tag, including 0.x; no eligible tag retains the current commit and allows unrelated updates to continue; malformed, ambiguous, or failed remote tag resolution stops before manifest or lockfile writes. Revised [req-rs-011], [req-rs-012], and [req-rs-015] for bounded manifest rewrite, scoped operation, advisory tag provenance, and network-free replay. Section 5.2, Section 5.6, Section 7.11, Section 11.3.2, Appendix C, and conformance coverage updated. Statement count: 119 -> 120 (115 MUST, 5 SHOULD).
0.1.382026-09-01Defensive amendment of [req-lk-005] (no new normative statement; count remains 120 (115 MUST, 5 SHOULD)): generated_at is optional advisory metadata, new lockfiles omit it by default, and later writes preserve an existing omission unless explicitly configured otherwise.
0.1.392026-09-01Spec-citation fold for user-scoped direct MCP target selection (closes #2548 Mode-B silent-extension gate). Added [req-tg-014] (Section 8.5.8, consumer MUST): explicit selection, the user-scope manifest, configured user default, and user-scope runtime discovery form one precedence chain; project-only signals cannot constrain final discovery; and a selected set with no user-capable runtime fails before user manifest, lockfile, or target-config mutation. Section 8.7, Section 11.3.2, and Appendix C updated. Statement count: 120 -> 121 (116 MUST, 5 SHOULD).
0.1.402026-09-07Spec-citation fold for dependency-policy identity casing in PR #2706. Added [req-pl-018] (Section 6.3.1, governance MUST) and extended [req-rs-016] clause (3): dependency allow, deny, and exact require operands use the documented per-host repository case rule, while registry-sourced repository coordinates are case-insensitive regardless of host; case normalization is ASCII-only, is bounded identically on both operands, stops at recursive-glob ambiguity, and does not cross virtual-path, ref, registry-name, MCP-name, unmanaged-path, or case-sensitive host/source boundaries; deny precedence is unchanged. Defined the policy glob grammar, documented byte-exact Section 6.4 merge behavior, and added the threat mapping. Classified this as a non-breaking correction of previously unspecified evaluation behavior under Section 9.2: existing lowercase workarounds remain matching; on registry sources and hosts documented as case-insensitive, case-variant allow entries can newly match, deny entries can newly enforce, and exact require entries can newly be satisfied, so those policies should be re-audited. Sections 1.3, 6.3.1, 6.3.5, 6.4, 6.5, 6.9, 7.2, 9.2, 10.8, 10.11, 11.2, and 11.3.4, Appendix C, and conformance coverage updated. Statement count: 121 -> 122 (117 MUST, 5 SHOULD).
0.1.412026-09-09Alias containment and lock-replay contract for PR #2901. Added [req-mf-025] (Section 4.3.2, consumer MUST), the optional lock-entry alias field, and conformance coverage. Under Section 9.2 this is an additive optional field and a defensive definition of previously unspecified alias behavior, not behavior-neutral errata: unsafe or reserved aliases can newly fail; valid dotted aliases remain accepted; surrounding whitespace is canonicalized; recorded aliases determine replay placement; absent aliases retain the unaliased layout. Source identity and permitted local source paths are unchanged. Older readers preserving the unknown field do not thereby implement placement support. Selects distinct 0.1.41 schema publication identities without changing published v0.1 URLs or bytes; Section 9.3 remains pending (see Appendix A). Sections 1.3, 4.9, 5.2, 10.7, 10.11, 11.3.2, and Appendix C updated. Statement count: 122 -> 123 (118 MUST, 5 SHOULD).
0.1.42 (proposed)2026-09-30Optional deployed-prompt audit capability for PR #2962. Added conditional governance [req-pl-019] and [req-pl-020] in Section 6.8.1, both enumerations, Appendix C, requirements manifest and behavioral conformance coverage. Under Section 9.2 this is a new opt-in conformance capability, not behavior-neutral errata or a reinterpretation of an existing obligation: implementations not claiming it acquire no new required feature. APM claims it; newly discovered prompt findings and incomplete native coverage can newly fail default and CI audits, command-only content remains non-failing, and protected remediation is refused before writes. No schema, lockfile version, existing mandatory feature, drift-policy or ownership rule changes. Section 9.3 reviewer approvals and public comment period remain pending; this proposal is not evidence of adoption. Statement count: 123 -> 125 (120 MUST, 5 SHOULD).
0.1.43 (proposed)2026-10-03Codex-native agent model preservation and bounded dropped-metadata diagnostic for PR #3150 (closes #3126). Added [req-tg-015] (Section 8.5.1, consumer MUST): a conforming consumer providing the Codex-native agent conversion capability MUST preserve a source-declared model or model_reasoning_effort string value in its native top-level placement, MUST leave either field absent when absent from the source, MUST diagnose a non-string value by field name without including that value, and MUST emit a diagnostic bounded on both dropped-field count and per-field name length (never the value) for any other dropped, non-capability-restriction frontmatter field. Under Section 9.2 this is a new opt-in conformance capability scoped to consumers providing the Codex-native agent conversion capability, not behavior-neutral errata: it does not require or imply preservation of any other config.toml-native key and does not define behavior for any other conversion target. Implementations not providing Codex-native agent conversion acquire no new required feature. No schema, lockfile version, existing mandatory feature, drift-policy or ownership rule changes. Section 9.3 reviewer approvals and public comment period remain pending; this proposal is not evidence of adoption. Section 8.7, Section 11.3.2, and Appendix C updated. Statement count: 125 -> 126 (121 MUST, 5 SHOULD).
0.1.44 (proposed)2026-10-03PR #3149 adds two consumer MUSTs in Section 8.5.9: req-tg-016 rejects unsupported Cursor hook vocabulary; req-tg-017 detects overlap with Claude imports before either install order writes, preserving import settings. These cite the accepted Cursor capability, not universal translation or a new mandatory feature (Section 9.2). Section 8.7, Section 11.3.2 and Appendix C are updated. Section 9.3 reviewer approvals and public comment remain pending; this proposal is not adopted. Statement count: 126 -> 128 (123 MUST, 5 SHOULD).
0.1.45 (proposed)2026-10-09Editorial fold for PR #3106 (closes #3083 Mode-B silent-extension gate; no new normative statement, count remains 128 (123 MUST, 5 SHOULD)). Section 4.2.1 and [req-tg-001] (Section 8.4): the explicit-only target enumeration now names agent-skills, antigravity, hermes, and grok-bot, reflecting the already-registered hermes target and the new stable explicit-only grok-bot target (skills deploy to agent-data/workflows/, per the OpenAPM Target Registry v0.1 companion).
0.1.46 (proposed)2026-10-13Spec-citation fold for manifest extension keys (closes #3219 Mode-B silent-extension gate). Added [req-ext-003] (Section 4.6.2, consumer MUST): top-level keys matching x-[a-z][a-z0-9-]* are vendor extensions preserved on the parsed package in declaration order without validating or interpreting values; a dependency lock entry records them under optional extensions and omits that field when empty; any other unrecognised top-level key produces a non-failing warning without failing parse or install solely because it is unknown. Independent validation, policy, and security failures still apply. The warning does not relax [req-mf-006] (writers still preserve unknown top-level keys on rewrite). Additive optional lockfile field under Section 9.2: previously silent unknown keys now warn. extensions added to the Section 5.2 field table and selected through the distinct proposed lockfile-v0.1.46.schema.json; earlier schema bytes and lockfile_version are unchanged. Sections 1.3, 4.9, and 11.3.2, and Appendices A and C updated. Statement count: 128 -> 129 (124 MUST, 5 SHOULD). Section 9.3 reviewer approvals and public comment remain pending; this proposal is not adopted.
0.1.47 (proposed)2026-10-15Amendment for accepted issue #3204. Revised [req-mf-022] to require a nonzero install result and preservation of previously deployed skill files and ownership records for an unmatched non-empty persisted selection. This intentionally replaces permitted warning-only success; it is not behavior-neutral errata. Section 9.3 review and public-comment requirements remain pending; issue-scope acceptance is not specification adoption. Statement count remains 129 (124 MUST, 5 SHOULD).
0.1.48 (proposed)2026-10-21Schema correction candidate for issue #3223; existing prose requirement text (req-mf-011, req-mf-012) and statement count are unchanged. The structural validator validation outcomes change as described below. Selects a distinct manifest resource for Sections 4.3.2, 4.3.6 and 4.4. Compared with the old structural validators, Git plus subpath, registry ID plus registry/version, registry MCP objects and valid self-defined MCP objects can newly pass; incomplete registry identities, empty source fields, invalid MCP field types and missing transport/command/URL or whitespace-command violations can newly fail. Git/id conflicts remain rejected. These are observable validator changes, not behavior-neutral schema errata under Section 9.4. The old v0.1 and 0.1.41 URLs, IDs and bytes remain unchanged; no field or feature is removed from the prose contract. Existing requirements, statement count (129: 124 MUST, 5 SHOULD), working-draft behavior and runtime safeguards are unchanged. Section 9.3 non-author review and the subsequent 14-day public comment period remain pending; product scope acceptance is not ratification. Section 9.2 classification of this correction is pending human determination under the Section 9.3 amendment process. In-tree selection proves neither public deployment nor released CLI support.
0.1.52 (proposed)2026-10-21Accepted Windows staging-recovery behavior for issue #3293 / PR #3318. Adds conditional consumer req-lk-023, Section 5.2.1: retain original and secondary failures, recover prior state where permitted, preserve residual prior data under denied restoration, protect active/unknown staging and retry with a fresh candidate, and never undo a committed replacement because backup disposal failed. This is a new recovery obligation under Section 9.2, not behavior-neutral errata. No schema, lockfile version, privilege, or arbitrary lifecycle-script rollback change. Section 9.3 review and public comment remain pending; source landing and conformance tests do not establish adoption or release. Statement count: 129 -> 130 (125 MUST, 5 SHOULD).
0.1.53 (proposed)2026-10-21Amendment for accepted issue #3202 in PR #3314. Added req-pr-008 (Section 8.3.1, consumer MUST): default refusal of a differing unmanaged skill file checks the complete effective selected plan before native deployment, success-state persistence or cleanup; preserves prior bytes and ownership; and provides truthful read-only audit and nondestructive correction. Warning/success becomes refusal, a new hard conformance obligation rather than errata. Identical-content recovery, existing explicit destructive replacement, managed-source priority, native-plugin and non-skill/MCP policies remain outside this change. No schema or lockfile-version change. Section 9.3 review/public comment and applicable Section 9.5 migration remain pending, not waived; no ratification or release is claimed. Sections 1.3, 8.7, 10.11, 11.3.2, Appendix C, requirements manifest and conformance test binding updated. Statement count: 129 -> 130 (125 MUST, 5 SHOULD).
0.1.54 (proposed)2026-10-21Opt-in root source-replacement proposal for #3180 / PR #3309. Added four conditional consumer requirements [req-rpl-001] through [req-rpl-004] for exact root-owned graph binding, original ownership with selected-source lifecycle/security, proposed lock version 3 evidence, and frozen full-table/content verification. Distinct candidate schema identities preserve earlier published bytes; version 1/2 semantics remain unchanged. This is a new opt-in capability and explicit versioned lock extension, not behavior-neutral errata. Section 9.3 review/public comment and first supporting release remain pending; source staging is not adoption. Statement count: 130 -> 134 (129 MUST, 5 SHOULD).
0.1.55 (proposed)2026-10-21Spec-citation fold for PR #3230 (closes #3195 Mode-B silent-extension gate on policy discovery). Added req-pl-021 (Section 6.1, governance MUST): when an explicit --policy <ref> names a concrete policy source that cannot be resolved, fetched, or parsed into a valid policy, the governance operation terminates non-zero with a diagnostic naming the ref and cause; it does not fall back to discovery, proceed without policy, or honour a relaxing fetch_failure default. A valid stale-cache policy still counts as resolved; an operator-level enforcement-disable switch is out of scope but must be disclosed in diagnostics. Under Section 9.2 this defines previously unspecified failure behaviour for the existing req-pl-001 explicit-ref path: explicit refs that previously passed with enforcement skipped now fail; discovery, fetch_failure semantics for discovered policy, and install behaviour are unchanged. Sections 6.1, 6.9, 11.3.2 and Appendix C are updated. Section 9.3 reviewer approvals and public comment remain pending; this proposal is not adopted. Adds one MUST.
0.1.56 (proposed)2026-11-10Amendment for accepted issue #3472. Revised req-tg-005 (Section 8.5, consumer MUST) to match Antigravity’s documented rule schema: globs is now one double-quoted, comma-separated string for one or many applyTo patterns (never a YAML sequence, which Antigravity rejects), and an instruction without applyTo now carries trigger: always_on frontmatter instead of no frontmatter (Antigravity discards rule files without a valid trigger). This intentionally replaces the 0.1.11 scalar-versus-sequence and no-frontmatter representations; it is not behavior-neutral errata. Deployed-rule filenames and compile-time deduplication scope are unchanged. Keyword, section and conformance class are unchanged, so the Appendix C row and the requirements manifest entry are unchanged; no new normative statement, count remains 136 (131 MUST, 5 SHOULD). Other targets’ rule formats are unaffected. The revision also pins the zero-pattern boundary, the per-pattern re-encoding and the frontmatter byte layout. Under Section 9.2 this changes an already-defined emitted target representation, not a manifest, lockfile or policy field; the replaced representations were refused or discarded by the target, so no working deployment relied on them. Migration: deployed bytes, and therefore [req-lk-012] deployed_file_hashes, change for .agents/rules/*.md files whose applyTo resolves to zero patterns or to two or more patterns, and for single-pattern rules containing a literal backslash or a top-level literal comma; other single-pattern rules are byte-identical. One non-frozen apm install re-renders affected files and re-records their hashes; [req-lk-006] and [req-lk-017] are unchanged by this amendment. Section 9.3 review/public comment and applicable Section 9.5 migration remain pending, not waived.
0.1.57 (proposed)2026-11-12Spec-citation fold for PR #3377 (closes the #3252 Mode-B silent-extension gate on MCP install and ownership). Added req-mf-026 (Section 4.5, consumer MUST): a project-scoped Claude Code .mcp.json keeps ${VAR} references (with ${env:VAR} written as ${VAR}) in command, args, env, url and headers instead of resolved values, and keeps static values and ${VAR:-default} as declared. An existing entry holding values where the rendered server has references is replaced only when the consumer can show it wrote it (recorded native write hash, or exact expansion of the declared references from the current environment); otherwise it is left unchanged, the install fails, and the diagnostic names the affected fields. Diagnostics name variables and fields, never values. User scope keeps install-time resolution. The Section 4.5 dispatch matrix rows for ${VAR} and ${env:VAR} point to the new requirement. Under Section 9.2 this changes generated bytes for the Claude Code project target only. Sections 4.5, 4.9, 11.3.2 and Appendix C are updated. Section 9.3 review and public comment remain pending; this proposal is not adopted. Adds one MUST. Statement count: 136 -> 137 (132 MUST, 5 SHOULD).
0.1.58 (proposed)2026-11-12Amendment for accepted issue #1744 in PR #2030. Added req-tg-018 (Section 8.5.10, consumer MUST): at project and user scope, a Cursor instruction whose normalized applyTo is exactly one universal ** pattern (scalar, padded scalar, or single-item sequence) emits alwaysApply: true with no globs; every other non-empty set, including ** mixed with scoped patterns, keeps globs and never alwaysApply; absent, empty, or null applyTo emits neither key. Under Section 9.2 this changes generated bytes for the Cursor target only: rules previously emitted as globs: ** are replaced on reinstall. No source frontmatter field, scoped-glob serialization, or other target changes. Sections 1.3, 8.7, 11.3.2 and Appendix C, the requirements manifest and conformance test binding are updated. Section 9.3 review and public comment remain pending; this proposal is not adopted. Adds one MUST.
0.1.59 (proposed)2026-11-12Amendment for accepted issue #3509 in PR #3606. Revised req-pl-018 (Section 6.3.1, governance MUST) in place with clause (g): a dependencies.allow or dependencies.deny pattern whose first segment contains U+002E and does not begin with it is host-qualified and matches only when the dependency’s effective host (written host, or the implementation-default host), after port and trailing-dot removal and ASCII case folding, equals the named host. Hostless patterns still match every host; dependencies.require is unchanged. Updated the Section 6.3.1 table, the source-replacement policy sentence, the Section 10.8 note and the requirements-manifest notes. No new normative statement; count unchanged at 138 (133 MUST, 5 SHOULD). Subject to the Section 9.3 amendment panel + comment window.
0.1.60 (proposed)2026-11-17Amendment for accepted issue #3763. Added req-rs-018 (new Section 7.4.1, consumer MUST): when several edges reach one dependency, its deployment selection is the union over edges of each edge’s skills x targets product; omitting an axis selects all for that edge; the result and its lock entry are independent of declaration order, discovery order and depth, with no first-wins or last-wins choice; skill_subset and target_subset record the unions and a new optional subset_pairings lock field records the exact per-target selection in a canonical form, only when the two flat fields would over-select; a malformed or inconsistent subset_pairings value is invalid lock state; and frozen install fails, naming the dependency, when the derived selection differs from the recorded one. Under Section 9.2 this defines previously unspecified merge behavior, not behavior-neutral errata: a consumer that kept one edge’s subsets, or unioned each field independently, now deploys different skills for divergent diamonds, and a frozen install over a lock written by such a consumer fails until the lock is regenerated when the selections differ. Locks whose flat fields are already exact are unchanged byte for byte. subset_pairings is additive and optional and lockfile_version is unchanged. The fields are typed in the distinct proposed lockfile-v0.1.60.schema.json (Appendix A); earlier schema bytes and IDs are unchanged, and since their entries admit additional properties, new lockfiles still validate against them. Older readers that preserve the unknown field without implementing it fall back to the flat product. Added the target_subset and subset_pairings rows to the Section 5.2 field table and req-rs-018 to the Section 10.11 lockfile-tampering row. Sections 1.3, 4.3.2, 5.2, 7.11, 10.11, 11.3.2, Appendices A and C, the requirements manifest and conformance coverage are updated. Section 9.3 review and public comment remain pending; this proposal is not adopted. Adds one MUST.
0.1.612026-11-19Amendment for issues #3762, #3866 and #3868, introduced in PR #3801, corrected in PR #3851 (issue #3860) and revised in PR #3875 for #3866 and #3868; the earlier proposed text of this amendment, which preserved vscode on rewrite and gave it an MCP configuration destination of its own, is withdrawn. Revised Section 4.2.1 in place: vscode is a deprecated alias of copilot, admitted under target: and targets:; it has no MCP configuration destination of its own, a consumer treats it exactly as copilot (including the req-tg-008 effective target intersection and recorded lockfile state), a lock writer records it as copilot and a lock reader reads a recorded vscode as copilot before req-rs-018 comparisons, and a manifest rewrite replaces it in place with copilot, dropping a resulting duplicate; agents still normalises to copilot and is not admitted under targets:. Revised the Section 4.2 targets row and req-tg-008 in place to admit vscode as that alias, and added hermes and grok-bot to the Section 4.2.1 canonical-set block to match its explicit-only enumeration. Under Section 9.2 this is not behavior-neutral errata: a consumer that gave vscode a distinct MCP configuration destination, preserved it on rewrite, or recorded it in lock state no longer conforms, and targets: values containing vscode, hermes or grok-bot, and target: values hermes and grok-bot, that previously had to be rejected are now accepted. Deprecation announcements under Section 9.5: the vscode alias and the singular target: field (in favor of targets:) are deprecated from the adoption date, 2026-11-19, on which the Section 9.5 migration window starts. The window stays open until a later revision removes the deprecated form, subject to the Section 9.5 minimum of 90 days; this amendment sets no removal date and none is scheduled. The non-normative Section 4.2.1 note records that the Target Registry companion now lists the workspace-root .mcp.json as the copilot project MCP configuration destination, replacing .github/mcp.json and .vscode/mcp.json; this changes an existing companion entry rather than adding one, and cleanup of entries a consumer wrote at the retired destinations is implementation-defined under the existing ownership rules, including req-mf-026. Manifest JSON Schema bytes are unchanged because the targets pattern already admits these tokens. Proposed 2026-11-18; adopted 2026-11-19 in this Working Draft by editor decision recorded in issue #3904, without the Section 9.3 reviewer-panel approval and public comment period. Adoption does not change the status of amendment 0.1.60, which still proposes req-rs-018 and the subset_pairings lock field, or of amendment 0.1.45, whose explicit-only enumeration the hermes and grok-bot canonical-set addition matches. Statement count remains 139 (134 MUST, 5 SHOULD).
0.1.622026-11-19Amendment for issue #3847. Revised the fetch_failure row of the req-pl-006 merge table (Section 6.4, governance MUST) from “Child overrides if set” to stricter wins (block > warn, an unset value being the warn default per Section 6.2), so a child policy can tighten but never relax the parent’s fail-closed choice, matching the tighten-only inheritance principle of Section 6.4 and the enforcement row. Under Section 9.2 this changes an evaluation already defined by a normative statement, so it is an amendment, not behavior-neutral errata: the only verdict class that changes is a chain whose parent sets fetch_failure: block and whose child sets warn (or leaves it unset), which now merges to block and fails closed on a policy fetch failure instead of warning. Chains where the child is at least as strict as the parent are unchanged. The reference implementation already merges this way. No statement is added or removed; the statement count is unchanged. Proposed 2026-11-18; adopted 2026-11-19 in this Working Draft by editor decision recorded in issue #3904, without the Section 9.3 reviewer-panel approval and public comment period.
0.1.632026-11-19Amendment for issue #3880 (shared MCP document attribution, deferred from the 0.1.61 review). Added req-mf-027 (Section 4.5, consumer MUST): when two or more targets write project-scoped MCP servers to the same configuration file (at this revision claude and copilot share the workspace-root .mcp.json), each entry the consumer wrote there is attributed to the file, not only to the target that selected the server; an entry recorded for one of those targets is not foreign to another that selects the same server, subject to the same recorded-write checks; when one of those targets stops selecting the server, for example because it is deactivated, the entry is kept and owned, retaining a recorded write hash, for any other active target that writes the file and still selects it, and is removable, under the consumer’s other ownership rules including req-mf-026, only once no such target selects it. Entries the consumer did not write and distinct (including user-scoped) configuration files are outside the requirement. The non-normative Section 4.2.1 note now points to the new requirement instead of deferring it. Under Section 9.2 this defines cleanup behavior no earlier statement specified, not behavior-neutral errata: the only verdict class that changes is a consumer that removes, or treats as foreign, a shared-file entry another active target sharing that file still selects, which no longer conforms. The reference implementation already behaves this way. Sections 1.3, 4.2.1, 4.5, 4.9, 11.3.2, Appendix C, the requirements manifest and conformance coverage are updated; schema bytes are unchanged. Proposed 2026-11-19; adopted 2026-11-19 in this Working Draft by editor decision recorded in issue #3904, without the Section 9.3 reviewer-panel approval and public comment period. Adoption does not change the status of req-mf-026, which amendment 0.1.57 still proposes. Adds one MUST. Statement count: 139 -> 140 (135 MUST, 5 SHOULD).
0.1.64 (proposed)2026-11-19Amendment for accepted issue #3902 (portable, content-bound approval for transitive MCP servers). Added req-sc-016 (Section 10.13, consumer MUST): a consumer admits a transitive dependency’s self-defined, registry-naming or overlaying MCP server only when the consuming manifest re-declares it, a manifest grant binds the declaring package, the server name and a matching definition fingerprint, or the operator opts in for that invocation; consent is never derived from the lockfile, a per-invocation opt-in is never persisted, a no-longer-matching fingerprint withholds the server with a diagnostic naming the package and server even under the opt-in, and an organization denial still wins over every path. The grant may live in the consuming manifest or the per-user approval location of req-sc-010 (the manifest deciding); a dependency’s own manifest never grants. The fingerprint is a full-length sha256 digest over the declaration as installed, covering every field that determines what runs plus any resolved registry entry; an unrecognized fingerprint does not match. Revised req-sc-011 (Section 10.14) in place so the identical-outcome clause also covers a frozen install. Under Section 9.2 both change verdicts: a consumer that keeps a server only because the lockfile lists it, persists the opt-in, deploys a server whose bound definition changed, admits such a transitive server on a package-level or type-level grant alone, or reaches a frozen-install verdict different from install, no longer conforms; such projects re-declare the server or record a fingerprint grant. The reference implementation behaves this way. Sections 1.3, 10.11 (row 26), 10.13, 10.14, 11.3.2, Appendix C, the requirements manifest and conformance coverage are updated; schema bytes are unchanged. Adds one MUST. Statement count: 147 -> 148 (143 MUST, 5 SHOULD), counted after the adopted 0.1.65 amendment, which landed first.
0.1.652026-11-19Amendment for issue #3919 (native plugin activation profile), from the #3094 design record accepted on 2026-11-19. Added Section 8.5.11 with seven consumer MUSTs. Part A (normative) defines target criteria A1 to A5: documented user and project settings files with precedence, an in-place local directory marketplace with relative paths at project scope, a declarative per-plugin enable switch that needs no install command once declared and trusted, no automatic update of directory sources, and documented precedence when a target reads another target’s files. req-na-001 permits native activation only for a target, scope and client version that meets A1 to A5 by published documentation, with a conformance-statement disclosure. Part B (normative): req-na-002 the lockfile is the source of truth, only the approved plugin root is deployed to .agents/plugins/<plugin>/ or ~/.agents/plugins/<plugin>/ with a generated .claude-plugin/marketplace.json, plugin names are safe path segments, and the lock records one root digest whose construction is pinned; req-na-003 only the documented activation entries are written, never private target state, and no target binary, CLI or RPC is called; req-na-004 ownership comes from the previous and next lockfile with no receipt file, preserving unrelated keys and explicit false; req-na-005 a plugin is enabled only when an implementation-defined approval bound to the root digest covers it and the req-tg-013 admission gates admit it, and is otherwise neither deployed nor declared; req-na-006 a target that does not qualify gets explicit split install or refusal with a default-visible diagnostic, never silent; req-na-007 generated marketplace names are unique per project and per scope. Part C (informative) records Claude Code as native-eligible, GitHub Copilot as native-eligible at user scope with project scope unknown under A5, Codex as split (fails A3; A2 also not met; Codex 0.170.0, 2026-11-19) with schema-bearing Agent Plugins v1 dependencies opaque under req-tg-011, and every other catalog target as unknown. req-tg-013 is unchanged; a Section 8.5.7 editorial note identifies the two clauses, req-na-002 and req-na-004, that substitute for its placement and ledger clauses for a profile-activated dependency. Under Section 9.2 this adds an optional capability: the requirements bind only a consumer that natively activates plugins as Section 8.5.11 defines it, so no existing verdict changes and registrations made under req-tg-013 alone are unaffected. No schema or lockfile-version change; the lock records the root and digest as additive entry data. Sections 1.3, 8.5.7, 8.7, 10.11, 10.18 (new), 11.2, 11.3.2, 12.4, Appendix C, the requirements manifest, a reconciliation oracle and conformance coverage are updated. Version 0.1.64 is reserved for the concurrent proposal for issue #3902; this amendment does not adopt proposed amendment 0.1.64. Proposed and adopted 2026-11-19 in this Working Draft by editor decision recorded in issue #3919, without the Section 9.3 reviewer-panel approval and public comment period. Adds seven MUSTs. Statement count: 140 -> 147 (142 MUST, 5 SHOULD).
0.1.66 (proposed)2026-11-19Amendment for the portable native-plugin approval pin (issue #3919 follow-up, PR #3290; implementation in PR #3989). Revised req-na-005 in place: the approval that permits native activation is bound to the plugin root’s approval digest, which is the req-na-002 root digest construction over the same file set, order and encoding with the executable-bit byte omitted, so one approval covers the same paths and bytes on operating systems whose file systems do not carry that bit; the approval digest is distinct from the root digest the lock records. The req-na-002 root digest keeps the bit and still gates integrity between the materialized source, the deployed root and the lock. Revised the req-na-002 file-set exclusion clause in place: a root apm.yml and a root .apm/ are excluded whether or not the consumer generated them, so they are neither digested nor deployed under the profile root, and a plugin whose manifest references them is not natively activated. Added the native_plugin row to Section 5.2, documenting the lock data that req-na-002 and req-na-004 already require; both now cross-reference it. Under Section 9.2 this changes verdicts: a consumer that binds the approval to the executable-bit-including root digest, or that digests or deploys an author-shipped root apm.yml or .apm/, no longer conforms. Approvals recorded against the earlier root digest no longer match, so the plugin is withheld with the req-na-005 diagnostic until it is re-approved; a lock entry whose root digest was computed under the earlier exclusion reading is reported as drift under Section 5.5. The reference implementation behaves this way. The root digest is not portable across file systems with different executable-bit semantics; the req-na-002 editorial note records this limitation pending the project-scope route (#3921). Sections 5.2, 8.5.11 and 10.18 are updated; schema bytes are unchanged. No requirement ID, keyword or statement count changes. Statement count: 148 (143 MUST, 5 SHOULD).
0.1.67 (proposed)2026-11-19Amendment for accepted issue #3993. Revised req-pl-018 (Section 6.3.1, governance MUST) in place. Clause (g) now binds a dependencies.require entry to one host with the same effective host and ASCII mapping as allow and deny: a host-qualified entry identifies a dependency only on the named host, and a hostless entry only on the implementation-default host of the evaluating implementation (never rebound by a consumer manifest default_host:); local paths still match hostless entries, dependencies on dotless hosts other than the implementation-default host cannot be identified at this revision, and the first identified dependency in the order the check evaluates dependencies (declaration order within one manifest) is the one identified. Every check evaluating a require entry MUST resolve it to that dependency on the manifest and lockfile side, reading the lock entry by the dependency’s own lockfile identity, and MUST treat an entry that identifies no dependency as a violation routed through enforcement, never skipping it. Clause (g) also states that a dependency written without a host takes the default_host: of its declaring manifest as its effective host when declared, matching resolution under req-mf-019; because clause (g) defines one effective host for every pattern field, this also applies to host-qualified allow and deny patterns: for a manifest declaring a non-default default_host:, a host-qualified pattern naming that host newly matches the manifest’s shorthand dependencies and one naming the implementation-default host no longer does (the reference implementation already behaved this way). Clause (a), the Section 6.3.1 table and the Section 10.8 note were aligned. Under Section 9.2 this changes an evaluation already defined by req-pl-018 and is not behavior-neutral errata: a host-qualified entry can newly pass on any host, including one naming the implementation-default host; a hostless entry for a dependency on any other host newly fails; and an entry naming no dependency newly fails a check that verifies the entry in the lockfile. Policy authors migrate by host-qualifying require entries for packages off the implementation-default host; the diagnostic names the entry to write. Source replacement under req-rpl-002 is unchanged. The concurrent 0.1.66 proposal is independent; this amendment does not adopt it. No new normative statement; count unchanged at 148 (143 MUST, 5 SHOULD). Subject to the Section 9.3 amendment panel and comment window.
0.1.68 (proposed)2026-11-19Amendment for accepted issue #4000 (hash framing hardening). Revised req-lk-016 (Section 5.2, consumer MUST) in place: the byte stream a package content_hash digests is named by lockfile_version. A new version "4" digests, per file in ascending byte-wise POSIX path order, the UTF-8 relative path, one NUL byte and the raw SHA-256 of the file bytes (the Section 8.5.11 root-digest framing without its executable-bit byte); versions "1" to "3" keep the implementation’s legacy tree stream. Values keep the sha256:<hex> envelope; no new prefix is introduced. A consumer verifies each content_hash with the stream its version names; a writable install MAY promote a version "1" to "3" lockfile to "4" only by re-hashing every package row from verified or freshly accepted bytes, and otherwise keeps the version and every recorded value; a frozen install, apm audit and any operation that does not otherwise write the lockfile never promote or rewrite. Section 5.4 now names version "4", which admits every earlier field including version "3" replacement state; a consumer that does not recognise it refuses the lockfile under req-lk-004. Appendix A selects a new lockfile resource, lockfile-v0.1.68.schema.json, that adds "4" to the lockfile_version enum; the 0.1.60 resource keeps its ID and bytes. Under Section 9.2 this changes recorded values for promoted lockfiles: a consumer that does not recognise "4" now refuses them instead of verifying them. Lockfiles that stay at "1" to "3" verify unchanged. Keyword, section and conformance class are unchanged, so the Appendix C row is unchanged; the requirements manifest notes and conformance coverage are updated. No new normative statement; count unchanged at 148 (143 MUST, 5 SHOULD). Subject to the Section 9.3 amendment panel and comment window.
0.1.692026-11-20Amendment for issue #3701 (deletion requires deployment evidence). Added req-lk-024 (Section 5.2, consumer MUST): a lockfile-driven deletion of a deployed file needs a matching local deployment record or byte equality, over the req-lk-012 canonical domain, with the locked version’s render; a lockfile hash alone never authorizes it; without evidence, or on a mismatch, the file is kept with a diagnostic naming it and the manual resolution; the render is established before the dependency’s source is removed; managed final symbolic links are out of scope. Under Section 9.2 this defines cleanup behavior no earlier statement specified, not behavior-neutral errata: a consumer that deletes a file on the strength of a lockfile hash alone no longer conforms. Sections 1.3, 5.7, 10.7, 10.11, 11.3.2, Appendix C, the requirements manifest and conformance coverage are updated; schema bytes and lockfile_version are unchanged. Proposed 2026-11-20; adopted 2026-11-20 in this Working Draft by editor decision relayed in PR #4049 (https://github.com/microsoft/apm/pull/4049#issuecomment-7035970110), without the Section 9.3 reviewer-panel approval and public comment period. Adds one MUST. Statement count: 148 -> 149 (144 MUST, 5 SHOULD).
0.1.702026-11-20Amendment for issue #4234 (zip registry archives). Revised req-sc-004 (Section 10.5, consumer MUST) in place: clause (a) admits application/zip alongside tar.gz and rejects every other container; (c) counts entries as they are read; a new clause (d) refuses path traversal, absolute paths, symbolic and hard links and duplicate entry paths; and the limit set (b) through (d) applies identically to both containers. A violation fails closed and leaves no entry of the archive extracted. Under Section 9.2 this changes evaluations defined by a normative statement, so it is an amendment, not errata. The reserved Appendix B archive-container item is aligned. Proposed and adopted 2026-11-20 in this Working Draft by editor decision recorded in issue #4234, without the Section 9.3 reviewer-panel approval and public comment period. No statement added; the count remains 149 (144 MUST, 5 SHOULD).
0.1.712026-11-20Amendment from the spec-conformance linking review (Part of #4092). Revised req-lk-015 (Section 5.6.4, consumer MUST) in place, re-anchoring git-source integrity: every git-sourced lock entry records content_hash, a sha256 envelope over the package tree whose byte stream follows req-lk-016; a frozen install and apm audit recompute it at resolved_commit and fail closed with a diagnostic naming the entry, the expected envelope and the observed envelope. The canonical git tree hash tree_sha256 and its Section 5.6.4 byte representation are reserved for v0.2; the Section 5.2 field table, the Section 5.6.4 editorial note, the Section 7.5 lockfile-replay prose and the informative lockfile examples are aligned. Under Section 9.2 this changes the field a normative statement names, so it is an amendment, not errata; the integrity obligation itself is unchanged. Schema bytes and lockfile_version are unchanged. Proposed and adopted 2026-11-20 in this Working Draft by editor decision (steward ruling, issue #4092), without the Section 9.3 reviewer-panel approval and public comment period. No statement added; the count remains 149 (144 MUST, 5 SHOULD).
0.1.722026-11-20Amendment from the spec-conformance linking review (Part of #4092). Revised req-sc-005 (Section 10.3, consumer MUST) in place: beside identical eTLD+1 (a) and an explicit aliases: entry (b), a third basis (c) admits the built-in GitHub-operated host class, which is github.com and every *.ghe.com host, plus a GitHub Enterprise Server host only when the operator names it through the GITHUB_HOST setting, never through a manifest. An implementation that uses (c) documents the class in its conformance statement and applies it under the req-sc-013 determinism and precedence rules. Basis (c) covers only those hosts and does not widen (a) or (b) for any other host. Under Section 9.2 this changes an evaluation defined by a normative statement, so it is an amendment, not errata. Proposed and adopted 2026-11-20 in this Working Draft by editor decision (steward ruling, issue #4092), without the Section 9.3 reviewer-panel approval and public comment period. No statement added; the count remains 149 (144 MUST, 5 SHOULD).
0.1.73 (proposed)2026-11-21Amendment for accepted issue #2903 (root project marketplace map). Added Section 4.2.5 marketplaces and two consumer MUSTs, both conditional on resolving marketplace references, which stay non-normative in v0.1. req-mf-028: the root project manifest may declare a marketplaces: list (name, source, optional ref); malformed, unknown-key and duplicate-name entries are rejected; a declared name resolves through its entry, never through a same-named user or machine registration; names are manifest-local and the lockfile records the catalog origin and resolved commit; a declared entry is never persisted to a user-level or machine-level registry. req-mf-029: a dependency whose manifest declares marketplaces: is refused, and when the root declares the list a transitive marketplace reference must name a root-declared entry or resolution fails with a diagnostic naming the entry to add. Under Section 9.2, a consumer that resolves marketplace references and ignores a dependency’s marketplaces: key, or lets a same-named registration override a root declaration, no longer conforms; the reference implementation previously refused the key in every project and package manifest. Sections 1.3, 4.2, 4.9, 7.1, 11.3.2, Appendix C, the requirements manifest, a conformance fixture and conformance coverage are updated; schema bytes are unchanged (the manifest schemas already admit unknown top-level keys). Adds two MUSTs. Statement count: 149 -> 151 (146 MUST, 5 SHOULD).
0.1.74 (proposed)2026-11-20Amendment for issue #3921 (native plugins at project scope for Claude Code and GitHub Copilot; PR #4559, superseding #4010). Pending editor decision; the number is provisional. Revised the req-na-002 root digest clause in place: at project scope, where the deployed roots and the lockfile are shared project files, the recorded root digest omits the executable-bit byte (it equals the req-na-005 approval digest construction), and the consumer compares the deployed root with the materialized source under the executable-bit-including construction on the deploying machine before writing activation entries, without recording that comparison; the editorial note is rewritten accordingly. Revised criterion A5 in place: at project scope, a target that documents which other target’s files it reads but not their precedence meets A5 for a consumer that discloses the file priority it verified against a cited client version, with a conformance test that runs that client where installed and skips where not. Revised req-na-004 in place: at project scope, in the settings file of a target that also reads another target’s file at lower priority, the enable key of a plugin the consumer declares to that other target is the consumer’s own, written false when the plugin’s effective targets exclude the reading target (cross-target suppression) and changed or removed as targets or the lockfile change; every other false stays untouched. Part C (informative) records GitHub Copilot CLI as native-eligible at project scope under that test, with the order .claude/settings.json < .claude/settings.local.json < .github/copilot/settings.json < .github/copilot/settings.local.json verified against Copilot CLI 1.0.112, records that a Claude-only plugin gets the consumer’s own false in .github/copilot/settings.json, and records that the Copilot route of req-tg-013 moved to this profile. The Section 5.2 native_plugin row is updated and names the optional sibling native_declared (the targets whose settings held the consumer’s true when the lock was written), which is advisory and not trust-bearing: it has no identity, replay or ownership role. req-na-005 is unchanged. Under Section 9.2 this changes verdicts: a project-scope consumer that records the executable bit in the committed root digest, that does not compare the bit on the deploying machine, or that lets Copilot load a plugin activated for Claude Code alone, no longer conforms; a project-scope root digest recorded with the bit is reported as drift until the next install records it without. Sections 5.2 and 8.5.11 are updated; schema bytes are unchanged. No requirement ID, keyword or statement count changes. Statement count: 151 (146 MUST, 5 SHOULD).
0.1.752026-11-21Amendment for accepted issue #1925 (explicit policy source on install and update). Added req-pl-022 (Section 6.1, governance MUST): an install or update operation that accepts an explicit policy source in addition to discovery evaluates the tighten-only merge of the discovered policy (parent) and the explicit policy (child) per req-pl-006, uses the explicit policy alone when none is discovered, fails closed when the explicit source cannot be resolved, fetched or parsed into a valid policy or publishes none (non-zero before any deployment write, naming the source and the cause, whatever policy.fetch_failure_default says; a discovered-policy failure keeps its own routing), and reports every policy source in effect; a valid stale cached copy counts as resolved and the manifest policy.hash pin still covers only the discovered policy. Revised req-pl-001 and the Section 6.1 lead sentence in place to admit the composed explicit source; req-pl-021 is unchanged. Under Section 9.2 this adds a capability, so it is an amendment, not behavior-neutral errata; an operation that replaces discovery is unchanged. Proposed and adopted 2026-11-21 in this Working Draft by editor decision (CEO sign-off D5, issue #1925), without the Section 9.3 reviewer-panel approval and public comment period. Statement count: 151 -> 152 (147 MUST, 5 SHOULD).
0.1.76 (proposed)2026-11-22Amendment from private security coordination (direction signed by the CEO). Revised req-sc-016 (Section 10.13, consumer MUST) in place: when the organization policy sets mcp.trust_transitive to false, or leaves it unset while setting any restriction (a non-default field; metadata and enforcement alone are not restrictions), a transitive MCP server of any declaration form, including a plain registry reference, is admitted only when mcp.allow matches its name, neither a bound grant nor the per-invocation opt-in overrides that, and a root re-declaration makes it a direct declaration; enforcement: block fails the operation before deployment, enforcement: warn emits a diagnostic as for mcp.deny, and an audit reports each such server. A policy that sets no restriction imposes nothing. Under Section 9.2 a consumer that deploys such a server without a matching mcp.allow entry no longer conforms. Schema bytes are unchanged. No requirement ID, keyword or statement count changes. Statement count: 152 (147 MUST, 5 SHOULD).
0.1.77 (proposed)2026-11-21Amendment for accepted issue #4295 (uninstall consent for missing evidence). Revised req-lk-024 (Section 5.2, consumer MUST) in place with one per-invocation consent exception: on an uninstall the user explicitly consents to, a file whose local deployment records were read without error and hold none for it (an absent record store holds none; an unreadable one does not qualify), and for which the consumer attempted and failed to produce any render of its owning locked dependencies, MAY be deleted when its content hash over the req-lk-012 domain equals the one distinct hash the lockfile records for that path across its owners, compared per req-lk-016; every condition is re-evaluated immediately before removal, and each deletion is named with the lockfile hash as its basis. The exception never covers a path a remaining dependency also lists, a differing record or render, a render lacking the path, no or two or more distinct recorded hashes, or an unreadable file or one that is not a regular file, and consent is never inferred from another option, an environment variable, configuration, or manifest or lockfile content. Under Section 9.2 this relaxes a fail-closed obligation only under explicit per-invocation consent, so it is an amendment, not errata; a consumer that does not offer the exception still conforms, and the only verdict that changes is for a consented deletion on a lockfile hash alone, which now conforms. Without consent, behavior is unchanged. Section 10.7 and Appendix C, the requirements manifest and conformance coverage are updated; schema bytes and lockfile_version are unchanged. No statement added; the count remains 152 (147 MUST, 5 SHOULD).
0.1.79 (proposed)2026-11-23Amendment for PR #4970 (pinned-commit reachability on replay; regent ruling). Pending editor decision; the number is provisional. Revised req-rs-015 (Section 7.5, consumer MUST) in place. Before reusing a recorded commit that has no recorded outcome, a non-update replay verifies once that the commit is reachable from a branch or tag of its origin (refs under refs/heads/ or refs/tags/ only). The verification is not a ref-resolution and never selects another commit. The consumer refuses a commit that no origin branch or tag reaches. It fails closed with a named remedy when the origin cannot be contacted; entries that the consumer’s own configuration routes through a registry proxy are exempt. It records a positive outcome only in consumer-local state keyed by origin, contacted endpoint and commit, never in the lockfile, so later replays issue no ref-resolution or reachability-verification request for that entry. Under Section 9.2 this changes verdicts: for an entry scoped by req-rs-015, a consumer no longer conforms if it replays a recorded commit that no branch or tag of its origin reaches, replays an unverified commit when the origin cannot be contacted outside a registry proxy route that its own configuration sets, reads a verification outcome from the lockfile or another project file, or continues the operation or rewrites the lockfile after refusing an entry. Commits reused under req-rs-004 and commits taken from the manifest on re-resolution are unchanged. Replays with a recorded outcome are unchanged; consumer state without one, including a cache created before this revision, verifies on its first replay. The requirements manifest note and the conformance tests are updated; Appendix C, schema bytes and lockfile_version are unchanged. No requirement ID, keyword or statement count changes. Statement count: 152 (147 MUST, 5 SHOULD).

In the Date column, a row marked (proposed) gives its proposal date and any other row gives the date its change took effect in this working draft; for 0.1.61, 0.1.62, 0.1.63, 0.1.65 and 0.1.69 that is the adoption date, and each of those rows states its proposal date. Version 0.1.74 is reserved for a concurrently proposed amendment (open pull request #4559) and has no row in this working draft. Version 0.1.78 is reserved for a concurrently proposed amendment (open pull request #5001) and has no row in this working draft. The independently drafted 0.1.52, 0.1.53, 0.1.55, 0.1.57, 0.1.58 and 0.1.60 proposals, the adopted 0.1.63, 0.1.69 and 0.1.75 amendments and the 0.1.64 proposal each add one MUST; 0.1.54 adds four; the 0.1.73 proposal adds two; the adopted 0.1.65 amendment adds seven; 0.1.56 revises req-tg-005 in place, 0.1.59 revises req-pl-018 in place, the 0.1.67 proposal revises it again in place, the adopted 0.1.61 amendment revises Section 4.2.1 and req-tg-008 in place, the adopted 0.1.62 amendment revises the req-pl-006 merge-table fetch_failure row in place, and the 0.1.66 proposal revises req-na-005 and the req-na-002 file-set exclusion clause in place, the 0.1.68 proposal revises req-lk-016 in place, and the 0.1.74 proposal revises the req-na-002 root digest clause, the req-na-004 false rule and criterion A5 in place, the 0.1.76 proposal revises req-sc-016 in place, the 0.1.77 proposal revises req-lk-024 in place, and the 0.1.79 proposal revises req-rs-015 in place; none adds a statement. Together, this working draft contains 152 statements (147 MUST, 5 SHOULD). Combining the proposals does not establish Section 9.3 adoption or CLI release. Amendments 0.1.61, 0.1.62 and 0.1.63 were adopted on 2026-11-19 by editor decision (issue #3904), amendment 0.1.65 on the same date by editor decision (issue #3919), and amendment 0.1.69 on 2026-11-20 by editor decision (issue #3701), not through the Section 9.3 reviewer-panel approval and public comment period. Where adopted text cites a field or requirement that a still-proposed amendment adds (for example subset_pairings and req-rs-018 from 0.1.60, and req-mf-026 from 0.1.57), the citation is a cross-reference to that text as it reads in this working draft and does not adopt it.

Amendments 0.1.70, 0.1.71 and 0.1.72 were adopted on 2026-11-20 by editor decision (issues #4234 and #4092); their Date is the adoption date. They revise req-sc-004, req-lk-015 and req-sc-005 in place and add no statement. Amendment 0.1.75 was adopted on 2026-11-21 by editor decision (CEO sign-off D5, issue #1925); its Date is the adoption date. It adds req-pl-022 and revises req-pl-001 in place.

Errata:

  • 2026-11-19, Section 8.5.11.3 (#3922). Informative only. Part C now has a row for every catalog target, replacing the single “Every other catalog target: Unknown” row, plus survey detail, primary sources and isolated-run evidence. The “Activation entries” definition in Section 8.5.11 now names the native-eligible Part C targets (Claude Code, GitHub Copilot CLI) in its informative parenthetical. No target is newly classified native-eligible. No requirement ID, keyword, or statement count changes.
  • 2026-11-17, Section 4.2.1 (#3762), withdrawn 2026-11-18. This entry was published in PR #3801 as behavior-neutral errata that preserved the legacy vscode alias on manifest rewrite. It is withdrawn and reclassified as amendment 0.1.61 (adopted 2026-11-19), because the same change admits vscode under targets: and is therefore not behavior-neutral under Section 9.2 (corrected in PR #3851, issue #3860). Withdrawing it changes no requirement ID, keyword, or statement count.

Appendix E. Editorial reconciliation notes

Section titled “Appendix E. Editorial reconciliation notes”

This appendix collects editorial notes that were inlined in the v0.1 first draft. They are non-normative; the section bodies they reference remain authoritative.

E.1 Manifest top-level type field. Section 4.2.2 defines type (with values instructions, skill, hybrid, or prompts) as informational in v0.1; it exists so future minor revisions can attach normative semantics (for example, packaging filters per type) without a breaking schema change. v0.1 consumers MUST ignore the value.

E.2 Target identifier reservation. The target identifiers enumerated in the OpenAPM Target Registry companion are reserved in the v0.1 namespace; vendor extensions MUST use the x-<vendor>-<name> pattern of req-tg-004 to avoid collision.

E.3 Lockfile lockfile_version: "2" adoption. Once a conforming consumer has written "2", it MUST NOT demote to "1" on subsequent rewrites (see req-lk-002). The motivation is auditability: a silently-demoted lockfile would lose the registry-binding metadata that prompted the v2 upgrade.

E.4 resolved_at non-stability. The lockfile field resolved_at is advisory and MAY vary across re-resolutions; it is excluded from canonical-emission stability checks per Section 5.6. Round- trip conformance (req-cf-001) treats this field as permitted-to-vary.

E.5 Legacy target aliases. Section 4.2.1 admits two legacy aliases. agents is admitted under target: only and is normalised to copilot on manifest rewrite. vscode is deprecated by amendment 0.1.61 (adopted 2026-11-19): it is admitted under target: and targets:, it denotes copilot with no MCP configuration destination of its own, it is recorded as copilot in lock state, and on rewrite it is replaced in place with copilot, a resulting duplicate being dropped. Some implementations accept further spellings, such as agy for antigravity; this specification does not yet register them, and a normative alias table is planned for a later 0.1.x revision. The manifest JSON Schema targets pattern is intentionally permissive: a value that validates against the schema is not therefore accepted under req-tg-008, which also rejects any targets: token that is not canonical, vscode, or all (for example agents). The targets description in the published manifest JSON Schemas (“Canonical target restriction set or all sentinel”) predates the vscode alias and is not normative; the schema bytes are unchanged, and a later schema revision may mark vscode with a deprecation annotation.

Copyright (c) Microsoft Corporation. General documentation: CC-BY-4.0. Software, code examples and OpenAPM: Apache-2.0. See scope and exclusions.