@orderful/droid 0.47.0 → 0.48.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.
- package/.claude-plugin/plugin.json +2 -0
- package/CHANGELOG.md +10 -0
- package/dist/tools/brain/.claude-plugin/plugin.json +1 -1
- package/dist/tools/brain/TOOL.yaml +1 -1
- package/dist/tools/brain/skills/brain/SKILL.md +3 -1
- package/dist/tools/brain/skills/brain/references/workflows.md +4 -2
- package/dist/tools/comments/.claude-plugin/plugin.json +1 -1
- package/dist/tools/comments/TOOL.yaml +1 -1
- package/dist/tools/comments/skills/comments/SKILL.md +14 -0
- package/dist/tools/excalidraw/.claude-plugin/plugin.json +22 -0
- package/dist/tools/excalidraw/TOOL.yaml +16 -0
- package/dist/tools/excalidraw/commands/excalidraw.md +34 -0
- package/dist/tools/excalidraw/skills/excalidraw/SKILL.md +100 -0
- package/dist/tools/excalidraw/skills/excalidraw/references/element-templates.md +336 -0
- package/dist/tools/excalidraw/skills/excalidraw/references/format-spec.md +102 -0
- package/dist/tools/plan/.claude-plugin/plugin.json +1 -1
- package/dist/tools/plan/TOOL.yaml +1 -1
- package/dist/tools/plan/skills/plan/SKILL.md +2 -0
- package/dist/tools/plan/skills/plan/references/workflows.md +11 -2
- package/package.json +1 -1
- package/src/tools/brain/.claude-plugin/plugin.json +1 -1
- package/src/tools/brain/TOOL.yaml +1 -1
- package/src/tools/brain/skills/brain/SKILL.md +3 -1
- package/src/tools/brain/skills/brain/references/workflows.md +4 -2
- package/src/tools/comments/.claude-plugin/plugin.json +1 -1
- package/src/tools/comments/TOOL.yaml +1 -1
- package/src/tools/comments/skills/comments/SKILL.md +14 -0
- package/src/tools/excalidraw/.claude-plugin/plugin.json +22 -0
- package/src/tools/excalidraw/TOOL.yaml +16 -0
- package/src/tools/excalidraw/commands/excalidraw.md +34 -0
- package/src/tools/excalidraw/skills/excalidraw/SKILL.md +100 -0
- package/src/tools/excalidraw/skills/excalidraw/references/element-templates.md +336 -0
- package/src/tools/excalidraw/skills/excalidraw/references/format-spec.md +102 -0
- package/src/tools/plan/.claude-plugin/plugin.json +1 -1
- package/src/tools/plan/TOOL.yaml +1 -1
- package/src/tools/plan/skills/plan/SKILL.md +2 -0
- package/src/tools/plan/skills/plan/references/workflows.md +11 -2
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Excalidraw File Format Specification
|
|
2
|
+
|
|
3
|
+
## Important: Use `.excalidraw.md`, NOT `.excalidraw`
|
|
4
|
+
|
|
5
|
+
The Obsidian Excalidraw plugin uses `.excalidraw.md` files (a markdown wrapper format). Plain `.excalidraw` JSON opens in "compatibility mode" with limited functionality.
|
|
6
|
+
|
|
7
|
+
## YAML Frontmatter
|
|
8
|
+
|
|
9
|
+
The file MUST start with this frontmatter:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
---
|
|
13
|
+
excalidraw-plugin: parsed
|
|
14
|
+
---
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The `excalidraw-plugin: parsed` key is mandatory. Without it, Obsidian won't recognise the file as an Excalidraw drawing.
|
|
18
|
+
|
|
19
|
+
## Full File Structure
|
|
20
|
+
|
|
21
|
+
````markdown
|
|
22
|
+
---
|
|
23
|
+
excalidraw-plugin: parsed
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# Drawing
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"type": "excalidraw",
|
|
31
|
+
"version": 2,
|
|
32
|
+
"source": "https://excalidraw.com",
|
|
33
|
+
"elements": [],
|
|
34
|
+
"appState": {
|
|
35
|
+
"gridSize": null,
|
|
36
|
+
"viewBackgroundColor": "#ffffff"
|
|
37
|
+
},
|
|
38
|
+
"files": {}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
%%
|
|
43
|
+
# Drawing
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"type": "excalidraw",
|
|
47
|
+
"version": 2,
|
|
48
|
+
"source": "https://excalidraw.com",
|
|
49
|
+
"elements": [],
|
|
50
|
+
"appState": {
|
|
51
|
+
"gridSize": null,
|
|
52
|
+
"viewBackgroundColor": "#ffffff"
|
|
53
|
+
},
|
|
54
|
+
"files": {}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
%%
|
|
58
|
+
````
|
|
59
|
+
|
|
60
|
+
## Structure Explained
|
|
61
|
+
|
|
62
|
+
The JSON appears **twice** in the file:
|
|
63
|
+
|
|
64
|
+
1. **Visible block** — inside a fenced ` ```json ` code block after `# Drawing`. This is what shows in Obsidian's markdown preview.
|
|
65
|
+
2. **Plugin working copy** — the same JSON repeated inside `%% ... %%` comment markers. This is what the Excalidraw plugin uses to render the drawing.
|
|
66
|
+
|
|
67
|
+
**Both blocks must contain identical JSON.** The plugin reads from the `%%` block when rendering; the visible block is for human reference.
|
|
68
|
+
|
|
69
|
+
## Top-Level JSON Schema
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"type": "excalidraw",
|
|
74
|
+
"version": 2,
|
|
75
|
+
"source": "https://excalidraw.com",
|
|
76
|
+
"elements": [ /* all drawing elements go here */ ],
|
|
77
|
+
"appState": {
|
|
78
|
+
"gridSize": null,
|
|
79
|
+
"viewBackgroundColor": "#ffffff"
|
|
80
|
+
},
|
|
81
|
+
"files": {}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
| Field | Value | Notes |
|
|
86
|
+
|-------|-------|-------|
|
|
87
|
+
| `type` | `"excalidraw"` | Always this string |
|
|
88
|
+
| `version` | `2` | Always 2 |
|
|
89
|
+
| `source` | `"https://excalidraw.com"` | Always this URL |
|
|
90
|
+
| `elements` | array | All drawing elements |
|
|
91
|
+
| `appState.gridSize` | `null` | No grid by default |
|
|
92
|
+
| `appState.viewBackgroundColor` | `"#ffffff"` | White background |
|
|
93
|
+
| `files` | `{}` | Empty unless images embedded |
|
|
94
|
+
|
|
95
|
+
## What Happens If Format Is Wrong
|
|
96
|
+
|
|
97
|
+
| Problem | Result |
|
|
98
|
+
|---------|--------|
|
|
99
|
+
| Missing `excalidraw-plugin: parsed` frontmatter | File opens as plain markdown, not as a drawing |
|
|
100
|
+
| JSON only in visible block, missing `%%` block | Drawing renders as JSON text only |
|
|
101
|
+
| JSON mismatch between blocks | Plugin uses `%%` block; visible block shows stale content |
|
|
102
|
+
| Using `.excalidraw` instead of `.excalidraw.md` | Opens in compatibility mode with limited functionality |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "droid-plan",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Task-scoped planning with portable, structured plans. Use when planning implementation for a PR, ticket, or small feature. User prompts like 'let's plan this', 'can we start a plan', 'think through the implementation'.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Orderful",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
name: plan
|
|
2
2
|
description: "Task-scoped planning with portable, structured plans. Use when planning implementation for a PR, ticket, or small feature. User prompts like 'let's plan this', 'can we start a plan', 'think through the implementation'."
|
|
3
|
-
version: 0.1.
|
|
3
|
+
version: 0.1.6
|
|
4
4
|
status: alpha
|
|
5
5
|
|
|
6
6
|
includes:
|
|
@@ -74,6 +74,8 @@ Example: `/plan new auth-refactor -- we must stay backward compatible with v1 cl
|
|
|
74
74
|
2. Address each, respond with `> @{user_mention}`
|
|
75
75
|
3. Update the doc
|
|
76
76
|
|
|
77
|
+
With `--holistic`: group related comments into thematic clusters and respond cohesively to each cluster instead of one-by-one. Unrelated comments still get individual responses. See `comments` skill for full holistic mode behaviour.
|
|
78
|
+
|
|
77
79
|
## `/plan cleanup`
|
|
78
80
|
|
|
79
81
|
**Trigger:** `/plan cleanup` or user says "clean up", "lock in decisions", "resolve these threads"
|
|
@@ -126,6 +126,8 @@ Store as active plan for session.
|
|
|
126
126
|
|
|
127
127
|
## `/plan check`
|
|
128
128
|
|
|
129
|
+
Supports `--holistic` flag for cohesive responses to related comments.
|
|
130
|
+
|
|
129
131
|
### Step 1: Load Active Plan
|
|
130
132
|
|
|
131
133
|
If no active plan, prompt to search for one.
|
|
@@ -138,13 +140,20 @@ Search for `> @droid` lines (user comments addressed to AI):
|
|
|
138
140
|
grep -n "> @droid" {plan_path}
|
|
139
141
|
```
|
|
140
142
|
|
|
141
|
-
### Step 3: Address
|
|
143
|
+
### Step 3: Address Comments
|
|
142
144
|
|
|
143
|
-
For each comment:
|
|
145
|
+
**Default mode:** For each comment:
|
|
144
146
|
|
|
145
147
|
1. **Read context** - surrounding lines, section it's in
|
|
146
148
|
2. **Respond** - add response below with `> @{user_mention}`
|
|
147
149
|
|
|
150
|
+
**Holistic mode (`--holistic`):**
|
|
151
|
+
|
|
152
|
+
1. **Read all comments first** with their surrounding context
|
|
153
|
+
2. **Group related comments** — identify thematic clusters (comments exploring the same question, building on each other, or pulling in different directions on the same topic)
|
|
154
|
+
3. **For each cluster:** respond once at the last comment in the group with a cohesive answer that addresses the whole cluster. Earlier comments get a brief forward-reference: `> @{user_mention} Addressed below with the related comments.`
|
|
155
|
+
4. **Standalone comments:** respond individually as normal
|
|
156
|
+
|
|
148
157
|
### Step 4: Update Doc
|
|
149
158
|
|
|
150
159
|
Write changes back to plan file.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "droid-brain",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Your scratchpad (or brain) - a collaborative space for planning and research. Create docs with /brain plan, /brain research, or /brain review. Use @mentions for async discussion. Docs persist across sessions.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Orderful",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
name: brain
|
|
2
2
|
description: "Your scratchpad (or brain) - a collaborative space for planning and research. Create docs with /brain plan, /brain research, or /brain review. Use @mentions for async discussion. Docs persist across sessions."
|
|
3
|
-
version: 0.4.
|
|
3
|
+
version: 0.4.2
|
|
4
4
|
status: beta
|
|
5
5
|
|
|
6
6
|
includes:
|
|
@@ -121,10 +121,12 @@ Full procedure: `references/workflows.md` § Adding
|
|
|
121
121
|
|
|
122
122
|
## Checking Comments
|
|
123
123
|
|
|
124
|
-
**Trigger:** `/brain check`
|
|
124
|
+
**Trigger:** `/brain check` or `/brain check --holistic`
|
|
125
125
|
|
|
126
126
|
Find `> @droid` comments in active doc and address each. Preserve original comment, add response below with `> @{user_mention}`.
|
|
127
127
|
|
|
128
|
+
With `--holistic`: group related comments into thematic clusters and respond cohesively to each cluster instead of one-by-one. Unrelated comments still get individual responses. See `comments` skill for full holistic mode behaviour.
|
|
129
|
+
|
|
128
130
|
Full procedure: `references/workflows.md` § Checking
|
|
129
131
|
|
|
130
132
|
## Cleaning Up Resolved Threads
|
|
@@ -150,9 +150,11 @@ Detailed procedures for each brain operation.
|
|
|
150
150
|
|
|
151
151
|
## Checking
|
|
152
152
|
|
|
153
|
-
**Trigger:** `/brain check`
|
|
153
|
+
**Trigger:** `/brain check` or `/brain check --holistic`
|
|
154
154
|
|
|
155
|
-
**Prefer `comments` skill:** If the `comments` skill is installed, use `/comments check` instead - it provides better comment detection, cleanup workflows, and supports the full `@droid`/`@user` convention. The workflow below is a fallback for basic comment handling.
|
|
155
|
+
**Prefer `comments` skill:** If the `comments` skill is installed, use `/comments check` (or `/comments check --holistic`) instead - it provides better comment detection, cleanup workflows, and supports the full `@droid`/`@user` convention. The workflow below is a fallback for basic comment handling.
|
|
156
|
+
|
|
157
|
+
**Holistic mode (`--holistic`):** Pass the flag through to the comments skill. If using the fallback workflow below, apply the same principle: after step 4 (finding all comments), group related comments into thematic clusters and respond cohesively to each cluster at the last comment in the group. Unrelated comments get individual responses as normal.
|
|
156
158
|
|
|
157
159
|
**Directionality:** The @mention is the **target**, not the author:
|
|
158
160
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "droid-comments",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "Enable inline conversations using @droid/@user markers. Tag @droid to ask the AI, AI responds with @{your-name}. Use /comments check to address markers, /comments cleanup to remove resolved threads. Ideal for code review notes and async collaboration.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Orderful",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
name: comments
|
|
2
2
|
description: "Enable inline conversations using @droid/@user markers. Tag @droid to ask the AI, AI responds with @{your-name}. Use /comments check to address markers, /comments cleanup to remove resolved threads. Ideal for code review notes and async collaboration."
|
|
3
|
-
version: 0.3.
|
|
3
|
+
version: 0.3.7
|
|
4
4
|
status: beta
|
|
5
5
|
|
|
6
6
|
includes:
|
|
@@ -82,6 +82,7 @@ When you find a `@droid` marker:
|
|
|
82
82
|
|
|
83
83
|
- `/comments check` - Scan for AI markers and address each one
|
|
84
84
|
- `/comments check {path}` - Scope to specific file or directory
|
|
85
|
+
- `/comments check --holistic` - Read all comments, then respond cohesively to related clusters
|
|
85
86
|
- `/comments cleanup` - Find resolved comment threads and remove them
|
|
86
87
|
|
|
87
88
|
## Behavior
|
|
@@ -101,6 +102,8 @@ When you find a `@droid` marker:
|
|
|
101
102
|
|
|
102
103
|
#### Pass 2: Respond & Write
|
|
103
104
|
|
|
105
|
+
**Default mode (no flag):** Respond to each comment individually, in order.
|
|
106
|
+
|
|
104
107
|
1. For each comment, determine intent:
|
|
105
108
|
- **Action request** ("do X", "add Y", "fix Z") → Execute the action
|
|
106
109
|
- **Question** ("what do you think", "should we") → Respond with `> @{user_mention}`
|
|
@@ -109,6 +112,17 @@ When you find a `@droid` marker:
|
|
|
109
112
|
- If `preserve_comments: true` → Keep the original `@droid` comment (add response below it)
|
|
110
113
|
- If `preserve_comments: false` → Remove the original comment after addressing
|
|
111
114
|
|
|
115
|
+
**Holistic mode (`--holistic`):** Respond cohesively to related comments instead of one-by-one.
|
|
116
|
+
|
|
117
|
+
1. **Group related comments** — identify thematic clusters (comments exploring the same question, building on each other, or pulling in different directions on the same topic). Comments that are unrelated stay standalone.
|
|
118
|
+
2. **For each cluster of related comments:**
|
|
119
|
+
- Synthesize the thread of thought — what is the user working through?
|
|
120
|
+
- Respond once at the **last comment in the cluster** with a cohesive answer that addresses the whole group
|
|
121
|
+
- Earlier comments in the cluster get a brief forward-reference: `> @{user_mention} Addressed below with the related comments.`
|
|
122
|
+
- The synthesized response should feel like engaging with a complete idea, not stitching together fragments
|
|
123
|
+
3. **For standalone (unrelated) comments:** Respond individually, same as default mode
|
|
124
|
+
4. **Handle `preserve_comments`** the same as default mode
|
|
125
|
+
|
|
112
126
|
### On `/comments cleanup`:
|
|
113
127
|
|
|
114
128
|
1. Find AI tag and `> @{user_mention}` pairs where conversation appears resolved
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "droid-excalidraw",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Generate Excalidraw diagrams from conversation context and save them to your Obsidian brain vault. Requires brain tool configured, Obsidian, and the Excalidraw plugin.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Orderful",
|
|
7
|
+
"url": "https://github.com/orderful"
|
|
8
|
+
},
|
|
9
|
+
"repository": "https://github.com/orderful/droid",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"droid",
|
|
13
|
+
"ai",
|
|
14
|
+
"excalidraw"
|
|
15
|
+
],
|
|
16
|
+
"skills": [
|
|
17
|
+
"./skills/excalidraw/SKILL.md"
|
|
18
|
+
],
|
|
19
|
+
"commands": [
|
|
20
|
+
"./commands/excalidraw.md"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: excalidraw
|
|
2
|
+
description: "Generate Excalidraw diagrams from conversation context and save them to your Obsidian brain vault. Requires brain tool configured, Obsidian, and the Excalidraw plugin."
|
|
3
|
+
version: 0.1.0
|
|
4
|
+
status: experimental
|
|
5
|
+
|
|
6
|
+
includes:
|
|
7
|
+
skills:
|
|
8
|
+
- name: excalidraw
|
|
9
|
+
required: true
|
|
10
|
+
commands:
|
|
11
|
+
- name: excalidraw
|
|
12
|
+
is_alias: false
|
|
13
|
+
agents: []
|
|
14
|
+
|
|
15
|
+
dependencies:
|
|
16
|
+
- brain
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: excalidraw
|
|
3
|
+
description: "Generate Excalidraw diagrams in your Obsidian brain vault"
|
|
4
|
+
argument-hint: "[{description} | check]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /excalidraw
|
|
8
|
+
|
|
9
|
+
**User invoked:** `/excalidraw $ARGUMENTS`
|
|
10
|
+
|
|
11
|
+
**Your task:** Invoke the **excalidraw skill** with these arguments.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/excalidraw {description} # Generate a new diagram from context
|
|
17
|
+
/excalidraw check # Review changes in the active drawing
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Examples
|
|
21
|
+
|
|
22
|
+
- `/excalidraw flow chart of the auth system` → Generate an auth flow diagram
|
|
23
|
+
- `/excalidraw architecture for the orders service` → Generate a system architecture diagram
|
|
24
|
+
- `/excalidraw ER diagram for orders and products` → Generate an entity relationship diagram
|
|
25
|
+
- `/excalidraw check` → Read the active drawing and describe what's in it
|
|
26
|
+
|
|
27
|
+
## Notes
|
|
28
|
+
|
|
29
|
+
- Diagrams are saved to your Obsidian brain vault as `.excalidraw.md` files
|
|
30
|
+
- Requires the brain tool configured with a `brain_dir`
|
|
31
|
+
- Requires Obsidian with the Excalidraw plugin installed
|
|
32
|
+
- See the **excalidraw skill** for complete documentation
|
|
33
|
+
|
|
34
|
+
**Reserved keywords:** `check`
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: excalidraw
|
|
3
|
+
description: "Generate Excalidraw diagrams from conversation context and write them to the Obsidian brain vault. Use when user says 'draw this', 'diagram this flow', 'visualize this architecture', 'sketch this out', or '/excalidraw'. Also '/excalidraw check' to review changes in the active drawing."
|
|
4
|
+
argument-hint: "[{description} | check]"
|
|
5
|
+
allowed-tools: [Read, Write, Glob, Bash]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Excalidraw
|
|
9
|
+
|
|
10
|
+
Generate `.excalidraw.md` diagrams from conversation context — architecture diagrams, flow charts, system overviews, entity relationships. Files land in the brain vault and open directly in Obsidian's Excalidraw plugin.
|
|
11
|
+
|
|
12
|
+
## Hard Dependencies
|
|
13
|
+
|
|
14
|
+
This tool requires **all three** of the following:
|
|
15
|
+
|
|
16
|
+
| Dependency | Why |
|
|
17
|
+
|-----------|-----|
|
|
18
|
+
| **brain tool configured** | Uses `brain_dir` for file placement |
|
|
19
|
+
| **Obsidian** | Files use `.excalidraw.md` — Obsidian-specific format |
|
|
20
|
+
| **Excalidraw plugin for Obsidian** | Required to render `.excalidraw.md` files |
|
|
21
|
+
|
|
22
|
+
**Dependency check (run first, every time):**
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
droid config --get tools.brain
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Parse the JSON output. If `brain_dir` is missing or empty, **stop and inform the user:**
|
|
29
|
+
|
|
30
|
+
> The excalidraw tool requires the brain tool to be configured with a `brain_dir`. Run `droid config --set tools.brain.brain_dir=/path/to/vault` to configure it. You also need Obsidian with the Excalidraw plugin installed to open the generated files.
|
|
31
|
+
|
|
32
|
+
Do not proceed until `brain_dir` is confirmed.
|
|
33
|
+
|
|
34
|
+
## Commands
|
|
35
|
+
|
|
36
|
+
**Reserved keywords:** `check`
|
|
37
|
+
|
|
38
|
+
| Command | Action |
|
|
39
|
+
|---------|--------|
|
|
40
|
+
| `/excalidraw {description}` | Generate a new diagram from conversation context |
|
|
41
|
+
| `/excalidraw check` | Review changes in the active drawing |
|
|
42
|
+
|
|
43
|
+
## `/excalidraw {description}`
|
|
44
|
+
|
|
45
|
+
1. **Check dependencies** — run `droid config --get tools.brain`, abort if `brain_dir` not set
|
|
46
|
+
2. **Analyse context** — read the conversation to understand what to diagram. If unclear, ask what the user wants visualised
|
|
47
|
+
3. **Pick a layout style** — flow chart, architecture, entity relationship, or concept map (see `references/element-templates.md` § Layout Styles)
|
|
48
|
+
4. **Propose colour assignments** — before generating, present the user with a short table mapping each colour to a logical group in the diagram (e.g., "Blue = API services, Green = data stores, Orange = external systems"). Ask if they'd like to adjust. This ensures the legend is meaningful, not arbitrary.
|
|
49
|
+
5. **Determine file placement:**
|
|
50
|
+
- If there's an active brain doc in the session, place the `.excalidraw.md` next to it (same directory, matching name prefix)
|
|
51
|
+
- Otherwise, place in `{brain_dir}/0-Inbox/diagrams/`
|
|
52
|
+
6. **Create the target directory** if it doesn't exist:
|
|
53
|
+
```bash
|
|
54
|
+
mkdir -p "{target_directory}"
|
|
55
|
+
```
|
|
56
|
+
7. **Generate the `.excalidraw.md` file** — see `references/format-spec.md` for the exact file format, `references/element-templates.md` for element JSON templates and the colour palette. **Always include a colour legend** in the bottom-left corner of the canvas (see `references/element-templates.md` § Colour Legend)
|
|
57
|
+
8. **Write the file** using the Write tool
|
|
58
|
+
9. **Emit an Obsidian link:**
|
|
59
|
+
```
|
|
60
|
+
obsidian://open?vault={vault_name}&file={url-encoded-relative-path}
|
|
61
|
+
```
|
|
62
|
+
Where `vault_name` = last path component of `brain_dir` (strip trailing slashes), and `relative_path` is the file path relative to `brain_dir`.
|
|
63
|
+
|
|
64
|
+
## `/excalidraw check`
|
|
65
|
+
|
|
66
|
+
1. **Find the active drawing** — the most recently discussed or generated `.excalidraw.md` file in the session. If none, search `{brain_dir}` for recently modified `.excalidraw.md` files and ask which one
|
|
67
|
+
2. **Read the file** using the Read tool and parse the JSON from the `%%` block (that's the plugin's working copy)
|
|
68
|
+
3. **Extract all elements** and build a mental model of the diagram:
|
|
69
|
+
- List all boxes/rectangles with their text content and colours
|
|
70
|
+
- List all arrows and what they connect
|
|
71
|
+
- List all standalone text labels
|
|
72
|
+
- Note spatial grouping (what's near what)
|
|
73
|
+
4. **Summarise what you see** — describe the diagram in plain language
|
|
74
|
+
5. **If you generated the original:** compare against what you wrote and call out what the user added, moved, removed, or changed
|
|
75
|
+
6. **Offer next steps:** add more elements, reflect changes into a brain doc, or flesh out specific elements
|
|
76
|
+
|
|
77
|
+
**Tips for Check:**
|
|
78
|
+
- Focus on content and relationships, not pixel positions
|
|
79
|
+
- Call out new elements by name: "You added a 'Redis Cache' box between the API and DB"
|
|
80
|
+
- If the user added sticky notes, treat them like comments — respond to them
|
|
81
|
+
- If the diagram diverged significantly, offer to regenerate with the new structure as baseline
|
|
82
|
+
|
|
83
|
+
## File Placement Rules
|
|
84
|
+
|
|
85
|
+
| Situation | Target directory |
|
|
86
|
+
|-----------|-----------------|
|
|
87
|
+
| Active brain doc in session | Same directory as the brain doc |
|
|
88
|
+
| No active brain doc | `{brain_dir}/0-Inbox/diagrams/` |
|
|
89
|
+
|
|
90
|
+
File name: use a kebab-case slug from the diagram description (e.g., `auth-flow.excalidraw.md`).
|
|
91
|
+
|
|
92
|
+
## When NOT to Use
|
|
93
|
+
|
|
94
|
+
- User wants a polished presentation diagram (suggest FigJam/Figma instead)
|
|
95
|
+
- Simple lists or tables that don't benefit from spatial layout
|
|
96
|
+
|
|
97
|
+
## Reference Files
|
|
98
|
+
|
|
99
|
+
- `references/format-spec.md` — `.excalidraw.md` file format specification
|
|
100
|
+
- `references/element-templates.md` — Element JSON templates, colour palette, sizing guidelines
|