dsh-design-ledger: Transforming Design Documents into a DSH-Injectable Development Progress Tree

Preface

When working on a large-scale project in DeepSeek Harness (DSH) over an extended period, the common practice is to pile up Markdown design documents and rely on AGENTS.md and conversation memory to tell the model “where things stand.” However, single-turn context is limited; a full design document can easily reach 100,000 tokens, which not only fails to fit into the system prompt but also results in a loss of progress when switching sessions. The community plugin dsh-design-ledger (Maintainer: Uloboros, Category: Memory) takes a different approach: it parses design documents to generate and maintain a development progress tree, then injects it into the DSH session context layer by layer. This allows new sessions to pick up where they left off via the index and current focus node, reading details on-demand using tools.

What is this?

dsh-design-ledger transforms “design documents → progress checklists → code indexes” into a structured ledger within the workspace (illustrated in the README as shards like index.json, systems/, state/, etc.). It utilizes the same seam as system-prompt/assemble and dsh-agent-instructions for injecting into AGENTS.md. The English introduction is: Turn design documents into a live development progress tree and inject it into DSH session context, so new sessions can pick up where the last one left off.

The ledger details are stored in DEVPLAN/ by default (division of labor with AGENTS.md: AGENTS.md holds summaries and pointers, while the ledger serves machines and layered injection). The plugin is pure ESM, current package version 0.1.1, license MIT, requiring Node >= 20.

Core Features

Layered Injection, Instead of Dumping the Whole Library into Context

The README used a real design document for volume estimation: 19 .md files / 588 KB / 226,885 characters ≈ 133,000 tokens. The entire document cannot be injected every time. The plugin adopts a layered strategy (L0–L4 confirmed by the user):

Layer Content Timing
L0 Task initiation prompt (full) Injected once during the first session assembly
L1 Index: System list + Completion status + File pointers Injected every session
L2 Current focus subtree (prioritizing marked nodes) Injected every session
L3 Other subtrees, code indexes, bug details Not injected; retrieved on-demand via design_ledger_read
L4 Original design document shards Not injected; retrieved on-demand via design_doc_read

Progress Tree Data Model

Each node has fixed fields to facilitate tool parsing or manual modification, mainly including: id, name, kind (system / subsystem / feature / subfeature / task), status (todo / doing / done / blocked / dropped), parent-child relationships, designRefs, codeRefs (only file + symbol name, no line numbers), interfaces, bugs, notes, marked (current focus).

Design Document Parsing

  1. Single .md: Builds a tree based on Markdown heading levels.
  2. Folders (Recursive): Infers hierarchy from directory naming (e.g., S0N_<name>/ for systems, SNN_<name>/ for subsystems, design.md for design body text, etc.).
  3. Feature Table Rows (expandTableRows): Tables where the first column is a PREFIX_Number type ID can be expanded into feature nodes; ordinary tables do not generate nodes. The ledger records actual development progress. Items that are in the design but not being done in this round can skip node creation to avoid diluting completion metrics with empty nodes.

Host Tools and Web Panel

The host side registers 6 tools:

Tool Function
design_ledger_status Bind status, ledger location, node count / completion / pending bugs
design_ledger_init Bind design document and generate initial progress tree
design_ledger_read Read index, subtree, node details, or bug list on-demand
design_ledger_update Update status, code index, interfaces, bugs, notes, mark
design_doc_read Read original design document text on-demand
design_doc_list List design document tree and file sizes

The client-side half-area provides a sidebar “Design Document Includes”: graphically select directories or .md files within the workspace and create a ledger via POST bind.json; path validation is restricted to the workspace. For accompanying skills, see the repository skills/design-ledger/SKILL.md.

Installation and Activation

The DSH desktop profile is exclusive to Electron and cannot be used with dsh plugin --profile desktop (the CLI will reject it). The README requires installation of the bundle via plugin_manager, with an example linking to a local plugin directory:

plugin_manager  install_bundle  target = link:E:\program\dsh\dsh-design-ledger

Simply replace the path after link: with your local dsh-design-ledger directory. After installation, you must restart the desktop client so that the bundle’s fiberPhase changes from null to active. You can use plugin_manager list_plugins to check if include:design-ledger appears with fiberPhase: active; the bundle must also be registered in the profile’s package.json under dsh.profile.bundles, otherwise the plugin may not activate.

Note: If plugin_manager occasionally reports application: failed / ambiguous-install, the README documents this as a false alarm. Base the status on disk state, fiberPhase, and whether the tools appear. For link installation, the peer dependency currently only declares @deepseek-ai/dsh-tools (>=0.2.0-rc.1 <0.3.0-0, optional meta).

Typical Usage

After the installation and restart steps above, you can start using it in your workspace in the following order.

  1. Bind Design Document
    Open “Design Document Includes” in the sidebar, use “Select Design Document” to browse the workspace (breadcrumbs, .md count hints in directories), and select “Load as Design Document” to trigger binding; alternatively, let the agent call design_ledger_init / design_doc_list to select the path. If a ledger already exists, bind will return 409 ledger-exists to prevent progress overwriting.

  2. Start Working and Mark Focus
    If the feature to be done in this round does not have a node yet, use design_ledger_update to create one and set status:"doing", mark:true. Example form (fields based on tool schema):

    design_ledger_update { parent_id, node_name, status: "doing", mark: true }
  1. Update Ledger During Development
    When completed, set status:"done" and supplement code_refs, interfaces; record issues in bugs. Other subtrees and original design text do not reside in the context; use design_ledger_read or design_doc_read when needed.

  2. Continuation in New Sessions
    After starting a new session, the L1 index and L2 focus subtree will be automatically injected. In README tests, nodes marked with mark:true in the previous round appeared in the next round’s context as “Focus: …” (including code index and interface summaries).

The plugin also idempotently maintains a managed block in AGENTS.md, complementing ledger injection without overwriting user content outside the block.

Scope and Notes

Who it is for: Long-term game or software development projects in the same workspace; design documents organized as .md or directories like S0X_; scenarios where you need to maintain “what is done, where the code is, and what is being done” across multiple DSH sessions without stuffing the entire design document into the prompt.

Permissions and Security: The plugin reads and writes the workspace with the current DSH process permissions; the panel and routes perform workspace boundary checks on the host side, rejecting absolute paths and .. traversal. Before installation, you should review the GitHub source code and the MIT license yourself to ensure it meets your compliance requirements.

Ecosystem Note: DSH adopts an “everything is a plugin” extension method; the SkillHub directory page is a community collection site, with no official affiliation to DeepSeek / High-Flyer, nor is it an official app store.

Links

  • Directory Page: https://www.skillhub.cn/plugins/Uloboros/dsh-design-ledger
  • Repository: https://github.com/Uloboros/dsh-design-ledger

If your pain point is “design documents are huge, and progress is forgotten when switching sessions,” dsh-design-ledger provides a queryable, layered-injection progress tree, rather than copying the full README into every conversation round.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye