Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/skills / migration / sortKeysAnthropicFirst

Function: sortKeysAnthropicFirst()

ts
function sortKeysAnthropicFirst(frontmatter): Record<string, unknown>;

Defined in: packages/skills/src/migration/index.ts:171

Stable key ordering: Anthropic-base fields first (in their snapshot insertion order), then the metadata bucket, then the graphorin-* fields, then anything else. The migrator emits in this order so re-running the migrator on the same input yields identical bytes (idempotence).

Parameters

ParameterType
frontmatterRecord&lt;string, unknown&gt;

Returns

Record&lt;string, unknown&gt;

Stable