claude-code - 💡(How to fix) Fix [FEATURE] Plugin: knowledge-graph — Persistent memory layer with zero-interrupt architecture [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46138Fetched 2026-04-11 06:28:04
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1mentioned ×1subscribed ×1
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

Claude Code is stateless. Every clear, every compact, every new session starts from zero. Users repeatedly re-explain what they're working on, which modules matter, and what pitfalls to avoid.

There is no built-in mechanism to:

  • Remember which modules a developer was actively editing
  • Preserve prohibitions and pitfalls across sessions
  • Predict which related modules Claude will need before errors happen
  • Survive compact without losing working context

I built knowledge-graph (https://github.com/hilyfux/knowledge-graph) to solve this — a pure bash+jq persistent memory layer that works through Claude Code's existing hooks, skills, and MCP interfaces. Zero external dependencies.

Proposed Solution

Consider including knowledge-graph in the official Claude Code plugin directory or community showcase.

What it does:

  • Tracks every file operation via hooks (Read/Write/Edit/Failure/Stop/SessionStart/Compact)
  • Mines co-change patterns with a pure bash+jq inference engine (zero LLM cost)
  • Generates distributed CLAUDE.md knowledge nodes (≤20 lines each) with evidence-based rules
  • Predicts related modules on first access and pre-loads their prohibitions
  • Saves working state on session end; restores it after clear or compact
  • Never interrupts coding (v1.2 zero-interrupt architecture)

What makes it different from other memory tools:

Aspectknowledge-graphTypical approaches
Dependenciesjq onlyVector DB, Python, Docker
Runtime cost~5ms per hook, 0 LLM tokens for analysisEmbedding costs, API calls
Learns over timeYes (inference engine)Static indexing
Predicts contextYes (co-change history)No
Survives clear/compactYes (snapshot + @include)No
Interrupts codingNeverOften
Team sharinggit pushManual DB export

Plugin compatibility:

  • plugin.json manifest included
  • MCP Server: 4 tools (kg_status, kg_query, kg_predict, kg_cochange)
  • 9 hooks covering the full lifecycle
  • 15 automated tests, all passing
  • MIT license

Repository: https://github.com/hilyfux/knowledge-graph

Alternative Solutions

Existing alternatives and why they don't fully solve the problem:

  • Claude Code auto-memory: relies on LLM judgment for what to remember — inconsistent, no prediction, no structured rules
  • mcp-knowledge-graph: requires Neo4j + Node.js + Docker — heavy dependencies, no learning
  • Memento: requires Python + ChromaDB — embedding costs, no compact survival
  • Caveman: token compression only — no persistence, no cross-session memory

knowledge-graph is the only solution that is zero-dependency, zero-interrupt, and verified against Claude Code's actual hook/compact/include mechanisms.

Priority

Low - Nice to have

Feature Category

MCP server integration

Use Case Example

  1. Developer works on a React + Node.js project with 20+ modules
  2. During session 1: edits src/auth/, src/api/, src/middleware/ — hits XSS issue, fixes it
  3. Runs /knowledge-graph update — system generates CLAUDE.md nodes with prohibition: "Raw token in localStorage → XSS"
  4. Session 2 (or after clear): Claude immediately knows the developer was editing auth/api/middleware (from work snapshot), and when reading src/auth/ files, automatically pre-loads the XSS prohibition
  5. Developer never re-explains the pitfall. Claude avoids the same mistake.

Measured results:

  • clear recovery: Claude knows task context without re-explanation
  • Prediction cache: same-directory re-reads go from ~200ms to ~5ms
  • Token overhead: <0.5% of context window (~500-900 tokens baseline)
  • 15/15 automated tests passing (performance, resilience, i18n)

Additional Context

Stats: 1599 lines of bash, 0 external dependencies beyond jq, MIT license Version: v1.2.0 (just released) Install: bash <(curl -fsSL https://raw.githubusercontent.com/hilyfux/knowledge-graph/main/standalone/install.sh) /path/to/project

The project was built on deep study of Claude Code internals — every hook behavior, @include mechanism, and compact/clear lifecycle is verified against the actual implementation. See: https://github.com/hilyfux/knowledge-graph/blob/main/docs/architecture-notes.md

I'd love for this to be considered for the official plugin directory or community showcase. Happy to adapt to any plugin submission requirements.

extent analysis

TL;DR

Consider including the knowledge-graph plugin in the official Claude Code plugin directory or community showcase to provide a persistent memory layer for remembering module edits, prohibitions, and pitfalls across sessions.

Guidance

  • Review the knowledge-graph plugin's compatibility with Claude Code, including its plugin.json manifest, MCP Server tools, and automated tests.
  • Evaluate the plugin's performance benefits, such as clear recovery, prediction cache, and token overhead, to determine its potential impact on user experience.
  • Assess the plugin's unique features, including its zero-dependency architecture, inference engine, and ability to survive clear and compact operations, to determine its value proposition compared to existing alternatives.
  • Consider the plugin's installation process and any potential requirements for adaptation to the official plugin directory or community showcase.

Example

No code snippet is provided as the issue focuses on the plugin's functionality and compatibility rather than specific code implementation.

Notes

The knowledge-graph plugin appears to be a well-designed solution that addresses a specific pain point in Claude Code, with a strong focus on performance, compatibility, and user experience. However, further review and testing may be necessary to ensure its suitability for inclusion in the official plugin directory or community showcase.

Recommendation

Apply the knowledge-graph plugin as a potential solution to provide a persistent memory layer for Claude Code, due to its unique features, performance benefits, and compatibility with the platform.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING