/**
 * User-authored local scaffolds — tasks, projects, plans, checklists, contracts,
 * verification policies. Versioned, variable-driven, fully offline.
 */
import type { Database } from "bun:sqlite";
import { type TemplateExport } from "../db/templates.js";
import type { TemplateVariable } from "../types/index.js";
export declare const USER_SCAFFOLD_SCHEMA = "todos.user_scaffold.v1";
export declare const SCAFFOLD_KINDS: readonly ["task", "project", "plan", "checklist", "contract", "verification_policy"];
export type ScaffoldKind = (typeof SCAFFOLD_KINDS)[number];
export interface UserScaffold {
    schema_version: typeof USER_SCAFFOLD_SCHEMA;
    id: string;
    name: string;
    slug: string;
    kind: ScaffoldKind;
    version: number;
    description: string | null;
    variables: TemplateVariable[];
    payload: Record<string, unknown>;
    template_id: string | null;
    created_at: string;
    updated_at: string;
}
export interface UserScaffoldStore {
    schema_version: typeof USER_SCAFFOLD_SCHEMA;
    scaffolds: Record<string, UserScaffold>;
    updated_at: string;
}
export interface ScaffoldPreview {
    schema_version: typeof USER_SCAFFOLD_SCHEMA;
    scaffold_id: string;
    kind: ScaffoldKind;
    dry_run: true;
    resolved_variables: Record<string, string>;
    preview: Record<string, unknown>;
}
export declare function loadUserScaffoldStore(cwd?: string): UserScaffoldStore;
export declare function saveUserScaffoldStore(store: UserScaffoldStore, cwd?: string): void;
export declare function listUserScaffolds(kind?: ScaffoldKind, cwd?: string): UserScaffold[];
export declare function getUserScaffold(idOrSlug: string, cwd?: string): UserScaffold | null;
export declare function createUserScaffold(input: {
    name: string;
    kind: ScaffoldKind;
    description?: string;
    variables?: TemplateVariable[];
    payload?: Record<string, unknown>;
    template_export?: TemplateExport;
}, db?: Database, cwd?: string): UserScaffold;
export declare function updateUserScaffold(idOrSlug: string, updates: {
    name?: string;
    description?: string;
    variables?: TemplateVariable[];
    payload?: Record<string, unknown>;
    template_export?: TemplateExport;
    migrate?: "safe" | "force";
}, db?: Database, cwd?: string): UserScaffold;
export declare function previewUserScaffold(idOrSlug: string, variables?: Record<string, string>, db?: Database, cwd?: string): ScaffoldPreview;
export declare function applyUserScaffold(idOrSlug: string, variables?: Record<string, string>, db?: Database, cwd?: string): Record<string, unknown>;
export declare function exportUserScaffold(idOrSlug: string, db?: Database, cwd?: string): UserScaffold & {
    template?: TemplateExport;
};
export declare function importUserScaffold(payload: UserScaffold & {
    template?: TemplateExport;
}, strategy?: "skip" | "overwrite", db?: Database, cwd?: string): UserScaffold;
export declare function linkTemplateAsScaffold(templateId: string, name?: string, db?: Database, cwd?: string): UserScaffold;
export declare function getUserScaffoldDocs(): string;
export declare function listLinkedTemplates(db?: Database, cwd?: string): Array<{
    template_id: string;
    template_name: string;
    scaffold: UserScaffold;
}>;
//# sourceMappingURL=user-scaffolds.d.ts.map