{"profile":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/profile","title":"Machine profile","$ref":"#/$defs/profile","$defs":{"sha":{"type":"string","pattern":"^[0-9a-f]{40}$","description":"a full git commit id (or git object id of a file)"},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"the SHA-256 of an uploaded file or of generated content"},"time":{"type":"string","format":"date-time"},"file":{"type":"object","required":["hash","kind"],"additionalProperties":false,"description":"an uploaded file: its hash, kind and the tool that wrote it","properties":{"hash":{"$ref":"#/$defs/hash"},"kind":{"enum":["capture","log","firefox-profile","deep-summary","engine-report","chrome-trace","pix-events","pix-summary","nsight-summary","vulkan-counters","shader-report"]},"tool":{"type":"string","minLength":1,"maxLength":300}}},"gpu":{"type":"object","required":["vendor","model","driver","type"],"additionalProperties":false,"properties":{"vendor":{"type":"string","minLength":1,"maxLength":300},"model":{"type":"string","minLength":1,"maxLength":300},"driver":{"type":"string","minLength":1,"maxLength":300},"type":{"enum":["integrated","discrete","unknown"]}}},"setup":{"type":"object","required":["id","runtime","api","gpu","refresh_hz","power","measures"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{0,62}$"},"runtime":{"type":"string","minLength":1,"maxLength":300,"description":"\"native\", or a browser and its version"},"api":{"enum":["d3d12","vulkan","metal","gl","unknown"]},"gpu":{"type":"string","minLength":1,"maxLength":300,"description":"the model of the GPU it uses (one of machine.gpus), or \"unknown\""},"refresh_hz":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"const":"unknown"}]},"power":{"enum":["ac","battery","unknown"]},"measures":{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"maxLength":300},"description":"metric patterns it can produce, from the catalog"},"features":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"verified":{"type":"object","required":["sha","at"],"additionalProperties":false,"properties":{"sha":{"$ref":"#/$defs/sha"},"at":{"$ref":"#/$defs/time"}},"description":"when the engine's measure command last ran the factory's setup check on it: the main commit, and the time"}}},"profile":{"type":"object","required":["machine","setups","toolchain"],"additionalProperties":false,"properties":{"machine":{"type":"object","required":["id","os","cpu","cores","memory_gb","gpus"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{0,62}$"},"os":{"type":"string","minLength":1,"maxLength":300},"cpu":{"type":"string","minLength":1,"maxLength":300},"cores":{"anyOf":[{"type":"integer","minimum":1},{"const":"unknown"}]},"memory_gb":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"const":"unknown"}]},"gpus":{"type":"array","items":{"$ref":"#/$defs/gpu"}}}},"setups":{"type":"array","items":{"$ref":"#/$defs/setup"}},"toolchain":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":300},"description":"tool name to version (rustc, node, rga, ...); empty for a worker that does not build"},"agent":{"type":"object","required":["cli","model"],"additionalProperties":false,"properties":{"cli":{"type":"string","minLength":1,"maxLength":300},"model":{"type":"string","minLength":1,"maxLength":300}}},"access":{"type":"object","required":["git_write","push"],"additionalProperties":false,"description":"what the skill's checkup found this agent may do","properties":{"git_read":{"type":"boolean"},"git_write":{"type":"boolean","description":"it may write commits in its own clone"},"push":{"type":"boolean","description":"it pushes to the engine's repository (building changes needs it)"}}}}},"build":{"type":"object","required":["sha","profile","target","features","toolchain","env","artifact_hash","build_ms"],"additionalProperties":false,"description":"what was built: both arms of a report must agree in everything but sha, artifact_hash and build_ms","properties":{"sha":{"$ref":"#/$defs/sha"},"profile":{"enum":["release","profiling","dev","quick"],"description":"quick: the engine's profile for builds nothing is timed on (checks)"},"target":{"enum":["web-wasm","native"]},"features":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"toolchain":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":300}},"env":{"type":"object","additionalProperties":{"type":"string"}},"artifact_hash":{"$ref":"#/$defs/hash"},"build_ms":{"type":"number","minimum":0}}},"conditions":{"type":"object","additionalProperties":false,"description":"how one run went, measured for every run; shown and flagged, never refused","required":["paced","vsync","refresh_hz","power","power_plan","gpu_clock_mhz","foreign_gpu_load_pct","foreign_cpu_load_pct","visible","timer_resolution_us","gpu_timestamps","settled"],"properties":{"paced":{"anyOf":[{"type":"boolean"},{"const":"unknown"}]},"vsync":{"anyOf":[{"type":"boolean"},{"const":"unknown"}]},"refresh_hz":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"power":{"enum":["ac","battery","unknown"]},"power_plan":{"type":"string","minLength":1,"maxLength":300},"gpu_clock_mhz":{"anyOf":[{"type":"object","required":["start","end"],"additionalProperties":false,"properties":{"start":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"end":{"anyOf":[{"type":"number"},{"const":"unknown"}]}}},{"const":"unknown"}]},"foreign_gpu_load_pct":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"foreign_cpu_load_pct":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"visible":{"anyOf":[{"type":"boolean"},{"const":"unknown"}]},"timer_resolution_us":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"gpu_timestamps":{"enum":["exact","rounded","none","unknown"]},"settled":{"type":"object","required":["rule","after_ms","held"],"additionalProperties":false,"properties":{"rule":{"type":"string","minLength":1,"maxLength":300},"after_ms":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"held":{"type":"boolean"}}}}},"run":{"type":"object","required":["arm","started_at","metrics","frames","generated_hash","work","conditions","capture"],"additionalProperties":false,"properties":{"arm":{"enum":["base","candidate"]},"started_at":{"$ref":"#/$defs/time"},"metrics":{"type":"object","additionalProperties":{"type":"number"}},"frames":{"type":"integer","minimum":0},"generated_hash":{"$ref":"#/$defs/hash"},"work":{"type":"object","additionalProperties":{"type":["number","boolean"]},"description":"the engine's work counters for this run (catalog kind work)"},"conditions":{"$ref":"#/$defs/conditions"},"capture":{"$ref":"#/$defs/hash"}}},"armProfile":{"oneOf":[{"type":"object","required":["arm","files","complete"],"additionalProperties":false,"properties":{"arm":{"enum":["base","candidate"]},"files":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/file"}},"complete":{"type":"boolean"}}},{"type":"object","required":["arm","unavailable"],"additionalProperties":false,"properties":{"arm":{"enum":["base","candidate"]},"unavailable":{"type":"string","minLength":1,"maxLength":300}}}],"description":"a deep profile of one arm, or why this runtime has none"},"vendor":{"type":"object","required":["arm","tool","files"],"additionalProperties":false,"properties":{"arm":{"enum":["base","candidate"]},"tool":{"enum":["pix","nsight","vulkan-counters"]},"files":{"type":"array","items":{"$ref":"#/$defs/file"}}}},"arm":{"type":"object","required":["sha","options","scene_file_hash","settings_hash"],"additionalProperties":false,"properties":{"sha":{"$ref":"#/$defs/sha"},"options":{"type":"object","additionalProperties":{"type":["string","number","boolean"]}},"scene_file_hash":{"$ref":"#/$defs/sha"},"settings_hash":{"$ref":"#/$defs/sha"}}},"workload":{"type":"object","required":["name","feature","arms","method","settle","runs","profiles","vendor","unavailable"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":300},"feature":{"enum":["on","off","none"],"description":"none: the change against where its branch started; off: the same with the change's switch off (it must change nothing); on: the change with its switch off against on"},"arms":{"type":"object","required":["base","candidate"],"additionalProperties":false,"properties":{"base":{"$ref":"#/$defs/arm"},"candidate":{"$ref":"#/$defs/arm"}}},"method":{"type":"object","required":["runtime","tool","frames","warmup_frames","paced","size"],"additionalProperties":false,"properties":{"runtime":{"type":"string","minLength":1,"maxLength":300},"tool":{"type":"string","minLength":1,"maxLength":300},"frames":{"type":"integer","minimum":1},"warmup_frames":{"type":"integer","minimum":0},"paced":{"type":"boolean"},"size":{"anyOf":[{"type":"array","minItems":2,"maxItems":2,"items":{"type":"integer","minimum":1}},{"const":"unknown"}]}}},"settle":{"enum":["ok","base-never-settled","candidate-never-settled"]},"runs":{"type":"array","items":{"$ref":"#/$defs/run"}},"profiles":{"type":"array","items":{"$ref":"#/$defs/armProfile"}},"vendor":{"type":"array","items":{"$ref":"#/$defs/vendor"}},"unavailable":{"type":"array","items":{"type":"object","required":["metric","reason"],"additionalProperties":false,"properties":{"metric":{"type":"string","minLength":1,"maxLength":300},"reason":{"type":"string","minLength":1,"maxLength":300}}}}}},"measurement":{"type":"object","required":["name","value","unit"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":300},"value":{"type":"number"},"unit":{"type":"string","minLength":1,"maxLength":300},"note":{"type":"string","minLength":1,"maxLength":300}}},"attempt":{"type":"object","required":["started_at","duration_ms","exit_code","log"],"additionalProperties":false,"properties":{"started_at":{"$ref":"#/$defs/time"},"duration_ms":{"type":"number","minimum":0},"exit_code":{"type":"integer"},"log":{"$ref":"#/$defs/hash"},"measurements":{"type":"array","items":{"$ref":"#/$defs/measurement"},"description":"what the check measured, printed by the script; shown to the user, never judged"},"assertions":{"type":"array","items":{"type":"object","required":["name","passed"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":300},"passed":{"type":"boolean"}}}},"files":{"type":"array","items":{"$ref":"#/$defs/file"}}}},"check":{"type":"object","required":["name","sha","scripts_sha","expect","build","attempts"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":300},"sha":{"$ref":"#/$defs/sha"},"scripts_sha":{"anyOf":[{"$ref":"#/$defs/sha"},{"type":"null"}]},"expect":{"enum":["pass","fail"]},"build":{"$ref":"#/$defs/build"},"attempts":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/attempt"},"description":"every attempt in order; the first decides, a later pass after a failure is flaky"}}},"shaderArm":{"type":"object","required":["files","unavailable"],"additionalProperties":false,"properties":{"files":{"type":"array","items":{"$ref":"#/$defs/file"}},"unavailable":{"type":"array","items":{"type":"object","required":["part","reason"],"additionalProperties":false,"properties":{"part":{"type":"string","minLength":1,"maxLength":300},"reason":{"type":"string","minLength":1,"maxLength":300}}}}}}}},"measure":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/measure","title":"Measure report","type":"object","additionalProperties":false,"required":["kind","task","tools_sha","profile_start","profile_end","setup","base_sha","candidate_sha","builds","shader_hash","workloads","checks","incomplete"],"properties":{"kind":{"const":"measure"},"task":{"type":"integer"},"tools_sha":{"$ref":"#/$defs/sha"},"profile_start":{"$ref":"#/$defs/profile"},"profile_end":{"$ref":"#/$defs/profile"},"setup":{"type":"string","minLength":1,"maxLength":300},"base_sha":{"$ref":"#/$defs/sha"},"candidate_sha":{"$ref":"#/$defs/sha"},"builds":{"type":"object","required":["base","candidate"],"additionalProperties":false,"properties":{"base":{"$ref":"#/$defs/build"},"candidate":{"$ref":"#/$defs/build"}}},"shader_hash":{"type":"object","required":["base","candidate"],"additionalProperties":false,"properties":{"base":{"$ref":"#/$defs/hash"},"candidate":{"$ref":"#/$defs/hash"}},"description":"SHA-256 over every composed shader module's name and source, per arm"},"workloads":{"type":"array","items":{"$ref":"#/$defs/workload"}},"checks":{"type":"array","items":{"$ref":"#/$defs/check"}},"static":{"type":"object","required":["shader_report"],"additionalProperties":false,"properties":{"shader_report":{"type":"object","required":["base","candidate"],"additionalProperties":false,"properties":{"base":{"$ref":"#/$defs/shaderArm"},"candidate":{"$ref":"#/$defs/shaderArm"}}}}},"incomplete":{"type":"boolean","description":"true when the deadline stopped it before enough clean pairs: kept, never judged"}},"$defs":{"sha":{"type":"string","pattern":"^[0-9a-f]{40}$","description":"a full git commit id (or git object id of a file)"},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"the SHA-256 of an uploaded file or of generated content"},"time":{"type":"string","format":"date-time"},"file":{"type":"object","required":["hash","kind"],"additionalProperties":false,"description":"an uploaded file: its hash, kind and the tool that wrote it","properties":{"hash":{"$ref":"#/$defs/hash"},"kind":{"enum":["capture","log","firefox-profile","deep-summary","engine-report","chrome-trace","pix-events","pix-summary","nsight-summary","vulkan-counters","shader-report"]},"tool":{"type":"string","minLength":1,"maxLength":300}}},"gpu":{"type":"object","required":["vendor","model","driver","type"],"additionalProperties":false,"properties":{"vendor":{"type":"string","minLength":1,"maxLength":300},"model":{"type":"string","minLength":1,"maxLength":300},"driver":{"type":"string","minLength":1,"maxLength":300},"type":{"enum":["integrated","discrete","unknown"]}}},"setup":{"type":"object","required":["id","runtime","api","gpu","refresh_hz","power","measures"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{0,62}$"},"runtime":{"type":"string","minLength":1,"maxLength":300,"description":"\"native\", or a browser and its version"},"api":{"enum":["d3d12","vulkan","metal","gl","unknown"]},"gpu":{"type":"string","minLength":1,"maxLength":300,"description":"the model of the GPU it uses (one of machine.gpus), or \"unknown\""},"refresh_hz":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"const":"unknown"}]},"power":{"enum":["ac","battery","unknown"]},"measures":{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"maxLength":300},"description":"metric patterns it can produce, from the catalog"},"features":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"verified":{"type":"object","required":["sha","at"],"additionalProperties":false,"properties":{"sha":{"$ref":"#/$defs/sha"},"at":{"$ref":"#/$defs/time"}},"description":"when the engine's measure command last ran the factory's setup check on it: the main commit, and the time"}}},"profile":{"type":"object","required":["machine","setups","toolchain"],"additionalProperties":false,"properties":{"machine":{"type":"object","required":["id","os","cpu","cores","memory_gb","gpus"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{0,62}$"},"os":{"type":"string","minLength":1,"maxLength":300},"cpu":{"type":"string","minLength":1,"maxLength":300},"cores":{"anyOf":[{"type":"integer","minimum":1},{"const":"unknown"}]},"memory_gb":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"const":"unknown"}]},"gpus":{"type":"array","items":{"$ref":"#/$defs/gpu"}}}},"setups":{"type":"array","items":{"$ref":"#/$defs/setup"}},"toolchain":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":300},"description":"tool name to version (rustc, node, rga, ...); empty for a worker that does not build"},"agent":{"type":"object","required":["cli","model"],"additionalProperties":false,"properties":{"cli":{"type":"string","minLength":1,"maxLength":300},"model":{"type":"string","minLength":1,"maxLength":300}}},"access":{"type":"object","required":["git_write","push"],"additionalProperties":false,"description":"what the skill's checkup found this agent may do","properties":{"git_read":{"type":"boolean"},"git_write":{"type":"boolean","description":"it may write commits in its own clone"},"push":{"type":"boolean","description":"it pushes to the engine's repository (building changes needs it)"}}}}},"build":{"type":"object","required":["sha","profile","target","features","toolchain","env","artifact_hash","build_ms"],"additionalProperties":false,"description":"what was built: both arms of a report must agree in everything but sha, artifact_hash and build_ms","properties":{"sha":{"$ref":"#/$defs/sha"},"profile":{"enum":["release","profiling","dev","quick"],"description":"quick: the engine's profile for builds nothing is timed on (checks)"},"target":{"enum":["web-wasm","native"]},"features":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"toolchain":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":300}},"env":{"type":"object","additionalProperties":{"type":"string"}},"artifact_hash":{"$ref":"#/$defs/hash"},"build_ms":{"type":"number","minimum":0}}},"conditions":{"type":"object","additionalProperties":false,"description":"how one run went, measured for every run; shown and flagged, never refused","required":["paced","vsync","refresh_hz","power","power_plan","gpu_clock_mhz","foreign_gpu_load_pct","foreign_cpu_load_pct","visible","timer_resolution_us","gpu_timestamps","settled"],"properties":{"paced":{"anyOf":[{"type":"boolean"},{"const":"unknown"}]},"vsync":{"anyOf":[{"type":"boolean"},{"const":"unknown"}]},"refresh_hz":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"power":{"enum":["ac","battery","unknown"]},"power_plan":{"type":"string","minLength":1,"maxLength":300},"gpu_clock_mhz":{"anyOf":[{"type":"object","required":["start","end"],"additionalProperties":false,"properties":{"start":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"end":{"anyOf":[{"type":"number"},{"const":"unknown"}]}}},{"const":"unknown"}]},"foreign_gpu_load_pct":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"foreign_cpu_load_pct":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"visible":{"anyOf":[{"type":"boolean"},{"const":"unknown"}]},"timer_resolution_us":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"gpu_timestamps":{"enum":["exact","rounded","none","unknown"]},"settled":{"type":"object","required":["rule","after_ms","held"],"additionalProperties":false,"properties":{"rule":{"type":"string","minLength":1,"maxLength":300},"after_ms":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"held":{"type":"boolean"}}}}},"run":{"type":"object","required":["arm","started_at","metrics","frames","generated_hash","work","conditions","capture"],"additionalProperties":false,"properties":{"arm":{"enum":["base","candidate"]},"started_at":{"$ref":"#/$defs/time"},"metrics":{"type":"object","additionalProperties":{"type":"number"}},"frames":{"type":"integer","minimum":0},"generated_hash":{"$ref":"#/$defs/hash"},"work":{"type":"object","additionalProperties":{"type":["number","boolean"]},"description":"the engine's work counters for this run (catalog kind work)"},"conditions":{"$ref":"#/$defs/conditions"},"capture":{"$ref":"#/$defs/hash"}}},"armProfile":{"oneOf":[{"type":"object","required":["arm","files","complete"],"additionalProperties":false,"properties":{"arm":{"enum":["base","candidate"]},"files":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/file"}},"complete":{"type":"boolean"}}},{"type":"object","required":["arm","unavailable"],"additionalProperties":false,"properties":{"arm":{"enum":["base","candidate"]},"unavailable":{"type":"string","minLength":1,"maxLength":300}}}],"description":"a deep profile of one arm, or why this runtime has none"},"vendor":{"type":"object","required":["arm","tool","files"],"additionalProperties":false,"properties":{"arm":{"enum":["base","candidate"]},"tool":{"enum":["pix","nsight","vulkan-counters"]},"files":{"type":"array","items":{"$ref":"#/$defs/file"}}}},"arm":{"type":"object","required":["sha","options","scene_file_hash","settings_hash"],"additionalProperties":false,"properties":{"sha":{"$ref":"#/$defs/sha"},"options":{"type":"object","additionalProperties":{"type":["string","number","boolean"]}},"scene_file_hash":{"$ref":"#/$defs/sha"},"settings_hash":{"$ref":"#/$defs/sha"}}},"workload":{"type":"object","required":["name","feature","arms","method","settle","runs","profiles","vendor","unavailable"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":300},"feature":{"enum":["on","off","none"],"description":"none: the change against where its branch started; off: the same with the change's switch off (it must change nothing); on: the change with its switch off against on"},"arms":{"type":"object","required":["base","candidate"],"additionalProperties":false,"properties":{"base":{"$ref":"#/$defs/arm"},"candidate":{"$ref":"#/$defs/arm"}}},"method":{"type":"object","required":["runtime","tool","frames","warmup_frames","paced","size"],"additionalProperties":false,"properties":{"runtime":{"type":"string","minLength":1,"maxLength":300},"tool":{"type":"string","minLength":1,"maxLength":300},"frames":{"type":"integer","minimum":1},"warmup_frames":{"type":"integer","minimum":0},"paced":{"type":"boolean"},"size":{"anyOf":[{"type":"array","minItems":2,"maxItems":2,"items":{"type":"integer","minimum":1}},{"const":"unknown"}]}}},"settle":{"enum":["ok","base-never-settled","candidate-never-settled"]},"runs":{"type":"array","items":{"$ref":"#/$defs/run"}},"profiles":{"type":"array","items":{"$ref":"#/$defs/armProfile"}},"vendor":{"type":"array","items":{"$ref":"#/$defs/vendor"}},"unavailable":{"type":"array","items":{"type":"object","required":["metric","reason"],"additionalProperties":false,"properties":{"metric":{"type":"string","minLength":1,"maxLength":300},"reason":{"type":"string","minLength":1,"maxLength":300}}}}}},"measurement":{"type":"object","required":["name","value","unit"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":300},"value":{"type":"number"},"unit":{"type":"string","minLength":1,"maxLength":300},"note":{"type":"string","minLength":1,"maxLength":300}}},"attempt":{"type":"object","required":["started_at","duration_ms","exit_code","log"],"additionalProperties":false,"properties":{"started_at":{"$ref":"#/$defs/time"},"duration_ms":{"type":"number","minimum":0},"exit_code":{"type":"integer"},"log":{"$ref":"#/$defs/hash"},"measurements":{"type":"array","items":{"$ref":"#/$defs/measurement"},"description":"what the check measured, printed by the script; shown to the user, never judged"},"assertions":{"type":"array","items":{"type":"object","required":["name","passed"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":300},"passed":{"type":"boolean"}}}},"files":{"type":"array","items":{"$ref":"#/$defs/file"}}}},"check":{"type":"object","required":["name","sha","scripts_sha","expect","build","attempts"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":300},"sha":{"$ref":"#/$defs/sha"},"scripts_sha":{"anyOf":[{"$ref":"#/$defs/sha"},{"type":"null"}]},"expect":{"enum":["pass","fail"]},"build":{"$ref":"#/$defs/build"},"attempts":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/attempt"},"description":"every attempt in order; the first decides, a later pass after a failure is flaky"}}},"shaderArm":{"type":"object","required":["files","unavailable"],"additionalProperties":false,"properties":{"files":{"type":"array","items":{"$ref":"#/$defs/file"}},"unavailable":{"type":"array","items":{"type":"object","required":["part","reason"],"additionalProperties":false,"properties":{"part":{"type":"string","minLength":1,"maxLength":300},"reason":{"type":"string","minLength":1,"maxLength":300}}}}}}}},"check":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/check","title":"Check report","type":"object","additionalProperties":false,"required":["kind","task","tools_sha","profile_start","profile_end","setup","sha","main_sha","checks","incomplete"],"properties":{"kind":{"const":"check"},"task":{"type":"integer"},"tools_sha":{"$ref":"#/$defs/sha"},"profile_start":{"$ref":"#/$defs/profile"},"profile_end":{"$ref":"#/$defs/profile"},"setup":{"type":"string","minLength":1,"maxLength":300},"sha":{"$ref":"#/$defs/sha"},"main_sha":{"$ref":"#/$defs/sha"},"checks":{"type":"array","items":{"$ref":"#/$defs/check"}},"incomplete":{"type":"boolean"}},"$defs":{"sha":{"type":"string","pattern":"^[0-9a-f]{40}$","description":"a full git commit id (or git object id of a file)"},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"the SHA-256 of an uploaded file or of generated content"},"time":{"type":"string","format":"date-time"},"file":{"type":"object","required":["hash","kind"],"additionalProperties":false,"description":"an uploaded file: its hash, kind and the tool that wrote it","properties":{"hash":{"$ref":"#/$defs/hash"},"kind":{"enum":["capture","log","firefox-profile","deep-summary","engine-report","chrome-trace","pix-events","pix-summary","nsight-summary","vulkan-counters","shader-report"]},"tool":{"type":"string","minLength":1,"maxLength":300}}},"gpu":{"type":"object","required":["vendor","model","driver","type"],"additionalProperties":false,"properties":{"vendor":{"type":"string","minLength":1,"maxLength":300},"model":{"type":"string","minLength":1,"maxLength":300},"driver":{"type":"string","minLength":1,"maxLength":300},"type":{"enum":["integrated","discrete","unknown"]}}},"setup":{"type":"object","required":["id","runtime","api","gpu","refresh_hz","power","measures"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{0,62}$"},"runtime":{"type":"string","minLength":1,"maxLength":300,"description":"\"native\", or a browser and its version"},"api":{"enum":["d3d12","vulkan","metal","gl","unknown"]},"gpu":{"type":"string","minLength":1,"maxLength":300,"description":"the model of the GPU it uses (one of machine.gpus), or \"unknown\""},"refresh_hz":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"const":"unknown"}]},"power":{"enum":["ac","battery","unknown"]},"measures":{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"maxLength":300},"description":"metric patterns it can produce, from the catalog"},"features":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"verified":{"type":"object","required":["sha","at"],"additionalProperties":false,"properties":{"sha":{"$ref":"#/$defs/sha"},"at":{"$ref":"#/$defs/time"}},"description":"when the engine's measure command last ran the factory's setup check on it: the main commit, and the time"}}},"profile":{"type":"object","required":["machine","setups","toolchain"],"additionalProperties":false,"properties":{"machine":{"type":"object","required":["id","os","cpu","cores","memory_gb","gpus"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{0,62}$"},"os":{"type":"string","minLength":1,"maxLength":300},"cpu":{"type":"string","minLength":1,"maxLength":300},"cores":{"anyOf":[{"type":"integer","minimum":1},{"const":"unknown"}]},"memory_gb":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"const":"unknown"}]},"gpus":{"type":"array","items":{"$ref":"#/$defs/gpu"}}}},"setups":{"type":"array","items":{"$ref":"#/$defs/setup"}},"toolchain":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":300},"description":"tool name to version (rustc, node, rga, ...); empty for a worker that does not build"},"agent":{"type":"object","required":["cli","model"],"additionalProperties":false,"properties":{"cli":{"type":"string","minLength":1,"maxLength":300},"model":{"type":"string","minLength":1,"maxLength":300}}},"access":{"type":"object","required":["git_write","push"],"additionalProperties":false,"description":"what the skill's checkup found this agent may do","properties":{"git_read":{"type":"boolean"},"git_write":{"type":"boolean","description":"it may write commits in its own clone"},"push":{"type":"boolean","description":"it pushes to the engine's repository (building changes needs it)"}}}}},"build":{"type":"object","required":["sha","profile","target","features","toolchain","env","artifact_hash","build_ms"],"additionalProperties":false,"description":"what was built: both arms of a report must agree in everything but sha, artifact_hash and build_ms","properties":{"sha":{"$ref":"#/$defs/sha"},"profile":{"enum":["release","profiling","dev","quick"],"description":"quick: the engine's profile for builds nothing is timed on (checks)"},"target":{"enum":["web-wasm","native"]},"features":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"toolchain":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":300}},"env":{"type":"object","additionalProperties":{"type":"string"}},"artifact_hash":{"$ref":"#/$defs/hash"},"build_ms":{"type":"number","minimum":0}}},"conditions":{"type":"object","additionalProperties":false,"description":"how one run went, measured for every run; shown and flagged, never refused","required":["paced","vsync","refresh_hz","power","power_plan","gpu_clock_mhz","foreign_gpu_load_pct","foreign_cpu_load_pct","visible","timer_resolution_us","gpu_timestamps","settled"],"properties":{"paced":{"anyOf":[{"type":"boolean"},{"const":"unknown"}]},"vsync":{"anyOf":[{"type":"boolean"},{"const":"unknown"}]},"refresh_hz":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"power":{"enum":["ac","battery","unknown"]},"power_plan":{"type":"string","minLength":1,"maxLength":300},"gpu_clock_mhz":{"anyOf":[{"type":"object","required":["start","end"],"additionalProperties":false,"properties":{"start":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"end":{"anyOf":[{"type":"number"},{"const":"unknown"}]}}},{"const":"unknown"}]},"foreign_gpu_load_pct":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"foreign_cpu_load_pct":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"visible":{"anyOf":[{"type":"boolean"},{"const":"unknown"}]},"timer_resolution_us":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"gpu_timestamps":{"enum":["exact","rounded","none","unknown"]},"settled":{"type":"object","required":["rule","after_ms","held"],"additionalProperties":false,"properties":{"rule":{"type":"string","minLength":1,"maxLength":300},"after_ms":{"anyOf":[{"type":"number"},{"const":"unknown"}]},"held":{"type":"boolean"}}}}},"run":{"type":"object","required":["arm","started_at","metrics","frames","generated_hash","work","conditions","capture"],"additionalProperties":false,"properties":{"arm":{"enum":["base","candidate"]},"started_at":{"$ref":"#/$defs/time"},"metrics":{"type":"object","additionalProperties":{"type":"number"}},"frames":{"type":"integer","minimum":0},"generated_hash":{"$ref":"#/$defs/hash"},"work":{"type":"object","additionalProperties":{"type":["number","boolean"]},"description":"the engine's work counters for this run (catalog kind work)"},"conditions":{"$ref":"#/$defs/conditions"},"capture":{"$ref":"#/$defs/hash"}}},"armProfile":{"oneOf":[{"type":"object","required":["arm","files","complete"],"additionalProperties":false,"properties":{"arm":{"enum":["base","candidate"]},"files":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/file"}},"complete":{"type":"boolean"}}},{"type":"object","required":["arm","unavailable"],"additionalProperties":false,"properties":{"arm":{"enum":["base","candidate"]},"unavailable":{"type":"string","minLength":1,"maxLength":300}}}],"description":"a deep profile of one arm, or why this runtime has none"},"vendor":{"type":"object","required":["arm","tool","files"],"additionalProperties":false,"properties":{"arm":{"enum":["base","candidate"]},"tool":{"enum":["pix","nsight","vulkan-counters"]},"files":{"type":"array","items":{"$ref":"#/$defs/file"}}}},"arm":{"type":"object","required":["sha","options","scene_file_hash","settings_hash"],"additionalProperties":false,"properties":{"sha":{"$ref":"#/$defs/sha"},"options":{"type":"object","additionalProperties":{"type":["string","number","boolean"]}},"scene_file_hash":{"$ref":"#/$defs/sha"},"settings_hash":{"$ref":"#/$defs/sha"}}},"workload":{"type":"object","required":["name","feature","arms","method","settle","runs","profiles","vendor","unavailable"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":300},"feature":{"enum":["on","off","none"],"description":"none: the change against where its branch started; off: the same with the change's switch off (it must change nothing); on: the change with its switch off against on"},"arms":{"type":"object","required":["base","candidate"],"additionalProperties":false,"properties":{"base":{"$ref":"#/$defs/arm"},"candidate":{"$ref":"#/$defs/arm"}}},"method":{"type":"object","required":["runtime","tool","frames","warmup_frames","paced","size"],"additionalProperties":false,"properties":{"runtime":{"type":"string","minLength":1,"maxLength":300},"tool":{"type":"string","minLength":1,"maxLength":300},"frames":{"type":"integer","minimum":1},"warmup_frames":{"type":"integer","minimum":0},"paced":{"type":"boolean"},"size":{"anyOf":[{"type":"array","minItems":2,"maxItems":2,"items":{"type":"integer","minimum":1}},{"const":"unknown"}]}}},"settle":{"enum":["ok","base-never-settled","candidate-never-settled"]},"runs":{"type":"array","items":{"$ref":"#/$defs/run"}},"profiles":{"type":"array","items":{"$ref":"#/$defs/armProfile"}},"vendor":{"type":"array","items":{"$ref":"#/$defs/vendor"}},"unavailable":{"type":"array","items":{"type":"object","required":["metric","reason"],"additionalProperties":false,"properties":{"metric":{"type":"string","minLength":1,"maxLength":300},"reason":{"type":"string","minLength":1,"maxLength":300}}}}}},"measurement":{"type":"object","required":["name","value","unit"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":300},"value":{"type":"number"},"unit":{"type":"string","minLength":1,"maxLength":300},"note":{"type":"string","minLength":1,"maxLength":300}}},"attempt":{"type":"object","required":["started_at","duration_ms","exit_code","log"],"additionalProperties":false,"properties":{"started_at":{"$ref":"#/$defs/time"},"duration_ms":{"type":"number","minimum":0},"exit_code":{"type":"integer"},"log":{"$ref":"#/$defs/hash"},"measurements":{"type":"array","items":{"$ref":"#/$defs/measurement"},"description":"what the check measured, printed by the script; shown to the user, never judged"},"assertions":{"type":"array","items":{"type":"object","required":["name","passed"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":300},"passed":{"type":"boolean"}}}},"files":{"type":"array","items":{"$ref":"#/$defs/file"}}}},"check":{"type":"object","required":["name","sha","scripts_sha","expect","build","attempts"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":300},"sha":{"$ref":"#/$defs/sha"},"scripts_sha":{"anyOf":[{"$ref":"#/$defs/sha"},{"type":"null"}]},"expect":{"enum":["pass","fail"]},"build":{"$ref":"#/$defs/build"},"attempts":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/attempt"},"description":"every attempt in order; the first decides, a later pass after a failure is flaky"}}},"shaderArm":{"type":"object","required":["files","unavailable"],"additionalProperties":false,"properties":{"files":{"type":"array","items":{"$ref":"#/$defs/file"}},"unavailable":{"type":"array","items":{"type":"object","required":["part","reason"],"additionalProperties":false,"properties":{"part":{"type":"string","minLength":1,"maxLength":300},"reason":{"type":"string","minLength":1,"maxLength":300}}}}}}}},"reference":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"brief":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"purpose":{"type":"string","minLength":1,"maxLength":8000},"mechanism":{"type":"string","minLength":1,"maxLength":8000},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"kind":{"enum":["speed","look","capability","fix","health"]},"statement":{"type":"string","minLength":1,"maxLength":8000},"comparison_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0},"check_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0}},"required":["id","kind","statement","comparison_ids","check_ids"],"additionalProperties":false},"maxItems":30,"minItems":1},"constraints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"statement":{"type":"string","minLength":1,"maxLength":8000},"comparison_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0},"check_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0}},"required":["id","statement","comparison_ids","check_ids"],"additionalProperties":false},"maxItems":50,"minItems":0},"evidence_plan":{"type":"object","properties":{"comparisons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"baseline_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"prerequisite_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"workload_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":1},"modes":{"type":"array","items":{"type":"object","properties":{"id":{"enum":["none","off","on"]},"base_options":{"type":"object","additionalProperties":{"type":["string","boolean","number"]}},"candidate_options":{"type":"object","additionalProperties":{"type":["string","boolean","number"]}}},"required":["id","base_options","candidate_options"],"additionalProperties":false},"maxItems":3,"minItems":1},"metrics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":100,"minItems":0},"observations":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":30,"minItems":0},"method_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"}},"required":["id","workload_refs","modes","metrics","observations","method_ref"],"additionalProperties":false},"maxItems":30,"minItems":0},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"assertion":{"type":"string","minLength":1,"maxLength":4000},"case_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"}},"required":["id","assertion","case_ref"],"additionalProperties":false},"maxItems":50,"minItems":0}},"required":["comparisons","checks"],"additionalProperties":false},"risk":{"type":"string","minLength":1,"maxLength":8000},"design":{"type":"string","minLength":1,"maxLength":16000},"budget":{"type":"object","properties":{"milestone":{"type":"string","minLength":1,"maxLength":2000},"effort_hours":{"type":"number","exclusiveMinimum":0,"maximum":80},"stopping_rule":{"type":"string","minLength":1,"maxLength":2000}},"required":["milestone","effort_hours","stopping_rule"],"additionalProperties":false},"source_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0},"related_item_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0},"area":{"enum":["geometry","shading","lighting","post","world","cpu","streaming-load","simulation","content","tooling","platform","method"]}},"required":["title","purpose","mechanism","claims","constraints","evidence_plan","risk","budget","source_refs"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/brief"},"draft":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"purpose":{"type":"string","minLength":1,"maxLength":8000},"mechanism":{"type":"string","minLength":1,"maxLength":8000},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"kind":{"enum":["speed","look","capability","fix","health"]},"statement":{"type":"string","minLength":1,"maxLength":8000},"comparison_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0},"check_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0}},"required":["id","kind","statement","comparison_ids","check_ids"],"additionalProperties":false},"maxItems":30,"minItems":1},"constraints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"statement":{"type":"string","minLength":1,"maxLength":8000},"comparison_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0},"check_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0}},"required":["id","statement","comparison_ids","check_ids"],"additionalProperties":false},"maxItems":50,"minItems":0},"evidence_plan":{"type":"object","properties":{"comparisons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"baseline_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"prerequisite_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"workload_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":1},"modes":{"type":"array","items":{"type":"object","properties":{"id":{"enum":["none","off","on"]},"base_options":{"type":"object","additionalProperties":{"type":["string","boolean","number"]}},"candidate_options":{"type":"object","additionalProperties":{"type":["string","boolean","number"]}}},"required":["id","base_options","candidate_options"],"additionalProperties":false},"maxItems":3,"minItems":1},"metrics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":100,"minItems":0},"observations":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":30,"minItems":0},"method_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"}},"required":["id","workload_refs","modes","metrics","observations","method_ref"],"additionalProperties":false},"maxItems":30,"minItems":0},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"assertion":{"type":"string","minLength":1,"maxLength":4000},"case_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"}},"required":["id","assertion","case_ref"],"additionalProperties":false},"maxItems":50,"minItems":0}},"required":["comparisons","checks"],"additionalProperties":false},"risk":{"type":"string","minLength":1,"maxLength":8000},"design":{"type":"string","minLength":1,"maxLength":16000},"budget":{"type":"object","properties":{"milestone":{"type":"string","minLength":1,"maxLength":2000},"effort_hours":{"type":"number","exclusiveMinimum":0,"maximum":80},"stopping_rule":{"type":"string","minLength":1,"maxLength":2000}},"required":["milestone","effort_hours","stopping_rule"],"additionalProperties":false},"source_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0},"related_item_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0},"area":{"enum":["geometry","shading","lighting","post","world","cpu","streaming-load","simulation","content","tooling","platform","method"]}},"required":["title","purpose","mechanism","claims","risk","source_refs"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/draft"},"issue":{"type":"object","properties":{"owner":{"enum":["prepare","implement","evaluate","review","system","maintainer"]},"problem":{"type":"string","minLength":1,"maxLength":8000},"fixed_when":{"type":"string","minLength":1,"maxLength":3000},"evidence_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0},"where":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"requirement_id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"wait_for":{"type":"object","properties":{"kind":{"enum":["service","capability","item","decision"]},"target":{"type":"string","minLength":1,"maxLength":1200}},"required":["kind","target"],"additionalProperties":false}},"required":["owner","problem","fixed_when","evidence_refs"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/issue"},"answer":{"type":"object","properties":{"issue_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"response":{"type":"string","minLength":1,"maxLength":8000},"evidence_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0}},"required":["issue_ref","response","evidence_refs"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/answer"},"finding":{"type":"object","properties":{"lesson":{"type":"string","minLength":1,"maxLength":8000},"applies_when":{"type":"string","minLength":1,"maxLength":8000},"revisit_when":{"type":"string","minLength":1,"maxLength":8000},"evidence_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":1}},"required":["lesson","applies_when","revisit_when","evidence_refs"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/finding"},"assignment":{"type":"object","properties":{"assignment_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"scope":{"type":"object","properties":{"role":{"enum":["discover","prepare","implement","evaluate","review"]},"operation":{"type":"string","minLength":1,"maxLength":50},"item_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"mission_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"}},"required":["role"],"additionalProperties":false},"objective":{"type":"string","minLength":1,"maxLength":8000},"inputs":{"type":"object"},"issue_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0},"continuation":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"finding_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0},"resources":{"type":"object","properties":{"deadline":{"type":"string","format":"date-time"},"remaining_seconds":{"type":"number","minimum":0},"tools":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":50,"minItems":0},"capabilities":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":20,"minItems":0}},"required":["deadline","remaining_seconds","tools","capabilities"],"additionalProperties":false},"contract_version":{"const":"2.0"}},"required":["assignment_ref","scope","objective","inputs","issue_refs","finding_refs","resources","contract_version"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/assignment"},"result":{"type":"object","properties":{"assignment_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"status":{"enum":["done","failed","released"]},"summary":{"type":"string","minLength":1,"maxLength":3000},"output":{"type":"object"},"issues":{"type":"array","items":{"type":"object","properties":{"owner":{"enum":["prepare","implement","evaluate","review","system","maintainer"]},"problem":{"type":"string","minLength":1,"maxLength":8000},"fixed_when":{"type":"string","minLength":1,"maxLength":3000},"evidence_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0},"where":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"requirement_id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"wait_for":{"type":"object","properties":{"kind":{"enum":["service","capability","item","decision"]},"target":{"type":"string","minLength":1,"maxLength":1200}},"required":["kind","target"],"additionalProperties":false}},"required":["owner","problem","fixed_when","evidence_refs"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/issue"},"maxItems":20,"minItems":0},"answers":{"type":"array","items":{"type":"object","properties":{"issue_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"response":{"type":"string","minLength":1,"maxLength":8000},"evidence_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0}},"required":["issue_ref","response","evidence_refs"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/answer"},"maxItems":100,"minItems":0},"finding":{"type":"object","properties":{"lesson":{"type":"string","minLength":1,"maxLength":8000},"applies_when":{"type":"string","minLength":1,"maxLength":8000},"revisit_when":{"type":"string","minLength":1,"maxLength":8000},"evidence_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":1}},"required":["lesson","applies_when","revisit_when","evidence_refs"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/finding"},"outcome_proposal":{"type":"object","properties":{"outcome":{"enum":["no_gain","regression","rejected","deferred"]},"reason":{"type":"string","minLength":1,"maxLength":8000},"evidence_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":1},"requirement_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0},"surviving_alternative":{"type":"string","minLength":1,"maxLength":8000}},"required":["outcome","reason","evidence_refs"],"additionalProperties":false}},"required":["assignment_ref","status","summary","output","issues","answers"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/result"},"implementation-check":{"type":"object","properties":{"kind":{"const":"implementation-check"},"candidate_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"name":{"type":"string","minLength":1,"maxLength":200},"command":{"type":"string","minLength":1,"maxLength":3000},"outcome":{"enum":["passed","failed"]},"exit_code":{"type":"integer"},"log_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":1},"context":{"type":"object"},"check_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0}},"required":["kind","candidate_ref","name","command","outcome","exit_code","log_refs","context","check_ids"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/implementation-check"},"output/discover":{"type":"object","properties":{"proposals":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"purpose":{"type":"string","minLength":1,"maxLength":8000},"mechanism":{"type":"string","minLength":1,"maxLength":8000},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"kind":{"enum":["speed","look","capability","fix","health"]},"statement":{"type":"string","minLength":1,"maxLength":8000},"comparison_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0},"check_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0}},"required":["id","kind","statement","comparison_ids","check_ids"],"additionalProperties":false},"maxItems":30,"minItems":1},"constraints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"statement":{"type":"string","minLength":1,"maxLength":8000},"comparison_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0},"check_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0}},"required":["id","statement","comparison_ids","check_ids"],"additionalProperties":false},"maxItems":50,"minItems":0},"evidence_plan":{"type":"object","properties":{"comparisons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"baseline_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"prerequisite_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"workload_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":1},"modes":{"type":"array","items":{"type":"object","properties":{"id":{"enum":["none","off","on"]},"base_options":{"type":"object","additionalProperties":{"type":["string","boolean","number"]}},"candidate_options":{"type":"object","additionalProperties":{"type":["string","boolean","number"]}}},"required":["id","base_options","candidate_options"],"additionalProperties":false},"maxItems":3,"minItems":1},"metrics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":100,"minItems":0},"observations":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":30,"minItems":0},"method_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"}},"required":["id","workload_refs","modes","metrics","observations","method_ref"],"additionalProperties":false},"maxItems":30,"minItems":0},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"assertion":{"type":"string","minLength":1,"maxLength":4000},"case_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"}},"required":["id","assertion","case_ref"],"additionalProperties":false},"maxItems":50,"minItems":0}},"required":["comparisons","checks"],"additionalProperties":false},"risk":{"type":"string","minLength":1,"maxLength":8000},"design":{"type":"string","minLength":1,"maxLength":16000},"budget":{"type":"object","properties":{"milestone":{"type":"string","minLength":1,"maxLength":2000},"effort_hours":{"type":"number","exclusiveMinimum":0,"maximum":80},"stopping_rule":{"type":"string","minLength":1,"maxLength":2000}},"required":["milestone","effort_hours","stopping_rule"],"additionalProperties":false},"source_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0},"related_item_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0},"area":{"enum":["geometry","shading","lighting","post","world","cpu","streaming-load","simulation","content","tooling","platform","method"]}},"required":["title","purpose","mechanism","claims","risk","source_refs"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/draft"},"maxItems":3,"minItems":0}},"required":["proposals"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/output/discover"},"output/prepare":{"type":"object","properties":{"brief":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"purpose":{"type":"string","minLength":1,"maxLength":8000},"mechanism":{"type":"string","minLength":1,"maxLength":8000},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"kind":{"enum":["speed","look","capability","fix","health"]},"statement":{"type":"string","minLength":1,"maxLength":8000},"comparison_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0},"check_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0}},"required":["id","kind","statement","comparison_ids","check_ids"],"additionalProperties":false},"maxItems":30,"minItems":1},"constraints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"statement":{"type":"string","minLength":1,"maxLength":8000},"comparison_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0},"check_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"maxItems":100,"minItems":0}},"required":["id","statement","comparison_ids","check_ids"],"additionalProperties":false},"maxItems":50,"minItems":0},"evidence_plan":{"type":"object","properties":{"comparisons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"baseline_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"prerequisite_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"workload_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":1},"modes":{"type":"array","items":{"type":"object","properties":{"id":{"enum":["none","off","on"]},"base_options":{"type":"object","additionalProperties":{"type":["string","boolean","number"]}},"candidate_options":{"type":"object","additionalProperties":{"type":["string","boolean","number"]}}},"required":["id","base_options","candidate_options"],"additionalProperties":false},"maxItems":3,"minItems":1},"metrics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":100,"minItems":0},"observations":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":30,"minItems":0},"method_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"}},"required":["id","workload_refs","modes","metrics","observations","method_ref"],"additionalProperties":false},"maxItems":30,"minItems":0},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"assertion":{"type":"string","minLength":1,"maxLength":4000},"case_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"}},"required":["id","assertion","case_ref"],"additionalProperties":false},"maxItems":50,"minItems":0}},"required":["comparisons","checks"],"additionalProperties":false},"risk":{"type":"string","minLength":1,"maxLength":8000},"design":{"type":"string","minLength":1,"maxLength":16000},"budget":{"type":"object","properties":{"milestone":{"type":"string","minLength":1,"maxLength":2000},"effort_hours":{"type":"number","exclusiveMinimum":0,"maximum":80},"stopping_rule":{"type":"string","minLength":1,"maxLength":2000}},"required":["milestone","effort_hours","stopping_rule"],"additionalProperties":false},"source_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0},"related_item_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0},"area":{"enum":["geometry","shading","lighting","post","world","cpu","streaming-load","simulation","content","tooling","platform","method"]}},"required":["title","purpose","mechanism","claims","constraints","evidence_plan","risk","budget","source_refs"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/brief"},"change_reason":{"type":"string","minLength":1,"maxLength":8000}},"required":["brief"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/output/prepare"},"output/implement":{"type":"object","properties":{"candidate_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"check_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":1},"departures":{"type":"array","items":{"type":"object","properties":{"requirement_id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"design_location":{"type":"string","minLength":1,"maxLength":1000},"explanation":{"type":"string","minLength":1,"maxLength":8000},"evidence_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0}},"required":["explanation","evidence_refs"],"additionalProperties":false},"maxItems":30,"minItems":0},"diagnostic_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0}},"required":["candidate_ref","check_refs","departures"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/output/implement"},"output/evaluate/baseline":{"type":"object","properties":{"report_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":1}},"required":["report_refs"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/output/evaluate/baseline"},"output/evaluate/candidate":{"type":"object","properties":{"report_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":1}},"required":["report_refs"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/output/evaluate/candidate"},"output/evaluate/integration":{"type":"object","properties":{"report_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":1}},"required":["report_refs"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/output/evaluate/integration"},"output/review/candidate":{"type":"object","properties":{"verdict":{"enum":["ready","revise","reject"]},"assessments":{"type":"array","items":{"type":"object","properties":{"requirement_id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,39}$"},"assessment":{"enum":["supported","not_supported","unresolved","satisfied","violated"]},"reason":{"type":"string","minLength":1,"maxLength":8000},"evidence_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0},"counterevidence_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0}},"required":["requirement_id","assessment","reason","evidence_refs","counterevidence_refs"],"additionalProperties":false},"maxItems":80,"minItems":1},"issue_checks":{"type":"array","items":{"type":"object","properties":{"issue_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"resolution":{"enum":["resolved","unresolved"]},"reason":{"type":"string","minLength":1,"maxLength":8000},"evidence_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0}},"required":["issue_ref","resolution","reason","evidence_refs"],"additionalProperties":false},"maxItems":100,"minItems":0}},"required":["verdict","assessments","issue_checks"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/output/review/candidate"},"output/review/judgment_exit":{"type":"object","properties":{"verdict":{"enum":["confirm","overturn"]},"evidence_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":1},"issue_checks":{"type":"array","items":{"type":"object","properties":{"issue_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"resolution":{"enum":["resolved","unresolved"]},"reason":{"type":"string","minLength":1,"maxLength":8000},"evidence_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0}},"required":["issue_ref","resolution","reason","evidence_refs"],"additionalProperties":false},"maxItems":100,"minItems":0},"surviving_alternative":{"type":"string","minLength":1,"maxLength":8000}},"required":["verdict","evidence_refs","issue_checks"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/output/review/judgment_exit"},"output/review/direction":{"type":"object","properties":{"recommendation":{"enum":["continue","redirect","stop"]},"options":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","minLength":1,"maxLength":8000},"consequence":{"type":"string","minLength":1,"maxLength":8000}},"required":["action","consequence"],"additionalProperties":false},"maxItems":20,"minItems":1},"evidence_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0},"issue_checks":{"type":"array","items":{"type":"object","properties":{"issue_ref":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"resolution":{"enum":["resolved","unresolved"]},"reason":{"type":"string","minLength":1,"maxLength":8000},"evidence_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":1200},"selector":{"type":"string","minLength":1,"maxLength":1000}},"required":["ref"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/reference"},"maxItems":100,"minItems":0}},"required":["issue_ref","resolution","reason","evidence_refs"],"additionalProperties":false},"maxItems":100,"minItems":0}},"required":["recommendation","options","evidence_refs"],"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"engine-factory/2/output/review/direction"}}