feat: 任务书 09,materials 模块与提示词

- src/materials:每种提交一个材料函数,生成给模型看的材料、第一条消息、对号清单、能读的代码版本;查询只在材料内按编号找;读提示词并算原始字节哈希;信念本按方法.md 6.10 现算。
- 账本里只存成 Json 的冻结协议、位置表、决定、结算的形状和编号规则由 materials 定义并导出。
- vocab 加 Checklist(对号清单)。
- prompts/:参考项目 3 份角色提示词、16 份任务说明,只做必要改动。
- TASK.md 补一句 unversionedNames 不存进代码版本。
- 方法.md 4.3 ① 改为"研究者任务"放信念本;结构.md vocab 上限 1150、补 materials 对外内容。

用户 2026-10-03 开工前的四个决定(选的都是推荐项):"甲:上限改 1150,只放对号清单";"甲:materials 定义并导出";"不放,改方法.md ① 的措辞";"按原提案挑"。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 04:08:46 -04:00
parent cba1678eaf
commit 446e26224e
41 changed files with 3665 additions and 10 deletions
+50
View File
@@ -0,0 +1,50 @@
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<K extends SubmissionKind> = Extract<Checklist, { kind: K }>;
+1
View File
@@ -29,3 +29,4 @@ export {
} from "./runs.ts";
export { JevJudgment } from "./jev.ts";
export { Range, SUBMISSION_SCHEMAS, type Submission } from "./submissions.ts";
export { type Checklist, type ChecklistOf } from "./checklist.ts";