/** * 条件产物判定 — 解释 task scope、系统上下文和声明式项目事实。 * * scope 只读任务启动时的确认值;部署方式只读配置解析结果,不从产物存在性反推。 * * 职责边界: * - 负责:解析通用 condition 字符串并读取显式注入的事实 * - 不负责:scope 的确定、证据缺失提示或门禁执行 * * 被谁调用:证据需求策略和 prerequisite executor * 调用谁:无(纯函数读 scope 布尔) * * 数据流:condition 字符串 + task.scope/system_context/project facts → 是否适用(布尔) * * condition 取值约定(contract 里 condition 字段): * - scope:frontend → prototype_spec 产(涉及前端交互) * - scope:persistence → database_design 产(涉及持久化) * - scope:api → api_spec 产(涉及接口) * - scope:code → test_plan / test_report 产(涉及代码) * - deployment:docker_compose → 仅 Compose 项目产容器组合运行资产 * 无 condition 表示总是 required。 */ import type { TaskScope } from "../types/index.js"; export interface ArtifactApplicabilityFacts { deploymentMethod?: string; } /** 判定产物的 condition 是否满足。 * - 无 condition = true(无条件产物总 required) * - brownfield = 仅老系统改造(task.system_context === "brownfield"),如 compatibility_assessment * - scope: = 读 task.scope[dim] * - 未知前缀 = 保守 true(按 required 列 pending,不静默跳过) * 未知条件保守视为适用,避免静默漏证据。 */ export declare function meetsArtifactCondition(artifact: { condition?: string; }, task: { scope?: TaskScope; system_context?: string; } | null | undefined, facts?: ArtifactApplicabilityFacts): boolean; /** 判定跨域上游要求是否适用于当前任务(requires_upstream.condition)。 * - 无 condition / always = 总需要 * - brownfield = 仅老系统(task.system_context === "brownfield") * - scope:<维度> = 仅当 task.scope 维度满足(如 scope:frontend=涉及前端才需 prototype_spec 上游) * 证据依赖判断与上游内容加载共用此条件,避免双源。 */ export declare function meetsUpstreamCondition(req: { condition?: string; }, task: { system_context?: string; scope?: TaskScope; }, facts?: ArtifactApplicabilityFacts): boolean;