bobo-ai-cli 2.1.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/README.md +52 -9
  2. package/bundled-skills/CORE_SKILLS.txt +18 -0
  3. package/dist/agent.js +91 -51
  4. package/dist/agent.js.map +1 -1
  5. package/dist/agents/catalog.d.ts +40 -0
  6. package/dist/agents/catalog.js +172 -0
  7. package/dist/agents/catalog.js.map +1 -0
  8. package/dist/agents/index.d.ts +6 -0
  9. package/dist/agents/index.js +4 -0
  10. package/dist/agents/index.js.map +1 -0
  11. package/dist/agents/router.d.ts +43 -0
  12. package/dist/agents/router.js +87 -0
  13. package/dist/agents/router.js.map +1 -0
  14. package/dist/agents/spawn.d.ts +46 -0
  15. package/dist/agents/spawn.js +91 -0
  16. package/dist/agents/spawn.js.map +1 -0
  17. package/dist/autonomous.js +41 -1
  18. package/dist/autonomous.js.map +1 -1
  19. package/dist/cli.d.ts +8 -0
  20. package/dist/cli.js +669 -0
  21. package/dist/cli.js.map +1 -0
  22. package/dist/compactor.d.ts +49 -4
  23. package/dist/compactor.js +164 -17
  24. package/dist/compactor.js.map +1 -1
  25. package/dist/completer.js +2 -0
  26. package/dist/completer.js.map +1 -1
  27. package/dist/config.js +3 -2
  28. package/dist/config.js.map +1 -1
  29. package/dist/cost-tracker.js +36 -2
  30. package/dist/cost-tracker.js.map +1 -1
  31. package/dist/dream.d.ts +42 -0
  32. package/dist/dream.js +324 -0
  33. package/dist/dream.js.map +1 -0
  34. package/dist/hooks.d.ts +1 -1
  35. package/dist/hooks.js +7 -2
  36. package/dist/hooks.js.map +1 -1
  37. package/dist/index.js +10 -1136
  38. package/dist/index.js.map +1 -1
  39. package/dist/insight.js +4 -11
  40. package/dist/insight.js.map +1 -1
  41. package/dist/knowledge.d.ts +13 -0
  42. package/dist/knowledge.js +16 -4
  43. package/dist/knowledge.js.map +1 -1
  44. package/dist/mcp-client.js +59 -41
  45. package/dist/mcp-client.js.map +1 -1
  46. package/dist/memory.d.ts +4 -0
  47. package/dist/memory.js +30 -18
  48. package/dist/memory.js.map +1 -1
  49. package/dist/project.js +2 -1
  50. package/dist/project.js.map +1 -1
  51. package/dist/providers.js +1 -1
  52. package/dist/providers.js.map +1 -1
  53. package/dist/repl.d.ts +16 -0
  54. package/dist/repl.js +704 -0
  55. package/dist/repl.js.map +1 -0
  56. package/dist/sessions.js +59 -3
  57. package/dist/sessions.js.map +1 -1
  58. package/dist/skill-router.js +2 -2
  59. package/dist/skill-router.js.map +1 -1
  60. package/dist/skills/composer.d.ts +18 -0
  61. package/dist/skills/composer.js +59 -0
  62. package/dist/skills/composer.js.map +1 -0
  63. package/dist/skills/index.d.ts +3 -0
  64. package/dist/skills/index.js +3 -0
  65. package/dist/skills/index.js.map +1 -0
  66. package/dist/skills/loader.d.ts +12 -0
  67. package/dist/skills/loader.js +150 -0
  68. package/dist/skills/loader.js.map +1 -0
  69. package/dist/skills/types.d.ts +28 -0
  70. package/dist/skills/types.js +9 -0
  71. package/dist/skills/types.js.map +1 -0
  72. package/dist/skills.d.ts +1 -0
  73. package/dist/skills.js +10 -8
  74. package/dist/skills.js.map +1 -1
  75. package/dist/state/artifacts.d.ts +71 -0
  76. package/dist/state/artifacts.js +133 -0
  77. package/dist/state/artifacts.js.map +1 -0
  78. package/dist/state/index.d.ts +9 -0
  79. package/dist/state/index.js +7 -0
  80. package/dist/state/index.js.map +1 -0
  81. package/dist/state/manager.d.ts +89 -0
  82. package/dist/state/manager.js +132 -0
  83. package/dist/state/manager.js.map +1 -0
  84. package/dist/state/project-memory.d.ts +24 -0
  85. package/dist/state/project-memory.js +83 -0
  86. package/dist/state/project-memory.js.map +1 -0
  87. package/dist/state/recovery.d.ts +24 -0
  88. package/dist/state/recovery.js +95 -0
  89. package/dist/state/recovery.js.map +1 -0
  90. package/dist/statusbar.d.ts +1 -0
  91. package/dist/statusbar.js +12 -1
  92. package/dist/statusbar.js.map +1 -1
  93. package/dist/structured/loader.js +4 -2
  94. package/dist/structured/loader.js.map +1 -1
  95. package/dist/sub-agent-runner.d.ts +1 -0
  96. package/dist/sub-agent-runner.js +32 -5
  97. package/dist/sub-agent-runner.js.map +1 -1
  98. package/dist/sub-agents.d.ts +19 -1
  99. package/dist/sub-agents.js +142 -5
  100. package/dist/sub-agents.js.map +1 -1
  101. package/dist/tool-governance.d.ts +77 -0
  102. package/dist/tool-governance.js +366 -0
  103. package/dist/tool-governance.js.map +1 -0
  104. package/dist/tools/advanced.js +3 -2
  105. package/dist/tools/advanced.js.map +1 -1
  106. package/dist/tools/browser.js +2 -2
  107. package/dist/tools/browser.js.map +1 -1
  108. package/dist/tools/claude-code.js +2 -2
  109. package/dist/tools/claude-code.js.map +1 -1
  110. package/dist/tools/index.js +36 -12
  111. package/dist/tools/index.js.map +1 -1
  112. package/dist/tools/process-manager.js +2 -2
  113. package/dist/tools/process-manager.js.map +1 -1
  114. package/dist/ui/hud.d.ts +25 -0
  115. package/dist/ui/hud.js +67 -0
  116. package/dist/ui/hud.js.map +1 -0
  117. package/dist/verification-agent.d.ts +46 -0
  118. package/dist/verification-agent.js +533 -0
  119. package/dist/verification-agent.js.map +1 -0
  120. package/dist/watcher.js +2 -2
  121. package/dist/watcher.js.map +1 -1
  122. package/dist/web.js +1 -1
  123. package/dist/web.js.map +1 -1
  124. package/dist/workflows/ask.d.ts +13 -0
  125. package/dist/workflows/ask.js +66 -0
  126. package/dist/workflows/ask.js.map +1 -0
  127. package/dist/workflows/index.d.ts +5 -0
  128. package/dist/workflows/index.js +6 -0
  129. package/dist/workflows/index.js.map +1 -0
  130. package/dist/workflows/interview.d.ts +11 -0
  131. package/dist/workflows/interview.js +36 -0
  132. package/dist/workflows/interview.js.map +1 -0
  133. package/dist/workflows/plan.d.ts +13 -0
  134. package/dist/workflows/plan.js +34 -0
  135. package/dist/workflows/plan.js.map +1 -0
  136. package/dist/workflows/team.d.ts +17 -0
  137. package/dist/workflows/team.js +86 -0
  138. package/dist/workflows/team.js.map +1 -0
  139. package/dist/workflows/verify.d.ts +11 -0
  140. package/dist/workflows/verify.js +21 -0
  141. package/dist/workflows/verify.js.map +1 -0
  142. package/package.json +18 -5
  143. package/bundled-skills/Skill_Seekers/SKILL.md +0 -1722
  144. package/bundled-skills/ab-test-setup/SKILL.md +0 -557
  145. package/bundled-skills/adversarial-verification/SKILL.md +0 -95
  146. package/bundled-skills/agent-sdk-dev/SKILL.md +0 -238
  147. package/bundled-skills/agent-tools/SKILL.md +0 -136
  148. package/bundled-skills/analytics-tracking/SKILL.md +0 -597
  149. package/bundled-skills/artifacts-builder/SKILL.md +0 -89
  150. package/bundled-skills/asana/SKILL.md +0 -13
  151. package/bundled-skills/brand-voice/SKILL.md +0 -481
  152. package/bundled-skills/browser-use/SKILL.md +0 -419
  153. package/bundled-skills/cache-optimization-skill/SKILL.md +0 -179
  154. package/bundled-skills/canvas-design/SKILL.md +0 -147
  155. package/bundled-skills/citation-validator/SKILL.md +0 -203
  156. package/bundled-skills/clangd-lsp/SKILL.md +0 -52
  157. package/bundled-skills/code-simplifier/SKILL.md +0 -13
  158. package/bundled-skills/commit-commands/SKILL.md +0 -258
  159. package/bundled-skills/competitor-alternatives/SKILL.md +0 -795
  160. package/bundled-skills/content-atomizer/SKILL.md +0 -910
  161. package/bundled-skills/content-research-writer/SKILL.md +0 -605
  162. package/bundled-skills/context7/SKILL.md +0 -13
  163. package/bundled-skills/copy-editing/SKILL.md +0 -494
  164. package/bundled-skills/copywriting/SKILL.md +0 -510
  165. package/bundled-skills/csharp-lsp/SKILL.md +0 -40
  166. package/bundled-skills/decision-making-framework/SKILL.md +0 -154
  167. package/bundled-skills/deep-research/SKILL.md +0 -236
  168. package/bundled-skills/developer-growth-analysis/SKILL.md +0 -335
  169. package/bundled-skills/direct-response-copy/SKILL.md +0 -2336
  170. package/bundled-skills/docker-expert/SKILL.md +0 -229
  171. package/bundled-skills/document-skills/SKILL.md +0 -13
  172. package/bundled-skills/documentation-expert/SKILL.md +0 -126
  173. package/bundled-skills/email-sequence/SKILL.md +0 -1061
  174. package/bundled-skills/email-sequences/SKILL.md +0 -910
  175. package/bundled-skills/example-plugin/SKILL.md +0 -72
  176. package/bundled-skills/explanatory-output-style/SKILL.md +0 -82
  177. package/bundled-skills/feature-dev/SKILL.md +0 -458
  178. package/bundled-skills/file-organizer/SKILL.md +0 -466
  179. package/bundled-skills/firebase.disabled/SKILL.md +0 -13
  180. package/bundled-skills/form-cro/SKILL.md +0 -488
  181. package/bundled-skills/free-tool-strategy/SKILL.md +0 -636
  182. package/bundled-skills/frontend-design/SKILL.md +0 -41
  183. package/bundled-skills/frontend-design-offical/SKILL.md +0 -55
  184. package/bundled-skills/gitlab/SKILL.md +0 -13
  185. package/bundled-skills/gopls-lsp/SKILL.md +0 -32
  186. package/bundled-skills/got-controller/SKILL.md +0 -218
  187. package/bundled-skills/greptile/SKILL.md +0 -72
  188. package/bundled-skills/hookify/SKILL.md +0 -376
  189. package/bundled-skills/image-editor/SKILL.md +0 -189
  190. package/bundled-skills/image-enhancer/SKILL.md +0 -109
  191. package/bundled-skills/jdtls-lsp/SKILL.md +0 -49
  192. package/bundled-skills/json-canvas/SKILL.md +0 -654
  193. package/bundled-skills/keyword-research/SKILL.md +0 -559
  194. package/bundled-skills/kotlin-lsp/SKILL.md +0 -28
  195. package/bundled-skills/laravel-boost/SKILL.md +0 -13
  196. package/bundled-skills/launch-strategy/SKILL.md +0 -394
  197. package/bundled-skills/lead-magnet/SKILL.md +0 -393
  198. package/bundled-skills/learning-output-style/SKILL.md +0 -106
  199. package/bundled-skills/linear/SKILL.md +0 -13
  200. package/bundled-skills/lua-lsp/SKILL.md +0 -47
  201. package/bundled-skills/marketing-ideas/SKILL.md +0 -720
  202. package/bundled-skills/marketing-psychology/SKILL.md +0 -534
  203. package/bundled-skills/mcp-builder/SKILL.md +0 -369
  204. package/bundled-skills/meeting-insights-analyzer/SKILL.md +0 -347
  205. package/bundled-skills/memory-evolution-system/SKILL.md +0 -172
  206. package/bundled-skills/multi-lens-thinking/SKILL.md +0 -407
  207. package/bundled-skills/nano-banana-pro/SKILL.md +0 -116
  208. package/bundled-skills/newsletter/SKILL.md +0 -736
  209. package/bundled-skills/notebooklm/SKILL.md +0 -296
  210. package/bundled-skills/obsidian-bases/SKILL.md +0 -634
  211. package/bundled-skills/obsidian-markdown/SKILL.md +0 -651
  212. package/bundled-skills/onboarding-cro/SKILL.md +0 -494
  213. package/bundled-skills/page-cro/SKILL.md +0 -379
  214. package/bundled-skills/paid-ads/SKILL.md +0 -624
  215. package/bundled-skills/paywall-upgrade-cro/SKILL.md +0 -651
  216. package/bundled-skills/php-lsp/SKILL.md +0 -36
  217. package/bundled-skills/playwright/SKILL.md +0 -13
  218. package/bundled-skills/plugin-dev/SKILL.md +0 -434
  219. package/bundled-skills/popup-cro/SKILL.md +0 -520
  220. package/bundled-skills/positioning-angles/SKILL.md +0 -330
  221. package/bundled-skills/pr-review-toolkit/SKILL.md +0 -359
  222. package/bundled-skills/pricing-strategy/SKILL.md +0 -777
  223. package/bundled-skills/proactive-self-improving/SKILL.md +0 -435
  224. package/bundled-skills/programmatic-seo/SKILL.md +0 -714
  225. package/bundled-skills/pyright-lsp/SKILL.md +0 -43
  226. package/bundled-skills/quality-assurance-framework/SKILL.md +0 -168
  227. package/bundled-skills/question-refiner/SKILL.md +0 -160
  228. package/bundled-skills/ralph-loop/SKILL.md +0 -205
  229. package/bundled-skills/refactoring-expert/SKILL.md +0 -103
  230. package/bundled-skills/referral-program/SKILL.md +0 -668
  231. package/bundled-skills/research-executor/SKILL.md +0 -164
  232. package/bundled-skills/review-with-security/SKILL.md +0 -12
  233. package/bundled-skills/rust-analyzer-lsp/SKILL.md +0 -50
  234. package/bundled-skills/schema-markup/SKILL.md +0 -647
  235. package/bundled-skills/security-audit-expert/SKILL.md +0 -124
  236. package/bundled-skills/security-expert/SKILL.md +0 -140
  237. package/bundled-skills/security-guidance/SKILL.md +0 -13
  238. package/bundled-skills/seedance-prompt/SKILL.md +0 -139
  239. package/bundled-skills/self-evolution/SKILL.md +0 -1160
  240. package/bundled-skills/seo-audit/SKILL.md +0 -432
  241. package/bundled-skills/seo-content/SKILL.md +0 -787
  242. package/bundled-skills/serena/SKILL.md +0 -13
  243. package/bundled-skills/signup-flow-cro/SKILL.md +0 -409
  244. package/bundled-skills/skill-manager/SKILL.md +0 -226
  245. package/bundled-skills/skill-share/SKILL.md +0 -98
  246. package/bundled-skills/slack/SKILL.md +0 -13
  247. package/bundled-skills/social-content/SKILL.md +0 -878
  248. package/bundled-skills/spec-flow-skill/SKILL.md +0 -124
  249. package/bundled-skills/stripe/SKILL.md +0 -13
  250. package/bundled-skills/supabase/SKILL.md +0 -13
  251. package/bundled-skills/swift-lsp/SKILL.md +0 -40
  252. package/bundled-skills/synthesizer/SKILL.md +0 -236
  253. package/bundled-skills/template-skill/SKILL.md +0 -16
  254. package/bundled-skills/theme-factory/SKILL.md +0 -72
  255. package/bundled-skills/tiktok-research/SKILL.md +0 -208
  256. package/bundled-skills/typescript-lsp/SKILL.md +0 -36
  257. package/bundled-skills/ui-ux-pro-max/SKILL.md +0 -247
  258. package/bundled-skills/visual-prompt-engineer/SKILL.md +0 -102
  259. package/bundled-skills/webapp-testing/SKILL.md +0 -111
  260. package/bundled-skills/wide-research/SKILL.md +0 -191
@@ -1,654 +0,0 @@
1
- ---
2
- id: "json-canvas"
3
- title: "JSON Canvas Skill"
4
- category: "knowledge"
5
- tags: ["json canvas skill", "overview", "file structure", "nodes", "edges", "colors", "complete examples", "id generation", "layout guidelines", "validation rules"]
6
- triggers: []
7
- dependencies: []
8
- source: "E:/Bobo's Coding cache/.claude/skills/json-canvas"
9
- ---
10
-
11
- ---
12
- name: json-canvas
13
- description: Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.
14
- ---
15
-
16
- # JSON Canvas Skill
17
-
18
- This skill enables Claude Code to create and edit valid JSON Canvas files (`.canvas`) used in Obsidian and other applications.
19
-
20
- ## Overview
21
-
22
- JSON Canvas is an open file format for infinite canvas data. Canvas files use the `.canvas` extension and contain valid JSON following the [JSON Canvas Spec 1.0](https://jsoncanvas.org/spec/1.0/).
23
-
24
- ## File Structure
25
-
26
- A canvas file contains two top-level arrays:
27
-
28
- ```json
29
- {
30
- "nodes": [],
31
- "edges": []
32
- }
33
- ```
34
-
35
- - `nodes` (optional): Array of node objects
36
- - `edges` (optional): Array of edge objects connecting nodes
37
-
38
- ## Nodes
39
-
40
- Nodes are objects placed on the canvas. There are four node types:
41
-
42
- - `text` - Text content with Markdown
43
- - `file` - Reference to files/attachments
44
- - `link` - External URL
45
- - `group` - Visual container for other nodes
46
-
47
- ### Z-Index Ordering
48
-
49
- Nodes are ordered by z-index in the array:
50
-
51
- - First node = bottom layer (displayed below others)
52
- - Last node = top layer (displayed above others)
53
-
54
- ### Generic Node Attributes
55
-
56
- All nodes share these attributes:
57
-
58
- | Attribute | Required | Type | Description |
59
- | --------- | -------- | ----------- | --------------------------------------------- |
60
- | `id` | Yes | string | Unique identifier for the node |
61
- | `type` | Yes | string | Node type: `text`, `file`, `link`, or `group` |
62
- | `x` | Yes | integer | X position in pixels |
63
- | `y` | Yes | integer | Y position in pixels |
64
- | `width` | Yes | integer | Width in pixels |
65
- | `height` | Yes | integer | Height in pixels |
66
- | `color` | No | canvasColor | Node color (see Color section) |
67
-
68
- ### Text Nodes
69
-
70
- Text nodes contain Markdown content.
71
-
72
- ```json
73
- {
74
- "id": "6f0ad84f44ce9c17",
75
- "type": "text",
76
- "x": 0,
77
- "y": 0,
78
- "width": 400,
79
- "height": 200,
80
- "text": "# Hello World\n\nThis is **Markdown** content."
81
- }
82
- ```
83
-
84
- | Attribute | Required | Type | Description |
85
- | --------- | -------- | ------ | ------------------------------- |
86
- | `text` | Yes | string | Plain text with Markdown syntax |
87
-
88
- ### File Nodes
89
-
90
- File nodes reference files or attachments (images, videos, PDFs, notes, etc.).
91
-
92
- ```json
93
- {
94
- "id": "a1b2c3d4e5f67890",
95
- "type": "file",
96
- "x": 500,
97
- "y": 0,
98
- "width": 400,
99
- "height": 300,
100
- "file": "Attachments/diagram.png"
101
- }
102
- ```
103
-
104
- ```json
105
- {
106
- "id": "b2c3d4e5f6789012",
107
- "type": "file",
108
- "x": 500,
109
- "y": 400,
110
- "width": 400,
111
- "height": 300,
112
- "file": "Notes/Project Overview.md",
113
- "subpath": "#Implementation"
114
- }
115
- ```
116
-
117
- | Attribute | Required | Type | Description |
118
- | --------- | -------- | ------ | ------------------------------------------ |
119
- | `file` | Yes | string | Path to file within the system |
120
- | `subpath` | No | string | Link to heading or block (starts with `#`) |
121
-
122
- ### Link Nodes
123
-
124
- Link nodes display external URLs.
125
-
126
- ```json
127
- {
128
- "id": "c3d4e5f678901234",
129
- "type": "link",
130
- "x": 1000,
131
- "y": 0,
132
- "width": 400,
133
- "height": 200,
134
- "url": "https://obsidian.md"
135
- }
136
- ```
137
-
138
- | Attribute | Required | Type | Description |
139
- | --------- | -------- | ------ | ------------ |
140
- | `url` | Yes | string | External URL |
141
-
142
- ### Group Nodes
143
-
144
- Group nodes are visual containers for organizing other nodes.
145
-
146
- ```json
147
- {
148
- "id": "d4e5f6789012345a",
149
- "type": "group",
150
- "x": -50,
151
- "y": -50,
152
- "width": 1000,
153
- "height": 600,
154
- "label": "Project Overview",
155
- "color": "4"
156
- }
157
- ```
158
-
159
- ```json
160
- {
161
- "id": "e5f67890123456ab",
162
- "type": "group",
163
- "x": 0,
164
- "y": 700,
165
- "width": 800,
166
- "height": 500,
167
- "label": "Resources",
168
- "background": "Attachments/background.png",
169
- "backgroundStyle": "cover"
170
- }
171
- ```
172
-
173
- | Attribute | Required | Type | Description |
174
- | ----------------- | -------- | ------ | -------------------------- |
175
- | `label` | No | string | Text label for the group |
176
- | `background` | No | string | Path to background image |
177
- | `backgroundStyle` | No | string | Background rendering style |
178
-
179
- #### Background Styles
180
-
181
- | Value | Description |
182
- | -------- | ------------------------------------------- |
183
- | `cover` | Fills entire width and height of node |
184
- | `ratio` | Maintains aspect ratio of background image |
185
- | `repeat` | Repeats image as pattern in both directions |
186
-
187
- ## Edges
188
-
189
- Edges are lines connecting nodes.
190
-
191
- ```json
192
- {
193
- "id": "f67890123456789a",
194
- "fromNode": "6f0ad84f44ce9c17",
195
- "toNode": "a1b2c3d4e5f67890"
196
- }
197
- ```
198
-
199
- ```json
200
- {
201
- "id": "0123456789abcdef",
202
- "fromNode": "6f0ad84f44ce9c17",
203
- "fromSide": "right",
204
- "fromEnd": "none",
205
- "toNode": "b2c3d4e5f6789012",
206
- "toSide": "left",
207
- "toEnd": "arrow",
208
- "color": "1",
209
- "label": "leads to"
210
- }
211
- ```
212
-
213
- | Attribute | Required | Type | Default | Description |
214
- | ---------- | -------- | ----------- | ------- | ------------------------------- |
215
- | `id` | Yes | string | - | Unique identifier for the edge |
216
- | `fromNode` | Yes | string | - | Node ID where connection starts |
217
- | `fromSide` | No | string | - | Side where edge starts |
218
- | `fromEnd` | No | string | `none` | Shape at edge start |
219
- | `toNode` | Yes | string | - | Node ID where connection ends |
220
- | `toSide` | No | string | - | Side where edge ends |
221
- | `toEnd` | No | string | `arrow` | Shape at edge end |
222
- | `color` | No | canvasColor | - | Line color |
223
- | `label` | No | string | - | Text label for the edge |
224
-
225
- ### Side Values
226
-
227
- | Value | Description |
228
- | -------- | ------------------- |
229
- | `top` | Top edge of node |
230
- | `right` | Right edge of node |
231
- | `bottom` | Bottom edge of node |
232
- | `left` | Left edge of node |
233
-
234
- ### End Shapes
235
-
236
- | Value | Description |
237
- | ------- | ----------------- |
238
- | `none` | No endpoint shape |
239
- | `arrow` | Arrow endpoint |
240
-
241
- ## Colors
242
-
243
- The `canvasColor` type can be specified in two ways:
244
-
245
- ### Hex Colors
246
-
247
- ```json
248
- {
249
- "color": "#FF0000"
250
- }
251
- ```
252
-
253
- ### Preset Colors
254
-
255
- ```json
256
- {
257
- "color": "1"
258
- }
259
- ```
260
-
261
- | Preset | Color |
262
- | ------ | ------ |
263
- | `"1"` | Red |
264
- | `"2"` | Orange |
265
- | `"3"` | Yellow |
266
- | `"4"` | Green |
267
- | `"5"` | Cyan |
268
- | `"6"` | Purple |
269
-
270
- Note: Specific color values for presets are intentionally undefined, allowing applications to use their own brand colors.
271
-
272
- ## Complete Examples
273
-
274
- ### Simple Canvas with Text and Connections
275
-
276
- ```json
277
- {
278
- "nodes": [
279
- {
280
- "id": "8a9b0c1d2e3f4a5b",
281
- "type": "text",
282
- "x": 0,
283
- "y": 0,
284
- "width": 300,
285
- "height": 150,
286
- "text": "# Main Idea\n\nThis is the central concept."
287
- },
288
- {
289
- "id": "1a2b3c4d5e6f7a8b",
290
- "type": "text",
291
- "x": 400,
292
- "y": -100,
293
- "width": 250,
294
- "height": 100,
295
- "text": "## Supporting Point A\n\nDetails here."
296
- },
297
- {
298
- "id": "2b3c4d5e6f7a8b9c",
299
- "type": "text",
300
- "x": 400,
301
- "y": 100,
302
- "width": 250,
303
- "height": 100,
304
- "text": "## Supporting Point B\n\nMore details."
305
- }
306
- ],
307
- "edges": [
308
- {
309
- "id": "3c4d5e6f7a8b9c0d",
310
- "fromNode": "8a9b0c1d2e3f4a5b",
311
- "fromSide": "right",
312
- "toNode": "1a2b3c4d5e6f7a8b",
313
- "toSide": "left"
314
- },
315
- {
316
- "id": "4d5e6f7a8b9c0d1e",
317
- "fromNode": "8a9b0c1d2e3f4a5b",
318
- "fromSide": "right",
319
- "toNode": "2b3c4d5e6f7a8b9c",
320
- "toSide": "left"
321
- }
322
- ]
323
- }
324
- ```
325
-
326
- ### Project Board with Groups
327
-
328
- ```json
329
- {
330
- "nodes": [
331
- {
332
- "id": "5e6f7a8b9c0d1e2f",
333
- "type": "group",
334
- "x": 0,
335
- "y": 0,
336
- "width": 300,
337
- "height": 500,
338
- "label": "To Do",
339
- "color": "1"
340
- },
341
- {
342
- "id": "6f7a8b9c0d1e2f3a",
343
- "type": "group",
344
- "x": 350,
345
- "y": 0,
346
- "width": 300,
347
- "height": 500,
348
- "label": "In Progress",
349
- "color": "3"
350
- },
351
- {
352
- "id": "7a8b9c0d1e2f3a4b",
353
- "type": "group",
354
- "x": 700,
355
- "y": 0,
356
- "width": 300,
357
- "height": 500,
358
- "label": "Done",
359
- "color": "4"
360
- },
361
- {
362
- "id": "8b9c0d1e2f3a4b5c",
363
- "type": "text",
364
- "x": 20,
365
- "y": 50,
366
- "width": 260,
367
- "height": 80,
368
- "text": "## Task 1\n\nImplement feature X"
369
- },
370
- {
371
- "id": "9c0d1e2f3a4b5c6d",
372
- "type": "text",
373
- "x": 370,
374
- "y": 50,
375
- "width": 260,
376
- "height": 80,
377
- "text": "## Task 2\n\nReview PR #123",
378
- "color": "2"
379
- },
380
- {
381
- "id": "0d1e2f3a4b5c6d7e",
382
- "type": "text",
383
- "x": 720,
384
- "y": 50,
385
- "width": 260,
386
- "height": 80,
387
- "text": "## Task 3\n\n~~Setup CI/CD~~"
388
- }
389
- ],
390
- "edges": []
391
- }
392
- ```
393
-
394
- ### Research Canvas with Files and Links
395
-
396
- ```json
397
- {
398
- "nodes": [
399
- {
400
- "id": "1e2f3a4b5c6d7e8f",
401
- "type": "text",
402
- "x": 300,
403
- "y": 200,
404
- "width": 400,
405
- "height": 200,
406
- "text": "# Research Topic\n\n## Key Questions\n\n- How does X affect Y?\n- What are the implications?",
407
- "color": "5"
408
- },
409
- {
410
- "id": "2f3a4b5c6d7e8f9a",
411
- "type": "file",
412
- "x": 0,
413
- "y": 0,
414
- "width": 250,
415
- "height": 150,
416
- "file": "Literature/Paper A.pdf"
417
- },
418
- {
419
- "id": "3a4b5c6d7e8f9a0b",
420
- "type": "file",
421
- "x": 0,
422
- "y": 200,
423
- "width": 250,
424
- "height": 150,
425
- "file": "Notes/Meeting Notes.md",
426
- "subpath": "#Key Insights"
427
- },
428
- {
429
- "id": "4b5c6d7e8f9a0b1c",
430
- "type": "link",
431
- "x": 0,
432
- "y": 400,
433
- "width": 250,
434
- "height": 100,
435
- "url": "https://example.com/research"
436
- },
437
- {
438
- "id": "5c6d7e8f9a0b1c2d",
439
- "type": "file",
440
- "x": 750,
441
- "y": 150,
442
- "width": 300,
443
- "height": 250,
444
- "file": "Attachments/diagram.png"
445
- }
446
- ],
447
- "edges": [
448
- {
449
- "id": "6d7e8f9a0b1c2d3e",
450
- "fromNode": "2f3a4b5c6d7e8f9a",
451
- "fromSide": "right",
452
- "toNode": "1e2f3a4b5c6d7e8f",
453
- "toSide": "left",
454
- "label": "supports"
455
- },
456
- {
457
- "id": "7e8f9a0b1c2d3e4f",
458
- "fromNode": "3a4b5c6d7e8f9a0b",
459
- "fromSide": "right",
460
- "toNode": "1e2f3a4b5c6d7e8f",
461
- "toSide": "left",
462
- "label": "informs"
463
- },
464
- {
465
- "id": "8f9a0b1c2d3e4f5a",
466
- "fromNode": "4b5c6d7e8f9a0b1c",
467
- "fromSide": "right",
468
- "toNode": "1e2f3a4b5c6d7e8f",
469
- "toSide": "left",
470
- "toEnd": "arrow",
471
- "color": "6"
472
- },
473
- {
474
- "id": "9a0b1c2d3e4f5a6b",
475
- "fromNode": "1e2f3a4b5c6d7e8f",
476
- "fromSide": "right",
477
- "toNode": "5c6d7e8f9a0b1c2d",
478
- "toSide": "left",
479
- "label": "visualized by"
480
- }
481
- ]
482
- }
483
- ```
484
-
485
- ### Flowchart
486
-
487
- ```json
488
- {
489
- "nodes": [
490
- {
491
- "id": "a0b1c2d3e4f5a6b7",
492
- "type": "text",
493
- "x": 200,
494
- "y": 0,
495
- "width": 150,
496
- "height": 60,
497
- "text": "**Start**",
498
- "color": "4"
499
- },
500
- {
501
- "id": "b1c2d3e4f5a6b7c8",
502
- "type": "text",
503
- "x": 200,
504
- "y": 100,
505
- "width": 150,
506
- "height": 60,
507
- "text": "Step 1:\nGather data"
508
- },
509
- {
510
- "id": "c2d3e4f5a6b7c8d9",
511
- "type": "text",
512
- "x": 200,
513
- "y": 200,
514
- "width": 150,
515
- "height": 80,
516
- "text": "**Decision**\n\nIs data valid?",
517
- "color": "3"
518
- },
519
- {
520
- "id": "d3e4f5a6b7c8d9e0",
521
- "type": "text",
522
- "x": 400,
523
- "y": 200,
524
- "width": 150,
525
- "height": 60,
526
- "text": "Process data"
527
- },
528
- {
529
- "id": "e4f5a6b7c8d9e0f1",
530
- "type": "text",
531
- "x": 0,
532
- "y": 200,
533
- "width": 150,
534
- "height": 60,
535
- "text": "Request new data",
536
- "color": "1"
537
- },
538
- {
539
- "id": "f5a6b7c8d9e0f1a2",
540
- "type": "text",
541
- "x": 400,
542
- "y": 320,
543
- "width": 150,
544
- "height": 60,
545
- "text": "**End**",
546
- "color": "4"
547
- }
548
- ],
549
- "edges": [
550
- {
551
- "id": "a6b7c8d9e0f1a2b3",
552
- "fromNode": "a0b1c2d3e4f5a6b7",
553
- "fromSide": "bottom",
554
- "toNode": "b1c2d3e4f5a6b7c8",
555
- "toSide": "top"
556
- },
557
- {
558
- "id": "b7c8d9e0f1a2b3c4",
559
- "fromNode": "b1c2d3e4f5a6b7c8",
560
- "fromSide": "bottom",
561
- "toNode": "c2d3e4f5a6b7c8d9",
562
- "toSide": "top"
563
- },
564
- {
565
- "id": "c8d9e0f1a2b3c4d5",
566
- "fromNode": "c2d3e4f5a6b7c8d9",
567
- "fromSide": "right",
568
- "toNode": "d3e4f5a6b7c8d9e0",
569
- "toSide": "left",
570
- "label": "Yes",
571
- "color": "4"
572
- },
573
- {
574
- "id": "d9e0f1a2b3c4d5e6",
575
- "fromNode": "c2d3e4f5a6b7c8d9",
576
- "fromSide": "left",
577
- "toNode": "e4f5a6b7c8d9e0f1",
578
- "toSide": "right",
579
- "label": "No",
580
- "color": "1"
581
- },
582
- {
583
- "id": "e0f1a2b3c4d5e6f7",
584
- "fromNode": "e4f5a6b7c8d9e0f1",
585
- "fromSide": "top",
586
- "fromEnd": "none",
587
- "toNode": "b1c2d3e4f5a6b7c8",
588
- "toSide": "left",
589
- "toEnd": "arrow"
590
- },
591
- {
592
- "id": "f1a2b3c4d5e6f7a8",
593
- "fromNode": "d3e4f5a6b7c8d9e0",
594
- "fromSide": "bottom",
595
- "toNode": "f5a6b7c8d9e0f1a2",
596
- "toSide": "top"
597
- }
598
- ]
599
- }
600
- ```
601
-
602
- ## ID Generation
603
-
604
- Node and edge IDs must be unique strings. Obsidian generates 16-character hexadecimal IDs:
605
-
606
- ```json
607
- "id": "6f0ad84f44ce9c17"
608
- "id": "a3b2c1d0e9f8g7h6"
609
- "id": "1234567890abcdef"
610
- ```
611
-
612
- This format is a 16-character lowercase hex string (64-bit random value).
613
-
614
- ## Layout Guidelines
615
-
616
- ### Positioning
617
-
618
- - Coordinates can be negative (canvas extends infinitely)
619
- - `x` increases to the right
620
- - `y` increases downward
621
- - Position refers to top-left corner of node
622
-
623
- ### Recommended Sizes
624
-
625
- | Node Type | Suggested Width | Suggested Height |
626
- | ------------ | --------------- | ---------------- |
627
- | Small text | 200-300 | 80-150 |
628
- | Medium text | 300-450 | 150-300 |
629
- | Large text | 400-600 | 300-500 |
630
- | File preview | 300-500 | 200-400 |
631
- | Link preview | 250-400 | 100-200 |
632
- | Group | Varies | Varies |
633
-
634
- ### Spacing
635
-
636
- - Leave 20-50px padding inside groups
637
- - Space nodes 50-100px apart for readability
638
- - Align nodes to grid (multiples of 10 or 20) for cleaner layouts
639
-
640
- ## Validation Rules
641
-
642
- 1. All `id` values must be unique across nodes and edges
643
- 2. `fromNode` and `toNode` must reference existing node IDs
644
- 3. Required fields must be present for each node type
645
- 4. `type` must be one of: `text`, `file`, `link`, `group`
646
- 5. `backgroundStyle` must be one of: `cover`, `ratio`, `repeat`
647
- 6. `fromSide`, `toSide` must be one of: `top`, `right`, `bottom`, `left`
648
- 7. `fromEnd`, `toEnd` must be one of: `none`, `arrow`
649
- 8. Color presets must be `"1"` through `"6"` or valid hex color
650
-
651
- ## References
652
-
653
- - [JSON Canvas Spec 1.0](https://jsoncanvas.org/spec/1.0/)
654
- - [JSON Canvas GitHub](https://github.com/obsidianmd/jsoncanvas)