The DeepSeek Harness (DSH) plugin ecosystem allows extending the agent’s capabilities via local tools and scripts. The math-rigor plugin targets mathematical proof scenarios and provides an auditable proof process through a local MCP server and a structured workflow, preventing the model from directly “hallucinating” conclusions.
Core Components¶
This plugin consists of three parts:
- Local stdio MCP server: Runs Python scripts and provides 23 tools.
- Bundled workflow skill: A built-in proof workflow skill.
- Slash commands: Provides two commands:
/proveand/audit-proof.
Installation and Activation¶
Add the plugin using the officially provided install command. Modify the --profile parameter in the command according to the profile you are currently using (e.g., desktop or web).
dsh plugin --profile web add bauerelizabeth07139/math-rigor
After installation, the plugin registers the corresponding skill and commands. Before first use, ensure the Python environment is ready.
Environment Requirements¶
This plugin depends on Python 3.10+. MCP tools will be unavailable until a virtual environment (venv) is created and dependencies are installed.
- Install dependencies: The plugin requires
mcp,sympy,z3-solver, andmpmath. - Environment path: All data (including the venv and proof sessions) is stored under
$DSH_HOME/math-rigorby default.
If the environment is not ready, MCP tools will be unavailable; commands will return an error indicating that you need to run the setup script or manually create the venv.
Configuration¶
Configure plugin parameters in the profile’s loader row:
- id: dsh-math-rigor
config:
home: "$DSH_HOME/math-rigor"
setup: true
setupTimeoutMs: 600000
toolCallTimeoutMs: 300000
Configuration options:
* home: Specifies the data directory; defaults to $DSH_HOME/math-rigor.
* setup: Boolean. When set to true, the plugin automatically creates the venv and installs dependencies during the load phase.
* setupTimeoutMs / toolCallTimeoutMs: Set timeout durations (in milliseconds) for installation and tool calls.
Using Commands¶
The plugin provides two main commands:
/prove <mathematical proposition>- Launches a six-stage rigorous proof workflow: formalization → strategy → lemma decomposition → step-by-step proof (machine-checked at each step) → machine audit → report.
- Prerequisite: The
math-rigorskill must be loaded before execution.
/audit-proof <proof text or math-rigor session id>- Audits proof text or a session ID. It decomposes the step DAG, reads decision results line by line, performs a structural review, and lists an issue checklist.
23 MCP Tools¶
MCP tools are prefixed with mcp__math_rigor__. The tools are grouped into five categories:
Session Management¶
proof_workflow: Returns workflow stages, decision vocabulary, and audit checklist items.proof_start: Starts a proof session, registering the problem, goals, and symbol domains.proof_add_given: Registers premises given in the problem statement.proof_add_assumption: Registers temporary assumptions.proof_add_lemma: Registers lemma obligations.proof_add_step: Adds a proof step and performs immediate machine verification.proof_validate: Audits the entire proof structure.proof_status: Views the session status.proof_export: Exports the proof as Markdown / LaTeX / JSON.
Logic Checks¶
logic_check_step: Checks the shape and semantics of a single inference step.logic_entails: Determines whether the premises entail the conclusion.logic_truth_table: Full enumeration for pure propositional logic (up to 10 variables).logic_rules: Lists inference rules.
Verifiers¶
verify_identity: Verifies whether two expressions represent the same function.verify_inequality: Verifies global inequalities with specified domains.verify_forall: Verifies universal propositions (divisibility, parity, bounds, algebraic identities).verify_induction: Verifies proofs by induction.verify_limit: Verifies limit values.find_counterexample: Finds counterexamples.
Symbolic Computation¶
symbolic_eval: Single symbolic operation (simplify, expand, factor, diff, integrate, etc.).symbolic_numeric: High-precision numerical evaluation.expr_normalise: Normalizes expressions.
Number Theory¶
number_theory: Exact integer operations (primality, factorization, Euler’s totient, GCD, CRT, etc.).
Security¶
The plugin enforces strict security constraints:
- Input isolation: Input consists only of mathematical expressions; it does not use
evalorexecto execute arbitrary code. Inputs are parsed into an AST via lexer/parser. - File operations: Writes only to the plugin home directory (
$DSH_HOME/math-rigor), not to the working directory or profile configuration. - Network isolation: Network access is used only during the initial
pip install; the proof process is fully offline. - Dependency pinning: Dependency versions in
requirements.txtare strictly pinned.
Summary¶
math-rigor provides DSH with a complete mathematical proof toolchain—from input to verification to auditing. Through 23 local tools and the structured /prove workflow, it ensures the reliability of mathematical reasoning.
- Plugin homepage: https://www.skillhub.cn/plugins/bauerelizabeth07139/math-rigor
- Source repository: https://github.com/bauerelizabeth07139/math-rigor