Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cursor/skills/SKILL-GRAPH.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Audience:** model. Wire SSOT: [memnet-format](memnet-format/SKILL.md) and `docs/grammar/gql-wire-profile.md`. Do **not** treat this file as the session graph.

This folder **vendors** the MemNet stack. Hatch **0.19.3** (PyPI **`memnet-llm==0.19.3`**). Cue then `pin_map`; `find` if ego unknown. **GQL only.** Package SemVer `a.b.c` (claim / usage-method revision / same-method cut): `docs/ROADMAP.md`. Do not invent 0.20.
This folder **vendors** the MemNet stack. Hatch **0.19.4** (last PyPI **`memnet-llm==0.19.3`** until upload). Cue then `pin_map`; `find` if ego unknown. **GQL only.** Package SemVer `a.b.c` (claim / usage-method revision / same-method cut): `docs/ROADMAP.md`. Do not invent 0.20.

## Routing

Expand Down
4 changes: 2 additions & 2 deletions .cursor/skills/memnet-format/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
pattern: tool-wrapper
version: "5.3"
domain: data-formats,memnet
product: memnet-llm==0.19.3
product: memnet-llm==0.19.4
token_guardrails: |
- Wire SSOT: docs/grammar/gql-wire-profile.md. This skill is MemNet-specific only.
- pin_map from a cue; leftover anchor= is leftover. Do not dump S.
Expand All @@ -17,7 +17,7 @@ token_guardrails: |

# MemNet formats

Pair with [mcp-memnet](../mcp-memnet/SKILL.md). Formal SSOT: `docs/grammar/gql-wire-profile.md`. Hatch **0.19.3**.
Pair with [mcp-memnet](../mcp-memnet/SKILL.md). Formal SSOT: `docs/grammar/gql-wire-profile.md`. Hatch **0.19.4**.

**GQL only.** Node / edge / property. Do not teach Layer, Tier A, pipe `@TAG`, or TOON/TRON. leftover `id:'NEW'` / leftover `anchor=` are leftover.

Expand Down
4 changes: 2 additions & 2 deletions .cursor/skills/memnet-reference/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
pattern: pipeline
version: "2.3"
domain: memnet
product: "0.19.3"
product: "0.19.4"
---

