Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/skills / spec

spec

Bundled snapshot loader for the SKILL.md packaging-format specification.

The framework ships an offline copy of the upstream specification so the loader can decide which frontmatter fields are recognised, which graphorin-* extensions deprecate (or co-exist with) an upstream field, and whether a skill author's graphorin-anthropic-spec hint refers to a snapshot newer or older than the bundled one. The snapshot is checked-in to the repository and refreshed via the pnpm run check-anthropic-spec CI cron.

The loader does not fetch the upstream specification; the only network call lives inside the CI helper script. The snapshot lookup is deterministic and side-effect free at runtime.

Interfaces

InterfaceDescription
GraphorinMappingEntrySingle entry of the graphorin-* mapping map.
KnownFieldEntrySingle entry of the upstream-known fields map.
SpecSnapshotTop-level shape of the bundled snapshot.

Type Aliases

Type AliasDescription
FieldStabilityStability classification of a known upstream field.
GraphorinFieldPolicyMigration policy applied to a graphorin-* field that maps to an upstream field.

Functions

FunctionDescription
_setSpecSnapshotForTestingOverride the bundled snapshot. Used by tests that exercise the "newer / older spec snapshot" branches of the validator.
compareAuthorSpecHintCompare an author's graphorin-anthropic-spec value against the bundled snapshot date. Returns:
getGraphorinMappingResolve the mapping entry for a graphorin-* field. Returns undefined if the field is not known to the snapshot.
getKnownFieldResolve a known-field entry by name. Returns undefined if the field is not part of the upstream specification.
getSpecSnapshotReturn the currently active snapshot. Loads the bundled JSON file on first call, then caches the parsed object.