@imunitic/synapse 0.1.1 → 0.2.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.
- package/bin/synapse-setup.cjs +1 -1
- package/commands/synapse-design-note.md +20 -12
- package/commands/synapse-init.md +4 -4
- package/commands/synapse-note.md +12 -13
- package/commands/synapse-rebuild-diff.md +1 -1
- package/commands/synapse-rebuild-full.md +1 -1
- package/commands/synapse-status.md +55 -40
- package/commands/synapse-task-note.md +13 -6
- package/commands/synapse-vault-tidy.md +1 -1
- package/harness/claude/hooks.json +1 -1
- package/harness/codex/hooks.json +1 -1
- package/harness/codex/skills/synapse-design-note/SKILL.md +19 -11
- package/harness/codex/skills/synapse-init/SKILL.md +4 -4
- package/harness/codex/skills/synapse-note/SKILL.md +11 -11
- package/harness/codex/skills/synapse-rebuild-diff/SKILL.md +1 -1
- package/harness/codex/skills/synapse-rebuild-full/SKILL.md +1 -1
- package/harness/codex/skills/synapse-status/SKILL.md +48 -37
- package/harness/codex/skills/synapse-task-note/SKILL.md +13 -6
- package/harness/codex/skills/synapse-vault-tidy/SKILL.md +1 -1
- package/harness/opencode/plugin/synapse.js +25 -5
- package/lib/obsidian-mcp-refresh.cjs +3 -3
- package/package.json +4 -4
- package/skills/synapse-node/SKILL.md +6 -6
- package/skills/synapse-query/SKILL.md +2 -2
- package/skills/synapse-task/SKILL.md +36 -41
- package/skills/synapse-vault/SKILL.md +46 -38
- package/synapse-claude.md +48 -48
- package/synapse.conf.template +1 -1
package/synapse-claude.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
The user keeps a permanent, curated knowledge base — **Synapse Vault** —
|
|
4
4
|
as a memory system separate from and complementary to the `~/.claude`
|
|
5
5
|
auto-memory system: use the Vault for durable, browsable
|
|
6
|
-
knowledge-base notes, not for session bookkeeping.
|
|
7
|
-
|
|
8
|
-
"Reading and writing the vault" below for
|
|
6
|
+
knowledge-base notes, not for session bookkeeping. Reach it through the
|
|
7
|
+
`synapse` CLI's `vault-*` subcommands, never a raw file edit or an MCP tool
|
|
8
|
+
call — see "Reading and writing the vault" below for why. A SessionStart hook
|
|
9
9
|
already injects the vault's `Index.md` at the start of every session, so
|
|
10
10
|
you shouldn't need to go read it yourself. Don't re-read it reflexively,
|
|
11
11
|
but do treat its injected contents as live information, not background
|
|
@@ -94,39 +94,37 @@ a real yes/no answer, not a formality to wave past.
|
|
|
94
94
|
|
|
95
95
|
## Reading and writing the vault
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
vault
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
is
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
the project-level override so the correct user-scoped REST API server
|
|
129
|
-
applies.
|
|
97
|
+
The vault is reached through the `synapse` CLI — `synapse vault-read`/`vault-write`/`vault-list`/
|
|
98
|
+
`vault-search`/`vault-search-text`/`vault-doc-map`/`vault-patch` — for reads *and* for writes, never
|
|
99
|
+
by resolving a vault path or calling an `mcp__obsidian__*` tool directly. Which concrete store the
|
|
100
|
+
CLI talks to (today, an Obsidian vault via its Local REST API; potentially a plain-disk vault later)
|
|
101
|
+
is resolved once, inside the compiled binary, from `SYNAPSE_VAULT_STORE`/`SYNAPSE_VAULT_DIR` — never
|
|
102
|
+
something a skill or an agent turn needs to know or branch on. Today that means Obsidian running
|
|
103
|
+
headless at login (via a startup plugin) with the Local REST API plugin installed, and the CLI
|
|
104
|
+
reaching it over that REST API; a future disk-backed vault would need no change to any skill or to
|
|
105
|
+
this document.
|
|
106
|
+
|
|
107
|
+
**Every write to a note goes through `synapse vault-write` or `vault-patch`. Never the `Write`/`Edit`
|
|
108
|
+
tools on the on-disk path, and never a raw `mcp__obsidian__*` tool call either** — not for a one-line
|
|
109
|
+
change, and least of all when `Write`/`Edit` are already in hand from editing code earlier in the
|
|
110
|
+
same turn, because that proximity is precisely what causes this to be violated. The vault being an
|
|
111
|
+
ordinary directory means the wrong path *works*: Obsidian's file watcher converges, the auto-commit
|
|
112
|
+
hook matches `Write|Edit`/`Bash` running `vault-write`/`vault-patch` as well as the MCP tools, and
|
|
113
|
+
nothing visibly breaks — which is why the habit never self-corrects on its own. The reason is not a
|
|
114
|
+
failure mode to dodge; it is that an invariant upheld only when convenient is worth nothing. Nothing
|
|
115
|
+
else in the system can rely on it, and every note then has to be re-checked by hand instead of
|
|
116
|
+
trusted. Synapse's own tooling holds this line — `synapse write-node` goes through the same `Store`
|
|
117
|
+
abstraction the CLI does, rather than writing files directly — so agent writes have no reason to
|
|
118
|
+
differ. If the CLI itself ever fails (not installed, no vault configured), that's a real precondition
|
|
119
|
+
failure to report and stop on, never a reason to fall back to a raw file edit.
|
|
120
|
+
|
|
121
|
+
The `obsidian` MCP server (wrapping the same Local REST API) still exists and is still the right
|
|
122
|
+
tool for a command that hasn't been migrated onto the CLI's `vault-*` subcommands yet (`/synapse-vault-tidy`, as of
|
|
123
|
+
this writing — it needs whole-vault link/backlink data the CLI doesn't expose). If a project's
|
|
124
|
+
`.claude.json` `mcpServers.obsidian` entry ever diverges from the user-scoped one (e.g. points at the
|
|
125
|
+
wrong vault path via a stdio `obsidian-mcp` package instead of the REST API), that's a bug in that
|
|
126
|
+
project's config, not a Synapse Vault routing choice — fix it by removing the project-level override
|
|
127
|
+
so the correct user-scoped REST API server applies.
|
|
130
128
|
|
|
131
129
|
- You may create and edit notes in this vault **without asking for
|
|
132
130
|
permission first**, as long as each note is placed in the folder
|
|
@@ -188,7 +186,7 @@ applies.
|
|
|
188
186
|
`/synapse-note --task` (or compile one from a `Ready` design note with
|
|
189
187
|
`/synapse-task-note`), and make every status transition, checklist edit,
|
|
190
188
|
or `## Notes` append only through the `synapse-task` skill's own
|
|
191
|
-
procedure — never a bare `
|
|
189
|
+
procedure — never a bare `vault-write`/`vault-patch` on a task note, not
|
|
192
190
|
even mid-session, not even for a quick update. Bypassing the command/skill
|
|
193
191
|
doesn't just risk drifting from the checklist-items-plus-`## Notes`
|
|
194
192
|
skeleton every other task note shares — the skill is also where the
|
|
@@ -200,17 +198,19 @@ applies.
|
|
|
200
198
|
|
|
201
199
|
## Searching notes
|
|
202
200
|
|
|
203
|
-
Prefer
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
- `
|
|
207
|
-
|
|
208
|
-
- `
|
|
209
|
-
|
|
210
|
-
structured filter rather than free text, e.g. finding all notes with a
|
|
211
|
-
|
|
212
|
-
-
|
|
213
|
-
|
|
201
|
+
Prefer `synapse vault-search-text`/`vault-search` over raw file grepping — they read the vault
|
|
202
|
+
directly and don't require re-deriving paths:
|
|
203
|
+
|
|
204
|
+
- `synapse vault-search-text <query>` — full-text search with relevance scoring and match context,
|
|
205
|
+
for "does a note about X already exist" checks.
|
|
206
|
+
- `synapse vault-search --fields <f1,f2,...>` — JsonLogic queries over note metadata (frontmatter
|
|
207
|
+
fields, tags, content, path globs — not `links`/`backlinks`, which no CLI subcommand exposes yet)
|
|
208
|
+
when you need a structured filter rather than free text, e.g. finding all notes with a given
|
|
209
|
+
`task_id` or `status`. `--fields` projects exactly the columns needed back in the same call, so a
|
|
210
|
+
follow-up read is rarely necessary.
|
|
211
|
+
- `synapse vault-list` / `vault-read` for direct navigation when you already know roughly where
|
|
212
|
+
something is. `synapse vault-doc-map <path>` lists a note's heading paths, block ids, and
|
|
213
|
+
frontmatter keys, for picking a real `vault-patch` target instead of guessing one.
|
|
214
214
|
|
|
215
215
|
# Git commits
|
|
216
216
|
|
package/synapse.conf.template
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copy this to ~/.claude/synapse.conf and edit the path for this machine.
|
|
2
|
-
|
|
2
|
+
SYNAPSE_VAULT_DIR="$HOME/Obsidian/YourVault"
|
|
3
3
|
|
|
4
4
|
# Where Synapse clones/builds tree-sitter grammars (shared across every
|
|
5
5
|
# project -- not per-repo). Safe to leave at the default.
|