@imunitic/synapse 0.4.5 → 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imunitic/synapse",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"description": "Memory for Claude Code, Codex CLI, and OpenCode: a durable markdown vault plus a per-repo code graph.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"*.conf.template"
|
|
24
24
|
],
|
|
25
25
|
"optionalDependencies": {
|
|
26
|
-
"@imunitic/synapse-darwin-arm64": "0.4.
|
|
27
|
-
"@imunitic/synapse-linux-x64": "0.4.
|
|
28
|
-
"@imunitic/synapse-linux-arm64": "0.4.
|
|
26
|
+
"@imunitic/synapse-darwin-arm64": "0.4.7",
|
|
27
|
+
"@imunitic/synapse-linux-x64": "0.4.7",
|
|
28
|
+
"@imunitic/synapse-linux-arm64": "0.4.7"
|
|
29
29
|
},
|
|
30
30
|
"license": "SEE LICENSE IN LICENSE"
|
|
31
31
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: synapse-query
|
|
3
|
-
description: This repo has a Synapse code graph. For ANY task here — understanding how something works, finding where code lives, tracing what depends on a file, or scoping an edit — consult synapse/{project}/Index.md and synapse query before grepping or reading source files. Grep only after Synapse has named the exact file(s) to read.
|
|
3
|
+
description: This repo has a Synapse code graph. For ANY task here — understanding how something works, finding where code lives, tracing what depends on a file, or scoping an edit — consult synapse/{project}/Index.md and synapse query before grepping or reading source files. Grep only after Synapse has named the exact file(s) to read. Also applies when this repo has no graph of its own but the task concerns another checkout that does — synapse query --namespace <repo>@<branch> reaches that graph without switching directories.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Synapse Query: Day-to-Day Use of the Code Graph
|
|
@@ -56,6 +56,7 @@ required:
|
|
|
56
56
|
| A node's prose, without its (possibly huge) `sources` list | `synapse query body "{Node}"` | Disk read, never the API; skips frontmatter and `## Notes`. See the cost note above. |
|
|
57
57
|
| Every file a node covers | `synapse query sources "{Node}" [--count\|--modules\|--filter <p>]` | Filtered/counted/grouped, never the raw megabyte-scale list. |
|
|
58
58
|
| Is this node's understanding still accurate? | `synapse query stale` / `drift` / `grounding` | Hand off to the `synapse-node` skill's procedure — this skill doesn't re-explain that. |
|
|
59
|
+
| A node in a *different* checkout's graph, from a repo with no namespace of its own (or the wrong one) | `synapse query --namespace <repo>@<branch> body "{Node}"` (any subcommand takes it) | Names the target namespace directly instead of deriving it from cwd. `stale`/`drift`/`grounding`/`symbol` still need that checkout's real files on disk and refuse without `SYNAPSE_REPO_ROOT` set to it — `body`/`sources`/`field`/`links` don't. |
|
|
59
60
|
|
|
60
61
|
## Usage scenarios
|
|
61
62
|
|
|
@@ -87,12 +88,17 @@ resolve the specific symbol-level question:
|
|
|
87
88
|
## Guardrails
|
|
88
89
|
|
|
89
90
|
- **Never grep the whole repo before checking `synapse/{project}/Index.md`**, unless this repo has
|
|
90
|
-
no Synapse namespace at all (`vault_list` on `synapse/{project}/` comes back empty
|
|
91
|
-
there's nothing to consult,
|
|
91
|
+
no Synapse namespace at all (`vault_list` on `synapse/{project}/` comes back empty). Before
|
|
92
|
+
concluding there's nothing to consult, check whether the task actually concerns a *different*
|
|
93
|
+
checkout — `synapse query --namespace <repo>@<branch> body "{Node}"` reaches that repo's graph
|
|
94
|
+
without switching directories or checking it out. Only when no namespace anywhere covers the task
|
|
95
|
+
is there truly nothing to consult; say so and proceed normally.
|
|
92
96
|
- **Never treat a node's summary as ground truth for a symbol-level claim** it wasn't built to make
|
|
93
97
|
precisely — see "When a node isn't enough" above.
|
|
94
|
-
- **Never `vault_read` a node just to read its prose
|
|
95
|
-
run to megabytes on a hub node. Use
|
|
98
|
+
- **Never `vault_read` a node just to read its prose — including a node in another checkout's
|
|
99
|
+
namespace.** That pulls the full frontmatter, which can run to megabytes on a hub node. Use
|
|
100
|
+
`synapse query body` (add `--namespace <repo>@<branch>` for a graph outside this checkout) — see
|
|
101
|
+
the cost note above.
|
|
96
102
|
- **Never reason about a node's staleness inline in this skill.** Hand off to `synapse-node`'s
|
|
97
103
|
procedure — that's its job, not this skill's.
|
|
98
104
|
- **Never treat `synapse query`'s exit 1 as "clean."** It means the check could not run (no
|
|
@@ -30,7 +30,7 @@ Search before you answer when the question is about:
|
|
|
30
30
|
synapse vault-search-text <query> full-text, relevance-ranked, with match context
|
|
31
31
|
synapse vault-search --fields <f1,f2,...> JsonLogic over frontmatter, tags, content, path globs
|
|
32
32
|
synapse vault-list when you already know roughly where it is
|
|
33
|
-
synapse vault-read <path> the whole note -- no partial/targeted read
|
|
33
|
+
synapse vault-read <path> the whole note -- no partial/targeted read, except one path shape below
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
`vault-search`'s JsonLogic filter and `--fields` projection both stop at frontmatter/tags/content/
|
|
@@ -39,6 +39,13 @@ exists yet), and `vault-read` always returns the full body, never one section on
|
|
|
39
39
|
exactly what you need with `--fields` instead of over-fetching, and pull a specific section out of
|
|
40
40
|
`vault-read`'s output locally when that's all you actually need.
|
|
41
41
|
|
|
42
|
+
**The one exception is a `synapse/{project}/*.md` code-graph node.** `vault-read` on one of those
|
|
43
|
+
returns the same whole-note body as any other path — frontmatter included, which on a hub node can
|
|
44
|
+
run to megabytes just to reach a few hundred words of prose. `synapse query body <node>` (add
|
|
45
|
+
`--namespace <repo>@<branch>` to reach a different checkout's graph) is the targeted read for that
|
|
46
|
+
one path shape: prose only, no frontmatter. Reach for it instead of `vault-read` for anything under
|
|
47
|
+
`synapse/` — see the `synapse-query` skill for the rest of its subcommands.
|
|
48
|
+
|
|
42
49
|
A search that returns nothing is a real result and worth one line in the note you then write —
|
|
43
50
|
a negative result cannot be rediscovered by searching for it.
|
|
44
51
|
|