@surlymochan/evalid 0.0.0-stage → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/LICENSE +21 -0
  3. package/README.md +315 -2
  4. package/RELEASE_NOTES.md +102 -0
  5. package/atoms/registry.json +758 -0
  6. package/bin/xflow.js +7208 -0
  7. package/docs/adoption/README.md +128 -0
  8. package/docs/adoption/openflow-release-hardening.md +61 -0
  9. package/docs/benchmark-openflow-vs-gstack-superpowers-openspec-2026-05-25.md +81 -0
  10. package/docs/compatibility.md +52 -0
  11. package/docs/competitive-benchmark.md +108 -0
  12. package/docs/corps-operator-guide.md +75 -0
  13. package/docs/demo-proof.md +126 -0
  14. package/docs/examples-gallery.md +115 -0
  15. package/docs/fixtures/tracker-item.json +7 -0
  16. package/docs/goal-vs-codex.md +129 -0
  17. package/docs/gstack-comparison.md +88 -0
  18. package/docs/install-upgrade.md +133 -0
  19. package/docs/integrations.md +49 -0
  20. package/docs/launch-demo.md +123 -0
  21. package/docs/launch-dossier.md +180 -0
  22. package/docs/methodology.md +149 -0
  23. package/docs/npm-publish-handoff.md +83 -0
  24. package/docs/openspec-migration.md +106 -0
  25. package/docs/public-benchmark.md +68 -0
  26. package/docs/public-release.md +145 -0
  27. package/docs/quality-assessment.md +139 -0
  28. package/docs/quickstart.md +156 -0
  29. package/docs/reviewer-guide.md +43 -0
  30. package/docs/spec-kit-benchmark.md +73 -0
  31. package/docs/super-assistant-comparison.md +106 -0
  32. package/docs/superpowers-comparison.md +82 -0
  33. package/docs/team-adoption.md +123 -0
  34. package/docs/tooling-matrix.md +91 -0
  35. package/docs/walkthrough.md +76 -0
  36. package/docs/workflow-manual.md +1125 -0
  37. package/package.json +83 -4
  38. package/prompts/pencil-draft.md +46 -0
  39. package/prompts/pencil-refine.md +46 -0
  40. package/prompts/phase-artifact.md +24 -0
  41. package/prompts/phase-execution.md +32 -0
  42. package/schemas/competitor-reconstruction-contract.schema.json +91 -0
  43. package/schemas/llm-design-review-aggregate.schema.json +83 -0
  44. package/schemas/visual-benchmark.schema.json +978 -0
  45. package/schemas/workflow.schema.json +100 -0
  46. package/scripts/run-tests.mjs +23 -0
  47. package/scripts/takein_digest.py +139 -0
  48. package/specs/README.md +118 -0
  49. package/specs/architecture.md +36 -0
  50. package/specs/product.md +33 -0
  51. package/specs/workflow.md +349 -0
  52. package/src/agent_team/atoms/codex-app-bridge.js +8 -0
  53. package/src/agent_team/atoms/design/competitor-reconstruction-review.js +44 -0
  54. package/src/agent_team/atoms/design/contract-freeze.js +8 -0
  55. package/src/agent_team/atoms/design/generation-contract.js +442 -0
  56. package/src/agent_team/atoms/design/reconstruction-pack.js +246 -0
  57. package/src/agent_team/atoms/design/reference-surface-lock.js +49 -0
  58. package/src/agent_team/atoms/patch-challenge.js +19 -0
  59. package/src/agent_team/atoms/pencil/accept.js +9 -0
  60. package/src/agent_team/atoms/pencil/draft.js +365 -0
  61. package/src/agent_team/atoms/pencil/refine.js +229 -0
  62. package/src/agent_team/atoms/phase-run-dispatch.js +8 -0
  63. package/src/agent_team/atoms/team-run.js +380 -0
  64. package/src/agent_team/atoms/visual/aesthetic-review.js +231 -0
  65. package/src/agent_team/atoms/visual/benchmark-repair-plan.js +291 -0
  66. package/src/agent_team/atoms/visual/benchmark.js +1652 -0
  67. package/src/agent_team/atoms/visual/design-selection.js +23 -0
  68. package/src/agent_team/atoms/visual/direction-synthesis.js +124 -0
  69. package/src/agent_team/atoms/visual/dom-rect-export.js +129 -0
  70. package/src/agent_team/atoms/visual/image-diff.js +186 -0
  71. package/src/agent_team/atoms/visual/layout-competition.js +8 -0
  72. package/src/agent_team/atoms/visual/page-evidence-capture.js +806 -0
  73. package/src/agent_team/atoms/visual/playwright-runtime.js +8 -0
  74. package/src/agent_team/atoms/visual/review-aggregate.js +87 -0
  75. package/src/agent_team/atoms/visual/review.js +77 -0
  76. package/src/agent_team/atoms/visual/visual-report.js +197 -0
  77. package/src/agent_team/atoms/visual/visual-token-export.js +417 -0
  78. package/src/agent_team/common.js +311 -0
  79. package/src/core/atoms/agent-invoke.js +684 -0
  80. package/src/core/atoms/event/ingest.js +30 -0
  81. package/src/core/atoms/experience/digest.js +55 -0
  82. package/src/core/atoms/gate/artifact-verify.js +83 -0
  83. package/src/core/atoms/gate/competitor-contract-validate.js +119 -0
  84. package/src/core/atoms/gate/evidence-collect.js +64 -0
  85. package/src/core/atoms/gate/payload-from-phase-run.js +78 -0
  86. package/src/core/atoms/gate/visual-benchmark-validate.js +183 -0
  87. package/src/core/atoms/gate/workbench.js +79 -0
  88. package/src/core/atoms/intake/classify.js +15 -0
  89. package/src/core/atoms/intake/design-skill-select.js +16 -0
  90. package/src/core/atoms/intake/preview-or-refine.js +19 -0
  91. package/src/core/atoms/intake/recommend.js +20 -0
  92. package/src/core/atoms/intake/research-same-category.js +19 -0
  93. package/src/core/atoms/intervention/create.js +30 -0
  94. package/src/core/atoms/memory/manage.js +27 -0
  95. package/src/core/atoms/memory/mount.js +13 -0
  96. package/src/core/atoms/mission/create.js +19 -0
  97. package/src/core/atoms/mission/list.js +14 -0
  98. package/src/core/atoms/mission/show.js +26 -0
  99. package/src/core/atoms/notify/checkpoint.js +46 -0
  100. package/src/core/atoms/phase-run/complete.js +42 -0
  101. package/src/core/atoms/phase-run/fail.js +40 -0
  102. package/src/core/atoms/phase-run/persist.js +39 -0
  103. package/src/core/atoms/phase-run/start.js +30 -0
  104. package/src/core/atoms/plugin/run.js +76 -0
  105. package/src/core/atoms/policy/gate.js +90 -0
  106. package/src/core/atoms/policy/resolve.js +11 -0
  107. package/src/core/atoms/storage/sync.js +57 -0
  108. package/src/core/atoms/workflow/advance.js +25 -0
  109. package/src/core/atoms/workflow/guard.js +127 -0
  110. package/src/core/atoms/workflow/state-load.js +37 -0
  111. package/src/core/bindings.js +37 -0
  112. package/src/core/change-artifacts.js +134 -0
  113. package/src/core/competitive-score.js +265 -0
  114. package/src/core/concurrency-policy.js +35 -0
  115. package/src/core/execution-log.js +108 -0
  116. package/src/core/intake-recommendation.js +134 -0
  117. package/src/core/memory-state.js +62 -0
  118. package/src/core/mission-state.js +780 -0
  119. package/src/core/pending-gates.js +66 -0
  120. package/src/core/phase-cost.js +116 -0
  121. package/src/core/phase-run-read.js +27 -0
  122. package/src/core/policy-overlay.js +180 -0
  123. package/src/core/state-store.js +201 -0
  124. package/src/core/workflow-executor.js +998 -0
  125. package/src/core/workflow-integrity.js +111 -0
  126. package/src/core/workflow-loader.js +163 -0
  127. package/src/core/workflow-rerun.js +84 -0
  128. package/src/core/workflow-state.js +119 -0
  129. package/src/server.js +1307 -0
  130. package/workflows/corps.yaml +479 -0
  131. package/workflows/yolo.yaml +233 -0
  132. package/xflow/README.md +76 -0
  133. package/xflow/aha/SKILL.md +82 -0
  134. package/xflow/aha/scripts/append_aha.py +50 -0
  135. package/xflow/archive/scripts/archive_change.py +338 -0
  136. package/xflow/archive/templates/merge-design.md +54 -0
  137. package/xflow/archive/templates/merge-workflow.md +26 -0
  138. package/xflow/atoms/__init__.py +6 -0
  139. package/xflow/atoms/a1_issue_create_or_patch.py +70 -0
  140. package/xflow/atoms/a2_branch_create_and_link.py +42 -0
  141. package/xflow/atoms/a3_repo_doctor.py +11 -0
  142. package/xflow/atoms/a4_project_set_status.py +11 -0
  143. package/xflow/atoms/a5_archive_commit_push_close.py +11 -0
  144. package/xflow/atoms/a6_pr_create.py +72 -0
  145. package/xflow/atoms/b1_change_scaffold.py +11 -0
  146. package/xflow/atoms/b2_status_read.py +16 -0
  147. package/xflow/atoms/b2b_status_write.py +20 -0
  148. package/xflow/atoms/b3_status_transition.py +27 -0
  149. package/xflow/atoms/b4_handoff_scaffold_or_refresh.py +11 -0
  150. package/xflow/atoms/b5_aha_append.py +11 -0
  151. package/xflow/atoms/b6_takein_digest.py +11 -0
  152. package/xflow/atoms/b6b_lookback_digest.py +11 -0
  153. package/xflow/atoms/b7_change_mission_bind.py +43 -0
  154. package/xflow/atoms/c1_mem.py +54 -0
  155. package/xflow/atoms/e6_gate_local_precheck.py +23 -0
  156. package/xflow/atoms/h1_design_lite_gate.py +74 -0
  157. package/xflow/atoms/i6a_tdd_run.py +104 -0
  158. package/xflow/atoms/i6b_tdd_proof_validate.py +165 -0
  159. package/xflow/atoms/i6c_tdd_quality_review.py +357 -0
  160. package/xflow/atoms/j1_tests_run.py +129 -0
  161. package/xflow/atoms/j4a_spec_consistency_structural.py +105 -0
  162. package/xflow/atoms/j4b_spec_delta_review.py +316 -0
  163. package/xflow/atoms/j4c_openspec_migration_map.py +121 -0
  164. package/xflow/atoms/j4d_spec_clarify_gate.py +373 -0
  165. package/xflow/atoms/j6_cr_review.py +443 -0
  166. package/xflow/atoms/k1_artifacts_complete_check.py +39 -0
  167. package/xflow/atoms/k2_merge_snippets_apply.py +11 -0
  168. package/xflow/atoms/k3_handoff_refresh.py +14 -0
  169. package/xflow/atoms/k4_mem_lesson_persist.py +65 -0
  170. package/xflow/atoms/k5_archive_publish.py +21 -0
  171. package/xflow/atoms/k6_aha_merge.py +42 -0
  172. package/xflow/atoms/tdd_lib.py +747 -0
  173. package/xflow/corps/SKILL.md +109 -0
  174. package/xflow/exec/scripts/set_issue_in_progress.py +159 -0
  175. package/xflow/goal/SKILL.md +150 -0
  176. package/xflow/handoff/SKILL.md +95 -0
  177. package/xflow/handoff/scripts/scaffold_handoff.py +304 -0
  178. package/xflow/lookback/SKILL.md +66 -0
  179. package/xflow/lookback/scripts/lookback_digest.py +46 -0
  180. package/xflow/openissue/scripts/open_issue_flow.py +438 -0
  181. package/xflow/plan/SKILL.md +38 -0
  182. package/xflow/ralph/SKILL.md +123 -0
  183. package/xflow/scripts/check_installed_xflow_skill_sync.sh +44 -0
  184. package/xflow/scripts/common.py +480 -0
  185. package/xflow/scripts/doctor.py +278 -0
  186. package/xflow/scripts/sync_installed_xflow_skill.sh +134 -0
  187. package/xflow/takein/SKILL.md +81 -0
  188. package/xflow/takein/scripts/takein_digest.py +88 -0
  189. package/xflow/yolo/SKILL.md +66 -0
  190. package/xflow/yolo/scripts/scaffold_specs_change.py +673 -0
  191. package/xflow/yolo/scripts/yolo_gate.py +312 -0
  192. package/xflow/yolo/templates/DESIGN.md +179 -0
