OngoingUnderstanding
by funggier
README.md
# OngoingUnderstanding
**Standalone, portable MCP + Skill for versioned AI understanding memory.** Save a reconciled *current understanding*, not every message. New understanding may arise during software work, planning, consulting, discussing ideas or ordinary casual conversations.
- **Independent**: no dependency on ThinkingCNX, ThinkingAR or ThinkingEVO.
- **Optional composition**: works with all three when requested.
- **Nine scoped MCP tools**: read/list/save/search/compare versions, plus AI-invocable Export/Import; no arbitrary shell, filesystem, process, or reset tools exposed to AI.
- **Persistent history**: SQLite WAL, immutable revisions with SHA-256 chain, optimistic concurrency, semantic no-op deduplication.
- **Scoped topics**: `kind=project|topic|conversation` and stable `project_id` prevent mixing unrelated subjects.
- **AI and operator Import/Export**: versioned JSON archives with preview-before-import and safe Merge/Replace. **Human-controlled Reset**: Reset-Data.bat, Verify-Data.bat.
- **Windows portable**: run with Node 24+; storage relative to the installation or overridden with `OU_DATA_DIR`.
## MCP tools (exactly nine)
| Tool | Purpose |
| --- | --- |
| `understandings_list` | List current memory records (projects, topics and conversation themes) |
| `understanding_read` | Read latest snapshot and revision |
| `understanding_save` | Commit synthesized understanding using expected revision |
| `revisions_list` | Browse revision metadata |
| `revision_read` | Retrieve historic snapshots |
| `revisions_compare` | Review changed fields |
| `revisions_search` | Search historical understanding |
| `understanding_export` | Export selected topic or all understanding/history into local `data/exports` |
| `understanding_import` | Preview and then import JSON archive from local `data/imports` or `data/exports` |
Each record's `kind` distinguishes projects from consulting topics and conversation themes. `project_id` is a stable **memory key** for any of these record types; it is not a filesystem path.
## Windows Product lifecycle (generic command names)
The connected Product uses **`Start-Plugin.cmd`, `Stop-Plugin.cmd`, `Restart-Plugin.cmd`, `Status-Plugin.cmd`** rather than the old LConnect-prefixed command names. Additional commands include `Setup-Plugin.cmd`, `Install-Plugin.cmd`, `Refresh-Plugin.cmd`, Credential and Autostart management, plus `Update-TunnelClient.cmd`. The old LConnect commands are archived locally on migration, not kept as active root commands.
`Status-Plugin.cmd` checks the actual running tunnel plus an independent MCP stdio probe that verifies **exactly nine** memory tools; a tunnel component state of `not_observed` is shown separately, not mistaken for a local MCP failure. `Restart-Plugin.cmd` launches an independent restart worker, whose logs include `restart_complete` when finished. Double-clicked `.cmd` scripts pause after execution; for automation set `OU_NO_PAUSE=1`.
See [Windows Plugin Commands (Thai)](docs/PLUGIN_COMMANDS_TH.md) and [Deployment (Thai)](docs/DEPLOYMENT_TH.md).
## Standalone local setup
```powershell
npm ci
npm test
node src/mcp.mjs
```
The MCP server uses stdio and writes only within `data/` by default. The package `mcp.json` shows its launch configuration. A cloud ChatGPT connection additionally requires a supported MCP transport/tunnel and correctly configured credentials. `Start-MCP.cmd` is intended for local stdio hosts; it does not automatically connect a cloud session.
## Existing ChatGPT app
The existing connected OngoingUnderstanding app can be repointed from LConnect to this nine-tool runtime while keeping its tunnel credentials/connection profile separately. The locally deployed product at `T:\Space\Products\MCPTools\OngoingUnderstanding` is distinct from the Git source. See [Deployment guide](docs/DEPLOYMENT_TH.md).
## Revision model
1. Read the latest relevant record.
2. Analyze current meaning against new information; preserve still-active facts and decisions.
3. Save the **complete revised understanding** with `expected_revision`.
4. On concurrent change, read latest and reconcile again.
5. To resume, retrieve current snapshot first, consult old revisions when needed.
`Compact` means **semantic synthesis**, not text shortening. The MCP cannot see all conversations on its own; the AI must intentionally call it on relevant checkpoints.
## Import and export from AI
When you ask ChatGPT to **export understanding** of one topic or all topics, the agent can call `understanding_export`. Archives are saved as checksum-protected JSON files in the local product's `data/exports` folder; the tool returns the exact filename and location.
To **import**, place an archive under `data/imports` (or reuse a file in `data/exports`) and ask ChatGPT to import it. The agent calls `understanding_import` to preview changes first. A second call with the preview token applies the result. **Merge** is the safe default and rejects divergent revisions. **Replace** requires explicit user authorization and the `allow_replace` flag; pre-replacement backups are written automatically.
Import does not read arbitrary filesystem paths or automatically read files attached to chat; files must be staged in the dedicated plugin folders. The MCP tools do not share memory with an unrelated plugin unless that plugin or the model explicitly uses this one.
## Local backup and reset
`Export-Data.bat [id|all]`, `Import-Data.bat [archive.json] [merge|replace]`, `Reset-Data.bat [id|all]` (interactive exact-confirmation), `Reset-Data.bat all --purge` (separately confirmed full-memory+archive clean), `Verify-Data.bat`. Ordinary reset preserves exports; purge additionally deletes JSON archives in the plugin's own data folders. Neither mode removes credentials, source projects or external files. Import rejects divergent ancestry unless explicitly replacing after backup.
## Security and scope
Data is stored locally unencrypted under the Windows user account; maintain OS filesystem permissions and do not store secrets. Project or topic IDs are constrained, arbitrary filesystem paths are not allowed, snapshots are bounded. Never publish `data/`, `local-secrets/` or tunnel credentials.
[Architecture notes](docs/DESIGN_TH.md) · [Standalone Skill](skills/ongoingunderstanding/SKILL.md) · [Tests](tests/store.test.mjs) · [License](LICENSE).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues