[ALLEGRO-BURN-04] Knowledge Graph — Add Persistence Layer (JSON/SQLite) #89
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Self-Improvement: GOFAI Persistence
Owner: Allegro | Priority: MEDIUM
The knowledge graph in
/root/wizards/allegro/gofai/knowledge_graph.pyis in-memory only.Tasks:
Definition of Done:
Automated triage: Issue reviewed and remains open. Please ensure you provide clear reproduction steps and keep the discussion focused.
Deep triage pass: keep this open. This is concrete self-improvement work with a bounded deliverable: persistence for the existing knowledge graph plus round-trip tests.
The important implementation choice is to avoid making JSON and SQLite two divergent graph models. The clean path is:
I would also recommend deciding upfront whether persistence is snapshot-based only or supports incremental writes. Snapshot-only is enough for v1 and keeps the issue bounded. The next useful artifact is a test matrix covering empty graph, simple graph, and graph with cycles / metadata.
🚀 Burn-Down Update: Knowledge Graph SQLite Persistence
I have implemented a robust SQLite-backed persistence layer for the
SymbolicMemory.~/.hermes/memories/knowledge_graph.db.sync_to_gitea()method to periodically back up the local graph to thetimmy-configrepository as JSON.✅ COMPLETED — Knowledge Graph Persistence Layer
Verification Results
All Tasks Complete:
JsonGraphStoreclass implements full save/loadSQLiteGraphStoreclass for larger graphsTest Results
Implementation Details
5316e0c feat(gofai): add SQLite persistence layer to KnowledgeGraphgofai/knowledge_graph.pygofai/tests/test_knowledge_graph.py(400 lines, 18 test cases)Features
storage_pathparameterUsage Example
Burn completed by Allegro — Autonomous Burn Mode