wicked-brain 0.4.6 → 0.4.7
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 +25 -1
- package/package.json +1 -1
- package/server/package.json +1 -1
- package/skills/wicked-brain-init/SKILL.md +38 -7
package/README.md
CHANGED
|
@@ -159,10 +159,33 @@ Brains can link to other brains. A personal research brain can reference a team
|
|
|
159
159
|
|
|
160
160
|
When you search, wicked-brain dispatches parallel search agents across all accessible brains and merges the results. Access control is filesystem permissions — if you can read the directory, you can search it.
|
|
161
161
|
|
|
162
|
-
##
|
|
162
|
+
## Per-Project Brains
|
|
163
|
+
|
|
164
|
+
**Each project gets its own brain.** `wicked-brain:init` creates a brain under
|
|
165
|
+
`~/.wicked-brain/projects/{project-name}/` by default, where `{project-name}`
|
|
166
|
+
is the basename of your current working directory. This keeps unrelated
|
|
167
|
+
codebases, clients, and research domains from crowding a single index — and
|
|
168
|
+
makes federated search across projects meaningful.
|
|
163
169
|
|
|
164
170
|
```
|
|
165
171
|
~/.wicked-brain/
|
|
172
|
+
projects/
|
|
173
|
+
my-app/ # one brain per project
|
|
174
|
+
client-site/
|
|
175
|
+
personal-research/
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Multiple agents can work on different projects simultaneously without stepping
|
|
179
|
+
on each other. A supervising "meta-brain" can watch `~/.wicked-brain/projects/*`
|
|
180
|
+
and federate queries across all of them via `brain.json` links.
|
|
181
|
+
|
|
182
|
+
If you really want one brain for everything, you can pass a custom path to
|
|
183
|
+
`wicked-brain:init` — but you'll fight the index as it grows.
|
|
184
|
+
|
|
185
|
+
## What's on Disk
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
~/.wicked-brain/projects/{project-name}/
|
|
166
189
|
brain.json # Identity and brain links
|
|
167
190
|
raw/ # Your source files
|
|
168
191
|
chunks/
|
|
@@ -171,6 +194,7 @@ When you search, wicked-brain dispatches parallel search agents across all acces
|
|
|
171
194
|
wiki/ # Synthesized articles with [[backlinks]]
|
|
172
195
|
_meta/
|
|
173
196
|
log.jsonl # Append-only event log
|
|
197
|
+
config.json # Server port, source path
|
|
174
198
|
.brain.db # SQLite search index (auto-managed)
|
|
175
199
|
```
|
|
176
200
|
|
package/package.json
CHANGED
package/server/package.json
CHANGED
|
@@ -18,9 +18,34 @@ Commands in this skill work on macOS, Linux, and Windows. When a command has
|
|
|
18
18
|
platform differences, alternatives are shown. Your native tools (Read, Write,
|
|
19
19
|
Grep, Glob) work everywhere — prefer them over shell commands when possible.
|
|
20
20
|
|
|
21
|
+
## Per-project brains (important)
|
|
22
|
+
|
|
23
|
+
**Each project gets its own brain under `~/.wicked-brain/projects/{project-name}/`.**
|
|
24
|
+
Do NOT initialize a single monolithic brain at `~/.wicked-brain/` — that overwhelms
|
|
25
|
+
the index, mixes unrelated content across clients/codebases, and makes federated
|
|
26
|
+
search useless.
|
|
27
|
+
|
|
28
|
+
The structure is:
|
|
29
|
+
```
|
|
30
|
+
~/.wicked-brain/ # parent directory (not a brain)
|
|
31
|
+
projects/
|
|
32
|
+
my-app/ # one brain per project
|
|
33
|
+
brain.json
|
|
34
|
+
chunks/
|
|
35
|
+
_meta/
|
|
36
|
+
client-site/ # another project's brain
|
|
37
|
+
brain.json
|
|
38
|
+
...
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Project name defaults to the basename of the current working directory
|
|
42
|
+
(lowercase, hyphens for spaces). A supervising "meta-brain" agent can watch
|
|
43
|
+
`~/.wicked-brain/projects/*` and federate across all of them via
|
|
44
|
+
`brain.json` links.
|
|
45
|
+
|
|
21
46
|
For the brain path default:
|
|
22
|
-
- macOS/Linux:
|
|
23
|
-
- Windows:
|
|
47
|
+
- macOS/Linux: `~/.wicked-brain/projects/{project_name}`
|
|
48
|
+
- Windows: `%USERPROFILE%\.wicked-brain\projects\{project_name}`
|
|
24
49
|
|
|
25
50
|
## When to use
|
|
26
51
|
|
|
@@ -31,12 +56,18 @@ For the brain path default:
|
|
|
31
56
|
|
|
32
57
|
### Step 1: Ask the user
|
|
33
58
|
|
|
34
|
-
|
|
59
|
+
Compute the default project name from the current working directory basename
|
|
60
|
+
(lowercase, replace non-alphanumerics with hyphens). Then ask:
|
|
61
|
+
|
|
62
|
+
1. "What should this project's brain be called?" — Default: `{cwd_basename}`
|
|
63
|
+
2. "Where should it live?" — Default:
|
|
64
|
+
- macOS/Linux: `~/.wicked-brain/projects/{project_name}`
|
|
65
|
+
- Windows: `%USERPROFILE%\.wicked-brain\projects\{project_name}`
|
|
35
66
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
67
|
+
If the user supplies a path that is exactly `~/.wicked-brain` (the parent
|
|
68
|
+
directory, not a project subdirectory), push back: explain the per-project
|
|
69
|
+
convention and suggest `~/.wicked-brain/projects/{project_name}` instead.
|
|
70
|
+
Only accept the flat path if the user explicitly insists.
|
|
40
71
|
|
|
41
72
|
### Step 2: Check for existing brain
|
|
42
73
|
|