# MemNet product development reference
Expand All @@ -19,7 +19,7 @@ Repo skill for **building** MemNet in **this** repository. Doctrine SSOT is `doc

This checkout **vendors** agent skills under `.cursor/skills/` (core: `memnet-use` + MCP/format/nested/multitask). Load those when **using** MemNet; load **this** skill only when changing the engine, generic MCP, grammar, product SysML, or packaging.

**Product:** Hatch **0.19.3** (CLI `memnet`). PyPI **`memnet-llm==0.19.3`**. Version map: `docs/ROADMAP.md`. Shape: `docs/SHAPE.md`. **1.0** = 0.5–0.8 claimed (do not tag from this skill).
**Product:** Hatch **0.19.4** (CLI `memnet`). PyPI **`memnet-llm==0.19.3`** until 0.19.4 upload. Version map: `docs/ROADMAP.md`. Shape: `docs/SHAPE.md`. **1.0** = 0.5–0.8 claimed (do not tag from this skill).

**`a.b.c` (ROADMAP law).** `a` = claim / generation (`0` = 1.0 unclaimed; `1` = claim of 0.5–0.8). `a` moves only if the contract breaks (Recall=`pin_map` / Commit=`mutate`, GraphElement identity, GQL-only wire). `b` = usage-method revision (new required loop step, new product tool, cue/outline/identity law, new goldfish verb). Historical extras **0.10–0.19** were `b`. N-server (#47) is not a `b`. `c` = same-method cut (honesty, leftover naming, docs/skills, wheel/tag, caps, façade, faster same `cue → pin_map → mutate`). Efficiency on the current loop is **`0.19.c`**, not `0.20`. Do not invent a 0.20 extra. Do not claim 1.0.

Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LLM hub for this system repo. Prefer in-repo skills and docs over ad-hoc inventi

## Mission

**MemNet** (Net of Memory) is **mission working memory** — a session graph (GQL **node**/vertex, **edge**/relationship, **property**) **between** LLM call pipelines and data search, not the corpus and not GraphRAG. Agents read a bounded **live pin map** each turn and write in the same **GQL (openCypher-shaped)** family — redefined **Write = display** via shaped subgraph emit ([`docs/grammar/gql-wire-profile.md`](docs/grammar/gql-wire-profile.md)). In-session recall is **serial**: kind/keyword cue, then `pin_map` neighbourhood. Primary read: MCP `pin_map` / CLI `query pin-map`; leftover `query_warm` / `query warm` are leftover aliases. Aims (MN-REQ-00): save wall-clock time and tokens while keeping factual accuracy. Aids **system**, **programme**, **software**, **firmware**, **hardware**, and **documentation**. Transport: **in-process first** (single-agent; TCP fallback). **Multitask** requires TCP serve or streamable-http MCP — see Multitask policy below. This repo is **engine + generic memnet-mcp** only — novel-writer dropped. Repo product **0.19.3** (Hatch SSOT); last published PyPI **`memnet-llm==0.19.0`** until 0.19.3 is uploaded. **1.0** = 0.5–0.8 claimed (unclaimed). See `README.md`, [`docs/SHAPE.md`](docs/SHAPE.md), and `docs/grammar/`.
**MemNet** (Net of Memory) is **mission working memory** — a session graph (GQL **node**/vertex, **edge**/relationship, **property**) **between** LLM call pipelines and data search, not the corpus and not GraphRAG. Agents read a bounded **live pin map** each turn and write in the same **GQL (openCypher-shaped)** family — redefined **Write = display** via shaped subgraph emit ([`docs/grammar/gql-wire-profile.md`](docs/grammar/gql-wire-profile.md)). In-session recall is **serial**: kind/keyword cue, then `pin_map` neighbourhood. Primary read: MCP `pin_map` / CLI `query pin-map`; leftover `query_warm` / `query warm` are leftover aliases. Aims (MN-REQ-00): save wall-clock time and tokens while keeping factual accuracy. Aids **system**, **programme**, **software**, **firmware**, **hardware**, and **documentation**. Transport: **in-process first** (single-agent; TCP fallback). **Multitask** requires TCP serve or streamable-http MCP — see Multitask policy below. This repo is **engine + generic memnet-mcp** only — novel-writer dropped. Repo product **0.19.4** (Hatch SSOT); last published PyPI **`memnet-llm==0.19.3`** until 0.19.4 is uploaded. **1.0** = 0.5–0.8 claimed (unclaimed). See `README.md`, [`docs/SHAPE.md`](docs/SHAPE.md), and `docs/grammar/`.

## Where to look

Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ This project uses Semantic Versioning as **interpreted for MemNet**: package `a.

## [Unreleased]

## [0.19.4] - 2026-09-04

