wicked-brain 0.12.1 → 0.13.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.
@@ -1,6 +1,11 @@
1
1
  ---
2
2
  name: wicked-brain:configure
3
- description: Read brain state and write contextual instructions into the active CLI's agent config file. Run after onboarding, major ingests, or consolidation.
3
+ description: |
4
+ This skill should be used when the user says "configure brain CLI",
5
+ "update CLAUDE.md from brain", "write brain orientation", or
6
+ "regenerate brain config". Reads brain state and writes contextual
7
+ instructions into the active CLI's agent config file. Run after
8
+ onboarding, major ingests, or consolidation.
4
9
  ---
5
10
 
6
11
  # wicked-brain:configure
@@ -9,15 +14,10 @@ Writes a contextual `## wicked-brain` section into the active CLI/IDE's agent co
9
14
 
10
15
  ## Config
11
16
 
12
- Resolve the brain config via the shared resolution in
13
- wicked-brain:init § "Resolving the brain config". In short: try
14
- `~/.wicked-brain/projects/{cwd_basename}/_meta/config.json` first, fall back
15
- to `~/.wicked-brain/_meta/config.json` (legacy flat), else trigger
16
- wicked-brain:init. Read the resolved file for brain path and server port.
17
-
18
- Do NOT read a bare relative `_meta/config.json` — the model will resolve it
19
- against the current working directory and brain files will end up in the
20
- project root.
17
+ Brain discovery + server lifecycle are handled by `wicked-brain-call`. Pass
18
+ `--brain <path>` to override the auto-detected brain, or set
19
+ `WICKED_BRAIN_PATH`. The CLI starts the server on first call (no manual
20
+ init required) and writes an audit record to `{brain}/calls/` per call.
21
21
 
22
22
  ## Process
23
23
 
@@ -25,16 +25,12 @@ project root.
25
25
 
26
26
  1. Call server stats:
27
27
  ```bash
28
- curl -s -X POST http://localhost:{port}/api \
29
- -H "Content-Type: application/json" \
30
- -d '{"action":"stats"}'
28
+ npx wicked-brain-call stats
31
29
  ```
32
30
 
33
31
  2. Search for top topics — run a broad search to identify dominant tags:
34
32
  ```bash
35
- curl -s -X POST http://localhost:{port}/api \
36
- -H "Content-Type: application/json" \
37
- -d '{"action":"search","params":{"query":"*","limit":50}}'
33
+ npx wicked-brain-call search --param query=* --param limit=50
38
34
  ```
39
35
  Read frontmatter of top results, count `contains:` tag frequency. Top 10 tags = brain expertise.
40
36
 
@@ -15,8 +15,9 @@ You adjust the confidence score of a brain link based on user feedback.
15
15
 
16
16
  ## Cross-Platform Notes
17
17
 
18
- Commands in this skill work on macOS, Linux, and Windows. `curl` is available
19
- on Windows 10+ and macOS/Linux it is used here for API calls.
18
+ This skill uses `npx wicked-brain-call` for all server interaction. The CLI
19
+ works on macOS, Linux, and Windows; it discovers the brain, auto-starts the
20
+ server, and writes a per-call audit record under `{brain}/calls/`.
20
21
 
21
22
  For the brain path default:
22
23
  - macOS/Linux: ~/.wicked-brain
@@ -24,15 +25,10 @@ For the brain path default:
24
25
 
25
26
  ## Config
26
27
 
27
- Resolve the brain config via the shared resolution in
28
- wicked-brain:init § "Resolving the brain config". In short: try
29
- `~/.wicked-brain/projects/{cwd_basename}/_meta/config.json` first, fall back
30
- to `~/.wicked-brain/_meta/config.json` (legacy flat), else trigger
31
- wicked-brain:init. Read the resolved file for brain path and server port.
32
-
33
- Do NOT read a bare relative `_meta/config.json` — the model will resolve it
34
- against the current working directory and brain files will end up in the
35
- project root.
28
+ Brain discovery + server lifecycle are handled by `wicked-brain-call`. Pass
29
+ `--brain <path>` to override the auto-detected brain, or set
30
+ `WICKED_BRAIN_PATH`. The CLI starts the server on first call (no manual
31
+ init required) and writes an audit record to `{brain}/calls/` per call.
36
32
 
