Component manifests
The machine-readable public contract for each component. Docs, the future @ghostvue/mcp server, codegen, and evals read the same JSON. The schema and versioning rules are ADR 0006.
Schema
Canonical file:
schemas/component-manifest.schema.jsonPublished export (byte-identical copy):
import schema from '@ghostvue/core/manifest.schema.json'JSON Schema draft 2020-12. $id includes major version @1. Each manifest sets schemaVersion: 1.0.0, 1.1.0 when it records accessibility.verification, or 1.2.0 when it has a summary. Versions 1.1.0 and 1.2.0 are additive, so every 1.0.0 document stays valid. Validate with Ajv's 2020 build (ajv/dist/2020); CI does this in pnpm test.
This is not the token JSON catalog from ADR 0005.
Manifest files
One file per component, next to the package that exports it:
packages/vue/manifests/ghost-button.manifest.json
packages/vue/manifests/ghost-visually-hidden.manifest.json
packages/themes/manifests/ghost-button.manifest.json // when a themed wrapper adds visual propspnpm manifests:write generates "source": "generated" files from every packages/vue/src/**/Ghost*.vue and packages/themes/src/**/Ghost*.vue using vue-component-meta. New Ghost* SFCs are picked up automatically; do not register them in a list. pnpm manifests (part of pnpm verify) fails when a generated file is stale versus the SFC.
Machine-derived fields are names and TypeScript types for props, models (update:* emits paired with a prop), events, slots, and exposed. Native HTML/ARIA fallthrough (global props such as class and key) is omitted. Humans maintain prose in the same JSON file: component description, summary, status, member descriptions, styling, accessibility, and examples. Regeneration overwrites types and membership from source and keeps that prose. JSDoc on the SFC fills a description only when the manifest does not already have one.
Every description is public copy. It ships to npm in each package's manifest.json and renders on component and reference pages. pnpm manifests fails when a description contains contributor workflow wording such as scaffolding notes (scripts/lib/manifest-descriptions.js).
Handwritten manifests ("source": "handwritten") remain valid only when no matching SFC exists yet. The themed wrapper lives in ghost-button.ts, so its manifest stays handwritten until it is a Ghost*.vue file.
Required contents
Every manifest lists:
name(GhostButton),package,status,description,summaryprops— name, TypeScript type string, default, required, description, deprecatedmodels— v-model prop plusupdate:*event (component-state.md)eventsand payload types (component emits only)slotsand slot propsexposedmethods and propertiesstyling hooks —
data-partvalues (styling.parts),data-statevalues (styling.states),--ghost-*custom properties (styling.cssProperties), and optionalstyling.attributesfor other stabledata-*hooks such asdata-disabledordata-orientation(name, values, description; an empty value list means a presence attribute). The contract is in styling. A presence attribute lists no values;values: [""]is invalid and failspnpm manifests:json{ "name": "data-disabled", "values": [], "description": "Present while the item is disabled." }accessibility — role, APG pattern URL, keyboard map, required ARIA attributes, and optional APG conformance evidence (
verification)examples— stable example ids matchingexamples/<id>.vue(button/icon-only). Not repository-root file paths. See executable examples.spec(optional, generated when approved) —{ path, status: 'approved', evidence? }populated bypnpm manifests:writeonly from component specifications whose YAML frontmatter hasspecStatus: approvedandapproval.evidence. Spec approval status is distinct from componentstatus(experimental,beta,stable,deprecated).
Unknown keys are invalid. Native HTML/ARIA fallthrough is not duplicated into props. Native listeners on a native root are not duplicated into events.
Summary
summary is one plain-language line of 12 words or fewer that says what the component is for, written for someone browsing the catalog ("Button for actions, with loading and disabled states."). The docs catalog cards on /components/ and the landing page show it; description stays the full explanation for the component page, reference page, and MCP.
The schema defines summary as optional (schemaVersion 1.2.0) and limits it to 12 whitespace-separated words, so 1.0.0 and 1.1.0 documents written before it stay valid under the v1 $id. Consumers reading older documents fall back to description. In this repository it is required: pnpm manifests (scripts/lib/manifest-descriptions.js) fails when a manifest has no summary, when it is over 12 words, when it names code (Ghost*, useGhost*, @ghostvue/, inline code) or contributor workflow, or when schemaVersion is below 1.2.0. pnpm manifests:write preserves the summary and never derives one from description.
Status
status is the component's stability level. The component stability policy defines each level and its promotion and deprecation rules. pnpm manifests enforces the evidence part (scripts/lib/component-status.js):
| Status | Fails when |
|---|---|
beta | No approved spec, no usage page for that spec, no examples, a generated placeholder description remains, or automatedKeyboard is not passed while keys are declared |
stable | Any beta rule fails, or manual or assistiveTechnology verification is not passed |
experimental and deprecated | Never; no evidence is required |
The check rejects a status the evidence does not support. It never infers or writes one: pnpm manifests:write preserves the human-set value.
Accessibility verification
accessibility.verification (schema 1.1.0, GHO-42) records APG conformance evidence in three separate categories. Each has a status of passed, failed, or not-reviewed:
| Category | Evidence | Set by |
|---|---|---|
automatedKeyboard | Per declared key, the Playwright tests that press it | CI, re-checked every commit |
manual | Dated manual interaction reviews of a named revision | A human reviewer |
assistiveTechnology | Dated screen reader or other AT reviews of a named revision | A human reviewer |
No category implies another. Automated keyboard and axe success never set manual or assistiveTechnology; a missing review stays not-reviewed with an empty evidence array. A manifest without verification means every category is not-reviewed. Readers resolve that default with resolveVerification in scripts/lib/accessibility-verification.js rather than inventing their own.
"verification": {
"automatedKeyboard": {
"status": "passed",
"keys": {
"Space": [
{
"spec": "tests/e2e/checkbox.spec.ts",
"title": "GhostCheckbox › toggles from Space, shows mixed select-all, and has no axe violations",
"package": "@ghostvue/vue"
}
]
}
},
"manual": { "status": "not-reviewed", "evidence": [] },
"assistiveTechnology": { "status": "not-reviewed", "evidence": [] }
}Automated keyboard evidence
keysextends the existingkeyboardmap. When the status ispassedorfailed, its key set must equalaccessibility.keyboardexactly: every declared key needs at least one browser test, and no extra keys are allowed.not-reviewedhas an emptykeysmap.- A test reference is the spec path under
tests/e2e/, the title path below the file (describe titles and the test title joined with›, as Playwright reports it), and the package whose component instance the test renders. A themed instance exercises the headless behavior it wraps; thepackagefield says which one ran. - The test must press the key and assert the documented action (real focus with
toBeFocused(), ARIA state, or value), not just mention it. - The evidence is re-run on every commit, so its revision is the revision that ships the manifest. Published collections carry the package version.
failedrecords a known defect: the mapped test that shows it usestest.fail()with the tracking issue. When the defect is fixed the test passes unexpectedly, CI fails, and the record moves topassed.
Review evidence
Each manual or assistiveTechnology evidence entry names the reviewed component and package (both must equal the manifest's own), the revision (commit SHA or published version), date, reviewer (crediting the actual tester), environment (browser, platform, and for AT reviews assistiveTechnology), a reference to the review record, and a summary. passed and failed need at least one entry. See the assistive-technology review process for the required screen-reader matrix, review template, and stable promotion rules.
Enforcement
| Check | Runs in | Fails when |
|---|---|---|
Schema (pnpm test) | verify-unit | Shape or status/evidence pairing is invalid |
pnpm manifests | verify-static | A declared key is unmapped, a mapped key is undeclared, a spec is missing, evidence names another component, schemaVersion is below 1.1.0, or a stable manifest lacks passed AT evidence (NVDA+Firefox and VoiceOver+Safari desktop) |
pnpm keyboard-evidence | verify-static | A reference does not resolve to a chromium-e2e test in playwright test --list, or is skipped |
check-keyboard-evidence.mjs --report | browser, after merging shards | A mapped test did not execute in chromium-e2e or did not pass (a pass after a CI retry counts) |
The last check reads the merged Playwright JSON report of the same run, so a title that merely exists in source is not enough. Locally, run the mapped specs with PLAYWRIGHT_JSON_OUTPUT_FILE=results.json pnpm exec playwright test <specs> --project=chromium-e2e --reporter=json and then node scripts/check-keyboard-evidence.mjs --report results.json.
Docs and MCP projection
Generated reference pages (/reference/<package>/<component>) render an Accessibility section from the manifest: role, APG pattern, required ARIA attributes, the keyboard map with the tests behind each key, and one row per verification category. The future @ghostvue/mcp server reads the same manifest and collection data and must keep the same contract: return the three categories separately with their own status and evidence, resolve a missing verification to not-reviewed, and never summarize them into a single "accessible" flag.
Adoption
Recording evidence is opt-in per manifest while components are experimental. The first set covers the headless GhostAccordion, GhostCheckbox, GhostCombobox, GhostSlider, GhostSwitch, GhostTree, GhostTreeGroup, and GhostTreeItem manifests. Once a manifest records passed, adding a key to its keyboard map without a test fails CI.
Manifest collections
pnpm build also bundles manifests into collections, so consumers can read every component contract of a package from one JSON file.
| Artifact | Path | Published |
|---|---|---|
| Per-package collection | packages/<dir>/dist/manifest.json, exported as @ghostvue/vue/manifest.json and @ghostvue/themes/manifest.json | Yes, a public package export |
| Workspace collection | dist/manifest.json at the repository root | No, a root build artifact only |
import collection from '@ghostvue/vue/manifest.json' with { type: 'json' }Every package that has manifests/*.manifest.json must export ./manifest.json backed by ./dist/manifest.json. The package build writes it last (scripts/write-manifest-collection.mjs --package <name>), after Vite has emptied dist. The root pnpm build writes the workspace collection after all package builds (--workspace). There is no catalog package, and core does not bundle or depend on component packages.
The envelope has its own schema, separate from the single-component schema:
schemas/component-manifest-collection.schema.json
@ghostvue/core/manifest-collection.schema.json // byte-identical published copyIts $id is https://ghostvue.dev/schemas/v1/manifest-collection.schema.json, distinct from the component schema $id (https://ghostvue.dev/schemas/v1/manifest.schema.json), which its components.items.$ref names. Both are served from byte-identical copies in docs/public/schemas/v1/ (ADR 0006). Envelope fields:
schemaVersion— envelope schema version (1.0.0), independent of each component's ownschemaVersion.scope—packagefor a published per-package collection (exactly onepackagesentry) orworkspacefor the root artifact.packages—{ name, version }for each contributing package, sorted by name.versionis thepackage.jsonversion at build time.components— component manifests embedded unchanged (same fields, values, and key order as the checked-in files). Each item validates against the component manifest schema through its$id, so future additive component fields flow through without an envelope change.
Components are sorted by package, then name, using code-unit order so the output does not depend on the build machine's locale. The same component name may appear once per package (headless and themed GhostButton); a duplicate (package, name) identity, or a component whose package is not in the envelope's packages, fails the build.
Versioning follows ADR 0006: additive envelope fields may bump schemaVersion minor; breaking envelope changes, or a component schema major bump, bump schemaVersion major and the collection $id major.
pnpm published-exports (after pnpm build) fails when a manifest package is missing the export, when a built collection does not validate, or when it is stale versus the checked-in manifests. pnpm exports:check runs publint and attw on the packed tarballs, which include dist/manifest.json.
Gate
A production component does not pass the component gate without a valid manifest.