/** * v0.5 S5 โ€” shared frontmatter-backfill logic. * * Used by both the one-shot bundled-asset backfill (`scripts/backfill-bundled- * frontmatter.ts`) and the user-workspace migration (`scripts/0.4.0-to-0.5.0.ts`). * Centralized so the canonical keyword mapping has a single source of truth. * * The canonical map is the v0.4 `AGENT_ROUTES` constant (deleted in S2 commit * b1651d9). Reconstructed here per the v0.5 plan ยง10 so the migration can * reproduce keyword routing in the new frontmatter format. */ /** * Canonical keyword โ†’ agent mapping from the deleted `AGENT_ROUTES` map * (pre-S2 v0.4). Keys are `"/"`. */ export declare const CANONICAL_KEYWORDS: Record; export interface BackfillInput { /** Agent folder name (== SKILL.md frontmatter `name`). */ name: string; /** Parent team folder name. */ team: string; /** Original SKILL.md body (frontmatter-free). */ body: string; /** Keyword triggers โ€” usually from CANONICAL_KEYWORDS. */ keywords: string[]; } /** Does `raw` already begin with YAML frontmatter? Used for idempotency. */ export declare function hasFrontmatter(raw: string): boolean; /** * Build the frontmatter YAML block for a backfill target. Returns the inner * YAML text (without `---` fences). The caller wraps with fences and prepends * to the body. * * Field order matches `serializeFrontmatter()` in skill-parser.ts to keep the * round-trip stable: name, description, team, stateful, triggers. */ export declare function buildBackfillFrontmatter(input: BackfillInput): string;