human2ai 0.1.3 → 0.1.5

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 (171) hide show
  1. package/README.en.md +36 -4
  2. package/README.md +36 -4
  3. package/dist/cli/main.js +26 -0
  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 +4 -0
  10. package/dist/domain/composition/analysis.js.map +1 -1
  11. package/dist/domain/composition/draft.d.ts +1 -0
  12. package/dist/domain/composition/draft.js +74 -3
  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/index.d.ts +4 -1
  18. package/dist/domain/composition/index.js +4 -1
  19. package/dist/domain/composition/index.js.map +1 -1
  20. package/dist/domain/composition/planning-intersections.d.ts +20 -0
  21. package/dist/domain/composition/planning-intersections.js +119 -0
  22. package/dist/domain/composition/planning-intersections.js.map +1 -0
  23. package/dist/domain/composition/planning.d.ts +25 -0
  24. package/dist/domain/composition/planning.js +152 -0
  25. package/dist/domain/composition/planning.js.map +1 -0
  26. package/dist/domain/composition/render.js +8 -0
  27. package/dist/domain/composition/render.js.map +1 -1
  28. package/dist/domain/composition/states.js +4 -1
  29. package/dist/domain/composition/states.js.map +1 -1
  30. package/dist/domain/composition/types.d.ts +46 -0
  31. package/dist/domain/spatial/camera-render-key.d.ts +7 -0
  32. package/dist/domain/spatial/camera-render-key.js +63 -0
  33. package/dist/domain/spatial/camera-render-key.js.map +1 -0
  34. package/dist/domain/spatial/lighting.js +3 -2
  35. package/dist/domain/spatial/lighting.js.map +1 -1
  36. package/dist/domain/spatial/model.d.ts +2 -0
  37. package/dist/domain/spatial/model.js +82 -27
  38. package/dist/domain/spatial/model.js.map +1 -1
  39. package/dist/domain/spatial/preview.d.ts +4 -0
  40. package/dist/domain/spatial/preview.js +23 -0
  41. package/dist/domain/spatial/preview.js.map +1 -0
  42. package/dist/domain/spatial/reference-lines.d.ts +12 -3
  43. package/dist/domain/spatial/reference-lines.js +37 -16
  44. package/dist/domain/spatial/reference-lines.js.map +1 -1
  45. package/dist/domain/spatial/render-inputs.d.ts +1 -1
  46. package/dist/domain/spatial/render-inputs.js +10 -2
  47. package/dist/domain/spatial/render-inputs.js.map +1 -1
  48. package/dist/domain/spatial/scene-cache.d.ts +13 -1
  49. package/dist/domain/spatial/scene-cache.js +88 -10
  50. package/dist/domain/spatial/scene-cache.js.map +1 -1
  51. package/dist/domain/spatial/scene-update.d.ts +6 -0
  52. package/dist/domain/spatial/scene-update.js +52 -0
  53. package/dist/domain/spatial/scene-update.js.map +1 -0
  54. package/dist/domain/spatial/scene.d.ts +3 -1
  55. package/dist/domain/spatial/scene.js +78 -20
  56. package/dist/domain/spatial/scene.js.map +1 -1
  57. package/dist/domain/style/model-input.d.ts +3 -0
  58. package/dist/domain/style/model-input.js +36 -0
  59. package/dist/domain/style/model-input.js.map +1 -0
  60. package/dist/domain/style/types.d.ts +7 -0
  61. package/dist/server/routes/spatial-sessions.js +28 -12
  62. package/dist/server/routes/spatial-sessions.js.map +1 -1
  63. package/dist/server/routes/style-library.js +39 -0
  64. package/dist/server/routes/style-library.js.map +1 -1
  65. package/dist/server/spatial-render-service.d.ts +21 -0
  66. package/dist/server/spatial-render-service.js +67 -0
  67. package/dist/server/spatial-render-service.js.map +1 -0
  68. package/dist/server/spatial-render-worker.d.ts +1 -0
  69. package/dist/server/spatial-render-worker.js +15 -0
  70. package/dist/server/spatial-render-worker.js.map +1 -0
  71. package/dist/server/spatial-render.d.ts +14 -2
  72. package/dist/server/spatial-render.js +38 -7
  73. package/dist/server/spatial-render.js.map +1 -1
  74. package/locales/en/common.json +73 -6
  75. package/migrations/0010_style_preview_models.sql +8 -0
  76. package/package.json +1 -1
  77. package/schemas/composition-draft.schema.json +457 -0
  78. package/skills/human2ai/SKILL.md +12 -4
  79. package/skills/human2ai/references/composition.md +192 -1
  80. package/skills/human2ai/references/spatial-modeling.md +20 -0
  81. package/web/out/404/index.html +1 -1
  82. package/web/out/404.html +1 -1
  83. package/web/out/__next.__PAGE__.txt +9 -9
  84. package/web/out/__next._full.txt +10 -10
  85. package/web/out/__next._tree.txt +6 -6
  86. package/web/out/_next/static/chunks/101.6ef34adad3e9815b.js +1 -0
  87. package/web/out/_next/static/chunks/130-930cfe062cda6fb5.js +1 -0
  88. package/web/out/_next/static/chunks/166-64abdc6456626378.js +1 -0
  89. package/web/out/_next/static/chunks/218.7b89674409b344b8.js +1 -0
  90. package/web/out/_next/static/chunks/{773-24ba65074da7fa71.js → 380-6a6a9517cf13350e.js} +50 -50
  91. package/web/out/_next/static/chunks/484.92b016222d6749f2.js +1 -0
  92. package/web/out/_next/static/chunks/653-6dfb97fec9a2d91b.js +1 -0
  93. package/web/out/_next/static/chunks/678-6a688c1f8589183c.js +1 -0
  94. package/web/out/_next/static/chunks/83607670-fd2f339702a222e4.js +1 -0
  95. package/web/out/_next/static/chunks/app/_not-found/page-527a4b0506fa60cb.js +1 -0
  96. package/web/out/_next/static/chunks/app/composition/page-945cb9644c513407.js +1 -0
  97. package/web/out/_next/static/chunks/app/{layout-3b5f82ced220ef42.js → layout-33fe456f6115412e.js} +1 -1
  98. package/web/out/_next/static/chunks/app/page-b027a8ffdb9dda66.js +1 -0
  99. package/web/out/_next/static/chunks/app/spatial/page-c52d564a39d3b592.js +1 -0
  100. package/web/out/_next/static/chunks/app/styles/page-87d77b1f3e8fdd21.js +1 -0
  101. package/web/out/_next/static/chunks/app/ui-sketch/page-69219e06cc93c28f.js +1 -0
  102. package/web/out/_next/static/chunks/{c3f2cda1-9e279dab137b7272.js → c3f2cda1-ef85a0897724e46b.js} +1 -1
  103. package/web/out/_next/static/chunks/main-app-4a71cca48ead7720.js +1 -0
  104. package/web/out/_next/static/chunks/next/dist/client/components/builtin/global-error-6a956dd8904b8723.js +1 -0
  105. package/web/out/_next/static/chunks/webpack-c0280e9af5fc8cd3.js +1 -0
  106. package/web/out/_next/static/css/{ce1b4bb3ad3c6073.css → 0ab45995828642ec.css} +1 -1
  107. package/web/out/_next/static/css/0b43ff4a0439c97e.css +1 -0
  108. package/web/out/_next/static/css/0c7915cdb1509f9d.css +1 -0
  109. package/web/out/_next/static/css/4fb1bde9070d5094.css +5 -0
  110. package/web/out/_next/static/css/c39f5ecbfc8cb532.css +1 -0
  111. package/web/out/_next/static/css/{3b7982b41ed8eccd.css → d42ebb6745c15e30.css} +1 -1
  112. package/web/out/_next/static/css/d787350911847f22.css +1 -0
  113. package/web/out/_next/static/css/db78da93b4de5040.css +1 -0
  114. package/web/out/_not-found/__next._full.txt +6 -6
  115. package/web/out/_not-found/__next._not-found.__PAGE__.txt +5 -5
  116. package/web/out/_not-found/__next._tree.txt +3 -3
  117. package/web/out/_not-found/index.html +1 -1
  118. package/web/out/_not-found/index.txt +6 -6
  119. package/web/out/brand/h2a-1024.png +0 -0
  120. package/web/out/brand/h2a-128.png +0 -0
  121. package/web/out/brand/h2a-16.png +0 -0
  122. package/web/out/brand/h2a-256.png +0 -0
  123. package/web/out/brand/h2a-32.png +0 -0
  124. package/web/out/brand/h2a-48.png +0 -0
  125. package/web/out/brand/h2a-512.png +0 -0
  126. package/web/out/brand/h2a-64.png +0 -0
  127. package/web/out/brand/h2a.svg +10 -1
  128. package/web/out/composition/__next._full.txt +11 -11
  129. package/web/out/composition/__next._tree.txt +7 -7
  130. package/web/out/composition/__next.composition.__PAGE__.txt +10 -10
  131. package/web/out/composition/index.html +1 -1
  132. package/web/out/composition/index.txt +11 -11
  133. package/web/out/favicon.ico +0 -0
  134. package/web/out/icon.svg +10 -1
  135. package/web/out/index.html +1 -1
  136. package/web/out/index.txt +10 -10
  137. package/web/out/spatial/__next._full.txt +9 -9
  138. package/web/out/spatial/__next._tree.txt +5 -5
  139. package/web/out/spatial/__next.spatial.__PAGE__.txt +8 -8
  140. package/web/out/spatial/index.html +1 -1
  141. package/web/out/spatial/index.txt +9 -9
  142. package/web/out/styles/__next._full.txt +9 -9
  143. package/web/out/styles/__next._tree.txt +5 -5
  144. package/web/out/styles/__next.styles.__PAGE__.txt +8 -8
  145. package/web/out/styles/index.html +1 -1
  146. package/web/out/styles/index.txt +9 -9
  147. package/web/out/ui-sketch/__next._full.txt +10 -10
  148. package/web/out/ui-sketch/__next._tree.txt +6 -6
  149. package/web/out/ui-sketch/__next.ui-sketch.__PAGE__.txt +9 -9
  150. package/web/out/ui-sketch/index.html +1 -1
  151. package/web/out/ui-sketch/index.txt +10 -10
  152. package/web/out/_next/static/chunks/130-027b022c82d30077.js +0 -1
  153. package/web/out/_next/static/chunks/678-6f33e7277564a5df.js +0 -1
  154. package/web/out/_next/static/chunks/728-7597352c3a7eeaf9.js +0 -1
  155. package/web/out/_next/static/chunks/83607670-bc1279370476e59f.js +0 -1
  156. package/web/out/_next/static/chunks/app/_not-found/page-58bf95050b473956.js +0 -1
  157. package/web/out/_next/static/chunks/app/composition/page-30184e9c21352991.js +0 -1
  158. package/web/out/_next/static/chunks/app/page-d41d1cdb1d6ed018.js +0 -1
  159. package/web/out/_next/static/chunks/app/spatial/page-fc3c66e1f94ed210.js +0 -1
  160. package/web/out/_next/static/chunks/app/styles/page-194a16109270e08d.js +0 -1
  161. package/web/out/_next/static/chunks/app/ui-sketch/page-c28eeab67fea766e.js +0 -1
  162. package/web/out/_next/static/chunks/main-app-ec9e35d71481270a.js +0 -1
  163. package/web/out/_next/static/chunks/next/dist/client/components/builtin/global-error-f62e60e5a6e74304.js +0 -1
  164. package/web/out/_next/static/chunks/webpack-fdd377b620f7ea99.js +0 -1
  165. package/web/out/_next/static/css/1f8501a43042a5a2.css +0 -1
  166. package/web/out/_next/static/css/2ed56cbf8f662d23.css +0 -5
  167. package/web/out/_next/static/css/81ae71f1d3e9a866.css +0 -1
  168. package/web/out/_next/static/css/96839f63fcc5e50d.css +0 -1
  169. package/web/out/_next/static/css/db96ae2e88545d96.css +0 -1
  170. /package/web/out/_next/static/{Wakl9xK54qWYuP4Hpi0W9 → Rem7hlT5iXtA-5codwSoe}/_buildManifest.js +0 -0
  171. /package/web/out/_next/static/{Wakl9xK54qWYuP4Hpi0W9 → Rem7hlT5iXtA-5codwSoe}/_ssgManifest.js +0 -0
