Skip to content

Luke-Yong/dsh-plugin-knowledge-graph

30Last commit Aug 14, 2026

dsh-plugin-knowledge-graph DSH plugin

This plugin builds an in-memory knowledge graph from a workspace root, tracking files, directories, and exported symbols along with their relationships. It provides a single tool, read_graph, that answers queries like directory structure, exports, imports, dependents, and symbol exporters. The graph uses three node types (dir, file, symbol) and four edge types (CONTAINS, EXPORTS, IMPORTS, IMPORTS_SYMBOL).

How to install the dsh-plugin-knowledge-graph DSH plugin

dsh plugin --profile web add github:Luke-Yong/dsh-plugin-knowledge-graph

Copying does not run this command. Review the repository and version before installing the dsh-plugin-knowledge-graph DSH plugin.

dsh-plugin-knowledge-graph DSH plugin data source

dsh-plugin-knowledge-graph DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-plugin-knowledge-graph DSH plugin can do

  • Builds an in-memory knowledge graph of a codebase, including files, directories, and exported symbols.
  • Provides queries: structure (directory tree), exports (file exports), imports_of (file imports), exporters_of (symbol origins), dependents (files importing from a file).
  • Supports custom workspace root via the 'root' parameter; defaults to process.cwd().
  • Integrates seamlessly with DSH as a plugin, registered via ctx.tools.

Where the dsh-plugin-knowledge-graph DSH plugin fits

  • Quickly visualize the directory structure of a project without leaving the chat.
  • Find which files export a specific symbol during code review or debugging.
  • Identify all files that depend on a given file to assess impact of changes.
  • Trace import chains to understand module dependencies in a large codebase.

Who the dsh-plugin-knowledge-graph DSH plugin is for

  • Developers using DeepSeek Harness who need to explore codebase structure and dependencies.
  • Software engineers working on large projects where understanding file relationships is critical.

dsh-plugin-knowledge-graph DSH plugin limitations

  • Project is in infancy; execution behavior and query surface may change without notice.
  • Requires DSH to be installed and a profile configured for plugin installation.
  • Default root is process.cwd(); may not suit all environments without explicit root parameter.

dsh-plugin-knowledge-graph DSH plugin: from the repository README

Quoted from the Luke-Yong/dsh-plugin-knowledge-graph README, the upstream source of the dsh-plugin-knowledge-graph DSH plugin. Copyright remains with the original authors.

A [DeepSeek Harness (DSH)](https://github.com/deepseek-ai) plugin that exposes a `read_graph` tool backed by a codebase **knowledge graph**. The graph tracks every file, directory, exported symbol, and their relationships so an agent can answer structural and dependency questions faster than grepping or reading files. > **Status: infancy.** This project is in its infancy stage. Execution behavior, the query surface, and compatibility may change while the project is iterated on and tested by the open source community. > **Derived work.** This project is derived from the knowledge graph tool in [Luke-Yong/H](https://github.com/Luke-Yong/H), adapted to DeepSeek Harness's "everything is a plugin" model. ## What it does Given a workspace root, the plugin builds an in-memory graph and answers queries such as: - `structure` — print the full directory tree - `exports <file>` — list every symbol exported by a file - `imports_of <file>` — list symbols a file imports (with their source files) - `exporters_of <symbol>` — find which files export a symbol - `dependents <file>` — find which files import from a file ## Graph model The graph uses three node types and four edge types: | Node

Read the full READMERepository license: MIT

dsh-plugin-knowledge-graph DSH plugin questions

How do I install this plugin?

Use the DSH CLI: `dsh plugin --profile web add github:Luke-Yong/dsh-plugin-knowledge-graph`. You can optionally pin a specific commit: `dsh plugin --profile web add github:Luke-Yong/dsh-plugin-knowledge-graph#<commit-sha>`.

What queries can I run with read_graph?

The tool supports five query types: structure (show directory tree), exports <file>, imports_of <file>, exporters_of <symbol>, and dependents <file>. Each query follows the format `<query_type> <target>`.

Does the plugin support languages other than JavaScript/TypeScript?

The README does not specify language support. The current implementation likely focuses on JavaScript/TypeScript based on the origin project, but you should check the source or test with your codebase to confirm.

Can I use a custom workspace root?

Yes, the read_graph tool accepts an optional 'root' parameter. If omitted, it defaults to the current working directory of the DSH process.

Is this plugin stable for production use?

The project explicitly states it is in infancy. Execution behavior, query surface, and compatibility may change. It is recommended to pin a specific commit and test thoroughly before relying on it in production.