@automagik/genie 4.260402.7 → 4.260402.8

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.
@@ -10,7 +10,7 @@
10
10
  "plugins": [
11
11
  {
12
12
  "name": "genie",
13
- "version": "4.260402.7",
13
+ "version": "4.260402.8",
14
14
  "source": "./plugins/genie",
15
15
  "description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, wish them into plans, make with parallel agents, ship as one team. A coding genie that grows with your project."
16
16
  }
@@ -2,7 +2,7 @@
2
2
  "id": "genie",
3
3
  "name": "Genie",
4
4
  "description": "Skills, agents, and hooks for the Genie CLI terminal orchestration toolkit",
5
- "version": "4.260402.7",
5
+ "version": "4.260402.8",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automagik/genie",
3
- "version": "4.260402.7",
3
+ "version": "4.260402.8",
4
4
  "description": "Collaborative terminal toolkit for human + AI workflows",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genie",
3
- "version": "4.260402.7",
3
+ "version": "4.260402.8",
4
4
  "description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, turn them into wishes, execute with /work, validate with /review, and ship as one team.",
5
5
  "author": {
6
6
  "name": "Namastex Labs"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genie-plugin",
3
- "version": "4.260402.7",
3
+ "version": "4.260402.8",
4
4
  "private": true,
5
5
  "description": "Runtime dependencies for genie bundled CLIs",
6
6
  "type": "module",
@@ -1,190 +1,131 @@
1
1
  ---
2
2
  name: brain
3
- description: "Obsidian-style knowledge vaultstore, search, and retrieve agent knowledge across sessions via notesmd-cli."
3
+ description: "Knowledge graph enginesearch, analyze, and manage AI agent brains with confidence scoring, autoschema, and multimodal support."
4
4
  ---
5
5
 
6
- # /brain — Agent Knowledge Vault
6
+ # /brain — Knowledge Graph Engine
7
7
 
8
- Persistent long-term memory for agents. Knowledge is stored in `brain/`, searched before answering, and written back every session.
9
-
10
- ## Brain vs Memory
11
-
12
- These are **different tools for different purposes**:
13
-
14
- | | **Brain** (this skill) | **Memory** (Claude native) |
15
- |---|---|---|
16
- | **What** | Context graph — entities, relationships, domain knowledge | Behavioral learnings — feedback, decisions, user preferences |
17
- | **Tool** | `notesmd-cli` (Obsidian-style vault) | `.claude/memory/` files with YAML frontmatter |
18
- | **When** | Domain intel, playbooks, company/person context, session logs | Corrections, conventions, project rules, user profile |
19
- | **Updated by** | `/brain` (this skill) | `/learn` skill, auto memory system |
20
- | **Format** | Markdown notes in `brain/` directory | Typed memory files (user, feedback, project, reference) |
21
-
22
- **Rule of thumb:** If it's *knowledge about the world* → brain. If it's *how the agent should behave* → memory.
8
+ Search, analyze, and manage knowledge brains powered by genie-brain. Brains are Postgres-backed, Obsidian-compatible knowledge vaults with BM25 + vector search, confidence scoring, and agentic autoschema.
23
9
 
24
10
  ## When to Use
25
- - Agent needs to recall prior session context, decisions, or intel
26
- - New intel (person, company, deal) is discovered mid-session
27
- - A playbook pattern is confirmed or updated
28
- - Provisioning a new agent with a knowledge vault
29
-
30
- ## Flow
31
-
32
- ### Session Start (mandatory)
11
+ - Search for knowledge before answering a question
12
+ - Check what the brain knows (and doesn't know) about a topic
13
+ - Analyze content with deep reasoning
14
+ - Ingest new content into the brain
15
+ - Check brain health and coverage gaps
33
16
 
34
- 1. Read the conversation opener. Derive 2-3 search terms from the topic.
35
- 2. `notesmd-cli search-content "<term>"` for each term.
36
- 3. `notesmd-cli print "<note-name>"` for relevant hits.
37
- 4. Only then begin forming a response.
38
- 5. Fall back to external research (web search, browser) only if brain is insufficient.
17
+ ## Prerequisites
39
18
 
40
- On topic shift mid-conversation: re-run `notesmd-cli search-content "<new-topic>"` before answering.
19
+ Brain must be installed: `genie brain install`
20
+ If not installed, guide the user to run the install command.
41
21
 
42
- ### Write-Back (3 mandatory triggers)
43
-
44
- ### Trigger 1: Session End (always)
22
+ ## Commands
45
23
 
24
+ ### Search — find knowledge with confidence
46
25
  ```bash
47
- notesmd-cli daily
48
- # Write: discussion summary, decisions, intel discovered, actions taken
26
+ genie brain search "<query>" --brain <id>
49
27
  ```
28
+ Returns ranked results with confidence level (FULL/HIGH/PARTIAL/LOW/NONE).
29
+ - FULL/HIGH → brain knows this well, use the results
30
+ - PARTIAL → brain has some info, may need to supplement
31
+ - LOW/NONE → gap detected, go external or research
50
32
 
51
- ### Trigger 2: New Intel Discovered (immediately)
33
+ **Always search before answering domain questions.** If confidence is LOW/NONE, say so — don't hallucinate.
52
34
 
35
+ ### Health — check brain quality
53
36
  ```bash
54
- notesmd-cli create "Intelligence/<person-or-company-name>"
55
- # Write now — do not wait until session end
37
+ genie brain health --path <brain-path> [--fix]
56
38
  ```
39
+ 7-dimension score: Schema, Freshness, Coverage, Connections, Content, Conflicts, Acceptance.
40
+ `--fix` auto-repairs: adds missing dates, converts tags, generates MOCs.
57
41
 
58
- ### Trigger 3: Playbook Pattern Updated (immediately)
59
-
42
+ ### Status brain dashboard
60
43
  ```bash
61
- notesmd-cli print "Playbooks/<playbook-name>"
62
- # Edit: add confirmed pattern, new rule, exception, or example
44
+ genie brain status
63
45
  ```
46
+ Lists all registered brains with file counts, health, and query stats.
64
47
 
65
- ## Commands
66
-
67
- | Command | Purpose |
68
- |---------|---------|
69
- | `notesmd-cli search-content "<keyword>"` | Search vault content (use BEFORE answering domain questions) |
70
- | `notesmd-cli print "<note-name>"` | Read a specific note |
71
- | `notesmd-cli daily` | Open/create today's session log in `Daily/` |
72
- | `notesmd-cli create "<name>"` | Create a note (use folder prefix: `"Intelligence/Name"`) |
73
- | `notesmd-cli list` | Browse full vault structure |
74
- | `notesmd-cli set-default --vault <path>` | Configure vault path (one-time setup) |
75
-
76
- ## Installation (Auto-Detect)
77
-
78
- On first use, check if `notesmd-cli` is available:
79
-
48
+ ### Init — create a new brain
80
49
  ```bash
81
- command -v notesmd-cli >/dev/null 2>&1 && echo "installed" || echo "missing"
50
+ genie brain init --name <name> --path <path> [--type gtm|pm|engineering|research|personal]
82
51
  ```
52
+ Creates an Obsidian-compatible vault with autoschema. Brain types provide base scaffolding.
83
53
 
84
- **If missing**, offer to install from https://github.com/Yakitrak/notesmd-cli:
85
-
54
+ ### Process ingest new content
86
55
  ```bash
87
- # macOS (Homebrew)
88
- brew install yakitrak/yakitrak/notesmd-cli
89
-
90
- # Linux / manual
91
- # Download the latest release binary from:
92
- # https://github.com/Yakitrak/notesmd-cli/releases
93
- # Place in /usr/local/bin/notesmd-cli and chmod +x
94
-
95
- # Or use the bundled install script (if available)
96
- bash skills/brain/scripts/install-notesmd.sh --vault ./brain
56
+ genie brain process --brain <id> --path <path>
97
57
  ```
98
-
99
- After install, configure the vault:
100
-
58
+ Processes files in `to_process/`:
59
+ - Markdown classified and moved to decided folder
60
+ - Images → described via Gemini Vision → .desc.md
61
+ - Audio → transcribed → .transcript.md
62
+ - PDF → extracted → .extracted.md
63
+ - Code → symbols extracted → .symbols.md
64
+
65
+ ### Analyze — deep reasoning via rlmx
101
66
  ```bash
102
- notesmd-cli set-default --vault ./brain/
67
+ genie brain analyze "<query>" --brain <id> --path <path>
103
68
  ```
69
+ Uses rlmx reasoning engine for deep analysis with file references.
104
70
 
105
- If the user declines installation, skip brain operations gracefully and note that `/brain` requires `notesmd-cli`.
106
-
107
- ## Provisioning a New Agent Brain
108
-
71
+ ### Link discover connections
109
72
  ```bash
110
- mkdir -p brain/{_Templates,Company,Daily,Domains,Intelligence,Playbooks}
111
- notesmd-cli set-default --vault ./brain/
112
- cp skills/brain/templates/*.md brain/_Templates/
113
- notesmd-cli list
114
- ```
115
-
116
- Then add the protocol snippets below to the agent's config files.
117
-
118
- ### CLAUDE.md Template Block
119
-
120
- ```markdown
121
- ## FIRST THING YOU DO (every session)
122
-
123
- 1. Read the conversation opener to understand the topic
124
- 2. Derive 2-3 search terms
125
- 3. Run: `notesmd-cli search-content "<term>"` for each
126
- 4. If results found: `notesmd-cli print "<note-name>"`
127
- 5. Only THEN begin forming your response
128
- 6. If brain is insufficient: use web search as fallback
129
-
130
- ## WHEN TOPIC SHIFTS
131
-
132
- Re-run `notesmd-cli search-content "<new-topic>"` before answering.
133
-
134
- ## AT SESSION END (mandatory)
135
-
136
- Run `notesmd-cli daily`. Log: discussion, decisions, intel, actions.
137
-
138
- ## WRITE IMMEDIATELY WHEN
139
-
140
- - New intel discovered -> `notesmd-cli create "Intelligence/<name>"`
141
- - Playbook updated -> edit relevant `Playbooks/` note
142
- - Domain insight validated -> update relevant `Domains/` note
143
- ```
144
-
145
- ### AGENTS.md Protocol Snippet
146
-
147
- ```markdown
148
- ## Brain Protocol
149
-
150
- ### Session Start
151
- - Derive 2-3 keywords from topic
152
- - `notesmd-cli search-content "<keyword>"` for each
153
- - `notesmd-cli print "<note-name>"` for relevant results
154
- - External research only when brain is insufficient
155
-
156
- ### Mid-Conversation
157
- - Re-scan on topic shift: `notesmd-cli search-content "<new-topic>"`
158
-
159
- ### Session End (mandatory)
160
- - `notesmd-cli daily` — log: discussion, decisions, intel, actions
161
-
162
- ### Write Immediately When
163
- - New intel -> `notesmd-cli create "Intelligence/<name>"`
164
- - Playbook updated -> edit `Playbooks/` note now
165
- ```
166
-
167
- ## Auto-Sync (optional)
168
-
169
- Push brain changes to GitHub via inotifywait + cron:
170
-
171
- ```bash
172
- # Watcher (scripts/brain-sync.sh)
173
- while inotifywait -r -e modify,create,delete ./brain/ 2>/dev/null; do
174
- cd brain && git add -A && \
175
- git commit -m "brain: auto-sync $(date +%Y-%m-%d_%H:%M)" && \
176
- git push && cd ..
177
- done
178
-
179
- # Cron fallback (every 30 min)
180
- # */30 * * * * cd /path/to/workspace && bash scripts/brain-sync.sh >> logs/brain-sync.log 2>&1
73
+ genie brain link --brain <id>
181
74
  ```
75
+ Generates wikilinks from tag overlap and wikilink references.
76
+
77
+ ## How Agents Should Use This
78
+
79
+ ### Before answering domain questions:
80
+ 1. Search the brain: `genie brain search "<topic>" --brain <my-brain-id>`
81
+ 2. Check confidence level
82
+ 3. If FULL/HIGH → cite the results
83
+ 4. If PARTIAL → use results + note limitations
84
+ 5. If NONE → say "brain doesn't cover this" and research externally
85
+
86
+ ### After learning something new:
87
+ 1. Write a .md file with frontmatter to `brain/to_process/`
88
+ 2. Run `genie brain process` to classify and index it
89
+ 3. The brain grows over time
90
+
91
+ ### Session hygiene:
92
+ - Start: check `genie brain status` for brain health
93
+ - During: search brain before making claims
94
+ - End: write session learnings to brain
95
+
96
+ ## Brain Types
97
+
98
+ | Type | Use Case | Base Folders |
99
+ |------|----------|-------------|
100
+ | `gtm` | Marketing, competitive intel | Intelligence/, DevRel/, Company/ |
101
+ | `pm` | Product management | Backlog/, Roadmap/, Specs/ |
102
+ | `engineering` | Architecture, code | Architecture/, Decisions/, Runbooks/ |
103
+ | `research` | R&D, papers | Papers/, Notes/, Experiments/ |
104
+ | `personal` | Personal knowledge (PARA) | Projects/, Areas/, Resources/ |
105
+ | `generic` | Auto-decided by content | (autoschema decides) |
106
+
107
+ ## Confidence Levels
108
+
109
+ | Level | Meaning | Agent Action |
110
+ |-------|---------|-------------|
111
+ | **FULL** | Brain knows this well (3+ strong results) | Use directly, cite sources |
112
+ | **HIGH** | Good coverage (2+ results) | Use with confidence |
113
+ | **PARTIAL** | Some info available | Use + supplement if needed |
114
+ | **LOW** | Weak match | Go external, mention brain gap |
115
+ | **NONE** | Brain doesn't know this | Research externally, don't guess |
116
+
117
+ ## Available Brains on This Server
118
+
119
+ Run `genie brain status` to see all. Current brains include:
120
+ - **genie-gtm** — Marketing intelligence, competitors, DevRel
121
+ - **vegapunk** — R&D, architecture, code analysis
122
+ - **totvs** — Client project management
123
+ - **sofia** — Personal assistant knowledge
124
+ - **namastex-global** — Company-wide shared knowledge
182
125
 
183
126
  ## Rules
184
-
185
- - Local knowledge first. External research is fallback, never default.
186
- - Run startup search every session, no exceptions.
187
- - Write back on all 3 triggers. The brain goes stale if agents only read.
188
- - Never skip the daily log at session end.
189
- - Write intel immediately when discovered — do not batch until session end.
190
- - Templates live in `skills/brain/templates/`. Copy to `brain/_Templates/` during provisioning.
127
+ - **Search before claiming.** If the brain has an answer, use it.
128
+ - **Respect confidence.** NONE means NONE don't fabricate.
129
+ - **Write back.** If you learn something the brain should know, add it.
130
+ - **Use frontmatter.** All brain files need YAML frontmatter (type, tags, dates).
131
+ - **Keep it Obsidian-compatible.** Wikilinks, not regular links.