The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When building an agent or a local development environment, it is often necessary to persist code repository documentation, knowledge cards, and conversation memory. dsh-cardian is a plugin maintained by myYangyunfan. It integrates the “Knowledge Center” capabilities of mainstream agent IDEs and persists all data into a local Obsidian vault. Each knowledge card, memory entry, and RepoWiki page generates a Markdown file with YAML frontmatter, supporting direct viewing, searching, and graph visualization in Obsidian.
Core Features¶
The plugin builds the knowledge base through three main modules:
- RepoWiki: Scans a local code repository, generates a Wiki skeleton, and has the Agent fill in semantic descriptions.
- Knowledge Cards: Atomic knowledge units that support flashcard review schedules based on the SM-2 algorithm, stored using YAML frontmatter.
- Memory: Persistent cross-session memory, grouped by Scope, and classified by fact, importance, and type.
Activity-Driven Automatic Refresh¶
The plugin listens to session/events (i.e., user/message) in DSH sessions. When a session’s working directory matches an existing RepoWiki section, the system automatically:
1. Writes a “recent conversation” record with a scope=<project> tag into the Memory module;
2. Triggers refreshAll() to rebuild the indices for RepoWiki, Knowledge Cards, and Memory.
This means that as long as a project has conversation activity, the associated knowledge base is automatically kept up to date.
One-Click Refinement¶
In the “Consolidate” operation on the RepoWiki tab, clicking “Refine” not only generates skeleton cards but also starts an Agent session to automatically fill in the content. The generated cards contain structured sections such as:
* ## Responsibilities
* ## Key Implementation
* ## Dependencies
* ## Notes
The refinement process supports idempotency. Content that has already been filled in is not overwritten; only newly scanned or refreshed skeletons are processed.
Knowledge Tree Hierarchy¶
The Knowledge Tree panel provides expandable folder hierarchies. The first level is grouped by module (RepoWiki/Knowledge Cards/Memory), and the RepoWiki hierarchy is further subdivided by file path (e.g., src ▸ lib ▸ store.js). Click an item or folder to expand it, or click a file to view its contents.
Tool Matrix¶
The plugin exposes 36 tools and annotates behavioral attributes (readOnly, idempotent, destructive) in their definitions, helping the Agent choose the correct operation mode. The main tools include:
* Read-only: search, recall, tagCloud, backlinks, related, status.
* Idempotent: import, importMarkdown, reindex, ingest, upsert, review.
* Destructive: delete.
Installation and Enablement¶
Install it as a DSH plugin:
npm install dsh-cardian
After installation, the insert line from cordis.patch.yml needs to be merged into the current configuration. Configuration items include:
* vaultPath: Obsidian vault path.
* autoInit: Automatic initialization.
* semanticSearch: Semantic search toggle.
* searchAlpha: Hybrid search parameter (0 = pure semantic, 1 = pure keyword).
Usage Examples¶
The plugin provides CLI and standalone runtime modes. The core engine is framework-agnostic and can serve both the DSH plugin and the standalone CLI.
# 安装插件
npm install dsh-cardian
# 查看状态
node cli.mjs status --vault ./cardian-vault
# 添加知识卡片
node cli.mjs card add "Closure" "closure = function + lexical environment" --tags js
# 运行演示示例
node examples/demo.mjs
# 手动构建客户端 UI
npm run build:client
Ecosystem and Links¶
The plugin follows the MIT License, the core engine has no framework dependencies, and future plans include support for MCP servers.
- GitHub: https://github.com/myYangyunfan/dsh_cardian
- Community Catalog: https://www.skillhub.cn/plugins/myYangyunfan/dsh_cardian