37
33
  ## Parameters
38
34
 
@@ -50,9 +46,7 @@ Ensure `source_id`, `target_path`, and `verdict` are provided.
50
46
  ### Step 2: Submit the verdict to the server
51
47
 
52
48
  ```bash
53
- curl -s -X POST http://localhost:{port}/api \
54
- -H "Content-Type: application/json" \
55
- -d '{"action":"confirm_link","params":{"source_id":"{source_id}","target_path":"{target_path}","verdict":"{verdict}"}}'
49
+ npx wicked-brain-call confirm_link --param source_id={source_id} --param target_path={target_path} --param verdict={verdict}
56
50
  ```
57
51
 
58
52
  ### Step 3: Report the result
@@ -10,7 +10,7 @@ description: |
10
10
 
11
11
  # wicked-brain:enhance
12
12
 
13
- You enhance the brain by dispatching a subagent that fills knowledge gaps.
13
+ Enhances the brain by dispatching a subagent that fills knowledge gaps.
14
14
 
15
15
  ## Cross-Platform Notes
16
16
 
@@ -24,15 +24,10 @@ For the brain path default:
24
24
 
25
25
  ## Config
26
26
 
27
- Resolve the brain config via the shared resolution in
28
- wicked-brain:init § "Resolving the brain config". In short: try
29
- `~/.wicked-brain/projects/{cwd_basename}/_meta/config.json` first, fall back
30
- to `~/.wicked-brain/_meta/config.json` (legacy flat), else trigger
31
- wicked-brain:init. Read the resolved file for brain path and server port.
32
-
33
- Do NOT read a bare relative `_meta/config.json` — the model will resolve it
34
- against the current working directory and brain files will end up in the
35
- project root.
27
+ Brain discovery + server lifecycle are handled by `wicked-brain-call`. Pass
28
+ `--brain <path>` to override the auto-detected brain, or set
29
+ `WICKED_BRAIN_PATH`. The CLI starts the server on first call (no manual
30
+ init required) and writes an audit record to `{brain}/calls/` per call.
36
31
 
37
32
  ## Process
38
33
 
@@ -40,7 +35,7 @@ Dispatch an enhance subagent with these instructions:
40
35
 
41
36
  ```
42
37
  You are a knowledge enhancement agent for the digital brain at {brain_path}.
43
- Server: http://localhost:{port}/api
38
+ Server interactions: use `npx wicked-brain-call <action> [--param k=v ...]`.
44
39
 
45
40
  ## Step 1: Find gaps
46
41
 
@@ -51,9 +46,7 @@ Read the recent event log using your Read tool on `{brain_path}/_meta/log.jsonl`
51
46
 
52
47
  Get stats:
53
48
  ```bash
54
- curl -s -X POST http://localhost:{port}/api \
55
- -H "Content-Type: application/json" \
56
- -d '{"action":"stats","params":{}}'
49
+ npx wicked-brain-call stats
57
50
  ```
58
51
 
59
52
  Read _meta/log.jsonl. Look for:
@@ -16,21 +16,19 @@ and the archive-rename convention used by wicked-brain:agent dispatch consolidat
16
16
 
17
17
  ## Cross-Platform Notes
18
18
 
19
- - Uses `curl` for server API calls (Windows 10+, macOS, Linux)
19
+ This skill uses `npx wicked-brain-call` for all server interaction. The CLI
20
+ works on macOS, Linux, and Windows; it discovers the brain, auto-starts the
21
+ server, and writes a per-call audit record under `{brain}/calls/`.
22
+
20
23
  - Uses agent-native Read/Bash tools for file ops — no Unix-only shell features
21
24
  - Paths always use forward slashes
22
25
 
23
26
  ## Config
24
27
 
25
- Resolve the brain config via the shared resolution in
26
- wicked-brain:init § "Resolving the brain config". In short: try
27
- `~/.wicked-brain/projects/{cwd_basename}/_meta/config.json` first, fall back
28
- to `~/.wicked-brain/_meta/config.json` (legacy flat), else trigger
29
- wicked-brain:init. Read the resolved file for brain path and server port.
30
-
31
- Do NOT read a bare relative `_meta/config.json` — the model will resolve it
32
- against the current working directory and brain files will end up in the
33
- project root.
28
+ Brain discovery + server lifecycle are handled by `wicked-brain-call`. Pass
29
+ `--brain <path>` to override the auto-detected brain, or set
30
+ `WICKED_BRAIN_PATH`. The CLI starts the server on first call (no manual
31
+ init required) and writes an audit record to `{brain}/calls/` per call.
34
32
 
35
33
  ## Parameters
36
34
 
@@ -58,9 +56,7 @@ memory) inspect its frontmatter so the log entry can record type/tier.
58
56
  ### Step 3: Remove from index
59
57
 
60
58
  ```bash
61
- curl -s -X POST http://localhost:{port}/api \
62
- -H "Content-Type: application/json" \
63
- -d '{"action":"remove","params":{"id":"{id}"}}'
59
+ npx wicked-brain-call remove --param id={id}
64
60
  ```
65
61
 
66
62
  ### Step 4: Archive the file
@@ -25,15 +25,10 @@ For the brain path default:
25
25
 
26
26
  ## Config
27
27
 
28
- Resolve the brain config via the shared resolution in
29
- wicked-brain:init § "Resolving the brain config". In short: try
30
- `~/.wicked-brain/projects/{cwd_basename}/_meta/config.json` first, fall back
31
- to `~/.wicked-brain/_meta/config.json` (legacy flat), else trigger
32
- wicked-brain:init. Read the resolved file for brain path and server port.
33
-
34
- Do NOT read a bare relative `_meta/config.json` — the model will resolve it
35
- against the current working directory and brain files will end up in the
36
- project root.
28
+ Brain discovery + server lifecycle are handled by `wicked-brain-call`. Pass
29
+ `--brain <path>` to override the auto-detected brain, or set
30
+ `WICKED_BRAIN_PATH`. The CLI starts the server on first call (no manual
31
+ init required) and writes an audit record to `{brain}/calls/` per call.
37
32
 
38
33
  ## Parameters
39
34
 
@@ -43,18 +38,15 @@ project root.
43
38
 
44
39
  ### Step 0: Ensure server is running
45
40
 
46
- Before doing anything else, health-check the server:
41
+ `wicked-brain-call` auto-starts the server on first invocation, so an
42
+ explicit health check is not required. If you want to be defensive, run:
47
43
 
48
44
  ```bash
49
- curl -s -f -X POST http://localhost:{port}/api \
50
- -H "Content-Type: application/json" \
51
- -d '{"action":"health","params":{}}'
45
+ npx wicked-brain-call health
52
46
  ```
53
47
 
54
- If this fails (connection refused or non-2xx), invoke `wicked-brain:server` to start it
55
- before continuing. Re-read `{brain_path}/_meta/config.json` (the resolved
56
- config from the Config section above) after the server starts to get the
57
- actual port it bound to.
48
+ Exit code 0 means the server is up. Exit code 2 means an infra failure
49
+ (server could not be reached or spawned) — surface the error to the user.
58
50
 
59
51
  ### Step 1: Assess scope
60
52
 
@@ -79,7 +71,7 @@ You are an ingest agent for the digital brain at {brain_path}.
79
71
 
80
72
  Source file: {source_path}
81
73
  Source name: {safe_name} (lowercase, hyphens for special chars)
82
- Server: http://localhost:{port}/api
74
+ Server interactions: use `npx wicked-brain-call <action>` (auto-discovers brain + port).
83
75
 
84
76
  ## Detect file type
85
77
 
@@ -147,9 +139,10 @@ Example:
147
139
 
148
140
  ## After writing chunks, index them in the server:
149
141
 
150
- curl -s -X POST http://localhost:{port}/api \
151
- -H "Content-Type: application/json" \
152
- -d '{"action":"index","params":{"id":"{chunk_path}","path":"{chunk_path}","content":"{chunk_content}","brain_id":"{brain_id}"}}'
142
+ Pass the full payload as positional JSON because `content` is a long blob with
143
+ quotes and newlines:
144
+
145
+ npx wicked-brain-call index '{"id":"{chunk_path}","path":"{chunk_path}","content":"{chunk_content}","brain_id":"{brain_id}"}'
153
146
 
154
147
  ## Report back
155
148
 
@@ -171,7 +164,7 @@ Instead, write a batch script and run it. This preserves context and is dramatic
171
164
  2. Write a script to the brain's `_meta/` directory that:
172
165
  - Walks the source directory
173
166
  - Filters by file extension (text types for deterministic, binary types for listing)
174
- - For each text file: reads content, splits into chunks, writes chunk .md files, curls the index API
167
+ - For each text file: reads content, splits into chunks, writes chunk .md files, calls the index API (via fetch in Node, or `npx wicked-brain-call index` in shell)
175
168
  - For binary files: lists them for separate vision-based ingest
176
169
  - Logs progress to stdout
177
170
  - Writes a summary at the end
@@ -400,9 +393,7 @@ Archived files are invisible to the file watcher, so the server won't clean them
400
393
  1. List all .md files in `{brain_path}/chunks/extracted/{safe_name}/`
401
394
  2. For each file, call the server to remove it from the index:
402
395
  ```bash
403
- curl -s -X POST http://localhost:{port}/api \
404
- -H "Content-Type: application/json" \
405
- -d '{"action":"remove","params":{"id":"chunks/extracted/{safe_name}/chunk-NNN.md"}}'
396
+ npx wicked-brain-call remove --param id=chunks/extracted/{safe_name}/chunk-NNN.md
406
397
  ```
407
398
  3. Then rename the directory to archive it:
408
399
  - macOS/Linux: `mv "{brain_path}/chunks/extracted/{safe_name}" "{brain_path}/chunks/extracted/{safe_name}.archived-$(date +%s)"`
@@ -10,7 +10,7 @@ description: |
10
10
 
11
11
  # wicked-brain:init
12
12
 
13
- You initialize a new digital brain on the filesystem and get it fully operational.
13
+ Initializes a new digital brain on the filesystem and gets it fully operational.
14
14
 
15
15
  ## Cross-Platform Notes
16
16
 
@@ -49,6 +49,10 @@ For the brain path default:
49
49
 
50
50
  ## Resolving the brain config
51
51
 
52
+ > Most consumer skills now invoke `wicked-brain-call` directly and don't
53
+ > need to resolve the brain themselves — see the section below for the
54
+ > canonical resolution this skill performs at init time.
55
+
52
56
  **This section is the canonical resolution logic. Other skills point here —
53
57
  keep it authoritative.** Never read a bare relative `_meta/config.json`: the
54
58
  model will resolve it against the current working directory and brain files
@@ -183,7 +187,7 @@ Stop and wait for their answer before continuing.
183
187
 
184
188
  ### Step 3: Create directory structure
185
189
 
186
- Use your native Write tool to create these directories (write a `.gitkeep` placeholder in each):
190
+ Use the native Write tool to create these directories (write a `.gitkeep` placeholder in each):
187
191
  - `{brain_path}/raw`
188
192
  - `{brain_path}/chunks/extracted`
189
193
  - `{brain_path}/chunks/inferred`
@@ -238,33 +242,32 @@ the real port — never hardcode `4242` in downstream calls.
238
242
 
239
243
  ### Step 6: Initialize the event log
240
244
 
241
- Use your Write tool to create an empty file at `{brain_path}/_meta/log.jsonl`.
245
+ Use the Write tool to create an empty file at `{brain_path}/_meta/log.jsonl`.
242
246
 
243
247
  ### Step 7: Start the server
244
248
 
245
- Invoke `wicked-brain:server` to start the server against this brain path.
246
- The server will pick a free port and write it back to `_meta/config.json`.
249
+ Use `wicked-brain-call` to start and verify the server in one step. It picks
250
+ a free port, writes it back to `_meta/config.json`, and waits for the server
251
+ to answer:
247
252
 
248
253
  ```bash
249
- npx wicked-brain-server --brain {brain_path} &
254
+ npx wicked-brain-call --start --brain {brain_path}
255
+ npx wicked-brain-call health --brain {brain_path}
250
256
  ```
251
257
 
252
- Do NOT pass `--port` unless the user specifies one let the server pick a
253
- free port. After the process starts, **re-read `{brain_path}/_meta/config.json`**
254
- to get the actual `server_port` the server bound to. Use that port for the
255
- health check and all subsequent API calls.
258
+ Verify the health response includes `"brain_id"` matching this brain's id
259
+ this confirms you're talking to the right server (not an unrelated brain on
260
+ the same machine).
256
261
 
257
- Then health-check to confirm it's up before continuing:
262
+ If you need the raw spawn (e.g. to pass extra flags), the server binary is
263
+ still available directly:
258
264
 
259
265
  ```bash
260
- curl -s -X POST http://localhost:{actual_port}/api \
261
- -H "Content-Type: application/json" \
262
- -d '{"action":"health"}'
266
+ npx wicked-brain-server --brain {brain_path} &
263
267
  ```
264
268
 
265
- Verify the response includes `"brain_id"` matching this brain's idthis
266
- confirms you're talking to the right server (not an unrelated brain on the
267
- same machine).
269
+ Do NOT pass `--port` unless the user specifies one let the server pick a
270
+ free port.
268
271
 
269
272
  ### Step 8: Ingest the project
270
273
 
@@ -11,7 +11,7 @@ description: |
11
11
 
12
12
  # wicked-brain:lint
13
13
 
14
- You check brain quality by dispatching a lint subagent.
14
+ Checks brain quality by dispatching a lint subagent.
15
15
 
16
16
  ## Cross-Platform Notes
17
17
 
@@ -25,15 +25,10 @@ For the brain path default:
25
25
 
26
26
  ## Config
27
27
 
28
- Resolve the brain config via the shared resolution in
29
- wicked-brain:init § "Resolving the brain config". In short: try
30
- `~/.wicked-brain/projects/{cwd_basename}/_meta/config.json` first, fall back
31
- to `~/.wicked-brain/_meta/config.json` (legacy flat), else trigger
32
- wicked-brain:init. Read the resolved file for brain path and server port.
33
-
34
- Do NOT read a bare relative `_meta/config.json` — the model will resolve it
35
- against the current working directory and brain files will end up in the
36
- project root.
28
+ Brain discovery + server lifecycle are handled by `wicked-brain-call`. Pass
29
+ `--brain <path>` to override the auto-detected brain, or set
30
+ `WICKED_BRAIN_PATH`. The CLI starts the server on first call (no manual
31
+ init required) and writes an audit record to `{brain}/calls/` per call.
37
32
 
38
33
  ## Process
39
34
 
@@ -41,7 +36,7 @@ Dispatch a lint subagent with these instructions:
41
36
 
42
37
  ```
43
38
  You are a quality assurance agent for the digital brain at {brain_path}.
44
- Server: http://localhost:{port}/api
39
+ Server interactions: use `npx wicked-brain-call <action> [--param k=v ...]`.
45
40
 
46
41
  ## Pass 1: Deterministic checks
47
42
 