@@ -0,0 +1,978 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://openflow/schemas/visual-benchmark.schema.json",
4
+ "title": "Visual Benchmark Artifact",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "version",
9
+ "benchmark_mode",
10
+ "competitor_product",
11
+ "required_modules",
12
+ "scenarios"
13
+ ],
14
+ "properties": {
15
+ "version": {
16
+ "type": "integer",
17
+ "minimum": 1
18
+ },
19
+ "benchmark_mode": {
20
+ "type": "string",
21
+ "enum": ["placeholder", "reference_backed"]
22
+ },
23
+ "benchmark_input_mode": {
24
+ "type": "string",
25
+ "enum": ["missing", "reference_scenarios", "capture_url"]
26
+ },
27
+ "competitor_product": {
28
+ "type": ["string", "null"]
29
+ },
30
+ "required_modules": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "string",
34
+ "minLength": 1
35
+ }
36
+ },
37
+ "benchmark_matrix_contract": {
38
+ "type": ["object", "null"],
39
+ "additionalProperties": false,
40
+ "properties": {
41
+ "required_scenario_ids": {
42
+ "type": "array",
43
+ "items": { "type": "string", "minLength": 1 }
44
+ },
45
+ "required_platform_profiles": {
46
+ "type": "array",
47
+ "items": { "type": "string", "enum": ["ios_phone", "android_phone", "mobile_h5", "desktop_web", "desktop_product_workbench"] }
48
+ },
49
+ "required_state_variants": {
50
+ "type": "array",
51
+ "items": { "type": "string", "minLength": 1 }
52
+ },
53
+ "max_average_pixel_diff_ratio": {
54
+ "type": "number",
55
+ "minimum": 0
56
+ }
57
+ }
58
+ },
59
+ "matrix_checks": {
60
+ "type": "array",
61
+ "items": {
62
+ "type": "object",
63
+ "additionalProperties": false,
64
+ "required": ["id", "status"],
65
+ "properties": {
66
+ "id": { "type": "string", "minLength": 1 },
67
+ "status": { "type": "string", "enum": ["pass", "needs_follow_up"] },
68
+ "detail": { "type": ["string", "null"] }
69
+ }
70
+ }
71
+ },
72
+ "matrix_status": {
73
+ "type": "string",
74
+ "enum": ["pass", "needs_follow_up"]
75
+ },
76
+ "report_file": {
77
+ "type": ["string", "null"]
78
+ },
79
+ "scenarios": {
80
+ "type": "array",
81
+ "items": {
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "required": ["id", "status", "screenshot_evidence_mode"],
85
+ "properties": {
86
+ "id": {
87
+ "type": "string",
88
+ "minLength": 1
89
+ },
90
+ "viewport": {
91
+ "type": ["object", "null"],
92
+ "additionalProperties": false,
93
+ "required": ["width", "height"],
94
+ "properties": {
95
+ "width": { "type": "number", "exclusiveMinimum": 0 },
96
+ "height": { "type": "number", "exclusiveMinimum": 0 }
97
+ }
98
+ },
99
+ "platform_profile": {
100
+ "type": ["string", "null"],
101
+ "enum": ["ios_phone", "android_phone", "mobile_h5", "desktop_web", "desktop_product_workbench", null]
102
+ },
103
+ "reference_image": {
104
+ "type": ["string", "null"]
105
+ },
106
+ "screenshot_image": {
107
+ "type": ["string", "null"]
108
+ },
109
+ "diff_metrics": {
110
+ "type": ["object", "null"],
111
+ "additionalProperties": false,
112
+ "required": ["status", "values", "thresholds"],
113
+ "properties": {
114
+ "status": {
115
+ "type": "string",
116
+ "enum": ["pass", "needs_follow_up"]
117
+ },
118
+ "issues": {
119
+ "type": "array",
120
+ "items": { "type": "string" }
121
+ },
122
+ "values": {
123
+ "type": ["object", "null"],
124
+ "additionalProperties": false,
125
+ "properties": {
126
+ "structural_similarity": { "type": ["number", "null"] },
127
+ "layout_shift_score": { "type": ["number", "null"] },
128
+ "pixel_diff_ratio": { "type": ["number", "null"] }
129
+ }
130
+ },
131
+ "hotspots": {
132
+ "type": "array",
133
+ "items": {
134
+ "type": "object",
135
+ "additionalProperties": false,
136
+ "properties": {
137
+ "row": { "type": "number", "minimum": 0 },
138
+ "col": { "type": "number", "minimum": 0 },
139
+ "changed_pixels": { "type": "number", "minimum": 0 },
140
+ "changed_ratio": { "type": "number", "minimum": 0 },
141
+ "x": { "type": "number", "minimum": 0 },
142
+ "y": { "type": "number", "minimum": 0 },
143
+ "width": { "type": "number", "minimum": 0 },
144
+ "height": { "type": "number", "minimum": 0 }
145
+ }
146
+ }
147
+ },
148
+ "heatmap_file": {
149
+ "type": ["string", "null"]
150
+ },
151
+ "thresholds": {
152
+ "type": "object",
153
+ "additionalProperties": false,
154
+ "required": [
155
+ "structural_similarity_min",
156
+ "layout_shift_score_max",
157
+ "pixel_diff_ratio_max"
158
+ ],
159
+ "properties": {
160
+ "structural_similarity_min": { "type": "number" },
161
+ "layout_shift_score_max": { "type": "number" },
162
+ "pixel_diff_ratio_max": { "type": "number" }
163
+ }
164
+ }
165
+ }
166
+ },
167
+ "structure_checks": {
168
+ "type": "array",
169
+ "items": {
170
+ "type": "object",
171
+ "additionalProperties": false,
172
+ "required": ["id", "status"],
173
+ "properties": {
174
+ "id": { "type": "string", "minLength": 1 },
175
+ "status": { "type": "string", "enum": ["pass", "needs_follow_up"] },
176
+ "detail": { "type": ["string", "null"] }
177
+ }
178
+ }
179
+ },
180
+ "token_checks": {
181
+ "type": "array",
182
+ "items": {
183
+ "type": "object",
184
+ "additionalProperties": false,
185
+ "required": ["id", "status"],
186
+ "properties": {
187
+ "id": { "type": "string", "minLength": 1 },
188
+ "status": { "type": "string", "enum": ["pass", "needs_follow_up"] },
189
+ "detail": { "type": ["string", "null"] }
190
+ }
191
+ }
192
+ },
193
+ "state_evidence": {
194
+ "type": "array",
195
+ "items": {
196
+ "type": "object",
197
+ "additionalProperties": false,
198
+ "required": ["id", "screenshot_image", "nodes_captured"],
199
+ "properties": {
200
+ "id": { "type": "string", "minLength": 1 },
201
+ "label": { "type": ["string", "null"] },
202
+ "screenshot_image": { "type": "string", "minLength": 1 },
203
+ "nodes_captured": { "type": "number", "minimum": 0 },
204
+ "expect_visual_change": { "type": "boolean" },
205
+ "min_pixel_diff_ratio": { "type": ["number", "null"], "minimum": 0 },
206
+ "reference_image": { "type": ["string", "null"] },
207
+ "priority_score": { "type": ["number", "null"] },
208
+ "priority_reason": { "type": ["string", "null"] },
209
+ "source": { "type": ["string", "null"] },
210
+ "workbench_state_type": {
211
+ "type": ["string", "null"],
212
+ "enum": ["detail_open", "active_filter", "selected_item", "bulk_select_mode", null]
213
+ },
214
+ "component_family": { "type": ["string", "null"] },
215
+ "state_variant": {
216
+ "type": ["string", "null"],
217
+ "enum": ["hover", "active", "selected", "expanded", "focused", "dragged", "revealed", "refreshed", null]
218
+ },
219
+ "expect_motion": { "type": ["boolean", "null"] },
220
+ "min_motion_changed_frames": { "type": ["number", "null"], "minimum": 0 },
221
+ "frame_screenshot_images": {
222
+ "type": "array",
223
+ "items": { "type": "string", "minLength": 1 }
224
+ },
225
+ "state_visual_tokens": {
226
+ "type": ["object", "null"],
227
+ "additionalProperties": false,
228
+ "properties": {
229
+ "color_roles": {
230
+ "type": ["object", "null"],
231
+ "additionalProperties": { "type": "string", "minLength": 1 }
232
+ },
233
+ "shadow_strength_tiers": {
234
+ "type": "array",
235
+ "items": { "type": "string", "enum": ["subtle", "medium", "strong"] }
236
+ },
237
+ "transition_durations": {
238
+ "type": "array",
239
+ "items": { "type": "number", "minimum": 0 }
240
+ },
241
+ "transition_timing_functions": {
242
+ "type": "array",
243
+ "items": { "type": "string", "minLength": 1 }
244
+ },
245
+ "animation_durations": {
246
+ "type": "array",
247
+ "items": { "type": "number", "minimum": 0 }
248
+ },
249
+ "radius_values": {
250
+ "type": "array",
251
+ "items": { "type": "number", "minimum": 0 }
252
+ },
253
+ "border_widths": {
254
+ "type": "array",
255
+ "items": { "type": "number", "minimum": 0 }
256
+ },
257
+ "bottom_sheet_handle_present": {
258
+ "type": ["boolean", "null"]
259
+ },
260
+ "tabbar_active_state_present": {
261
+ "type": ["boolean", "null"]
262
+ }
263
+ }
264
+ },
265
+ "state_tags": {
266
+ "type": "array",
267
+ "items": { "type": "string", "minLength": 1 }
268
+ }
269
+ }
270
+ }
271
+ },
272
+ "state_contract": {
273
+ "type": ["object", "null"],
274
+ "additionalProperties": false,
275
+ "properties": {
276
+ "required_workbench_states": {
277
+ "type": "array",
278
+ "items": {
279
+ "type": "string",
280
+ "enum": ["detail_open", "active_filter", "selected_item", "bulk_select_mode"]
281
+ }
282
+ }
283
+ }
284
+ },
285
+ "state_contract_checks": {
286
+ "type": "array",
287
+ "items": {
288
+ "type": "object",
289
+ "additionalProperties": false,
290
+ "required": ["id", "status"],
291
+ "properties": {
292
+ "id": { "type": "string", "minLength": 1 },
293
+ "status": { "type": "string", "enum": ["pass", "needs_follow_up"] },
294
+ "detail": { "type": ["string", "null"] }
295
+ }
296
+ }
297
+ },
298
+ "state_family_contract": {
299
+ "type": ["object", "null"],
300
+ "additionalProperties": {
301
+ "type": "object",
302
+ "additionalProperties": false,
303
+ "properties": {
304
+ "required_variants": {
305
+ "type": "array",
306
+ "items": { "type": "string", "enum": ["hover", "active", "selected", "expanded", "focused", "dragged", "revealed", "refreshed"] }
307
+ },
308
+ "max_pixel_diff_spread": { "type": "number", "minimum": 0 },
309
+ "max_layout_shift_spread": { "type": "number", "minimum": 0 },
310
+ "min_distinct_surface_colors": { "type": "number", "minimum": 0 },
311
+ "min_distinct_shadow_strength_tiers": { "type": "number", "minimum": 0 },
312
+ "required_timing_functions": {
313
+ "type": "array",
314
+ "items": { "type": "string", "minLength": 1 }
315
+ },
316
+ "max_radius_spread": { "type": "number", "minimum": 0 },
317
+ "max_border_width_spread": { "type": "number", "minimum": 0 },
318
+ "max_transition_duration_spread": { "type": "number", "minimum": 0 },
319
+ "max_animation_duration_spread": { "type": "number", "minimum": 0 }
320
+ }
321
+ }
322
+ },
323
+ "state_family_checks": {
324
+ "type": "array",
325
+ "items": {
326
+ "type": "object",
327
+ "additionalProperties": false,
328
+ "required": ["id", "status"],
329
+ "properties": {
330
+ "id": { "type": "string", "minLength": 1 },
331
+ "status": { "type": "string", "enum": ["pass", "needs_follow_up"] },
332
+ "detail": { "type": ["string", "null"] }
333
+ }
334
+ }
335
+ },
336
+ "state_transition_checks": {
337
+ "type": "array",
338
+ "items": {
339
+ "type": "object",
340
+ "additionalProperties": false,
341
+ "required": ["id", "status"],
342
+ "properties": {
343
+ "id": { "type": "string", "minLength": 1 },
344
+ "status": { "type": "string", "enum": ["pass", "needs_follow_up"] },
345
+ "detail": { "type": ["string", "null"] },
346
+ "compared_to": { "type": ["string", "null"], "enum": ["reference_state", "base_state", null] },
347
+ "diff_metrics": {
348
+ "type": ["object", "null"],
349
+ "additionalProperties": false,
350
+ "properties": {
351
+ "structural_similarity": { "type": ["number", "null"] },
352
+ "layout_shift_score": { "type": ["number", "null"] },
353
+ "pixel_diff_ratio": { "type": ["number", "null"] }
354
+ }
355
+ }
356
+ }
357
+ }
358
+ },
359
+ "motion_transition_checks": {
360
+ "type": "array",
361
+ "items": {
362
+ "type": "object",
363
+ "additionalProperties": false,
364
+ "required": ["id", "status"],
365
+ "properties": {
366
+ "id": { "type": "string", "minLength": 1 },
367
+ "status": { "type": "string", "enum": ["pass", "needs_follow_up"] },
368
+ "detail": { "type": ["string", "null"] },
369
+ "motion_profile": {
370
+ "type": ["object", "null"],
371
+ "additionalProperties": false,
372
+ "properties": {
373
+ "sampled_frames": { "type": ["number", "null"], "minimum": 0 },
374
+ "changed_frames": { "type": ["number", "null"], "minimum": 0 },
375
+ "peak_pixel_diff_ratio": { "type": ["number", "null"], "minimum": 0 },
376
+ "peak_layout_shift_score": { "type": ["number", "null"], "minimum": 0 }
377
+ }
378
+ }
379
+ }
380
+ }
381
+ },
382
+ "layout_contract": {
383
+ "type": ["object", "null"],
384
+ "additionalProperties": false,
385
+ "properties": {
386
+ "expected_columns": { "type": "number", "exclusiveMinimum": 0 },
387
+ "required_panels": {
388
+ "type": "array",
389
+ "items": { "type": "string", "minLength": 1 }
390
+ },
391
+ "workspace_patterns": {
392
+ "type": "array",
393
+ "items": {
394
+ "type": "string",
395
+ "enum": [
396
+ "header_with_split_workspace",
397
+ "sidebar_docked_left",
398
+ "filters_above_list",
399
+ "list_detail_master_detail",
400
+ "detail_docked_right",
401
+ "toolbar_over_workspace",
402
+ "compact_top_nav",
403
+ "bottom_tabbar_docked",
404
+ "bottom_sheet_over_content"
405
+ ]
406
+ }
407
+ },
408
+ "anchor_relations": {
409
+ "type": "array",
410
+ "items": {
411
+ "type": "object",
412
+ "additionalProperties": false,
413
+ "required": ["from", "to", "relation"],
414
+ "properties": {
415
+ "id": { "type": "string", "minLength": 1 },
416
+ "from": { "type": "string", "minLength": 1 },
417
+ "to": { "type": "string", "minLength": 1 },
418
+ "relation": {
419
+ "type": "string",
420
+ "enum": ["left_of", "right_of", "above", "below", "aligned_top", "aligned_left"]
421
+ },
422
+ "gap_min": { "type": "number" },
423
+ "gap_max": { "type": "number" },
424
+ "tolerance": { "type": "number", "minimum": 0 }
425
+ }
426
+ }
427
+ },
428
+ "min_sidebar_width": { "type": "number", "exclusiveMinimum": 0 },
429
+ "min_main_width": { "type": "number", "exclusiveMinimum": 0 },
430
+ "min_detail_width": { "type": "number", "exclusiveMinimum": 0 },
431
+ "safe_area_top_panels": {
432
+ "type": "array",
433
+ "items": { "type": "string", "minLength": 1 }
434
+ },
435
+ "safe_area_bottom_panels": {
436
+ "type": "array",
437
+ "items": { "type": "string", "minLength": 1 }
438
+ },
439
+ "safe_area_tolerance": { "type": "number", "minimum": 0 },
440
+ "keyboard_aware_panels": {
441
+ "type": "array",
442
+ "items": { "type": "string", "minLength": 1 }
443
+ },
444
+ "keyboard_clearance_min": { "type": "number", "minimum": 0 },
445
+ "thumb_reach_primary_action_panels": {
446
+ "type": "array",
447
+ "items": { "type": "string", "minLength": 1 }
448
+ },
449
+ "thumb_reach_zone": {
450
+ "type": ["object", "null"],
451
+ "additionalProperties": false,
452
+ "properties": {
453
+ "min_y_ratio": { "type": "number", "minimum": 0, "maximum": 1 },
454
+ "max_y_ratio": { "type": "number", "minimum": 0, "maximum": 1 }
455
+ }
456
+ },
457
+ "alignment_grid_step": { "type": "number", "exclusiveMinimum": 0 },
458
+ "alignment_grid_tolerance": { "type": "number", "minimum": 0 },
459
+ "alignment_grid_panels": {
460
+ "type": "array",
461
+ "items": { "type": "string", "minLength": 1 }
462
+ }
463
+ }
464
+ },
465
+ "visual_token_contract": {
466
+ "type": ["object", "null"],
467
+ "additionalProperties": false,
468
+ "properties": {
469
+ "font_families_required": {
470
+ "type": "array",
471
+ "items": { "type": "string", "minLength": 1 }
472
+ },
473
+ "font_weights_required": {
474
+ "type": "array",
475
+ "items": { "type": "number" }
476
+ },
477
+ "text_size_range": {
478
+ "type": ["object", "null"],
479
+ "additionalProperties": false,
480
+ "properties": {
481
+ "min": { "type": "number", "exclusiveMinimum": 0 },
482
+ "max": { "type": "number", "exclusiveMinimum": 0 }
483
+ }
484
+ },
485
+ "icon_density_range": {
486
+ "type": ["object", "null"],
487
+ "additionalProperties": false,
488
+ "properties": {
489
+ "min": { "type": "number", "minimum": 0 },
490
+ "max": { "type": "number", "minimum": 0 }
491
+ }
492
+ },
493
+ "icon_size_range": {
494
+ "type": ["object", "null"],
495
+ "additionalProperties": false,
496
+ "properties": {
497
+ "min": { "type": "number", "minimum": 0 },
498
+ "max": { "type": "number", "minimum": 0 }
499
+ }
500
+ },
501
+ "min_touch_target_size": {
502
+ "type": ["number", "null"],
503
+ "minimum": 0
504
+ },
505
+ "bottom_sheet_handle_required": {
506
+ "type": ["boolean", "null"]
507
+ },
508
+ "tabbar_active_state_required": {
509
+ "type": ["boolean", "null"]
510
+ },
511
+ "floating_primary_action_required": {
512
+ "type": ["boolean", "null"]
513
+ },
514
+ "segmented_control_active_state_required": {
515
+ "type": ["boolean", "null"]
516
+ },
517
+ "required_component_semantics": {
518
+ "type": "array",
519
+ "items": {
520
+ "type": "string",
521
+ "enum": [
522
+ "bottom_sheet",
523
+ "tab_bar",
524
+ "floating_primary_action",
525
+ "segmented_control",
526
+ "search_bar",
527
+ "snackbar",
528
+ "pull_to_refresh_indicator",
529
+ "loading_state",
530
+ "skeleton_state",
531
+ "error_state",
532
+ "search_active"
533
+ ]
534
+ }
535
+ },
536
+ "required_platform_physics_profiles": {
537
+ "type": "array",
538
+ "items": {
539
+ "type": "string",
540
+ "enum": ["ios_spring", "android_ripple", "mobile_h5_smooth"]
541
+ }
542
+ },
543
+ "list_row_height_range": {
544
+ "type": ["object", "null"],
545
+ "additionalProperties": false,
546
+ "properties": {
547
+ "min": { "type": "number", "minimum": 0 },
548
+ "max": { "type": "number", "minimum": 0 }
549
+ }
550
+ },
551
+ "toolbar_control_density_range": {
552
+ "type": ["object", "null"],
553
+ "additionalProperties": false,
554
+ "properties": {
555
+ "min": { "type": "number", "minimum": 0 },
556
+ "max": { "type": "number", "minimum": 0 }
557
+ }
558
+ },
559
+ "detail_block_spacing_scale": {
560
+ "type": ["object", "null"],
561
+ "additionalProperties": false,
562
+ "properties": {
563
+ "base": { "type": "number", "exclusiveMinimum": 0 },
564
+ "allowed_multipliers": {
565
+ "type": "array",
566
+ "items": { "type": "number", "exclusiveMinimum": 0 }
567
+ },
568
+ "tolerance": { "type": "number", "minimum": 0 }
569
+ }
570
+ },
571
+ "line_height_range": {
572
+ "type": ["object", "null"],
573
+ "additionalProperties": false,
574
+ "properties": {
575
+ "min": { "type": "number", "exclusiveMinimum": 0 },
576
+ "max": { "type": "number", "exclusiveMinimum": 0 }
577
+ }
578
+ },
579
+ "letter_spacing_range": {
580
+ "type": ["object", "null"],
581
+ "additionalProperties": false,
582
+ "properties": {
583
+ "min": { "type": "number" },
584
+ "max": { "type": "number" }
585
+ }
586
+ },
587
+ "radius_range": {
588
+ "type": ["object", "null"],
589
+ "additionalProperties": false,
590
+ "properties": {
591
+ "min": { "type": "number", "minimum": 0 },
592
+ "max": { "type": "number", "minimum": 0 }
593
+ }
594
+ },
595
+ "border_width_range": {
596
+ "type": ["object", "null"],
597
+ "additionalProperties": false,
598
+ "properties": {
599
+ "min": { "type": "number", "minimum": 0 },
600
+ "max": { "type": "number", "minimum": 0 }
601
+ }
602
+ },
603
+ "border_styles_required": {
604
+ "type": "array",
605
+ "items": { "type": "string", "minLength": 1 }
606
+ },
607
+ "border_weight_tiers_required": {
608
+ "type": "array",
609
+ "items": { "type": "string", "enum": ["hairline", "regular", "strong"] }
610
+ },
611
+ "color_roles": {
612
+ "type": ["object", "null"],
613
+ "additionalProperties": {
614
+ "type": "string",
615
+ "minLength": 1
616
+ }
617
+ },
618
+ "shadow_signatures_required": {
619
+ "type": "array",
620
+ "items": { "type": "string", "minLength": 1 }
621
+ },
622
+ "shadow_strength_tiers_required": {
623
+ "type": "array",
624
+ "items": { "type": "string", "enum": ["subtle", "medium", "strong"] }
625
+ },
626
+ "spacing_scale": {
627
+ "type": ["object", "null"],
628
+ "additionalProperties": false,
629
+ "properties": {
630
+ "base": { "type": "number", "exclusiveMinimum": 0 },
631
+ "allowed_multipliers": {
632
+ "type": "array",
633
+ "items": { "type": "number", "exclusiveMinimum": 0 }
634
+ },
635
+ "tolerance": { "type": "number", "minimum": 0 }
636
+ }
637
+ },
638
+ "component_family_consistency": {
639
+ "type": ["object", "null"],
640
+ "additionalProperties": false,
641
+ "properties": {
642
+ "toolbar_controls": {
643
+ "type": ["object", "null"],
644
+ "additionalProperties": false,
645
+ "properties": {
646
+ "max_text_size_delta": { "type": "number", "minimum": 0 },
647
+ "max_line_height_delta": { "type": "number", "minimum": 0 },
648
+ "max_radius_delta": { "type": "number", "minimum": 0 },
649
+ "max_border_width_delta": { "type": "number", "minimum": 0 }
650
+ }
651
+ },
652
+ "list_rows": {
653
+ "type": ["object", "null"],
654
+ "additionalProperties": false,
655
+ "properties": {
656
+ "max_text_size_delta": { "type": "number", "minimum": 0 },
657
+ "max_line_height_delta": { "type": "number", "minimum": 0 },
658
+ "max_radius_delta": { "type": "number", "minimum": 0 },
659
+ "max_border_width_delta": { "type": "number", "minimum": 0 }
660
+ }
661
+ },
662
+ "detail_blocks": {
663
+ "type": ["object", "null"],
664
+ "additionalProperties": false,
665
+ "properties": {
666
+ "max_text_size_delta": { "type": "number", "minimum": 0 },
667
+ "max_line_height_delta": { "type": "number", "minimum": 0 },
668
+ "max_radius_delta": { "type": "number", "minimum": 0 },
669
+ "max_border_width_delta": { "type": "number", "minimum": 0 }
670
+ }
671
+ }
672
+ }
673
+ }
674
+ }
675
+ },
676
+ "observed_layout": {
677
+ "type": ["object", "null"],
678
+ "additionalProperties": false,
679
+ "properties": {
680
+ "columns": {
681
+ "type": "array",
682
+ "items": {
683
+ "type": "object",
684
+ "additionalProperties": false,
685
+ "required": ["id", "width"],
686
+ "properties": {
687
+ "id": { "type": "string", "minLength": 1 },
688
+ "width": { "type": "number", "exclusiveMinimum": 0 }
689
+ }
690
+ }
691
+ }
692
+ }
693
+ },
694
+ "observed_visual_tokens": {
695
+ "type": ["object", "null"],
696
+ "additionalProperties": false,
697
+ "properties": {
698
+ "font_families": {
699
+ "type": "array",
700
+ "items": { "type": "string", "minLength": 1 }
701
+ },
702
+ "font_weights": {
703
+ "type": "array",
704
+ "items": { "type": "number" }
705
+ },
706
+ "text_sizes": {
707
+ "type": "array",
708
+ "items": { "type": "number", "exclusiveMinimum": 0 }
709
+ },
710
+ "icon_density_values": {
711
+ "type": "array",
712
+ "items": { "type": "number", "minimum": 0 }
713
+ },
714
+ "icon_size_values": {
715
+ "type": "array",
716
+ "items": { "type": "number", "minimum": 0 }
717
+ },
718
+ "touch_target_sizes": {
719
+ "type": "array",
720
+ "items": { "type": "number", "minimum": 0 }
721
+ },
722
+ "safe_area_top_inset": {
723
+ "type": ["number", "null"],
724
+ "minimum": 0
725
+ },
726
+ "safe_area_bottom_inset": {
727
+ "type": ["number", "null"],
728
+ "minimum": 0
729
+ },
730
+ "keyboard_inset_bottom": {
731
+ "type": ["number", "null"],
732
+ "minimum": 0
733
+ },
734
+ "bottom_sheet_handle_present": {
735
+ "type": ["boolean", "null"]
736
+ },
737
+ "tabbar_active_state_present": {
738
+ "type": ["boolean", "null"]
739
+ },
740
+ "floating_primary_action_present": {
741
+ "type": ["boolean", "null"]
742
+ },
743
+ "segmented_control_active_state_present": {
744
+ "type": ["boolean", "null"]
745
+ },
746
+ "loading_state_present": {
747
+ "type": ["boolean", "null"]
748
+ },
749
+ "skeleton_state_present": {
750
+ "type": ["boolean", "null"]
751
+ },
752
+ "error_state_present": {
753
+ "type": ["boolean", "null"]
754
+ },
755
+ "search_active_present": {
756
+ "type": ["boolean", "null"]
757
+ },
758
+ "component_semantics": {
759
+ "type": "array",
760
+ "items": {
761
+ "type": "string",
762
+ "enum": [
763
+ "bottom_sheet",
764
+ "tab_bar",
765
+ "floating_primary_action",
766
+ "segmented_control",
767
+ "search_bar",
768
+ "snackbar",
769
+ "pull_to_refresh_indicator",
770
+ "loading_state",
771
+ "skeleton_state",
772
+ "error_state",
773
+ "search_active"
774
+ ]
775
+ }
776
+ },
777
+ "platform_physics_profiles": {
778
+ "type": "array",
779
+ "items": {
780
+ "type": "string",
781
+ "enum": ["ios_spring", "android_ripple", "mobile_h5_smooth"]
782
+ }
783
+ },
784
+ "transition_durations": {
785
+ "type": "array",
786
+ "items": { "type": "number", "minimum": 0 }
787
+ },
788
+ "transition_timing_functions": {
789
+ "type": "array",
790
+ "items": { "type": "string", "minLength": 1 }
791
+ },
792
+ "animation_durations": {
793
+ "type": "array",
794
+ "items": { "type": "number", "minimum": 0 }
795
+ },
796
+ "list_row_heights": {
797
+ "type": "array",
798
+ "items": { "type": "number", "minimum": 0 }
799
+ },
800
+ "toolbar_control_density_values": {
801
+ "type": "array",
802
+ "items": { "type": "number", "minimum": 0 }
803
+ },
804
+ "detail_block_spacing_values": {
805
+ "type": "array",
806
+ "items": { "type": "number", "minimum": 0 }
807
+ },
808
+ "component_family_consistency": {
809
+ "type": ["object", "null"],
810
+ "additionalProperties": false,
811
+ "properties": {
812
+ "toolbar_controls": {
813
+ "type": ["object", "null"],
814
+ "additionalProperties": false,
815
+ "properties": {
816
+ "text_sizes": { "type": "array", "items": { "type": "number", "minimum": 0 } },
817
+ "line_heights": { "type": "array", "items": { "type": "number", "minimum": 0 } },
818
+ "radius_values": { "type": "array", "items": { "type": "number", "minimum": 0 } },
819
+ "border_widths": { "type": "array", "items": { "type": "number", "minimum": 0 } }
820
+ }
821
+ },
822
+ "list_rows": {
823
+ "type": ["object", "null"],
824
+ "additionalProperties": false,
825
+ "properties": {
826
+ "text_sizes": { "type": "array", "items": { "type": "number", "minimum": 0 } },
827
+ "line_heights": { "type": "array", "items": { "type": "number", "minimum": 0 } },
828
+ "radius_values": { "type": "array", "items": { "type": "number", "minimum": 0 } },
829
+ "border_widths": { "type": "array", "items": { "type": "number", "minimum": 0 } }
830
+ }
831
+ },
832
+ "detail_blocks": {
833
+ "type": ["object", "null"],
834
+ "additionalProperties": false,
835
+ "properties": {
836
+ "text_sizes": { "type": "array", "items": { "type": "number", "minimum": 0 } },
837
+ "line_heights": { "type": "array", "items": { "type": "number", "minimum": 0 } },
838
+ "radius_values": { "type": "array", "items": { "type": "number", "minimum": 0 } },
839
+ "border_widths": { "type": "array", "items": { "type": "number", "minimum": 0 } }
840
+ }
841
+ }
842
+ }
843
+ },
844
+ "line_heights": {
845
+ "type": "array",
846
+ "items": { "type": "number", "exclusiveMinimum": 0 }
847
+ },
848
+ "letter_spacings": {
849
+ "type": "array",
850
+ "items": { "type": "number" }
851
+ },
852
+ "radius_values": {
853
+ "type": "array",
854
+ "items": { "type": "number", "minimum": 0 }
855
+ },
856
+ "border_widths": {
857
+ "type": "array",
858
+ "items": { "type": "number", "minimum": 0 }
859
+ },
860
+ "border_styles": {
861
+ "type": "array",
862
+ "items": { "type": "string", "minLength": 1 }
863
+ },
864
+ "border_weight_tiers": {
865
+ "type": "array",
866
+ "items": { "type": "string", "enum": ["hairline", "regular", "strong"] }
867
+ },
868
+ "shadow_signatures": {
869
+ "type": "array",
870
+ "items": { "type": "string", "minLength": 1 }
871
+ },
872
+ "shadow_strength_tiers": {
873
+ "type": "array",
874
+ "items": { "type": "string", "enum": ["subtle", "medium", "strong"] }
875
+ },
876
+ "color_roles": {
877
+ "type": ["object", "null"],
878
+ "additionalProperties": {
879
+ "type": "string",
880
+ "minLength": 1
881
+ }
882
+ },
883
+ "spacing_values": {
884
+ "type": "array",
885
+ "items": { "type": "number", "minimum": 0 }
886
+ }
887
+ }
888
+ },
889
+ "viewport_metrics": {
890
+ "type": ["object", "null"],
891
+ "additionalProperties": false,
892
+ "properties": {
893
+ "safe_area_top": { "type": ["number", "null"], "minimum": 0 },
894
+ "safe_area_bottom": { "type": ["number", "null"], "minimum": 0 },
895
+ "keyboard_inset_bottom": { "type": ["number", "null"], "minimum": 0 }
896
+ }
897
+ },
898
+ "layout_observations": {
899
+ "type": ["object", "null"],
900
+ "additionalProperties": false,
901
+ "properties": {
902
+ "panels": {
903
+ "type": "array",
904
+ "items": {
905
+ "type": "object",
906
+ "additionalProperties": false,
907
+ "required": ["id", "width"],
908
+ "properties": {
909
+ "id": { "type": "string", "minLength": 1 },
910
+ "x": { "type": ["number", "null"] },
911
+ "y": { "type": ["number", "null"] },
912
+ "width": { "type": "number", "exclusiveMinimum": 0 },
913
+ "height": { "type": ["number", "null"], "exclusiveMinimum": 0 }
914
+ }
915
+ }
916
+ },
917
+ "regions": {
918
+ "type": "array",
919
+ "items": {
920
+ "type": "object",
921
+ "additionalProperties": false,
922
+ "required": ["id", "left", "top", "right", "bottom"],
923
+ "properties": {
924
+ "id": { "type": "string", "minLength": 1 },
925
+ "left": { "type": "number" },
926
+ "top": { "type": "number" },
927
+ "right": { "type": "number" },
928
+ "bottom": { "type": "number" }
929
+ }
930
+ }
931
+ },
932
+ "dom_rects": {
933
+ "type": "array",
934
+ "items": {
935
+ "type": "object",
936
+ "additionalProperties": false,
937
+ "required": ["left", "top", "width", "height"],
938
+ "properties": {
939
+ "id": { "type": "string", "minLength": 1 },
940
+ "panel_id": { "type": "string", "minLength": 1 },
941
+ "selector": { "type": "string", "minLength": 1 },
942
+ "left": { "type": "number" },
943
+ "top": { "type": "number" },
944
+ "width": { "type": "number", "exclusiveMinimum": 0 },
945
+ "height": { "type": "number", "exclusiveMinimum": 0 }
946
+ }
947
+ }
948
+ }
949
+ }
950
+ },
951
+ "screenshot_evidence_mode": {
952
+ "type": "string",
953
+ "enum": ["metadata_only", "reference_backed"]
954
+ },
955
+ "evidence": {
956
+ "type": ["object", "null"],
957
+ "additionalProperties": false,
958
+ "properties": {
959
+ "reference_image_exists": { "type": "boolean" },
960
+ "screenshot_image_exists": { "type": "boolean" }
961
+ }
962
+ },
963
+ "status": {
964
+ "type": "string",
965
+ "enum": ["pass", "needs_follow_up"]
966
+ },
967
+ "blockers": {
968
+ "type": "array",
969
+ "items": { "type": "string" }
970
+ },
971
+ "blocker": {
972
+ "type": "string"
973
+ }
974
+ }
975
+ }
976
+ }
977
+ }
978
+ }