/** * Operational-skill schema: frontmatter shape, parsing, serialization, and name * validation. * * Deliberately NOT `SkillMeta`. `SkillMeta` requires `phase: PhaseName` * (`core/types.ts`) and `parseSkillFile` throws without it * (`compile/loaders.ts:84`) — an operational skill has no lifecycle phase, which * is the constraint behind decision D-1's separate emit path (AC-33, AC-39). * * Requirements: AC-19, AC-20, AC-33, AC-39, AC-42 * * @module */ /** Maximum length of an operational skill name (matches the platform cap). */ export declare const MAX_OPERATIONAL_NAME_LENGTH = 64; /** The literal `kind` value that marks a skill as app-owned (AC-20). */ export declare const OPERATIONAL_KIND = "operational"; /** Frontmatter of an operational skill (AC-39). */ export interface OperationalSkillMeta { /** Skill name; validated by `validateOperationalSkillName`. */ name: string; /** One-line summary of the operation the skill performs. */ description: string; /** Always `'operational'` — the positive ownership marker (AC-20). */ kind: typeof OPERATIONAL_KIND; /** Tool that generated the skill, e.g. `aidlc-add-skill`. */ generated_by: string; /** `@rasensio/aidlc-content` version whose verify steps are inlined. */ content_version: string; /** Optional natural-language trigger description. */ trigger?: string; /** * Repo-relative paths the skill operates on. The ONLY source of paths for the * AC-38 existence check — prose and fenced code blocks are never scanned, which * is how the false-failure exclusion is satisfied structurally. */ paths?: string[]; } /** A parsed operational skill: frontmatter plus markdown body. */ export interface OperationalSkill { meta: OperationalSkillMeta; body: string; } /** Thrown when a name or frontmatter violates the schema. */ export declare class OperationalSchemaError extends Error { constructor(reason: string); } /** * Validate an operational skill name before it is used in any filesystem path. * * This runs before path construction, not after, because the name reaches * `.aidlc/operational-skills/.md` and four platform directories. The * charset alone excludes every traversal character; the explicit separator and * dot-segment checks are defence in depth so that relaxing the charset later * cannot silently reopen traversal. * * @param name - Candidate skill name. * @throws {OperationalSchemaError} When the name is unusable or reserved. */ export declare function validateOperationalSkillName(name: string): void; /** * Serialize an operational skill to frontmatter + body. * * Keys are emitted in `KEY_ORDER` and optional keys are omitted when absent, so * the same input always produces the same bytes — the ordering half of AC-17. * * @param skill - The skill to serialize. * @returns Full file content, frontmatter first. */ export declare function serializeOperationalSkill(skill: OperationalSkill): string; /** * Parse an operational skill file into frontmatter and body. * * @param raw - Full file content. * @returns The parsed skill. * @throws {OperationalSchemaError} On missing/unclosed frontmatter, a missing or * wrongly-typed required field, or an invalid name. */ export declare function parseOperationalSkill(raw: string): OperationalSkill; //# sourceMappingURL=schema.d.ts.map