dsh-code-review-graph: Code Graph and Review Workflow on DSH

Preface

When performing code reviews or structural analysis in DeepSeek Harness (DSH), common practices involve repeatedly asking the model to read files, guess dependency relationships, or manually switch branches, run diffs, and paste context. Graph-based tools often require separate Python environments and local services. If you want the review process, graph building, and interactive browsing to remain within the DSH plugin ecosystem, while running locally by default without relying on cloud services, take a look at the community plugin dsh-code-review-graph (maintainer: summingwang233, SkillHub category: Model Inference). Designed for native DSH integration, it reuses the Code Review Graph 2.3.9 engine to provide 30 tools, 5 workflow prompts, 7 skills, and an interactive code graph in the Web/Desktop right sidebar.

What is this

dsh-code-review-graph is the npm package dsh-code-review-graph (currently released version 1.0.5), described as local code intelligence, review workflows, and interactive graphs for DeepSeek Harness. The engine is aligned with the upstream CRG; the plugin handles DSH session repository binding, tool schemas, skill slash entries, desktop sidebar graph pages, and installs the Python engine in an isolated directory via prepare (default ~/.dsh/code-review-graph/engine).

The compatibility baseline is fixed to DSH 0.1.5-rc.2 and 0.2.0-rc.2; Alpha versions are not covered by compatibility commitments. Supports Windows, Linux, and macOS. Licensed under MIT.

Core Features

Engine and Tool Scale

  • Reuses Code Review Graph 2.3.9, exposing 30 tools (original MCP names prefixed with mcp__code_review_graph__, wrapped as crg_* etc. in DSH).
  • 5 workflows: Restrict tool scope via model calls to crg_workflow or crg_prompt, including context, review, refactor, export, advanced, plus all which expands to all tools.
  • 7 skills (slash commands for model-driven analysis): see table below.

Model-Independent Graphs

Interactive graphs can be generated directly in the UI: no model, chat prompts, or JSON parameters required. The first click on “Prepare Engine and Generate Graph” in the sidebar prepares a fixed-version Python engine and parses the current session repository in one go; subsequently, use “Update Graph” for incremental refreshes. The graph is written to the current repository’s .code-review-graph/graph.html by default, supporting search, filtering, zooming, dragging, and HTML export. Resources are read via the DSH workspace file interface and inlined into a restricted-permission iframe, without starting a fixed-port HTTP service.

Two Parameterless User Commands

The following commands are executed directly by the user, requiring no parameters and not invoking the model:

Command Purpose
/crg-setup Separately prepare or check the local graph engine
/crg-graph Prepare engine and generate graph on first use; update graph subsequently; returns local HTML path

Seven Model Skills

Type /crg- in the session input box to search; you can also write the full skill name at the beginning of a message followed by a task description:

Skill Purpose
/crg-build-graph Build/update graph and analyze structure
/crg-explore-codebase Explore modules, dependencies, and call relationships
/crg-review-changes Review code changes
/crg-review-delta Perform incremental review of subsequent modifications
/crg-review-pr Review PR or branch diffs
/crg-debug-issue Locate issues along call relationships
/crg-refactor-safely Plan, preview, and controlled refactoring

This plugin does not register @dsh-code-review-graph references, nor does it have user slash commands like /crg_workflow or /crg_visualize; crg_workflow, crg_prompt, and crg_visualize are tools for the model to call, and you must explicitly ask the model to invoke them in the chat.

Permissions and Refactoring

The executor uses the normalized repository path of the session; the model cannot specify an arbitrary repo_root; authorizedRepos is empty by default, and cross-repository reads are constrained by Host configuration. Refactoring tools write files via DSH file intents and SHA-256 verification in non-preview modes; cloud embedding requires explicit configuration of embeddingProviders in the plugin settings, while default semantic search can degrade to the engine’s built-in FTS/keywords without local embeddings.

Installation and Activation

Web and CLI install the published npm package via the official CLI; the Desktop version installs dsh-code-review-graph@1.0.5 via the native plugin manager for the corresponding version. For CLI profiles, replace web in the example with headless or your specific profile.

