human2ai 0.1.0

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 (326) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +120 -0
  3. package/assets/quaternius/License_Standard.txt +22 -0
  4. package/assets/quaternius/README.md +31 -0
  5. package/assets/quaternius/Superhero_Female_FullBody.bin +0 -0
  6. package/assets/quaternius/Superhero_Female_FullBody.gltf +2056 -0
  7. package/assets/quaternius/Superhero_Male_FullBody.bin +0 -0
  8. package/assets/quaternius/Superhero_Male_FullBody.gltf +2018 -0
  9. package/dist/cli/integration.d.ts +39 -0
  10. package/dist/cli/integration.js +466 -0
  11. package/dist/cli/integration.js.map +1 -0
  12. package/dist/cli/main.d.ts +17 -0
  13. package/dist/cli/main.js +1455 -0
  14. package/dist/cli/main.js.map +1 -0
  15. package/dist/database/composition-session-repository.d.ts +37 -0
  16. package/dist/database/composition-session-repository.js +147 -0
  17. package/dist/database/composition-session-repository.js.map +1 -0
  18. package/dist/database/draft-version-errors.d.ts +29 -0
  19. package/dist/database/draft-version-errors.js +47 -0
  20. package/dist/database/draft-version-errors.js.map +1 -0
  21. package/dist/database/draft-version-store.d.ts +30 -0
  22. package/dist/database/draft-version-store.js +168 -0
  23. package/dist/database/draft-version-store.js.map +1 -0
  24. package/dist/database/image-asset-repository.d.ts +37 -0
  25. package/dist/database/image-asset-repository.js +101 -0
  26. package/dist/database/image-asset-repository.js.map +1 -0
  27. package/dist/database/image-input.d.ts +15 -0
  28. package/dist/database/image-input.js +28 -0
  29. package/dist/database/image-input.js.map +1 -0
  30. package/dist/database/migrate.d.ts +4 -0
  31. package/dist/database/migrate.js +45 -0
  32. package/dist/database/migrate.js.map +1 -0
  33. package/dist/database/project-session-repository.d.ts +72 -0
  34. package/dist/database/project-session-repository.js +291 -0
  35. package/dist/database/project-session-repository.js.map +1 -0
  36. package/dist/database/spatial-session-repository.d.ts +26 -0
  37. package/dist/database/spatial-session-repository.js +44 -0
  38. package/dist/database/spatial-session-repository.js.map +1 -0
  39. package/dist/database/style-library-repository.d.ts +70 -0
  40. package/dist/database/style-library-repository.js +290 -0
  41. package/dist/database/style-library-repository.js.map +1 -0
  42. package/dist/database/svg-input.d.ts +1 -0
  43. package/dist/database/svg-input.js +77 -0
  44. package/dist/database/svg-input.js.map +1 -0
  45. package/dist/database/ui-sketch-session-repository.d.ts +19 -0
  46. package/dist/database/ui-sketch-session-repository.js +35 -0
  47. package/dist/database/ui-sketch-session-repository.js.map +1 -0
  48. package/dist/domain/canvas-layer-order.d.ts +6 -0
  49. package/dist/domain/canvas-layer-order.js +40 -0
  50. package/dist/domain/canvas-layer-order.js.map +1 -0
  51. package/dist/domain/canvas-node-metadata.d.ts +20 -0
  52. package/dist/domain/canvas-node-metadata.js +17 -0
  53. package/dist/domain/canvas-node-metadata.js.map +1 -0
  54. package/dist/domain/canvas-states.d.ts +8 -0
  55. package/dist/domain/canvas-states.js +23 -0
  56. package/dist/domain/canvas-states.js.map +1 -0
  57. package/dist/domain/composition/analysis.d.ts +104 -0
  58. package/dist/domain/composition/analysis.js +337 -0
  59. package/dist/domain/composition/analysis.js.map +1 -0
  60. package/dist/domain/composition/camera-reference.d.ts +24 -0
  61. package/dist/domain/composition/camera-reference.js +34 -0
  62. package/dist/domain/composition/camera-reference.js.map +1 -0
  63. package/dist/domain/composition/draft.d.ts +50 -0
  64. package/dist/domain/composition/draft.js +609 -0
  65. package/dist/domain/composition/draft.js.map +1 -0
  66. package/dist/domain/composition/frame.d.ts +23 -0
  67. package/dist/domain/composition/frame.js +154 -0
  68. package/dist/domain/composition/frame.js.map +1 -0
  69. package/dist/domain/composition/geometry.d.ts +15 -0
  70. package/dist/domain/composition/geometry.js +262 -0
  71. package/dist/domain/composition/geometry.js.map +1 -0
  72. package/dist/domain/composition/index.d.ts +13 -0
  73. package/dist/domain/composition/index.js +10 -0
  74. package/dist/domain/composition/index.js.map +1 -0
  75. package/dist/domain/composition/layers.d.ts +4 -0
  76. package/dist/domain/composition/layers.js +12 -0
  77. package/dist/domain/composition/layers.js.map +1 -0
  78. package/dist/domain/composition/records.d.ts +14 -0
  79. package/dist/domain/composition/records.js +2 -0
  80. package/dist/domain/composition/records.js.map +1 -0
  81. package/dist/domain/composition/refinement/engine.d.ts +12 -0
  82. package/dist/domain/composition/refinement/engine.js +521 -0
  83. package/dist/domain/composition/refinement/engine.js.map +1 -0
  84. package/dist/domain/composition/refinement/relations.d.ts +16 -0
  85. package/dist/domain/composition/refinement/relations.js +293 -0
  86. package/dist/domain/composition/refinement/relations.js.map +1 -0
  87. package/dist/domain/composition/refinement/types.d.ts +181 -0
  88. package/dist/domain/composition/refinement/types.js +2 -0
  89. package/dist/domain/composition/refinement/types.js.map +1 -0
  90. package/dist/domain/composition/render.d.ts +5 -0
  91. package/dist/domain/composition/render.js +169 -0
  92. package/dist/domain/composition/render.js.map +1 -0
  93. package/dist/domain/composition/states.d.ts +9 -0
  94. package/dist/domain/composition/states.js +104 -0
  95. package/dist/domain/composition/states.js.map +1 -0
  96. package/dist/domain/composition/types.d.ts +149 -0
  97. package/dist/domain/composition/types.js +2 -0
  98. package/dist/domain/composition/types.js.map +1 -0
  99. package/dist/domain/composition/workflow.d.ts +15 -0
  100. package/dist/domain/composition/workflow.js +77 -0
  101. package/dist/domain/composition/workflow.js.map +1 -0
  102. package/dist/domain/fingerprint.d.ts +2 -0
  103. package/dist/domain/fingerprint.js +25 -0
  104. package/dist/domain/fingerprint.js.map +1 -0
  105. package/dist/domain/session/canvas-edit-history.d.ts +17 -0
  106. package/dist/domain/session/canvas-edit-history.js +53 -0
  107. package/dist/domain/session/canvas-edit-history.js.map +1 -0
  108. package/dist/domain/session/capabilities.d.ts +16 -0
  109. package/dist/domain/session/capabilities.js +84 -0
  110. package/dist/domain/session/capabilities.js.map +1 -0
  111. package/dist/domain/session/draft-version.d.ts +41 -0
  112. package/dist/domain/session/draft-version.js +2 -0
  113. package/dist/domain/session/draft-version.js.map +1 -0
  114. package/dist/domain/session/index.d.ts +5 -0
  115. package/dist/domain/session/index.js +3 -0
  116. package/dist/domain/session/index.js.map +1 -0
  117. package/dist/domain/session/types.d.ts +23 -0
  118. package/dist/domain/session/types.js +2 -0
  119. package/dist/domain/session/types.js.map +1 -0
  120. package/dist/domain/spatial/assets/quaternius-female-rig.json +799 -0
  121. package/dist/domain/spatial/assets/quaternius-rig.json +799 -0
  122. package/dist/domain/spatial/assets/quaternius-superhero-female.json +1 -0
  123. package/dist/domain/spatial/assets/quaternius-superhero.json +1 -0
  124. package/dist/domain/spatial/camera-box.d.ts +13 -0
  125. package/dist/domain/spatial/camera-box.js +52 -0
  126. package/dist/domain/spatial/camera-box.js.map +1 -0
  127. package/dist/domain/spatial/geometric-model.d.ts +4 -0
  128. package/dist/domain/spatial/geometric-model.js +101 -0
  129. package/dist/domain/spatial/geometric-model.js.map +1 -0
  130. package/dist/domain/spatial/hands.d.ts +36 -0
  131. package/dist/domain/spatial/hands.js +128 -0
  132. package/dist/domain/spatial/hands.js.map +1 -0
  133. package/dist/domain/spatial/index.d.ts +30 -0
  134. package/dist/domain/spatial/index.js +381 -0
  135. package/dist/domain/spatial/index.js.map +1 -0
  136. package/dist/domain/spatial/kinematics.d.ts +27 -0
  137. package/dist/domain/spatial/kinematics.js +285 -0
  138. package/dist/domain/spatial/kinematics.js.map +1 -0
  139. package/dist/domain/spatial/lighting.d.ts +35 -0
  140. package/dist/domain/spatial/lighting.js +173 -0
  141. package/dist/domain/spatial/lighting.js.map +1 -0
  142. package/dist/domain/spatial/model.d.ts +5 -0
  143. package/dist/domain/spatial/model.js +193 -0
  144. package/dist/domain/spatial/model.js.map +1 -0
  145. package/dist/domain/spatial/morph.d.ts +3 -0
  146. package/dist/domain/spatial/morph.js +187 -0
  147. package/dist/domain/spatial/morph.js.map +1 -0
  148. package/dist/domain/spatial/proportions.d.ts +46 -0
  149. package/dist/domain/spatial/proportions.js +59 -0
  150. package/dist/domain/spatial/proportions.js.map +1 -0
  151. package/dist/domain/spatial/reference-lines.d.ts +6 -0
  152. package/dist/domain/spatial/reference-lines.js +58 -0
  153. package/dist/domain/spatial/reference-lines.js.map +1 -0
  154. package/dist/domain/spatial/scene-cache.d.ts +15 -0
  155. package/dist/domain/spatial/scene-cache.js +69 -0
  156. package/dist/domain/spatial/scene-cache.js.map +1 -0
  157. package/dist/domain/spatial/scene.d.ts +8 -0
  158. package/dist/domain/spatial/scene.js +69 -0
  159. package/dist/domain/spatial/scene.js.map +1 -0
  160. package/dist/domain/spatial/types.d.ts +187 -0
  161. package/dist/domain/spatial/types.js +5 -0
  162. package/dist/domain/spatial/types.js.map +1 -0
  163. package/dist/domain/style/index.d.ts +1 -0
  164. package/dist/domain/style/index.js +2 -0
  165. package/dist/domain/style/index.js.map +1 -0
  166. package/dist/domain/style/prompt-summary.d.ts +2 -0
  167. package/dist/domain/style/prompt-summary.js +11 -0
  168. package/dist/domain/style/prompt-summary.js.map +1 -0
  169. package/dist/domain/style/types.d.ts +32 -0
  170. package/dist/domain/style/types.js +3 -0
  171. package/dist/domain/style/types.js.map +1 -0
  172. package/dist/domain/ui-sketch/draft.d.ts +12 -0
  173. package/dist/domain/ui-sketch/draft.js +424 -0
  174. package/dist/domain/ui-sketch/draft.js.map +1 -0
  175. package/dist/domain/ui-sketch/geometry.d.ts +7 -0
  176. package/dist/domain/ui-sketch/geometry.js +11 -0
  177. package/dist/domain/ui-sketch/geometry.js.map +1 -0
  178. package/dist/domain/ui-sketch/groups.d.ts +5 -0
  179. package/dist/domain/ui-sketch/groups.js +40 -0
  180. package/dist/domain/ui-sketch/groups.js.map +1 -0
  181. package/dist/domain/ui-sketch/index.d.ts +8 -0
  182. package/dist/domain/ui-sketch/index.js +8 -0
  183. package/dist/domain/ui-sketch/index.js.map +1 -0
  184. package/dist/domain/ui-sketch/layers.d.ts +4 -0
  185. package/dist/domain/ui-sketch/layers.js +11 -0
  186. package/dist/domain/ui-sketch/layers.js.map +1 -0
  187. package/dist/domain/ui-sketch/render.d.ts +2 -0
  188. package/dist/domain/ui-sketch/render.js +58 -0
  189. package/dist/domain/ui-sketch/render.js.map +1 -0
  190. package/dist/domain/ui-sketch/standardize.d.ts +17 -0
  191. package/dist/domain/ui-sketch/standardize.js +139 -0
  192. package/dist/domain/ui-sketch/standardize.js.map +1 -0
  193. package/dist/domain/ui-sketch/states.d.ts +5 -0
  194. package/dist/domain/ui-sketch/states.js +21 -0
  195. package/dist/domain/ui-sketch/states.js.map +1 -0
  196. package/dist/domain/ui-sketch/types.d.ts +73 -0
  197. package/dist/domain/ui-sketch/types.js +2 -0
  198. package/dist/domain/ui-sketch/types.js.map +1 -0
  199. package/dist/server/app.d.ts +18 -0
  200. package/dist/server/app.js +108 -0
  201. package/dist/server/app.js.map +1 -0
  202. package/dist/server/image-content-type-parser.d.ts +2 -0
  203. package/dist/server/image-content-type-parser.js +5 -0
  204. package/dist/server/image-content-type-parser.js.map +1 -0
  205. package/dist/server/routes/composition-sessions.d.ts +3 -0
  206. package/dist/server/routes/composition-sessions.js +190 -0
  207. package/dist/server/routes/composition-sessions.js.map +1 -0
  208. package/dist/server/routes/draft-version-routes.d.ts +10 -0
  209. package/dist/server/routes/draft-version-routes.js +201 -0
  210. package/dist/server/routes/draft-version-routes.js.map +1 -0
  211. package/dist/server/routes/image-assets.d.ts +3 -0
  212. package/dist/server/routes/image-assets.js +114 -0
  213. package/dist/server/routes/image-assets.js.map +1 -0
  214. package/dist/server/routes/project-sessions.d.ts +48 -0
  215. package/dist/server/routes/project-sessions.js +305 -0
  216. package/dist/server/routes/project-sessions.js.map +1 -0
  217. package/dist/server/routes/spatial-sessions.d.ts +3 -0
  218. package/dist/server/routes/spatial-sessions.js +80 -0
  219. package/dist/server/routes/spatial-sessions.js.map +1 -0
  220. package/dist/server/routes/style-library.d.ts +3 -0
  221. package/dist/server/routes/style-library.js +308 -0
  222. package/dist/server/routes/style-library.js.map +1 -0
  223. package/dist/server/routes/ui-sketch-sessions.d.ts +3 -0
  224. package/dist/server/routes/ui-sketch-sessions.js +14 -0
  225. package/dist/server/routes/ui-sketch-sessions.js.map +1 -0
  226. package/dist/server/runtime.d.ts +30 -0
  227. package/dist/server/runtime.js +123 -0
  228. package/dist/server/runtime.js.map +1 -0
  229. package/dist/server/spatial-render.d.ts +5 -0
  230. package/dist/server/spatial-render.js +360 -0
  231. package/dist/server/spatial-render.js.map +1 -0
  232. package/dist/server/start.d.ts +1 -0
  233. package/dist/server/start.js +3 -0
  234. package/dist/server/start.js.map +1 -0
  235. package/licenses/THIRD-PARTY-NOTICES.txt +16664 -0
  236. package/licenses/YisiUI-LICENSE +21 -0
  237. package/locales/en/common.json +671 -0
  238. package/migrations/0001_projects_and_sessions.sql +45 -0
  239. package/migrations/0002_composition_versions_and_refinements.sql +26 -0
  240. package/migrations/0003_ui_sketch_draft_versions.sql +12 -0
  241. package/migrations/0004_image_assets.sql +16 -0
  242. package/migrations/0005_style_library.sql +31 -0
  243. package/migrations/0006_session_styles.sql +6 -0
  244. package/migrations/0007_svg_image_assets.sql +19 -0
  245. package/migrations/0008_spatial_spaces.sql +20 -0
  246. package/package.json +82 -0
  247. package/schemas/composition-draft.schema.json +234 -0
  248. package/schemas/composition-refinement-plan.schema.json +758 -0
  249. package/schemas/spatial-draft.schema.json +517 -0
  250. package/schemas/spatial-operations.schema.json +1082 -0
  251. package/schemas/ui-layout-standardization-plan.schema.json +29 -0
  252. package/schemas/ui-sketch-draft.schema.json +197 -0
  253. package/skills/human2ai/SKILL.md +149 -0
  254. package/skills/human2ai/agents/openai.yaml +3 -0
  255. package/skills/human2ai/references/composition-projection.md +170 -0
  256. package/skills/human2ai/references/composition.md +79 -0
  257. package/skills/human2ai/references/spatial.md +188 -0
  258. package/skills/human2ai/references/svg-images.md +27 -0
  259. package/skills/human2ai/references/ui-layout.md +100 -0
  260. package/web/out/404/index.html +1 -0
  261. package/web/out/404.html +1 -0
  262. package/web/out/__next.__PAGE__.txt +26 -0
  263. package/web/out/__next._full.txt +21 -0
  264. package/web/out/__next._tree.txt +4 -0
  265. package/web/out/_next/static/TV-jgcACg6HANZAMZTE2S/_buildManifest.js +1 -0
  266. package/web/out/_next/static/TV-jgcACg6HANZAMZTE2S/_ssgManifest.js +1 -0
  267. package/web/out/_next/static/chunks/130-9fadd0432daff55d.js +1 -0
  268. package/web/out/_next/static/chunks/158-eb00456e1bab68b3.js +52 -0
  269. package/web/out/_next/static/chunks/20-0801fc297cda2a7a.js +1 -0
  270. package/web/out/_next/static/chunks/248-d4a79649dae2a3f8.js +259 -0
  271. package/web/out/_next/static/chunks/678-1305cadf8254d814.js +1 -0
  272. package/web/out/_next/static/chunks/728-eb8b667f79229443.js +1 -0
  273. package/web/out/_next/static/chunks/83607670-bc1279370476e59f.js +1 -0
  274. package/web/out/_next/static/chunks/app/_global-error/page-5eece43b8152c414.js +1 -0
  275. package/web/out/_next/static/chunks/app/_not-found/page-c0cd75ac39fbf9cf.js +1 -0
  276. package/web/out/_next/static/chunks/app/composition/page-051ee2fabb12110a.js +1 -0
  277. package/web/out/_next/static/chunks/app/layout-745ca27ef8830f4f.js +1 -0
  278. package/web/out/_next/static/chunks/app/page-0027378a269a6168.js +1 -0
  279. package/web/out/_next/static/chunks/app/spatial/page-266dedc81784d4f6.js +1 -0
  280. package/web/out/_next/static/chunks/app/styles/page-d5cb83af828ea9ed.js +1 -0
  281. package/web/out/_next/static/chunks/app/ui-sketch/page-2a8436e05a05c618.js +1 -0
  282. package/web/out/_next/static/chunks/c3f2cda1-9e279dab137b7272.js +342 -0
  283. package/web/out/_next/static/chunks/c7879cf7-7873c8afd9c9c666.js +1 -0
  284. package/web/out/_next/static/chunks/framework-6eacf80ec1e4c887.js +1 -0
  285. package/web/out/_next/static/chunks/main-5ee8fd93319f955c.js +5 -0
  286. package/web/out/_next/static/chunks/main-app-0cf10803ab17c700.js +1 -0
  287. package/web/out/_next/static/chunks/next/dist/client/components/builtin/app-error-5eece43b8152c414.js +1 -0
  288. package/web/out/_next/static/chunks/next/dist/client/components/builtin/forbidden-5eece43b8152c414.js +1 -0
  289. package/web/out/_next/static/chunks/next/dist/client/components/builtin/global-error-728204b7cccc4ed2.js +1 -0
  290. package/web/out/_next/static/chunks/next/dist/client/components/builtin/not-found-5eece43b8152c414.js +1 -0
  291. package/web/out/_next/static/chunks/next/dist/client/components/builtin/unauthorized-5eece43b8152c414.js +1 -0
  292. package/web/out/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  293. package/web/out/_next/static/chunks/webpack-97ae63c0e0b2a512.js +1 -0
  294. package/web/out/_next/static/css/3b7982b41ed8eccd.css +4 -0
  295. package/web/out/_next/static/css/81ae71f1d3e9a866.css +1 -0
  296. package/web/out/_next/static/css/8c3843f4951fa9f6.css +5 -0
  297. package/web/out/_next/static/css/c739d0131cdcc891.css +1 -0
  298. package/web/out/_next/static/css/ce1b4bb3ad3c6073.css +1 -0
  299. package/web/out/_next/static/css/db96ae2e88545d96.css +1 -0
  300. package/web/out/_not-found/__next._full.txt +18 -0
  301. package/web/out/_not-found/__next._not-found.__PAGE__.txt +24 -0
  302. package/web/out/_not-found/__next._tree.txt +3 -0
  303. package/web/out/_not-found/index.html +1 -0
  304. package/web/out/_not-found/index.txt +18 -0
  305. package/web/out/composition/__next._full.txt +25 -0
  306. package/web/out/composition/__next._tree.txt +6 -0
  307. package/web/out/composition/__next.composition.__PAGE__.txt +31 -0
  308. package/web/out/composition/index.html +1 -0
  309. package/web/out/composition/index.txt +25 -0
  310. package/web/out/index.html +1 -0
  311. package/web/out/index.txt +21 -0
  312. package/web/out/spatial/__next._full.txt +23 -0
  313. package/web/out/spatial/__next._tree.txt +4 -0
  314. package/web/out/spatial/__next.spatial.__PAGE__.txt +29 -0
  315. package/web/out/spatial/index.html +1 -0
  316. package/web/out/spatial/index.txt +23 -0
  317. package/web/out/styles/__next._full.txt +23 -0
  318. package/web/out/styles/__next._tree.txt +4 -0
  319. package/web/out/styles/__next.styles.__PAGE__.txt +29 -0
  320. package/web/out/styles/index.html +1 -0
  321. package/web/out/styles/index.txt +23 -0
  322. package/web/out/ui-sketch/__next._full.txt +25 -0
  323. package/web/out/ui-sketch/__next._tree.txt +6 -0
  324. package/web/out/ui-sketch/__next.ui-sketch.__PAGE__.txt +31 -0
  325. package/web/out/ui-sketch/index.html +1 -0
  326. package/web/out/ui-sketch/index.txt +25 -0
@@ -0,0 +1,758 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://yisi.local/schemas/composition-refinement-plan.schema.json",
4
+ "title": "Agent-authored Composition Refinement Plan",
5
+ "oneOf": [
6
+ {
7
+ "$ref": "#/$defs/legacyPlan"
8
+ },
9
+ {
10
+ "$ref": "#/$defs/directedPlan"
11
+ }
12
+ ],
13
+ "$defs": {
14
+ "focusAnchor": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": [
18
+ "method",
19
+ "methodVersion",
20
+ "targetFocusId",
21
+ "anchor"
22
+ ],
23
+ "properties": {
24
+ "method": {
25
+ "const": "focus-anchor"
26
+ },
27
+ "methodVersion": {
28
+ "const": 1
29
+ },
30
+ "targetFocusId": {
31
+ "type": "string",
32
+ "pattern": "^focus-[0-9]+$"
33
+ },
34
+ "anchor": {
35
+ "enum": [
36
+ "optical-center",
37
+ "geometric-center",
38
+ "golden-right-upper",
39
+ "golden-left-upper",
40
+ "golden-right-lower",
41
+ "golden-left-lower",
42
+ "third-right-upper",
43
+ "third-left-upper",
44
+ "third-right-lower",
45
+ "third-left-lower"
46
+ ]
47
+ },
48
+ "strength": {
49
+ "const": "subtle",
50
+ "description": "Legacy compatibility field; does not restrict adjustment magnitude."
51
+ },
52
+ "reason": {
53
+ "type": "string",
54
+ "minLength": 1,
55
+ "maxLength": 2000
56
+ },
57
+ "expectedEffect": {
58
+ "type": "string",
59
+ "minLength": 1,
60
+ "maxLength": 2000
61
+ }
62
+ }
63
+ },
64
+ "axisRelation": {
65
+ "type": "object",
66
+ "additionalProperties": false,
67
+ "required": [
68
+ "method",
69
+ "methodVersion",
70
+ "focusIds",
71
+ "areaIds",
72
+ "relation"
73
+ ],
74
+ "properties": {
75
+ "method": {
76
+ "const": "axis-relation"
77
+ },
78
+ "methodVersion": {
79
+ "const": 1
80
+ },
81
+ "focusIds": {
82
+ "type": "array",
83
+ "minItems": 2,
84
+ "maxItems": 2,
85
+ "uniqueItems": true,
86
+ "items": {
87
+ "type": "string",
88
+ "pattern": "^focus-[0-9]+$"
89
+ }
90
+ },
91
+ "areaIds": {
92
+ "type": "array",
93
+ "minItems": 2,
94
+ "maxItems": 2,
95
+ "uniqueItems": true,
96
+ "items": {
97
+ "type": "string",
98
+ "pattern": "^area-[0-9]+$"
99
+ }
100
+ },
101
+ "relation": {
102
+ "enum": [
103
+ "parallel",
104
+ "perpendicular",
105
+ "mirrored-cross"
106
+ ]
107
+ },
108
+ "strength": {
109
+ "const": "subtle",
110
+ "description": "Legacy compatibility field; does not restrict adjustment magnitude."
111
+ },
112
+ "reason": {
113
+ "type": "string",
114
+ "minLength": 1,
115
+ "maxLength": 2000
116
+ },
117
+ "expectedEffect": {
118
+ "type": "string",
119
+ "minLength": 1,
120
+ "maxLength": 2000
121
+ }
122
+ }
123
+ },
124
+ "rotationAlignment": {
125
+ "type": "object",
126
+ "additionalProperties": false,
127
+ "required": [
128
+ "method",
129
+ "methodVersion",
130
+ "targetAreaIds",
131
+ "axis"
132
+ ],
133
+ "properties": {
134
+ "method": {
135
+ "const": "rotation-alignment"
136
+ },
137
+ "methodVersion": {
138
+ "const": 1
139
+ },
140
+ "targetAreaIds": {
141
+ "type": "array",
142
+ "minItems": 1,
143
+ "uniqueItems": true,
144
+ "items": {
145
+ "type": "string",
146
+ "pattern": "^area-[0-9]+$"
147
+ }
148
+ },
149
+ "axis": {
150
+ "enum": [
151
+ "horizontal",
152
+ "vertical",
153
+ "rising-diagonal",
154
+ "falling-diagonal"
155
+ ]
156
+ },
157
+ "strength": {
158
+ "const": "subtle",
159
+ "description": "Legacy compatibility field; does not restrict adjustment magnitude."
160
+ },
161
+ "reason": {
162
+ "type": "string",
163
+ "minLength": 1,
164
+ "maxLength": 2000
165
+ },
166
+ "expectedEffect": {
167
+ "type": "string",
168
+ "minLength": 1,
169
+ "maxLength": 2000
170
+ }
171
+ }
172
+ },
173
+ "blockAlignment": {
174
+ "type": "object",
175
+ "additionalProperties": false,
176
+ "required": [
177
+ "method",
178
+ "methodVersion",
179
+ "targetAreaIds",
180
+ "anchorAreaId",
181
+ "alignment"
182
+ ],
183
+ "properties": {
184
+ "method": {
185
+ "const": "block-alignment"
186
+ },
187
+ "methodVersion": {
188
+ "const": 1
189
+ },
190
+ "targetAreaIds": {
191
+ "type": "array",
192
+ "minItems": 2,
193
+ "uniqueItems": true,
194
+ "items": {
195
+ "type": "string",
196
+ "pattern": "^area-[0-9]+$"
197
+ }
198
+ },
199
+ "anchorAreaId": {
200
+ "type": "string",
201
+ "pattern": "^area-[0-9]+$"
202
+ },
203
+ "alignment": {
204
+ "enum": [
205
+ "left",
206
+ "horizontal-center",
207
+ "right",
208
+ "top",
209
+ "vertical-center",
210
+ "bottom"
211
+ ]
212
+ },
213
+ "strength": {
214
+ "const": "subtle",
215
+ "description": "Legacy compatibility field; does not restrict adjustment magnitude."
216
+ },
217
+ "reason": {
218
+ "type": "string",
219
+ "minLength": 1,
220
+ "maxLength": 2000
221
+ },
222
+ "expectedEffect": {
223
+ "type": "string",
224
+ "minLength": 1,
225
+ "maxLength": 2000
226
+ }
227
+ }
228
+ },
229
+ "spacingRhythm": {
230
+ "type": "object",
231
+ "additionalProperties": false,
232
+ "required": [
233
+ "method",
234
+ "methodVersion",
235
+ "targetAreaIds",
236
+ "axis",
237
+ "distribution"
238
+ ],
239
+ "properties": {
240
+ "method": {
241
+ "const": "spacing-rhythm"
242
+ },
243
+ "methodVersion": {
244
+ "const": 1
245
+ },
246
+ "targetAreaIds": {
247
+ "type": "array",
248
+ "minItems": 3,
249
+ "uniqueItems": true,
250
+ "items": {
251
+ "type": "string",
252
+ "pattern": "^area-[0-9]+$"
253
+ }
254
+ },
255
+ "axis": {
256
+ "enum": [
257
+ "horizontal",
258
+ "vertical"
259
+ ]
260
+ },
261
+ "distribution": {
262
+ "const": "equal"
263
+ },
264
+ "strength": {
265
+ "const": "subtle",
266
+ "description": "Legacy compatibility field; does not restrict adjustment magnitude."
267
+ },
268
+ "reason": {
269
+ "type": "string",
270
+ "minLength": 1,
271
+ "maxLength": 2000
272
+ },
273
+ "expectedEffect": {
274
+ "type": "string",
275
+ "minLength": 1,
276
+ "maxLength": 2000
277
+ }
278
+ }
279
+ },
280
+ "framePlacement": {
281
+ "type": "object",
282
+ "additionalProperties": false,
283
+ "required": [
284
+ "method",
285
+ "methodVersion",
286
+ "targetId",
287
+ "axis",
288
+ "alignment",
289
+ "division"
290
+ ],
291
+ "properties": {
292
+ "method": {
293
+ "const": "frame-placement"
294
+ },
295
+ "methodVersion": {
296
+ "const": 1
297
+ },
298
+ "targetId": {
299
+ "type": "string",
300
+ "pattern": "^(area|focus)-[0-9]+$"
301
+ },
302
+ "axis": {
303
+ "enum": [
304
+ "x",
305
+ "y"
306
+ ]
307
+ },
308
+ "alignment": {
309
+ "enum": [
310
+ "start",
311
+ "center",
312
+ "end"
313
+ ]
314
+ },
315
+ "division": {
316
+ "enum": [
317
+ "center",
318
+ "golden-start",
319
+ "golden-end",
320
+ "third-start",
321
+ "third-end"
322
+ ]
323
+ },
324
+ "reason": {
325
+ "type": "string",
326
+ "minLength": 1,
327
+ "maxLength": 2000
328
+ },
329
+ "expectedEffect": {
330
+ "type": "string",
331
+ "minLength": 1,
332
+ "maxLength": 2000
333
+ }
334
+ }
335
+ },
336
+ "sizeRatio": {
337
+ "type": "object",
338
+ "additionalProperties": false,
339
+ "required": [
340
+ "method",
341
+ "methodVersion",
342
+ "targetAreaId",
343
+ "dimension",
344
+ "referenceId",
345
+ "referenceDimension",
346
+ "ratio"
347
+ ],
348
+ "properties": {
349
+ "method": {
350
+ "const": "size-ratio"
351
+ },
352
+ "methodVersion": {
353
+ "const": 1
354
+ },
355
+ "targetAreaId": {
356
+ "type": "string",
357
+ "pattern": "^area-[0-9]+$"
358
+ },
359
+ "dimension": {
360
+ "enum": [
361
+ "width",
362
+ "height",
363
+ "area"
364
+ ]
365
+ },
366
+ "referenceId": {
367
+ "type": "string",
368
+ "pattern": "^(frame|area-[0-9]+)$"
369
+ },
370
+ "referenceDimension": {
371
+ "enum": [
372
+ "width",
373
+ "height",
374
+ "area"
375
+ ]
376
+ },
377
+ "ratio": {
378
+ "type": "number",
379
+ "exclusiveMinimum": 0
380
+ },
381
+ "reason": {
382
+ "type": "string",
383
+ "minLength": 1,
384
+ "maxLength": 2000
385
+ },
386
+ "expectedEffect": {
387
+ "type": "string",
388
+ "minLength": 1,
389
+ "maxLength": 2000
390
+ }
391
+ }
392
+ },
393
+ "mirrorSymmetry": {
394
+ "type": "object",
395
+ "additionalProperties": false,
396
+ "required": [
397
+ "method",
398
+ "methodVersion",
399
+ "anchorAreaId",
400
+ "targetAreaId",
401
+ "axis",
402
+ "division",
403
+ "match"
404
+ ],
405
+ "properties": {
406
+ "method": {
407
+ "const": "mirror-symmetry"
408
+ },
409
+ "methodVersion": {
410
+ "const": 1
411
+ },
412
+ "anchorAreaId": {
413
+ "type": "string",
414
+ "pattern": "^area-[0-9]+$"
415
+ },
416
+ "targetAreaId": {
417
+ "type": "string",
418
+ "pattern": "^area-[0-9]+$"
419
+ },
420
+ "axis": {
421
+ "enum": [
422
+ "vertical",
423
+ "horizontal"
424
+ ]
425
+ },
426
+ "division": {
427
+ "enum": [
428
+ "center",
429
+ "golden-start",
430
+ "golden-end",
431
+ "third-start",
432
+ "third-end"
433
+ ]
434
+ },
435
+ "match": {
436
+ "enum": [
437
+ "position",
438
+ "geometry"
439
+ ]
440
+ },
441
+ "reason": {
442
+ "type": "string",
443
+ "minLength": 1,
444
+ "maxLength": 2000
445
+ },
446
+ "expectedEffect": {
447
+ "type": "string",
448
+ "minLength": 1,
449
+ "maxLength": 2000
450
+ }
451
+ }
452
+ },
453
+ "focusFlow": {
454
+ "type": "object",
455
+ "additionalProperties": false,
456
+ "required": [
457
+ "method",
458
+ "methodVersion",
459
+ "sourceId",
460
+ "targetFocusId",
461
+ "localAxis"
462
+ ],
463
+ "properties": {
464
+ "method": {
465
+ "const": "focus-flow"
466
+ },
467
+ "methodVersion": {
468
+ "const": 1
469
+ },
470
+ "sourceId": {
471
+ "type": "string",
472
+ "pattern": "^(direction-1|area-[0-9]+)$"
473
+ },
474
+ "targetFocusId": {
475
+ "type": "string",
476
+ "pattern": "^focus-[0-9]+$"
477
+ },
478
+ "localAxis": {
479
+ "enum": [
480
+ "x",
481
+ "y"
482
+ ]
483
+ },
484
+ "reason": {
485
+ "type": "string",
486
+ "minLength": 1,
487
+ "maxLength": 2000
488
+ },
489
+ "expectedEffect": {
490
+ "type": "string",
491
+ "minLength": 1,
492
+ "maxLength": 2000
493
+ }
494
+ }
495
+ },
496
+ "legacyPlan": {
497
+ "type": "object",
498
+ "additionalProperties": false,
499
+ "required": [
500
+ "version",
501
+ "kind",
502
+ "sourceFingerprint",
503
+ "rationale",
504
+ "operations"
505
+ ],
506
+ "properties": {
507
+ "version": {
508
+ "const": 1
509
+ },
510
+ "kind": {
511
+ "const": "composition-refinement-plan"
512
+ },
513
+ "sourceFingerprint": {
514
+ "type": "string",
515
+ "pattern": "^draft-[0-9a-f]{8}$"
516
+ },
517
+ "rationale": {
518
+ "type": "string",
519
+ "minLength": 1,
520
+ "maxLength": 2000
521
+ },
522
+ "operations": {
523
+ "type": "array",
524
+ "minItems": 1,
525
+ "maxItems": 16,
526
+ "items": {
527
+ "oneOf": [
528
+ {
529
+ "$ref": "#/$defs/focusAnchor"
530
+ },
531
+ {
532
+ "$ref": "#/$defs/axisRelation"
533
+ },
534
+ {
535
+ "$ref": "#/$defs/rotationAlignment"
536
+ },
537
+ {
538
+ "$ref": "#/$defs/blockAlignment"
539
+ },
540
+ {
541
+ "$ref": "#/$defs/spacingRhythm"
542
+ }
543
+ ]
544
+ }
545
+ }
546
+ }
547
+ },
548
+ "directedPlan": {
549
+ "type": "object",
550
+ "additionalProperties": false,
551
+ "required": [
552
+ "version",
553
+ "kind",
554
+ "sourceFingerprint",
555
+ "rationale",
556
+ "operations",
557
+ "decision",
558
+ "objective",
559
+ "assessment",
560
+ "preserve",
561
+ "tradeoffs",
562
+ "fixedIds",
563
+ "focusLinks"
564
+ ],
565
+ "properties": {
566
+ "version": {
567
+ "const": 2
568
+ },
569
+ "kind": {
570
+ "const": "composition-refinement-plan"
571
+ },
572
+ "sourceFingerprint": {
573
+ "type": "string",
574
+ "pattern": "^draft-[0-9a-f]{8}$"
575
+ },
576
+ "rationale": {
577
+ "type": "string",
578
+ "minLength": 1,
579
+ "maxLength": 2000
580
+ },
581
+ "operations": {
582
+ "type": "array",
583
+ "minItems": 0,
584
+ "maxItems": 16,
585
+ "items": {
586
+ "allOf": [
587
+ {
588
+ "oneOf": [
589
+ {
590
+ "$ref": "#/$defs/focusAnchor"
591
+ },
592
+ {
593
+ "$ref": "#/$defs/axisRelation"
594
+ },
595
+ {
596
+ "$ref": "#/$defs/rotationAlignment"
597
+ },
598
+ {
599
+ "$ref": "#/$defs/blockAlignment"
600
+ },
601
+ {
602
+ "$ref": "#/$defs/spacingRhythm"
603
+ },
604
+ {
605
+ "$ref": "#/$defs/framePlacement"
606
+ },
607
+ {
608
+ "$ref": "#/$defs/sizeRatio"
609
+ },
610
+ {
611
+ "$ref": "#/$defs/mirrorSymmetry"
612
+ },
613
+ {
614
+ "$ref": "#/$defs/focusFlow"
615
+ }
616
+ ]
617
+ },
618
+ {
619
+ "type": "object",
620
+ "required": [
621
+ "reason",
622
+ "expectedEffect"
623
+ ]
624
+ }
625
+ ]
626
+ }
627
+ },
628
+ "decision": {
629
+ "enum": [
630
+ "refine",
631
+ "retain"
632
+ ]
633
+ },
634
+ "objective": {
635
+ "type": "string",
636
+ "minLength": 1,
637
+ "maxLength": 2000
638
+ },
639
+ "assessment": {
640
+ "type": "object",
641
+ "additionalProperties": false,
642
+ "required": [
643
+ "intent",
644
+ "observations",
645
+ "uncertainties"
646
+ ],
647
+ "properties": {
648
+ "intent": {
649
+ "type": "string",
650
+ "minLength": 1,
651
+ "maxLength": 2000
652
+ },
653
+ "observations": {
654
+ "type": "array",
655
+ "minItems": 0,
656
+ "maxItems": 32,
657
+ "items": {
658
+ "type": "string",
659
+ "minLength": 1,
660
+ "maxLength": 2000
661
+ }
662
+ },
663
+ "uncertainties": {
664
+ "type": "array",
665
+ "minItems": 0,
666
+ "maxItems": 32,
667
+ "items": {
668
+ "type": "string",
669
+ "minLength": 1,
670
+ "maxLength": 2000
671
+ }
672
+ }
673
+ }
674
+ },
675
+ "preserve": {
676
+ "type": "array",
677
+ "minItems": 0,
678
+ "maxItems": 32,
679
+ "items": {
680
+ "type": "string",
681
+ "minLength": 1,
682
+ "maxLength": 2000
683
+ }
684
+ },
685
+ "tradeoffs": {
686
+ "type": "array",
687
+ "minItems": 0,
688
+ "maxItems": 32,
689
+ "items": {
690
+ "type": "string",
691
+ "minLength": 1,
692
+ "maxLength": 2000
693
+ }
694
+ },
695
+ "fixedIds": {
696
+ "type": "array",
697
+ "minItems": 0,
698
+ "maxItems": 32,
699
+ "items": {
700
+ "type": "string",
701
+ "pattern": "^(direction-1|(area|focus)-[0-9]+)$"
702
+ },
703
+ "uniqueItems": true
704
+ },
705
+ "focusLinks": {
706
+ "type": "array",
707
+ "minItems": 0,
708
+ "maxItems": 32,
709
+ "items": {
710
+ "type": "object",
711
+ "additionalProperties": false,
712
+ "required": [
713
+ "focusId",
714
+ "areaId"
715
+ ],
716
+ "properties": {
717
+ "focusId": {
718
+ "type": "string",
719
+ "pattern": "^focus-[0-9]+$"
720
+ },
721
+ "areaId": {
722
+ "type": "string",
723
+ "pattern": "^area-[0-9]+$"
724
+ }
725
+ }
726
+ }
727
+ }
728
+ },
729
+ "allOf": [
730
+ {
731
+ "if": {
732
+ "properties": {
733
+ "decision": {
734
+ "const": "retain"
735
+ }
736
+ }
737
+ },
738
+ "then": {
739
+ "properties": {
740
+ "operations": {
741
+ "maxItems": 0,
742
+ "type": "array"
743
+ }
744
+ }
745
+ },
746
+ "else": {
747
+ "properties": {
748
+ "operations": {
749
+ "minItems": 1,
750
+ "type": "array"
751
+ }
752
+ }
753
+ }
754
+ }
755
+ ]
756
+ }
757
+ }
758
+ }