@goondocks/myco 0.4.1 → 0.4.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.
Files changed (49) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CONTRIBUTING.md +4 -5
  4. package/README.md +1 -1
  5. package/dist/{chunk-P7RNAYU7.js → chunk-67R6EMYD.js} +61 -9
  6. package/dist/chunk-67R6EMYD.js.map +1 -0
  7. package/dist/{chunk-XHWIIU5D.js → chunk-GFBG73P4.js} +2 -2
  8. package/dist/{chunk-IVS5MYBL.js → chunk-IYFKPSRP.js} +2 -2
  9. package/dist/{cli-IGZA3TZC.js → cli-PMOFCZQL.js} +14 -14
  10. package/dist/{detect-providers-5FU3BN5Q.js → detect-providers-IRL2TTLK.js} +2 -2
  11. package/dist/{init-M3GDZRKI.js → init-NUF5UBUJ.js} +3 -3
  12. package/dist/{main-3JSO25IZ.js → main-2XEBVUR6.js} +3 -3
  13. package/dist/{rebuild-MW4GCY6Z.js → rebuild-E6YFIRYZ.js} +3 -3
  14. package/dist/{reprocess-SWRFIIDZ.js → reprocess-7G7KQWCN.js} +4 -4
  15. package/dist/{restart-5UY2KV54.js → restart-ABW4ZK3P.js} +3 -3
  16. package/dist/{search-IYVMRZU2.js → search-MPD7SFK6.js} +3 -3
  17. package/dist/{server-FSUSHJ3Y.js → server-NZLZRITH.js} +3 -3
  18. package/dist/{setup-digest-6TK5SPS6.js → setup-digest-K732MGOJ.js} +3 -3
  19. package/dist/{setup-llm-UGZBURZJ.js → setup-llm-XCCH5LYD.js} +3 -3
  20. package/dist/src/cli.js +1 -1
  21. package/dist/src/daemon/main.js +1 -1
  22. package/dist/src/mcp/server.js +1 -1
  23. package/dist/{stats-IVIXIKTS.js → stats-6G7SN5YZ.js} +3 -3
  24. package/dist/{verify-WEGRM4W2.js → verify-JFHQH55Z.js} +3 -3
  25. package/package.json +1 -1
  26. package/skills/myco/SKILL.md +5 -1
  27. package/skills/myco/references/cli-usage.md +322 -0
  28. package/skills/myco/references/vault-status.md +224 -0
  29. package/skills/setup/SKILL.md +146 -0
  30. package/skills/setup/references/model-recommendations.md +77 -0
  31. package/commands/init.md +0 -122
  32. package/commands/setup-llm.md +0 -114
  33. package/commands/status.md +0 -130
  34. package/dist/chunk-P7RNAYU7.js.map +0 -1
  35. /package/dist/{chunk-XHWIIU5D.js.map → chunk-GFBG73P4.js.map} +0 -0
  36. /package/dist/{chunk-IVS5MYBL.js.map → chunk-IYFKPSRP.js.map} +0 -0
  37. /package/dist/{cli-IGZA3TZC.js.map → cli-PMOFCZQL.js.map} +0 -0
  38. /package/dist/{detect-providers-5FU3BN5Q.js.map → detect-providers-IRL2TTLK.js.map} +0 -0
  39. /package/dist/{init-M3GDZRKI.js.map → init-NUF5UBUJ.js.map} +0 -0
  40. /package/dist/{main-3JSO25IZ.js.map → main-2XEBVUR6.js.map} +0 -0
  41. /package/dist/{rebuild-MW4GCY6Z.js.map → rebuild-E6YFIRYZ.js.map} +0 -0
  42. /package/dist/{reprocess-SWRFIIDZ.js.map → reprocess-7G7KQWCN.js.map} +0 -0
  43. /package/dist/{restart-5UY2KV54.js.map → restart-ABW4ZK3P.js.map} +0 -0
  44. /package/dist/{search-IYVMRZU2.js.map → search-MPD7SFK6.js.map} +0 -0
  45. /package/dist/{server-FSUSHJ3Y.js.map → server-NZLZRITH.js.map} +0 -0
  46. /package/dist/{setup-digest-6TK5SPS6.js.map → setup-digest-K732MGOJ.js.map} +0 -0
  47. /package/dist/{setup-llm-UGZBURZJ.js.map → setup-llm-XCCH5LYD.js.map} +0 -0
  48. /package/dist/{stats-IVIXIKTS.js.map → stats-6G7SN5YZ.js.map} +0 -0
  49. /package/dist/{verify-WEGRM4W2.js.map → verify-JFHQH55Z.js.map} +0 -0
@@ -0,0 +1,322 @@
1
+ # Myco CLI Reference
2
+
3
+ All CLI commands are invoked as:
4
+
5
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js <command> [flags]
6
+
7
+ Where `${CLAUDE_PLUGIN_ROOT}` resolves to the plugin root directory (set by the agent automatically).
8
+
9
+ ---
10
+
11
+ ## Setup Commands
12
+
13
+ ### `init` — Create vault structure and base config
14
+
15
+ Initializes a new Myco vault. Skipped automatically if the vault is already initialized.
16
+
17
+ | Flag | Type | Description |
18
+ |------|------|-------------|
19
+ | `--vault <path>` | string | Custom vault directory (supports `~/` expansion) |
20
+ | `--llm-provider <name>` | string | `ollama`, `lm-studio`, or `anthropic` |
21
+ | `--llm-model <name>` | string | Model name |
22
+ | `--llm-url <url>` | string | Provider base URL |
23
+ | `--embedding-provider <name>` | string | `ollama` or `lm-studio` |
24
+ | `--embedding-model <name>` | string | Embedding model name |
25
+ | `--embedding-url <url>` | string | Embedding provider base URL |
26
+ | `--user <name>` | string | Username for team-enabled vault |
27
+ | `--team` | boolean | Enable team collaboration mode |
28
+ | `--tiers <csv>` | string | Comma-separated digest tier list (e.g., `1500,3000,5000`) |
29
+ | `--inject-tier <number>` | number | Tier to auto-inject at session start |
30
+ | `--context-window <number>` | number | Context window size for digest operations |
31
+
32
+ **Example:**
33
+
34
+ ```sh
35
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js init \
36
+ --llm-provider ollama \
37
+ --llm-model qwen2.5-coder:14b \
38
+ --embedding-provider ollama \
39
+ --embedding-model nomic-embed-text
40
+ ```
41
+
42
+ ---
43
+
44
+ ### `setup-llm` — Change LLM and embedding provider settings
45
+
46
+ Reconfigures intelligence backend without reinitializing the vault.
47
+
48
+ | Flag | Type | Description |
49
+ |------|------|-------------|
50
+ | `--llm-provider <name>` | string | Provider name (`ollama`, `lm-studio`, `anthropic`) |
51
+ | `--llm-model <name>` | string | Model name |
52
+ | `--llm-url <url>` | string | Provider base URL |
53
+ | `--llm-context-window <number>` | number | Context window in tokens |
54
+ | `--llm-max-tokens <number>` | number | Max output tokens |
55
+ | `--embedding-provider <name>` | string | Embedding provider name |
56
+ | `--embedding-model <name>` | string | Embedding model name |
57
+ | `--embedding-url <url>` | string | Embedding base URL |
58
+ | `--show` | boolean | Display current settings and exit |
59
+
60
+ Note: changing the embedding model requires running `rebuild` afterward to re-embed all vault notes with the new model.
61
+
62
+ **Example:**
63
+
64
+ ```sh
65
+ # Show current settings
66
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js setup-llm --show
67
+
68
+ # Switch to Anthropic
69
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js setup-llm \
70
+ --llm-provider anthropic \
71
+ --llm-model claude-opus-4-5
72
+ ```
73
+
74
+ ---
75
+
76
+ ### `setup-digest` — Configure digest and capture settings
77
+
78
+ Controls the continuous reasoning system: metabolism timing, tier configuration, and per-operation token budgets.
79
+
80
+ | Flag | Type | Description |
81
+ |------|------|-------------|
82
+ | `--enabled <true\|false>` | boolean | Enable or disable digest |
83
+ | `--tiers <csv>` | string | Comma-separated token tier list |
84
+ | `--inject-tier <number\|null>` | number\|null | Auto-inject tier at session start (`null` to disable) |
85
+ | `--provider <name\|null>` | string\|null | Digest-specific provider (`null` = inherit from main LLM) |
86
+ | `--model <name\|null>` | string\|null | Digest-specific model (`null` = inherit) |
87
+ | `--base-url <url\|null>` | string\|null | Digest provider base URL (`null` = inherit) |
88
+ | `--context-window <number>` | number | Context window for digest |
89
+ | `--keep-alive <duration>` | string | Keep model loaded (Ollama only, e.g., `30m`) |
90
+ | `--gpu-kv-cache <true\|false>` | boolean | GPU KV cache offload (LM Studio only) |
91
+ | `--active-interval <seconds>` | number | Metabolism active processing interval |
92
+ | `--dormancy-threshold <seconds>` | number | Time before entering dormancy |
93
+ | `--max-notes <number>` | number | Max substrate notes per digest cycle |
94
+ | `--extraction-tokens <number>` | number | Max tokens for spore extraction |
95
+ | `--summary-tokens <number>` | number | Max tokens for session summaries |
96
+ | `--title-tokens <number>` | number | Max tokens for session titles |
97
+ | `--classification-tokens <number>` | number | Max tokens for artifact classification |
98
+ | `--show` | boolean | Display current settings and exit |
99
+
100
+ **Example:**
101
+
102
+ ```sh
103
+ # Show current digest config
104
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js setup-digest --show
105
+
106
+ # Use a faster model just for digest, with shorter active interval
107
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js setup-digest \
108
+ --model qwen2.5:7b \
109
+ --active-interval 120 \
110
+ --dormancy-threshold 600
111
+ ```
112
+
113
+ ---
114
+
115
+ ### `config get/set` — Read/write individual config keys
116
+
117
+ Direct access to vault config via dot-path notation. Values are parsed as JSON first, then fall back to raw strings.
118
+
119
+ **Usage:**
120
+
121
+ ```sh
122
+ # Read a value
123
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js config get intelligence.llm.model
124
+
125
+ # Write a value
126
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js config set intelligence.llm.model qwen2.5-coder:14b
127
+
128
+ # Write a non-string value (parsed as JSON)
129
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js config set digest.enabled true
130
+ ```
131
+
132
+ Restart the daemon after changes: `node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js restart`
133
+
134
+ ---
135
+
136
+ ## Diagnostic Commands
137
+
138
+ ### `detect-providers` — Probe available LLM providers
139
+
140
+ Checks Ollama, LM Studio, and Anthropic for availability and lists discovered models.
141
+
142
+ No flags.
143
+
144
+ Output is JSON:
145
+
146
+ ```json
147
+ {
148
+ "ollama": { "available": true, "models": ["qwen2.5-coder:14b", "nomic-embed-text"] },
149
+ "lm-studio": { "available": false, "models": [] },
150
+ "anthropic": { "available": true, "models": [] }
151
+ }
152
+ ```
153
+
154
+ ---
155
+
156
+ ### `verify` — Test LLM and embedding connectivity
157
+
158
+ Sends a test prompt to the LLM and a test embed to the embedding provider. Exits 0 if both pass, 1 if either fails.
159
+
160
+ No flags.
161
+
162
+ ```sh
163
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js verify
164
+ ```
165
+
166
+ ---
167
+
168
+ ### `stats` — Vault health and daemon status
169
+
170
+ Shows session/spore/plan counts, spore type breakdown, vector count, and daemon PID/port.
171
+
172
+ No flags.
173
+
174
+ ```sh
175
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js stats
176
+ ```
177
+
178
+ Typical output:
179
+
180
+ ```
181
+ Sessions: 12
182
+ Spores: 47 (decision: 15, gotcha: 12, trade_off: 8, discovery: 7, bug_fix: 5)
183
+ Plans: 2
184
+ Vectors: 61
185
+
186
+ Daemon: PID 38291 on port 60942 (2 active sessions)
187
+ ```
188
+
189
+ ---
190
+
191
+ ### `logs` — Tail, filter, and follow daemon logs
192
+
193
+ | Flag | Type | Description |
194
+ |------|------|-------------|
195
+ | `-f` / `--follow` | boolean | Watch for new log entries (blocks until Ctrl+C) |
196
+ | `-n` / `--tail <number>` | number | Number of lines to show (default: 100) |
197
+ | `-l` / `--level <level>` | string | Filter by level: `debug`, `info`, `warning`, `error` |
198
+ | `-c` / `--component <name>` | string | Filter by component |
199
+ | `--since <timestamp>` | string | Show logs after ISO timestamp |
200
+ | `--until <timestamp>` | string | Show logs before ISO timestamp |
201
+
202
+ Components: `processor`, `embeddings`, `hooks`, `lifecycle`, `daemon`, `lineage`, `watcher`
203
+
204
+ **Examples:**
205
+
206
+ ```sh
207
+ # Show last 20 lines
208
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js logs -n 20
209
+
210
+ # Follow errors from the processor
211
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js logs -f -l error -c processor
212
+
213
+ # Show logs from a specific window
214
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js logs \
215
+ --since 2025-01-01T10:00:00Z \
216
+ --until 2025-01-01T11:00:00Z
217
+ ```
218
+
219
+ ---
220
+
221
+ ## Query Commands
222
+
223
+ ### `search <query>` — Combined semantic + FTS search
224
+
225
+ Runs semantic search (primary) with FTS fallback across sessions, spores, and plans.
226
+
227
+ ```sh
228
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js search "why did we choose sqlite over postgres"
229
+ ```
230
+
231
+ ---
232
+
233
+ ### `vectors <query>` — Raw vector similarity scores
234
+
235
+ Shows all results with similarity scores and no threshold filtering. Useful for tuning embedding thresholds.
236
+
237
+ ```sh
238
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js vectors "session lifecycle hooks"
239
+ ```
240
+
241
+ ---
242
+
243
+ ### `session [id|latest]` — Display a session note
244
+
245
+ | Argument | Description |
246
+ |----------|-------------|
247
+ | `latest` | Show the most recent session (default if omitted) |
248
+ | `<id>` | Session ID substring — matches the first session containing the substring |
249
+
250
+ ```sh
251
+ # Show latest session
252
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js session
253
+
254
+ # Show a specific session by partial ID
255
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js session ac5220
256
+ ```
257
+
258
+ ---
259
+
260
+ ## Maintenance Commands
261
+
262
+ ### `restart` — Kill and respawn the daemon
263
+
264
+ Sends SIGTERM to the running daemon, waits for it to exit, and spawns a fresh instance with a health check.
265
+
266
+ No flags.
267
+
268
+ ```sh
269
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js restart
270
+ ```
271
+
272
+ Run this after any daemon code changes to pick up new behavior.
273
+
274
+ ---
275
+
276
+ ### `rebuild` — Full FTS + vector reindex
277
+
278
+ Re-indexes all vault notes. Superseded and archived spores are skipped.
279
+
280
+ No flags.
281
+
282
+ ```sh
283
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js rebuild
284
+ ```
285
+
286
+ Run this after changing the embedding model (via `setup-llm`) to regenerate all embeddings with the new model.
287
+
288
+ ---
289
+
290
+ ### `reprocess` — Re-extract observations from transcripts
291
+
292
+ Re-reads session transcripts, re-extracts observations with the current LLM, and re-indexes. Existing spores are preserved — new extractions are additive.
293
+
294
+ | Flag | Type | Description |
295
+ |------|------|-------------|
296
+ | `--session <id>` | string | Session ID substring — reprocess only matching sessions |
297
+ | `--index-only` | boolean | Skip LLM extraction, FTS-only reindex |
298
+
299
+ **Examples:**
300
+
301
+ ```sh
302
+ # Reprocess all sessions
303
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js reprocess
304
+
305
+ # Reprocess one session
306
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js reprocess --session ac5220
307
+
308
+ # Re-index without re-extracting
309
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js reprocess --index-only
310
+ ```
311
+
312
+ ---
313
+
314
+ ## Info Commands
315
+
316
+ ### `version` — Show plugin version
317
+
318
+ ```sh
319
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js version
320
+ ```
321
+
322
+ Also available as `--version` or `-v`.
@@ -0,0 +1,224 @@
1
+ # Vault Health Reference
2
+
3
+ This reference guides vault health assessment. Use it whenever you need to inspect the state of the Myco vault — whether debugging a problem, responding to a user's question about their vault, or running a routine check.
4
+
5
+ **Primary data source:** `node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js stats`
6
+
7
+ Supplement with `logs` for recent daemon activity and direct file checks for digest status.
8
+
9
+ ---
10
+
11
+ ## Running Stats
12
+
13
+ Run the stats command to get a snapshot of vault state:
14
+
15
+ ```sh
16
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js stats
17
+ ```
18
+
19
+ The output includes:
20
+
21
+ - **Session/spore/plan counts** — total notes in each category
22
+ - **Spore type breakdown** — counts per observation type (decision, gotcha, trade_off, discovery, bug_fix, etc.)
23
+ - **Vector count** — number of indexed embeddings
24
+ - **Daemon PID/port/active sessions** — runtime state
25
+
26
+ Typical output looks like:
27
+
28
+ ```
29
+ Sessions: 12
30
+ Spores: 47 (decision: 15, gotcha: 12, trade_off: 8, discovery: 7, bug_fix: 5)
31
+ Plans: 2
32
+ Vectors: 61
33
+
34
+ Daemon: PID 38291 on port 60942 (2 active sessions)
35
+ ```
36
+
37
+ If the command fails or returns no output, the daemon may not be running or the vault may not be configured. Check daemon status next.
38
+
39
+ ---
40
+
41
+ ## Daemon Health
42
+
43
+ The daemon runs as a background HTTP process. Its state is persisted in `<vault>/daemon.json`.
44
+
45
+ **To check daemon status:**
46
+
47
+ 1. Read `<vault>/daemon.json` for the PID and port.
48
+ 2. Verify the PID is alive: `kill -0 <pid>` returns 0 if running.
49
+ 3. HTTP health check: `curl http://localhost:<port>/health`
50
+
51
+ **If the daemon is not running:**
52
+
53
+ > "Daemon not running. It will start automatically on next session."
54
+
55
+ You can also restart it manually:
56
+
57
+ ```sh
58
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js restart
59
+ ```
60
+
61
+ Do not treat a stopped daemon as a vault error — it is normal between sessions. The daemon starts on demand when a session begins.
62
+
63
+ ---
64
+
65
+ ## Digest Status
66
+
67
+ The digest system synthesizes vault knowledge into pre-computed context extracts. Check its state with direct file inspection.
68
+
69
+ **Is digest enabled?**
70
+
71
+ Read `digest.enabled` from `<vault>/myco.yaml`. If false or absent, skip digest checks.
72
+
73
+ **Which extracts exist?**
74
+
75
+ List files in `<vault>/digest/`:
76
+
77
+ - `extract-1500.md` — ~1500 token tier
78
+ - `extract-3000.md` — ~3000 token tier
79
+ - `extract-5000.md` — ~5000 token tier
80
+ - `extract-10000.md` — ~10000 token tier
81
+
82
+ Report each file's size and last-modified timestamp. Missing tiers mean the digest has not yet run for that tier, or the tier is not configured.
83
+
84
+ **Last digest cycle:**
85
+
86
+ Read the last line of `<vault>/digest/trace.jsonl`. Each line is a JSON object with:
87
+
88
+ - `cycleId` — short identifier for the cycle
89
+ - `timestamp` — ISO timestamp of when the cycle ran
90
+ - `tiersGenerated` — which tiers were written
91
+ - `substrateCount` — number of vault notes processed as input
92
+ - `durationMs` — how long the cycle took
93
+
94
+ **Metabolism config:**
95
+
96
+ From `myco.yaml`, report:
97
+
98
+ - Configured tiers (e.g., `[1500, 3000, 5000, 10000]`)
99
+ - Inject tier — which tier is injected at session start
100
+ - Context window size
101
+ - Digest model — if `digest.intelligence.model` is set, report it; otherwise note "inherits from main LLM"
102
+
103
+ ---
104
+
105
+ ## Intelligence Backend Health
106
+
107
+ Test connectivity to the configured LLM and embedding providers:
108
+
109
+ ```sh
110
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js verify
111
+ ```
112
+
113
+ This reports whether the LLM provider and embedding provider are reachable. If either is unreachable:
114
+
115
+ - Check that the provider process is running (Ollama, LM Studio, etc.)
116
+ - Review the model name in `myco.yaml` for typos
117
+ - Re-run configuration with the appropriate CLI setup command
118
+
119
+ ---
120
+
121
+ ## Issue Detection
122
+
123
+ Check for these problems when assessing vault health:
124
+
125
+ | Issue | How to detect | Meaning |
126
+ |-------|--------------|---------|
127
+ | **Stale buffers** | `.jsonl` files in `<vault>/buffer/` older than 24 hours | Events were captured but never processed — LLM may have been unavailable |
128
+ | **Missing index** | `<vault>/index.db` does not exist | FTS search will not work; suggest `node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js rebuild` |
129
+ | **Missing vectors** | `<vault>/vectors.db` does not exist | Semantic search disabled; embeddings may be unconfigured |
130
+ | **Old config version** | `version` in `myco.yaml` is less than `2` | Vault may need migration; suggest running `/myco-setup` |
131
+
132
+ Report all issues found, or "None found." if the vault is clean.
133
+
134
+ ---
135
+
136
+ ## Recent Activity
137
+
138
+ View recent daemon log output:
139
+
140
+ ```sh
141
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js logs -n 20
142
+ ```
143
+
144
+ This shows the last 20 lines of daemon logs — useful for spotting errors, slow processing, or repeated failures.
145
+
146
+ Also report the last 3 sessions with:
147
+
148
+ - Session ID (short form)
149
+ - Title
150
+ - Started/ended timestamps
151
+ - Number of spores extracted
152
+ - Parent session, if lineage was detected
153
+
154
+ ---
155
+
156
+ ## Report Format
157
+
158
+ Present vault health as a structured report. Always show all sections; use "None" rather than omitting sections with no data.
159
+
160
+ ```
161
+ === Myco Vault ===
162
+ Path: <vault-path>
163
+ Config: v<version>
164
+
165
+ --- Intelligence ---
166
+ LLM: <provider> / <model> (<reachable|unreachable>)
167
+ Embedding: <provider> / <model> (<reachable|unreachable>)
168
+
169
+ --- Daemon ---
170
+ PID: <pid> (<running|stopped>)
171
+ Port: <port>
172
+ Sessions: <count> active
173
+
174
+ --- Vault ---
175
+ Sessions: <count>
176
+ Spores: <total> (<breakdown by type>)
177
+ Plans: <count>
178
+ Vectors: <count>
179
+
180
+ --- Digest ---
181
+ Enabled: <yes|no>
182
+ Tiers: <list>
183
+ Inject: <tier>
184
+ Model: <model> (<inherited|configured>)
185
+ Last cycle: <id> (<time ago>, <tiers>, <notes>, <duration>)
186
+ Extracts: <tier> (<size>), ...
187
+
188
+ --- Lineage ---
189
+ Links: <count> (<breakdown by type>)
190
+
191
+ --- Recent Sessions ---
192
+ 1. [<id>] "<title>" (<duration>, <spore count> spores)
193
+ 2. [<id>] "<title>" (<duration>, <spore count> spores, parent: <id>)
194
+ 3. [<id>] "<title>" (<duration>, <spore count> spores)
195
+
196
+ --- Issues ---
197
+ <issues or "None found.">
198
+ ```
199
+
200
+ Adapt to what is actually available. If the daemon is stopped, omit PID/port/sessions. If digest is disabled, abbreviate that section. Keep the structure recognizable.
201
+
202
+ ---
203
+
204
+ ## Lineage
205
+
206
+ If `<vault>/lineage.json` exists, report the link count and breakdown:
207
+
208
+ - **clear** — session explicitly resumed a prior session
209
+ - **inferred** — heuristic match based on timing or working directory
210
+ - **semantic_similarity** — matched by content similarity of opening context
211
+
212
+ Lineage tracks parent-child relationships between sessions. A high count of `semantic_similarity` links (relative to `clear`) may indicate sessions that should be explicitly resumed rather than started fresh.
213
+
214
+ ---
215
+
216
+ ## Suggested Actions
217
+
218
+ | Issue | Action |
219
+ |-------|--------|
220
+ | Daemon not running | Will auto-start on next session; or run `node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js restart` |
221
+ | Stale buffers | Check if LLM provider was down during those sessions; events will process on next daemon start |
222
+ | Missing index | Run `node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js rebuild` to regenerate FTS and vector indexes |
223
+ | Provider unreachable | Ensure the provider is running (e.g., `ollama serve`); verify model name in `myco.yaml`; reconfigure with CLI commands |
224
+ | Config version < 2 | Run `/myco-setup` to migrate the vault configuration |
@@ -0,0 +1,146 @@
1
+ ---
2
+ name: setup
3
+ description: >-
4
+ Initialize Myco in a new project — guided first-time setup for vault,
5
+ LLM provider, and intelligence backend
6
+ user-invocable: true
7
+ allowed-tools: Bash, AskUserQuestion, Skill
8
+ ---
9
+
10
+ # Setup — Guided Myco Onboarding
11
+
12
+ This skill guides a first-time Myco setup from zero to a working vault. It detects the system's hardware and available providers, asks one question at a time, and delegates all configuration to CLI commands — never touching config files directly. If a vault already exists, it hands off to the `myco` skill for reconfiguration or status.
13
+
14
+ ## Step 1: Check Vault Existence
15
+
16
+ Run:
17
+
18
+ ```bash
19
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js stats
20
+ ```
21
+
22
+ - If the command **succeeds** (exit code 0): tell the user "Myco is already configured" and invoke the `myco` skill to handle reconfiguration or display status. Stop here — do not continue with the setup flow.
23
+ - If the command **fails** (exit code non-zero or vault not found): proceed to Step 2.
24
+
25
+ ## Step 2: Detect System
26
+
27
+ Run both commands in parallel:
28
+
29
+ ```bash
30
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js detect-providers
31
+ ```
32
+
33
+ Parse the JSON output. The result will list providers and their `available` field (boolean) and available models. Keep this data — you will use it in Step 3.
34
+
35
+ For RAM detection, run the appropriate command for the OS:
36
+
37
+ - **macOS:** `sysctl -n hw.memsize` — result is bytes; divide by `1073741824` (1024³) to get GB
38
+ - **Linux:** parse `/proc/meminfo` for the `MemTotal` line — result is in kB; divide by `1048576` to get GB
39
+
40
+ Use the RAM value to determine the recommended tier from `references/model-recommendations.md`:
41
+
42
+ | RAM | Recommended Intelligence Model | Digest Context Window | Default Inject Tier |
43
+ |-----|--------------------------------|-----------------------|---------------------|
44
+ | 64GB+ | `qwen3.5:35b` | 65536 | 3000 |
45
+ | 32–64GB | `qwen3.5:27b` | 32768 | 3000 |
46
+ | 16–32GB | `qwen3.5:latest` (~10B) | 16384 | 1500 |
47
+ | 8–16GB | `qwen3.5:4b` | 8192 | 1500 |
48
+
49
+ Record: detected RAM (GB), recommended model, digest context window, and default inject tier. You will use these as defaults in the questions below.
50
+
51
+ ## Step 3: Ask Questions
52
+
53
+ Ask one question at a time. Do not batch questions. Wait for each answer before asking the next.
54
+
55
+ ### Question 1: Vault Location
56
+
57
+ Ask the user where to store the vault. Present three choices:
58
+
59
+ - **Project-local** — `.myco/` in the current directory
60
+ - **Centralized** — `~/.myco/vaults/<project-name>/` (where `<project-name>` is the current directory's basename)
61
+ - **Custom path** — the user types a path
62
+
63
+ Record the resolved vault path.
64
+
65
+ ### Question 2: Provider and Model
66
+
67
+ From the `detect-providers` output, list only providers where `available` is `true`. Present them as choices. For each available provider, list its available models.
68
+
69
+ Pre-select the recommended model from Step 2 if it appears in the list. If the recommended model is not installed:
70
+
71
+ - **Ollama:** offer to run `ollama pull <recommended-model>` before continuing. Ask "Pull now or choose a different model?"
72
+ - **LM Studio:** tell the user to open LM Studio, search for `<recommended-model>`, and download it. Offer to wait or to let the user choose a different available model.
73
+
74
+ Record the chosen provider and model.
75
+
76
+ ### Question 3: Embedding Model
77
+
78
+ List embedding models from the chosen provider. Exclude Anthropic — it does not support embeddings.
79
+
80
+ If no embedding models are installed:
81
+
82
+ - **Ollama:** offer to run `ollama pull bge-m3`. If the user accepts, run it before continuing.
83
+ - **LM Studio:** tell the user to search for and download an embedding model (suggest `bge-m3` or any model with `text-embedding` in the name).
84
+
85
+ Recommend `bge-m3` as the default. Record the chosen embedding provider and model.
86
+
87
+ ### Question 4: Inject Tier
88
+
89
+ Show the inject tier options appropriate for the detected RAM, with the default pre-selected:
90
+
91
+ | Tier | Description |
92
+ |------|-------------|
93
+ | 1500 | Executive briefing — fastest, lightest |
94
+ | 3000 | Team standup — recommended for most setups |
95
+ | 5000 | Deep onboarding |
96
+ | 10000 | Institutional knowledge — richest context |
97
+
98
+ Show only the tiers available for the user's RAM tier (per the table in Step 2). Pre-select the default. Tell the user: "Agents can always request a different tier on-demand via the `myco_context` MCP tool."
99
+
100
+ Record the chosen inject tier.
101
+
102
+ ## Step 4: Execute
103
+
104
+ Run the following commands in sequence, substituting the recorded values. Show each command before running it.
105
+
106
+ ```bash
107
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js init \
108
+ --vault <chosen-vault-path> \
109
+ --llm-provider <provider> \
110
+ --llm-model <model> \
111
+ --embedding-provider <embedding-provider> \
112
+ --embedding-model <embedding-model>
113
+ ```
114
+
115
+ ```bash
116
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js setup-digest \
117
+ --context-window <digest-context-window-from-ram-table> \
118
+ --inject-tier <chosen-inject-tier>
119
+ ```
120
+
121
+ ```bash
122
+ node ${CLAUDE_PLUGIN_ROOT}/dist/src/cli.js verify
123
+ ```
124
+
125
+ If any command fails, report the error and stop. Do not continue to the next command on failure. Show the full error output to the user and ask how to proceed.
126
+
127
+ ## Step 5: Report
128
+
129
+ Display a summary table:
130
+
131
+ | Setting | Value |
132
+ |---------|-------|
133
+ | Vault path | `<resolved path>` |
134
+ | Provider | `<provider>` / `<model>` |
135
+ | Embedding | `<embedding-provider>` / `<embedding-model>` |
136
+ | Digest | enabled (context: `<context-window>`, inject: `<inject-tier>`) |
137
+ | RAM detected | `<X>` GB |
138
+
139
+ Tell the user: "Myco is ready. Start a new session to begin capturing knowledge."
140
+
141
+ ## Constraints
142
+
143
+ - All writes via CLI commands — never read or modify `myco.yaml` directly.
144
+ - All provider detection via `detect-providers` — no raw HTTP calls to provider APIs.
145
+ - One question at a time — do not batch questions or present them together.
146
+ - Two model choices in guided setup: intelligence model and embedding model. For a separate dedicated digestion model, direct the user to run `setup-digest` with a `--provider` and `--model` flag after setup completes (see `references/model-recommendations.md` Advanced section).