import type { SubmissionKind } from "./roster.ts"; /** * 对号清单:materials 为一次任务算出、submissions 拿来判"收不收"的那几样(任务书 09 第三部分"对号清单")。 * 两个模块互不引用,所以放在这里(用户 2026-10-03 决定 1)。只放提交之前就知道的东西; * 实验员改了哪些文件这类提交之后才知道的,随提交一起交给 submissions。编号都是材料里写给模型的那一种。 */ /** 提案、回应、统一共用:因子数上限、"延续"能写的全局因子编号、能引用的假设专用指标、已被占用的指标编号。 */ type FactorRules = { factorLimit: number; continuable: string[]; /** 冻结协议里登记过的假设专用指标的全名("候选编号.短名")。 */ reusableMetrics: string[]; /** * 新登记的短名不能用的编号:最终指标、常规辅助指标和答案路径的两个保留键。 * 已登记的假设专用指标不在这里:它们的全名都带".",短名不带,不会重名。 */ takenMetricIds: string[]; }; /** 实现、修复、核验共用:冻结协议的实现条款(c1…)、因子(p1…)、保障短名。 */ type FrozenItems = { candidate: string; clauses: string[]; factors: string[]; safeguards: string[] }; /** 入口个数的范围(方法.md 4.2:2–3 个)。 */ type EntryCount = { min: 2; max: 3 }; export type Checklist = | { kind: "entry"; entries: EntryCount } | { kind: "discussion"; entries: EntryCount } /** minChoices = min(N, 入口总数)(方法.md 4.2 认领)。 */ | { kind: "claim"; entries: string[]; minChoices: number } | ({ kind: "proposal"; maxProposals: number } & FactorRules) | { kind: "firstPrediction"; candidate: string } | { kind: "secondPrediction"; candidate: string } /** 挑刺按原提案挑:那条原提案的编号和它的因子编号(用户 2026-10-03 决定 4)。 */ | { kind: "critique"; proposal: string; factors: string[] } /** critiques 是针对本候选各份原提案的全部挑刺编号。 */ | ({ kind: "response"; candidate: string; critiques: string[] } & FactorRules) /** sources 是被合并的原提案编号。 */ | ({ kind: "unification"; candidate: string; critiques: string[]; sources: string[] } & FactorRules) | ({ kind: "implementation" } & FrozenItems) | ({ kind: "repair" } & FrozenItems) /** unassigned 是没有归属的改动,写法与材料里列的相同。 */ | ({ kind: "verification"; unassigned: string[] } & FrozenItems) /** cells 是要给三个数的格(被采纳改法的因子编号 p1…),maxExplanations 是 M。 */ | { kind: "explanation"; cells: string[]; maxExplanations: number } /** off 是这一格要关的因子编号,factors 是被采纳改法的全部因子编号。 */ | { kind: "ablationImplementation"; cell: string; off: string; factors: string[] } | { kind: "ablationVerification"; cell: string; factors: string[] } | { kind: "wrapUp" }; /** 某种提交的对号清单,例如 ChecklistOf<"proposal">。 */ export type ChecklistOf = Extract;