Back to home

jinguanghai

deepseek-harness-forge-plugins

Forge-plus: math/logic/regex/eprover/system/repair gates + TCM diagnosis + memory recall plugins for DeepSeek Harness (dsh)

Stars
0
Language
Go
Created
Aug 14, 2026
Updated
Aug 14, 2026

Introduction

⚒️ Forge Plugins for DeepSeek Harness

Everything is a Plugin. — Bring the Forge (铸剑炉) arsenal into DeepSeek Harness.

License: MIT Tools Plugins Dependencies dsh OS

12 production-grade tools · 3 plugins · zero npm dependencies · pure Cordis — the fastest way to give your DeepSeek Harness agent a real compute brain: symbolic math, formal logic, theorem proving, regex verification, model checking, code repair, TCM diagnosis, and memory recall.


✨ Why Forge Plugins?

🧮 Real computationSymbolic math and logic that never hallucinate — every tool runs a compiled gate binary and returns verified results
🧠 Formal reasoningTPTP first-order theorem proving (EPROVER) + state-machine model checking, not just text generation
🀄 TCM diagnosisUnique 八极八势 (Eight Trigrams) pattern diagnosis and herb-pair retrieval across an ancient-formula corpus — the only TCM plugin for DeepSeek Harness
🪶 Zero depsPure Cordis plugins, no npm install, no framework bootstrap code — drop-in and go
🔒 SandboxedAll file access goes through ctx.fs (host-plane discipline) — no bare fs calls
🎁 Prebuilt binariesWindows .exe included in Releases — Linux/macOS build from src/go in one command

🔌 Plugins and Tools

PluginToolWhat it doesExample result
forge-gatesforge_mathSymbolic simplification / evaluation3*(x+1)-3*x3
forge_logicFormal proof / equivalence checkx>0 and x<10 -> x>0proved
forge_regexFullmatch regex validation[A-Z]\d{3} vs B456pass
forge_eproverTPTP first-order theorem provingCNF axioms → theorem / counter-sat
forge_systemState-machine model checking (deadlock/invariant)6 states → passed
forge_repairCode defect fix suggestionsbare except:except Exception:
forge-tcmtcm_diagnose八极八势 TCM pattern diagnosistext/vector → trigram + strategy
tcm_herb_pairHerb-pair co-occurrence retrieval附子+干姜 → 916 formulas
forge-memorymemory_recallBM25 experience recallquery → ranked snippets
memory_fold_listFolded-memory index (π/φ)list folded sections
memory_fold_previewPreview a folded sectioncontent preview
memory_fold_deepDeep-read a folded sectionfull content

12 tools · 3 plugins · MIT · works with dsh ≥ 0.1.0-rc.5


🚀 Quick Start

# 1. Put this repo anywhere, e.g.:
#    ~/.dsh/.agent-presets/forge-plus/   (repo root = preset dir)

# 2. Register plugins in your agent preset (see examples/agent.cordis.yml.snippet)

# 3. Start DeepSeek Harness:
npx @deepseek-ai/dsh web

agent.cordis.yml snippet:

# inside your preset directory
plugins:
  - path: ./plugins/forge-gates
  - path: ./plugins/forge-tcm
  - path: ./plugins/forge-memory

Then just ask your agent:

"Simplify 3(x+1)-3x"3"Prove that x>0 follows from x>0 and x<10"proved"Check regex [A-Z]\d{3} against B456 and order B456 ok" → pass/fail ✅ "附子 配 干姜 有哪些方剂?" → ranked formulas from your corpus ✅


🔧 Environment

VariableDefaultPurpose
FORGE_GATE_BIN<repo>/bin/windowsgate binary dir (Linux/macOS: go build from src/go, see below)
FORGE_HOMEprocess.cwd()memory data dir (memory.json / .forge-temp/memory_current.json / data/memory_current.json)
FORGE_DATAcwd / data/TCM formula dir (must contain formula_db.json)

🔨 Build Gates from Source (Linux / macOS / Windows)

cd src/go
for g in math logic regex eprover system repair tcm; do
  go build -o ${g}_gate${EXT} ${g}_gate.go
done   # Windows: set EXT=.exe

💡 Windows users: prebuilt .exe binaries are attached to the v0.1.0 Release — no build needed.


🏗️ Architecture

DeepSeek Harness (dsh) agent
        │  inject: ['tools']
        ▼
   ┌─ forge-plus preset ──────────────────┐
   │ forge-gates ── forge-memory ── forge-tcm │
   │        └──────┐         └────────┐      │
   │        subprocess               │      │
   │               ▼                 ▼      │
   │     ┌─ gate binaries ──┐  ┌─ data ─────┐│
   │     │ math / logic /   │  │ memory.json││
   │     │ regex / eprover /│  │ formula_db ││
   │     │ system / repair  │  │ (yours)    ││
   │     │ tcm              │  └────────────┘│
   │     └──────────────────┘                │
   └─────────────────────────────────────────┘
Gate protocol: tools invoke gate binaries, each writes ONE JSON object to stdout.

📊 Data Notes

  • forge-tcm herb-pair retrieval requires formula_db.json — a private ancient-formula corpus (家传古籍数据) that is NOT distributed with this repo. Provide your own and point FORGE_DATA at it.
  • forge-memory reads memory.json / .forge-temp/memory_current.json / data/memory_current.json — bring your own memory files (empty templates in data/).
  • The gates themselves are pure logic (no private data baked in).

🎯 Project Lineage

Forge (铸剑炉) is a general-purpose digital agent: a multi-language compiler sandbox with 18 tool gates (Python / Go / Node / Rust / EPROVER / TCM / …), an LLM brain over a code body, and self-evolving architecture. This repo is its dsh-native plugin family — same gates, same discipline, now Everything is a Plugin.

📜 License

MIT © jinguanghai

INSTALL

Three plugins are published as Cordis bundles -- install any of them into a dsh profile:

# 1 dsh CLI (local dir / tarball)
dsh plugin add ./plugins/forge-gates
# 2 pnpm (npm registry / local tarball)
pnpm add dsh-forge-gates
# 3 Manual: symlink/copy the plugin dir into your profile's node_modules,
#    then add the bundle entry to package.json's dsh.profile.bundles.

Prebuilt Windows .exe binaries ship inside each bundle (bin/windows/). Latest bundle tarballs: https://github.com/jinguanghai/deepseek-harness-forge-plugins/releases/latest

Linux/macOS: build the 7 gate binaries from src/go/ in one command, see BUILDING.