@@ -92,9 +87,7 @@ Check each chunk has required frontmatter fields (source, chunk_id, confidence,
92
87
  Call the server to get all tag frequencies:
93
88
 
94
89
  ```bash
95
- curl -s -X POST http://localhost:{port}/api \
96
- -H "Content-Type: application/json" \
97
- -d '{"action":"tag_frequency","params":{}}'
90
+ npx wicked-brain-call tag_frequency
98
91
  ```
99
92
 
100
93
  The response contains `tags: [{tag, count}]`. Identify potential synonyms:
@@ -117,9 +110,7 @@ Only report pairs where both tags have at least 1 use.
117
110
  Call the server for link health:
118
111
 
119
112
  ```bash
120
- curl -s -X POST http://localhost:{port}/api \
121
- -H "Content-Type: application/json" \
122
- -d '{"action":"link_health","params":{}}'
113
+ npx wicked-brain-call link_health
123
114
  ```
124
115
 
125
116
  The response contains:
@@ -146,9 +137,7 @@ Read a sample of chunks and wiki articles. Check:
146
137
  - Are there factual contradictions between articles?
147
138
  - Check for `contradicts` typed links — query the server:
148
139
  ```bash
149
- curl -s -X POST http://localhost:{port}/api \
150
- -H "Content-Type: application/json" \
151
- -d '{"action":"contradictions","params":{}}'
140
+ npx wicked-brain-call contradictions
152
141
  ```
153
142
  For each contradiction link, read both the source and target to determine
154
143
  if the contradiction is resolved. Flag unresolved contradictions as warnings.
@@ -16,6 +16,10 @@ Universal code intelligence for any CLI/IDE via the brain's LSP client layer.
16
16
 
17
17
  ## Cross-Platform Notes
18
18
 
19
+ This skill uses `npx wicked-brain-call` for all server interaction. The CLI
20
+ works on macOS, Linux, and Windows; it discovers the brain, auto-starts the
21
+ server, and writes a per-call audit record under `{brain}/calls/`.
22
+
19
23
  Commands in this skill work on macOS, Linux, and Windows. When a command has
20
24
  platform differences, alternatives are shown. Your native tools (Read, Write,
21
25
  Grep, Glob) work everywhere — prefer them over shell commands when possible.
@@ -24,7 +28,6 @@ For the brain path default:
24
28
  - macOS/Linux: ~/.wicked-brain
25
29
  - Windows: %USERPROFILE%\.wicked-brain
26
30
 
27
- - `curl` works on macOS, Linux, and Windows 10+
28
31
  - File paths must be absolute
29
32
  - On Windows, use forward slashes in file URIs passed to the server. Most LSP
30
33
  servers accept `file:///C:/Users/me/project/file.ts` (forward slashes, three
@@ -40,15 +43,10 @@ whether the language server process is running and review its stderr logs.
40
43
 
41
44
  ## Config
42
45
 
43
- Resolve the brain config via the shared resolution in
44
- wicked-brain:init § "Resolving the brain config". In short: try
45
- `~/.wicked-brain/projects/{cwd_basename}/_meta/config.json` first, fall back
46
- to `~/.wicked-brain/_meta/config.json` (legacy flat), else trigger
47
- wicked-brain:init. Read the resolved file for brain path and server port.
48
-
49
- Do NOT read a bare relative `_meta/config.json` — the model will resolve it
50
- against the current working directory and brain files will end up in the
51
- project root.
46
+ Brain discovery + server lifecycle are handled by `wicked-brain-call`. Pass
47
+ `--brain <path>` to override the auto-detected brain, or set
48
+ `WICKED_BRAIN_PATH`. The CLI starts the server on first call (no manual
49
+ init required) and writes an audit record to `{brain}/calls/` per call.
52
50
 
53
51
  ## Prerequisites — Source Path
54
52
 
@@ -148,16 +146,12 @@ Before calling `lsp-workspace-symbols` for the first time on any brain server:
148
146
 
149
147
  2. Call a file-specific action to trigger `ensureReady`:
150
148
  ```bash
151
- curl -s -X POST http://localhost:{port}/api \
152
- -H "Content-Type: application/json" \
153
- -d '{"action":"lsp-symbols","params":{"file":"{absolute_path_to_real_file}"}}'
149
+ npx wicked-brain-call lsp-symbols --param file={absolute_path_to_real_file}
154
150
  ```
155
151
 
156
152
  3. Poll `lsp-health` until a server is `ready` (not `starting`):
157
153
  ```bash
158
- curl -s -X POST http://localhost:{port}/api \
159
- -H "Content-Type: application/json" \
160
- -d '{"action":"lsp-health"}'
154
+ npx wicked-brain-call lsp-health
161
155
  ```
162
156
  Expected ready response:
163
157
  ```json
@@ -215,31 +209,31 @@ Based on what the user/agent needs, pick the appropriate action from the table a
215
209
  ### Step 2: Call the server
216
210
 
217
211
  ```bash
218
- curl -s -X POST http://localhost:{port}/api \
219
- -H "Content-Type: application/json" \
220
- -d '{"action":"{action}","params":{params}}'
212
+ npx wicked-brain-call <action> [--param k=v ...]
213
+ # or for nested params:
214
+ npx wicked-brain-call <action> '{"k":"v",...}'
221
215
  ```
222
216
 
223
217
  **Position-based actions** (definition, references, hover, implementation, call-hierarchy):
224
- ```json
225
- {"action":"lsp-definition","params":{"file":"/absolute/path/to/file.ts","line":15,"col":10}}
218
+ ```bash
219
+ npx wicked-brain-call lsp-definition --param file=/absolute/path/to/file.ts --param line=15 --param col=10
226
220
  ```
227
221
  Note: `line` and `col` are 0-indexed.
228
222
 
229
223
  **File-based actions** (symbols):
230
- ```json
231
- {"action":"lsp-symbols","params":{"file":"/absolute/path/to/file.ts"}}
224
+ ```bash
225
+ npx wicked-brain-call lsp-symbols --param file=/absolute/path/to/file.ts
232
226
  ```
233
227
 
234
228
  **Query-based actions** (workspace-symbols):
235
- ```json
236
- {"action":"lsp-workspace-symbols","params":{"query":"PaymentService"}}
229
+ ```bash
230
+ npx wicked-brain-call lsp-workspace-symbols --param query=PaymentService
237
231
  ```
238
232
 
239
233
  **No-params actions** (health, diagnostics without file):
240
- ```json
241
- {"action":"lsp-health"}
242
- {"action":"lsp-diagnostics"}
234
+ ```bash
235
+ npx wicked-brain-call lsp-health
236
+ npx wicked-brain-call lsp-diagnostics
243
237
  ```
244
238
 
245
239
  ### Step 3: Handle errors — auto-install
@@ -14,22 +14,20 @@ Store and recall experiential learnings in the brain's memory system.
14
14
 
15
15
  ## Cross-Platform Notes
16
16
 
17
- - Uses `curl` for server API calls (available on Windows 10+, macOS, Linux)
17
+ This skill uses `npx wicked-brain-call` for all server interaction. The CLI
18
+ works on macOS, Linux, and Windows; it discovers the brain, auto-starts the
19
+ server, and writes a per-call audit record under `{brain}/calls/`.
20
+
18
21
  - File writes use agent-native tools (Write/Edit), not shell commands
19
22
  - Path separator: always use forward slashes in `contains:` and `path` fields
20
23
  - Brain path default: `~/.wicked-brain/projects/{project-name}` (macOS/Linux), `%USERPROFILE%\.wicked-brain\projects\{project-name}` (Windows)
21
24
 
22
25
  ## Config
23
26
 
24
- Resolve the brain config via the shared resolution in
25
- wicked-brain:init § "Resolving the brain config". In short: try
26
- `~/.wicked-brain/projects/{cwd_basename}/_meta/config.json` first, fall back
27
- to `~/.wicked-brain/_meta/config.json` (legacy flat), else trigger
28
- wicked-brain:init. Read the resolved file for brain path and server port.
29
-
30
- Do NOT read a bare relative `_meta/config.json` — the model will resolve it
31
- against the current working directory and brain files will end up in the
32
- project root.
27
+ Brain discovery + server lifecycle are handled by `wicked-brain-call`. Pass
28
+ `--brain <path>` to override the auto-detected brain, or set
29
+ `WICKED_BRAIN_PATH`. The CLI starts the server on first call (no manual
30
+ init required) and writes an audit record to `{brain}/calls/` per call.
33
31
 
34
32
  ## Parameters
35
33
 
@@ -190,9 +188,7 @@ Fire-and-forget — if the bus is not installed, silently skip.
190
188
  ### Step 1: Search
191
189
 
192
190
  ```bash
193
- curl -s -X POST http://localhost:{port}/api \
194
- -H "Content-Type: application/json" \
195
- -d '{"action":"search","params":{"query":"{query}","limit":10,"session_id":"{session_id}"}}'
191
+ npx wicked-brain-call search --param query={query} --param limit=10 --param session_id={session_id}
196
192
  ```
197
193
 
198
194
  Pass a session_id with every search call. This enables access tracking for
@@ -11,13 +11,13 @@ description: |
11
11
 
12
12
  # wicked-brain:migrate
13
13
 
14
- You migrate a flat brain (all data directly under `~/.wicked-brain/`) into the
14
+ Migrates a flat brain (all data directly under `~/.wicked-brain/`) into the
15
15
  per-project layout (each brain under `~/.wicked-brain/projects/{project-name}/`).
16
16
  This was the layout change introduced in v0.4.7.
17
17
 
18
18
  ## Cross-Platform Notes
19
19
 
20
- Commands in this skill work on macOS, Linux, and Windows. Prefer your native
20
+ Commands in this skill work on macOS, Linux, and Windows. Prefer the native
21
21
  Read/Write/Glob tools over shell commands when possible.
22
22
 
23
23
  - macOS/Linux home: `~`
@@ -45,9 +45,9 @@ under the same `~/.wicked-brain/projects/` umbrella (recommended — pick
45
45
  distinct project names) or under separate containers if the user prefers
46
46
  isolation.
47
47
 
48
- If the user asks "migrate all my brains," enumerate the flat brains you can
49
- find first (`find ~ -maxdepth 3 -name brain.json 2>/dev/null` on macOS/Linux)
50
- and confirm each with the user before running migration on it.
48
+ If the user asks "migrate all my brains," enumerate the discoverable flat
49
+ brains first (`find ~ -maxdepth 3 -name brain.json 2>/dev/null` on
50
+ macOS/Linux) and confirm each with the user before running migration on it.
51
51
 
52
52
  ## Process
53
53
 
@@ -198,11 +198,9 @@ npx wicked-brain-server --brain "{target_path}" &
198
198
  Wait for the server to start, then re-read `{target_path}/_meta/config.json`
199
199
  to get the bound port.
200
200
 
201
- Health-check:
201
+ Health-check (the CLI auto-resolves the new brain's port from its config):
202
202
  ```bash
203
- curl -s -X POST http://localhost:{port}/api \
204
- -H "Content-Type: application/json" \
205
- -d '{"action":"health"}'
203
+ npx wicked-brain-call health --brain "{target_path}"
206
204
  ```
207
205
 
208
206
  Verify the response includes `"brain_id"` matching the id from Step 1. If the
@@ -215,16 +213,14 @@ Run a stats call against the new server and confirm the document count is
215
213
  non-zero (assuming the flat brain had any documents):
216
214
 
217
215
  ```bash
218
- curl -s -X POST http://localhost:{port}/api \
219
- -H "Content-Type: application/json" \
220
- -d '{"action":"stats"}'
216
+ npx wicked-brain-call stats --brain "{target_path}"
221
217
  ```
222
218
 
223
219
  If document counts are zero but `.brain.db` was moved, the SQLite file may have
224
220
  been truncated during the move or the server is looking at the wrong path.
225
221
  **Do NOT proceed to Step 9.** Stop the new server and investigate — the flat
226
- `_meta/` is still intact at this point, so you can roll back by moving files
227
- back to `{flat_path}`.
222
+ `_meta/` is still intact at this point, so rollback is possible by moving
223
+ files back to `{flat_path}`.
228
224
 
229
225
  ### Step 9: Clean up the flat path (only after Steps 7 and 8 pass)
230
226