The following steps install the plugin and actively trigger one-time engine preparation (prepare prefers uv or local Python 3.10+; Python placeholders from the Windows Store are not considered valid runtimes, use --python /path/to/python to specify):

dsh plugin --profile web add dsh-code-review-graph@1.0.5
npx dsh-code-review-graph@1.0.5 prepare

For the Desktop version, click “Enable Now” after installing dsh-code-review-graph@1.0.5 in the plugin manager. Users with version 0.1.x should uninstall the old version before installing the new one; the desktop profile is held by the application, and external CLI does not modify the desktop profile directly. Normal startup and model tool calls do not automatically install dependencies, download embedding models, or use cloud services by default.

Uninstall example (Web/CLI profile):

dsh plugin --profile web remove dsh-code-review-graph

The Desktop version uses the native manager to uninstall; uninstallation preserves user settings, other plugins, the isolated engine, and existing graph files in the repository.

Typical Usage

Viewing the Graph for the First Time on Desktop

  1. Enable the plugin and create a new session in a Git/SVN project workspace.
  2. Open the Right Sidebar → New Tab → Start → Code graph.
  3. Click Prepare Engine and Generate Graph (requires internet access and uv or Python 3.10+ on first use).
  4. Click Update Graph subsequently; use Export HTML if you need to save a standalone page.

You can also execute /crg-graph or /crg-setup in the chat, which corresponds to the sidebar flow.

Exploring the Repository with the Model

First, select the project workspace in DSH; cd in the terminal does not change the repository bound to the existing session. Example:

/crg-explore-codebase Introduce the entry points, core modules, and call relationships of the current repository.

Actual tool call records should appear in the chat; the model merely mentioning tool names does not mean they have been executed.

Reviewing Changes or PRs

/crg-review-changes Please review the current uncommitted changes, use HEAD as the baseline, and point out risks and missing tests.

If you need to compare by branch, you can ask the model to call crg_prompt, for example (replace main with the actual branch in your repository):

Please call crg_prompt with arguments {"name":"review_changes","base":"main"}, and review the changes in the current branch according to the returned workflow.

Generating Graph File Path (Model Tool)

Please call crg_visualize with arguments {"mode":"full","format":"html"}, generate an interactive code graph for the current repository, and tell me the path of the generated file.

The sidebar “Reload” is suitable for refreshing the page after the model generates the HTML, without re-parsing the repository.

Use Cases and Notes

Who it is for: Developers already developing on DSH 0.1.5-rc.2 or 0.2.0-rc.2 who need local code graphs, structured review workflows, or want to browse call relationships directly in the sidebar without writing prompts manually every time.

Runtime and Trust: The plugin accesses the session-bound repository with the current DSH process permissions; you should read the GitHub repository source code and MIT license before installation. The SkillHub directory page (https://www.skillhub.cn/plugins/sumingwang233/dsh-code-review-graph) is a community collection, with no official affiliation with DeepSeek/High-Flyer; the DSH ecosystem follows “everything is a plugin,” third-party plugins require self-evaluation of versions and mirror sources (npm latest and mirrors may not be synchronized, it is recommended to explicitly specify @1.0.5).

Version Notes: 1.0.5 fixes the issue in 1.0.3 where crg_workflow/crg_prompt tool schemas caused the entire session to fail; the number of tools, workflows, and one-click prepare logic remain unchanged relative to 1.0.3. If the desktop manager still shows old metadata, verify that the version in ~/.dsh/profiles/desktop/node_modules/dsh-code-review-graph/package.json is 1.0.5.

Concurrency and Cancellation: Active Agents in the same repository share the graph backend; cancellation or timeout may interrupt concurrent calls in the same repository, and failures and parsing warnings will be retained in the results.

Conclusion

dsh-code-review-graph brings the Code Review Graph engine into DSH: the sidebar can build graphs without a model, and the chat uses seven /crg-* skills and workflow tools for review and exploration. Installation and engine preparation commands are fully detailed in the README. For further understanding of capabilities and validation boundaries, see docs/capabilities.md and docs/validation.md in the repository.

  • SkillHub: https://www.skillhub.cn/plugins/sumingwang233/dsh-code-review-graph
  • GitHub: https://github.com/sumingwang233/dsh-code-review-graph
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye