From math-modeling
Stage 2 of the mathematical modeling pipeline. Performs high-level modeling, problem decomposition into subtasks, and DAG dependency analysis. Invoked by the math-modeling skill during Stage 2. Do not invoke directly.
How this skill is triggered — by the user, by Claude, or both
Slash command
/math-modeling:mm-modelingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Design a comprehensive mathematical modeling solution, decompose it into manageable subtasks, and establish task dependencies via DAG analysis.
Design a comprehensive mathematical modeling solution, decompose it into manageable subtasks, and establish task dependencies via DAG analysis.
Read mm-workspace/01_analysis.json for the problem analysis results.
Load references/actor_critic.md for the Actor-Critic mechanism guide.
Design a complete modeling solution covering:
Write as structured modeling solution: use numbered lists for assumptions, tables for variable definitions, and numbered LaTeX equations. Use coherent paragraphs for reasoning.
Use the Agent tool to dispatch an independent subagent for the Critic role. The subagent must NOT inherit the Actor's reasoning context — it only receives the Actor's final output.
Dispatch an Agent with the following prompt structure:
你是一名严格的数学建模评审专家(Critic 角色)。请对以下建模方案进行批评。
## 审查标准
- 假设合理性:假设是否有充分的理由支撑?
- 技术匹配度:所选方法是否匹配问题类型?
- 数据兼容性:可用数据能否支持该模型?
- 可计算性:该模型在实际中是否可解?
- 完整性:是否覆盖了所有问题要求?
## 问题背景
{Insert brief problem description, 1-2 paragraphs}
## 被审查的建模方案
{Insert Actor's complete modeling solution}
## 输出要求
1. 逐一指出具体问题(附位置引用)
2. 每个问题给出改进方向(指出方向,不提供完整方案)
3. 最后给出总体评价:是否存在重大问题需要追加一轮
4. 直接输出批评内容,不要有多余的寒暄
Receive the Critic feedback and proceed to Improvement.
Produce an improved version addressing all critiques. Complete standalone document.
Round 2: Repeat Critic → Improvement once more.
Split the modeling solution into 3-6 subtasks (default: 5, including sensitivity analysis).
Decomposition principles:
For each subtask, provide:
Refinement: After initial decomposition, refine each subtask description to be more specific and actionable. Ensure each can be understood independently.
Analyze dependencies between subtasks:
Identify dependencies for each task:
Build adjacency list:
{
"1": [],
"2": ["1"],
"3": ["1"],
"4": ["2", "3"]
}
Compute topological order: Determine the execution sequence. For the example above: [1, 2, 3, 4] (tasks 2 and 3 can be parallel)
Generate dependency analysis: For each task, write a brief paragraph explaining its dependencies.
Write to mm-workspace/02_modeling.json:
{
"modeling_solution": "final improved modeling solution text",
"tasks": [
{
"id": 1,
"description": "detailed task description",
"method": "expected method",
"expected_output": "what this task produces",
"dependencies": []
}
],
"dag_order": [1, 2, 3, 4],
"dependency_analysis": ["task 1 dependency analysis...", "task 2 dependency analysis..."],
"stage": "modeling_complete"
}
Then commit: cd mm-workspace && git add -A && git commit -m "feat(s2): modeling and decomposition complete"
Display:
Then ask: "建模方案和任务分解完成。是否需要修改?确认后开始逐任务求解。"
npx claudepluginhub 911439925/math-modeling-skill --plugin math-modelingCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.