/**
 * Core Experience Principle — 问题五十六核心机制。
 *
 * 核心原则: 机制强，路径短；规则硬，体验轻；证据足，不啰嗦；能自动修复，不假装完成。
 *
 * 约束所有机制的最终使用形态，防止系统在"治理更强"的同时
 * 退化成用户路径复杂、输出冗长、规则软化或假完成。
 */
/** 核心体验原则契约 */
export interface CoreExperiencePrincipleContract {
    contract_id: "CoreExperiencePrinciple";
    mechanism_strength: {
        real_mainline_hooks: string[];
        hard_fail_rules: string[];
        owner_contracts: string[];
        evidence_required: string[];
    };
    path_shortness: {
        user_entrypoints: string[];
        hidden_internal_steps: string[];
        max_user_required_decisions: number;
        no_internal_contract_required: boolean;
        natural_language_supported: boolean;
    };
    rule_hardness: {
        hard_fail_conditions: string[];
        manual_required_conditions: string[];
        cannot_downgrade_to_warning: string[];
    };
    experience_lightness: {
        risk_based_detail_level: "brief" | "normal" | "full";
        user_visible_summary_required: boolean;
        internal_trace_hidden_by_default: boolean;
        avoid_repeated_confirmation: boolean;
    };
    evidence_sufficiency: {
        required_refs: string[];
        user_visible_evidence_summary: string[];
        audit_trace_refs: string[];
        no_raw_noise: boolean;
    };
    repair_truthfulness: {
        auto_repair_allowed: boolean;
        repair_reverify_required: boolean;
        manual_required_when_unfixable: boolean;
        cannot_mark_done_on_failure: boolean;
    };
}
/** 核心体验原则评估 */
export interface CoreExperiencePrincipleEvaluation {
    task_id: string;
    workflow_id: string;
    evaluated_principles: Array<"strong_mechanism_short_path" | "hard_rules_light_experience" | "sufficient_evidence_concise_output" | "auto_repair_no_fake_completion">;
    violations: CoreExperienceViolation[];
    user_facing_summary_zh: string;
    internal_trace_refs: string[];
    passed: boolean;
}
/** 核心体验违规 */
export interface CoreExperienceViolation {
    principle: string;
    severity: "info" | "warning" | "blocking";
    reason_zh: string;
    evidence_refs: string[];
    required_action: "continue" | "simplify_output" | "回退" | "manual_required" | "block_delivery";
}
/** 用户路径摩擦报告 */
export interface UserPathFrictionReport {
    task_id: string;
    friction_points: Array<{
        step: string;
        description_zh: string;
        severity: "low" | "medium" | "high";
    }>;
    total_steps: number;
    max_expected_steps: number;
    passed: boolean;
    suggestions_zh: string[];
}
/** 证据充足性报告 */
export interface EvidenceSufficiencyReport {
    task_id: string;
    required_evidence_types: string[];
    collected_evidence: string[];
    missing_evidence: string[];
    evidence_quality: "sufficient" | "insufficient" | "noisy";
    passed: boolean;
    issues_zh: string[];
}
/** 修复或需要人工决策 */
export interface RepairOrManualRequiredDecision {
    task_id: string;
    decision: "回退" | "manual_required" | "completed" | "blocked";
    reason_zh: string;
    auto_repairable: boolean;
    repair_scope: string[];
    manual_required_reason?: string;
    evidence_refs: string[];
}
export declare const CORE_EXPERIENCE_DIAGNOSTIC_CODES: Record<string, string>;
/**
 * 评估核心体验原则 — 检查任务执行是否遵守四条核心原则。
 */
export declare function evaluateCoreExperiencePrinciple(params: {
    task_id: string;
    workflow_id: string;
    /** 机制是否有真实 mainline hook */
    has_mainline_hooks: boolean;
    /** 机制是否有 owner contract */
    has_owner_contracts: boolean;
    /** 用户入口是否可用自然语言触发 */
    natural_language_entry: boolean;
    /** 用户是否需要理解内部 contract */
    requires_internal_contract_knowledge: boolean;
    /** 用户路径步数 */
    user_path_steps: number;
    /** 是否有关键失败 */
    has_failures: boolean;
    /** 硬失败是否被降级 */
    hard_fail_downgraded: boolean;
    /** 低风险任务是否被强制重流程 */
    forced_heavy_process: boolean;
    /** 是否有足够证据 */
    has_sufficient_evidence: boolean;
    /** 输出是否过长且无摘要 */
    output_too_long_no_summary: boolean;
    /** 是否只报告问题不修复 */
    report_only_no_repair: boolean;
    /** 失败后是否标记完成 */
    failed_but_marked_done: boolean;
    /** 自动修复是否越权 */
    auto_repair_overreach: boolean;
    /** 修复后是否重验证 */
    repair_reverified: boolean;
    /** 是否输出原始日志 */
    outputs_raw_noise: boolean;
}): CoreExperiencePrincipleEvaluation;
/**
 * 评估用户可见输出质量。
 */
export declare function evaluateUserVisibleOutput(params: {
    has_conclusion_first: boolean;
    has_clear_summary: boolean;
    has_actionable_next_step: boolean;
    exposes_internal_noise: boolean;
    hides_critical_failure: boolean;
    chinese_semantic_first: boolean;
}): {
    passed: boolean;
    issues_zh: string[];
};
/**
 * 评估是否假完成 — 验证失败时是否错误标记为 completed。
 */
export declare function evaluateNoFalseCompletion(params: {
    verification_passed: boolean;
    build_passed: boolean;
    browser_acceptance_passed: boolean;
    guard_passed: boolean;
    evidence_sufficient: boolean;
    current_status: string;
}): RepairOrManualRequiredDecision;
/**
 * 评估机制摩擦 — 新增机制是否过度增加了任务复杂度。
 */
export declare function evaluateMechanismFriction(params: {
    added_steps: number;
    baseline_steps: number;
    risk_level: "low" | "medium" | "high";
    has_necessity_justification: boolean;
    has_lightweight_path: boolean;
}): {
    passed: boolean;
    friction_score: number;
    reason_zh: string;
};
/**
 * 创建核心体验原则契约实例。
 */
export declare function createCoreExperiencePrincipleContract(overrides?: Partial<CoreExperiencePrincipleContract>): CoreExperiencePrincipleContract;
/** 记录 CEP 在真实主链路中的调用 */
export declare function recordCepIntegration(entryPoint: string, result: {
    passed: boolean;
    violations: CoreExperienceViolation[];
}): void;
/** 获取所有已记录的 CEP 集成 */
export declare function getCepIntegrations(): Record<string, {
    passed: boolean;
    violations_count: number;
    recorded_at: string;
}>;
/** 清空 CEP 集成记录 */
export declare function clearCepIntegrations(): void;
//# sourceMappingURL=core_experience_principle.d.ts.map