DeepSeek Harness plugin

dsh-gitmemo

Git-backed long-term memory for DeepSeek Harness: a local .mem git repo with mem_search / mem_read / mem_write / mem_delete tools, auto-managed by the agent with zero manual steps.

Jump to install

Source facts

Repository
fonlan/dsh-gitmemo
Latest update
Aug 19, 2026
Category
Workflow & Automation
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/fonlan/dsh-gitmemo
Plugin: dsh-gitmemo
Author: fonlan

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer4 files
README.mdSource · read only
README language

dsh-gitmemo

English | 简体中文

Git-backed long-term memory for DeepSeek Harness (dsh) — a Cordis plugin mirroring GitMemo. The agent stores completed task outcomes as markdown entries in a local .mem Git repository and searches them before starting new work. Git is the only dependency, and no manual memory commands are ever needed.

Key Characteristics

  • Extremely simple — once installed, no manual memory commands in day-to-day tasks
  • Fully automated — the agent runs init, search, read, write, delete as part of its normal task flow
  • Local-only & offline — memory lives in a local .mem Git repository; no cloud dependency
  • Git-only — no runtime dependency beyond the git CLI
  • Token-efficient — reuses prior conclusions via mem_search instead of re-injecting context
  • Prevents context bloat — search-first workflow; the skill caps reads at 5 relevant memories
  • Auditable — every memory action is a commit in .mem's Git history
  • Traceable — each memory can be traced and replayed from commit history
  • Branch-aligned — the .mem branch follows the project's current branch on writes

What the Plugin Provides

| Piece | Description | | --- | --- | | mem_init | Initialize the .mem repository (all other tools auto-initialize) | | mem_search | Search memories: keywords (comma-separated), skip (pagination), mode (and / or / auto — AND first, OR fallback). Returns up to 20 hits as hash\|title\|date | | mem_read | Read one memory entry by commit hash (full markdown) | | mem_write | Store a task outcome: title + content (or content_file / file), optional inline body (commit body; engine API still supports body_file). Commits .mem/entries/<timestamp>-<slug>.md and aligns the .mem branch | | mem_delete | Delete a memory entry by commit hash (then redo and rewrite) | | Always-on rules section | The complete workflow rules (gitmemo's agents-template.md equivalent) are injected into every session's system prompt — no skill load needed | | Session-start injection | On every new root agent session, the N most recent memory titles (hash\|title\|date) are automatically injected into that session's system prompt, so prior-session context is visible before any tool call; subagents are skipped and the lookup never creates .mem |

Installation

Requires dsh ≥ 0.1.0-rc.6 and the git CLI.

From the npm registry (once published):

dsh plugin --profile web add @fonlan/dsh-gitmemo

From a local checkout (development / unpublished):

dsh plugin --profile web add /path/to/dsh-gitmemo

Then restart the dsh profile (e.g. restart the dsh web process). The plugin registers on the host plane, so every agent session in that profile sees the tools and the skill.

Configuration

The bundle patch ships with sensible defaults; override them in the profile's cordis.patch.yml:

- id: dsh-gitmemo
  config:
    memDirName: .mem       # memory repo directory name at the project root
    searchLimit: 20        # max hits per mem_search call
    branchAlign: true      # .mem branch follows the project branch on write
    recentContextLimit: 5  # recent memory titles injected into each new session's system prompt (0 disables)
    projectRoot: null      # optional explicit project root (defaults to the session cwd)

Memory Location

The .mem repository lives at the project root of the calling session's workspace (git rev-parse --show-toplevel, falling back to the working directory). Entries are markdown files under .mem/entries/; every operation is a commit, so the whole memory is readable with plain git:

git -C .mem log --oneline
git -C .mem show <commit-hash>

> Tip: add .mem/ to your project's .gitignore so the memory repository never mixes into project commits.

Agent Workflow (always-on rules)

1. Before work — search. Extract 3-5 keywords from the request → mem_search. If more than 5 hits are relevant, read only the 5 most likely (mem_read). Paginate with skip 20, 40, … when nothing relevant appears. 2. User unsatisfied — delete and rewrite. mem_delete <hash> → redo from feedback → mem_write a corrected entry. 3. End-of-session checkpoint — the only write path. When the conversation is ending, review the whole session and mem_write every completed repo-related task that still lacks a memory and whose outcome is valuable/reusable (or was explicitly asked to be remembered). Never duplicate an already-written entry; if a stored outcome is outdated, mem_delete it first, then write the corrected entry. Never write for pure Q&A, incomplete tasks, non-repo work, or purely operational git actions. Write all pending memories before closing the conversation.

Entry Format

---
date: 2026-02-19T15:10:10Z
status: done
repo_branch: main
repo_commit: 9f3e1a2
mem_branch: main
related_paths: [src/auth/login.ts]
tags: [auth, security]
---
### Original User Request
(verbatim)
### AI Understanding
- Goal: / Constraints: / Out of scope:
### Final Outcome
- Changes/outputs summary

Development

npm install
npm run build    # tsc → lib/
npm test         # build + engine/plugin unit tests (node:test)

Layout

dsh-gitmemo/
├── package.json          # npm package; dsh.bundle.patch wires the profile layer
├── cordis.patch.yml      # composition layer: the dsh-gitmemo row
├── src/
│   ├── index.ts          # Cordis plugin: mem_* tools + gitmemo skill + prompt section
│   └── mem.ts            # core engine (port of gitmemo scripts/mem.sh)
├── lib/                  # built output (committed; used by file:/git installs)
└── test/mem.test.mjs     # engine + plugin unit tests

License

MIT