@surlymochan/evalid 0.0.0-stage → 0.4.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 +94 -0
  2. package/LICENSE +21 -0
  3. package/README.md +315 -2
  4. package/RELEASE_NOTES.md +124 -0
  5. package/atoms/registry.json +758 -0
  6. package/bin/xflow.js +7261 -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 +96 -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 +1130 -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 +1014 -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 +481 -0
  131. package/workflows/yolo.yaml +241 -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 +107 -0
  158. package/xflow/atoms/i6b_tdd_proof_validate.py +184 -0
  159. package/xflow/atoms/i6c_tdd_quality_review.py +372 -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 +956 -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 +47 -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 +483 -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 +75 -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
package/package.json CHANGED
@@ -1,6 +1,85 @@
1
1
  {
2
2
  "name": "@surlymochan/evalid",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.4.1",
4
+ "description": "Claimed != verified: a runtime verification layer for coding agents. It seals each test run and replays it from a clean snapshot, with a zero-judge gate pipeline (spec clarification, code review, TDD proof) and the xflow CLI.",
5
+ "keywords": [
6
+ "ai-agents",
7
+ "coding-agents",
8
+ "workflow",
9
+ "tdd",
10
+ "cli",
11
+ "codex",
12
+ "claude-code",
13
+ "cursor",
14
+ "openspec",
15
+ "developer-tools"
16
+ ],
17
+ "homepage": "https://github.com/surlymochan/evalid#readme",
18
+ "bugs": {
19
+ "url": "https://github.com/surlymochan/evalid/issues"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/surlymochan/evalid.git"
24
+ },
25
+ "author": "Chao Chen (https://github.com/surlymochan)",
26
+ "license": "MIT",
27
+ "type": "module",
28
+ "main": "src/index.js",
29
+ "bin": {
30
+ "xflow": "bin/xflow.js"
31
+ },
32
+ "files": [
33
+ "README.md",
34
+ "RELEASE_NOTES.md",
35
+ "CHANGELOG.md",
36
+ "atoms/",
37
+ "bin/",
38
+ "docs/",
39
+ "!docs/adoption/evidence/**",
40
+ "!docs/adoption/trial-packets/**",
41
+ "!docs/benchmark-evidence/**",
42
+ "!docs/assets/**",
43
+ "prompts/",
44
+ "schemas/",
45
+ "scripts/",
46
+ "specs/README.md",
47
+ "specs/architecture.md",
48
+ "specs/product.md",
49
+ "specs/workflow.md",
50
+ "src/",
51
+ "workflows/",
52
+ "xflow/",
53
+ "!**/__pycache__/**",
54
+ "!**/*.pyc"
55
+ ],
56
+ "engines": {
57
+ "node": ">=22.5"
58
+ },
59
+ "publishConfig": {
60
+ "access": "public"
61
+ },
62
+ "scripts": {
63
+ "start": "node bin/xflow.js serve",
64
+ "test": "node scripts/run-tests.mjs",
65
+ "drift:scan": "node --test test/workflow-drift-scan.test.js",
66
+ "doctor": "node bin/xflow.js doctor",
67
+ "verify": "npm test",
68
+ "skill:sync": "sh xflow/scripts/sync_installed_xflow_skill.sh",
69
+ "skill:diff": "sh xflow/scripts/check_installed_xflow_skill_sync.sh",
70
+ "pack:check": "npm pack --dry-run",
71
+ "publish:check": "npm run release:pack && npm publish --dry-run --access public",
72
+ "release:local": "npm run verify && npm run drift:scan && npm run skill:sync && npm run skill:diff",
73
+ "release:pack": "npm run verify && npm run drift:scan && npm run skill:diff && npm run pack:check",
74
+ "workflow:yolo": "node bin/xflow.js workflow run workflows/yolo.yaml",
75
+ "workflow:corps": "node bin/xflow.js corps",
76
+ "atom:list": "node bin/xflow.js atom list"
77
+ },
78
+ "dependencies": {
79
+ "ajv": "^8.12.0",
80
+ "js-yaml": "^4.1.0"
81
+ },
82
+ "devDependencies": {
83
+ "playwright": "^1.59.1"
84
+ }
85
+ }
@@ -0,0 +1,46 @@
1
+ # Pencil Draft — {{phase_label}}
2
+
3
+ ## Mission
4
+ Turn the already-selected design direction and winning layout into a single concrete Pencil draft.
5
+
6
+ ## Context
7
+ - **Change ID**: {{change_id}}
8
+ - **Artifact Directory**: {{artifact_dir}}
9
+ - **Primary Output**: `{{expected_artifact}}`
10
+
11
+ ## Required Upstream Inputs
12
+ Before drawing, read these files when they exist in `{{artifact_dir}}`:
13
+ 1. `design_contract.json`
14
+ 2. `competitor_reconstruction_review.json`
15
+ 3. `reference_surface_lock.json`
16
+ 4. `reconstruction_pack.json`
17
+ 5. `generation_contract.json`
18
+ 6. `design_system_pack.json`
19
+ 7. `image_reference_set.json`
20
+ 8. `visual_direction_synthesis.json`
21
+ 9. `layout_competition.json`
22
+ 10. `design_selection.json`
23
+ 11. `ux_design_brief.json`
24
+ 12. `pencil_generation_plan.json` (when already prepared)
25
+
26
+ ## Execution Rules
27
+ 1. Build exactly one winning desktop/product surface, not multiple alternatives.
28
+ 2. Follow the selected direction, winning layout, generation contract, and UX brief literally when they are present.
29
+ 3. Generate in stages: shell first, then primary focus components, then supporting components, then local polish.
30
+ 4. Treat `component_blueprint` and `staged_generation` as execution instructions, not optional context.
31
+ 5. Keep the composition product-like and implementation-ready; avoid decorative exploration loops.
32
+ 6. Prefer one primary frame/workbench with the key panels, controls, and hierarchy already laid out.
33
+ 7. Treat the primary reference surface lock as the source of truth; supporting surfaces may only refine, not replace, the locked skeleton.
34
+ 8. Keep naming and structure readable for downstream refinement and benchmark comparison.
35
+ 9. Treat `visual_constraints.aesthetic_standard` as a hard quality bar, not a mood-board suggestion.
36
+ 10. When `visual_constraints.image_reference_generation` is enabled, read `image_reference_set.json` and use its materialized GPT/image-model reference artifacts as high-aesthetic targets, then translate them into editable Pencil primitives; do not ship bitmap mockups as the implementation.
37
+ 11. Read `design_system_pack.json` as a hard design-system contract: allowed primitives, required states, token policy, preview loop, and commercial/open practice sources must shape the draft.
38
+ 12. Pencil is the editable assembly/refinement surface. It is not sufficient by itself for high-aesthetic UI unless the design-system pack, image-reference, and benchmark evidence also converge.
39
+
40
+ ## Output
41
+ - Save the Pencil file to: `{{expected_artifact}}`
42
+ - Also write any required supporting outputs:
43
+ {{auxiliary_outputs}}
44
+
45
+ ## Stop Condition
46
+ Finish when the draft clearly reflects the frozen direction/layout and is ready for review or refinement.
@@ -0,0 +1,46 @@
1
+ # Pencil Refine — {{phase_label}}
2
+
3
+ ## Mission
4
+ Refine the existing Pencil draft using the latest review and benchmark evidence, without reopening the design direction.
5
+
6
+ ## Context
7
+ - **Change ID**: {{change_id}}
8
+ - **Artifact Directory**: {{artifact_dir}}
9
+ - **Primary Output**: `{{expected_artifact}}`
10
+
11
+ ## Required Inputs
12
+ Read these files when they exist in `{{artifact_dir}}`:
13
+ 1. `pencil_output.pen`
14
+ 2. `llm_design_review.json`
15
+ 3. `visual_benchmark.json`
16
+ 4. `benchmark_repair_plan.json`
17
+ 5. `generation_contract.json`
18
+ 6. `design_system_pack.json`
19
+ 7. `image_reference_set.json`
20
+ 8. `design_selection.json`
21
+ 9. `ux_design_brief.json`
22
+ 10. `pencil_refine_targets.json` (when already prepared)
23
+
24
+ ## Execution Rules
25
+ 0. Fast path: if `benchmark_repair_plan.json` says `status: "not_needed"` and `visual_benchmark.json` shows every scenario passing, preserve the existing draft, do not inspect or rewrite component internals, and save the current Pencil file to the primary output as an explicit no-op refinement.
26
+ 1. Start from the existing Pencil draft instead of recreating the surface from scratch.
27
+ 2. Apply only the changes needed to address review findings, benchmark deltas, repair-plan hotspots, and hierarchy issues.
28
+ 3. Treat each repair target as component-local work; preserve non-target components unless a target explicitly includes them.
29
+ 4. Respect refine scopes from `pencil_refine_targets.json` when present:
30
+ - `allow_big_change`: geometry, hierarchy, and local structure may change inside the target bounds.
31
+ - `micro_tune_only`: only tokens, spacing, copy rhythm, and small alignment nudges may change.
32
+ - `freeze`: do not visually or structurally alter these components in this pass.
33
+ 5. Preserve the selected layout and product logic unless the review evidence clearly requires adjustment.
34
+ 6. Use the generation contract and locked primary reference surface to keep refinement convergent.
35
+ 7. Keep refinement focused and convergent; avoid opening new stylistic branches or whole-page redraws.
36
+ 8. Preserve the high-aesthetic contract from `generation_contract.json`; fixes that improve similarity but damage hierarchy, typography rhythm, density, or interaction polish are regressions.
37
+ 9. If `image_reference_set.json` is present, refine toward its material quality and component rhythm while keeping the product surface editable and benchmarkable.
38
+ 10. Keep refinements inside `design_system_pack.json`: do not invent primitives, omit required states, or bypass the preview/proof loop to make a local visual fix easier.
39
+
40
+ ## Output
41
+ - Save the refined Pencil file to: `{{expected_artifact}}`
42
+ - Also write any required supporting outputs:
43
+ {{auxiliary_outputs}}
44
+
45
+ ## Stop Condition
46
+ Finish when the draft is materially improved against the review evidence and ready for design acceptance.
@@ -0,0 +1,24 @@
1
+ # Heavy Phase — {{phase_label}}
2
+
3
+ ## Context
4
+ - **Change ID**: {{change_id}}
5
+ - **Phase**: {{phase_id}} ({{phase_label}})
6
+ - **Artifact Directory**: {{artifact_dir}}
7
+
8
+ ## Intake
9
+ {{intake}}
10
+
11
+ ## Task
12
+ Produce the primary artifact for this phase and any required supporting outputs.
13
+
14
+ ### Primary Output
15
+ Write the primary artifact to: `{{expected_artifact}}`
16
+
17
+ ### Supporting Outputs
18
+ {{auxiliary_outputs}}
19
+
20
+ ### Requirements
21
+ 1. Read any existing proposal, plan, design, or prior phase artifacts in `{{artifact_dir}}`
22
+ 2. Perform the work required for this phase instead of writing placeholder prose
23
+ 3. Keep outputs consistent with the current phase semantics and downstream gates
24
+ 4. If code or design artifacts must change, update the project checkout directly
@@ -0,0 +1,32 @@
1
+ # Execution Phase — {{phase_label}}
2
+
3
+ ## Context
4
+ - **Change ID**: {{change_id}}
5
+ - **Phase**: {{phase_id}} ({{phase_label}})
6
+ - **Artifact Directory**: {{artifact_dir}}
7
+
8
+ ## Intake
9
+ {{intake}}
10
+
11
+ ## Task
12
+ Produce the real artifact for this phase and any necessary supporting changes.
13
+
14
+ ## Phase Guidance
15
+ {{phase_guidance}}
16
+
17
+ ### Requirements
18
+ 1. Read any existing plan, proposal, or spec files in {{artifact_dir}}
19
+ 2. Perform the actual work required for this phase according to the frozen scope
20
+ 3. Write the primary phase artifact to `{{expected_artifact}}`
21
+ 4. Ensure the artifact is concrete and downstream-gate ready, not placeholder prose
22
+ 5. If code or design artifacts must change, update the project checkout directly
23
+
24
+ ### Artifact Expectations
25
+ The primary artifact should contain phase-appropriate structured evidence such as:
26
+ - `phase_id`: "{{phase_id}}"
27
+ - `summary`: "What was implemented"
28
+ - `files_changed`: ["list", "of", "files"]
29
+ - `verification`: "commands run and results"
30
+
31
+ ### Output
32
+ Write the primary artifact to: `{{expected_artifact}}`
@@ -0,0 +1,91 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://openflow/schemas/competitor-reconstruction-contract.schema.json",
4
+ "title": "Competitor Reconstruction Contract",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "status",
9
+ "competitor_product",
10
+ "target_surfaces",
11
+ "primary_reference_surface",
12
+ "supporting_reference_surfaces",
13
+ "required_modules",
14
+ "primary_journeys",
15
+ "business_logic_invariants",
16
+ "decomposition_requirements"
17
+ ],
18
+ "properties": {
19
+ "status": {
20
+ "type": "string",
21
+ "const": "frozen"
22
+ },
23
+ "competitor_product": {
24
+ "type": "string",
25
+ "minLength": 1
26
+ },
27
+ "target_surfaces": {
28
+ "type": "array",
29
+ "minItems": 1,
30
+ "items": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ }
34
+ },
35
+ "primary_reference_surface": {
36
+ "type": "string",
37
+ "minLength": 1
38
+ },
39
+ "supporting_reference_surfaces": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string",
43
+ "minLength": 1
44
+ }
45
+ },
46
+ "required_modules": {
47
+ "type": "array",
48
+ "minItems": 1,
49
+ "items": {
50
+ "type": "string",
51
+ "minLength": 1
52
+ }
53
+ },
54
+ "primary_journeys": {
55
+ "type": "array",
56
+ "minItems": 1,
57
+ "items": {
58
+ "type": "string",
59
+ "minLength": 1
60
+ }
61
+ },
62
+ "business_logic_invariants": {
63
+ "type": "array",
64
+ "minItems": 1,
65
+ "items": {
66
+ "type": "string",
67
+ "minLength": 1
68
+ }
69
+ },
70
+ "decomposition_requirements": {
71
+ "type": "object",
72
+ "additionalProperties": false,
73
+ "required": [
74
+ "surface_map_required",
75
+ "layout_map_required",
76
+ "component_inventory_required",
77
+ "state_inventory_required",
78
+ "visual_token_map_required",
79
+ "reference_intermediate_model_required"
80
+ ],
81
+ "properties": {
82
+ "surface_map_required": { "type": "boolean" },
83
+ "layout_map_required": { "type": "boolean" },
84
+ "component_inventory_required": { "type": "boolean" },
85
+ "state_inventory_required": { "type": "boolean" },
86
+ "visual_token_map_required": { "type": "boolean" },
87
+ "reference_intermediate_model_required": { "type": "boolean" }
88
+ }
89
+ }
90
+ }
91
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://openflow/schemas/llm-design-review-aggregate.schema.json",
4
+ "title": "LLM Design Review Aggregate",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "version",
9
+ "phase",
10
+ "summary",
11
+ "benchmark_summary",
12
+ "worker_runs",
13
+ "aggregated_at"
14
+ ],
15
+ "properties": {
16
+ "version": {
17
+ "type": "integer",
18
+ "minimum": 1
19
+ },
20
+ "phase": {
21
+ "type": "string",
22
+ "const": "llm_design_review"
23
+ },
24
+ "summary": {
25
+ "type": "string",
26
+ "minLength": 1
27
+ },
28
+ "benchmark_summary": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": [
32
+ "scenario_count",
33
+ "passed_count",
34
+ "needs_follow_up_count",
35
+ "statuses"
36
+ ],
37
+ "properties": {
38
+ "scenario_count": { "type": "integer", "minimum": 0 },
39
+ "passed_count": { "type": "integer", "minimum": 0 },
40
+ "needs_follow_up_count": { "type": "integer", "minimum": 0 },
41
+ "statuses": {
42
+ "type": "array",
43
+ "items": {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "required": ["id", "status"],
47
+ "properties": {
48
+ "id": { "type": ["string", "null"] },
49
+ "status": { "type": "string" }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ },
55
+ "worker_runs": {
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "required": ["visual_review", "visual_benchmark"],
59
+ "properties": {
60
+ "visual_review": {
61
+ "type": "object",
62
+ "additionalProperties": false,
63
+ "required": ["artifact_file"],
64
+ "properties": {
65
+ "artifact_file": { "type": "string", "minLength": 1 }
66
+ }
67
+ },
68
+ "visual_benchmark": {
69
+ "type": "object",
70
+ "additionalProperties": false,
71
+ "required": ["artifact_file"],
72
+ "properties": {
73
+ "artifact_file": { "type": "string", "minLength": 1 }
74
+ }
75
+ }
76
+ }
77
+ },
78
+ "aggregated_at": {
79
+ "type": "string",
80
+ "minLength": 1
81
+ }
82
+ }
83
+ }