@@ -6,7 +6,8 @@
6
6
  "sendToBack": "Send to back"
7
7
  },
8
8
  "app": {
9
- "title": "human2ai"
9
+ "title": "human2ai",
10
+ "repositoryLink": "{{productName}}'s GitHub URL"
10
11
  },
11
12
  "integrations": {
12
13
  "workbuddy": {
@@ -19,9 +20,19 @@
19
20
  }
20
21
  },
21
22
  "home": {
23
+ "description": "Explore ideas through compositions, UI sketches and 3D spaces, and refine your designs with AI.",
22
24
  "createComposition": "Create composition",
23
25
  "createUiSketch": "Create interface",
24
- "createSpatial": "Create 3D space"
26
+ "createSpatial": "Create 3D space",
27
+ "skillInstallation": {
28
+ "title": "Install skill",
29
+ "agentTab": "Agent",
30
+ "cliTab": "CLI",
31
+ "agentPrompt": "Install the Human2AI skill in this project: run npx skills add yisi-ai/human2ai --skill human2ai, select project scope and your agent type, then confirm the skill is discoverable and report its installation path.",
32
+ "copy": "Copy content",
33
+ "copying": "Copying content",
34
+ "copyFailed": "Copy failed. Select and copy the text manually."
35
+ }
25
36
  },
