dsh-soul-engine: Auditable Markdown Memory Ledger and Turn-start Injection

Preface

When attaching memory-related tools to models in DeepSeek Harness (DSH), common issues include: the tool exists, but the model doesn’t necessarily remember to use it every turn; “remember this” from a conversation breaks continuity across sessions and is hard to verify afterwards; adding proactive reminders on top often leads to repeated token consumption during quiet hours. The community plugin dsh-soul-engine (maintainer zhaoguoqiang-hub, SkillHub Category: Memory) follows a “state-plane” approach: persisting long-term state into a local plain-text Markdown ledger, injecting a summary into the system prompt every turn, using a local timer for zero-token self-maintenance, and optionally reusing existing sessions to wake up only when there are actual matters to handle—costs and frequencies are all written into the configuration and gates.

The following sections cover positioning, capabilities, installation, usage, and precautions. All facts are derived from the plugin README and package description.

What is this

dsh-soul-engine is a state-plane plugin for DSH, not “another chatbot.” It addresses three things: injecting a ledger summary every turn so proactivity doesn’t rely on the model remembering tools on the fly; keeping memories in a readable, git-versionable Markdown directory; and making autonomous behaviors that cost money visible, toggleable, and rate-limited via heartbeats and budget watchdogs.

  • Package name: dsh-soul-engine (current npm version 1.15.2, MIT)
  • Host requirement: dsh >= 0.1.1-rc.2, Node >= 22.3
  • Platform: The 14 tools, ledger, turn-start injection, self-maintenance, and right-side panel are available on macOS / Linux / Windows; desktop notifications and Calendar/Reminders bridges are macOS only, and relevant configurations should be disabled on other platforms to avoid misuse.

Core Features

14 soul_* tools

Tool Function
soul_init Initialize the ledger (soul name / three core goals / empty ledger)
soul_status Overview: goal progress, narrative memories, outbox, persona, and suggests “the one thing to proactively do right now”
soul_remember Write a narrative memory (including selfState); pin moves it to the permanent layer
soul_goal Internal goal ledger: list / add / update / done
soul_outbox Proactive outbox: push (with optional dueAt) / list / resolve
soul_reflect Rule-layer reflection (zero model cost)
soul_daily First chat of the day three things: brief / status
soul_feedback Positive/negative feedback: record / list / report
soul_memory Ledger audit (read-only): list / get / search / recall / stats / archived / distill
soul_forget Memory state management (reversible, does not delete original text): forget / restore / archive / unarchive / list
soul_signal User state (energy / busy/free): record / status / clear
soul_schedule macOS Calendar / Reminders: today / add / list
soul_cost Cost read-only: report / days
soul_maintain Self-maintenance: status / run (idempotent)

Ledger Layout

The default directory is $DSH_HOME/soul-data/ (or ~/.dsh/soul-data/ if DSH_HOME is not set). It can be overridden via config.dataFile or the environment variable DSH_SOUL_DATA_FILE. Human-readable parts are in memory/ (suitable for git), while runtime counters are in runtime.json (not for git). The plugin performs git commits on the ledger directory during maintenance ticks; it is recommended to create a separate repository for the ledger rather than placing it in the project repository.

Turn-Start Injection

Injects a ledger summary (main axis goals, one proactive suggestion, recent memories, discipline lines) when assembling the prompt every turn. To disable: config.promptSection: false or DSH_SOUL_PROMPT=0. The character limit is config.promptMaxChars (default 1000), which directly correlates to the resident token cost per turn.

Self-Maintenance & Heartbeat

  • Self-Maintenance: Defaults to a local tick every 5 minutes without calling the model—stale todos are discarded, weekly reports generated, narratives consolidated/archived, ledger git commits made, etc.
  • Heartbeat: Only when “there is something to do” (e.g., outbox item due, optional daily three things incomplete) and passing four frequency gates (quiet hours, daily/weekly limits, minimum interval), does it reuse an existing session to inject instructions; creating new sessions is not on the design path. Disable globally with config.heartbeat: false. dailyBudgetYuan defaults to 0 (off); set to a positive number to enable the budget watchdog.

Registers a “Soul” tab (with a badge for proactive suggestions), containing tabs: Overview / Cost / Memory; data comes from the host’s local GET /dsh-soul/state and GET /dsh-soul/memories; the memory tab allows in-place forgetting/undoing forgetting (POST /dsh-soul/forget), while other writes are only performed via soul_* tools.

Installation & Activation

Installation commands follow the README:

# From npm
dsh plugin --profile web add dsh-soul-engine

# Or from a local directory / Git repo
dsh plugin --profile web add "file:/path/to/dsh-soul-engine"
dsh plugin --profile web add "github:<owner>/dsh-soul-engine"

Ensure dsh-soul-engine is included in dsh.profile.bundles in ~/.dsh/profiles/<profile>/package.json, then restart DSH (bundles are read at host startup).

Verification: In a new session, call soul_status; it should return a ledger overview rather than an unknown tool error.

Deactivation: Simply remove the corresponding line from dsh.profile.bundles; no need to uninstall the package.

Common configurations are written in config within cordis.patch.yml, such as promptSection / promptMaxChars, maintenance / maintenanceIntervalMs, heartbeat series, dailyBudgetYuan, consolidate / retainMax / retainDays, etc. Environment variables include DSH_SOUL_DATA_FILE, DSH_SOUL_PROMPT=0, DSH_SOUL_NOTIFY=0, DSH_HOME, DSH_COST_LEDGER.

Typical Usage

For first-time use, it is recommended to follow the README quick start sequence:

soul_init      # First time: write down soul name + three core goals
soul_status    # Check it every time: goal progress / recent memories / todos / one "most important thing to do now"
soul_remember  # Write down anything worth remembering

In daily use, combine with soul_goal and soul_outbox to manage goals and due reminders; use soul_memory when auditing is needed; use soul_forget when the user requests forgetting (soft delete, reversible). The discipline section in the injection segment also prompts before action: first soul_status, and immediately soul_remember upon hearing preferences/boundaries/corrections.

Scenarios & Notes

Who it is for: Users who want to maintain cross-session, git-diffable personal memories and goal ledgers within DSH, and are willing to trade a small amount of turn-start tokens for “remembering to use tools every turn”; users who need optional, capped proactive reminders, and accept that heartbeats consume tokens.

Please be aware before installing (Summary of README security disclosure):

  • The plugin reads/writes paths such as $DSH_HOME/soul-data/ locally with the current DSH process permissions, and may call git, osascript on macOS; soul_cost reads the cost ledger; accessing the panel writes to /tmp/dsh-soul-access.log.
  • The host side does not make outbound network connections; ledger content enters the model context (injection segment), so judge the content you write yourself.
  • On non-macOS systems, it is recommended to set notify: false and schedule: false.
  • Installing third-party plugins means running third-party code; you should read the source code and the MIT license before installing, and assess the trust boundary yourself.

The DSH ecosystem philosophy is “everything is a plugin”; the SkillHub directory page is a community site with no official affiliation with DeepSeek / High-Flyer.

Conclusion

dsh-soul-engine turns long-term memory into a plain-text Markdown ledger, turns “remember to use tools” into turn-start injection, separates maintenance and wake-ups into zero-token local ticks and toggleable/limited heartbeats, and provides an actionable interface for costs and forgetting. To further verify behavior and default values, refer to the repository README and cordis.patch.yml.

  • Directory Page: https://www.skillhub.cn/plugins/zhaoguoqiang-hub/dsh-soul-engine
  • GitHub: https://github.com/zhaoguoqiang-hub/dsh-soul-engine
羽毛球分组比赛记分
小程序二维码

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

Xiaoye