### Changed
- **`a.b.c` law** — ROADMAP locks how `memnet-llm` reads SemVer (`a` = claim/generation, `b` = usage-method revision, `c` = same-method cut). Package **0.19.3** unchanged; extras **0.10–0.19** unchanged; no 0.20 extra; efficiency stays a `c` unless usage changes. **1.0** stays unclaimed.
- **Honesty `c` — nickname `id` off `pin_map` emit** — Shaped `pin_map` (outline, CueConflict, find hits, export) **MUST NOT** print nickname property `id` on nodes or edges. Same effect as `DROP_KEYS={id,hid}` on the wire text. Hid already stays off. Ranking still excludes nickname from the rank key ([#147](https://github.com/chouswei/MemNet/pull/147)). Cue / find / `match_nickname` MAY still look up a nickname the agent cues by — that is not identity and not emit. STM Prediction 3 generation half: RAW pin_map with nickname on wire failed under hid/CREATE-order/nickname permutation; canonical strip of `id`/`hid` passed. Package **0.19.4** patch on **0.19**. Numbered extras **0.10–0.19** unchanged. No 0.20 extra. `operatorCount` stays 2. Caps stay hard. Do not dump \(S\). Do not invent `rag_query`. **1.0** stays unclaimed. Git tag `v0.19.4` after merge.
- **Package identity 0.19.4** — Hatch / `project.toml` / `memnet.__version__` honesty cut on **0.19**. Last published PyPI wheel remains **`memnet-llm==0.19.3`** until upload.

## [0.19.3] - 2026-08-20

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MemNet sits **between** LLM call pipelines and data search (MN-REQ-00). Corpus l

This repo ships the engine + generic MCP only. **Product shape:** [`docs/SHAPE.md`](docs/SHAPE.md). **Pinned role:** working set of **a few technical documents** (atoms and locators, not PDF bytes) plus live `TSK`/`USR`/`MOD`, re-read fast. Tens of MiB typical; **hundreds of MiB still in role**; gigabytes = RAG/cabinet.

Package **`memnet-llm`** (CLI **`memnet`**). Python ≥ 3.11. Repo product **0.19.3**. PyPI **`memnet-llm==0.19.3`** is published. **1.0** stays unclaimed. SemVer meaning (`a.b.c`): [`docs/ROADMAP.md`](docs/ROADMAP.md).
Package **`memnet-llm`** (CLI **`memnet`**). Python ≥ 3.11. Repo product **0.19.4**. Last published PyPI **`memnet-llm==0.19.3`** until 0.19.4 upload. **1.0** stays unclaimed. SemVer meaning (`a.b.c`): [`docs/ROADMAP.md`](docs/ROADMAP.md).

## Install + quick CLI

Expand Down
12 changes: 6 additions & 6 deletions docs/LLM-GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MemNet — Agent Playbook (for LLMs)

**Class:** developers — MemNet engine / MCP / GQL wire / agent operating doctrine. Index: [`docs/README.md`](README.md). Product shape: [`SHAPE.md`](SHAPE.md). **Product 0.19.3.** **1.0** = 0.5–0.8 claimed (unclaimed). PyPI **`memnet-llm==0.19.3`**. SemVer `a.b.c`: [`ROADMAP.md`](ROADMAP.md).
**Class:** developers — MemNet engine / MCP / GQL wire / agent operating doctrine. Index: [`docs/README.md`](README.md). Product shape: [`SHAPE.md`](SHAPE.md). **Product 0.19.4.** **1.0** = 0.5–0.8 claimed (unclaimed). Last PyPI **`memnet-llm==0.19.3`**. SemVer `a.b.c`: [`ROADMAP.md`](ROADMAP.md).

**Dialect teach = GQL only** — [`grammar/gql-wire-profile.md`](grammar/gql-wire-profile.md). ADR: [`adr/ADR-001-gql-agent-wire.md`](adr/ADR-001-gql-agent-wire.md).
**M2 shipped:** engine/MCP accept openCypher-shaped GQL and emit shaped `pin_map`. Do **not** teach Layer / Tier A / `@TAG` pipe as agent wire.
Expand Down Expand Up @@ -41,7 +41,7 @@ MATCH (t:TSK {goal:'Clear warehouse'}) SET t.status = 'settled', t.recycle = 'de

After **CueConflict** (\(|Q|>1\) on find/`pin_map`), SameThingAbsorb is a **Commit rule** (not a third operator): `MATCH (a:TSK {goal:'alpha'}), (b:TSK {goal:'beta'}) SET a += b`. Two same-name nodes stay two until that Commit. ImportAbsorb does not entity-resolve.

**Shaped `pin_map` out** (properties the node actually has; nickname `id` only if set):
**Shaped `pin_map` out** (observable properties; nickname `id` stays off this emit):

```cypher
(:TSK {goal:'Clear warehouse', status:'in_progress'})
Expand All @@ -52,8 +52,8 @@ After **CueConflict** (\(|Q|>1\) on find/`pin_map`), SameThingAbsorb is a **Comm
Circuit / law-leaf sketch:

```cypher
(:CST {id:'CST_R', R:50, ports:{a:{direc:'inout', V:'@va', I:'@ia'}, b:{direc:'inout', V:'@vb', I:'@ib'}}, law:'$@va-@vb=@ia*R$,$@ia=-@ib$'})
(:CST {id:'CST_Src'})-[:bind {id:'E_1', fromPort:'p', toPort:'a', carries:'I'}]->(:CST {id:'CST_R'})
(:CST {R:50, ports:{a:{direc:'inout', V:'@va', I:'@ia'}, b:{direc:'inout', V:'@vb', I:'@ib'}}, law:'$@va-@vb=@ia*R$,$@ia=-@ib$'})
(:CST {name:'Src'})-[:bind {fromPort:'p', toPort:'a', carries:'I'}]->(:CST {R:50})
```

- **Create:** `CREATE (:Kind {props})` — GraphElement identity; no required `id`. leftover `id:'NEW'` mint is leftover, not product.
Expand All @@ -66,7 +66,7 @@ Formal wire: [`grammar/gql-wire-profile.md`](grammar/gql-wire-profile.md).

| Mode | When | Setup |
|------|------|-------|
| **MCP in-process** | Cursor / local agents (**primary**) | Register `memnet-mcp` in `.cursor/mcp.json`; extra `[mcp]`. `pip install 'memnet-llm[mcp]'` (Hatch **0.19.3**; PyPI **0.19.3**). **No** `memnet serve` |
| **MCP in-process** | Cursor / local agents (**primary**) | Register `memnet-mcp` in `.cursor/mcp.json`; extra `[mcp]`. `pip install 'memnet-llm[mcp]'` (Hatch **0.19.4**; last PyPI **0.19.3**). **No** `memnet serve` |
| **CLI + serve** | Scripts, TCP shared process | Terminal 1: `memnet serve`; Terminal 2: CLI with `MEMNET_SESSION` |
| **MCP streamable-http** | Remote shared graph | `memnet-mcp --transport streamable-http` on `:18766/mcp` |

Expand Down Expand Up @@ -125,7 +125,7 @@ Always pass the same `session` id across tools in one job.
| **New element** | `CREATE` via `mutate` | leftover `add` | `id_exists` on leftover add |
| **Change** | `MATCH…SET` via `mutate` | leftover `update` | `not_found` on leftover update |

Copy ids from pin map output — never retype from memory. There is no upsert.
Copy locators from `pin_map` (labels + observable properties) — never treat nickname `id` as identity. There is no upsert.

### IDs

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Do **not** teach Layer / Tier A. **1.0** = claim of 0.5–0.8 (unclaimed).
| Doc | Role |
|-----|------|
| [`SHAPE.md`](SHAPE.md) | Product shape from the problem (0.8 teach) |
| [`ROADMAP.md`](ROADMAP.md) | **SemVer SSOT** — locked `a.b.c`; extras 0.10–0.19 in Hatch **0.19.3** |
| [`ROADMAP.md`](ROADMAP.md) | **SemVer SSOT** — locked `a.b.c`; extras 0.10–0.19 in Hatch **0.19.4** |
| [`adr/ADR-001-gql-agent-wire.md`](adr/ADR-001-gql-agent-wire.md) | Accepted: GQL wire; **no Layer** |

## Wire — `grammar/`
Expand Down
10 changes: 5 additions & 5 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

**Audience:** product developers. Dialect teach = **GQL** ([`grammar/gql-wire-profile.md`](grammar/gql-wire-profile.md)). Product shape: [`SHAPE.md`](SHAPE.md). British English.

**Package now:** Hatch **0.19.3**. Numbered extras **0.10–0.19** are in this package (unchanged). PyPI **`memnet-llm==0.19.3`** is published. GraphGlot parse front is on master (#109 @ 73a63c9b). Extra **0.14** claims `liveNeo4jClaimed=true`. **1.0** is still unclaimed (0.5–0.8).
**Package now:** Hatch **0.19.4**. Numbered extras **0.10–0.19** are in this package (unchanged). PyPI **`memnet-llm==0.19.3`** is the last published wheel until 0.19.4 upload. GraphGlot parse front is on master (#109 @ 73a63c9b). Extra **0.14** claims `liveNeo4jClaimed=true`. **1.0** is still unclaimed (0.5–0.8).

**Last updated:** 2026-08-23 (`a.b.c` law locked; package **0.19.3** unchanged; extras **0.10–0.19** unchanged; PyPI **0.19.3**; default `max_sessions` **1024**; MCP `session_close` + list `sessions|n/max`; extras first packaged as **0.19.0**; GraphGlot parse front #109 @ 73a63c9b; extra **0.19** pin-map export #123 @ 2c460e7d; extra **0.18** Peak_L #128 @ dc464cd4; extra **0.17** HostSearch #129 @ 00e74dfb; extra **0.16** two namespaces #127 @ c32d4c52; extra **0.15** catalog Snap #124 @ 7767ed84; extra **0.14** live Neo4j claimed; do not claim **1.0**; do not invent a **0.20** extra).
**Last updated:** 2026-09-04 (`a.b.c` law locked; package **0.19.4** honesty `c` — nickname `id` off `pin_map` emit; extras **0.10–0.19** unchanged; last PyPI **0.19.3** until upload; ranking honesty [#147](https://github.com/chouswei/MemNet/pull/147); do not claim **1.0**; do not invent a **0.20** extra).

Patch notes: [`../CHANGELOG.md`](../CHANGELOG.md). CHANGELOG still follows Keep a Changelog. This file is how MemNet **interprets** SemVer — not a silent switch to npm-strict major=breaking for 0.x extras.

Expand Down Expand Up @@ -39,13 +39,13 @@ One concern per `b`. Do **not** fuse two usage-method changes into one `b`. Skip

Same usage method. Honesty, leftover naming, docs / skills, wheel / tag, caps, façade, **faster same goldfish loop** (`cue → pin_map → mutate` with no new agent step).

**0.19.1–0.19.3** were this (`session_close` + `sessions|n/max` + cap 1024 shipped as `c` because the loop stayed the same).
**0.19.1–0.19.4** were this (`session_close` + `sessions|n/max` + cap 1024 + ranking + nickname-off-`pin_map` shipped as `c` because the loop stayed the same).

Pure efficiency / speed on the current loop is **`0.19.c`**, not `0.20`.

### Consequences

- Package stays **0.19.3** until a later cut. Extras **0.10–0.19** stay the owns table below. **1.0** stays unclaimed.
- Package stays **0.19.4** until a later cut. Extras **0.10–0.19** stay the owns table below. **1.0** stays unclaimed.
- **1.0 does not wait** on 0.19.c, efficiency, HostSearch, Peak_L, catalog Snap, N-server, or GraphGlot.
- A new cabinet adapter does **not** move `a`. Hosted Agens as a product service, first-class `PORT`, and full ACL modes / `session_token` stay Later / unnumbered until a cut exists.

Expand Down Expand Up @@ -135,7 +135,7 @@ Do **not** treat leftover 0.9 identity as a live-Neo4j claim. Do **not** claim *

## Numbered extras (0.10–0.19)

One concern per **`b`** (usage-method revision). Dependency order. **In package 0.19.0** (git tag by coordinator). Skip a `b` only if the coordinator writes the skip in CHANGELOG; do not fuse two usage-method changes into one `b`. Cuts on the same method are **`c`** (0.19.1–0.19.3). There is **no** 0.20 extra row.
One concern per **`b`** (usage-method revision). Dependency order. **In package 0.19.0** (git tag by coordinator). Skip a `b` only if the coordinator writes the skip in CHANGELOG; do not fuse two usage-method changes into one `b`. Cuts on the same method are **`c`** (0.19.1–0.19.4). There is **no** 0.20 extra row.

| Version | Owns | Depends on | MUST NOT |
|---------|------|------------|----------|
Expand Down
2 changes: 1 addition & 1 deletion docs/SHAPE.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Do not call MemNet a “shaped RAG” or a “shaped Cypher proxy”.

**0.8.0** is this shape **taught for people** in-repo: this file, GQL-only playbook, application-note contract, Multitask honesty (RSV + Path-B ingest shipped; full ACL modes still to-be).

**1.0.0** is **0.5 + 0.6 + 0.7 + 0.8** claimed — the shape is mature for people: one GQL dialect, goldfish `pin_map`, gated mutate, cue-then-shape (including find when there is no ego), optional **proven** cabinet so \(S\) can outlive a process. Not GraphRAG. Not cabinet-only. Map and **`a.b.c` law:** [`ROADMAP.md`](ROADMAP.md). **Honest install:** current package is **0.19.3** (extras 0.10–0.19; Neo4j client from 0.9; live claimed as extra **0.14**). PyPI **`memnet-llm==0.19.3`** is published. Optional extras `[mcp]`, `[agensgraph]`, `[neo4j]` (drivers only). **1.0** stays unclaimed.
**1.0.0** is **0.5 + 0.6 + 0.7 + 0.8** claimed — the shape is mature for people: one GQL dialect, goldfish `pin_map`, gated mutate, cue-then-shape (including find when there is no ego), optional **proven** cabinet so \(S\) can outlive a process. Not GraphRAG. Not cabinet-only. Map and **`a.b.c` law:** [`ROADMAP.md`](ROADMAP.md). **Honest install:** current package is **0.19.4** (extras 0.10–0.19; Neo4j client from 0.9; live claimed as extra **0.14**). Last published PyPI **`memnet-llm==0.19.3`** until 0.19.4 upload. Optional extras `[mcp]`, `[agensgraph]`, `[neo4j]` (drivers only). **1.0** stays unclaimed.

---

Expand Down
2 changes: 1 addition & 1 deletion docs/application-notes/system/llm-build-on-memnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Every tool returns the same shape (`MemNetResponse.to_json()`):
```json
{
"exit_code": 0,
"stdout": "(:TSK {id: 'T42', goal: '…', status: 'in_progress'})\n(:NPC {id: 'N03'})-[:helps {id: 'E77'}]->(:TSK {id: 'T42'})\n",
"stdout": "(:TSK {goal: '…', status: 'in_progress'})\n(:NPC {role: 'helper'})-[:helps {note: 'labour'}]->(:TSK {goal: ''})\n",
"stderr": "",
"session_id": "mn_abcd",
"errors": []
Expand Down
Loading
Loading