Skip to content

feat(memory): Phase 6 graph memory — init wizard, CLI flag, TUI commands, metrics (#1229)#1274

Merged
bug-ops merged 3 commits intomainfrom
graph-memory-phase6
Mar 6, 2026
Merged

feat(memory): Phase 6 graph memory — init wizard, CLI flag, TUI commands, metrics (#1229)#1274
bug-ops merged 3 commits intomainfrom
graph-memory-phase6

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 6, 2026

Summary

Implements Phase 6 of the graph-based knowledge memory epic (#1222), completing all user-facing integration points for the graph-memory feature.

  • Add --graph-memory CLI flag to enable graph memory at runtime
  • Add graph memory questions to --init wizard (enabled + extract_model)
  • Add five /graph TUI commands: /graph (stats), /graph entities, /graph facts <entity>, /graph communities, /graph backfill [--limit N]
  • Add graph metrics to MetricsSnapshot and TUI memory widget (entities, edges, communities, extraction count/failures)
  • Add sync_graph_counts() polling entity/edge/community totals from GraphStore
  • Add GraphStore backfill SQL methods: unprocessed_messages_for_backfill, unprocessed_message_count, mark_messages_graph_processed
  • Add find_entity_by_name convenience wrapper on GraphStore
  • Update docs/src/concepts/graph-memory.md with TUI commands, CLI flag, wizard, backfill, and troubleshooting
  • Update crates/zeph-tui/README.md with graph command palette entries

Test Plan

  • cargo +nightly fmt --check — clean
  • cargo clippy --workspace --features full -- -D warnings — clean
  • cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins — 4399 passed
  • Test delta: +27 new tests for Phase 6 (graph metrics, init wizard, CLI flag, backfill SQL, TUI commands)

Follow-up Issues

  • REV-05: Backfill currently runs synchronously; should use tokio::spawn
  • REV-06: --limit 0 silently accepted, should return error
  • REV-07: /graph facts picks first fuzzy match silently; add disambiguation hint
  • REV-08: Document SQLITE_MAX_VARIABLE_NUMBER=999 constraint in mark_messages_graph_processed
  • SEC-P6-02: backfill --limit 0 misleading UX

Closes #1229

bug-ops added 2 commits March 6, 2026 06:07
…nds, metrics (#1229)

Implements Phase 6 of the graph-based knowledge memory epic (#1222):

- Add `--graph-memory` CLI flag to enable graph memory at runtime
- Add graph memory question to `--init` wizard (enabled, extract_model)
- Add `/graph`, `/graph entities`, `/graph facts <entity>`,
  `/graph communities`, `/graph backfill [--limit N]` TUI commands
  (all behind `#[cfg(feature = "graph-memory")]`)
- Add 5 graph metrics fields to MetricsSnapshot and render them in the
  TUI memory widget (entities, edges, communities, extraction count/failures)
- Add `sync_graph_counts()` to populate entity/edge/community totals from
  GraphStore at startup and after each extraction cycle
- Add GraphStore methods: `find_entity_by_name`, `unprocessed_messages_for_backfill`,
  `unprocessed_message_count`, `mark_messages_graph_processed`
- Update `docs/src/concepts/graph-memory.md` with TUI commands, CLI flag,
  wizard, backfill, and troubleshooting sections
- Update `crates/zeph-tui/README.md` with graph command palette entries

Tests: 4354 -> 4381 (+27)
@github-actions github-actions Bot added documentation Improvements or additions to documentation memory zeph-memory crate (SQLite) rust Rust code changes core zeph-core crate dependencies Dependency updates enhancement New feature or request size/XL Extra large PR (500+ lines) labels Mar 6, 2026
…egration tests)

Merges origin/main containing:
- feat(orchestration): Phase 7 — documentation, feature flag, integration test (#1242) (#1273)

Conflict resolved in CHANGELOG.md by retaining entries from both sides.
@bug-ops bug-ops enabled auto-merge (squash) March 6, 2026 11:16
@bug-ops bug-ops merged commit 8c66666 into main Mar 6, 2026
28 checks passed
@bug-ops bug-ops deleted the graph-memory-phase6 branch March 6, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate dependencies Dependency updates documentation Improvements or additions to documentation enhancement New feature or request memory zeph-memory crate (SQLite) rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(memory): graph memory init wizard, TUI commands, and observability

1 participant