@heart-of-gold/toolkit 0.1.30 → 0.1.32
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/README.md +13 -11
- package/extensions/pi/share.ts +10 -2
- package/package.json +2 -1
- package/plugins/babel-fish/skills/visualize/SKILL.md +66 -17
- package/plugins/babel-fish/skills/visualize/scripts/render-and-share.sh +107 -0
- package/plugins/babel-fish/skills/visualize/scripts/render-mindmap/package.json +2 -1
- package/plugins/deep-thought/skills/architect/SKILL.md +5 -2
- package/plugins/deep-thought/skills/brainstorm/SKILL.md +2 -2
- package/plugins/deep-thought/skills/plan/SKILL.md +2 -2
- package/plugins/marvin/.claude-plugin/plugin.json +1 -1
- package/plugins/marvin/README.md +4 -1
- package/plugins/marvin/skills/share-html/SKILL.md +7 -1
- package/plugins/marvin/skills/share-server-control/SKILL.md +80 -0
- package/plugins/marvin/skills/share-server-control/scripts/disable-viewer.sh +21 -0
- package/plugins/marvin/skills/share-server-control/scripts/enable-viewer.sh +5 -0
- package/plugins/marvin/skills/share-server-control/scripts/restart.sh +8 -0
- package/plugins/marvin/skills/share-server-control/scripts/start.sh +22 -0
- package/plugins/marvin/skills/share-server-control/scripts/status.sh +62 -0
- package/plugins/marvin/skills/share-server-control/scripts/stop.sh +21 -0
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -39,8 +39,9 @@ When installed as a Pi package, Heart of Gold exposes Pi-native extension comman
|
|
|
39
39
|
- `/deep-thought-brainstorm` — start a brainstorm (collaborative discovery)
|
|
40
40
|
- `/deep-thought-plan` — start planning (research and produce a plan document)
|
|
41
41
|
- `/deep-thought-architect` — turn brainstorm decisions into stories and architecture docs
|
|
42
|
-
- `/share` — publish an HTML file or static site directory through the portable `share-html` skill
|
|
42
|
+
- `/share-html` — publish an HTML file or static site directory through the portable `share-html` skill
|
|
43
43
|
- `/share-server-setup` — set up or adopt the local share server through the portable `share-server-setup` skill
|
|
44
|
+
- `/share-server-control` — control the local share server lifecycle through the portable `share-server-control` skill
|
|
44
45
|
- `/marvin-work` — start executing a plan (with always-on safety guardrails)
|
|
45
46
|
|
|
46
47
|
Pi package installs also include a Pi-only guided workflow enhancer for supported Heart of Gold skills. For `brainstorm`, `plan`, and `architect`, when the assistant asks a high-confidence structured question, Pi can upgrade it into a custom interactive TUI and feed the answer back into the same workflow. Shared skills remain plain-text portable in every other harness.
|
|
@@ -97,18 +98,19 @@ The unglamorous work that compounds.
|
|
|
97
98
|
|
|
98
99
|
Execute plans task by task with tests after every change. Quick-review code with an emphasis on simplicity — catch YAGNI violations, premature abstractions, and code that solves problems that don't exist yet. Document solutions so the next person doesn't waste time re-discovering what you already figured out.
|
|
99
100
|
|
|
100
|
-
|
|
101
|
+
10 skills · 2 agents · 3 knowledge files
|
|
101
102
|
|
|
102
103
|
```
|
|
103
|
-
/marvin:work
|
|
104
|
-
/marvin:quick-review
|
|
105
|
-
/marvin:compound
|
|
106
|
-
/marvin:redteam
|
|
107
|
-
/marvin:scaffold
|
|
108
|
-
/marvin:test-writer
|
|
109
|
-
/marvin:copy-editor
|
|
110
|
-
/marvin:share-server-setup
|
|
111
|
-
/marvin:share-
|
|
104
|
+
/marvin:work # execute plans — implement, test, commit, ship
|
|
105
|
+
/marvin:quick-review # fast opinionated quality pass (simplicity, tests, correctness)
|
|
106
|
+
/marvin:compound # document solved problems for future reference
|
|
107
|
+
/marvin:redteam # adversarial review — find weaknesses, expose with failing tests
|
|
108
|
+
/marvin:scaffold # prepare project structure, configs, dependencies
|
|
109
|
+
/marvin:test-writer # write failing tests from user stories
|
|
110
|
+
/marvin:copy-editor # two-layer copy editor (typography audit + LLM judgment)
|
|
111
|
+
/marvin:share-server-setup # set up local artifact sharing infrastructure
|
|
112
|
+
/marvin:share-server-control # start, stop, and inspect local share server lifecycle
|
|
113
|
+
/marvin:share-html # publish HTML/static output to a browser URL
|
|
112
114
|
```
|
|
113
115
|
|
|
114
116
|
### [Guide](plugins/guide/) — The Hitchhiker's Guide
|
package/extensions/pi/share.ts
CHANGED
|
@@ -19,12 +19,12 @@ function queueOrSend(
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export default function shareExtension(pi: ExtensionAPI) {
|
|
22
|
-
pi.registerCommand("share", {
|
|
22
|
+
pi.registerCommand("share-html", {
|
|
23
23
|
description: "Publish an HTML file or static site directory via the share-html skill",
|
|
24
24
|
handler: async (args, ctx) => {
|
|
25
25
|
const source = args.trim() || (ctx.hasUI ? (await ctx.ui.editor?.("HTML file or static site directory", ""))?.trim() : undefined);
|
|
26
26
|
if (!source) {
|
|
27
|
-
ctx.ui.notify("Usage: /share <html file or static site directory>", "info");
|
|
27
|
+
ctx.ui.notify("Usage: /share-html <html file or static site directory>", "info");
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -39,4 +39,12 @@ export default function shareExtension(pi: ExtensionAPI) {
|
|
|
39
39
|
queueOrSend(pi, prompt, ctx, "Share server setup queued as follow-up");
|
|
40
40
|
},
|
|
41
41
|
});
|
|
42
|
+
|
|
43
|
+
pi.registerCommand("share-server-control", {
|
|
44
|
+
description: "Control the local share server lifecycle via the portable share-server-control skill",
|
|
45
|
+
handler: async (args, ctx) => {
|
|
46
|
+
const prompt = args.trim() ? `/skill:share-server-control ${args.trim()}` : "/skill:share-server-control";
|
|
47
|
+
queueOrSend(pi, prompt, ctx, "Share server control queued as follow-up");
|
|
48
|
+
},
|
|
49
|
+
});
|
|
42
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heart-of-gold/toolkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Cross-platform installer for Heart of Gold skills — works with Codex, OpenCode, Pi, Claude Code, and more",
|
|
6
6
|
"bin": {
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"./plugins/guide/skills/write-post",
|
|
69
69
|
"./plugins/marvin/skills/compound",
|
|
70
70
|
"./plugins/marvin/skills/share-html",
|
|
71
|
+
"./plugins/marvin/skills/share-server-control",
|
|
71
72
|
"./plugins/marvin/skills/share-server-setup",
|
|
72
73
|
"./plugins/marvin/skills/quick-review",
|
|
73
74
|
"./plugins/marvin/skills/redteam",
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: visualize
|
|
3
3
|
description: >
|
|
4
|
-
Render mind maps and tree visualizations
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Render mind maps and tree visualizations from markdown. Prefer terminal output for quick local inspection,
|
|
5
|
+
and generate shareable HTML when the user wants a browser view and share-html infrastructure is configured.
|
|
6
|
+
Works on brainstorm docs, plan docs, markdown files, or any structured content. Triggers: visualize,
|
|
7
|
+
mindmap, mind map, show me the structure, draw a map.
|
|
7
8
|
allowed-tools:
|
|
8
9
|
- Read
|
|
9
10
|
- Bash
|
|
@@ -17,8 +18,8 @@ Translating structured text into spatial understanding. Because walls of text hi
|
|
|
17
18
|
|
|
18
19
|
## Boundaries
|
|
19
20
|
|
|
20
|
-
- MAY: read files, generate mind maps, run
|
|
21
|
-
- MAY NOT: modify files, create
|
|
21
|
+
- MAY: read files, generate terminal mind maps, generate temporary HTML artifacts, run renderer/share scripts via bash
|
|
22
|
+
- MAY NOT: modify project files, create persistent files outside temp/output artifacts, install unrelated packages
|
|
22
23
|
|
|
23
24
|
## The Renderer
|
|
24
25
|
|
|
@@ -46,7 +47,7 @@ fi
|
|
|
46
47
|
## Usage
|
|
47
48
|
|
|
48
49
|
```bash
|
|
49
|
-
# Render a markdown file
|
|
50
|
+
# Render a markdown file in the terminal
|
|
50
51
|
node "$SCRIPT" path/to/file.md
|
|
51
52
|
|
|
52
53
|
# With options
|
|
@@ -54,11 +55,26 @@ node "$SCRIPT" --no-color path/to/file.md # plain Unicode, no ANSI
|
|
|
54
55
|
node "$SCRIPT" --width 120 path/to/file.md # constrain to 120 columns
|
|
55
56
|
node "$SCRIPT" --depth 2 path/to/file.md # limit tree depth
|
|
56
57
|
node "$SCRIPT" --json path/to/data.json # JSON tree input
|
|
58
|
+
node "$SCRIPT" --html /tmp/map.html path/to/file.md # generate HTML mind map
|
|
57
59
|
|
|
58
60
|
# Pipe markdown
|
|
59
61
|
echo "# Root\n## Branch A\n## Branch B" | node "$SCRIPT"
|
|
60
62
|
```
|
|
61
63
|
|
|
64
|
+
### Shareable HTML flow
|
|
65
|
+
|
|
66
|
+
Use the helper script when the user wants a browser URL and the share server is already configured:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
bash scripts/render-and-share.sh path/to/file.md
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
This script:
|
|
73
|
+
1. generates an HTML mind map via the existing renderer
|
|
74
|
+
2. locates `share-html/scripts/publish.sh`
|
|
75
|
+
3. publishes the artifact to the configured local share server
|
|
76
|
+
4. prints the publish JSON so you can return the URL
|
|
77
|
+
|
|
62
78
|
## Rendering Behavior
|
|
63
79
|
|
|
64
80
|
- **Auto-depth:** If no `--depth` is specified, the renderer tries depths 3, 2, 1 and picks the deepest that fits the terminal width.
|
|
@@ -72,6 +88,20 @@ echo "# Root\n## Branch A\n## Branch B" | node "$SCRIPT"
|
|
|
72
88
|
|
|
73
89
|
## Phase 0 — Determine What to Visualize
|
|
74
90
|
|
|
91
|
+
First decide whether the user wants:
|
|
92
|
+
- a quick terminal view
|
|
93
|
+
- a browser/shareable HTML view
|
|
94
|
+
|
|
95
|
+
**Prefer browser/shareable HTML when:**
|
|
96
|
+
- the user asks to open it in a browser
|
|
97
|
+
- the user wants to share the result with another person or device
|
|
98
|
+
- the structure is large enough that browser navigation is more useful than terminal rendering
|
|
99
|
+
|
|
100
|
+
**Prefer terminal rendering when:**
|
|
101
|
+
- the user wants a quick local look
|
|
102
|
+
- the environment is SSH-heavy or browser access is not requested
|
|
103
|
+
- share-html is not configured
|
|
104
|
+
|
|
75
105
|
When invoked as `/visualize [path]`:
|
|
76
106
|
|
|
77
107
|
**If a file path is provided:**
|
|
@@ -88,11 +118,13 @@ When invoked as `/visualize [path]`:
|
|
|
88
118
|
2. Generate an appropriate markdown structure
|
|
89
119
|
3. Render it
|
|
90
120
|
|
|
91
|
-
## Phase 1 — Render
|
|
121
|
+
## Phase 1 — Render or Share
|
|
122
|
+
|
|
123
|
+
### Path A — Terminal rendering
|
|
92
124
|
|
|
93
|
-
**IMPORTANT: Output the mind map in
|
|
125
|
+
**IMPORTANT: Output the mind map in the assistant response text, NOT as raw bash tool output.**
|
|
94
126
|
|
|
95
|
-
|
|
127
|
+
Many harness bash panels truncate long output and wrap wide content, breaking alignment. Instead:
|
|
96
128
|
|
|
97
129
|
1. Locate the renderer script (see above)
|
|
98
130
|
2. Ensure dependencies are installed
|
|
@@ -102,18 +134,35 @@ Claude Code's bash output panel truncates long output and wraps wide content, br
|
|
|
102
134
|
```
|
|
103
135
|
4. Read `/tmp/mindmap-result.txt`
|
|
104
136
|
5. Output the contents inside a markdown fenced code block in your response text
|
|
105
|
-
6. Clean up: `rm /tmp/mindmap-result.txt`
|
|
137
|
+
6. Clean up: `rm -f /tmp/mindmap-result.txt`
|
|
138
|
+
|
|
139
|
+
The default mode is **vertical layout** — boxes on main branches, compact leaves, ~40 chars wide.
|
|
140
|
+
|
|
141
|
+
### Path B — Shareable HTML
|
|
142
|
+
|
|
143
|
+
If the user wants browser viewing or sharing and `share-html` is configured:
|
|
144
|
+
|
|
145
|
+
1. Verify or assume the input markdown is ready
|
|
146
|
+
2. Run:
|
|
147
|
+
```bash
|
|
148
|
+
bash scripts/render-and-share.sh [file]
|
|
149
|
+
```
|
|
150
|
+
3. Read the returned JSON
|
|
151
|
+
4. Return the primary URL to the user (`url` when present, otherwise `viewerUrl`)
|
|
152
|
+
5. Briefly explain what was published
|
|
106
153
|
|
|
107
|
-
|
|
154
|
+
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.
|
|
108
155
|
|
|
109
|
-
**For shell usage** (not through
|
|
156
|
+
**For shell usage** (not through assistant panels): terminal rendering can use ANSI colors, or `--horizontal` for the wide spatial layout.
|
|
110
157
|
|
|
111
158
|
## Phase 2 — Offer Next Steps
|
|
112
159
|
|
|
113
|
-
After rendering, briefly note:
|
|
114
|
-
- "Use `--depth N` to see more/less detail"
|
|
115
|
-
- "Use `--width N` to fit a different terminal size"
|
|
116
|
-
-
|
|
160
|
+
After rendering or sharing, briefly note:
|
|
161
|
+
- for terminal mode: "Use `--depth N` to see more/less detail"
|
|
162
|
+
- for terminal mode: "Use `--width N` to fit a different terminal size"
|
|
163
|
+
- for shared HTML: return the viewer URL and say whether it is local-only or publicly reachable on the user's tailnet
|
|
164
|
+
- if publishing failed due to missing share infrastructure: suggest `share-server-setup`
|
|
165
|
+
- if the source was a brainstorm/plan/architecture doc, offer to continue the workflow (e.g., proceed to `/plan`, `/work`, or implementation)
|
|
117
166
|
|
|
118
167
|
## Input Formats
|
|
119
168
|
|
|
@@ -166,4 +215,4 @@ Write the generated markdown to `/tmp/mindmap-XXXXXX.md`, render it, then clean
|
|
|
166
215
|
|
|
167
216
|
## What Makes This Babel Fish
|
|
168
217
|
|
|
169
|
-
The Babel Fish translates between languages. This skill translates between *modalities* — from linear text to spatial structure. It makes the invisible visible: the hierarchy, the relationships, the gaps that only show up when you see the shape of the thinking.
|
|
218
|
+
The Babel Fish translates between languages. This skill translates between *modalities* — from linear text to spatial structure, and now from private working docs to shareable browser views. It makes the invisible visible: the hierarchy, the relationships, the gaps that only show up when you see the shape of the thinking.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
5
|
+
RENDER_DIR="$SCRIPT_DIR/render-mindmap"
|
|
6
|
+
RENDER_SCRIPT="$RENDER_DIR/index.js"
|
|
7
|
+
INPUT_PATH=""
|
|
8
|
+
SLUG=""
|
|
9
|
+
TITLE=""
|
|
10
|
+
ALIAS=""
|
|
11
|
+
KEEP_HTML=0
|
|
12
|
+
HTML_OUT=""
|
|
13
|
+
TEMP_DIR=""
|
|
14
|
+
|
|
15
|
+
usage() {
|
|
16
|
+
cat <<'EOF'
|
|
17
|
+
Usage: render-and-share.sh <markdown-file> [--slug STEM] [--title TITLE] [--alias ALIAS] [--html-out PATH] [--keep-html]
|
|
18
|
+
|
|
19
|
+
Generate an HTML mind map from a markdown file, publish it via share-html, and print the publish JSON.
|
|
20
|
+
EOF
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
while [[ $# -gt 0 ]]; do
|
|
24
|
+
case "$1" in
|
|
25
|
+
--slug) SLUG="$2"; shift 2 ;;
|
|
26
|
+
--title) TITLE="$2"; shift 2 ;;
|
|
27
|
+
--alias) ALIAS="$2"; shift 2 ;;
|
|
28
|
+
--html-out) HTML_OUT="$2"; shift 2 ;;
|
|
29
|
+
--keep-html) KEEP_HTML=1; shift ;;
|
|
30
|
+
--help) usage; exit 0 ;;
|
|
31
|
+
--*) echo "Unknown argument: $1" >&2; exit 1 ;;
|
|
32
|
+
*)
|
|
33
|
+
if [[ -z "$INPUT_PATH" ]]; then
|
|
34
|
+
INPUT_PATH="$1"
|
|
35
|
+
shift
|
|
36
|
+
else
|
|
37
|
+
echo "Unexpected positional argument: $1" >&2
|
|
38
|
+
exit 1
|
|
39
|
+
fi
|
|
40
|
+
;;
|
|
41
|
+
esac
|
|
42
|
+
done
|
|
43
|
+
|
|
44
|
+
if [[ -z "$INPUT_PATH" ]]; then
|
|
45
|
+
usage >&2
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
if [[ ! -f "$INPUT_PATH" ]]; then
|
|
50
|
+
echo "Input markdown file does not exist: $INPUT_PATH" >&2
|
|
51
|
+
exit 1
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
if [[ ! -f "$RENDER_SCRIPT" ]]; then
|
|
55
|
+
echo "Renderer script not found: $RENDER_SCRIPT" >&2
|
|
56
|
+
exit 1
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
if [[ ! -d "$RENDER_DIR/node_modules" ]]; then
|
|
60
|
+
(cd "$RENDER_DIR" && npm install --silent)
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
if [[ -z "$HTML_OUT" ]]; then
|
|
64
|
+
TEMP_DIR="$(mktemp -d)"
|
|
65
|
+
HTML_OUT="$TEMP_DIR/$(basename "${INPUT_PATH%.*}").html"
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
cleanup() {
|
|
69
|
+
if [[ "$KEEP_HTML" -eq 0 && -n "$TEMP_DIR" && -d "$TEMP_DIR" ]]; then
|
|
70
|
+
rm -rf "$TEMP_DIR"
|
|
71
|
+
fi
|
|
72
|
+
}
|
|
73
|
+
trap cleanup EXIT
|
|
74
|
+
|
|
75
|
+
node "$RENDER_SCRIPT" --html "$HTML_OUT" "$INPUT_PATH" >/dev/null
|
|
76
|
+
|
|
77
|
+
find_share_publish_script() {
|
|
78
|
+
local candidates=(
|
|
79
|
+
"$SCRIPT_DIR/../../share-html/scripts/publish.sh"
|
|
80
|
+
"$SCRIPT_DIR/../../../marvin/skills/share-html/scripts/publish.sh"
|
|
81
|
+
"$SCRIPT_DIR/../../../../marvin/skills/share-html/scripts/publish.sh"
|
|
82
|
+
"$HOME/.agents/skills/share-html/scripts/publish.sh"
|
|
83
|
+
"$HOME/.pi/agent/skills/share-html/scripts/publish.sh"
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
for candidate in "${candidates[@]}"; do
|
|
87
|
+
if [[ -f "$candidate" ]]; then
|
|
88
|
+
printf '%s\n' "$candidate"
|
|
89
|
+
return 0
|
|
90
|
+
fi
|
|
91
|
+
done
|
|
92
|
+
|
|
93
|
+
find "$(cd "$SCRIPT_DIR/../../../../.." && pwd)" -path '*/share-html/scripts/publish.sh' 2>/dev/null | head -1
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
PUBLISH_SCRIPT="$(find_share_publish_script)"
|
|
97
|
+
if [[ -z "$PUBLISH_SCRIPT" || ! -f "$PUBLISH_SCRIPT" ]]; then
|
|
98
|
+
echo '{"ok":false,"error":{"code":"MISSING_SHARE_HTML","message":"Could not find share-html publish.sh. Install the share-html skill first."}}'
|
|
99
|
+
exit 1
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
CMD=(bash "$PUBLISH_SCRIPT" "$HTML_OUT")
|
|
103
|
+
if [[ -n "$SLUG" ]]; then CMD+=(--slug "$SLUG"); fi
|
|
104
|
+
if [[ -n "$TITLE" ]]; then CMD+=(--title "$TITLE"); fi
|
|
105
|
+
if [[ -n "$ALIAS" ]]; then CMD+=(--alias "$ALIAS"); fi
|
|
106
|
+
|
|
107
|
+
"${CMD[@]}"
|
|
@@ -176,10 +176,13 @@ Use **AskUserQuestion** with:
|
|
|
176
176
|
- header: "Next step"
|
|
177
177
|
- options:
|
|
178
178
|
1. label: "Start implementation (Recommended)", description: "Proceed to scaffold or test writing"
|
|
179
|
-
2. label: "
|
|
180
|
-
3. label: "
|
|
179
|
+
2. label: "Visualize / Share", description: "Prefer a shareable HTML view when sharing is configured; otherwise render structure in the terminal"
|
|
180
|
+
3. label: "Review and refine", description: "Adjust stories or architecture based on feedback"
|
|
181
|
+
4. label: "Done for now", description: "Return later"
|
|
181
182
|
- multiSelect: false
|
|
182
183
|
|
|
184
|
+
**If user selects "Visualize / Share":** Run `/babel-fish:visualize {stories_path}/{slug}.architecture.md` and prefer the shareable HTML flow when browser viewing or sharing is useful and `share-html` is configured. Otherwise render the terminal mind map. After rendering or sharing, return to this handoff with the remaining options.
|
|
185
|
+
|
|
183
186
|
**If pipeline mode (`$BRAINSTORM_PATH` set):**
|
|
184
187
|
Complete without asking. Output paths for downstream consumers:
|
|
185
188
|
```
|
|
@@ -291,13 +291,13 @@ Ask the user what to do next.
|
|
|
291
291
|
- Prefer the harness's structured choice UI if available
|
|
292
292
|
- Otherwise present this short plain-text choice list:
|
|
293
293
|
1. **Proceed to /plan** — Turn these decisions into an implementation plan
|
|
294
|
-
2. **Visualize** —
|
|
294
|
+
2. **Visualize / Share** — Prefer a shareable HTML mind map when sharing is configured; otherwise render in the terminal
|
|
295
295
|
3. **Keep exploring** — More questions or refine decisions before moving on
|
|
296
296
|
4. **Done for now** — Return later; to plan: `/plan {brainstorm-path}`
|
|
297
297
|
|
|
298
298
|
**If user selects "Proceed to /plan":** Suggest running `/plan {brainstorm-path}`.
|
|
299
299
|
|
|
300
|
-
**If user selects "Visualize":** Run `/babel-fish:visualize {brainstorm-path}`
|
|
300
|
+
**If user selects "Visualize / Share":** Run `/babel-fish:visualize {brainstorm-path}` and prefer the shareable HTML flow when browser viewing or sharing is useful and `share-html` is configured. Otherwise render the terminal mind map. After rendering or sharing, return to this handoff with the remaining options.
|
|
301
301
|
|
|
302
302
|
**If user selects "Keep exploring":** Return to Phase 3 and continue asking questions one at a time. When satisfied, update the document and return to this handoff.
|
|
303
303
|
|
|
@@ -283,13 +283,13 @@ Ask the user what to do next.
|
|
|
283
283
|
- Prefer the harness's structured choice UI if available
|
|
284
284
|
- Otherwise present this short plain-text choice list:
|
|
285
285
|
1. **Start /work (Recommended)** — Begin implementing this plan
|
|
286
|
-
2. **Visualize** —
|
|
286
|
+
2. **Visualize / Share** — Prefer a shareable HTML mind map when sharing is configured; otherwise render in the terminal
|
|
287
287
|
3. **Review and refine** — Adjust the plan based on feedback
|
|
288
288
|
4. **Done for now** — Return later; to start: `/work {plan-path}`
|
|
289
289
|
|
|
290
290
|
**If user selects "Start /work":** Suggest running `/work {plan-path}`.
|
|
291
291
|
|
|
292
|
-
**If user selects "Visualize":** Run `/babel-fish:visualize {plan-path}`
|
|
292
|
+
**If user selects "Visualize / Share":** Run `/babel-fish:visualize {plan-path}` and prefer the shareable HTML flow when browser viewing or sharing is useful and `share-html` is configured. Otherwise render the terminal mind map. After rendering or sharing, return to this handoff with the remaining options.
|
|
293
293
|
|
|
294
294
|
**If user selects "Review and refine":** Accept feedback, update the plan, then present these options again.
|
|
295
295
|
|
package/plugins/marvin/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> "Here I am, brain the size of a planet, and they ask me to review your code. Call that job satisfaction? 'Cause I don't."
|
|
4
4
|
|
|
5
|
-
A quality plugin for Claude Code.
|
|
5
|
+
A quality plugin for Claude Code. Ten skills for the unglamorous work that compounds: executing plans, reviewing code, documenting solutions, scaffolding projects, writing failing tests, adversarial review, keeping copy clean, publishing browser-viewable artifacts, and controlling the local share server lifecycle.
|
|
6
6
|
|
|
7
7
|
## Skills
|
|
8
8
|
|
|
@@ -35,6 +35,9 @@ Set up or adopt a local share server for browser-viewable coding-agent artifacts
|
|
|
35
35
|
### `/marvin:share-html`
|
|
36
36
|
Publish a local HTML file or static site directory to the configured share server and return a browser URL. Supports a single `.html` file or a directory containing `index.html`.
|
|
37
37
|
|
|
38
|
+
### `/marvin:share-server-control`
|
|
39
|
+
Control the local share server after setup. Use it to check status, start or stop the macOS LaunchAgent-backed reference server, restart it, or enable or disable private Tailscale viewer exposure.
|
|
40
|
+
|
|
38
41
|
## Agents
|
|
39
42
|
|
|
40
43
|
| Agent | Focus |
|
|
@@ -10,15 +10,21 @@ Publish browser-viewable artifacts to the local share server.
|
|
|
10
10
|
|
|
11
11
|
## Use this skill when
|
|
12
12
|
|
|
13
|
-
- the user generated an HTML report or
|
|
13
|
+
- the user generated an HTML report, preview, or visualization and wants a stable URL
|
|
14
14
|
- the user wants to open output in a browser on another device
|
|
15
15
|
- the user wants a share flow that works across coding agents
|
|
16
|
+
- another shared skill produced HTML as a derived artifact and now needs publication
|
|
16
17
|
|
|
17
18
|
## Supported inputs
|
|
18
19
|
|
|
19
20
|
- a single `.html` file
|
|
20
21
|
- a directory containing `index.html`
|
|
21
22
|
|
|
23
|
+
Common producers include:
|
|
24
|
+
- handcrafted HTML reports
|
|
25
|
+
- static-site outputs
|
|
26
|
+
- HTML mind maps or structured document previews generated from brainstorms, plans, or architecture docs
|
|
27
|
+
|
|
22
28
|
If the server is not configured yet, stop and run `share-server-setup` first.
|
|
23
29
|
|
|
24
30
|
## Default workflow
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: share-server-control
|
|
3
|
+
description: Control the local share server lifecycle after setup. Use when the user wants to check status, start or stop the local share server, restart it, or enable or disable private Tailscale viewer exposure.
|
|
4
|
+
compatibility: Requires macOS LaunchAgent-based reference server management in v1. Optional Tailscale CLI support for enabling or disabling private viewer exposure.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Share Server Control
|
|
8
|
+
|
|
9
|
+
Control the local share server after it has been set up.
|
|
10
|
+
|
|
11
|
+
## Use this skill when
|
|
12
|
+
|
|
13
|
+
- the user wants to know whether the share server is running
|
|
14
|
+
- the user wants to start, stop, or restart the local server
|
|
15
|
+
- the user wants to enable or disable private Tailscale viewer exposure
|
|
16
|
+
- the user wants the current health/status without re-running setup
|
|
17
|
+
|
|
18
|
+
## Boundaries
|
|
19
|
+
|
|
20
|
+
This skill may:
|
|
21
|
+
- inspect the current config and server health
|
|
22
|
+
- control the macOS LaunchAgent for the reference server
|
|
23
|
+
- inspect or change Tailscale Serve viewer exposure
|
|
24
|
+
|
|
25
|
+
This skill may not:
|
|
26
|
+
- replace first-time setup
|
|
27
|
+
- expose the publish/admin API remotely
|
|
28
|
+
- enable Funnel/public internet access by default
|
|
29
|
+
|
|
30
|
+
## Recommended commands
|
|
31
|
+
|
|
32
|
+
### Status
|
|
33
|
+
```bash
|
|
34
|
+
bash scripts/status.sh
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Start the local server
|
|
38
|
+
```bash
|
|
39
|
+
bash scripts/start.sh
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Stop the local server
|
|
43
|
+
```bash
|
|
44
|
+
bash scripts/stop.sh
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Restart the local server
|
|
48
|
+
```bash
|
|
49
|
+
bash scripts/restart.sh
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Enable private viewer exposure over Tailscale
|
|
53
|
+
```bash
|
|
54
|
+
bash scripts/enable-viewer.sh --public-base-url "https://<machine>.<tailnet>.ts.net"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Disable private viewer exposure over Tailscale
|
|
58
|
+
```bash
|
|
59
|
+
bash scripts/disable-viewer.sh
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Notes
|
|
63
|
+
|
|
64
|
+
- In v1, lifecycle control assumes the reference server was installed as a macOS LaunchAgent.
|
|
65
|
+
- If the user has not set up the server yet, stop and use `share-server-setup` first.
|
|
66
|
+
- `status.sh` is the safest first command because it shows LaunchAgent state, health, and Tailscale Serve status together.
|
|
67
|
+
|
|
68
|
+
## Available scripts
|
|
69
|
+
|
|
70
|
+
- `scripts/status.sh` — show LaunchAgent, health, and viewer exposure status
|
|
71
|
+
- `scripts/start.sh` — load the LaunchAgent and start the local share server
|
|
72
|
+
- `scripts/stop.sh` — unload the LaunchAgent and stop the local share server
|
|
73
|
+
- `scripts/restart.sh` — restart the LaunchAgent cleanly
|
|
74
|
+
- `scripts/enable-viewer.sh` — enable private Tailscale Serve exposure for the viewer listener
|
|
75
|
+
- `scripts/disable-viewer.sh` — turn off private Tailscale Serve exposure
|
|
76
|
+
|
|
77
|
+
## References
|
|
78
|
+
|
|
79
|
+
- `docs/usage.md`
|
|
80
|
+
- `docs/troubleshooting.md`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
TAILSCALE_BIN="${TAILSCALE_BIN:-tailscale}"
|
|
5
|
+
|
|
6
|
+
while [[ $# -gt 0 ]]; do
|
|
7
|
+
case "$1" in
|
|
8
|
+
--help)
|
|
9
|
+
cat <<'EOF'
|
|
10
|
+
Usage: disable-viewer.sh
|
|
11
|
+
|
|
12
|
+
Disable private Tailscale Serve exposure for the viewer listener.
|
|
13
|
+
EOF
|
|
14
|
+
exit 0
|
|
15
|
+
;;
|
|
16
|
+
*) echo "Unknown argument: $1" >&2; exit 1 ;;
|
|
17
|
+
esac
|
|
18
|
+
done
|
|
19
|
+
|
|
20
|
+
"$TAILSCALE_BIN" serve --https=443 off
|
|
21
|
+
echo '{"ok":true,"action":"disable-viewer"}'
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
PLIST_PATH="${PLIST_PATH:-$HOME/Library/LaunchAgents/com.heart-of-gold.share-server.plist}"
|
|
5
|
+
|
|
6
|
+
while [[ $# -gt 0 ]]; do
|
|
7
|
+
case "$1" in
|
|
8
|
+
--help)
|
|
9
|
+
cat <<'EOF'
|
|
10
|
+
Usage: start.sh
|
|
11
|
+
|
|
12
|
+
Load the macOS LaunchAgent for the local share server.
|
|
13
|
+
EOF
|
|
14
|
+
exit 0
|
|
15
|
+
;;
|
|
16
|
+
*) echo "Unknown argument: $1" >&2; exit 1 ;;
|
|
17
|
+
esac
|
|
18
|
+
done
|
|
19
|
+
|
|
20
|
+
launchctl unload "$PLIST_PATH" 2>/dev/null || true
|
|
21
|
+
launchctl load "$PLIST_PATH"
|
|
22
|
+
echo "{\"ok\":true,\"action\":\"start\",\"plistPath\":\"$PLIST_PATH\"}"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
CONFIG_PATH="${CONFIG_PATH:-$HOME/.agent-share/config.json}"
|
|
5
|
+
PLIST_PATH="${PLIST_PATH:-$HOME/Library/LaunchAgents/com.heart-of-gold.share-server.plist}"
|
|
6
|
+
TAILSCALE_BIN="${TAILSCALE_BIN:-tailscale}"
|
|
7
|
+
|
|
8
|
+
while [[ $# -gt 0 ]]; do
|
|
9
|
+
case "$1" in
|
|
10
|
+
--config) CONFIG_PATH="$2"; shift 2 ;;
|
|
11
|
+
--help)
|
|
12
|
+
cat <<'EOF'
|
|
13
|
+
Usage: status.sh [--config PATH]
|
|
14
|
+
|
|
15
|
+
Show LaunchAgent state, server health, and Tailscale Serve status for the local share server.
|
|
16
|
+
EOF
|
|
17
|
+
exit 0
|
|
18
|
+
;;
|
|
19
|
+
*) echo "Unknown argument: $1" >&2; exit 1 ;;
|
|
20
|
+
esac
|
|
21
|
+
done
|
|
22
|
+
|
|
23
|
+
python3 - <<'PY' "$CONFIG_PATH" "$PLIST_PATH" "$TAILSCALE_BIN"
|
|
24
|
+
import json, os, subprocess, sys, urllib.request
|
|
25
|
+
config_path, plist_path, tailscale = sys.argv[1], sys.argv[2], sys.argv[3]
|
|
26
|
+
result = {
|
|
27
|
+
'ok': True,
|
|
28
|
+
'configPath': config_path,
|
|
29
|
+
'launchAgent': {
|
|
30
|
+
'plistPath': plist_path,
|
|
31
|
+
'exists': os.path.exists(plist_path),
|
|
32
|
+
'loaded': False,
|
|
33
|
+
},
|
|
34
|
+
'health': None,
|
|
35
|
+
'tailscaleServe': {
|
|
36
|
+
'available': False,
|
|
37
|
+
'status': None,
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
if result['launchAgent']['exists']:
|
|
41
|
+
try:
|
|
42
|
+
proc = subprocess.run(['launchctl', 'list', 'com.heart-of-gold.share-server'], capture_output=True, text=True)
|
|
43
|
+
result['launchAgent']['loaded'] = proc.returncode == 0
|
|
44
|
+
except Exception:
|
|
45
|
+
pass
|
|
46
|
+
if os.path.exists(config_path):
|
|
47
|
+
with open(config_path, 'r', encoding='utf-8') as f:
|
|
48
|
+
cfg = json.load(f)
|
|
49
|
+
url = cfg['server']['apiUrl'].rstrip('/') + '/health'
|
|
50
|
+
try:
|
|
51
|
+
with urllib.request.urlopen(url, timeout=3) as resp:
|
|
52
|
+
result['health'] = json.loads(resp.read().decode('utf-8'))
|
|
53
|
+
except Exception as exc:
|
|
54
|
+
result['health'] = {'ok': False, 'error': str(exc)}
|
|
55
|
+
try:
|
|
56
|
+
proc = subprocess.run([tailscale, 'serve', 'status'], capture_output=True, text=True)
|
|
57
|
+
result['tailscaleServe']['available'] = proc.returncode == 0
|
|
58
|
+
result['tailscaleServe']['status'] = (proc.stdout or proc.stderr).strip()
|
|
59
|
+
except FileNotFoundError:
|
|
60
|
+
result['tailscaleServe']['available'] = False
|
|
61
|
+
print(json.dumps(result, indent=2))
|
|
62
|
+
PY
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
PLIST_PATH="${PLIST_PATH:-$HOME/Library/LaunchAgents/com.heart-of-gold.share-server.plist}"
|
|
5
|
+
|
|
6
|
+
while [[ $# -gt 0 ]]; do
|
|
7
|
+
case "$1" in
|
|
8
|
+
--help)
|
|
9
|
+
cat <<'EOF'
|
|
10
|
+
Usage: stop.sh
|
|
11
|
+
|
|
12
|
+
Unload the macOS LaunchAgent for the local share server.
|
|
13
|
+
EOF
|
|
14
|
+
exit 0
|
|
15
|
+
;;
|
|
16
|
+
*) echo "Unknown argument: $1" >&2; exit 1 ;;
|
|
17
|
+
esac
|
|
18
|
+
done
|
|
19
|
+
|
|
20
|
+
launchctl unload "$PLIST_PATH" 2>/dev/null || true
|
|
21
|
+
echo "{\"ok\":true,\"action\":\"stop\",\"plistPath\":\"$PLIST_PATH\"}"
|
package/src/index.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { shareServerCommand } from "./commands/share-server";
|
|
|
8
8
|
const main = defineCommand({
|
|
9
9
|
meta: {
|
|
10
10
|
name: "heart-of-gold",
|
|
11
|
-
version: "0.1.
|
|
11
|
+
version: "0.1.32",
|
|
12
12
|
description:
|
|
13
13
|
"Cross-platform installer for Heart of Gold skills — Codex, OpenCode, Pi, Claude Code, and more",
|
|
14
14
|
},
|