26
37
  "navigation": {
27
38
  "composition": "Composition"
@@ -72,7 +83,7 @@
72
83
  },
73
84
  "searchPlaceholder": "Search styles",
74
85
  "deleteTitle": "Delete this style?",
75
- "deleteDescription": "The style and all of its reference images will be permanently deleted.",
86
+ "deleteDescription": "The style and all of its reference images and models will be permanently deleted.",
76
87
  "empty": "No styles yet",
77
88
  "noMatches": "No matching styles",
78
89
  "loading": "Loading styles",
@@ -84,6 +95,13 @@
84
95
  "promptSummary": {
85
96
  "label": "Style summary",
86
97
  "placeholder": "Summarize the defining visual traits in one sentence."
98
+ },
99
+ "model": {
100
+ "label": "Model example",
101
+ "loading": "Loading model",
102
+ "failed": "Could not preview the model",
103
+ "reset": "Reset model view",
104
+ "controls": "Drag to rotate, scroll to zoom. When focused, use arrow keys to rotate, + / − to zoom, and Home to reset."
87
105
  }
88
106
  },
89
107
  "notes": {
@@ -256,8 +274,6 @@
256
274
  "quadrilateral": "Rectangle",
257
275
  "textRegion": "Text region"
258
276
  },
259
- "showGuideGrid": "Show grid",
260
- "hideGuideGrid": "Hide grid",
261
277
  "canvasZoom": "Current zoom",
262
278
  "zoomOut": "Zoom out",
263
279
  "zoomIn": "Zoom in",
@@ -302,7 +318,16 @@
302
318
  "left": "left",
303
319
  "lightSourceNumber": "Light source {{index}}",
304
320
  "lightSourceGuidance": "- Like ordinary shape regions, light markers describe approximate visual intent and spatial relationships. Pale yellow identifies lighting, not color temperature. A source is distinct from the area it illuminates: interpret its origin and contribution in the scene. Rectangles suggest band-shaped or extended illumination; circles suggest localized illumination. Retain the broad lighting placement, extension trend and contribution to subject and space, while freely adapting width, length, curvature, continuity, edges and strength to the scene. User instructions and node notes take precedence; otherwise the Agent chooses. Do not infer fixed width, straight constant-width strips, full-frame coverage, medium-strong contrast or thumbnail prominence from the reference. Consider sources individually while allowing their visible effects to split, overlap or blend. Review whether the overall lighting broadly echoes the composition rather than comparing edges, segments or widths; tighten a constraint only when the user explicitly requests it, and do not ignore the authored lighting intent entirely.",
305
- "lightBandGuidance": "Light-band intent: broadly retain the extended or band-like illumination and its spatial role here. Its realization may narrow, widen, curve, break up or blend with the scene; a complete, straight, constant-width or conspicuous stripe is not required. User instructions and this node’s notes take precedence for width, length, edges and strength; otherwise the Agent interprets them freely. An approximate overall correspondence is sufficient."
321
+ "lightBandGuidance": "Light-band intent: broadly retain the extended or band-like illumination and its spatial role here. Its realization may narrow, widen, curve, break up or blend with the scene; a complete, straight, constant-width or conspicuous stripe is not required. User instructions and this node’s notes take precedence for width, length, edges and strength; otherwise the Agent interprets them freely. An approximate overall correspondence is sufficient.",
322
+ "planningGuidance": "Use the following plans as composition intent alongside the overall requirements and notes. Do not draw the guide lines, axes, spiral or triangle outline in the artwork. Positions are relative to the top-left of the image; angles run clockwise from the rightward horizontal.",
323
+ "planningGrid": "- {{type}}: {{axes}} divisions.",
324
+ "planningSymmetry": "- Symmetrical composition: axis through the image center ({{x}}%, {{y}}%), direction {{rotation}}°.",
325
+ "planningSpiral": "- Golden spiral: pole at ({{x}}%, {{y}}%), outer radius directed at {{rotation}}°, radius {{scale}}% of the shorter image side, {{winding}}.",
326
+ "planningClockwise": "expanding clockwise",
327
+ "planningCounterclockwise": "expanding counterclockwise",
328
+ "planningTriangle": "- Triangular composition: isosceles triangle with vertices at {{points}}.",
329
+ "planningRadial": "- Radial composition: convergence point ({{x}}%, {{y}}%), {{rayCount}} evenly spaced rays starting at {{rotation}}° and spanning {{spread}}° clockwise.",
330
+ "planningRadialFree": "- Free radial composition: convergence point ({{x}}%, {{y}}%), {{rayCount}} rays with independent directions: {{angles}} (clockwise from the rightward horizontal)."
306
331
  },
307
332
  "depth": {
308
333
  "label": "Depth",
@@ -352,6 +377,48 @@
352
377
  "textRegion": {
353
378
  "cornerLabel": "Text outline corner {{index}}",
354
379
  "cornerHelp": "Select a text region and hold Ctrl to drag its corners. Focus a corner and use the arrow keys for fine adjustments."
380
+ },
381
+ "planning": {
382
+ "title": "Composition planning",
383
+ "add": "Add plan",
384
+ "empty": "No composition plans",
385
+ "types": {
386
+ "thirds": "Rule of thirds",
387
+ "golden-section": "Golden section",
388
+ "symmetry": "Symmetrical composition",
389
+ "golden-spiral": "Golden spiral",
390
+ "triangle": "Triangular composition",
391
+ "radial": "Radial composition"
392
+ },
393
+ "visible": "Show plan",
394
+ "axes": "Grid directions",
395
+ "both": "Horizontal and vertical",
396
+ "horizontal": "Horizontal",
397
+ "vertical": "Vertical",
398
+ "x": "Horizontal (%)",
399
+ "y": "Vertical (%)",
400
+ "rotation": "Rotation (°)",
401
+ "scale": "Spiral size (%)",
402
+ "mirrored": "Mirror spiral",
403
+ "handle": "Plan control {{index}}",
404
+ "help": "Shift-click to select multiple plans and drag a selected guide to move them together. Thirds, golden-section and symmetry guides stay fixed. Select thirds and golden-section plans in the sidebar. Arrow keys nudge; Delete removes a plan.",
405
+ "width": "Base width (%)",
406
+ "height": "Triangle height (%)",
407
+ "triangleHelp": "Drag the apex to rotate and adjust height. Drag a base corner to resize; both sides stay symmetric.",
408
+ "symmetryHelp": "The center stays fixed. Drag the other dot to one of eight regular directions or four frame-corner directions. Corner directions follow the frame ratio; duplicate positions merge for a square. Arrow keys step between positions.",
409
+ "spiralHelp": "Click the center dot to switch clockwise/counterclockwise. Drag it to move the spiral; drag the outer dot to rotate and resize.",
410
+ "spiralDirection": "Switch spiral direction (clockwise/counterclockwise)",
411
+ "rayCount": "Ray count",
412
+ "spread": "Spread (°)",
413
+ "radialHelp": "Uniform mode uses a starting direction and spread. In Free mode, drag each ray’s dot to adjust its direction; drag the center to move the convergence point. Switching to Free preserves directions; switching back to Uniform redistributes the current rays around a full circle.",
414
+ "lock": "Lock composition planning",
415
+ "unlock": "Unlock composition planning",
416
+ "showAll": "Show composition guides",
417
+ "hideAll": "Hide composition guides",
418
+ "radialMode": "Radial mode",
419
+ "radialUniform": "Uniform",
420
+ "radialFree": "Free",
421
+ "rayHandle": "Ray {{index}} direction"
355
422
  }
356
423
  },
357
424
  "uiSketch": {
@@ -0,0 +1,8 @@
1
+ CREATE TABLE style_preview_models (
2
+ style_id TEXT PRIMARY KEY REFERENCES style_entries(id) ON DELETE CASCADE,
3
+ id TEXT NOT NULL UNIQUE,
4
+ relative_path TEXT NOT NULL,
5
+ original_filename TEXT NOT NULL,
6
+ byte_size INTEGER NOT NULL CHECK (byte_size > 0),
7
+ created_at TEXT NOT NULL
8
+ ) STRICT;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "human2ai",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Local visual collaboration workspace for people and AI agents, with a browser UI and CLI.",
5
5
  "license": "MIT",
6
6
  "author": "贾思斋",
@@ -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 } },
@@ -152,6 +153,461 @@
152
153
  }
153
154
  },
154
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
+ },
155
611
  "state": {
156
612
  "type": "object", "additionalProperties": false,
157
613
  "required": ["id", "number", "layout"],
@@ -163,6 +619,7 @@
163
619
  "type": "object", "additionalProperties": false,
164
620
  "required": ["frame", "layerOrder", "focusPoints", "directionLine", "areas", "images"],
165
621
  "properties": {
622
+ "plans": { "type": "array", "items": { "$ref": "#/$defs/compositionPlan" } },
166
623
  "frame": { "allOf": [{ "$ref": "#/properties/frame" }, { "type": "object", "required": ["bounds"] }] },
167
624
  "layerOrder": { "$ref": "#/properties/layerOrder" },
168
625
  "focusPoints": { "type": "array", "maxItems": 3, "items": { "$ref": "#/$defs/layoutPoint" } },
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: human2ai
3
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.5"
4
6
  ---
5
7
 
6
8
  # Human2AI
@@ -37,7 +39,7 @@ The style library is global to the local Human2AI service. Each composition, UI
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
 
@@ -46,6 +48,8 @@ When a style encountered during Agent work is worth keeping, save it directly as
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
@@ -110,9 +114,13 @@ When generating an image from a spatial camera, follow that reference's **Camera
110
114
 
111
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.
112
116
 
113
- ## Choose refinement or style processing
117
+ ## Choose design, planning, refinement or style processing
118
+
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.
114
122
 
115
- 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.
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.
116
124
 
117
125
  ## Process a canvas with its style
118
126
 
@@ -148,7 +156,7 @@ Reconnect after binding to obtain the current specification and save command. Bi
148
156
 
149
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.
150
158
 
151
- - 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.
152
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.
153
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.
154
162