@imunitic/synapse 0.3.1 → 0.3.2
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.
|
@@ -32,8 +32,9 @@ below:
|
|
|
32
32
|
The title is whatever the user is naming or describing, minus any mode-signaling phrasing. Example:
|
|
33
33
|
|
|
34
34
|
- "make a note about my idea" → bare note titled "My idea"
|
|
35
|
-
- "track this as a task: implement Foo" → task note titled "Implement Foo"
|
|
36
|
-
|
|
35
|
+
- "track this as a task: implement Foo" → task note titled "Implement Foo"; if no task ID is
|
|
36
|
+
already present in that phrasing, "Resolving a missing task ID" below assigns one to `task_id`
|
|
37
|
+
in frontmatter only, without changing the title
|
|
37
38
|
|
|
38
39
|
In task mode, also attempt to extract a task ID from the title by matching a `{prefix}-\d+` pattern
|
|
39
40
|
(letters, a hyphen, then digits) — the user sometimes already names one directly (e.g. "track
|
|
@@ -105,19 +106,19 @@ unchanged for anyone who has never touched an XDG config directory.
|
|
|
105
106
|
5. Whenever step 3 or step 4 resolves a pair not already in the conf file (including a fresh
|
|
106
107
|
`project-name=prefix` line matching what was just deduced or asked), append it — so the next task
|
|
107
108
|
for this project resolves from step 2 without a search or a question.
|
|
108
|
-
6. Once the prefix is known, find the next number
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
`
|
|
112
|
-
|
|
109
|
+
6. Once the prefix is known, find the next number. `task_id` and `note_id` (the id every note gets
|
|
110
|
+
— see "Assigning a note_id" below) share one counter per prefix, so this has to check both
|
|
111
|
+
fields, not just `task_id` alone: run `synapse vault-search --fields
|
|
112
|
+
frontmatter.task_id,frontmatter.note_id` with `{"or": [{"!=": [{"var": "frontmatter.task_id"},
|
|
113
|
+
null]}, {"!=": [{"var": "frontmatter.note_id"}, null]}]}` on stdin, filter both returned columns
|
|
114
|
+
client-side for values matching `{prefix}-\d+`, take the highest number found across both, add
|
|
115
|
+
1. If none exist yet for that prefix, start at 1.
|
|
113
116
|
7. Format the new task ID **zero-padded to 3 digits** (`{prefix}-001`, `{prefix}-030`,
|
|
114
117
|
`{prefix}-037`, ...), matching the org-roam-era convention — widening
|
|
115
118
|
naturally past 3 digits if a prefix ever needs it.
|
|
116
|
-
8. **
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
use the resolved task ID for `task_id`. Don't let the frontmatter task
|
|
120
|
-
ID and the visible title disagree.
|
|
119
|
+
8. **The title itself is never prefixed with the task ID.** `task_id` lives in frontmatter only —
|
|
120
|
+
the same convention `note_id` already uses for bare and design notes, now consistent across all
|
|
121
|
+
three kinds. `title`, the `# ` heading, and the filename all stay exactly the given topic.
|
|
121
122
|
|
|
122
123
|
The synapse-design-note and synapse-task-note skills read the same conf file directly for the same
|
|
123
124
|
reason — they don't duplicate this resolution logic, just this file.
|
|
@@ -146,6 +147,25 @@ triage/priority one a vault owner might maintain by hand (e.g.
|
|
|
146
147
|
sorting a note into one of those, if a category has one, is never an
|
|
147
148
|
agent's call to make.
|
|
148
149
|
|
|
150
|
+
## Assigning a note_id (bare mode only)
|
|
151
|
+
|
|
152
|
+
Task mode already gets its id via "Resolving a missing task ID" above. Bare mode needs one too —
|
|
153
|
+
every note gets a `note_id`, not just tasks — but unlike task mode, this step never blocks with a
|
|
154
|
+
question: a quick bare note shouldn't require an interrupt just to get an id.
|
|
155
|
+
|
|
156
|
+
1. Try steps 1-3 of "Resolving a missing task ID" above (repo context, the resolved
|
|
157
|
+
`synapse-projects.conf`, then deducing from the vault itself) to resolve a project prefix. Skip
|
|
158
|
+
step 4 entirely — if none of the first three resolve one, fall through to step 2 below instead of
|
|
159
|
+
asking.
|
|
160
|
+
2. If a prefix resolved: mint the next number the same shared-counter way as that section's step 6
|
|
161
|
+
(checking both `task_id` and `note_id` across the vault for that prefix). If no prefix resolved:
|
|
162
|
+
mint `note-NNN` instead — its own flat, project-less counter, found the same way (`synapse
|
|
163
|
+
vault-search --fields frontmatter.note_id`, filter for `note-\d+`, take the highest, add 1; start
|
|
164
|
+
at 1 if none exist yet).
|
|
165
|
+
3. Carry the resolved `{id}` into "Creating the note" below as `note_id`. Unlike task mode, the title
|
|
166
|
+
itself is untouched — no id prefix on the visible title or the `title` frontmatter field for a bare
|
|
167
|
+
note.
|
|
168
|
+
|
|
149
169
|
## Resolving the project folder (task mode only)
|
|
150
170
|
|
|
151
171
|
Task notes are grouped one level deeper by project, `tasks/{project}/{filename}.md` — see the
|
|
@@ -178,6 +198,7 @@ or supplied directly by a caller like the synapse-task-note skill):
|
|
|
178
198
|
---
|
|
179
199
|
title: "{title}"
|
|
180
200
|
created: "{now}"
|
|
201
|
+
note_id: {id}
|
|
181
202
|
---
|
|
182
203
|
|
|
183
204
|
```
|
|
@@ -68,8 +68,9 @@ Follow the synapse-note skill's task-mode procedure exactly (its "Creating the n
|
|
|
68
68
|
don't duplicate that scaffolding here, just supply its inputs:
|
|
69
69
|
|
|
70
70
|
- **Title:** a short, plain description of the compiled plan (e.g. "Rollup direct storage
|
|
71
|
-
implementation") —
|
|
72
|
-
and
|
|
71
|
+
implementation") — stays exactly this, never prefixed with the resolved `task_id`; the
|
|
72
|
+
synapse-note skill's task mode resolves the project prefix and `task_id` itself and puts them in
|
|
73
|
+
frontmatter only.
|
|
73
74
|
- **Project:** derive from the source design note's `project:` frontmatter — that prefix is already
|
|
74
75
|
resolved (the design note went through the synapse-design-note skill's resolution when it was
|
|
75
76
|
created, which reads/appends the resolved `synapse-projects.conf`, per the synapse-note skill's
|
|
@@ -133,7 +134,7 @@ Codex: [reads designs/{PROJECT} — Rollup direct storage.md, Status: Ready]
|
|
|
133
134
|
|
|
134
135
|
Project already known: {PROJECT} → {prefix}-005.
|
|
135
136
|
|
|
136
|
-
Created: tasks/{PROJECT}/
|
|
137
|
+
Created: tasks/{PROJECT}/Rollup direct storage implementation.md (task_id: {prefix}-005)
|
|
137
138
|
Linked back from designs/{PROJECT} — Rollup direct storage.md.
|
|
138
139
|
|
|
139
140
|
Status transitions happen automatically via the synapse-task skill once you start work.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imunitic/synapse",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Memory for Claude Code, Codex CLI, and OpenCode: a durable Obsidian vault plus a per-repo code graph.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"*.conf.template"
|
|
23
23
|
],
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@imunitic/synapse-darwin-arm64": "0.3.
|
|
26
|
-
"@imunitic/synapse-linux-x64": "0.3.
|
|
27
|
-
"@imunitic/synapse-linux-arm64": "0.3.
|
|
25
|
+
"@imunitic/synapse-darwin-arm64": "0.3.2",
|
|
26
|
+
"@imunitic/synapse-linux-x64": "0.3.2",
|
|
27
|
+
"@imunitic/synapse-linux-arm64": "0.3.2"
|
|
28
28
|
},
|
|
29
29
|
"license": "SEE LICENSE IN LICENSE"
|
|
30
30
|
}
|