understanding-graph 0.1.4 → 0.1.5

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 CHANGED
@@ -117,15 +117,24 @@ Without it, the rest of the graph (skeleton, history, batch, supersede, semantic
117
117
 
118
118
  ## How It Works
119
119
 
120
- Every mutation goes through `graph_batch` with a required `commit_message` -- git for cognition. Nodes are never deleted, only superseded. The commit stream becomes a metacognitive log that other agents can read to understand what happened and why.
120
+ Every mutation goes through `graph_batch` with a required `commit_message` git for cognition. The batch is wrapped in a SQLite transaction: if any operation fails, the entire batch rolls back as if it never ran. Nodes are never deleted, only superseded. The commit stream becomes a metacognitive log that other agents can read to understand what happened and why — each node's commit message becomes its *Origin Story*, the agent's inner monologue at the moment of creation.
121
121
 
122
122
  ```
123
- 1. project_switch("my-project") # Load a project
123
+ 1. project_switch("my-project") # Load (or create) a project
124
124
  2. graph_skeleton() # Orient yourself (~150 tokens)
125
- 3. graph_semantic_search({ query }) # Find relevant past reasoning
126
- 4. graph_batch({ commit_message, ... }) # Mutate with intent
125
+ 3. graph_history() # See what other agents did recently
126
+ 4. graph_semantic_search({ query }) # Find relevant past reasoning (optional embeddings)
127
+ 5. graph_batch({ commit_message, ... }) # Mutate with intent — atomic
127
128
  ```
128
129
 
130
+ ### Atomic commits
131
+
132
+ `graph_batch` is the only mutation entry point. Inside one batch you can chain `graph_add_concept`, `graph_connect`, `graph_question`, `graph_supersede`, `doc_create`, and others. The pre-validation check accepts both ID and *title* references for `graph_connect`, and computes transitive reachability (so a chain `A → B → existing` is valid even though A doesn't directly touch existing). On any failure mid-batch, the entire transaction rolls back; no half-state.
133
+
134
+ ### Cross-project references
135
+
136
+ A graph node in one project can reference a node in another project via `graph_add_reference({ refProject, refNodeId })`. Other projects can then read it without switching via `graph_lookup_external` or find it by ID alone via `graph_global_lookup`. This is the substrate for the *Hierarchical Understanding Graph* used by the [entangled-alignment](https://github.com/emergent-wisdom/entangled-alignment) chronological annotation pipeline, where eras and documents draw cross-references.
137
+
129
138
  ---
130
139
 
131
140
  ## Core Concepts
@@ -134,6 +143,8 @@ Every mutation goes through `graph_batch` with a required `commit_message` -- gi
134
143
 
135
144
  Each node captures a moment of comprehension with a **trigger** marking *why* it was created:
136
145
 
146
+ Triggers are *cognitive acts*, not categories — they capture *why* the agent created the node at this exact moment, not what kind of thing it is. The seven you'll use most often:
147
+
137
148
  | Trigger | When to Use |
138
149
  |---------|-------------|
139
150
  | `foundation` | Core concepts, axioms, starting points |
@@ -141,9 +152,10 @@ Each node captures a moment of comprehension with a **trigger** marking *why* it
141
152
  | `tension` | Conflict between ideas, unresolved |
142
153
  | `consequence` | Downstream implication |
143
154
  | `question` | Open question to explore |
144
- | `decision` | Choice made between alternatives |
145
- | `thinking` | Reasoning trace during reading |
146
- | `prediction` | Forward-looking belief |
155
+ | `decision` | Choice made between alternatives, with rationale |
156
+ | `prediction` | Forward-looking belief that can be validated later |
157
+
158
+ Less common but available: `hypothesis`, `model`, `evaluation`, `analysis`, `experiment`, `serendipity`, `repetition`, `randomness`, `reference`, `library`. The `thinking` trigger is reserved for the synthesizer agent and rejected for normal use. The full set of 18 trigger types is documented in the [understanding-graph paper](paper/understanding_graph.pdf) (Section 3.1) and described as the *minimum* count for cognitive distinguishability — collapsing them would dissolve the Cognitive Guardrail.
147
159
 
148
160
  ### Edges (Connections)
149
161
 
@@ -392,11 +404,11 @@ cd packages/frontend && npm run dev
392
404
 
393
405
  ## The Five Laws
394
406
 
395
- 1. **Git for Cognition** -- Nodes are never deleted, only superseded. Every `graph_batch` requires a `commit_message`.
396
- 2. **PURE Standard** -- Quality gates: **P**arsimonious, **U**nique, **R**ealizable, **E**xpansive.
397
- 3. **Graph-First Context** -- Always check existing graph before creating new nodes.
398
- 4. **Synthesize, Don't Transcribe** -- Capture implications, not just facts.
399
- 5. **Delegate by Default** -- Break complex tasks into sub-tasks.
407
+ 1. **Git for Cognition** Nodes are never deleted, only superseded. The supersession edge preserves the *epistemic journey*: a future agent reading the chain learns not just the current belief but the path from the wrong belief to the right one. Every `graph_batch` requires a `commit_message` that becomes the node's *Origin Story*.
408
+ 2. **PURE Standard** Quality gates: **P**arsimonious, **U**nique, **R**ealizable, **E**xpansive. Non-compensatory: any RED gate halts.
409
+ 3. **Graph-First Context** Always check existing graph before creating new nodes. Duplicate detection is a forcing function, not a check: it pulls prior cognition into the current moment.
410
+ 4. **Synthesize, Don't Transcribe** Capture *implications* and *tensions*, not raw facts. The graph is for your understanding, not your input.
411
+ 5. **Delegate by Default** Break complex tasks into sub-tasks via the solver system; let specialized agents (Skeptic, Connector, Synthesizer) coordinate stigmergically through the graph.
400
412
 
401
413
  ---
402
414
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@understanding-graph/core",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Core business logic for understanding graph",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@understanding-graph/mcp-server",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "MCP server for building understanding graphs - persistent AI memory that captures comprehension, not just facts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "understanding-graph",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
+ "mcpName": "io.github.emergent-wisdom/understanding-graph",
4
5
  "description": "Persistent understanding graphs for AI agents - structured memory with MCP support",
5
6
  "author": "Henrik Westerberg",
6
7
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@understanding-graph/core",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Core business logic for understanding graph",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@understanding-graph/mcp-server",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "MCP server for building understanding graphs - persistent AI memory that captures comprehension, not just facts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/server.json CHANGED
@@ -1,28 +1,35 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
3
3
  "name": "io.github.emergent-wisdom/understanding-graph",
4
- "description": "Persistent reasoning memory for AI agents: tensions, hypotheses, belief revisions, and multi-agent coordination through shared thinking traces.",
5
- "status": "active",
4
+ "description": "Persistent reasoning memory for AI agents via typed cognitive nodes and supersedes edges.",
5
+ "version": "0.1.5",
6
6
  "repository": {
7
7
  "url": "https://github.com/emergent-wisdom/understanding-graph",
8
8
  "source": "github"
9
9
  },
10
- "website_url": "https://emergentwisdom.org/entangled-alignment/",
11
- "version_detail": {
12
- "version": "0.1.4",
13
- "release_date": "2026-04-08"
14
- },
10
+ "websiteUrl": "https://emergentwisdom.org/entangled-alignment/",
15
11
  "packages": [
16
12
  {
17
- "registry_name": "npm",
18
- "name": "understanding-graph",
19
- "version": "0.1.4",
20
- "runtime_hint": "npx",
21
- "package_arguments": [
22
- { "name": "-y" }
13
+ "registryType": "npm",
14
+ "registryBaseUrl": "https://registry.npmjs.org",
15
+ "identifier": "understanding-graph",
16
+ "version": "0.1.5",
17
+ "transport": {
18
+ "type": "stdio"
19
+ },
20
+ "runtimeHint": "npx",
21
+ "runtimeArguments": [
22
+ {
23
+ "type": "positional",
24
+ "value": "-y"
25
+ }
23
26
  ],
24
- "command": "understanding-graph",
25
- "subcommand": "mcp"
27
+ "packageArguments": [
28
+ {
29
+ "type": "positional",
30
+ "value": "mcp"
31
+ }
32
+ ]
26
33
  }
27
34
  ]
28
35
  }