@jayjiang/byoao 1.1.0 → 1.1.2
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.
- package/dist/assets/obsidian-skills/byoao-conventions.md +103 -0
- package/dist/assets/obsidian-skills/defuddle.md +41 -0
- package/dist/assets/obsidian-skills/json-canvas.md +244 -0
- package/dist/assets/obsidian-skills/obsidian-bases.md +497 -0
- package/dist/assets/obsidian-skills/obsidian-cli.md +106 -0
- package/dist/assets/obsidian-skills/obsidian-markdown.md +196 -0
- package/dist/assets/obsidian-skills/vault-thinking.md +40 -0
- package/{src/assets/presets/common/AGENT.md.hbs → dist/assets/presets/common/AGENTS.md.hbs} +11 -15
- package/dist/assets/presets/common/Start Here.md.hbs +137 -0
- package/dist/assets/presets/common/obsidian/core-plugins.json +33 -0
- package/dist/assets/presets/common/obsidian/daily-notes.json +5 -0
- package/dist/assets/presets/common/obsidian/templates.json +3 -0
- package/dist/assets/presets/common/templates/Daily Note.md +19 -0
- package/dist/assets/presets/common/templates/Decision Record.md +32 -0
- package/dist/assets/presets/common/templates/Investigation.md +34 -0
- package/dist/assets/presets/common/templates/Meeting Notes.md +25 -0
- package/dist/assets/presets/minimal/preset.json +28 -0
- package/dist/assets/presets/pm-tpm/agent-section.hbs +15 -0
- package/dist/assets/presets/pm-tpm/preset.json +43 -0
- package/dist/assets/presets/pm-tpm/templates/Feature Doc.md +45 -0
- package/dist/assets/presets/pm-tpm/templates/Sprint Handoff.md +38 -0
- package/dist/assets/skills/ask.md +132 -0
- package/dist/assets/skills/challenge.md +174 -0
- package/dist/assets/skills/connect.md +213 -0
- package/dist/assets/skills/diagnose.md +72 -0
- package/dist/assets/skills/drift.md +223 -0
- package/dist/assets/skills/emerge.md +168 -0
- package/dist/assets/skills/ideas.md +172 -0
- package/dist/assets/skills/organize.md +206 -0
- package/dist/assets/skills/trace.md +156 -0
- package/dist/assets/skills/weave.md +287 -0
- package/dist/assets/skills/wiki.md +227 -0
- package/dist/cli/cli-program.js +1 -1
- package/dist/cli/cli-program.js.map +1 -1
- package/dist/cli/installer.js +37 -2
- package/dist/cli/installer.js.map +1 -1
- package/dist/hooks/__tests__/system-transform.test.js +47 -29
- package/dist/hooks/__tests__/system-transform.test.js.map +1 -1
- package/dist/hooks/system-transform.js +2 -113
- package/dist/hooks/system-transform.js.map +1 -1
- package/dist/index.js +162 -482
- package/dist/index.js.map +1 -1
- package/dist/lib/cjs-modules.js +4 -1
- package/dist/lib/cjs-modules.js.map +1 -1
- package/dist/tools/add-person.js +1 -1
- package/dist/tools/add-person.js.map +1 -1
- package/dist/tools/add-project.js +1 -1
- package/dist/tools/add-project.js.map +1 -1
- package/dist/tools/init-vault.js +1 -1
- package/dist/tools/init-vault.js.map +1 -1
- package/dist/tools/vault-doctor.js +1 -1
- package/dist/tools/vault-doctor.js.map +1 -1
- package/dist/vault/__tests__/create.test.js +23 -23
- package/dist/vault/__tests__/create.test.js.map +1 -1
- package/dist/vault/__tests__/obsidian-cli.test.js +108 -0
- package/dist/vault/__tests__/obsidian-cli.test.js.map +1 -0
- package/dist/vault/__tests__/status.test.js +1 -8
- package/dist/vault/__tests__/status.test.js.map +1 -1
- package/dist/vault/__tests__/vault-detect.test.js +1 -13
- package/dist/vault/__tests__/vault-detect.test.js.map +1 -1
- package/dist/vault/create.js +23 -64
- package/dist/vault/create.js.map +1 -1
- package/dist/vault/doctor.js +15 -6
- package/dist/vault/doctor.js.map +1 -1
- package/dist/vault/manifest.js +1 -1
- package/dist/vault/member.js +2 -2
- package/dist/vault/member.js.map +1 -1
- package/dist/vault/obsidian-cli.js +28 -5
- package/dist/vault/obsidian-cli.js.map +1 -1
- package/dist/vault/project.js +2 -2
- package/dist/vault/project.js.map +1 -1
- package/dist/vault/self-update.js +1 -1
- package/dist/vault/status.js +3 -5
- package/dist/vault/status.js.map +1 -1
- package/dist/vault/upgrade.js +7 -2
- package/dist/vault/upgrade.js.map +1 -1
- package/dist/vault/vault-detect.js +4 -5
- package/dist/vault/vault-detect.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/obsidian-skills/byoao-conventions.md +28 -55
- package/src/assets/obsidian-skills/vault-thinking.md +1 -1
- package/src/assets/presets/common/AGENTS.md.hbs +25 -0
- package/src/assets/presets/common/Start Here.md.hbs +2 -2
- package/src/skills/ask.md +132 -0
- package/src/skills/challenge.md +8 -2
- package/src/skills/connect.md +8 -1
- package/src/skills/diagnose.md +12 -13
- package/src/skills/drift.md +8 -2
- package/src/skills/emerge.md +8 -1
- package/src/skills/ideas.md +9 -3
- package/src/skills/organize.md +3 -4
- package/src/skills/trace.md +10 -3
- package/src/skills/weave.md +84 -79
- package/src/skills/wiki.md +227 -0
- /package/{src → dist}/assets/presets/common/Glossary.md.hbs +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: byoao-conventions
|
|
3
|
+
description: Use when creating or modifying notes in a BYOAO-structured vault. Enforces frontmatter, directory placement, wikilinks, and naming conventions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# BYOAO Document Conventions
|
|
7
|
+
|
|
8
|
+
You MUST follow these conventions when creating or modifying any note in this vault.
|
|
9
|
+
|
|
10
|
+
## Pre-Flight Checklist
|
|
11
|
+
|
|
12
|
+
Before creating any note:
|
|
13
|
+
|
|
14
|
+
1. Read `AGENTS.md` — check the Document Conventions section for vault-specific rules
|
|
15
|
+
2. Check `Knowledge/Glossary.md` — know the domain terminology before writing
|
|
16
|
+
3. Identify the correct template — match your note type to a template below
|
|
17
|
+
4. Verify the target directory — place the file according to its `type`
|
|
18
|
+
|
|
19
|
+
## Creating Notes
|
|
20
|
+
|
|
21
|
+
You MUST use `obsidian create` to create notes in the vault — never use
|
|
22
|
+
file write tools directly. Obsidian CLI ensures the file is tracked by
|
|
23
|
+
Obsidian and templates are applied correctly.
|
|
24
|
+
|
|
25
|
+
When a matching template exists:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
obsidian create name="Feature Name" template="Feature Doc" path="Projects/"
|
|
29
|
+
obsidian create name="Sprint N Handoff" template="Sprint Handoff" path="Sprints/"
|
|
30
|
+
obsidian create name="Meeting Title" template="Meeting Notes"
|
|
31
|
+
obsidian create name="Investigation Title" template="Investigation"
|
|
32
|
+
obsidian create name="Decision Title" template="Decision Record"
|
|
33
|
+
obsidian create name="YYYY-MM-DD" template="Daily Note" path="Daily/"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If no template matches, construct frontmatter manually. `date` MUST be
|
|
37
|
+
today's actual date — never a placeholder, never omitted:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
obsidian create name="Note Title" content="---\ntitle: \"Note Title\"\ntype: reference\nstatus: draft\ndate: 2026-04-02\ntags: []\n---\n\n# Note Title\n" silent
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Required Frontmatter
|
|
44
|
+
|
|
45
|
+
Every note MUST have these fields:
|
|
46
|
+
|
|
47
|
+
| Field | Values |
|
|
48
|
+
|-------|--------|
|
|
49
|
+
| `title` | Descriptive title |
|
|
50
|
+
| `type` | `feature`, `sprint-handoff`, `meeting`, `investigation`, `decision`, `daily`, `reference`, `person` |
|
|
51
|
+
| `status` | `draft`, `active`, `completed`, `archived` |
|
|
52
|
+
| `date` | YYYY-MM-DD |
|
|
53
|
+
| `tags` | Array of relevant tags |
|
|
54
|
+
|
|
55
|
+
Additional fields by type:
|
|
56
|
+
|
|
57
|
+
| type | Additional Fields |
|
|
58
|
+
|------|-------------------|
|
|
59
|
+
| `feature` | `project`, `jira`, `stakeholders`, `priority` |
|
|
60
|
+
| `sprint-handoff` | `sprint`, `sprint-dates`, `jira-board` |
|
|
61
|
+
| `meeting` | `participants`, `meeting-type` |
|
|
62
|
+
| `investigation` | `jira`, `hypothesis` |
|
|
63
|
+
| `decision` | `decision`, `decided-by` |
|
|
64
|
+
| `person` | `team`, `role` |
|
|
65
|
+
|
|
66
|
+
## Directory Placement
|
|
67
|
+
|
|
68
|
+
ALWAYS place files in the directory matching their type. Refer to the Document Conventions section in `AGENTS.md` for the authoritative type-to-directory mapping for this vault.
|
|
69
|
+
|
|
70
|
+
| type | Directory |
|
|
71
|
+
|------|-----------|
|
|
72
|
+
| `feature` | `Projects/` |
|
|
73
|
+
| `sprint-handoff` | `Sprints/` |
|
|
74
|
+
| `daily` | `Daily/` |
|
|
75
|
+
| `reference` | `Knowledge/` |
|
|
76
|
+
| `person` | `People/` |
|
|
77
|
+
| `meeting` | Within relevant project or sprint folder |
|
|
78
|
+
| `investigation` | Within relevant project folder |
|
|
79
|
+
| `decision` | Within relevant project folder |
|
|
80
|
+
|
|
81
|
+
## Wikilink Rules
|
|
82
|
+
|
|
83
|
+
ALWAYS use wikilinks for:
|
|
84
|
+
|
|
85
|
+
- People → `[[Person Name]]`
|
|
86
|
+
- Projects → `[[Project Name]]`
|
|
87
|
+
- Domain terms → check `[[Glossary]]` first, link if present
|
|
88
|
+
- Teams → link to the team index note in `People/`
|
|
89
|
+
|
|
90
|
+
## File Naming
|
|
91
|
+
|
|
92
|
+
- Use Title Case or kebab-case for file names
|
|
93
|
+
- JIRA tickets: use the project key prefix (e.g., `PROJ-1234-Description.md`)
|
|
94
|
+
- No special characters, no leading/trailing spaces
|
|
95
|
+
|
|
96
|
+
## Post-Creation Verification
|
|
97
|
+
|
|
98
|
+
After creating or modifying a note, verify:
|
|
99
|
+
|
|
100
|
+
1. All required frontmatter fields are present and correct
|
|
101
|
+
2. File is in the correct directory for its type
|
|
102
|
+
3. People and project mentions use `[[wikilinks]]`
|
|
103
|
+
4. Domain terms reference `[[Glossary]]`
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: defuddle
|
|
3
|
+
description: Extract clean markdown content from web pages using Defuddle CLI, removing clutter and navigation to save tokens. Use instead of WebFetch when the user provides a URL to read or analyze, for online documentation, articles, blog posts, or any standard web page.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Defuddle
|
|
7
|
+
|
|
8
|
+
Use Defuddle CLI to extract clean readable content from web pages. Prefer over WebFetch for standard web pages — it removes navigation, ads, and clutter, reducing token usage.
|
|
9
|
+
|
|
10
|
+
If not installed: `npm install -g defuddle`
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
Always use `--md` for markdown output:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
defuddle parse <url> --md
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Save to file:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
defuddle parse <url> --md -o content.md
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Extract specific metadata:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
defuddle parse <url> -p title
|
|
30
|
+
defuddle parse <url> -p description
|
|
31
|
+
defuddle parse <url> -p domain
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Output formats
|
|
35
|
+
|
|
36
|
+
| Flag | Format |
|
|
37
|
+
|------|--------|
|
|
38
|
+
| `--md` | Markdown (default choice) |
|
|
39
|
+
| `--json` | JSON with both HTML and markdown |
|
|
40
|
+
| (none) | HTML |
|
|
41
|
+
| `-p <name>` | Specific metadata property |
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: json-canvas
|
|
3
|
+
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.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# JSON Canvas Skill
|
|
7
|
+
|
|
8
|
+
## File Structure
|
|
9
|
+
|
|
10
|
+
A canvas file (`.canvas`) contains two top-level arrays following the [JSON Canvas Spec 1.0](https://jsoncanvas.org/spec/1.0/):
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
{
|
|
14
|
+
"nodes": [],
|
|
15
|
+
"edges": []
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- `nodes` (optional): Array of node objects
|
|
20
|
+
- `edges` (optional): Array of edge objects connecting nodes
|
|
21
|
+
|
|
22
|
+
## Common Workflows
|
|
23
|
+
|
|
24
|
+
### 1. Create a New Canvas
|
|
25
|
+
|
|
26
|
+
1. Create a `.canvas` file with the base structure `{"nodes": [], "edges": []}`
|
|
27
|
+
2. Generate unique 16-character hex IDs for each node (e.g., `"6f0ad84f44ce9c17"`)
|
|
28
|
+
3. Add nodes with required fields: `id`, `type`, `x`, `y`, `width`, `height`
|
|
29
|
+
4. Add edges referencing valid node IDs via `fromNode` and `toNode`
|
|
30
|
+
5. **Validate**: Parse the JSON to confirm it is valid. Verify all `fromNode`/`toNode` values exist in the nodes array
|
|
31
|
+
|
|
32
|
+
### 2. Add a Node to an Existing Canvas
|
|
33
|
+
|
|
34
|
+
1. Read and parse the existing `.canvas` file
|
|
35
|
+
2. Generate a unique ID that does not collide with existing node or edge IDs
|
|
36
|
+
3. Choose position (`x`, `y`) that avoids overlapping existing nodes (leave 50-100px spacing)
|
|
37
|
+
4. Append the new node object to the `nodes` array
|
|
38
|
+
5. Optionally add edges connecting the new node to existing nodes
|
|
39
|
+
6. **Validate**: Confirm all IDs are unique and all edge references resolve to existing nodes
|
|
40
|
+
|
|
41
|
+
### 3. Connect Two Nodes
|
|
42
|
+
|
|
43
|
+
1. Identify the source and target node IDs
|
|
44
|
+
2. Generate a unique edge ID
|
|
45
|
+
3. Set `fromNode` and `toNode` to the source and target IDs
|
|
46
|
+
4. Optionally set `fromSide`/`toSide` (top, right, bottom, left) for anchor points
|
|
47
|
+
5. Optionally set `label` for descriptive text on the edge
|
|
48
|
+
6. Append the edge to the `edges` array
|
|
49
|
+
7. **Validate**: Confirm both `fromNode` and `toNode` reference existing node IDs
|
|
50
|
+
|
|
51
|
+
### 4. Edit an Existing Canvas
|
|
52
|
+
|
|
53
|
+
1. Read and parse the `.canvas` file as JSON
|
|
54
|
+
2. Locate the target node or edge by `id`
|
|
55
|
+
3. Modify the desired attributes (text, position, color, etc.)
|
|
56
|
+
4. Write the updated JSON back to the file
|
|
57
|
+
5. **Validate**: Re-check all ID uniqueness and edge reference integrity after editing
|
|
58
|
+
|
|
59
|
+
## Nodes
|
|
60
|
+
|
|
61
|
+
Nodes are objects placed on the canvas. Array order determines z-index: first node = bottom layer, last node = top layer.
|
|
62
|
+
|
|
63
|
+
### Generic Node Attributes
|
|
64
|
+
|
|
65
|
+
| Attribute | Required | Type | Description |
|
|
66
|
+
|-----------|----------|------|-------------|
|
|
67
|
+
| `id` | Yes | string | Unique 16-char hex identifier |
|
|
68
|
+
| `type` | Yes | string | `text`, `file`, `link`, or `group` |
|
|
69
|
+
| `x` | Yes | integer | X position in pixels |
|
|
70
|
+
| `y` | Yes | integer | Y position in pixels |
|
|
71
|
+
| `width` | Yes | integer | Width in pixels |
|
|
72
|
+
| `height` | Yes | integer | Height in pixels |
|
|
73
|
+
| `color` | No | canvasColor | Preset `"1"`-`"6"` or hex (e.g., `"#FF0000"`) |
|
|
74
|
+
|
|
75
|
+
### Text Nodes
|
|
76
|
+
|
|
77
|
+
| Attribute | Required | Type | Description |
|
|
78
|
+
|-----------|----------|------|-------------|
|
|
79
|
+
| `text` | Yes | string | Plain text with Markdown syntax |
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"id": "6f0ad84f44ce9c17",
|
|
84
|
+
"type": "text",
|
|
85
|
+
"x": 0,
|
|
86
|
+
"y": 0,
|
|
87
|
+
"width": 400,
|
|
88
|
+
"height": 200,
|
|
89
|
+
"text": "# Hello World\n\nThis is **Markdown** content."
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Newline pitfall**: Use `\n` for line breaks in JSON strings. Do **not** use the literal `\\n` -- Obsidian renders that as the characters `\` and `n`.
|
|
94
|
+
|
|
95
|
+
### File Nodes
|
|
96
|
+
|
|
97
|
+
| Attribute | Required | Type | Description |
|
|
98
|
+
|-----------|----------|------|-------------|
|
|
99
|
+
| `file` | Yes | string | Path to file within the system |
|
|
100
|
+
| `subpath` | No | string | Link to heading or block (starts with `#`) |
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"id": "a1b2c3d4e5f67890",
|
|
105
|
+
"type": "file",
|
|
106
|
+
"x": 500,
|
|
107
|
+
"y": 0,
|
|
108
|
+
"width": 400,
|
|
109
|
+
"height": 300,
|
|
110
|
+
"file": "Attachments/diagram.png"
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Link Nodes
|
|
115
|
+
|
|
116
|
+
| Attribute | Required | Type | Description |
|
|
117
|
+
|-----------|----------|------|-------------|
|
|
118
|
+
| `url` | Yes | string | External URL |
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"id": "c3d4e5f678901234",
|
|
123
|
+
"type": "link",
|
|
124
|
+
"x": 1000,
|
|
125
|
+
"y": 0,
|
|
126
|
+
"width": 400,
|
|
127
|
+
"height": 200,
|
|
128
|
+
"url": "https://obsidian.md"
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Group Nodes
|
|
133
|
+
|
|
134
|
+
Groups are visual containers for organizing other nodes. Position child nodes inside the group's bounds.
|
|
135
|
+
|
|
136
|
+
| Attribute | Required | Type | Description |
|
|
137
|
+
|-----------|----------|------|-------------|
|
|
138
|
+
| `label` | No | string | Text label for the group |
|
|
139
|
+
| `background` | No | string | Path to background image |
|
|
140
|
+
| `backgroundStyle` | No | string | `cover`, `ratio`, or `repeat` |
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"id": "d4e5f6789012345a",
|
|
145
|
+
"type": "group",
|
|
146
|
+
"x": -50,
|
|
147
|
+
"y": -50,
|
|
148
|
+
"width": 1000,
|
|
149
|
+
"height": 600,
|
|
150
|
+
"label": "Project Overview",
|
|
151
|
+
"color": "4"
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Edges
|
|
156
|
+
|
|
157
|
+
Edges connect nodes via `fromNode` and `toNode` IDs.
|
|
158
|
+
|
|
159
|
+
| Attribute | Required | Type | Default | Description |
|
|
160
|
+
|-----------|----------|------|---------|-------------|
|
|
161
|
+
| `id` | Yes | string | - | Unique identifier |
|
|
162
|
+
| `fromNode` | Yes | string | - | Source node ID |
|
|
163
|
+
| `fromSide` | No | string | - | `top`, `right`, `bottom`, or `left` |
|
|
164
|
+
| `fromEnd` | No | string | `none` | `none` or `arrow` |
|
|
165
|
+
| `toNode` | Yes | string | - | Target node ID |
|
|
166
|
+
| `toSide` | No | string | - | `top`, `right`, `bottom`, or `left` |
|
|
167
|
+
| `toEnd` | No | string | `arrow` | `none` or `arrow` |
|
|
168
|
+
| `color` | No | canvasColor | - | Line color |
|
|
169
|
+
| `label` | No | string | - | Text label |
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
{
|
|
173
|
+
"id": "0123456789abcdef",
|
|
174
|
+
"fromNode": "6f0ad84f44ce9c17",
|
|
175
|
+
"fromSide": "right",
|
|
176
|
+
"toNode": "a1b2c3d4e5f67890",
|
|
177
|
+
"toSide": "left",
|
|
178
|
+
"toEnd": "arrow",
|
|
179
|
+
"label": "leads to"
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Colors
|
|
184
|
+
|
|
185
|
+
The `canvasColor` type accepts either a hex string or a preset number:
|
|
186
|
+
|
|
187
|
+
| Preset | Color |
|
|
188
|
+
|--------|-------|
|
|
189
|
+
| `"1"` | Red |
|
|
190
|
+
| `"2"` | Orange |
|
|
191
|
+
| `"3"` | Yellow |
|
|
192
|
+
| `"4"` | Green |
|
|
193
|
+
| `"5"` | Cyan |
|
|
194
|
+
| `"6"` | Purple |
|
|
195
|
+
|
|
196
|
+
Preset color values are intentionally undefined -- applications use their own brand colors.
|
|
197
|
+
|
|
198
|
+
## ID Generation
|
|
199
|
+
|
|
200
|
+
Generate 16-character lowercase hexadecimal strings (64-bit random value):
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
"6f0ad84f44ce9c17"
|
|
204
|
+
"a3b2c1d0e9f8a7b6"
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Layout Guidelines
|
|
208
|
+
|
|
209
|
+
- Coordinates can be negative (canvas extends infinitely)
|
|
210
|
+
- `x` increases right, `y` increases down; position is the top-left corner
|
|
211
|
+
- Space nodes 50-100px apart; leave 20-50px padding inside groups
|
|
212
|
+
- Align to grid (multiples of 10 or 20) for cleaner layouts
|
|
213
|
+
|
|
214
|
+
| Node Type | Suggested Width | Suggested Height |
|
|
215
|
+
|-----------|-----------------|------------------|
|
|
216
|
+
| Small text | 200-300 | 80-150 |
|
|
217
|
+
| Medium text | 300-450 | 150-300 |
|
|
218
|
+
| Large text | 400-600 | 300-500 |
|
|
219
|
+
| File preview | 300-500 | 200-400 |
|
|
220
|
+
| Link preview | 250-400 | 100-200 |
|
|
221
|
+
|
|
222
|
+
## Validation Checklist
|
|
223
|
+
|
|
224
|
+
After creating or editing a canvas file, verify:
|
|
225
|
+
|
|
226
|
+
1. All `id` values are unique across both nodes and edges
|
|
227
|
+
2. Every `fromNode` and `toNode` references an existing node ID
|
|
228
|
+
3. Required fields are present for each node type (`text` for text nodes, `file` for file nodes, `url` for link nodes)
|
|
229
|
+
4. `type` is one of: `text`, `file`, `link`, `group`
|
|
230
|
+
5. `fromSide`/`toSide` values are one of: `top`, `right`, `bottom`, `left`
|
|
231
|
+
6. `fromEnd`/`toEnd` values are one of: `none`, `arrow`
|
|
232
|
+
7. Color presets are `"1"` through `"6"` or valid hex (e.g., `"#FF0000"`)
|
|
233
|
+
8. JSON is valid and parseable
|
|
234
|
+
|
|
235
|
+
If validation fails, check for duplicate IDs, dangling edge references, or malformed JSON strings (especially unescaped newlines in text content).
|
|
236
|
+
|
|
237
|
+
## Complete Examples
|
|
238
|
+
|
|
239
|
+
See [references/EXAMPLES.md](references/EXAMPLES.md) for full canvas examples including mind maps, project boards, research canvases, and flowcharts.
|
|
240
|
+
|
|
241
|
+
## References
|
|
242
|
+
|
|
243
|
+
- [JSON Canvas Spec 1.0](https://jsoncanvas.org/spec/1.0/)
|
|
244
|
+
- [JSON Canvas GitHub](https://github.com/obsidianmd/jsoncanvas)
|