Skip to content

Commit c73e474

Browse files
authored
Merge pull request #141 from nowledge-co/dev_0613
refactor: unify all plugins with skills
2 parents 8363254 + 2bfdf56 commit c73e474

44 files changed

Lines changed: 2176 additions & 348 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CLAUDE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Nowledge Community — Agent Guidelines
2+
3+
## Registry
4+
5+
[`integrations.json`](integrations.json) is the **single source of truth** for all Nowledge Mem integrations. It tracks capabilities, versions, install commands, transport, tool naming, and thread save methods.
6+
7+
**When adding or modifying any integration, update `integrations.json` first.** Other surfaces (website `integrations.ts`, desktop app integrations view, README tables, marketplace JSONs) derive from or validate against this file.
8+
9+
The desktop app fetches this file at runtime from `https://raw.githubusercontent.com/nowledge-co/community/main/integrations.json` for plugin update awareness. Changes to the schema (adding/removing/renaming fields) affect:
10+
- **Rust** (`lib.rs`): `fetch_plugin_registry`, `detect_installed_plugins`, `write_plugin_update_state`
11+
- **TypeScript** (`plugin-update-manager.ts`): `RegistryIntegration` interface
12+
- **Python** (`health.py`): `_read_plugin_update_state` reader
13+
14+
## Behavioral Guidance
15+
16+
[`shared/behavioral-guidance.md`](shared/behavioral-guidance.md) defines when plugins should search, save, read Working Memory, and distill. All plugins should align with this shared guidance.
17+
18+
## Plugin Development
19+
20+
See [`docs/PLUGIN_DEVELOPMENT_GUIDE.md`](docs/PLUGIN_DEVELOPMENT_GUIDE.md) for authoring rules, directory layout, and testing expectations.
21+
22+
## Submodules
23+
24+
`nowledge-mem-gemini-cli` is a nested submodule (separate repo with its own release cycle). All other integrations are normal directories in this repo.
25+
26+
## Commit Workflow
27+
28+
When modifying this repo as a submodule of the parent `muscat` repo:
29+
1. Commit inside `community/` first
30+
2. Then stage the updated submodule reference in the parent repo

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414

1515
</div>
1616

17+
## Registry
18+
19+
The canonical source of truth for all integrations is [`integrations.json`](integrations.json). Capabilities, install commands, transport, tool naming, and thread save methods are tracked there. Update the registry first when adding or modifying integrations.
20+
21+
For behavioral guidance (when to search, save, read Working Memory), see [`shared/behavioral-guidance.md`](shared/behavioral-guidance.md). For plugin authoring rules, see [`docs/PLUGIN_DEVELOPMENT_GUIDE.md`](docs/PLUGIN_DEVELOPMENT_GUIDE.md).
22+
1723
## Integrations
1824

1925
Each directory is a standalone integration. Pick the one that matches your tool.
@@ -23,14 +29,17 @@ Each directory is a standalone integration. Pick the one that matches your tool.
2329
| **[Skills](nowledge-mem-npx-skills)** | `npx skills add nowledge-co/community/nowledge-mem-npx-skills` | Reusable workflow package for Working Memory, routed recall, resumable handoffs, and distillation. Prefer native packages when your tool has one. |
2430
| **[Claude Code Plugin](nowledge-mem-claude-code-plugin)** | `claude plugin marketplace add nowledge-co/community` then `claude plugin install nowledge-mem@nowledge-community` | Claude Code native plugin with hooks for Working Memory bootstrap, routed recall, and automatic session capture. |
2531
| **[Droid Plugin](nowledge-mem-droid-plugin)** | `droid plugin marketplace add https://github.com/nowledge-co/community` then `droid plugin install nowledge-mem@nowledge-community` | Factory Droid plugin with Working Memory bootstrap, routed recall, distillation, and honest `save-handoff` semantics. |
26-
| **[Gemini CLI](https://github.com/nowledge-co/nowledge-mem-gemini-cli)** | `git clone https://github.com/nowledge-co/nowledge-mem-gemini-cli.git` then `cd nowledge-mem-gemini-cli && gemini extensions link .` | Gemini-native context, hooks, commands, and skills for Working Memory, routed recall, real thread save, and handoff summaries. |
32+
| **[Gemini CLI](https://github.com/nowledge-co/nowledge-mem-gemini-cli)** | Search `Nowledge Mem` in the [Gemini CLI Extensions Gallery](https://geminicli.com/extensions/?name=nowledge-co/nowledge-mem-gemini-cli) and install | Gemini-native context, hooks, commands, and skills for Working Memory, routed recall, real thread save, and handoff summaries. |
2733
| **[Antigravity Trajectory Extractor](https://github.com/jijiamoer/antigravity-trajectory-extractor)** | `git clone https://github.com/jijiamoer/antigravity-trajectory-extractor.git` | Live RPC extraction for Antigravity conversation trajectories. |
2834
| **[Windsurf Trajectory Extractor](https://github.com/jijiamoer/windsurf-trajectory-extractor)** | `git clone https://github.com/jijiamoer/windsurf-trajectory-extractor.git` | Offline protobuf extraction for Windsurf Cascade conversation history. |
29-
| **[Cursor Plugin](nowledge-mem-cursor-plugin)** | Use the packaged Cursor plugin directory with Cursor's plugin workflow | Cursor-native plugin package with bundled MCP config, rules, Working Memory, routed recall, distillation, and honest `save-handoff` semantics. |
35+
| **[Cursor Plugin](nowledge-mem-cursor-plugin)** | Search `Nowledge Mem` in Cursor Marketplace | Cursor-native plugin package with bundled MCP config, rules, Working Memory, routed recall, distillation, and honest `save-handoff` semantics. |
3036
| **[Codex Prompts](nowledge-mem-codex-prompts)** | Copy `AGENTS.md` to your project | Codex-native workflow pack for Working Memory, routed recall, real session save, and distillation. |
3137
| **[OpenClaw Plugin](nowledge-mem-openclaw-plugin)** | `openclaw plugins install @nowledge/openclaw-nowledge-mem` | Full memory lifecycle with memory tools, thread tools, automatic capture, and distillation. |
3238
| **[Alma Plugin](nowledge-mem-alma-plugin)** | Search Nowledge in Alma official Plugin marketplace | Alma-native plugin with Working Memory, thread-aware recall, structured saves, and optional auto-capture. |
39+
| **[Bub Plugin](nowledge-mem-bub-plugin)** | `pip install nowledge-mem-bub` | Bub-native plugin: cross-tool knowledge, auto-capture via save_state, Working Memory, and graph exploration. |
3340
| **[Raycast Extension](nowledge-mem-raycast)** | Search Nowledge in Raycast Extension Store | Search memories from Raycast launcher. |
41+
| **[Claude Desktop](https://github.com/nowledge-co/claude-dxt)** | Download from [nowled.ge/claude-dxt](https://nowled.ge/claude-dxt), double-click `.mcpb` file | One-click extension for Claude Desktop with memory search, save, and update. |
42+
| **[Browser Extension](https://chromewebstore.google.com/detail/nowledge-memory-exchange/kjgpkgodplgakbeanoifnlpkphemcbmh)** | Install from Chrome Web Store | Side-panel capture for ChatGPT, Claude, Gemini, Perplexity, and other web AI surfaces. |
3443
| **[MCP](#direct-mcp)** | For tools without a dedicated Nowledge package, use [direct MCP](#direct-mcp). | Standard memory and thread tools exposed through one shared MCP server. |
3544

3645
## Direct MCP

docs/PLUGIN_DEVELOPMENT_GUIDE.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# Plugin Development Guide
2+
3+
> Rules and conventions for building Nowledge Mem integrations. Follow these when creating a new plugin or extending an existing one.
4+
5+
---
6+
7+
## Transport
8+
9+
Use `nmem` CLI as the execution layer for memory operations.
10+
11+
| Transport | When to use | Examples |
12+
|-----------|------------|----------|
13+
| **nmem CLI** | Agent plugins that can spawn subprocesses | OpenClaw, Alma, Bub, Droid, Claude Code, Gemini CLI |
14+
| **MCP** | Declarative runtimes that natively speak MCP and connect to the backend MCP server | Cursor |
15+
| **HTTP API** | UI extensions where subprocess spawning is inappropriate | Raycast, browser extension |
16+
17+
**CLI resolution order:**
18+
1. `nmem` on PATH
19+
2. `uvx --from nmem-cli nmem` (auto-download fallback)
20+
21+
**Credential handling:**
22+
- API key via `NMEM_API_KEY` environment variable only — never as a CLI argument or in logs
23+
- API URL via `--api-url` flag or `NMEM_API_URL` environment variable
24+
- Shared config file: `~/.nowledge-mem/config.json` (`apiUrl`, `apiKey`)
25+
26+
---
27+
28+
## Tool Naming
29+
30+
### Canonical convention
31+
32+
New tools should use the **`nowledge_mem_<action>`** prefix (underscore-separated).
33+
34+
### Platform exceptions
35+
36+
Some platforms have strong naming conventions that take precedence:
37+
38+
| Platform | Convention | Reason |
39+
|----------|-----------|--------|
40+
| Bub | `mem.<action>` | Bub dot-namespace convention |
41+
| OpenClaw | `memory_<action>` for memory-slot tools | OpenClaw memory slot convention |
42+
| MCP backend | `memory_<action>` | Backend-defined tool surface |
43+
44+
### Rules
45+
46+
1. **Never rename a published tool name.** If alignment is needed, add the new name as an alias and deprecate the old one gradually.
47+
2. **Document the naming convention** in `integrations.json` under `toolNaming`.
48+
3. **New plugins** should use `nowledge_mem_<action>` unless the platform has a documented naming convention.
49+
50+
---
51+
52+
## Skill Alignment
53+
54+
### Reference the shared behavioral guidance
55+
56+
All behavioral heuristics (when to search, when to save, when to read Working Memory) should align with `community/shared/behavioral-guidance.md`.
57+
58+
**Platform-specific additions** (MCP tool names for Cursor, Context Engine details for OpenClaw, Bub comma commands) are kept separate from the shared heuristics.
59+
60+
### Skill naming
61+
62+
Skill names use kebab-case and are consistent across all plugins:
63+
64+
| Skill | Purpose |
65+
|-------|---------|
66+
| `read-working-memory` | Load daily briefing at session start |
67+
| `search-memory` | Proactive recall across memories and threads |
68+
| `distill-memory` | Capture decisions, insights, and learnings |
69+
| `save-handoff` | Structured resumable summary (when no real thread importer exists) |
70+
| `save-thread` | Real session capture (only when supported) |
71+
| `check-integration` | Detect agent, verify setup, guide plugin installation |
72+
| `status` | Connection and configuration diagnostics |
73+
74+
### Autonomous save is required
75+
76+
Every integration's distill/save guidance MUST include proactive save encouragement:
77+
78+
> Save proactively when the conversation produces a decision, preference, plan, procedure, learning, or important context. Do not wait to be asked.
79+
80+
---
81+
82+
## Capabilities Checklist
83+
84+
Every integration should provide at minimum:
85+
86+
- [ ] **Working Memory read** — load daily briefing at session start
87+
- [ ] **Search** — proactive recall across memories, with thread fallback
88+
- [ ] **Distill** — save decisions and insights (with autonomous save encouragement)
89+
- [ ] **Status** — connection and configuration diagnostics
90+
91+
Optional capabilities (require platform support):
92+
93+
- [ ] **Auto-recall** — inject relevant memories before each response
94+
- [ ] **Auto-capture** — save session as searchable thread at session end
95+
- [ ] **Graph exploration** — connections, evolution chains, entity relationships
96+
- [ ] **Thread save** — real transcript import (only if parser exists)
97+
- [ ] **Slash commands** — quick access to common operations
98+
99+
---
100+
101+
## Thread Save Decision
102+
103+
Before adding thread save to a new integration:
104+
105+
1. **Does `nmem t save --from <runtime>` already have a parser?** If yes → delegate to CLI (Tier 1)
106+
2. **Can the plugin capture the session via lifecycle hooks?** If yes → implement plugin-level capture (Tier 2)
107+
3. **Neither?** → Use `save-handoff` and be honest about it (Tier 3)
108+
109+
**Never fake `save-thread`** in a runtime that doesn't support real transcript import.
110+
111+
---
112+
113+
## Registry Checklist
114+
115+
When shipping a new integration:
116+
117+
1. [ ] Add entry to `community/integrations.json`**always update the registry first**
118+
2. [ ] Align behavioral guidance with `community/shared/behavioral-guidance.md`
119+
3. [ ] Use `nowledge_mem_*` tool naming (or document platform convention)
120+
4. [ ] Update `community/README.md` integration table
121+
5. [ ] Verify `nowledge-labs-website/nowledge-mem/data/integrations.ts` alignment
122+
6. [ ] Add marketplace entry if applicable (`.claude-plugin/`, `.cursor-plugin/`, `.factory-plugin/`)
123+
7. [ ] Update `nowledge-mem-npx-skills/skills/check-integration/SKILL.md` detection table
124+
8. [ ] Add integration docs page to website (EN + ZH)
125+
126+
When bumping a plugin **version**:
127+
128+
1. [ ] Update `version` field in `community/integrations.json`
129+
2. [ ] Verify `nowledge-labs-website/nowledge-mem/data/integrations.ts` alignment
130+
3. [ ] Add marketplace entry version bump if applicable
131+
132+
### Runtime Consumers
133+
134+
The registry is fetched at runtime by multiple consumers. Changes to schema or field
135+
names affect all of them:
136+
137+
| Consumer | How it reads | What it uses |
138+
|----------|-------------|-------------|
139+
| Desktop app (Tauri) | `fetch_plugin_registry` command — fetches from GitHub, caches to disk | `id`, `name`, `version` for update awareness |
140+
| `nmem plugins check` CLI | Direct `httpx.get()` — fetches from GitHub, caches to `~/.nowledge-mem/` | `id`, `name`, `version` for update awareness |
141+
| `check-integration` npx skill | Reads detection hints at skill invocation time | `install.command`, `install.docsUrl`, detection hints |
142+
| Website `integrations.ts` | Manually synced (not auto-fetched) | All fields for the integrations showcase page |

0 commit comments

Comments
 (0)