This skill is the master control entry point for a mathematical modeling competition project. It does not replace the subsequent stage skills; instead, it is responsible for starting the process, asking for preferences, recording decisions, generating a plan, and calling each stage skill in order.
Mathematical Modeling Standards Reference
If domain judgment is needed, read ../_references/math_modeling_norms.md. This file only provides basic mathematical modeling standards and error-prevention knowledge; it does not change this skill's stage order and output conventions.
Required Outputs
Create or update the following files in the current working directory:
plan.md: overall process plan, modeling direction, stage order, expected outputs, and risk control.todo.md: specific to-do list, recording the tasks and status of each stage.
Workflow
1. Ask the user for preferences AskUserQuestions
Before planning, only ask questions that will substantially affect the process. Questions should be few and critical.
Ask in priority order (sorted by importance):
- Typesetting engine: Typst or LaTeX? — Determines which template set and compilation command 5writing uses. Both engines cover all templates (14 Chinese + 3 English). Typst uses the
typstcommand to compile; LaTeX uses thexelatexcommand to compile (must be run twice to resolve cross-references). - Competition type: National Competition/Huawei Cup/Huazhong Cup/MCM/... — Determines template selection; see the template family list in 5writing.
- Paper language: Chinese/English — MCM/ICM/COMAP mandate English; others default to Chinese.
- Whether the number of sub-problems is known: Affects the number of chapter files generated. If unknown, it is determined by the 2analysis-modeling stage based on the problem statement.
Record the user's choices in the "Plan" subsection of plan.md .
2. Formulate the plan
Write plan.md:
# 方案
要依次调用这些 skill,按照里面要求完成任务。
用户偏好:
- 排版引擎:<Typst / LaTeX>
- 竞赛类型:<国赛 / 华为杯 / MCM / ...>
- 论文语言:<中文 / 英文>
- 子问题数量:<已知 N 个 / 待分析确定>
workflow:
step skills
1. 赛题分析与建模设计 - `2analysis-modeling`
2. 编程实现和图表生成 - `3coding-visual`
3. 流程与架构图绘制 - `4drawio`
4. 竞赛论文撰写 - `5writing`
5. 验证和验收 - `6verity`
Project directory structure
Each stage creates and fills files according to this skeleton:
.
├── plan.md # 1: 本文件
├── todo.md # 1: 待办事项
├── reports/ # 各阶段文档报告
│ ├── ANALYSIS_MODELING_REPORT.md # 1: 赛题分析-建模报告(2analysis-modeling)
│ ├── RESULTS_REPORT.md # 2: 结果报告(3coding-visual)
│ ├── DRAWIO_REPORT.md # 3: 非数据图说明(4drawio)
│ ├── VERIFY_REPORT.md # 5: 验收报告(6verity)
├── code/ # 2: 代码(3coding-visual)
│ ├── problem1.py
│ ├── problem2.py
│ ├── problem3.py # 问题的数量应该更具题目动态调整
│ ├── ...
│ └── utils.py
├── results/ # 2: 结果记录(3coding-visual)
├── figures/ # 2+3: 所有图表(3coding-visual + 4drawio)
│ ├── *.pdf # 数据图 + 非数据图 PDF
│ ├── *.drawio # 非数据图源文件
├── paper/ # 4: 论文(5writing)
│ ├── main.typ / main.tex # 论文主文件(按用户选择的引擎)
│ └── sections/ # 各节文件(.typ 或 .tex)
The plan must specify which downstream skill is responsible for each stage, and what files that stage should produce.
3. Generate to-dos
Write todo.md as a staged checklist, in the following format:
# 待办事项
- [ ] 1. 赛题分析与建模设计 - `2analysis-modeling`
- [ ] 2. 编程实现和图表生成 - `3coding-visual`
- [ ] 3. 流程与架构图绘制 - `4drawio`
- [ ] 4. 竞赛论文撰写 - `5writing`
- [ ] 5. 验证和验收 - `6verity`
Each time a stage is completed, update the status of the corresponding task in todo.md .
4. Execute the stages in order
Call the downstream skills in the following order:
| Stage | Skill | Function | Main outputs |
|---|---|---|---|
| Problem analysis and modeling design | 2analysis-modeling |
Parse the meaning of the problem, identify variables/constraints/data/evaluation metrics, and establish the mathematical model, objective function, constraints, and solution strategy. | ANALYSIS_MODELING_REPORT.md |
| Programming implementation and figure generation | 3coding-visual |
Implement reproducible code, run experiments, and generate result tables and a wide variety of figures. | code/, results/ , RESULTS_REPORT.md, figures/图表 |
| Process and architecture diagram drawing | 4drawio |
When the paper genuinely requires it, draw method flowcharts, architecture diagrams, and non-data conceptual diagrams. | figures/*.drawio, figures/*.pdf, DRAWIO_REPORT.md |
| Competition paper writing | 5writing |
Write the final competition paper based on the analysis, modeling, code results, and figures, and insert figures and tables directly by chapter. | paper/ |
| Verification and acceptance | 6verity |
Check reproducibility, consistency, artifact completeness, formatting standards, and submission readiness. | VERIFY_REPORT.md |
Phase boundaries
3coding-visualis responsible for generating all data charts that depend on computational results or experimental outputs.4drawiois only responsible for non-data-type diagrams such as conceptual diagrams, algorithm flowcharts, architecture diagrams, and roadmaps.- Do not let
4drawiorepeatedly draw3coding-visual's already-generated statistical or data charts. 5writingis responsible for deciding the placement of charts in the paper and writing chart code according to the selected engine:- Typst:
#figure(image("../../figures/xxx.pdf", width: 85%), caption: [...]) - LaTeX:
\begin{figure}[H]\centering\includegraphics[width=0.85\textwidth]{../../figures/xxx.pdf}\caption{...}\label{fig:xxx}\end{figure}
- Typst:
- Do not let
5writingfabricate numerical conclusions. Numerical values in the paper must come fromRESULTS_REPORT.md, result tables, or data from already-generated charts.