granite-mem 0.1.6 → 0.1.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.
- package/README.md +34 -14
- package/dist/index.js +1002 -910
- package/dist/public/app.js +252 -300
- package/dist/public/graph.js +11 -14
- package/dist/public/index.html +115 -102
- package/dist/public/markdown-renderer.js +49 -51
- package/dist/public/style.css +595 -558
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Most PKM tools give you a blank canvas. Granite gives you a working system:
|
|
|
8
8
|
|
|
9
9
|
- capture quickly
|
|
10
10
|
- structure ideas without over-designing your workflow
|
|
11
|
-
-
|
|
11
|
+
- keep sources, durable notes, syntheses, and outputs connected
|
|
12
12
|
- surface what to connect or write next
|
|
13
13
|
- stay fully local, scriptable, and agent-friendly
|
|
14
14
|
|
|
@@ -39,13 +39,12 @@ Granite is opinionated where it matters and flexible where it should be.
|
|
|
39
39
|
|
|
40
40
|
Granite ships with a small working model instead of an empty workspace:
|
|
41
41
|
|
|
42
|
-
- `
|
|
43
|
-
- `
|
|
44
|
-
- `
|
|
45
|
-
- `
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
- `decision` for durable decision records
|
|
42
|
+
- `note` for durable ideas
|
|
43
|
+
- `source` for imported or observed source material
|
|
44
|
+
- `synthesis` for durable compiled knowledge
|
|
45
|
+
- `output` for audience-specific deliverables
|
|
46
|
+
|
|
47
|
+
`note -> synthesis -> output`
|
|
49
48
|
|
|
50
49
|
This is enough structure to make your notes connect naturally, without forcing you into a heavyweight system.
|
|
51
50
|
|
|
@@ -83,7 +82,7 @@ Create the default vault in `~/.granite` and start capturing:
|
|
|
83
82
|
```bash
|
|
84
83
|
granite init
|
|
85
84
|
granite add "Talked to Alice about local-first sync tradeoffs"
|
|
86
|
-
granite new "Local-first sync tradeoffs" --type
|
|
85
|
+
granite new "Local-first sync tradeoffs" --type note
|
|
87
86
|
granite list
|
|
88
87
|
granite search "sync"
|
|
89
88
|
```
|
|
@@ -108,7 +107,7 @@ granite add "Users want fewer note types, but stronger defaults."
|
|
|
108
107
|
Turn it into a durable note:
|
|
109
108
|
|
|
110
109
|
```bash
|
|
111
|
-
granite new "Strong defaults beat infinite flexibility" --type
|
|
110
|
+
granite new "Strong defaults beat infinite flexibility" --type note
|
|
112
111
|
```
|
|
113
112
|
|
|
114
113
|
Find connections:
|
|
@@ -149,11 +148,29 @@ note_types:
|
|
|
149
148
|
line_limit: 120
|
|
150
149
|
warn_only: true
|
|
151
150
|
slug_format: title
|
|
152
|
-
instructions: Capture the idea clearly, then link it to a
|
|
151
|
+
instructions: Capture the idea clearly, then link it to a source, note, or synthesis.
|
|
153
152
|
```
|
|
154
153
|
|
|
155
154
|
The point is not to create 30 note types. The point is to add a type only when it makes your memory system sharper.
|
|
156
155
|
|
|
156
|
+
## Protocol Fields
|
|
157
|
+
|
|
158
|
+
Granite keeps the core schema small, but now includes a few shared fields that help both humans and agents work safely in the same vault:
|
|
159
|
+
|
|
160
|
+
- `status`: `inbox | active | archived`
|
|
161
|
+
- `source`: `human | agent | extraction`
|
|
162
|
+
- `review_state`: `draft | reviewed | locked`
|
|
163
|
+
- `durability`: `canonical | working | ephemeral`
|
|
164
|
+
- `derived_from`: list of note IDs or slugs used as provenance
|
|
165
|
+
|
|
166
|
+
These fields are intentionally lightweight:
|
|
167
|
+
|
|
168
|
+
- `review_state` is the editorial state
|
|
169
|
+
- `durability` distinguishes durable knowledge from working material or situational outputs
|
|
170
|
+
- `derived_from` is the minimal provenance hook for syntheses and outputs
|
|
171
|
+
|
|
172
|
+
Granite does not impose a full agent workflow in the core. Richer conventions such as agent traces or synthesis policies are better handled in templates, skills, and team protocol.
|
|
173
|
+
|
|
157
174
|
## Local-First Architecture
|
|
158
175
|
|
|
159
176
|
Granite keeps the source of truth boring and durable:
|
|
@@ -172,7 +189,7 @@ This keeps the system transparent, portable, and inspectable.
|
|
|
172
189
|
Many commands support JSON output:
|
|
173
190
|
|
|
174
191
|
```bash
|
|
175
|
-
granite new "Sync constraints" --type
|
|
192
|
+
granite new "Sync constraints" --type note --review-state reviewed --durability canonical --json
|
|
176
193
|
granite list --json
|
|
177
194
|
granite show sync-constraints --json
|
|
178
195
|
granite search "constraints" --json
|
|
@@ -204,6 +221,8 @@ The server exposes:
|
|
|
204
221
|
- resources for `granite.yml`, vault overview, note types, and individual notes via `granite://notes/{slug}`
|
|
205
222
|
- prompts for refining notes and reviewing links/next steps
|
|
206
223
|
|
|
224
|
+
The note payloads exposed through MCP include the shared protocol fields (`status`, `source`, `review_state`, `durability`, `derived_from`) so clients can make safer decisions without Granite embedding any model-specific logic.
|
|
225
|
+
|
|
207
226
|
Example stdio client configuration:
|
|
208
227
|
|
|
209
228
|
```json
|
|
@@ -217,10 +236,10 @@ Example stdio client configuration:
|
|
|
217
236
|
|
|
218
237
|
```bash
|
|
219
238
|
granite init
|
|
220
|
-
granite new <title> [--type <type>] [--json]
|
|
239
|
+
granite new <title> [--type <type>] [--source <source>] [--status <status>] [--review-state <state>] [--durability <durability>] [--derived-from <refs>] [--json]
|
|
221
240
|
granite add [text] [--json]
|
|
222
241
|
granite list [--type <type>] [--json]
|
|
223
|
-
granite edit <slug>
|
|
242
|
+
granite edit <slug> [--body <text>] [--append <text>] [--title <title>] [--tag <tags>] [--alias <aliases>] [--status <status>] [--source <source>] [--review-state <state>] [--durability <durability>] [--derived-from <refs>]
|
|
224
243
|
granite open <slug>
|
|
225
244
|
granite show <slug> [--json] [--body]
|
|
226
245
|
granite search <query> [--json]
|
|
@@ -265,5 +284,6 @@ Granite is built on a few beliefs:
|
|
|
265
284
|
- relationships between notes matter more than visual chrome
|
|
266
285
|
- a good PKM should help you decide what to connect or write next
|
|
267
286
|
- tools for humans should also be legible to agents
|
|
287
|
+
- protocol belongs in the core, agent policy belongs outside it
|
|
268
288
|
|
|
269
289
|
If that sounds right, Granite is the tool.
|