AI 首答试用:任务与协议
研究总览 · 2026-09-20
附录 G 的任务、契约和运行记录;原始答案与验收器见同组分篇。
附录 G:四种封闭契约的 AI 首答与完整验收重放
Section titled “附录 G:四种封闭契约的 AI 首答与完整验收重放”对应 §17.9。全部文件实际位于 TEMP 的 \aira-core-contract-pilot-20260920 目录;研究材料保存在同组证据分篇,不把此原型接入产品或 test/spec。重放时将本篇契约、同组原始答案和验收重放源码保存为对应文件名,先按附录 F 恢复其原始探针文件,再运行 node evaluate.mjs –freeze、node evaluate.mjs。求解器与 OCCT 路径沿用附录 C 与附录 F。freeze 只生成本地协议快照,不是项目 Gate;不要覆盖已有原始快照。重放可以验证已提交产物,重新让模型生成不保证相同答案。
四个内部作者分别为 /root/pilot_feature、/root/pilot_program、/root/pilot_relation、/root/pilot_hybrid,均以 fork_turns=none 创建,未指定模型或推理设置覆盖,未共享研究历史。工具没有返回可冻结的模型 snapshot、采样 seed、推理 token 账单,不能将本轮当作有完整模型版本/预算控制的统计试验。由于并发名额限制,F/P 先执行,R/H 在其完成后开始;四者是独立会话,没有将前组答案传给后组。
每次调用的初始消息遵循以下同一模板,仅替换候选契约文件、输出文件和字母:
Conduct one closed-contract CAD authoring trial. Work folder
/aira-core-contract-pilot-20260920. Read only tasks.md, common-contract.md, and [candidate]-contract.md in that folder. Follow that research procedure: do not read repository/research/evaluator/other candidate files; no search, delegation, external calls, or geometry/solver execution. Produce a valid UTF-8 JSON artifact answers-[letter].json in that folder containing parameterized solutions for T1–T5 following candidate [letter], with one final submission. You may validate JSON syntax. Use the inherited model/settings, with a maximum of 8 minutes and no correction feedback in this round. Do not modify any other file. Final response should concisely state completion and what reasoning the contract leaves to the author. This is an isolated research artifact, not product code.
实际最终环境为 Node v24.19.0,HiGHS 核心 1.15.1;OCCT WASM SHA-256 为 218e80a3fb69d62de4b44b613f64c0d99f3f8d2ad5cb5ce3aeea568805fcdcfa。原始 protocol.json SHA-256 为 b72c071e7ac844b0d010473cbaae709c521b8116069e931aa30bc21608b07073;其样本内容由同组 evaluate.mjs 的 cases 生成式完整保存,时间戳与本机路径不要求重放一致。最终评估器 SHA-256 为 461e8e29046459bd7f3b005624e3b237904933a60eb3f265fcd970db514a438c。OCCT 复用附录 F 已核查的函数,仅在内存中将孔中心扩展到 XY、移除旧单排意图判定;源码转换有精确匹配检查和原文件哈希检查,新的任务判定独立执行。并非调用另一套产品建模管线。
原始产物与源文件如下。哈希按原始 UTF-8 字节计算;复制后的换行变化会改变哈希。答案保持首答,不包含根据评估结果修正的版本。
拆分前已从原文实际提取全部 11 个文件,在新的 TEMP 子目录重新生成协议并执行最终评估器:160 个求值单元的判定与实际几何测量均与原记录一致。这验证文档足以重放产物验收,不是第二轮独立 AI 采样。
| 文件 | 原始字节 | SHA-256 |
|---|---|---|
| tasks.md | 3843 | fd41684914b9247ef731753efe72762a9718f45106d0f01a94e23407adfe990e |
| common-contract.md | 3546 | a918ef1d8d66c6a99ad4dc2b7826f8882b2300fb624058d5bd3ce2e0eaa179ab |
| feature-contract.md | 776 | e6d2d9eb339b327c9bbe903597aef2daa7d59f29db4f7277bcc47288701703b9 |
| program-contract.md | 774 | 39910ca8d6873bc089ac0a7f00e0a308500a09c5dfb3587639b3e8e64697c5e9 |
| relation-contract.md | 813 | 454efaa8a083ff1e74f2ec54e375c1697fda01d15a0330ef91152857fa8a6f49 |
| hybrid-contract.md | 807 | ce8d0687843cb43f7a0c2544a4519d6108b99a0bd65ed113f40aa4f6da71b742 |
| answers-F.json | 2943 | cecd0dcdb70a1b4db4b3776bca509d440942e25ab36cef9848bd5d477d281ae0 |
| answers-P.json | 3629 | cfb78d56f7bc80e662fce9514d9035cdbf526269e4cddf47b66691cadf1375db |
| answers-R.json | 4082 | 94520a12c2c0529299cf46245b92ce9d8a0d41b31aa8fe420c6a7ac05c289041 |
| answers-H.json | 3184 | 95fded212ea697d8d2a229878a964cf5a4a098c189f056c0311d577ce64408a3 |
| evaluate.mjs | 17667 | 461e8e29046459bd7f3b005624e3b237904933a60eb3f265fcd970db514a438c |
G.1 tasks.md
Section titled “G.1 tasks.md”# Closed-contract CAD authoring pilot
Produce five parameterized designs, one for each task below. Output a JSON object whose keys are `T1` through `T5`, with each value following your assigned contract. The evaluator changes `p`; do not hardcode the example values. Every numeric length is mm. Plate coordinates start at (0,0,0); width is X, height is Y, thickness is +Z. Holes are perpendicular circular through holes. All parameters are finite; n is an integer >=2, dimensions/d/edge/web/pitch/rho are positive. phase is in radians.
For every task: plate height/thickness and hole diameter/count must match the input; hole-to-plate-edge clearance must be >=p.edge, and every pair of hole boundaries must have Euclidean clearance >=p.web. Reject infeasible requests without emitting a geometry. A rejection only counts correct where requirements within the stated structure domain really are infeasible. No other changes or extra holes are permitted. Parameter changes must cause reevaluation of the whole design under the same rules. This is a research authoring test, not a real persistent editing session.
## T1: equally spaced row with exact end marginsUse width p.width. All n hole centres lie on y=p.height/2, ordered from left to right. Adjacent X centre gaps equal. Both leftmost and rightmost hole-to-plate-edge clearances equal p.edge exactly. Example p={width:83,height:31,thickness:4,d:6,n:4,edge:7,web:3}.
## T2: fixed-pitch row, centred as a groupUse width p.width. n holes on y=p.height/2, adjacent X centre gap p.pitch exactly; group midpoint is p.width/2. End clearances may change but must meet p.edge. Example p={width:91,height:30,thickness:4,d:6,n:4,edge:7,web:3,pitch:19}.
## T3: authorized structure choiceUse width p.width. n is always 4. Allowed structures appear in p.allowed as strings `row` and/or `grid`. A row has four equally spaced holes on y=p.height/2; a grid has two distinct equally spaced columns and two distinct equally spaced rows, centred on the plate. Any legal pitch is acceptable. When both are feasible AND authorized, prefer row; otherwise use the feasible authorized structure. Changing to an unauthorized structure is failure. Example p={width:30,height:30,thickness:4,d:6,n:4,edge:7,web:3,allowed:["row","grid"]}. Other inputs include locked structure and infeasible dimensions.
## T4: oriented bolt circle on a rectangular plateUse width p.width. n holes lie on a circle of radius p.rho about the plate centre. The first hole is at angle p.phase; successive holes advance 2*Math.PI/p.n counterclockwise. The hole set must match these angles, within tolerance. Example p={width:80,height:72,thickness:4,d:6,n:6,edge:7,web:3,rho:22,phase:0.21}.
## T5: inverse dimension with an explicit objectiveWidth is unknown. Choose the smallest width within [p.minWidth,p.maxWidth] that fits a centred n-hole row of exact centre pitch p.pitch on y=p.height/2. Respect all common clearances. Height, thickness, diameter, count, pitch, and edge requirement remain fixed. Reject if the interval contains no feasible width. Example p={minWidth:20,maxWidth:120,height:30,thickness:4,d:6,n:4,edge:7,web:3,pitch:19}.
## ProcedureRead only this file and your assigned contract. Do not inspect other candidate files, evaluators, prior research, or implementation source. Do not call external services, delegate, or run a model/provider. Author one final JSON artifact at the path named in your task. You may check JSON syntax; do not run candidate geometry or solver evaluations. There is one authoring submission per candidate and no corrective feedback in this round. The parent will independently evaluate it. Briefly explain in your final response which task decisions you expressed explicitly and which your contract delegates to the engine. This pilot has no claim of statistical superiority.G.2 common-contract.md
Section titled “G.2 common-contract.md”# Common contract details
An expression (`Expr`) is a JSON number, boolean, or a string containing a pure JavaScript expression, evaluated with `p` (task parameters), `v` (solved scalar variables, if any), `i` (zero-based hole index where stated), and `Math`. In check expressions, `g` is the constructed numeric geometry. Expressions may use normal arithmetic, conditionals, boolean logic, Math functions, and non-mutating array methods. Do not use assignment, imports, I/O, async, randomness, or global variables. Integer counts must be positive. Numbers must be finite. A false check rejects that branch, and the engine tries the next branch if present. Errors or unsupported fields are failures, not mathematical infeasibility. Unrecognized solver statuses are unknown, not infeasible.
Numeric geometry is `{width:number,height:number,thickness:number,holes:[{x:number,y:number,r:number}]}`. The engine uses the same mature OCCT construction and independent final-solid checks for every candidate. Shared physical validation enforces positive dimensions, holes inside the plate, and no touching or overlapping holes. It does NOT automatically know the task-specific edge/web/pitch/intent requirements: encode them using the mechanisms provided in your contract. The independent evaluator does know the requirements and will reject wrong answers.
An optional `checks` array contains Expr booleans tested after numeric geometry generation. Rejection returns no geometry. A candidate must not rely on the independent evaluator as its own repair/search engine.
Feature list: first `{kind:"plate",width:Expr,height:Expr,thickness:Expr}`; then any sequence of:- `{kind:"hole",x:Expr,y:Expr,r:Expr}`.- `{kind:"linear",n:Expr,x:Expr,y:Expr,dx:Expr,dy:Expr,r:Expr}`: n centres at (x+i*dx,y+i*dy).- `{kind:"grid",nx:Expr,ny:Expr,x:Expr,y:Expr,dx:Expr,dy:Expr,r:Expr}`: nx columns, ny rows at (x+i*dx,y+j*dy).- `{kind:"circular",n:Expr,cx:Expr,cy:Expr,rho:Expr,phase:Expr,r:Expr}`: n centres advancing counterclockwise from phase.No topology index selection is needed in this restricted plate domain. These patterns are supported features, not techniques reserved for one candidate.
Declarative geometry: `{width:Expr,height:Expr,thickness:Expr,holes:[{count:Expr,x:Expr,y:Expr,r:Expr}]}`. Each hole group evaluates its x/y/r expressions for local index i=0..count-1. Several groups concatenate. Known coordinate formulas are allowed; there is no requirement to solve already-known values.
Solver block: optional `vars` maps unique scalar names to `{lower:Expr,upper:Expr,cost:Expr}`; omitted bounds mean unbounded, omitted cost is 0. `constraints` is an array of `{terms:{varName:Expr,...},op:"eq"|"le"|"ge",rhs:Expr}`. All coefficients and bounds depend only on p and Math, not v or g. These define a linear program minimizing the sum cost*variable. If vars is empty/absent, constraints must be empty/absent and no solver is invoked. Otherwise the engine calls HiGHS; optimal variable values are available as v.name. LP infeasibility rejects the branch; all other non-optimal statuses are unknown. This pilot exposes only linear continuous solving; do not assume nonlinear/integer solving. If an LP admits several optimal solutions, every output solution must still satisfy the task; do not rely on a particular tie choice.
Tiny syntax examples, not task solutions: Expr `"p.width/2"`; check `"g.holes.every(h => h.r > 0)"`; variable `{"length":{"lower":0,"upper":100,"cost":1}}`; row `{"terms":{"length":1},"op":"ge","rhs":"p.minimum"}`.G.3 feature-contract.md
Section titled “G.3 feature-contract.md”# Candidate F: parameterized feature recipesRead common-contract.md as part of this contract. Each task value is `{variants:[{when:Expr,features:[...],checks:[...]}]}`. Variants are attempted in array order; when is optional and defaults true. Expressions are reevaluated for each new p. Features retain parameter expressions and patterns; they are not literal coordinate-only operations. A passing variant returns its geometry. If all variants are ineligible or fail their checks/physical validation, return infeasible. There is no implicit structure search beyond the variants you specify, and no equation solver in this contract. Encode derived parameter formulas and branch feasibility conditions explicitly. Do not include vars, constraints, geometry, or source fields.G.4 program-contract.md
Section titled “G.4 program-contract.md”# Candidate P: parameterized construction programRead common-contract.md as part of this contract. Each task value is `{source:"function(p) { ... }"}`. The engine runs this pure synchronous JavaScript function with p and Math, bounded to 100 ms per call. Loops, functions, and arrays are allowed. Return numeric geometry directly, or `{status:"infeasible",reason:"..."}`, or `{status:"unknown",reason:"..."}`. There are no implicit pattern helpers, solver calls, checks fields, or structure selection. Build repeated shapes with normal program composition and implement feasibility checks. Imports, I/O, async, process, require, randomness, and external state are forbidden. The engine validates physical geometry; the independent task evaluator then checks design intent.G.5 relation-contract.md
Section titled “G.5 relation-contract.md”# Candidate R: declarative geometry with linear relationsRead common-contract.md as part of this contract. Each task value is `{branches:[{when:Expr,vars:{...},constraints:[...],geometry:{...},checks:[...]}]}`. when defaults true and depends only on p/Math. Branches are attempted in order; the engine solves each eligible branch's LP, evaluates geometry, and evaluates checks. The first feasible passing branch returns geometry. If all branches are ineligible or infeasible, return infeasible. Any unknown solve stops as unknown. Known values may be calculated directly; do not add unnecessary variables. The core performs numerical solving and branch search, but you must declare a complete authorized structural domain and correct relationships. Use declarative geometry, not feature lists or program source.G.6 hybrid-contract.md
Section titled “G.6 hybrid-contract.md”# Candidate H: relations for parameters, features for constructionRead common-contract.md as part of this contract. Each task value is `{branches:[{when:Expr,vars:{...},constraints:[...],features:[...],checks:[...]}]}`. when defaults true and depends only on p/Math. Branches are attempted in order. Each eligible branch solves its declared LP, applies the feature list using p and v, and evaluates checks. The first passing branch returns geometry. If all are ineligible/infeasible, return infeasible. Unknown solve stops as unknown. Direct formulas are allowed for known values; solver variables are optional. You choose which values are derived by formulas and which by equations; construction uses the same feature primitives described in the common contract. Do not include geometry or source fields.