deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
A math training preset for DeepSeek Harness — not a problem solver.
Rather than solving problems for the trainee, it provides rapid feedback to help sharpen mathematical understanding and build intuition. It features a programmatic zero-leak output guard that mechanically prevents the coach from ever revealing the answer.
attempt_update tool (status: in-progress / flawed / validated / incomplete), rendered into the system prompt every step, and rebuilt from the session log after a resume. For longer sessions, attempts can additionally be persisted to notes/attempts.md.validated through attempt_update, never on the model's own say-so.llm/stream that inspects the coach's entire reply. When answer clues (numerical values, intervals, correctness judgments, answer forms) are detected, the entire response is replaced — not a single character of the model's original output reaches the trainee. This does not rely on the model's "self-discipline."knowledge-base skill). During final synthesis, understandings backed by facts and data are prioritized.math-coach/
├── preset.yml # Preset metadata (name / description)
├── agent.cordis.yml # Cordis composition: tools, persona, skills, guard registration
├── attempt-tracker.js # Training-state plugin: attempt_update tool, prompt injection, validated flag (folds from the session log)
├── zero-leak-guard.js # Programmatic zero-leak output guard plugin (loaded via relative path; copied with the preset)
├── zero-leak-guard.test.mjs # Test corpus: leak samples that must block, clean replies that must pass, tracker + unlock behavior
├── README.md # This file
├── LICENSE # MIT License
└── skills/
├── coaching-protocol/ # Coaching protocol: workflow, red lines, zero-leak rules
├── knowledge-base/ # Knowledge base integration interface (reserved)
└── final-synthesis/ # Final synthesis workflow and output structure
Prerequisite: DeepSeek Harness installed. This preset is derived from the standard preset and uses the DSH agent-presets mechanism.
# Option 1: Copy directly into the user presets root
mkdir -p ~/.dsh/.agent-presets
cp -r math-coach ~/.dsh/.agent-presets/
# Option 2: Inside a DSH session (recommended; auto-loads and validates)
# Use agentPresets.copy, or place this directory under
# ${DSH_HOME:-$HOME/.dsh}/.agent-presets/ and restart DSH.
Mount validation (run after any modification):
agentPresets.standingKeyFor('math-coach') # → mounted OK
In the DeepSeek Harness Web GUI, create a new session and select the Math_Agent preset (id: math-coach).
Start a training session with a prompt like:
I'd like to start a math training exercise. Problem: Let aₙ = √(1 + aₙ₋₁), a₀ = 1. Prove that {aₙ} converges and find its limit. I'm thinking of using monotone convergence but I'm not sure how to prove boundedness.
No matter how insistently you ask for the answer — the zero-leak guard stands between you and the model.
llm/stream waterfall (dispatched process-wide); only activates for requests whose system prompt contains coaching signatures (zero-leak iron rules / math coach). All other sessions pass through untouched.attempt-tracker plugin (mounted in the same isolate realm) holds the per-session attempt list. Once an attempt is recorded as validated via the attempt_update tool, the guard stands down so the final synthesis can deliver the complete solution. A missing tracker, an unknown session, or no validated attempt all fall through to blocking — fail-closed in every direction.LEAK_PATTERNS at the top of zero-leak-guard.js and can be extended freely.The programmatic guard blocks enumerable leak forms (numeric values, intervals, judgment words) in the coach's own reply text. Two channels remain persona-constrained rather than guard-enforced:
When new variants are discovered, simply add them to LEAK_PATTERNS (plus a sample in zero-leak-guard.test.mjs).
The guard ships with a zero-dependency test corpus (Node's built-in test runner):
node --test zero-leak-guard.test.mjs
Run it after every change to LEAK_PATTERNS, attempt-tracker.js, or the guard's unlock logic. The corpus covers: leak samples that must be blocked, legitimate coaching replies that must pass, the validated-session unlock (and its fail-closed fallbacks), and the attempt tracker's state recording, prompt rendering, and session-log fold. Add every newly discovered leak variant to the block list and every reported false positive to the pass list.
skills/knowledge-base/SKILL.md defines a unified search interface contract (local directory + online retrieval), currently in reserved state:
kb/ directory with Markdown files organized by topic; retrieved via glob + grep.web_search retrieval, cited by source URL.confidence (fact / data / reference / heuristic). Final synthesis prioritizes understandings supported by facts and data.persona section in agent.cordis.yml and skills/coaching-protocol/SKILL.md.LEAK_PATTERNS in zero-leak-guard.js.standingKeyFor('math-coach') after changes.This project was inspired by the math coaching concept originally proposed by Bilibili creator PiKaChu345. The original creator has not yet released their implementation publicly. This is an independent reimplementation based solely on the publicly described idea. No source code or proprietary materials from the original work were used. All credit for the original concept goes to PiKaChu345.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。