wicked-brain 0.4.11 → 0.4.13
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/package.json
CHANGED
package/server/package.json
CHANGED
|
@@ -86,17 +86,23 @@ Digital brain: {brain_id} | {total} indexed items | {chunks} chunks, {wiki} wiki
|
|
|
86
86
|
|
|
87
87
|
### How to use
|
|
88
88
|
|
|
89
|
-
- **
|
|
89
|
+
- **Search/explore**: use `wicked-brain:search` — replaces Grep, Glob, and Agent(Explore) for any open-ended search
|
|
90
|
+
- **Answer questions**: use `wicked-brain:query` — replaces Agent(Explore) for conceptual questions
|
|
91
|
+
- **Surface context**: call `wicked-brain:agent` (context) at the start of any new topic
|
|
90
92
|
- **Capture learnings**: call `wicked-brain:agent` (session-teardown) at session end
|
|
91
93
|
- **Store a decision/pattern/gotcha**: call `wicked-brain:memory` (store mode)
|
|
92
|
-
- **Ask the brain**: call `wicked-brain:query` for cited answers
|
|
93
94
|
- **Available agents**: consolidate, context, session-teardown, onboard (via `wicked-brain:agent`)
|
|
94
95
|
|
|
95
|
-
### Rules
|
|
96
|
+
### Rules (follow strictly)
|
|
96
97
|
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
98
|
+
- **ALWAYS check the brain BEFORE using Grep, Glob, Read, or Agent(Explore)** — for any find, search, explore, explain, or "what is/how does" request
|
|
99
|
+
- Use `wicked-brain:search` for finding content ("find X", "where is Y", "look for Z", "show me W")
|
|
100
|
+
- Use `wicked-brain:query` for questions ("what does X do", "how does Y work", "explain Z")
|
|
101
|
+
- Use `wicked-brain:agent` (context) when starting a new topic or unfamiliar area
|
|
102
|
+
- Only fall back to Grep/Glob for **exact pattern matching** after the brain returns no results
|
|
103
|
+
- Do NOT read brain files directly — always go through skills and agents
|
|
104
|
+
- Always pass `session_id` with search/query calls for access tracking
|
|
105
|
+
- Capture non-obvious decisions, patterns, and gotchas with `wicked-brain:memory`
|
|
100
106
|
```
|
|
101
107
|
|
|
102
108
|
### Step 4: Confirm
|
|
@@ -80,15 +80,32 @@ this resolution. Never compute `_meta/config.json` against the project's `cwd`.
|
|
|
80
80
|
|
|
81
81
|
### Step 1: Ask the user
|
|
82
82
|
|
|
83
|
-
**Ask in this exact order — do not reverse the questions
|
|
83
|
+
**Ask in this exact order — do not reverse the questions.**
|
|
84
84
|
|
|
85
|
-
First, compute `{cwd_basename}`:
|
|
86
|
-
|
|
85
|
+
First, compute `{cwd_basename}`:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# macOS/Linux
|
|
89
|
+
basename "$PWD"
|
|
90
|
+
# Windows PowerShell
|
|
91
|
+
Split-Path -Leaf (Get-Location)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
This gives you the name of **the project the user is currently working in** — the repo or
|
|
95
|
+
directory they are about to index. It has nothing to do with wicked-brain, the skill name,
|
|
96
|
+
or any installed tool. For example:
|
|
97
|
+
|
|
98
|
+
- User is in `/Users/alice/Projects/wicked-bus` → default name is `wicked-bus`
|
|
99
|
+
- User is in `/home/bob/work/my-api` → default name is `my-api`
|
|
100
|
+
- User is in `/Users/mike/Projects/wicked-brain` → default name is `wicked-brain` (only
|
|
101
|
+
correct if they are literally indexing the wicked-brain repo itself)
|
|
102
|
+
|
|
103
|
+
Lowercase the result and replace non-alphanumeric characters with hyphens.
|
|
87
104
|
|
|
88
105
|
Then ask **two questions, in order**:
|
|
89
106
|
|
|
90
107
|
1. **"What should this project's brain be called?"**
|
|
91
|
-
- Default: `{cwd_basename}`
|
|
108
|
+
- Default: `{cwd_basename}` — computed above from the actual current working directory
|
|
92
109
|
- Wait for the user's answer (or acceptance of default) before asking question 2.
|
|
93
110
|
|
|
94
111
|
2. **"Where should it live?"**
|
|
@@ -221,9 +238,16 @@ Invoke `wicked-brain:ingest` with:
|
|
|
221
238
|
|
|
222
239
|
This indexes the project files so the brain is immediately queryable.
|
|
223
240
|
|
|
224
|
-
### Step 9:
|
|
241
|
+
### Step 9: Configure the CLI
|
|
242
|
+
|
|
243
|
+
Invoke `wicked-brain:configure` to write routing instructions into the active
|
|
244
|
+
CLI's agent config (CLAUDE.md, GEMINI.md, etc.). This is what makes the brain
|
|
245
|
+
the default for search and exploration — do not skip this step.
|
|
246
|
+
|
|
247
|
+
### Step 10: Confirm
|
|
225
248
|
|
|
226
249
|
Tell the user:
|
|
227
250
|
"Brain `{name}` is ready at `{brain_path}` — {N} files ingested, {M} chunks indexed.
|
|
251
|
+
CLI configured to route search and explore requests through the brain.
|
|
228
252
|
|
|
229
253
|
Run `wicked-brain:compile` to synthesize wiki articles from the indexed content."
|
|
@@ -3,9 +3,12 @@ name: wicked-brain:query
|
|
|
3
3
|
description: |
|
|
4
4
|
Answer questions by searching and synthesizing brain content. Dispatches a
|
|
5
5
|
query subagent that searches, reads, follows links, and produces a cited answer.
|
|
6
|
-
|
|
7
|
-
Use
|
|
8
|
-
"
|
|
6
|
+
|
|
7
|
+
Use instead of Agent(Explore) or reading files directly for any conceptual
|
|
8
|
+
question: "what does X do", "how does Y work", "explain Z", "tell me about W",
|
|
9
|
+
"why does X happen", "give me context on Y", or any question that could be
|
|
10
|
+
answered from indexed knowledge. Always try this before exploring the codebase
|
|
11
|
+
manually.
|
|
9
12
|
---
|
|
10
13
|
|
|
11
14
|
# wicked-brain:query
|
|
@@ -4,9 +4,13 @@ description: |
|
|
|
4
4
|
Search the digital brain for relevant content. Dispatches parallel search
|
|
5
5
|
subagents across local and linked brains. Returns results at depth 0 with
|
|
6
6
|
deeper hints.
|
|
7
|
+
|
|
8
|
+
Use instead of Grep/Glob/Agent(Explore) for any open-ended search or
|
|
9
|
+
exploration: "find X", "search for Y", "look for Z", "where is W used",
|
|
10
|
+
"show me anything about X", "explore Y", "what files relate to Z".
|
|
7
11
|
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
Only fall back to Grep/Glob for exact symbol or pattern lookup when the
|
|
13
|
+
brain returns no results.
|
|
10
14
|
---
|
|
11
15
|
|
|
12
16
|
# wicked-brain:search
|