Artifact validation
Validation answers two different questions with one command. Against source it asks whether the project describes a legal bundle; against an artifact it asks whether the emitted bytes are the bytes the manifest promised.
validate --artifact, mcp, and hooks all work against a built artifact with the project
sources deleted. That is deliberate: an artifact that only validates while its source tree is
present is not really self-contained, and the packed-deleted-source proof level in
Testing exists for the same reason.
Content-addressed, not path-existence
agent-bundle.manifest.json records a SHA-256 digest for every emitted file, including copied
scripts and assets. Artifact validation compares real bytes against those digests, so a
hand-edited generated file fails rather than passing because the path still exists. Referenced
files are checked too — a manifest-declared logo that is missing from the artifact or escapes
the deploy tree reports AB6025.
Every diagnostic is one structured record: a stable AB code, a severity, a message, and usually
a sourcePath and a recovery hint. The diagnostic-gated commands — build, prepack,
validate, doctor, install, and dev — exit nonzero only when an error diagnostic is
present; warnings and infos never gate a build, a validation, or a dev rebuild. eval and
inspect also exit 1 for a failing or inconclusive trial or an invalid model, with no error
diagnostic involved — see the CLI exit codes.
Claude Code strict validation
When Claude Code is on PATH, artifact validation runs
claude plugin validate <bundle-dir> --strict for emitted claude and unified plugin targets:
- Host errors become Agent Bundle errors.
- Host warnings stay warnings unless
agent-bundle validate --strictis set. - A missing binary is reported as an explicit informational skip, never as fabricated success.
CI should use strict validation:
Use --no-host-validation when a deterministic schema-only check is required — a machine without
the hosts installed must still be able to run the same gate and get the same schema verdict.
During development you can load a built target without installing it and verify registration:
Codex and Cursor: pinned schemas
Neither Codex nor Cursor publishes a plugin-validation developer verb today, so Agent Bundle validates their emitted JSON documents against its own vendored pinned schemas and treats host schema generators as a drift signal, never as a substitute plugin contract.
AB6031 is the interesting one: when Codex's generated schema disagrees with the pinned
revision, the pin is only updated once Codex publishes the matching contract. Following live host
output automatically would turn an upstream change into a silent contract change here.
Agent Skills spec lint
AB6034 is an error on emitted bytes: a SKILL.md with valid YAML frontmatter but no
Markdown instruction body after it. The pinned Agent Skills specification requires frontmatter
followed by Markdown content, and the check runs against what the artifact actually contains
rather than against the authored source.
Hash pins versus repository-owned tables
Hash pins cover vendored external content whose ground truth lives outside the repository and can
drift: host document schemas under src/adapters/schemas/* (with upstream URL, commit, and
SHA-256 recorded in PROVENANCE.json), the Agent Skills specification-derived schema pin in the
manifest agentSkills block, and emitted artifact files and source inputs for integrity.
Repository-owned capability tables and evidence are not hashed. Capability evidence records
the observed host version (observedVersion) and target, while adapters carry a monotonic
adapterRevision. Git already versions repository-owned content; hashing it again inside the
repository is self-referential and causes churn on every table edit.
The npm prepack gate
prepack runs the release build and npm pack --dry-run --json --ignore-scripts, then gates the
exact package and artifact inventory, manifest hashes, package bin targets, and release-version
agreement. --output is an artifact path relative to --root that overrides the configured
output.distPath, defaulting to artifact. Use it as an npm prepack script; --ignore-scripts
prevents recursion, and no npm lifecycle ever performs a host install.
A release build also refuses a project with no release version at all (AB4013), so a
published artifact never carries the 0.0.0-dev.<short-revision> development fallback. A
declared plugin.version that disagrees with package.json reports the AB4008 warning.
Next
- Host installation — registering a validated bundle with a host.
- Preview packages — how these outputs reach consumers today.