@heart-of-gold/toolkit 0.1.34 → 0.1.36
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/marketplace.json +3 -3
- package/README.md +7 -4
- package/package.json +1 -1
- package/plugins/babel-fish/.claude-plugin/plugin.json +1 -1
- package/plugins/babel-fish/skills/visualize/SKILL.md +309 -183
- package/plugins/babel-fish/skills/visualize/scripts/agent-artifact-template.html +169 -0
- package/plugins/babel-fish/skills/visualize/scripts/new-authored-artifact.sh +13 -0
- package/plugins/babel-fish/skills/visualize/scripts/publish-authored-html.sh +93 -0
- package/plugins/babel-fish/skills/visualize/scripts/smart-render.js +411 -83
- package/plugins/deep-thought/.claude-plugin/plugin.json +1 -1
- package/plugins/marvin/.claude-plugin/plugin.json +1 -1
- package/src/commands/install.ts +17 -1
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
"name": "deep-thought",
|
|
16
16
|
"source": "./plugins/deep-thought",
|
|
17
17
|
"description": "The Answer Computer — reasoning tools for brainstorming, planning, and deep thinking",
|
|
18
|
-
"version": "0.2.
|
|
18
|
+
"version": "0.2.6"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"name": "marvin",
|
|
22
22
|
"source": "./plugins/marvin",
|
|
23
23
|
"description": "The Paranoid Android — quality tools for code review, knowledge compounding, and work execution",
|
|
24
|
-
"version": "0.3.
|
|
24
|
+
"version": "0.3.6"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"name": "babel-fish",
|
|
28
28
|
"source": "./plugins/babel-fish",
|
|
29
29
|
"description": "Universal Translator — media generation tools for audio, image, and video content",
|
|
30
|
-
"version": "0.2.
|
|
30
|
+
"version": "0.2.4"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"name": "quellis",
|
package/README.md
CHANGED
|
@@ -26,13 +26,16 @@ bunx @heart-of-gold/toolkit install --to opencode
|
|
|
26
26
|
|
|
27
27
|
### Pi Coding Agent
|
|
28
28
|
```bash
|
|
29
|
-
#
|
|
30
|
-
bunx @heart-of-gold/toolkit install --to pi
|
|
31
|
-
|
|
32
|
-
# Or install the package directly in Pi to get skills + pi-native extensions
|
|
29
|
+
# Option A: install the package directly in Pi to get skills + pi-native extensions
|
|
33
30
|
pi install npm:@heart-of-gold/toolkit
|
|
31
|
+
|
|
32
|
+
# Option B: install shared skills only into Pi's native skill directory
|
|
33
|
+
bunx @heart-of-gold/toolkit install --to pi
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
**Important:** choose one Pi install path or the other.
|
|
37
|
+
Do **not** use both the Pi package install and `install --to pi` at the same time, or Pi will report duplicate skill collisions on reload.
|
|
38
|
+
|
|
36
39
|
Pi also discovers skills from the shared `~/.agents/skills/` location, so installs done with the OpenCode target are usable from Pi too.
|
|
37
40
|
|
|
38
41
|
When installed as a Pi package, Heart of Gold exposes Pi-native extension commands for the flagship workflows:
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: visualize
|
|
3
3
|
description: >
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
Create shareable HTML visual artifacts from markdown, plans, architecture docs, brainstorms, and other structured
|
|
5
|
+
content. Prefer browser-viewable HTML first when it will materially improve clarity or sharing; otherwise fall back
|
|
6
|
+
to terminal rendering. Triggers: visualize, mindmap, mind map, show me the structure, draw a map, make this clear,
|
|
7
|
+
make this visual.
|
|
8
8
|
allowed-tools:
|
|
9
9
|
- Read
|
|
10
10
|
- Bash
|
|
@@ -14,24 +14,202 @@ allowed-tools:
|
|
|
14
14
|
|
|
15
15
|
# Visualize — Babel Fish
|
|
16
16
|
|
|
17
|
-
Translating structured text into spatial understanding.
|
|
17
|
+
Translating structured text into spatial understanding. The job is not to "turn markdown into HTML." The job is to create a visual artifact that helps a human understand the material faster.
|
|
18
|
+
|
|
19
|
+
## Mission
|
|
20
|
+
|
|
21
|
+
Create one clear, polished, shareable visual artifact that:
|
|
22
|
+
- matches the user's actual need
|
|
23
|
+
- feels intentionally designed, not markdown restyled in boxes
|
|
24
|
+
- is authored deliberately by the coding agent whenever possible
|
|
25
|
+
- summarizes before detailing
|
|
26
|
+
- uses browser HTML as the primary medium for substantial artifacts
|
|
27
|
+
- falls back to terminal rendering only when that is the better fit
|
|
18
28
|
|
|
19
29
|
## Boundaries
|
|
20
30
|
|
|
21
31
|
- MAY: read files, generate terminal mind maps, generate temporary HTML artifacts, run renderer/share scripts via bash
|
|
22
32
|
- MAY NOT: modify project files, create persistent files outside temp/output artifacts, install unrelated packages
|
|
23
33
|
|
|
24
|
-
##
|
|
34
|
+
## Core Principle
|
|
35
|
+
|
|
36
|
+
Do **not** mirror the source document structure one-to-one unless the user explicitly wants a document view.
|
|
37
|
+
|
|
38
|
+
The coding agent should be the **author** of the visual artifact.
|
|
39
|
+
The renderer is a **finisher/fallback**, not the brain.
|
|
40
|
+
|
|
41
|
+
Instead:
|
|
42
|
+
1. understand the source
|
|
43
|
+
2. decide what the artifact is trying to communicate
|
|
44
|
+
3. choose the visual form that best serves that goal
|
|
45
|
+
4. author the HTML artifact directly when practical
|
|
46
|
+
5. use toolkit renderers only as helpers or fallback paths
|
|
47
|
+
6. keep raw/source detail secondary or collapsible when possible
|
|
48
|
+
|
|
49
|
+
HTML should feel like:
|
|
50
|
+
- a dashboard
|
|
51
|
+
- an explainer
|
|
52
|
+
- a roadmap
|
|
53
|
+
- an architecture brief
|
|
54
|
+
- a deliberate mind map
|
|
55
|
+
|
|
56
|
+
Not like:
|
|
57
|
+
- a markdown page with nicer CSS
|
|
58
|
+
|
|
59
|
+
## Artifact Families
|
|
60
|
+
|
|
61
|
+
These are guidance categories for the coding agent. They are not rigid parser outputs.
|
|
62
|
+
|
|
63
|
+
### `outline`
|
|
64
|
+
Use when the user wants:
|
|
65
|
+
- document structure
|
|
66
|
+
- a reading aid
|
|
67
|
+
- a faithful but polished source-oriented view
|
|
68
|
+
- a safe fallback when a richer artifact is not justified
|
|
69
|
+
|
|
70
|
+
### `roadmap`
|
|
71
|
+
Use when the source is best understood as:
|
|
72
|
+
- phases
|
|
73
|
+
- priorities
|
|
74
|
+
- sequencing
|
|
75
|
+
- workstreams
|
|
76
|
+
- execution flow
|
|
77
|
+
|
|
78
|
+
### `architecture`
|
|
79
|
+
Use when the source is best understood as:
|
|
80
|
+
- components
|
|
81
|
+
- boundaries
|
|
82
|
+
- integrations
|
|
83
|
+
- decisions
|
|
84
|
+
- responsibilities
|
|
85
|
+
|
|
86
|
+
### `mindmap`
|
|
87
|
+
Use only when the content is genuinely:
|
|
88
|
+
- concise
|
|
89
|
+
- branchy
|
|
90
|
+
- idea-oriented
|
|
91
|
+
- better understood spatially than sequentially
|
|
92
|
+
|
|
93
|
+
### `explainer`
|
|
94
|
+
Use when the artifact should help another human quickly understand:
|
|
95
|
+
- the recommendation
|
|
96
|
+
- tradeoffs
|
|
97
|
+
- key decisions
|
|
98
|
+
- what matters and why
|
|
99
|
+
|
|
100
|
+
### `mockup`
|
|
101
|
+
Use when the user really wants:
|
|
102
|
+
- product/UI concept visualization
|
|
103
|
+
- believable interface framing
|
|
104
|
+
- layout and interaction-oriented representation
|
|
105
|
+
|
|
106
|
+
## Style Foundations
|
|
107
|
+
|
|
108
|
+
Apply these defaults unless the user asks for something else:
|
|
109
|
+
|
|
110
|
+
- calm, high-contrast visual language
|
|
111
|
+
- restrained accent usage
|
|
112
|
+
- strong hierarchy and generous spacing
|
|
113
|
+
- summary-first information architecture
|
|
114
|
+
- progressive disclosure for dense detail
|
|
115
|
+
- cards, panels, lanes, chips, and callouts over markdown-heavy paragraphs
|
|
116
|
+
- readable max-widths for prose
|
|
117
|
+
- sticky navigation only when it helps, never as the dominant element
|
|
118
|
+
- polished but restrained effects; no gimmicky AI-demo chrome
|
|
119
|
+
|
|
120
|
+
See also:
|
|
121
|
+
- `docs/architecture/visualize-design-rules.md`
|
|
122
|
+
|
|
123
|
+
## Rules: Do
|
|
124
|
+
|
|
125
|
+
- Decide the communication goal before choosing the renderer.
|
|
126
|
+
- Prefer shareable HTML for substantial workflow artifacts when `share-html` is configured.
|
|
127
|
+
- Transform the source into a view model in your head before rendering: summary, priorities, risks, dependencies, decisions, outcomes.
|
|
128
|
+
- Lead with a strong first screen: title, one-line mission, key takeaways, and obvious next scan targets.
|
|
129
|
+
- Convert dense content into visual units where appropriate: cards, grouped sections, lanes, side panels, chips, callouts, expandable details.
|
|
130
|
+
- Use `roadmap` or richer execution-oriented views for plans when that improves understanding.
|
|
131
|
+
- Use `architecture` views for system/design-heavy documents.
|
|
132
|
+
- Keep raw source detail available, but secondary.
|
|
133
|
+
- Briefly explain why you chose the visualization mode when sharing the result.
|
|
134
|
+
|
|
135
|
+
## Rules: Don't
|
|
136
|
+
|
|
137
|
+
- Do not treat HTML generation as a markdown restyling task.
|
|
138
|
+
- Do not dump long raw paragraphs into large cards as the main UI.
|
|
139
|
+
- Do not let the table of contents dominate the page.
|
|
140
|
+
- Do not force a mind map onto content that is not naturally branch-shaped.
|
|
141
|
+
- Do not use flashy gradients, glass, shadows, or color noise unless they clearly improve hierarchy.
|
|
142
|
+
- Do not silently guess when the visualization choice is materially ambiguous.
|
|
143
|
+
- Do not create multiple competing artifacts unless the user explicitly asks for comparison.
|
|
144
|
+
|
|
145
|
+
## Expected Behavior
|
|
146
|
+
|
|
147
|
+
When invoked, behave like a visual editor, not a format converter.
|
|
148
|
+
|
|
149
|
+
1. Read the source or infer the source from context.
|
|
150
|
+
2. Decide whether the user needs:
|
|
151
|
+
- structure comprehension
|
|
152
|
+
- execution clarity
|
|
153
|
+
- system understanding
|
|
154
|
+
- stakeholder explanation
|
|
155
|
+
- UI/product visualization
|
|
156
|
+
3. Choose the best artifact family.
|
|
157
|
+
4. If uncertain, ask one concise question.
|
|
158
|
+
5. Prefer **agent-authored HTML** when browser rendering will help and the artifact needs real design judgment.
|
|
159
|
+
6. Use toolkit renderers as a fallback when a quick structured artifact is sufficient.
|
|
160
|
+
7. Fall back to terminal rendering when browser/share is unavailable or explicitly not wanted.
|
|
161
|
+
|
|
162
|
+
If the user says "you decide," choose the clearest non-gimmicky artifact, not the fanciest one.
|
|
163
|
+
|
|
164
|
+
## Uncertainty Protocol
|
|
165
|
+
|
|
166
|
+
When the best visualization is not clear, do **not** silently guess if the choice would materially affect usefulness.
|
|
25
167
|
|
|
26
|
-
|
|
27
|
-
-
|
|
168
|
+
Ask **one concise question at a time**:
|
|
169
|
+
- state the decision in plain language
|
|
170
|
+
- offer 2-4 explicit options
|
|
171
|
+
- include a recommended option when you have one
|
|
172
|
+
- keep option labels outcome-focused, not renderer-jargon-first
|
|
173
|
+
|
|
174
|
+
Good pattern:
|
|
175
|
+
- "Which would help most here?"
|
|
176
|
+
- `Roadmap` — show phases, sequencing, and implementation progress
|
|
177
|
+
- `Outline` — show the document structure clearly
|
|
178
|
+
- `Mind map` — show branching ideas and relationships
|
|
179
|
+
- `Architecture view` — show components, boundaries, and decisions
|
|
180
|
+
|
|
181
|
+
If the harness supports structured choices, use them.
|
|
182
|
+
If not, use a short plain-text question such as:
|
|
183
|
+
|
|
184
|
+
```text
|
|
185
|
+
I can visualize this a few different ways. Which would be most useful?
|
|
186
|
+
1. Roadmap — phases and tasks
|
|
187
|
+
2. Outline — document structure
|
|
188
|
+
3. Mind map — branching ideas
|
|
189
|
+
4. Architecture view — components and boundaries
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
If the user does not care or says "you decide," choose the safest useful mode:
|
|
193
|
+
- default to `outline`
|
|
194
|
+
- use `roadmap` for clearly execution-heavy plans
|
|
195
|
+
- use `architecture` for clearly system-design-heavy docs
|
|
196
|
+
- use `mindmap` only when the artifact is genuinely concise and branchy
|
|
197
|
+
|
|
198
|
+
## Authoring & Renderers
|
|
199
|
+
|
|
200
|
+
Preferred implementation order:
|
|
201
|
+
- **Agent-authored HTML** — primary path for high-quality shareable artifacts
|
|
202
|
+
- `scripts/smart-render.js` — fallback renderer when the agent wants a quick scaffold or safe structured default
|
|
28
203
|
- `scripts/render-mindmap/index.js` — specialized mind-map renderer for branchy content
|
|
29
204
|
|
|
205
|
+
The key rule: if the artifact needs real design judgment, the coding agent should author the HTML directly instead of delegating the whole job to a parser.
|
|
206
|
+
|
|
30
207
|
**Locations:**
|
|
31
208
|
- `scripts/smart-render.js`
|
|
32
209
|
- `scripts/render-mindmap/index.js`
|
|
33
210
|
|
|
34
|
-
|
|
211
|
+
To find the smart renderer path:
|
|
212
|
+
|
|
35
213
|
```bash
|
|
36
214
|
# Option 1: Use CLAUDE_PLUGIN_ROOT if available
|
|
37
215
|
SCRIPT="${CLAUDE_PLUGIN_ROOT}/skills/visualize/scripts/smart-render.js"
|
|
@@ -40,7 +218,8 @@ SCRIPT="${CLAUDE_PLUGIN_ROOT}/skills/visualize/scripts/smart-render.js"
|
|
|
40
218
|
SCRIPT=$(find ~/.claude/plugins -path "*/babel-fish/skills/visualize/scripts/smart-render.js" 2>/dev/null | head -1)
|
|
41
219
|
```
|
|
42
220
|
|
|
43
|
-
|
|
221
|
+
First run for the mind-map renderer:
|
|
222
|
+
|
|
44
223
|
```bash
|
|
45
224
|
RENDER_DIR=$(dirname "$SCRIPT")/render-mindmap
|
|
46
225
|
if [ ! -d "$RENDER_DIR/node_modules" ]; then
|
|
@@ -50,6 +229,23 @@ fi
|
|
|
50
229
|
|
|
51
230
|
## Usage
|
|
52
231
|
|
|
232
|
+
### Preferred: agent-authored HTML
|
|
233
|
+
|
|
234
|
+
When quality matters more than speed, start from the shared authored-artifact template, write the HTML directly, then publish it.
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
HTML_OUT="$(bash "$(dirname "$SCRIPT")/new-authored-artifact.sh")"
|
|
238
|
+
# edit the generated template at $HTML_OUT
|
|
239
|
+
bash "$(dirname "$SCRIPT")/publish-authored-html.sh" --url-only "$HTML_OUT"
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Template and helper files:
|
|
243
|
+
- `scripts/agent-artifact-template.html`
|
|
244
|
+
- `scripts/new-authored-artifact.sh`
|
|
245
|
+
- `scripts/publish-authored-html.sh`
|
|
246
|
+
|
|
247
|
+
### Fallback: toolkit renderer
|
|
248
|
+
|
|
53
249
|
```bash
|
|
54
250
|
# Generate a safe default HTML visualization for a markdown file
|
|
55
251
|
node "$SCRIPT" path/to/file.md --out /tmp/view.html
|
|
@@ -64,9 +260,28 @@ node "$SCRIPT" path/to/file.md --mode mindmap --out /tmp/view.html
|
|
|
64
260
|
node "$(dirname "$SCRIPT")/render-mindmap/index.js" --html /tmp/map.html path/to/file.md
|
|
65
261
|
```
|
|
66
262
|
|
|
67
|
-
|
|
263
|
+
## HTML Share Flow
|
|
264
|
+
|
|
265
|
+
### Preferred share flow: publish agent-authored HTML
|
|
266
|
+
|
|
267
|
+
Use this when the artifact needs stronger design judgment than the fallback renderer can provide.
|
|
268
|
+
|
|
269
|
+
1. Create the scaffold:
|
|
270
|
+
```bash
|
|
271
|
+
HTML_OUT="$(bash "$(dirname "$SCRIPT")/new-authored-artifact.sh")"
|
|
272
|
+
```
|
|
273
|
+
2. Author the HTML artifact directly into that file.
|
|
274
|
+
3. Publish it:
|
|
275
|
+
```bash
|
|
276
|
+
bash "$(dirname "$SCRIPT")/publish-authored-html.sh" --url-only "$HTML_OUT"
|
|
277
|
+
```
|
|
278
|
+
4. Read the returned URL from stdout.
|
|
279
|
+
5. Return that URL to the user as the primary result.
|
|
280
|
+
6. Briefly explain what was published and why this visual form was chosen.
|
|
281
|
+
|
|
282
|
+
### Fallback share flow: render then publish
|
|
68
283
|
|
|
69
|
-
Use the helper script when the user wants a browser URL and the
|
|
284
|
+
Use the helper script when the user wants a browser URL and the fallback renderer is sufficient:
|
|
70
285
|
|
|
71
286
|
```bash
|
|
72
287
|
bash scripts/render-and-share.sh path/to/file.md
|
|
@@ -79,201 +294,112 @@ This script:
|
|
|
79
294
|
4. publishes the artifact to the configured local share server
|
|
80
295
|
5. prints the publish result so you can return the URL
|
|
81
296
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
- **Auto-depth:** If no `--depth` is specified, the renderer tries depths 3, 2, 1 and picks the deepest that fits the terminal width.
|
|
85
|
-
- **Pruning:** Long labels are truncated with `…`. Nodes with many children show the first few plus `+N more`.
|
|
86
|
-
- **Colors** (via ANSI, visible in Claude Code bash output):
|
|
87
|
-
- Root: bold white on blue
|
|
88
|
-
- Depth 1: bold cyan
|
|
89
|
-
- Depth 2: green
|
|
90
|
-
- Depth 3: yellow
|
|
91
|
-
- Depth 4+: dim
|
|
92
|
-
|
|
93
|
-
## Phase 0 — Determine What to Visualize
|
|
94
|
-
|
|
95
|
-
First decide whether this should be a browser/shareable HTML view or a quick terminal view.
|
|
297
|
+
If publishing fails because the share server is not configured, say so clearly and fall back to terminal rendering unless the user wants to stop and run `share-server-setup` first.
|
|
96
298
|
|
|
97
|
-
|
|
98
|
-
- the source is a brainstorm, plan, architecture doc, or other structured workflow artifact
|
|
99
|
-
- the user asks to open it in a browser
|
|
100
|
-
- the user wants to share the result with another person or device
|
|
101
|
-
- the structure is large enough that browser navigation is more useful than terminal rendering
|
|
102
|
-
- `share-html` is configured
|
|
299
|
+
## Terminal Rendering
|
|
103
300
|
|
|
104
|
-
|
|
301
|
+
Use terminal rendering when:
|
|
105
302
|
- share-html is not configured
|
|
106
|
-
- the user explicitly wants
|
|
107
|
-
-
|
|
303
|
+
- the user explicitly wants terminal-only output
|
|
304
|
+
- a quick local structural check is more useful than a browser view
|
|
108
305
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
**If a file path is provided:**
|
|
112
|
-
1. Read the file
|
|
113
|
-
2. Decide what kind of visual artifact would help most from context
|
|
114
|
-
3. If confidence is high enough, choose the mode and generate/share HTML first
|
|
115
|
-
4. If confidence is not high enough, ask the user which direction would help most
|
|
116
|
-
5. If sharing is unavailable or the user explicitly wants terminal output, fall back appropriately
|
|
117
|
-
|
|
118
|
-
**If no path is provided:**
|
|
119
|
-
1. Check if there's a recent brainstorm or plan document in the conversation context
|
|
120
|
-
2. If yes: use that document's path
|
|
121
|
-
3. If no: summarize the current conversation topic into a markdown structure with headings, write it to a temp file, then render
|
|
122
|
-
|
|
123
|
-
**If the user says "visualize this" or "show me a mind map":**
|
|
124
|
-
1. Look at what was just discussed or created
|
|
125
|
-
2. Generate an appropriate markdown structure
|
|
126
|
-
3. Render it
|
|
127
|
-
|
|
128
|
-
## Phase 1 — Render or Share
|
|
129
|
-
|
|
130
|
-
### Path A — Terminal rendering
|
|
131
|
-
|
|
132
|
-
**IMPORTANT: Output the mind map in the assistant response text, NOT as raw bash tool output.**
|
|
306
|
+
**IMPORTANT:** Output the mind map in the assistant response text, not as raw bash tool output.
|
|
133
307
|
|
|
134
308
|
Many harness bash panels truncate long output and wrap wide content, breaking alignment. Instead:
|
|
135
309
|
|
|
136
|
-
1. Locate the renderer script
|
|
137
|
-
2. Ensure dependencies are installed
|
|
310
|
+
1. Locate the renderer script.
|
|
311
|
+
2. Ensure dependencies are installed.
|
|
138
312
|
3. Run the renderer with `--no-color`, redirect to a temp file:
|
|
139
313
|
```bash
|
|
140
314
|
node "$SCRIPT" --no-color [file] > /tmp/mindmap-result.txt 2>&1
|
|
141
315
|
```
|
|
142
|
-
4. Read `/tmp/mindmap-result.txt
|
|
143
|
-
5. Output the contents inside a
|
|
144
|
-
6. Clean up:
|
|
145
|
-
|
|
146
|
-
The default mode is **vertical layout** — boxes on main branches, compact leaves, ~40 chars wide.
|
|
147
|
-
|
|
148
|
-
### Path B — Shareable HTML
|
|
149
|
-
|
|
150
|
-
For substantial artifacts, prefer this path first when `share-html` is configured.
|
|
151
|
-
|
|
152
|
-
The coding agent should choose the mode from context. Toolkit guidance:
|
|
153
|
-
- plans often fit `roadmap` or `outline`
|
|
154
|
-
- architecture docs often fit `architecture` or `outline`
|
|
155
|
-
- concise branchy brainstorms may fit `mindmap`
|
|
156
|
-
- product/UI concepts may fit `mockup`
|
|
157
|
-
- stakeholder-friendly summaries may fit `explainer`
|
|
158
|
-
|
|
159
|
-
If uncertain, ask the user using the harness's structured choice UI when available; otherwise present concise plain-text options.
|
|
160
|
-
|
|
161
|
-
### Uncertainty protocol
|
|
162
|
-
|
|
163
|
-
When the best visualization is not clear, do **not** silently guess if the choice would materially affect usefulness.
|
|
164
|
-
|
|
165
|
-
Ask **one concise question at a time**:
|
|
166
|
-
- state the decision in plain language
|
|
167
|
-
- offer 2-4 explicit options
|
|
168
|
-
- include a recommended option when you have one
|
|
169
|
-
- keep option labels outcome-focused, not renderer-jargon-first
|
|
170
|
-
|
|
171
|
-
Good pattern:
|
|
172
|
-
- "Which would help most here?"
|
|
173
|
-
- `Roadmap` — show phases, sequencing, and implementation progress
|
|
174
|
-
- `Outline` — show the document structure clearly
|
|
175
|
-
- `Mind map` — show branching ideas and relationships
|
|
176
|
-
- `Architecture view` — show components, boundaries, and decisions
|
|
177
|
-
|
|
178
|
-
If the harness supports structured choices, use them.
|
|
179
|
-
If not, use a short plain-text question such as:
|
|
180
|
-
|
|
181
|
-
```text
|
|
182
|
-
I can visualize this a few different ways. Which would be most useful?
|
|
183
|
-
1. Roadmap — phases and tasks
|
|
184
|
-
2. Outline — document structure
|
|
185
|
-
3. Mind map — branching ideas
|
|
186
|
-
4. Architecture view — components and boundaries
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
If the user does not care or says "you decide," choose the safest useful mode:
|
|
190
|
-
- default to `outline`
|
|
191
|
-
- use `roadmap` for clearly execution-heavy plans
|
|
192
|
-
- use `architecture` for clearly system-design-heavy docs
|
|
193
|
-
- use `mindmap` only when the artifact is genuinely concise and branchy
|
|
194
|
-
|
|
195
|
-
1. Verify or assume the input markdown is ready
|
|
196
|
-
2. Run:
|
|
316
|
+
4. Read `/tmp/mindmap-result.txt`.
|
|
317
|
+
5. Output the contents inside a fenced code block.
|
|
318
|
+
6. Clean up:
|
|
197
319
|
```bash
|
|
198
|
-
|
|
320
|
+
rm -f /tmp/mindmap-result.txt
|
|
199
321
|
```
|
|
200
|
-
3. Read the returned URL from stdout
|
|
201
|
-
4. Return that URL to the user as the primary result
|
|
202
|
-
5. Briefly explain what was published and why this mode was chosen
|
|
203
|
-
|
|
204
|
-
If you need more detail for debugging, you may run the helper without `--url-only` and inspect the returned JSON.
|
|
205
|
-
|
|
206
|
-
If publishing fails because the share server is not configured, say so clearly and fall back to terminal rendering unless the user wants to stop and run `share-server-setup` first.
|
|
207
|
-
|
|
208
|
-
**For shell usage** (not through assistant panels): terminal rendering can use ANSI colors, or `--horizontal` for the wide spatial layout.
|
|
209
|
-
|
|
210
|
-
## Current HTML modes
|
|
211
322
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
-
|
|
323
|
+
The default mode is vertical layout — boxes on main branches, compact leaves, about 40 chars wide.
|
|
324
|
+
|
|
325
|
+
## Agent-Authored HTML Workflow
|
|
326
|
+
|
|
327
|
+
When authoring HTML directly, follow this sequence:
|
|
328
|
+
|
|
329
|
+
1. Read the source and decide the artifact family.
|
|
330
|
+
2. Decide the audience and the first question the page should answer.
|
|
331
|
+
3. Create the scaffold with `new-authored-artifact.sh`.
|
|
332
|
+
4. Replace the template content with a real designed artifact.
|
|
333
|
+
5. Keep source detail secondary.
|
|
334
|
+
6. Publish with `publish-authored-html.sh`.
|
|
335
|
+
|
|
336
|
+
For plans specifically:
|
|
337
|
+
- do not dump the full task prose into the primary lanes
|
|
338
|
+
- summarize workstreams into short cards or task tiles
|
|
339
|
+
- show dependencies, risks, and acceptance separately
|
|
340
|
+
- keep raw markdown only in an appendix or disclosure block
|
|
341
|
+
|
|
342
|
+
## Required Output Structure
|
|
343
|
+
|
|
344
|
+
For substantial HTML artifacts, prefer this structure:
|
|
345
|
+
- strong title + one-line framing
|
|
346
|
+
- summary layer first
|
|
347
|
+
- main visual body second
|
|
348
|
+
- dense details compressed or collapsible
|
|
349
|
+
- source-faithful appendix only if needed
|
|
350
|
+
|
|
351
|
+
### Plan-oriented artifact target shape
|
|
352
|
+
- title + mission
|
|
353
|
+
- key stats or scope summary
|
|
354
|
+
- priorities / phases / workstreams
|
|
355
|
+
- dependencies / risks / acceptance gates
|
|
356
|
+
- expandable detail or appendix
|
|
357
|
+
|
|
358
|
+
### Architecture-oriented artifact target shape
|
|
359
|
+
- title + system framing
|
|
360
|
+
- major components / boundaries / integrations
|
|
361
|
+
- key decisions and tradeoffs
|
|
362
|
+
- risks / assumptions
|
|
363
|
+
- supporting detail below
|
|
364
|
+
|
|
365
|
+
### Explainer target shape
|
|
366
|
+
- title + recommendation
|
|
367
|
+
- why this matters
|
|
368
|
+
- options / comparison / decision
|
|
369
|
+
- what happens next
|
|
370
|
+
- supporting source detail below
|
|
371
|
+
|
|
372
|
+
## Quality Gates
|
|
373
|
+
|
|
374
|
+
Before returning a shared HTML result, check mentally:
|
|
375
|
+
- Does the first screen explain the artifact in under 10 seconds?
|
|
376
|
+
- Does this feel designed, not like markdown with nicer CSS?
|
|
377
|
+
- Is hierarchy obvious?
|
|
378
|
+
- Is summary ahead of detail?
|
|
379
|
+
- Are dense sections compressed into meaningful visual units?
|
|
380
|
+
- Is the chosen mode actually appropriate for the content?
|
|
381
|
+
- If this is a plan, does it foreground execution rather than document order?
|
|
382
|
+
- If this is a brainstorm, is it actually branch-shaped enough for a mind map?
|
|
383
|
+
|
|
384
|
+
If the answer to several of these is no, reconsider the mode or ask the user.
|
|
227
385
|
|
|
228
386
|
## Input Formats
|
|
229
387
|
|
|
230
388
|
### Markdown (primary)
|
|
231
|
-
Standard markdown with `#` headings defining hierarchy
|
|
232
|
-
```markdown
|
|
233
|
-
# Root Topic
|
|
234
|
-
## Branch A
|
|
235
|
-
- Detail 1
|
|
236
|
-
- Detail 2
|
|
237
|
-
## Branch B
|
|
238
|
-
### Sub-branch
|
|
239
|
-
- Detail 3
|
|
240
|
-
```
|
|
389
|
+
Standard markdown with `#` headings defining hierarchy.
|
|
241
390
|
|
|
242
391
|
### JSON
|
|
243
|
-
Tree structure with `label` and `children
|
|
244
|
-
```json
|
|
245
|
-
{
|
|
246
|
-
"label": "Root",
|
|
247
|
-
"children": [
|
|
248
|
-
{ "label": "Branch A", "children": [] },
|
|
249
|
-
{ "label": "Branch B", "children": [
|
|
250
|
-
{ "label": "Sub-branch", "children": [] }
|
|
251
|
-
]}
|
|
252
|
-
]
|
|
253
|
-
}
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
## Generating Structure from Context
|
|
257
|
-
|
|
258
|
-
When visualizing conversation context (no file path), create a markdown structure that captures:
|
|
259
|
-
|
|
260
|
-
**For brainstorm content:**
|
|
261
|
-
- Root = topic
|
|
262
|
-
- Branches = key decisions or themes
|
|
263
|
-
- Leaves = specific choices or details
|
|
392
|
+
Tree structure with `label` and `children`.
|
|
264
393
|
|
|
265
|
-
|
|
266
|
-
- Root = project name
|
|
267
|
-
- Branches = phases
|
|
268
|
-
- Leaves = tasks within each phase
|
|
394
|
+
## Generating Structure From Context
|
|
269
395
|
|
|
270
|
-
|
|
271
|
-
-
|
|
272
|
-
-
|
|
273
|
-
-
|
|
396
|
+
When visualizing conversation context with no file path:
|
|
397
|
+
- brainstorms: root = topic, branches = key themes, leaves = concrete ideas
|
|
398
|
+
- plans: root = project, branches = priorities/phases, leaves = tasks
|
|
399
|
+
- general discussion: root = main topic, branches = subtopics, leaves = key takeaways
|
|
274
400
|
|
|
275
401
|
Write the generated markdown to `/tmp/mindmap-XXXXXX.md`, render it, then clean up.
|
|
276
402
|
|
|
277
403
|
## What Makes This Babel Fish
|
|
278
404
|
|
|
279
|
-
The Babel Fish translates between languages. This skill translates between
|
|
405
|
+
The Babel Fish translates between languages. This skill translates between modalities — from linear text to spatial understanding, and from private working notes to clear shareable browser artifacts.
|