In the DeepSeek Harness (DSH) ecosystem, enabling agents to understand an entire codebase is key to improving reasoning quality. Traditional RAG (Retrieval-Augmented Generation) approaches often put entire files directly into the context, which consumes a large number of tokens and easily loses architectural relationships and dependency details. dsh-understand-anything solves this problem by generating structured knowledge graphs. It lets AI first understand the codebase, then answer questions, analyze change impacts, and generate onboarding guides based on the graph.

Plugin Introduction

dsh-understand-anything is a plugin maintained by GongYuanCaiJi, ported from the open-source project Egonex-AI/Understand-Anything (MIT license). It transforms codebase analysis into structured knowledge graphs, enabling DSH agents to chat, perform impact analysis, and understand architecture based on graphs without putting all raw files into the context.

Core Features

The plugin provides the following core capabilities:

  • Interactive knowledge graph: Scans the codebase and produces knowledge-graph.json, including architecture, dependencies, call relationships, and complexity.
  • Graph-based answering: Uses the /understand-chat command to answer codebase questions based on the graph instead of reading files directly.
  • Change impact analysis: Uses /understand-diff to analyze which components are affected by the current changes and potential risks.
  • Newcomer onboarding guide: Uses /understand-onboard to generate a project introduction for new members.
  • Business domain extraction: Uses /understand-domain to identify business domains, processes, and steps from the code.
  • Knowledge base analysis: Uses /understand-knowledge to analyze a Karpathy-style LLM wiki knowledge base.
  • Design mockup analysis: Uses /understand-figma to generate design knowledge graphs using the Figma API.
  • Multilingual support: Uses --language zh to generate Chinese summaries, tags, and descriptions.

Installation and Configuration

Before installing, make sure the environment meets the following dependencies:

  • Node.js ≥ 22
  • pnpm ≥ 10

Use the official command to install it:

dsh plugin --profile <你的 profile> add github:GongYuanCaiJi/dsh-understand-anything

During installation, the prepare script runs to validate structure. The first time /understand is run, the plugin builds the analysis engine using pnpm according to the upstream workflow. If pnpm blocks the build step, the suite must be added to allowBuilds in the profile’s pnpm-workspace.yaml configuration file (the bundled pnpm-workspace.yaml already includes allowBuilds for the tree-sitter grammar).

Typical Usage

After installation, use the following commands in DSH:

# 分析当前代码库(生成 .ua/knowledge-graph.json)
/understand

# 中文分析
/understand --language zh

# 增量更新(只重新分析改过的文件)
/understand

# 问代码库问题
/understand-chat 这个项目的架构是怎么样的?

# 分析当前改动的影响
/understand-diff

# 生成新手指南
/understand-onboard

Note: The analysis engine and skill texts remain in the original English from upstream and have not been translated (porting rule: copied 100% as-is).

Use Cases and Limitations

The plugin is suitable for DSH agent development scenarios that require an in-depth understanding of codebase structure. Note that, for plugin-form compatibility, the following features are not included in this plugin:

  • Web application: The upstream official website (homepage/), interactive dashboard (packages/dashboard), and standalone viewer (packages/viewer) have not been ported.
  • Claude Code-specific features: Claude Code-specific hooks (automatic updates after commits) have not been ported.
  • Analysis language: The analysis engine and skill texts remain in the original English.

Conclusion

dsh-understand-anything provides DeepSeek Harness with tools to build codebase-level understanding capabilities. By using knowledge graphs, it enables agents to perform deep code analysis and business understanding without exceeding context window limits. For more information, see the GitHub repository.