/**
 * 全生命周期工作流导航契约 — 问题六十五。
 *
 * 核心职责:
 * - 定义项目级阶段 (ProjectStage) 和任务级阶段 (TaskStage)
 * - 提供 NextActionPlan / ExecutableWorkPackage 类型
 * - 声明禁止动作规则
 * - 统一 CLI / MCP / status / validate 的导航输出格式
 */
import type { TaskContext } from "../../types/index.js";
export type ProjectStage = "uninitialized" | "configuration_pending" | "knowledge_ready" | "design_in_progress" | "implementation_ready" | "development_in_progress" | "delivery_ready" | "released";
export declare const PROJECT_STAGES: readonly ProjectStage[];
/**
 * 任务阶段（TaskStage）— 对应两类管线的执行阶段。
 *
 * 新系统管线：需求分析→架构设计→详细设计→任务规划→编码与单元测试→代码审查→联调验证
 * 老系统管线：需求分析→现有系统分析→架构设计→详细设计→任务规划→编码与单元测试→代码审查→联调验证
 *
 * 新系统执行时跳过"现有系统分析"阶段。
 */
export type TaskStage = "需求分析" | "现有系统分析" | "架构设计" | "详细设计" | "任务规划" | "编码与单元测试" | "代码审查" | "联调验证";
export declare const TASK_STAGES: readonly TaskStage[];
/**
 * 导航动作（NavigationAction）— 对应管线各阶段的执行动作。
 *
 * 阶段动作：初始化 / 需求分析 / 现有系统分析 / 架构设计 / 详细设计 / 任务规划 / 编码与单元测试 / 代码审查 / 联调验证
 * 横切动作：回退 / 门禁校验 / 学习沉淀 / 过期状态解决
 */
export type NavigationAction = "初始化" | "需求分析" | "现有系统分析" | "架构设计" | "详细设计" | "任务规划" | "编码与单元测试" | "代码审查" | "联调验证" | "回退" | "门禁校验" | "学习沉淀" | "过期状态解决";
export type DisallowedRuleId = "design_audit_fail_no_coding" | "unconfirmed_config_no_action" | "unconfirmed_decision_no_finalization" | "no_slice_plan_no_wide_coding" | "repair_directive_no_delivery" | "test_fail_no_delivery" | "missing_local_acceptance_no_delivery";
export interface DisallowedAction {
    rule_id: DisallowedRuleId;
    blocked_actions: NavigationAction[];
    reason_zh: string;
    evidence_field?: string;
}
export interface ExecutableWorkPackage {
    id: string;
    goal_zh: string;
    description_zh: string;
    action: NavigationAction;
    tool_name?: string;
    tool_args?: Record<string, unknown>;
    input_files: string[];
    must_read: string[];
    forbidden_changes: string[];
    expected_outputs: string[];
    acceptance_commands: string[];
    user_confirmation_points: string[];
    rollback_or_fallback: string[];
}
export type ConfirmationDecisionLevel = "must_confirm" | "should_confirm" | "auto_resolvable";
export interface ConfirmationDecisionItem {
    id: string;
    level: ConfirmationDecisionLevel;
    title_zh: string;
    reason_zh: string;
    source: "stale_task" | "config" | "decision" | "design" | "repair" | "delivery" | "knowledge" | "work_package";
    blocks_actions: NavigationAction[];
    options_zh: string[];
    command_hint?: string;
    if_unconfirmed_zh: string;
}
export interface ConfirmationDecisionSummary {
    must_confirm: ConfirmationDecisionItem[];
    should_confirm: ConfirmationDecisionItem[];
    auto_resolvable: ConfirmationDecisionItem[];
    blocked_reason: string | null;
    recommended_action: string;
}
export type StaleResolution = "resume" | "archive" | "start_new";
export interface StaleCurrentTaskResult {
    is_stale: boolean;
    task_id: string | null;
    reason_zh: string;
    stale_indicators: string[];
    suggested_resolutions: StaleResolution[];
    current_task_context?: TaskContext;
}
export interface NextActionPlan {
    plan_id: string;
    generated_at: string;
    project_stage: ProjectStage;
    task_stage: TaskStage | null;
    current_task_id: string | null;
    confidence: "high" | "medium" | "low";
    stage_evidence: string[];
    blocking_reasons: string[];
    stale_task: StaleCurrentTaskResult | null;
    work_package: ExecutableWorkPackage | null;
    confirmation_decisions: ConfirmationDecisionSummary;
    disallowed_actions: DisallowedAction[];
    recommended_commands: string[];
    recommended_prompt_zh: string;
    warnings: Array<{
        code: string;
        message_zh: string;
    }>;
    project_knowledge_context?: {
        total: number;
        hard_fail_count: number;
        selected: Array<{
            id: string;
            name: string;
            rel_path: string;
            consumption: string;
            status?: string;
            enforcement?: string;
            reason_zh?: string;
            verification_command?: string;
        }>;
        blocked?: Array<{
            id: string;
            name: string;
            rel_path: string;
            reason_zh: string;
            recovery?: string;
        }>;
    };
    project_path: string;
}
export interface StageExplanation {
    stage: ProjectStage | TaskStage;
    level: "project" | "task";
    label_zh: string;
    description_zh: string;
    required_evidence: string[];
    next_possible_stages: string[];
}
export interface NavigationJsonOutput {
    project_stage: string;
    task_stage: string | null;
    confidence: "high" | "medium" | "low";
    stage_evidence: string[];
    blocking_reasons: string[];
    confirmation_decisions: ConfirmationDecisionSummary;
    recommended_commands: string[];
    recommended_prompt: string;
    disallowed_next_actions: Array<{
        rule_id: string;
        blocked_actions: string[];
        reason_zh: string;
    }>;
    work_package: {
        id: string;
        goal: string;
        input_files: string[];
        must_read: string[];
        forbidden_changes: string[];
        expected_outputs: string[];
        acceptance_commands: string[];
        user_confirmation_points: string[];
        rollback_or_fallback: string[];
    } | null;
}
export interface NavigationSnapshot {
    plan_id: string;
    generated_at: string;
    project_stage: ProjectStage;
    task_stage: TaskStage | null;
    current_task_id: string | null;
    work_package: ExecutableWorkPackage | null;
}
/**
 * 导航阻断 Override 协议。
 *
 * TODO: 当前仅有类型定义，尚未实现运行时逻辑。
 * 计划实现：用户可通过 soloforge config override --rule <rule_id> --reason <reason> 绕过非安全类阻断。
 * 安全类规则（test_fail_no_delivery、repair_directive_no_delivery）不可 override。
 */
export interface NavigationOverride {
    override_reason: string;
    user_confirmation_ref: string;
    risk_acknowledged: boolean;
    overridden_at: string;
    original_plan_id: string;
}
//# sourceMappingURL=workflow_navigation_contract.d.ts.map