human2ai 0.1.2 → 0.1.4

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 (181) hide show
  1. package/README.en.md +36 -4
  2. package/README.md +44 -4
  3. package/dist/cli/main.js +47 -13
  4. package/dist/cli/main.js.map +1 -1
  5. package/dist/database/style-library-repository.d.ts +14 -1
  6. package/dist/database/style-library-repository.js +59 -0
  7. package/dist/database/style-library-repository.js.map +1 -1
  8. package/dist/domain/composition/analysis.d.ts +3 -0
  9. package/dist/domain/composition/analysis.js +5 -0
  10. package/dist/domain/composition/analysis.js.map +1 -1
  11. package/dist/domain/composition/draft.d.ts +2 -0
  12. package/dist/domain/composition/draft.js +126 -5
  13. package/dist/domain/composition/draft.js.map +1 -1
  14. package/dist/domain/composition/frame.d.ts +1 -0
  15. package/dist/domain/composition/frame.js +6 -0
  16. package/dist/domain/composition/frame.js.map +1 -1
  17. package/dist/domain/composition/geometry.d.ts +5 -1
  18. package/dist/domain/composition/geometry.js +40 -2
  19. package/dist/domain/composition/geometry.js.map +1 -1
  20. package/dist/domain/composition/index.d.ts +6 -3
  21. package/dist/domain/composition/index.js +6 -3
  22. package/dist/domain/composition/index.js.map +1 -1
  23. package/dist/domain/composition/planning-intersections.d.ts +20 -0
  24. package/dist/domain/composition/planning-intersections.js +119 -0
  25. package/dist/domain/composition/planning-intersections.js.map +1 -0
  26. package/dist/domain/composition/planning.d.ts +25 -0
  27. package/dist/domain/composition/planning.js +152 -0
  28. package/dist/domain/composition/planning.js.map +1 -0
  29. package/dist/domain/composition/refinement/engine.js +1 -0
  30. package/dist/domain/composition/refinement/engine.js.map +1 -1
  31. package/dist/domain/composition/render.js +14 -1
  32. package/dist/domain/composition/render.js.map +1 -1
  33. package/dist/domain/composition/states.js +6 -3
  34. package/dist/domain/composition/states.js.map +1 -1
  35. package/dist/domain/composition/types.d.ts +49 -1
  36. package/dist/domain/session/capabilities.js +1 -0
  37. package/dist/domain/session/capabilities.js.map +1 -1
  38. package/dist/domain/spatial/camera-box-sheet.d.ts +15 -0
  39. package/dist/domain/spatial/camera-box-sheet.js +24 -0
  40. package/dist/domain/spatial/camera-box-sheet.js.map +1 -0
  41. package/dist/domain/spatial/camera-box.d.ts +1 -1
  42. package/dist/domain/spatial/camera-box.js +6 -2
  43. package/dist/domain/spatial/camera-box.js.map +1 -1
  44. package/dist/domain/spatial/camera-render-key.d.ts +7 -0
  45. package/dist/domain/spatial/camera-render-key.js +63 -0
  46. package/dist/domain/spatial/camera-render-key.js.map +1 -0
  47. package/dist/domain/spatial/index.d.ts +1 -0
  48. package/dist/domain/spatial/index.js +1 -0
  49. package/dist/domain/spatial/index.js.map +1 -1
  50. package/dist/domain/spatial/lighting.js +3 -2
  51. package/dist/domain/spatial/lighting.js.map +1 -1
  52. package/dist/domain/spatial/model.d.ts +2 -0
  53. package/dist/domain/spatial/model.js +82 -27
  54. package/dist/domain/spatial/model.js.map +1 -1
  55. package/dist/domain/spatial/preview.d.ts +4 -0
  56. package/dist/domain/spatial/preview.js +23 -0
  57. package/dist/domain/spatial/preview.js.map +1 -0
  58. package/dist/domain/spatial/reference-lines.d.ts +12 -3
  59. package/dist/domain/spatial/reference-lines.js +37 -16
  60. package/dist/domain/spatial/reference-lines.js.map +1 -1
  61. package/dist/domain/spatial/render-inputs.d.ts +3 -0
  62. package/dist/domain/spatial/render-inputs.js +14 -0
  63. package/dist/domain/spatial/render-inputs.js.map +1 -0
  64. package/dist/domain/spatial/scene-cache.d.ts +13 -1
  65. package/dist/domain/spatial/scene-cache.js +90 -11
  66. package/dist/domain/spatial/scene-cache.js.map +1 -1
  67. package/dist/domain/spatial/scene-update.d.ts +6 -0
  68. package/dist/domain/spatial/scene-update.js +52 -0
  69. package/dist/domain/spatial/scene-update.js.map +1 -0
  70. package/dist/domain/spatial/scene.d.ts +3 -1
  71. package/dist/domain/spatial/scene.js +78 -20
  72. package/dist/domain/spatial/scene.js.map +1 -1
  73. package/dist/domain/spatial/types.d.ts +8 -0
  74. package/dist/domain/spatial/types.js.map +1 -1
  75. package/dist/domain/style/model-input.d.ts +3 -0
  76. package/dist/domain/style/model-input.js +36 -0
  77. package/dist/domain/style/model-input.js.map +1 -0
  78. package/dist/domain/style/types.d.ts +8 -1
  79. package/dist/domain/style/types.js +1 -1
  80. package/dist/domain/style/types.js.map +1 -1
  81. package/dist/domain/ui-sketch/clipboard.d.ts +12 -0
  82. package/dist/domain/ui-sketch/clipboard.js +55 -0
  83. package/dist/domain/ui-sketch/clipboard.js.map +1 -0
  84. package/dist/domain/ui-sketch/index.d.ts +1 -0
  85. package/dist/domain/ui-sketch/index.js +1 -0
  86. package/dist/domain/ui-sketch/index.js.map +1 -1
  87. package/dist/server/routes/spatial-sessions.js +39 -15
  88. package/dist/server/routes/spatial-sessions.js.map +1 -1
  89. package/dist/server/routes/style-library.js +39 -0
  90. package/dist/server/routes/style-library.js.map +1 -1
  91. package/dist/server/spatial-render-service.d.ts +21 -0
  92. package/dist/server/spatial-render-service.js +67 -0
  93. package/dist/server/spatial-render-service.js.map +1 -0
  94. package/dist/server/spatial-render-worker.d.ts +1 -0
  95. package/dist/server/spatial-render-worker.js +15 -0
  96. package/dist/server/spatial-render-worker.js.map +1 -0
  97. package/dist/server/spatial-render.d.ts +15 -3
  98. package/dist/server/spatial-render.js +47 -14
  99. package/dist/server/spatial-render.js.map +1 -1
  100. package/locales/en/common.json +94 -14
  101. package/migrations/0009_spatial_styles.sql +31 -0
  102. package/migrations/0010_style_preview_models.sql +8 -0
  103. package/package.json +1 -1
  104. package/schemas/composition-draft.schema.json +474 -1
  105. package/schemas/spatial-draft.schema.json +12 -0
  106. package/schemas/spatial-operations.schema.json +12 -0
  107. package/skills/human2ai/SKILL.md +23 -9
  108. package/skills/human2ai/references/composition.md +192 -1
  109. package/skills/human2ai/references/spatial-modeling.md +119 -0
  110. package/skills/human2ai/references/spatial.md +7 -2
  111. package/web/out/404/index.html +1 -1
  112. package/web/out/404.html +1 -1
  113. package/web/out/__next.__PAGE__.txt +7 -5
  114. package/web/out/__next._full.txt +7 -5
  115. package/web/out/__next._tree.txt +4 -2
  116. package/web/out/_next/static/chunks/101.6ef34adad3e9815b.js +1 -0
  117. package/web/out/_next/static/chunks/130-7e9e715a084569bb.js +1 -0
  118. package/web/out/_next/static/chunks/166-96a8c6ae1e9aed59.js +1 -0
  119. package/web/out/_next/static/chunks/218.7b89674409b344b8.js +1 -0
  120. package/web/out/_next/static/chunks/484.92b016222d6749f2.js +1 -0
  121. package/web/out/_next/static/chunks/{381-4a803b79da320e6e.js → 635-611c009924b842be.js} +54 -54
  122. package/web/out/_next/static/chunks/653-6dfb97fec9a2d91b.js +1 -0
  123. package/web/out/_next/static/chunks/678-32d3aa1859450d63.js +1 -0
  124. package/web/out/_next/static/chunks/83607670-fd2f339702a222e4.js +1 -0
  125. package/web/out/_next/static/chunks/app/_not-found/{page-59ce938ad0594022.js → page-b92817fdc4609975.js} +1 -1
  126. package/web/out/_next/static/chunks/app/composition/page-6c12ee8472715448.js +1 -0
  127. package/web/out/_next/static/chunks/app/{layout-6351ae607c4ee18d.js → layout-1dd9196cde94389c.js} +1 -1
  128. package/web/out/_next/static/chunks/app/page-741ecaf9ee8c3c07.js +1 -0
  129. package/web/out/_next/static/chunks/app/spatial/page-5ba0940650df6c7f.js +1 -0
  130. package/web/out/_next/static/chunks/app/styles/page-1ccfc2c5fbc1e646.js +1 -0
  131. package/web/out/_next/static/chunks/app/ui-sketch/page-ef4f2e531583e684.js +1 -0
  132. package/web/out/_next/static/chunks/{c3f2cda1-9e279dab137b7272.js → c3f2cda1-ef85a0897724e46b.js} +1 -1
  133. package/web/out/_next/static/chunks/main-app-cf37a257d91ce62e.js +1 -0
  134. package/web/out/_next/static/chunks/next/dist/client/components/builtin/global-error-33b4f58f02e82215.js +1 -0
  135. package/web/out/_next/static/chunks/webpack-d16ce1f994e98178.js +1 -0
  136. package/web/out/_next/static/css/06743b5635914999.css +5 -0
  137. package/web/out/_next/static/css/0b43ff4a0439c97e.css +1 -0
  138. package/web/out/_next/static/css/1f8501a43042a5a2.css +1 -0
  139. package/web/out/_next/static/css/39e8cace36461a15.css +1 -0
  140. package/web/out/_not-found/__next._full.txt +3 -3
  141. package/web/out/_not-found/__next._not-found.__PAGE__.txt +3 -3
  142. package/web/out/_not-found/__next._tree.txt +1 -1
  143. package/web/out/_not-found/index.html +1 -1
  144. package/web/out/_not-found/index.txt +3 -3
  145. package/web/out/composition/__next._full.txt +6 -5
  146. package/web/out/composition/__next._tree.txt +3 -2
  147. package/web/out/composition/__next.composition.__PAGE__.txt +6 -5
  148. package/web/out/composition/index.html +1 -1
  149. package/web/out/composition/index.txt +6 -5
  150. package/web/out/index.html +1 -1
  151. package/web/out/index.txt +7 -5
  152. package/web/out/spatial/__next._full.txt +6 -5
  153. package/web/out/spatial/__next._tree.txt +3 -2
  154. package/web/out/spatial/__next.spatial.__PAGE__.txt +6 -5
  155. package/web/out/spatial/index.html +1 -1
  156. package/web/out/spatial/index.txt +6 -5
  157. package/web/out/styles/__next._full.txt +6 -5
  158. package/web/out/styles/__next._tree.txt +3 -2
  159. package/web/out/styles/__next.styles.__PAGE__.txt +6 -5
  160. package/web/out/styles/index.html +1 -1
  161. package/web/out/styles/index.txt +6 -5
  162. package/web/out/ui-sketch/__next._full.txt +6 -5
  163. package/web/out/ui-sketch/__next._tree.txt +3 -2
  164. package/web/out/ui-sketch/__next.ui-sketch.__PAGE__.txt +6 -5
  165. package/web/out/ui-sketch/index.html +1 -1
  166. package/web/out/ui-sketch/index.txt +6 -5
  167. package/web/out/_next/static/chunks/130-f2627352fc1e1f49.js +0 -1
  168. package/web/out/_next/static/chunks/678-b0ea409290a64ff4.js +0 -1
  169. package/web/out/_next/static/chunks/728-ce64a38c9e8339e8.js +0 -1
  170. package/web/out/_next/static/chunks/83607670-bc1279370476e59f.js +0 -1
  171. package/web/out/_next/static/chunks/app/composition/page-b0a2f7370b949cf9.js +0 -1
  172. package/web/out/_next/static/chunks/app/page-a6fde4165eb4be1e.js +0 -1
  173. package/web/out/_next/static/chunks/app/spatial/page-2c3df91fd1d7d444.js +0 -1
  174. package/web/out/_next/static/chunks/app/styles/page-54b11f1945d64255.js +0 -1
  175. package/web/out/_next/static/chunks/app/ui-sketch/page-1abcd70a81ac7b30.js +0 -1
  176. package/web/out/_next/static/chunks/main-app-8946bf6a8c0dc843.js +0 -1
  177. package/web/out/_next/static/chunks/next/dist/client/components/builtin/global-error-5ac7248e26f2e308.js +0 -1
  178. package/web/out/_next/static/chunks/webpack-97ae63c0e0b2a512.js +0 -1
  179. package/web/out/_next/static/css/7bfa3a5c92836f5c.css +0 -5
  180. /package/web/out/_next/static/{1To86KpfZhDmNzmTIgEuy → n4UcxqMmr_2CBmSxBp52z}/_buildManifest.js +0 -0
  181. /package/web/out/_next/static/{1To86KpfZhDmNzmTIgEuy → n4UcxqMmr_2CBmSxBp52z}/_ssgManifest.js +0 -0
@@ -10,6 +10,7 @@
10
10
  { "if": { "required": ["activeStateId"] }, "then": { "required": ["states"] } }
11
11
  ],
12
12
  "properties": {
13
+ "plans": { "type": "array", "items": { "$ref": "#/$defs/compositionPlan" } },
13
14
  "activeStateId": { "type": "string", "minLength": 1 },
14
15
  "states": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/state" } },
15
16
  "layerOrder": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
@@ -78,6 +79,7 @@
78
79
  "aspect": { "enum": ["square", "free", "landscape", "portrait"] },
79
80
  "visualWeight": { "enum": ["auto", "high", "medium", "low", "decorative"] },
80
81
  "displayText": { "type": "string" },
82
+ "corners": { "$ref": "#/$defs/textCorners" },
81
83
  "isLightSource": { "type": "boolean" },
82
84
  "rotation": { "type": "number" },
83
85
  "width": { "type": "number", "exclusiveMinimum": 0 },
@@ -99,7 +101,11 @@
99
101
  "required": ["semanticType"]
100
102
  },
101
103
  "then": { "required": ["displayText"], "properties": { "isLightSource": { "const": false } } },
102
- "else": { "not": { "required": ["displayText"] } }
104
+ "else": { "not": { "anyOf": [{ "required": ["displayText"] }, { "required": ["corners"] }] } }
105
+ },
106
+ {
107
+ "if": { "required": ["corners"] },
108
+ "then": { "properties": { "primitive": { "const": "quadrilateral" }, "aspect": { "const": "free" } } }
103
109
  }
104
110
  ]
105
111
  }
@@ -147,6 +153,461 @@
147
153
  }
148
154
  },
149
155
  "$defs": {
156
+ "compositionPlan": {
157
+ "type": "object",
158
+ "additionalProperties": false,
159
+ "required": [
160
+ "id",
161
+ "visible",
162
+ "type"
163
+ ],
164
+ "properties": {
165
+ "id": {
166
+ "type": "string",
167
+ "pattern": "^plan-[a-zA-Z0-9-]+$"
168
+ },
169
+ "visible": {
170
+ "type": "boolean"
171
+ },
172
+ "axes": {
173
+ "enum": [
174
+ "both",
175
+ "horizontal",
176
+ "vertical"
177
+ ]
178
+ },
179
+ "x": {
180
+ "type": "number"
181
+ },
182
+ "y": {
183
+ "type": "number"
184
+ },
185
+ "rotation": {
186
+ "type": "number"
187
+ },
188
+ "scale": {
189
+ "type": "number",
190
+ "exclusiveMinimum": 0
191
+ },
192
+ "mirrored": {
193
+ "type": "boolean"
194
+ },
195
+ "type": {
196
+ "enum": [
197
+ "thirds",
198
+ "golden-section",
199
+ "symmetry",
200
+ "golden-spiral",
201
+ "triangle",
202
+ "radial"
203
+ ]
204
+ },
205
+ "width": {
206
+ "type": "number",
207
+ "exclusiveMinimum": 0
208
+ },
209
+ "height": {
210
+ "type": "number",
211
+ "exclusiveMinimum": 0
212
+ },
213
+ "rayCount": {
214
+ "type": "integer",
215
+ "minimum": 2,
216
+ "maximum": 36
217
+ },
218
+ "spread": {
219
+ "type": "number",
220
+ "minimum": 1,
221
+ "maximum": 360
222
+ },
223
+ "mode": {
224
+ "enum": [
225
+ "uniform",
226
+ "free"
227
+ ]
228
+ },
229
+ "angles": {
230
+ "type": "array",
231
+ "minItems": 2,
232
+ "maxItems": 36,
233
+ "items": {
234
+ "type": "number"
235
+ }
236
+ }
237
+ },
238
+ "oneOf": [
239
+ {
240
+ "type": "object",
241
+ "properties": {
242
+ "type": {
243
+ "enum": [
244
+ "thirds",
245
+ "golden-section"
246
+ ]
247
+ }
248
+ },
249
+ "required": [
250
+ "axes"
251
+ ],
252
+ "not": {
253
+ "anyOf": [
254
+ {
255
+ "required": [
256
+ "x"
257
+ ]
258
+ },
259
+ {
260
+ "required": [
261
+ "y"
262
+ ]
263
+ },
264
+ {
265
+ "required": [
266
+ "rotation"
267
+ ]
268
+ },
269
+ {
270
+ "required": [
271
+ "scale"
272
+ ]
273
+ },
274
+ {
275
+ "required": [
276
+ "mirrored"
277
+ ]
278
+ },
279
+ {
280
+ "required": [
281
+ "width"
282
+ ]
283
+ },
284
+ {
285
+ "required": [
286
+ "height"
287
+ ]
288
+ },
289
+ {
290
+ "required": [
291
+ "rayCount"
292
+ ]
293
+ },
294
+ {
295
+ "required": [
296
+ "spread"
297
+ ]
298
+ },
299
+ {
300
+ "required": [
301
+ "mode"
302
+ ]
303
+ },
304
+ {
305
+ "required": [
306
+ "angles"
307
+ ]
308
+ }
309
+ ]
310
+ }
311
+ },
312
+ {
313
+ "type": "object",
314
+ "properties": {
315
+ "type": {
316
+ "enum": [
317
+ "symmetry"
318
+ ]
319
+ }
320
+ },
321
+ "required": [
322
+ "x",
323
+ "y",
324
+ "rotation"
325
+ ],
326
+ "not": {
327
+ "anyOf": [
328
+ {
329
+ "required": [
330
+ "axes"
331
+ ]
332
+ },
333
+ {
334
+ "required": [
335
+ "scale"
336
+ ]
337
+ },
338
+ {
339
+ "required": [
340
+ "mirrored"
341
+ ]
342
+ },
343
+ {
344
+ "required": [
345
+ "width"
346
+ ]
347
+ },
348
+ {
349
+ "required": [
350
+ "height"
351
+ ]
352
+ },
353
+ {
354
+ "required": [
355
+ "rayCount"
356
+ ]
357
+ },
358
+ {
359
+ "required": [
360
+ "spread"
361
+ ]
362
+ },
363
+ {
364
+ "required": [
365
+ "mode"
366
+ ]
367
+ },
368
+ {
369
+ "required": [
370
+ "angles"
371
+ ]
372
+ }
373
+ ]
374
+ }
375
+ },
376
+ {
377
+ "type": "object",
378
+ "properties": {
379
+ "type": {
380
+ "enum": [
381
+ "golden-spiral"
382
+ ]
383
+ }
384
+ },
385
+ "required": [
386
+ "x",
387
+ "y",
388
+ "rotation",
389
+ "scale",
390
+ "mirrored"
391
+ ],
392
+ "not": {
393
+ "anyOf": [
394
+ {
395
+ "required": [
396
+ "axes"
397
+ ]
398
+ },
399
+ {
400
+ "required": [
401
+ "width"
402
+ ]
403
+ },
404
+ {
405
+ "required": [
406
+ "height"
407
+ ]
408
+ },
409
+ {
410
+ "required": [
411
+ "rayCount"
412
+ ]
413
+ },
414
+ {
415
+ "required": [
416
+ "spread"
417
+ ]
418
+ },
419
+ {
420
+ "required": [
421
+ "mode"
422
+ ]
423
+ },
424
+ {
425
+ "required": [
426
+ "angles"
427
+ ]
428
+ }
429
+ ]
430
+ }
431
+ },
432
+ {
433
+ "type": "object",
434
+ "properties": {
435
+ "type": {
436
+ "enum": [
437
+ "triangle"
438
+ ]
439
+ }
440
+ },
441
+ "required": [
442
+ "x",
443
+ "y",
444
+ "rotation",
445
+ "width",
446
+ "height"
447
+ ],
448
+ "not": {
449
+ "anyOf": [
450
+ {
451
+ "required": [
452
+ "axes"
453
+ ]
454
+ },
455
+ {
456
+ "required": [
457
+ "scale"
458
+ ]
459
+ },
460
+ {
461
+ "required": [
462
+ "mirrored"
463
+ ]
464
+ },
465
+ {
466
+ "required": [
467
+ "rayCount"
468
+ ]
469
+ },
470
+ {
471
+ "required": [
472
+ "spread"
473
+ ]
474
+ },
475
+ {
476
+ "required": [
477
+ "mode"
478
+ ]
479
+ },
480
+ {
481
+ "required": [
482
+ "angles"
483
+ ]
484
+ }
485
+ ]
486
+ }
487
+ },
488
+ {
489
+ "type": "object",
490
+ "properties": {
491
+ "type": {
492
+ "enum": [
493
+ "radial"
494
+ ]
495
+ },
496
+ "mode": {
497
+ "enum": [
498
+ "uniform"
499
+ ]
500
+ }
501
+ },
502
+ "required": [
503
+ "x",
504
+ "y",
505
+ "rotation",
506
+ "rayCount",
507
+ "spread"
508
+ ],
509
+ "not": {
510
+ "anyOf": [
511
+ {
512
+ "required": [
513
+ "axes"
514
+ ]
515
+ },
516
+ {
517
+ "required": [
518
+ "scale"
519
+ ]
520
+ },
521
+ {
522
+ "required": [
523
+ "mirrored"
524
+ ]
525
+ },
526
+ {
527
+ "required": [
528
+ "width"
529
+ ]
530
+ },
531
+ {
532
+ "required": [
533
+ "height"
534
+ ]
535
+ },
536
+ {
537
+ "required": [
538
+ "angles"
539
+ ]
540
+ }
541
+ ]
542
+ }
543
+ },
544
+ {
545
+ "type": "object",
546
+ "properties": {
547
+ "type": {
548
+ "enum": [
549
+ "radial"
550
+ ]
551
+ },
552
+ "mode": {
553
+ "enum": [
554
+ "free"
555
+ ]
556
+ }
557
+ },
558
+ "required": [
559
+ "x",
560
+ "y",
561
+ "mode",
562
+ "angles"
563
+ ],
564
+ "not": {
565
+ "anyOf": [
566
+ {
567
+ "required": [
568
+ "axes"
569
+ ]
570
+ },
571
+ {
572
+ "required": [
573
+ "rotation"
574
+ ]
575
+ },
576
+ {
577
+ "required": [
578
+ "scale"
579
+ ]
580
+ },
581
+ {
582
+ "required": [
583
+ "mirrored"
584
+ ]
585
+ },
586
+ {
587
+ "required": [
588
+ "width"
589
+ ]
590
+ },
591
+ {
592
+ "required": [
593
+ "height"
594
+ ]
595
+ },
596
+ {
597
+ "required": [
598
+ "rayCount"
599
+ ]
600
+ },
601
+ {
602
+ "required": [
603
+ "spread"
604
+ ]
605
+ }
606
+ ]
607
+ }
608
+ }
609
+ ]
610
+ },
150
611
  "state": {
151
612
  "type": "object", "additionalProperties": false,
152
613
  "required": ["id", "number", "layout"],
@@ -158,6 +619,7 @@
158
619
  "type": "object", "additionalProperties": false,
159
620
  "required": ["frame", "layerOrder", "focusPoints", "directionLine", "areas", "images"],
160
621
  "properties": {
622
+ "plans": { "type": "array", "items": { "$ref": "#/$defs/compositionPlan" } },
161
623
  "frame": { "allOf": [{ "$ref": "#/properties/frame" }, { "type": "object", "required": ["bounds"] }] },
162
624
  "layerOrder": { "$ref": "#/properties/layerOrder" },
163
625
  "focusPoints": { "type": "array", "maxItems": 3, "items": { "$ref": "#/$defs/layoutPoint" } },
@@ -182,12 +644,23 @@
182
644
  "rotation": { "type": "number" }
183
645
  }
184
646
  },
647
+ "textCorners": {
648
+ "type": "array", "minItems": 4, "maxItems": 4,
649
+ "items": {
650
+ "type": "object", "additionalProperties": false, "required": ["x", "y"],
651
+ "properties": {
652
+ "x": { "type": "number", "minimum": 0, "maximum": 1 },
653
+ "y": { "type": "number", "minimum": 0, "maximum": 1 }
654
+ }
655
+ }
656
+ },
185
657
  "layoutArea": {
186
658
  "type": "object", "additionalProperties": false, "required": ["id", "x", "y", "area", "aspect"],
187
659
  "properties": {
188
660
  "id": { "type": "string", "pattern": "^area-[0-9]+$" },
189
661
  "x": { "type": "number" }, "y": { "type": "number" },
190
662
  "area": { "type": "number", "exclusiveMinimum": 0 },
663
+ "corners": { "$ref": "#/$defs/textCorners" },
191
664
  "aspect": { "enum": ["square", "free", "landscape", "portrait"] },
192
665
  "rotation": { "type": "number" },
193
666
  "width": { "type": "number", "exclusiveMinimum": 0 },
@@ -291,6 +291,9 @@
291
291
  "type": "number",
292
292
  "minimum": 0.7,
293
293
  "maximum": 1.4
294
+ },
295
+ "note": {
296
+ "type": "string"
294
297
  }
295
298
  }
296
299
  }
@@ -361,6 +364,9 @@
361
364
  "color": {
362
365
  "type": "string",
363
366
  "pattern": "^#[0-9a-fA-F]{6}$"
367
+ },
368
+ "note": {
369
+ "type": "string"
364
370
  }
365
371
  }
366
372
  }
@@ -451,6 +457,9 @@
451
457
  "type": "null"
452
458
  }
453
459
  ]
460
+ },
461
+ "note": {
462
+ "type": "string"
454
463
  }
455
464
  }
456
465
  }
@@ -509,6 +518,9 @@
509
518
  "type": "integer",
510
519
  "minimum": 128,
511
520
  "maximum": 1024
521
+ },
522
+ "note": {
523
+ "type": "string"
512
524
  }
513
525
  }
514
526
  }
@@ -371,6 +371,9 @@
371
371
  "type": "number",
372
372
  "minimum": 0.7,
373
373
  "maximum": 1.4
374
+ },
375
+ "note": {
376
+ "type": "string"
374
377
  }
375
378
  }
376
379
  }
@@ -621,6 +624,9 @@
621
624
  "color": {
622
625
  "type": "string",
623
626
  "pattern": "^#[0-9a-fA-F]{6}$"
627
+ },
628
+ "note": {
629
+ "type": "string"
624
630
  }
625
631
  }
626
632
  }
@@ -719,6 +725,9 @@
719
725
  "type": "null"
720
726
  }
721
727
  ]
728
+ },
729
+ "note": {
730
+ "type": "string"
722
731
  }
723
732
  }
724
733
  }
@@ -1047,6 +1056,9 @@
1047
1056
  "type": "integer",
1048
1057
  "minimum": 128,
1049
1058
  "maximum": 1024
1059
+ },
1060
+ "note": {
1061
+ "type": "string"
1050
1062
  }
1051
1063
  }
1052
1064
  }
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: human2ai
3
- description: Collaborate through local Human2AI design sessions, its style library, and its CLI. Use in a consumer project containing .human2ai/integration.json to inspect, edit, refine, review, or undo design work; to draw a reference picture as editable scene or editorial composition (“把这张图的构图画到画布上”); to project existing UI into a layout canvas (“把 UI 放到画布上让我修改”); or to reuse a visual style. The consumer project's Agent owns downstream implementation.
3
+ description: Collaborate through local Human2AI design sessions, its style library, and its CLI. Use in a consumer project containing .human2ai/integration.json to inspect, edit, refine, review, or undo design work; to draw a reference picture as editable scene or editorial composition (“把这张图的构图画到画布上”); to project existing UI into a layout canvas (“把 UI 放到画布上让我修改”); to model in the consumer project using a style and 3D spatial guidance; or to reuse a visual style. The consumer project's Agent owns downstream implementation.
4
+ metadata:
5
+ version: "0.1.4"
4
6
  ---
5
7
 
6
8
  # Human2AI
@@ -30,26 +32,28 @@ If the integration config is missing, stop and tell the user that this repositor
30
32
 
31
33
  ## Use the shared style library
32
34
 
33
- The style library is global to the local Human2AI service. Each composition or UI session can bind one of its styles; the browser and Agent share that binding. Search it when the user asks to reuse a style or when you need to select a style for canvas processing:
35
+ The style library is global to the local Human2AI service. Each composition, UI or spatial session can bind one of its styles; the browser and Agent share that binding. Search it when the user asks to reuse a style or when you need to select a style for canvas processing or consumer-project modeling:
34
36
 
35
37
  ```text
36
- <runner> style list [--category <visual|ui>] [--creator <user|agent>]
38
+ <runner> style list [--category <visual|ui|spatial>] [--creator <user|agent>]
37
39
  <runner> style get --style <style-id>
38
40
  ```
39
41
 
40
- `style get` returns reference image URLs and the full description. Treat that description as an actionable design specification: layout, proportions, hierarchy, spacing, typography, palette, materials, and decorative treatment as applicable. Inspect available reference images to resolve the visual characteristics. The user's explicit content, functions, and placement requirements take precedence over the style specification.
42
+ `style get` returns reference image URLs, an optional `previewModel.url`, and the full description. Treat that description as an actionable design specification: layout, proportions, hierarchy, spacing, typography, palette, materials, and decorative treatment as applicable. Inspect available reference images to resolve the visual characteristics. The user's explicit content, functions, and placement requirements take precedence over the style specification.
41
43
 
42
44
  When a style encountered during Agent work is worth keeping, save it directly as an Agent-created entry; there is no proposal or pending-review state:
43
45
 
44
46
  ```text
45
- <runner> style create --name <name> --category <visual|ui> --description <specification> --summary <sentence>
47
+ <runner> style create --name <name> --category <visual|ui|spatial> --description <specification> --summary <sentence>
46
48
  <runner> style add-reference --style <style-id> --input <image> --expected-revision <n>
47
49
  ```
48
50
 
51
+ For a program-generated 3D model example, follow the model-preview instructions in [spatial modeling](references/spatial-modeling.md#save-a-generated-style-example).
52
+
49
53
  A style may have no reference image, but its design specification must be non-empty. Supply a separate concise sentence capturing its distinctive visual traits (typically 30–60 Chinese characters, maximum 240 characters). Browser prompt copying adds only this sentence, without a model call or the full specification. Keep the sentence consistent when editing the specification. Older entries without a sentence fall back to their first description sentence until edited. The creation entrypoint permanently marks these entries as `agent`; entries created in the browser remain `user` even after Agent edits. Update or permanently delete only when the user requests it or it is otherwise clearly part of the current task:
50
54
 
51
55
  ```text
52
- <runner> style update --style <style-id> --expected-revision <n> [--name <name>] [--category <visual|ui>] [--description <specification>] [--summary <sentence>]
56
+ <runner> style update --style <style-id> --expected-revision <n> [--name <name>] [--category <visual|ui|spatial>] [--description <specification>] [--summary <sentence>]
53
57
  <runner> style remove-reference --style <style-id> --reference <reference-id> --expected-revision <n>
54
58
  <runner> style delete --style <style-id> --expected-revision <n>
55
59
  ```
@@ -106,12 +110,22 @@ For spatial sessions, read [references/spatial.md](references/spatial.md). Creat
106
110
 
107
111
  When generating an image from a spatial camera, follow that reference's **Camera references for image generation** guidance for interpreting pose intent, correcting anatomical inaccuracies, and excluding guide markings from the generated image.
108
112
 
109
- ## Choose refinement or style processing
113
+ ## Model in the consumer project
114
+
115
+ When the user asks for final 3D models or a scene in their project, read [references/spatial-modeling.md](references/spatial-modeling.md). Combine the full style specification and reference images with the Human2AI spatial session's layout, scale, pose and camera guidance. Build and review the result using the consumer project's existing tools. A style binding does not alter the guide scene or record completion of external modeling. Use the spatial authoring workflow above only when the guide scene itself needs edits.
116
+
117
+ ## Choose design, planning, refinement or style processing
110
118
 
111
- A request for 精修, mathematical proportion, symmetry, focal guidance, or rule-based composition calls for the independent refinement workflow in [references/composition.md](references/composition.md). Do not infer a style request from these terms or bind a library style. Refinement may preserve the source without changes when the Agent finds no justified improvement. Use style processing below only when style application is part of the user’s intent.
119
+ For requests to design or redesign composition content from focuses or planning guides, follow [Design content from composition planning](references/composition.md#design-content-from-composition-planning). Apply the same interpretation and visual checks when styling, refining or generating from an existing planned composition. With complex guides, especially radial fans, spirals or interacting plans, explicitly map their relationships to visible content before choosing shapes. Check focal placement and directional structure separately; preserving guide data or placing subjects at focuses alone does not fulfill the composition.
120
+
121
+ For requests to add, inspect or adjust composition planning guides, follow [Shared composition planning](references/composition.md#shared-composition-planning). Read and edit the draft's `plans` through the CLI and save through `capture.commands.save`. Use `composition inspect` and its `planningIntersections` to locate guide crossings and read coordinates for requested placement. Editing guides alone leaves content nodes unchanged.
122
+
123
+ A request for 精修 or for applying mathematical proportions, symmetry or focal relationships to canvas elements calls for the independent refinement workflow in [references/composition.md](references/composition.md). Do not infer a style request from these terms or bind a library style. Refinement may preserve the source without changes when the Agent finds no justified improvement. Use style processing below only when style application is part of the user’s intent.
112
124
 
113
125
  ## Process a canvas with its style
114
126
 
127
+ This workflow applies to composition and UI canvases. For modeling from a spatial session, use the consumer-project workflow above.
128
+
115
129
  For a request to recover the composition of a reference picture, first follow the reference-projection workflow in [references/composition.md](references/composition.md). Abstract the structure that organizes attention, weight, rhythm and space; judge the resulting experience rather than resemblance to object outlines. Choose each shape for its contribution to the whole and explain that contribution in its description. New reference nodes have empty notes, and a new reference draft has an empty overall note. The supplied picture is the visual evidence for that task. Apply a different style only when requested; an existing binding must not silently redesign the recovered composition.
116
130
 
117
131
  When modifying a styled session, use `style.current.description` and its reference images as design constraints. A request to apply or improve the style calls for actual canvas edits, not just adding a style name or rewriting notes.
@@ -142,7 +156,7 @@ Reconnect after binding to obtain the current specification and save command. Bi
142
156
 
143
157
  For SVG icons, decorations, or outlines requested as image-node content, read [references/svg-images.md](references/svg-images.md). Both session types use their existing image nodes for SVG; the user describes the result in language and the Agent authors the source.
144
158
 
145
- - For `image-composition`, read [references/composition.md](references/composition.md) before drawing a reference picture, canvas processing, refinement or generation-reference work. Interpret light markers as approximately as ordinary shape regions: retain their broad lighting contribution while freely adapting width, length, continuity, edges and strength. User instructions and node notes take precedence. Approximate overall correspondence is sufficient; do not infer fixed-width stripes, strong contrast or exact coverage from the canvas.
159
+ - For `image-composition`, read [references/composition.md](references/composition.md) before designing from focuses or planning guides, editing composition planning, drawing a reference picture, canvas processing, refinement or generation-reference work. Interpret light markers as approximately as ordinary shape regions: retain their broad lighting contribution while freely adapting width, length, continuity, edges and strength. User instructions and node notes take precedence. Approximate overall correspondence is sufficient; do not infer fixed-width stripes, strong contrast or exact coverage from the canvas.
146
160
  - For `ui-layout`, read [references/ui-layout.md](references/ui-layout.md) before modifying the layout document or implementing UI from a capture. Group multi-node controls during projection, and execute its standardization workflow before changing consumer components from canvas geometry.
147
161
  - For a future session type, use only the capture kind and operations returned by `session connect`. If no reference or operation supports the requested action, report that boundary instead of inventing a command.
148
162