/**
 * Knowledge Asset Schema — 问题五十七核心机制之一。
 *
 * 定义所有知识资产的统一 frontmatter 标准、类型枚举和校验规则。
 * 所有 templates/**（internal/rules、procedures、rules/shared、checklists、artifacts/shared、domain、internal/patterns、profiles）、templates/patterns/**、项目 .soloforge/knowledge/**
 * 和全局 patterns 必须遵守此 schema。
 */
/** 知识资产类型 */
export type KnowledgeAssetKind = "hard_rule" | "workflow" | "procedure" | "pipeline" | "pattern" | "checklist" | "artifact_template" | "review_rule" | "domain_knowledge" | "product_profile";
/** 知识权威级别 */
export type KnowledgeAuthority = "canonical" | "supporting" | "example";
/** 知识生命周期状态 */
export type KnowledgeLifecycleStatus = "draft" | "active" | "deprecated" | "quarantine";
/** 重复类型 */
export type KnowledgeDuplicateKind = "exact_duplicate" | "semantic_overlap" | "conflict" | "legitimate_cross_reference";
/** 知识资产优先级 */
export type KnowledgePriority = "P0" | "P1" | "P2" | "P3";
/** 知识资产 Frontmatter */
export interface KnowledgeAssetFrontmatter {
    id: string;
    name: string;
    asset_kind: KnowledgeAssetKind;
    lifecycle_status: KnowledgeLifecycleStatus;
    authority: KnowledgeAuthority;
    owner_mechanism_id?: string;
    scope: string[];
    products: string[];
    routes: string[];
    primary_triggers: string[];
    secondary_triggers?: string[];
    negative_triggers?: string[];
    priority: KnowledgePriority;
    specificity: number;
    consumes?: string[];
    emits?: string[];
    required_evidence?: string[];
    hard_blocks?: string[];
    fallback?: "none" | "auto_repair" | "manual_required" | "fallback_allowed";
    supersedes?: string[];
    related_assets?: string[];
    version: string;
    last_reviewed: string;
    migration_note?: string;
    schema?: string;
    hash?: string;
    user_modified?: boolean;
}
/** 完整的知识资产（含正文） */
export interface KnowledgeAsset {
    frontmatter: KnowledgeAssetFrontmatter;
    body: string;
    file_path: string;
    content_hash: string;
}
/** Schema 校验发现 */
export type SchemaValidationFindingKind = "missing_required_field" | "invalid_enum" | "invalid_version" | "duplicate_id" | "duplicate_canonical" | "owner_missing" | "required_evidence_missing" | "deprecated_injected" | "checklist_hard_rule_violation";
export interface SchemaValidationFinding {
    asset_id: string;
    file_path: string;
    severity: "hard_fail" | "warning" | "advisory";
    kind: SchemaValidationFindingKind;
    field?: string;
    message_zh: string;
}
/**
 * 校验知识资产 frontmatter 的完整性。
 */
export declare function validateKnowledgeAssetFrontmatter(frontmatter: Partial<KnowledgeAssetFrontmatter>, filePath: string): SchemaValidationFinding[];
/**
 * 批量校验知识资产注册表。
 */
export declare function validateKnowledgeAssets(assets: Array<{
    frontmatter: Partial<KnowledgeAssetFrontmatter>;
    file_path: string;
}>): SchemaValidationFinding[];
/**
 * 构建知识资产注册表 — 从资产列表中建立索引。
 */
export declare function buildKnowledgeAssetRegistry(assets: KnowledgeAsset[]): Map<string, KnowledgeAsset>;
/**
 * 检测重复与冲突。
 */
export declare function detectDuplicateAndConflicts(assets: KnowledgeAsset[]): Array<{
    kind: KnowledgeDuplicateKind;
    asset_ids: string[];
    detail_zh: string;
    suggested_action: string;
}>;
/**
 * 解析 canonical 权威 — 确定哪个资产是主题的权威定义。
 */
export declare function resolveCanonicalAuthority(assets: KnowledgeAsset[], subject: string): {
    canonical_id?: string;
    supporting_ids: string[];
    conflicts: string[];
};
//# sourceMappingURL=knowledge_asset_schema.d.ts.map