/** * The harness-neutral skill metadata, declared once per skill and translated by * each adapter (native-skill-metadata). * * A content skill may declare four keys beside `name` and `description`: * * - `arguments` — a one-line argument hint, e.g. ` `. * - `invocation` — who may start the skill: `auto` (the model, on a matching * request), `routed` (reached through another skill or by name), `user` (only * the user, by name — for skills that start background work). * - `tier` — the phase cost tier `.aidlc/config.yaml`'s `skill_tiers` maps to a * model and effort. * - `activation` — `none` keeps the phase's capability-map directive off a skill * that produces no phase artifact. * * The allowed values live here and only here, so the parser, the adapters and the * config check cannot disagree. None of the four reaches the shared copy under * `.aidlc/skills/`: `formatCanonicalSkill` writes a fixed five-key header. * * Requirements: native-skill-metadata/AC-1, AC-2, AC-14, AC-16 * * @module */ import type { Skill, SkillMeta } from '../core/types.js'; export declare const INVOCATIONS: readonly ["auto", "routed", "user"]; export declare const TIERS: readonly ["reasoning", "standard", "mechanical"]; export declare const ACTIVATIONS: readonly ["phase", "none"]; /** Claude Code's `effort` values. `inherit` is accepted in config and writes nothing. */ export declare const EFFORTS: readonly ["low", "medium", "high", "xhigh", "max"]; export type SkillInvocation = (typeof INVOCATIONS)[number]; export type SkillTier = (typeof TIERS)[number]; export type SkillActivation = (typeof ACTIVATIONS)[number]; export type EffortLevel = (typeof EFFORTS)[number]; /** Validated per-tier settings. A tier or a field that is absent means inherit. */ export type SkillTierSettings = Partial>; /** * Read the four keys off a parsed frontmatter mapping. * * Strict, unlike the lenient parse of `trigger` and `priority`: a typo in * `invocation` that silently became `auto` would leave autopilot model-invocable * with every test green. The shipped skills go through this in the content tests, * so a bad value fails this repo's build rather than a user's `aidlc update` * (native-skill-metadata/AC-2, DD-1). */ export declare function readSkillMetadata(m: Record, filePath: string): Pick; /** * `skill_tiers` from `.aidlc/config.yaml`, validated. * * Absent is the default and says nothing: every skill inherits the session's * model (native-skill-metadata/AC-15). Each rejected value is dropped with one * warning naming its key, and the rest still apply (AC-16). * * A model is checked against a token pattern, not a list of model names: Claude * Code keeps the current model when a value is outside the organisation's * `availableModels`, so a well-formed unknown name is harmless, and a list would go * stale with every model release. The pattern is what blocks header injection * (DD-4). */ export declare function resolveSkillTiers(raw: unknown): { tiers: SkillTierSettings; warnings: string[]; }; /** * A YAML double-quoted scalar that parses back to `text` exactly. * * A JSON string is a valid YAML double-quoted scalar, and quoting is what stops * `[instance]` being read as a list or a trigger's `: ` splitting a mapping * (native-skill-metadata/AC-8, AC-9). */ export declare function yamlString(text: string): string; /** * Whether a skill takes its phase's capability-map directives. * * Checked in the Claude Code and Codex adapters rather than in the shared * `resolveActivation`, because Copilot uses that resolver and its output must not * change (native-skill-metadata/AC-12, AC-20, AC-24, DD-2). */ export declare function takesPhaseDirectives(skill: Skill): boolean; //# sourceMappingURL=skill-metadata.d.ts.map