DeepSeek Harness Plugin

reatcat/l123-harness

Stars ★ 3 Category Memory Added 2026-08-23

Three-tier agent memory harness: L1 always-on CLAUDE.md, L2 index, L3 detail skeleton with templates, a gate that blocks writes to protected files without a one-time approval token, zero-judgement event logging, weekly distillation, and a TDD execution-loop skill.

Install

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:reatcat/l123-harness

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

中文 | English

A battle-tested agent methodology packaged as a plugin for both Claude Code and DeepSeek Harness (dsh) — one codebase, two hosts. Aligned with the "everything is a plugin" design: the host is the kernel; this plugin only contributes capability components — context injection, gates, event recording, memory distillation — each individually understandable, all removable as a whole. Project knowledge does not live in the plugin: after installation the project accumulates its own.

The four principles

  1. State outside the model — conclusions, plans and progress go to disk; the context window only holds what the current task needs.
  2. Objective observation — test red/green, command output and log data are evidence; reasoning is not.
  3. No divergence in the inner loop — the spec governs the plan, the plan governs step boundaries, TDD governs stop conditions.
  4. Upgrades require approval — memory is written freely; promotion to knowledge / skill / L1 / L2 requires explicit user approval.

Three-tier memory

Tier Carrier Character
L1 always-on CLAUDE.md Small, stable cache prefix: principles, priorities, safety floor, routing table
L2 index .agents/INDEX.md symptom → one-line rule → L3 pointer; injected automatically by the SessionStart hook
L3 detail .agents/** knowledge / pitfalls / runbooks / current / events / inbox

Install

Claude Code

# A: local development
claude --plugin-dir /path/to/l123-harness

# B: permanent personal install
cp -r l123-harness ~/.claude/skills/

# C: git distribution (this directory is a single-plugin marketplace)
#   /plugin marketplace add <git-repo>
#   /plugin install l123-harness

DeepSeek Harness (dsh)

The repository is also a standard dsh bundle (package.json declares dsh.bundle + a root cordis.patch.yml). Plain JavaScript, no build step — git installs need no pnpm build approval:

dsh plugin --profile web add github:reatcat/l123-harness

Local development note: dsh plugin add <local-path> uses a pnpm link:, which does not install this plugin's bridge dependency — hooks degrade (skills only, with a startup warning). To test locally, use a tarball: npm pack && dsh plugin --profile web add ./l123-harness-*.tgz, or run pnpm install inside the plugin directory first.

On mount, two things happen automatically:

  1. Skills — the four methodology skills are registered on ctx.skills and surface through the standard skill tool;
  2. Hooks bridge — the official @deepseek-ai/dsh-hooks-claude-code bridge is mounted and runs hooks/hooks.json as-is.
hooks.json event dsh bridge Notes
SessionStart (L2 injection + event) ✅ JSON additionalContext output, dual-host compatible
PreToolUse (gate-guard) ✅ matcher includes DSH edit/write/str_replace_editor; exit 2 → deny
PostToolUse (tool_error log) ✅ observation-only
Stop (boundary event) ✅ observation-only
PreCompact (checkpoint rescue) ⚠️ not bridged yet config is safely ignored
SessionEnd (boundary event) ⚠️ not bridged yet same as above

Usage

/l123-harness:init-harness     # bootstrap a project: L1/L2/L3 skeleton + gate list
/daily work: L2 index injected automatically; the gate blocks protected
/files; events are recorded automatically
/l123-harness:event-review     # weekly review: events → inbox candidates → triage

Under dsh the same skills are available as init-harness, event-review, tdd and write-a-skill through the skill tool and user commands.

Discipline quick reference

  • Changing a protected file: explain to the user → approval → touch <project-root>/.claude/.gate-token → retry.
  • .agents/inbox/ must not be read while working; candidates are not conclusions.
  • .agents/events/ is read-only and immutable.
  • Knowledge promotion path: context → memory (freely) → inbox (weekly review) → knowledge / L2 (human-approved).

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.