When handling tasks, a coding agent must understand the current requirements, remember project conventions, and locate relevant source code. Packing all of this into the request is wasteful, while focusing only on the current sentence can easily miss interface and dependency constraints. The Context Graph plugin solves this problem by scanning code and building a semantic graph.
This is an engineering context management plugin for DeepSeek Harness, maintained by Mshir0. It precisely injects project context by scanning code and building a semantic graph.
Core Features¶
- Semantic feature-to-implementation file association management: Manages associations between semantic features and implementation files in the graph.
- Code scanning and dependency analysis: Supports code scanning and dependency analysis for Python, C, and C++.
- PDF document processing: Supports reading PDF documents by section, layout extraction, and metadata synchronization.
- Context compilation and budget control: Performs token budget control through the Context Compiler.
- Message and snapshot auditing: Audits messages and snapshots using the Context Firewall.
Installation and Dependencies¶
Before use, make sure your environment meets the following requirements:
- DeepSeek Harness 0.1.0-rc.6+
- Node.js ^22.19.0/>=24
- Python 3
Install the plugin:
npx -y @deepseek-ai/dsh@0.1.0-rc.6 plugin --profile web add -w github:Mshir0/context-graph-deepseek-harness
To use PDF features, install PyMuPDF or pypdf.
Usage¶
- Trigger injection: Send a message directly in the bottom-right input box, and the plugin will attempt to inject context relevant to the current task.
- Create a persistent task: Use the “Context” button to create a persistent task and select the task type.
- View operations: In the “Context Graph” view, you can use the following keyboard shortcuts:
Ctrl+S: Save the graphA: Auto-layoutF: Fit canvas
Notes¶
- The plugin does not modify source code, nor does it guess unconfirmed relationships (such as macro expansion or external symbols).
- When
autoInjectis disabled, an empty snapshot is still used iffirewallModeis set toenforce. - Install PyMuPDF or pypdf to support PDF features.
For more details, visit the plugin directory or the GitHub repository.