Introduction¶
The plugin-based architecture of DeepSeek Harness (DSH) allows developers to extend agent capabilities. In mathematical modeling competition scenarios, fully automated pipelines can lead to uncontrollable solutions or overlooked critical constraints. The GateCraft plugin provides a “gated” workflow that decomposes the solving process into multiple stages. AI executes specific tasks, while humans reflect and make decisions at stage gates to ensure the final deliverable meets expectations.
Installation¶
Use the DeepSeek Harness plugin management command to install:
dsh plugin add Crayonnan/dsh-math-modeling-skills-Gatecraft-
Core Features¶
The plugin includes 9 Skills and one DSH Preset, forming an end-to-end mathematical modeling pipeline.
Skills List¶
- competition-workflow: Five-stage pipeline controller, responsible for workflow orchestration.
- guozhan-paper: National award-winning paper writing paradigm.
- vision-ocr: Reading problem statements and sample papers.
- sensitivity-analysis: Sensitivity analysis.
- statistical-diagnosis: Model diagnosis.
- math-modeling-paper: Paper content generation.
- math-paper-template: LaTeX typesetting.
- tex-pdf-image-to-word: Word format conversion.
- paper-gate: Delivery acceptance layer and source of truth for constraint grading.
DSH Preset¶
presets/math-modeling/: Paste a competition problem to automatically start the workflow.
Stage Gating and Acceptance Mechanism¶
Workflow Logic¶
As the controller, competition-workflow divides the process into five stages: reading the problem, analysis and modeling, coding and results, sensitivity analysis, and paper writing. Stage reports record “changes → effects → metrics” and serve as the sole source of numbers for the next stage. A stage report is not an approval gate, but the source of numbers.
paper-gate and docgate.py¶
paper-gate defines repository-wide constraint grading rules in three levels:
1. Facts: explicit official statements and engineering facts (hard constraints).
2. Invariants: authenticity and consistency that can be mechanically verified (hard constraints).
3. Observations: statistics from award-winning samples (soft constraints).
docgate.py is the execution engine for paper-gate and runs 13 checks using both docx (OOXML) and tex backends:
- FAIL: factual errors or authenticity issues (e.g., broken numbering, abstract values not found in the main text, images extending beyond the text area). Rerunning is required after fixes.
- WARN: craft-related judgments that require item-by-item human review.
When running the acceptance check, specify the submission file (.docx or .tex is supported):
python assets/docgate.py <submission-file.docx|.tex> [--results RESULTS_REPORT.md] [--problem problem.txt]
Assets and Auxiliary Tools¶
The plugin includes a set of auxiliary tools and sources of truth:
- playbooks: optimization-playbook (optimization solving/verification decision table), figure-playbook (flowchart and figure templates).
- prompt-pack: 14 practical prompts.
- Generators: flowchart_gen.py (spec-to-drawio generator), ocr_batch.py (concurrent OCR).
- Sources of truth: official-paper-format.md (official format source of truth), references/ (model selection decision tree, submission self-check, empirical corpus from award-winning papers).
Applicable Scenarios and Cautions¶
- Scope: Field-tested for statistical analysis and optimization/decision-making problems (typical C problems).
- Out of scope: Mechanism/physics simulation (A problems) and graph theory/engineering (B problems) have not been validated and are not recommended for direct use.
- Runtime permissions: The plugin runs with the permissions of the current DSH process. Before installation, review the source code and license.
Summary¶
GateCraft uses Skill collaboration and hard-constraint checks to transform the mathematical modeling process from a “black box” into a controllable pipeline. It does not provide mindless end-to-end automation; instead, it provides a toolchain and checking mechanisms to support human-AI collaboration in producing refined modeling results.
- GitHub repository: crayonnan/dsh-math-modeling-skills-Gatecraft-
- Community directory: GateCraft