/**
 * Skill store — CRUD operations for learned skills on disk.
 * Storage: ~/.owlcoda/skills/<id>/SKILL.md + metadata.json
 */
import type { SkillDocument, SkillMetadata } from './schema.js';
/**
 * Save a skill document to disk.
 */
export declare function saveSkill(skill: SkillDocument): Promise<void>;
/**
 * Load a skill document by ID.
 */
export declare function loadSkill(id: string): Promise<SkillDocument | null>;
/**
 * Delete a skill by ID.
 */
export declare function deleteSkill(id: string): Promise<boolean>;
/**
 * List all skill metadata (lightweight).
 */
export declare function listSkills(): Promise<SkillMetadata[]>;
/**
 * Check if a skill exists.
 */
export declare function skillExists(id: string): Promise<boolean>;
/**
 * Increment use count for a skill.
 */
export declare function recordSkillUse(id: string): Promise<void>;
/**
 * Get total skill count.
 */
export declare function getSkillCount(): Promise<number>;
/**
 * Evolve a skill — update an existing skill with new content, preserving lineage.
 * Increments version, updates content, and records parent if evolving to a new ID.
 */
export declare function evolveSkill(existingId: string, updates: Partial<Pick<SkillDocument, 'name' | 'description' | 'procedure' | 'pitfalls' | 'verification' | 'tags' | 'whenToUse'>>, options?: {
    newId?: string;
}): Promise<SkillDocument | null>;
/**
 * Get version history for a skill (by following parentId chain).
 */
export declare function getSkillLineage(id: string): Promise<SkillDocument[]>;
/**
 * Load learned skills from ~/.owlcoda/skills/ (user-synthesized).
 */
export declare function loadLearnedSkills(): Promise<SkillDocument[]>;
/**
 * Load all full skill documents (for matching).
 * Merges curated skills (project's skills/) with learned skills (~/.owlcoda/skills/).
 * Learned skills override curated skills with the same ID.
 */
export declare function loadAllSkills(): Promise<SkillDocument[]>;
export interface SkillBundle {
    version: 1;
    exportedAt: string;
    source: string;
    skills: SkillDocument[];
}
/**
 * Export skills as a portable JSON bundle.
 * @param ids — if provided, export only these skills. If empty, export all learned skills.
 */
export declare function exportSkills(ids?: string[]): Promise<SkillBundle>;
export interface ImportResult {
    imported: number;
    skipped: number;
    errors: string[];
}
/**
 * Import skills from a JSON bundle.
 * @param overwrite — if true, overwrite existing skills. Default: false (skip).
 */
export declare function importSkills(bundle: SkillBundle, overwrite?: boolean): Promise<ImportResult>;
/**
 * Import skills from a JSON bundle, a Claude-style SKILL.md file, or a
 * directory containing SKILL.md. Directory imports preserve references,
 * scripts, and assets alongside normalized OwlCoda metadata.
 */
export declare function importSkillsFromPath(inputPath: string, overwrite?: boolean): Promise<ImportResult>;
export interface CleanupConfig {
    /** Max days since last use before marking stale (default: 90) */
    staleDays: number;
    /** Min useCount to be exempt from cleanup (default: 3) */
    minUseCount: number;
    /** Actually delete — if false, just report (default: false) */
    dryRun: boolean;
}
export interface CleanupResult {
    stale: string[];
    unused: string[];
    removed: string[];
    kept: number;
}
/**
 * Identify and optionally remove stale/unused learned skills.
 * Only operates on learned skills (~/.owlcoda/skills/), not curated skills.
 */
export declare function cleanupSkills(config?: Partial<CleanupConfig>): Promise<CleanupResult>;
