Skip to main content

dsh-task-planner

4Stars0Forks1Issues0Watchers

Adds experience memory and task planning for DSH agent: automatically retrieves similar past solutions before invocation, with LLM evaluating reuse and dynamically decomposing steps.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
JavaScript
License
MIT
Branch
main
deepseek-harnessdshdsh-pluginexperienceplanningplugin

Install

cmdweb profile
$ dsh plugin --profile web add github:ztl34245881-commits/dsh-task-planner

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin ztl34245881-commits/dsh-task-planner for me: review the repository at https://github.com/ztl34245881-commits/dsh-task-planner first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Description

Add "muscle memory of experience" to DSH agents: when receiving a task, first search the past experience database, have the LLM evaluate reusability, then dynamically split into steps; automatically accumulate new experience upon task completion, getting smarter with use.

Core Capabilities

  • Automatically recall historical solutions for similar tasks without manual search
  • Have the LLM determine if historical solutions are usable; if usable, improve and reuse; if not, explain reasons and generate a new plan
  • Split tasks into 3-8 steps, matching each step with the most suitable capability/tool, avoiding hardcoded fixed combinations
  • Automatically draft experience entries into the experience database during task planning; update execution results at task completion
  • Provide a standalone experience query tool supporting save, retrieve, and list all experiences
  • Save experiences as pure Markdown files, easy for editor modification, grep search, and Git version control

Technical Implementation

  • Language: JavaScript (Node.js ES Module)
  • Key Dependencies: Host built-in shell, llm, tools three services (no external npm dependencies)
  • Architecture Pattern: Declarative dependency injection (inject: ['shell','llm','tools']), register two tools plan_task / task_memory via ctx.tools.register
  • Entry File: index.mjs (cordis bundle patch injects into host via cordis.patch.yml)

Use Cases

Call plan_task before complex cross-tool, cross-step tasks requiring documentation or scripting, letting the agent first recall what was done before deciding how to proceed. If you frequently handle similar tasks (e.g., weekly reports, data reports, batch editing), the experience library will gradually form stable patterns, making subsequent planning faster.

Prerequisites & Compatibility

DependencyMin VersionDescription
DSH HarnessNot declaredRequires host to provide shell / llm / tools three built-in services
Node.jsNot declaredCode uses node:os, node:path modules and ESM syntax; recommend using Node version currently supported by DSH
PlatformCross-platformNo platform restrictions, pure Node.js implementation
Native ModulesNoneDoes not depend on any native modules

Installation

dsh plugin --profile web add github:ztl34245881-commits/dsh-task-planner

Configuration Options

ConfigTypeDescriptionDefault
lessonsDirString pathExperience library storage directory, each experience is a .md file~/.dsh/planner-lessons
capabilityFileString pathOptional, points to a capability list (Markdown); during planning, have the LLM match which capability each step usesEmpty (capability matching disabled)

FAQ

Q: Which host services must be used together?

A: The plugin declares dependencies on shell, llm, tools three services at startup; these must be provided by the official DSH Harness standard environment. If the host lacks these services, the plugin will fail to initialize.

Q: Where does the experience library default to? Can I change the location?

A: Defaults to ~/.dsh/planner-lessons directory, each experience is a Markdown file; can be changed to any path via lessonsDir in cordis configuration.

Q: What is capabilityFile for?

A: Points to a custom capability list (e.g., awesome list style plugin directory); plan_task will match each step against this list to generate a capability mapping. Leave empty to skip capability matching.

Q: What model does plan_task use?

A: Reuses host default model (read via agentDefaultModel.currentSelection); during planning phase increases maxTokens to 8000 to accommodate long-chain reasoning. Returns error prompt if unable to parse default model.

Q: Can experiences be directly edited with an editor?

A: Yes. Experiences are Markdown files with YAML frontmatter, plain text, can be grepped, manually edited, and version-controlled with Git. Manual modifications will be recognized in next retrieval.

Q: When will experiences be promoted to formal skills?

A: The plugin itself does not perform automatic promotion. README convention: experiences successfully reused 3 times can be promoted to skill, rejected 2 times are marked as obsolete; these actions are manually maintained by the caller via task_memory save as needed.

Q: How to completely uninstall?

A: Remove the plugin via dsh plugin remove. To clear historical experiences, delete all .md files in lessonsDir; if only uninstalling the plugin without deleting files, reinstalling will allow continued use.

Learning Curve

Beginner — just one command to install, call plan_task before complex tasks; optional configuration items only need adjustment when customizing capability list or experience library path.

Known Issues & Limitations

  • Experience retrieval uses 2-3 character sliding window keyword matching, string matching rather than semantic matching; "周报" (weekly report) and "月报" (monthly report) will match but semantic proximity is not judged
  • Experience scoring directly sums keyword hit counts without considering keyword weight; longer experience files naturally have advantage
  • Chinese stopword list (STOPWORDS) is hardcoded in source code; extending new stopwords requires code modification and re-release
  • Experience filename slug only takes first 40 characters of task; different tasks' slugs may conflict or duplicate
  • When saving experience, outcome field is truncated to 100 characters; long reflection content will be lost
  • Tool registration failure returns error string instead of throwing exception, may be ignored by caller
  • Experience library reading implemented via chained shell commands; entire plugin becomes unavailable when host shell service is unavailable

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/ztl34245881-commits/dsh-task-planner)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory