aicommunicator 0.0.0-stage → 0.2.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 (97) hide show
  1. package/LICENSE +55 -0
  2. package/README.md +93 -2
  3. package/bin/aic.js +20427 -0
  4. package/host-ui/host.js +5151 -0
  5. package/host-ui/index.html +483 -0
  6. package/host-ui/lang-en.js +631 -0
  7. package/package.json +30 -4
  8. package/plugin-guide.md +997 -0
  9. package/plugins/plugin-animation/LICENSE +55 -0
  10. package/plugins/plugin-animation/dist/logic.js +2225 -0
  11. package/plugins/plugin-animation/docs/manual.md +217 -0
  12. package/plugins/plugin-animation/manifest.json +31 -0
  13. package/plugins/plugin-animation/ui/icon.svg +6 -0
  14. package/plugins/plugin-animation/ui/index.html +2266 -0
  15. package/plugins/plugin-html-design/LICENSE +55 -0
  16. package/plugins/plugin-html-design/dist/logic.js +972 -0
  17. package/plugins/plugin-html-design/docs/manual.md +100 -0
  18. package/plugins/plugin-html-design/manifest.json +39 -0
  19. package/plugins/plugin-html-design/samples/exhibition-page.json +570 -0
  20. package/plugins/plugin-html-design/ui/icon.svg +5 -0
  21. package/plugins/plugin-html-design/ui/index.html +1241 -0
  22. package/plugins/plugin-html-slides/LICENSE +55 -0
  23. package/plugins/plugin-html-slides/dist/logic.js +1323 -0
  24. package/plugins/plugin-html-slides/docs/manual.md +121 -0
  25. package/plugins/plugin-html-slides/manifest.json +39 -0
  26. package/plugins/plugin-html-slides/samples/first-week-lecture.json +1129 -0
  27. package/plugins/plugin-html-slides/ui/icon.svg +5 -0
  28. package/plugins/plugin-html-slides/ui/index.html +1349 -0
  29. package/plugins/plugin-mindmap/LICENSE +55 -0
  30. package/plugins/plugin-mindmap/dist/logic.js +966 -0
  31. package/plugins/plugin-mindmap/docs/manual.md +145 -0
  32. package/plugins/plugin-mindmap/manifest.json +39 -0
  33. package/plugins/plugin-mindmap/samples/book-club.json +480 -0
  34. package/plugins/plugin-mindmap/ui/icon.svg +5 -0
  35. package/plugins/plugin-mindmap/ui/index.html +1774 -0
  36. package/plugins/plugin-plan/LICENSE +55 -0
  37. package/plugins/plugin-plan/dist/logic.js +1029 -0
  38. package/plugins/plugin-plan/docs/manual.md +261 -0
  39. package/plugins/plugin-plan/manifest.json +51 -0
  40. package/plugins/plugin-plan/samples/kimchi-day.json +1514 -0
  41. package/plugins/plugin-plan/samples/meeting-outline.json +653 -0
  42. package/plugins/plugin-plan/samples/reading-class.json +1577 -0
  43. package/plugins/plugin-plan/ui/icon.svg +7 -0
  44. package/plugins/plugin-plan/ui/index.html +1523 -0
  45. package/plugins/plugin-png/LICENSE +55 -0
  46. package/plugins/plugin-png/dist/logic.js +1758 -0
  47. package/plugins/plugin-png/docs/manual.md +344 -0
  48. package/plugins/plugin-png/manifest.json +35 -0
  49. package/plugins/plugin-png/ui/icon.svg +5 -0
  50. package/plugins/plugin-png/ui/index.html +2885 -0
  51. package/plugins/plugin-process-log/LICENSE +55 -0
  52. package/plugins/plugin-process-log/dist/logic.js +406 -0
  53. package/plugins/plugin-process-log/docs/manual.md +131 -0
  54. package/plugins/plugin-process-log/manifest.json +43 -0
  55. package/plugins/plugin-process-log/samples/design-decisions.json +241 -0
  56. package/plugins/plugin-process-log/ui/icon.svg +7 -0
  57. package/plugins/plugin-process-log/ui/index.html +721 -0
  58. package/plugins/plugin-story/LICENSE +55 -0
  59. package/plugins/plugin-story/dist/logic.js +2201 -0
  60. package/plugins/plugin-story/docs/manual.md +428 -0
  61. package/plugins/plugin-story/manifest.json +49 -0
  62. package/plugins/plugin-story/samples/scene-body.json +758 -0
  63. package/plugins/plugin-story/samples/time-and-groups.json +989 -0
  64. package/plugins/plugin-story/ui/icon.svg +4 -0
  65. package/plugins/plugin-story/ui/index.html +2783 -0
  66. package/plugins/plugin-svg/LICENSE +55 -0
  67. package/plugins/plugin-svg/dist/logic.js +2150 -0
  68. package/plugins/plugin-svg/docs/manual.md +314 -0
  69. package/plugins/plugin-svg/manifest.json +45 -0
  70. package/plugins/plugin-svg/samples/rocket-icon.json +1305 -0
  71. package/plugins/plugin-svg/samples/yard-cat.json +7796 -0
  72. package/plugins/plugin-svg/ui/icon.svg +4 -0
  73. package/plugins/plugin-svg/ui/index.html +2017 -0
  74. package/plugins/plugin-tree/LICENSE +55 -0
  75. package/plugins/plugin-tree/dist/logic.js +505 -0
  76. package/plugins/plugin-tree/docs/manual.md +140 -0
  77. package/plugins/plugin-tree/manifest.json +45 -0
  78. package/plugins/plugin-tree/samples/book-club.json +473 -0
  79. package/plugins/plugin-tree/samples/sort-memos.json +604 -0
  80. package/plugins/plugin-tree/ui/icon.svg +7 -0
  81. package/plugins/plugin-tree/ui/index.html +1305 -0
  82. package/schema/aic_describe.input.json +11 -0
  83. package/schema/aic_describe.output.json +67 -0
  84. package/schema/aic_observe.input.json +14 -0
  85. package/schema/aic_observe.output.json +47 -0
  86. package/schema/aic_send.input.json +15 -0
  87. package/schema/aic_send.output.json +38 -0
  88. package/schema/aic_update.input.json +19 -0
  89. package/schema/aic_update.output.json +39 -0
  90. package/schema/common.json +127 -0
  91. package/template/plugin/LICENSE +55 -0
  92. package/template/plugin/README.md +27 -0
  93. package/template/plugin/docs/manual.md +31 -0
  94. package/template/plugin/logic.js +337 -0
  95. package/template/plugin/manifest.json +27 -0
  96. package/template/plugin/ui/icon.svg +4 -0
  97. package/template/plugin/ui/index.html +269 -0
@@ -0,0 +1,100 @@
1
+ # HTML Design manual
2
+
3
+ HTML Design (`aic.html-design`) is a screen where the person and the AI point at the same screen and edit a web page working copy that starts from a built-in HTML sample. This manual is for both the person and the AI. You open it with [설명서] (Manual) in the plugin window of the AIC screen. The AI reads it with `read_plugin_manual`.
4
+
5
+ ## What you do on this screen
6
+
7
+ - You look at the two built-in samples (사진이 먼저, photo first, and 제목이 먼저, title first) one after the other and start a working copy from one of them. Both samples use the same title, subtitle, photo, caption and about text. Only the layout is different.
8
+ - You change the text and style of one element. A style change can be limited to mobile or desktop widths, or to a state such as on hover.
9
+ - You click an element or drag an area on the screen to pick it, then ask in words. The AI reads what you picked and the position, size and spacing measured at that time. After the change, the AI checks the result with the values the screen measures again.
10
+ - You save the result as a single HTML file. The images are inside the file, so it opens without a network.
11
+
12
+ The working copy is a copy of the sample HTML, CSS and images at a fixed version. Even when the plugin gets a new version, the work opens with the sample version it started from.
13
+
14
+ ## Screen layout
15
+
16
+ - **Top bar**: one line with icons and short names. At the left end is the view menu. Its name shows what you are viewing ("Sample: 사진이 먼저" before you start, then "Working copy" or "Reference: 제목이 먼저"). Click it to pick another sample or a reference sample. Next to it are the width icons ([Mobile 390], [Desktop 1280]), the current size, the zoom ratio when the page is shown smaller, and the mode buttons ([Pick], [Preview]). At the right end are the save icon ([Save as HTML file]) and the edit panel icon. Hover over an icon to see its name.
17
+ - **Center**: the working copy or sample drawn at the chosen width. Mobile is 390×760 and desktop is 1280×800.
18
+ - **Send bar at the top**: it sits just below the icon bar and stays there when you scroll. Here you write what to tell the AI about what you picked and click [Send to AI]. Before you pick, there is only a message field, and the hint text in it tells you what to do. Click [?] at the end of the bar to see the steps and how the AI reads what you picked. After you pick, one line shows what you picked and whether it was sent. If it is not sent yet, the border gets darker and "Not sent to the AI yet." appears. When the screen measures the gap between two picked elements again after the AI's change, this line shows it, for example "The gap was 28px and is now 8px."
19
+ - **Right panel**: before you start a working copy, and while you look at a reference sample, it is always shown. It has the sample description and the start button, or the reference example and the back button. In the working copy it becomes the edit panel and starts closed. Open it with the edit panel icon at the right end of the top bar or with [Edit directly] in the send bar. The edit panel has the working copy information, the description of what you picked, the edit form and the elements list. Click the names of the working copy information, the measurements table and the elements list to open them. The elements list name also shows how many elements changed. When new measurements come in while the panel is closed, a dot appears on the edit panel icon.
20
+
21
+ ## Features
22
+
23
+ | Feature | What you do | What the AI does |
24
+ | --- | --- | --- |
25
+ | View samples | Pick a sample from the view menu at the left end of the top bar | Lets the person look on the screen and asks which one they like |
26
+ | Start a working copy | Write the reason for your choice and click [Start a working copy from this sample] | Gives `sample` (photo-first, title-first) and the reason the person said in `reason` to `page.start`. There is only one working copy |
27
+ | Change text | Click an element, edit the text field and click [Change text] | Gives `element` (we plus a number) and `text` to `text.set`. Giving the original text restores it |
28
+ | Change style | Click an element, choose the property, value, width and state, and click [Change style]. An empty value removes the change for that condition | Gives `element`, `property`, `value`, `media` and `state` to `style.set` |
29
+ | Attach a reference | Open [Reference: sample name] and click an element. It is attached as the reference for your next style change | Gives `{ sample, key }` in the `source` of `style.set` |
30
+ | Pick and tell | In [Pick] mode, click an element or drag an area on the screen, write your message in the send bar at the top and click [Send to AI] or press Enter | Reads what was picked and the measurements at that time with `read_selection`, and puts that selection id in the `selection` of the operation |
31
+ | Preview | Click [Preview]. Links, opening the menu and hover styles work as in the sample | Nothing |
32
+ | Change width | Click the width icons [Mobile 390] or [Desktop 1280] in the top bar | Nothing. The width is written with the measurements |
33
+ | Save as HTML file | Click the save icon [Save as HTML file] at the right of the top bar | Nothing. The file you save is kept in the core as output |
34
+
35
+ ### Styles you can change
36
+
37
+ The property list on the screen has the outer top and bottom margins (`margin-top`, `margin-bottom`), the inner top and bottom padding (`padding-top`, `padding-bottom`), the space between items (`gap`), font size (`font-size`), font weight (`font-weight`), line height (`line-height`), letter spacing (`letter-spacing`), text color (`color`), background color (`background-color`), corner rounding (`border-radius`), text alignment (`text-align`) and width and height (`width`, `max-width`, `height`).
38
+
39
+ The AI uses a wider list: color and opacity, font styles, margins and padding on every side, minimum and maximum width and height, ratio and image fit (`aspect-ratio`, `object-fit`), borders, layout (`display`, `flex-direction`, `flex-wrap`, `justify-content`, `align-items`, `grid-template-columns`), shadows, transforms and transitions. Properties not on the list are rejected.
40
+
41
+ A value cannot contain a semicolon, braces, quotes, `url()` or `!important`. Values that load outside images or addresses are rejected.
42
+
43
+ ### Width and state conditions
44
+
45
+ - **Width** (`media`): all widths (`all`, the default), mobile only (`mobile`, 600px or less), desktop only (`desktop`). When the person says "only on mobile", give `mobile`.
46
+ - **State** (`state`): normal (`none`, the default), on hover (`hover`), keyboard focus (`focus`), while pressed (`active`), when open (`open`, an open menu).
47
+ - A change in the normal state keeps the state styles in the source, such as on hover. For example, if you change the normal background color of a button, the source color on hover stays. To change a state style too, change it again in that state.
48
+
49
+ ## Changing "only this button"
50
+
51
+ Both samples have a "자세히 보기" (See more) button in the first section and another in the about section. When the person picks the button in the first section and says "only this button", the AI sends `text.set` or `style.set` to that element id only. `read_selection` lists "Other elements with the same text", so the AI does not change the other button. There is no operation in this version that changes all elements with the same text at once.
52
+
53
+ ## Pick and tell, and new measurements
54
+
55
+ What is known only after the screen draws (position, size, line count, spacing) is not in the concept text. When the person picks a place on the screen and sends it, the measurements at that time go into the selection. Even a pick that was not sent can be read by the AI with `read_selection` as what is picked on the screen now (not sent). So if you say "fix this" in the chat, the AI knows what you picked. But picking alone does not wake the AI. To give the AI work, write a message and send it. Sending creates a selection number, which is kept in the change record as the cause.
56
+
57
+ 1. In [Pick] mode (the mode when the screen opens), click a button to pick that element. Drag between two elements to pick an area. If the area lies between two elements, the two nearest elements and the gap between them are picked too.
58
+ 2. After you pick, the cursor moves to the send bar at the top, and the bar shows what you picked, for example "Picked: 첫 구역의 자세히 보기 버튼 "자세히 보기"." (the element name and text come from the sample) Open the edit panel to see the picked element, the sections that wrap it and the measurements. Click a wrapping section to pick a larger section.
59
+ 3. Write your message in the send bar and click [Send to AI] or press Enter. You can also send it empty. To ask the AI to follow an example from another place, choose [Use as reference] in the list before the field.
60
+ 4. The AI reads it with `read_selection`. It shows the base revision at the time of the pick, the width (viewport and document width), open menus, the id and text of the picked element at that time, the wrapping elements, the neighbors and the gaps (CSS px).
61
+ 5. When the AI changes something, the screen draws the new revision, measures the same target again and sends the values. In the next `read_selection`, "Redrawn values" appear next to the values at the time of the pick.
62
+
63
+ When you read the new measurements:
64
+
65
+ - If the width or the open state is different from the time of the pick, "The conditions changed" is added. Do not compare the two values directly.
66
+ - When the screen is closed, it does not measure again. Then the values are marked as old, for example "These values are for base h4. The screen has not redrawn the current base h5 yet (waiting for measurement)."
67
+ - The selection is described in the same state as the person's screen. Even if a change the person made on the screen is not merged on the AI side yet, the text reads as the person saw it. In that case "설명한 상태: 사람 화면과 같다" (Described state: same as the person's screen) is added above the description, and the person's change is merged when the AI sends the next operation with the base revision from the response.
68
+
69
+ ## Working together
70
+
71
+ 1. The AI creates the work with `create_document` and `plugin: "aic.html-design"`. It lets the person look at the two samples one after the other on the screen.
72
+ 2. When the person chooses, the person starts on the screen, or the AI sends `page.start` with the reason the person gave.
73
+ 3. The AI changes text when the person asks. For things you need to see, such as size, margins and gaps, the person points at them on the screen and sends them.
74
+ 4. The AI makes the change with that selection as the cause, then reports the result from the new measurements. If both mobile and desktop need checking, the AI asks the person to switch the width.
75
+ 5. The person clicks links and menus in [Preview], then gets the file with [Save as HTML file].
76
+
77
+ ## Rules for the AI
78
+
79
+ - When you change something the person asked for, copy their words into `human_words`. If a selection the person sent is the cause, put the selection id in `selection` and do not copy the person's words again.
80
+ - If there are no new measurements, do not guess. Say you are waiting for measurement.
81
+ - After a change, tell the person what you changed and also the side effects, such as other elements being pushed or a different line count. The person judges the overall look on the screen.
82
+ - When you read a scope, use element ids in `scope`.
83
+ - You learn about a selection when aic watch wakes you or from the current selection in `read_concept`, and you read it with `read_selection`.
84
+ - Write what you put into the work in the language the person uses.
85
+
86
+ ## Common problems
87
+
88
+ - **The gap got wider after reducing a margin**: the first section of the photo-first sample stretches to fill the screen height. If you only set the bottom margin of the photo caption to 0, the leftover height goes elsewhere and the space between the title and the caption can get wider. In that case, reduce the `min-height` of the first section on mobile only. The new measurements show side effects like this.
89
+ - **A change for mobile also changed desktop**: without `media`, the change applies to all widths. For "only on mobile", give `mobile`.
90
+ - **The hover color disappeared**: a change in the normal state does not cover the state styles in the source. If it disappeared, check whether something was changed in the hover (`hover`) state.
91
+ - **The width is different because of the scrollbar**: the measurements show both the viewport width and the document width. The document width can be narrower by the width of the scrollbar.
92
+ - **Elements cannot be picked in Preview**: Preview is the mode for seeing the original behavior. Go back to [Pick] to pick.
93
+ - **View-only screen**: on a screen that is not the editing instance, editing and sending are turned off.
94
+ - **Fonts**: this version uses system fonts only. Text width can be a little different on another computer.
95
+
96
+ ## Sample
97
+
98
+ - **Exhibition page** (`exhibition-page`): the person looks at the two samples and starts with photo first. They point at the "자세히 보기" (See more) button in the first section and send "change only this button's text", and the AI changes only that button, telling it apart from the other button with the same text. At the mobile width, the person drags between the photo caption and the title and sends "make this smaller on mobile only", and the AI reduces the minimum height of the first section on mobile only, with that selection as the cause. The person makes the title font larger on desktop only, then saves an HTML file.
99
+
100
+ For each revision, the sample shows the person's words, what was picked, what the AI did and how the screen changed, in order. Measurements such as the gaps measured when picking and after a change are not revisions, so they are not in the sample record.
@@ -0,0 +1,39 @@
1
+ {
2
+ "id": "aic.html-design",
3
+ "version": "0.1.5",
4
+ "dataVersion": 1,
5
+ "title": "HTML Design",
6
+ "license": "Apache-2.0",
7
+ "protocol": "0.1",
8
+ "logic": "dist/logic.js",
9
+ "ui": "ui/index.html",
10
+ "icon": "ui/icon.svg",
11
+ "about": "A screen where you compare two built-in HTML samples that hold the same artwork photo and title, pick one, and start a design working copy from it. You talk with the AI by clicking a button or a heading to point at it, or by dragging over an empty area, such as the space between the title and the photo, to point at a region. Text and styles are changed only for a chosen condition such as mobile, desktop or hover. After each change the position and spacing of the same elements are measured again and compared with the earlier values. The result is saved as a single HTML file without going through the AI.",
12
+ "requires": {
13
+ "os": "any",
14
+ "external": []
15
+ },
16
+ "examples": [
17
+ {
18
+ "ask": "I want to start from the draft that shows the photo first",
19
+ "does": "After you flip between the two samples, the sample you picked and your reason are kept in the working copy. Opening it again opens the same version of the original."
20
+ },
21
+ {
22
+ "ask": "On mobile, the space between the title and the photo is too wide",
23
+ "does": "You drag over that space to point at it. The AI reads the two elements and the spacing at that time, and narrows the spacing on mobile only. It also reads the spacing after the page is drawn again."
24
+ },
25
+ {
26
+ "ask": "I want to change the text of this one button",
27
+ "does": "Only the button you pointed at is changed, even when other buttons have the same text."
28
+ }
29
+ ],
30
+ "manual": "docs/manual.md",
31
+ "samples": [
32
+ {
33
+ "id": "exhibition-page",
34
+ "title": "Exhibition page",
35
+ "about": "Starts from the photo-first sample, changes the text of only the one button the person points to, narrows the space between the photo caption and the title on mobile only, then the person changes the title font size and saves an HTML file",
36
+ "file": "samples/exhibition-page.json"
37
+ }
38
+ ]
39
+ }