@orbit-build/cli 0.5.5 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +4 -0
  2. package/commands/cumcm-draft.md +11 -0
  3. package/commands/math-draft.md +4 -8
  4. package/dist/index.js +671 -397
  5. package/package.json +1 -1
  6. package/skills/{math-model-draft → cumcm-draft}/SKILL.md +124 -27
  7. package/skills/cumcm-draft/agents/openai.yaml +6 -0
  8. package/skills/{math-model-draft → cumcm-draft}/assets/project-template/code/always/config.py +1 -0
  9. package/skills/{math-model-draft → cumcm-draft}/assets/project-template/code/always/data.py +1 -0
  10. package/skills/{math-model-draft → cumcm-draft}/assets/project-template/code/always/plotting.py +1 -0
  11. package/skills/{math-model-draft → cumcm-draft}/assets/project-template/code/always/validation.py +1 -0
  12. package/skills/{math-model-draft → cumcm-draft}/assets/project-template/code/finalize.py +9 -3
  13. package/skills/{math-model-draft → cumcm-draft}/assets/project-template/paper/AI/345/267/245/345/205/267/344/275/277/347/224/250/350/257/246/346/203/205.tex +12 -3
  14. package/skills/{math-model-draft → cumcm-draft}/assets/project-template/paper/contest-profile.json +7 -4
  15. package/skills/{math-model-draft → cumcm-draft}/assets/project-template/paper/main.tex +28 -0
  16. package/skills/cumcm-draft/assets/project-template/paper/sections/ai-disclosure.tex +3 -0
  17. package/skills/cumcm-draft/assets/project-template/paper/sections/appendix.tex +3 -0
  18. package/skills/cumcm-draft/assets/project-template/paper/sections/references.tex +12 -0
  19. package/skills/{math-model-draft → cumcm-draft}/references/code-and-output-style.md +37 -6
  20. package/skills/cumcm-draft/references/cumcm-compliance.md +64 -0
  21. package/skills/{math-model-draft → cumcm-draft}/references/latex-figures-tables.md +5 -0
  22. package/skills/cumcm-draft/references/modeling-quality.md +161 -0
  23. package/skills/{math-model-draft → cumcm-draft}/references/paper-architecture.md +51 -5
  24. package/skills/cumcm-draft/references/project-architecture.md +124 -0
  25. package/skills/{math-model-draft → cumcm-draft}/scripts/audit_paper.py +40 -0
  26. package/skills/{math-model-draft → cumcm-draft}/scripts/bootstrap_project.py +44 -42
  27. package/skills/{math-model-draft → cumcm-draft}/scripts/build_paper.py +76 -5
  28. package/skills/{math-model-draft → cumcm-draft}/scripts/clean_project.py +7 -1
  29. package/skills/{math-model-draft → cumcm-draft}/scripts/package_support.py +8 -1
  30. package/skills/{math-model-draft → cumcm-draft}/scripts/project_utils.py +12 -9
  31. package/skills/{math-model-draft → cumcm-draft}/scripts/validate_project.py +191 -6
  32. package/skills/mcm-draft/SKILL.md +11 -0
  33. package/skills/mcm-draft/agents/openai.yaml +6 -0
  34. package/skills/math-model-draft/agents/openai.yaml +0 -6
  35. package/skills/math-model-draft/assets/project-template/paper/sections/ai-disclosure.tex +0 -3
  36. package/skills/math-model-draft/assets/project-template/paper/sections/appendix.tex +0 -9
  37. package/skills/math-model-draft/assets/project-template/paper/sections/references.tex +0 -6
  38. package/skills/math-model-draft/references/cumcm-compliance.md +0 -56
  39. package/skills/math-model-draft/references/modeling-quality.md +0 -91
  40. package/skills/math-model-draft/references/project-architecture.md +0 -65
  41. /package/skills/{math-model-draft → cumcm-draft}/assets/project-template/code/always/__init__.py +0 -0
  42. /package/skills/{math-model-draft → cumcm-draft}/assets/project-template/code/requirements.txt +0 -0
  43. /package/skills/{math-model-draft → cumcm-draft}/assets/project-template/paper/ai-use-log.md +0 -0
  44. /package/skills/{math-model-draft → cumcm-draft}/assets/project-template/paper/sections/abstract.tex +0 -0
  45. /package/skills/{math-model-draft → cumcm-draft}/assets/project-template/paper/sections/assumptions.tex +0 -0
  46. /package/skills/{math-model-draft → cumcm-draft}/assets/project-template/paper/sections/data.tex +0 -0
  47. /package/skills/{math-model-draft → cumcm-draft}/assets/project-template/paper/sections/evaluation.tex +0 -0
  48. /package/skills/{math-model-draft → cumcm-draft}/assets/project-template/paper/sections/problem-analysis.tex +0 -0
  49. /package/skills/{math-model-draft → cumcm-draft}/assets/project-template/paper/sections/problem-restatement.tex +0 -0
  50. /package/skills/{math-model-draft → cumcm-draft}/assets/project-template/paper/sections/source-code.tex +0 -0
  51. /package/skills/{math-model-draft → cumcm-draft}/assets/project-template/paper/sections/support-files.tex +0 -0
  52. /package/skills/{math-model-draft → cumcm-draft}/references/paper-revision.md +0 -0
  53. /package/skills/{math-model-draft → cumcm-draft}/scripts/capture_environment.py +0 -0
  54. /package/skills/{math-model-draft → cumcm-draft}/scripts/evidence_freeze.py +0 -0
  55. /package/skills/{math-model-draft → cumcm-draft}/scripts/finalize_project.py +0 -0
  56. /package/skills/{math-model-draft → cumcm-draft}/scripts/inspect_inputs.py +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbit-build/cli",
3
- "version": "0.5.5",
3
+ "version": "0.5.7",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Local-first AI coding agent CLI, TUI, Web UI, diagnostics, and LSP runtime",
6
6
  "keywords": [
@@ -1,9 +1,9 @@
1
1
  ---
2
- name: math-model-draft
3
- description: Build, revise, or audit a mathematical-modeling competition project from problem statements, attachments, current code, machine-readable results, figures, TeX, PDFs, and reference papers. Produces evidence-linked Chinese LaTeX, runnable q1/q2 code, validated outputs, current figures, AI-use disclosure, and submission packages. Use explicitly for 数学建模、国赛/CUMCM、研究生数模、校赛、美赛中文稿、论文初稿或定稿审查、TeX/PDF 修订、模型—代码—结果—论文一致性核验。
2
+ name: cumcm-draft
3
+ description: Build, revise, or audit a CUMCM Chinese mathematical-modeling project against the current official paper, support-archive, anonymity, citation, and AI-use rules. Produces evidence-linked Chinese LaTeX, runnable q1/q2 code, validated results and figures, a complete source appendix, AI-use records, and a submission-ready PDF/ZIP pair. Use explicitly for 全国大学生数学建模竞赛、国赛、CUMCM、国赛论文初稿或定稿审查、CUMCM TeX/PDF修订、支撑材料打包及模型—代码—结果—论文一致性核验;do not use for MCM/ICM.
4
4
  ---
5
5
 
6
- # Build or revise a mathematical-modeling paper
6
+ # Build or revise a CUMCM paper
7
7
 
8
8
  Deliver a compilable, evidence-backed project, not an outline or generic prose.
9
9
  Never invent a model, algorithm, datum, parameter, numerical result, validation,
@@ -58,12 +58,13 @@ project first, then read only the reference needed at the decision point:
58
58
  Batch independent reads, writes, and safe commands. Do not repeatedly probe the
59
59
  same binary input: use `inspect_inputs.py` once, then consume its extracted text
60
60
  and structured inventory. Resolve references relative to this `SKILL.md` if
61
- `skill://math-model-draft/` is unavailable. Supplied current contest rules and
61
+ `skill://cumcm-draft/` is unavailable. Supplied current contest rules and
62
62
  templates always outrank this Skill's defaults.
63
63
 
64
64
  ## Select the operating mode
65
65
 
66
- The default `/math-draft <project>` path is a one-request, end-to-end generation:
66
+ The default `/cumcm-draft <project>` path is a one-request, end-to-end generation
67
+ (`/math-draft` remains a compatibility alias):
67
68
  read the problem, model every question, implement and run the code, generate
68
69
  results and figures, write the complete paper, compile, inspect, and package it.
69
70
  Do not stop after scaffolding, an outline, sample paragraphs, or formatting.
@@ -82,6 +83,15 @@ For revision, read every relevant problem/attachment, latest code directory,
82
83
  `results/`, `figures/`, current TeX/PDF, and any excellent-paper directory.
83
84
  Reference papers guide structure and comparison only; they are never a source
84
85
  of this project's results.
86
+ When the user supplies an existing project as a layout reference, inspect its
87
+ directory and final PDF read-only. Reuse effective structure without copying
88
+ abridged code, identities, caches, or other defects. An explicitly requested
89
+ handoff layout outranks the default scaffold. Use neutral root filenames
90
+ `main.tex` and `main.pdf` unless submission rules require another name.
91
+ Compare reference and target PDFs by body coverage and appendix coverage
92
+ separately, normalized for the number and nature of subproblems. Never imitate
93
+ total page count when a long source appendix or a more equation-heavy domain
94
+ explains the difference.
85
95
 
86
96
  ## Establish sources of truth
87
97
 
@@ -98,8 +108,12 @@ Treat `question/` as immutable. Use JSON/CSV as the numerical fact source and
98
108
  check every summary/body/table/figure/conclusion value for units, signs,
99
109
  precision, constraints, and consistency. Prefer a reference paper's final
100
110
  results table over its abstract when auditing that paper's own numbers.
111
+ Numerical traceability is necessary but not sufficient: separately audit the
112
+ business meaning of each transformed field, the time at which every feature is
113
+ available, and whether the reported evaluation was isolated from model and
114
+ parameter selection.
101
115
  In TeX, never write raw underscores or other special characters in paths and
102
- identifiers; use a safe path command such as `\path{code/q1/model.py}` or escape
116
+ identifiers; use a safe path command such as `\path{code/q1/forecasting.py}` or escape
103
117
  the character explicitly. Treat the finalizer's first file/line diagnostic as
104
118
  the repair target instead of launching ad-hoc TeX probes.
105
119
 
@@ -121,9 +135,10 @@ are fingerprinted as immutable; do not move or duplicate them merely to satisfy
121
135
  the canonical layout.
122
136
 
123
137
  The bootstrap is additive and idempotent. It may add missing q-folders and
124
- orchestrator entries, but must not overwrite authored content. Review
125
- `paper/contest-profile.json`; select `cumcm-2026` only when applicable. Do not
126
- silently apply CUMCM limits to another contest.
138
+ orchestrator entries, but must not overwrite authored content. Confirm the
139
+ current official CUMCM format, participation, and AI-use sources before each
140
+ new contest cycle, record them in `paper/contest-profile.json`, and use the
141
+ bundled `cumcm-2026` profile only while those sources remain current.
127
142
 
128
143
  ### 2. Plan evidence before prose
129
144
 
@@ -131,18 +146,60 @@ Maintain `paper/evidence-map.yaml`. Every material claim needs an identifier,
131
146
  an in-project `results/` source, a target `paper/sections/` file, and status
132
147
  `TODO` or `verified`. Define each subproblem's variables, units, constraints,
133
148
  parameter sources, candidate methods, selection reason, data dependencies,
134
- outputs, and validation.
149
+ outputs, and validation. For decision or forecasting tasks, classify every
150
+ feature as known/planned at decision time, forecastable, or realized only after
151
+ the outcome. Record explicit upstream artifact contracts between subproblems.
135
152
 
136
153
  ### 3. Implement and run
137
154
 
138
- - Put shared configuration/loading/plotting/validation in `code/always` and
139
- question-specific work in `code/qN`; keep each `main.py` orchestral.
155
+ - Put cross-question configuration/loading/plotting/validation in
156
+ `code/always`, but give every generated artifact one producing subproblem and
157
+ store it in `results/qN`. Downstream questions may read an upstream qN result;
158
+ do not create `results/always`, `results/shared`, or another ownerless result
159
+ directory. Keep each `main.py` orchestral. After reading the problem, name
160
+ modules for their actual responsibility, such as `forecasting.py`,
161
+ `evaluation.py`, `elasticity.py`, `pricing.py`, `simulation.py`, or
162
+ `reporting.py`. Do not generate the same `main.py + model.py + output.py`
163
+ trio for every question: a generic split that leaves one large `model.py` and
164
+ a trivial `output.py` is not modular. Add concise Chinese `#` comments for
165
+ modeling assumptions, units, leakage guards, numerical safeguards, boundary
166
+ conditions, and non-obvious execution order; do not narrate obvious syntax.
140
167
  - Validate raw data, fix seeds, record the environment, compare a transparent
141
168
  baseline where complexity matters, and use appropriate sensitivity,
142
169
  residual, uncertainty, cross-validation, or robustness checks.
170
+ - Audit field semantics before arithmetic transformations. Do not interpret a
171
+ discount, bundle, buy-one-get-one, event note, stock snapshot, return, or
172
+ backorder flag identically across business contexts merely because the source
173
+ column is numeric. Flag impossible or ambiguous rows and preserve the raw
174
+ value; never hide a semantic error by clipping it into a plausible number.
175
+ - Separate estimation/training, selection/validation, and final evaluation.
176
+ Choose candidate models, ensemble weights, thresholds, interval calibration,
177
+ and optimization policy parameters without using the final test period. Use
178
+ the test set once after the choice is locked. Prefer the simplest candidate
179
+ that wins the declared validation criterion, and allow an ensemble component
180
+ to receive zero weight when it adds no evidence-backed value.
181
+ - Make cross-question dependencies executable: downstream code must read the
182
+ declared upstream result file and validate entity coverage, dates, units,
183
+ columns, and uniqueness before use. Do not silently recompute a different
184
+ proxy or switch to another attachment when the expected upstream artifact is
185
+ incomplete.
186
+ - Describe an optimization result as conditional on its objective, constraints,
187
+ data window, scenario, and candidate/search space. Evaluate policies on data
188
+ not used to select them; never add test-set constraints that manufacture a
189
+ guaranteed improvement. Preserve the original policy or disclose a tradeoff
190
+ when robust improvement is unsupported.
143
191
  - Run from a clean entry point and repair failures before asserting results.
144
192
  - Save factual outputs in `results/qN`, paper-ready visuals in `figures/qN`,
145
193
  and completed workbook deliverables in `results/qN`.
194
+ - In a compact handoff, place only explicitly required submission artifacts
195
+ (final PDFs and required filled Excel/Word files) at project root. Keep
196
+ internal CSV/JSON evidence under `results/qN`. Package code, necessary
197
+ machine-readable results, larger intermediate figures, and the AI details PDF
198
+ into the support ZIP before removing any reproducible workspace figures.
199
+ After both PDF and ZIP are verified, remove figure/build folders only when the
200
+ user requests a minimal delivery tree. Collapse authoring-only TeX
201
+ sections into one root `main.tex`; do not retain a `sections/` directory in a
202
+ single-author compact handoff.
146
203
 
147
204
  ```powershell
148
205
  python <project-root>/code/run_all.py
@@ -157,11 +214,22 @@ flags `--run-code --refresh-evidence`.
157
214
 
158
215
  ### 4. Write or revise from evidence
159
216
 
160
- For every question, make the progression explicit: task interpretation,
161
- variables and constraints, model choice and reason, equations, parameter
162
- sources, algorithm, numerical results, interpretation, validation, conclusion,
163
- and handoff to the next question. Keep the abstract informative: each question
164
- must retain its model, algorithm, key values, and conclusion.
217
+ Use one major `\section` per numbered question so the paper maps directly to
218
+ the statement. Inside that section, expose the actual reasoning chain with
219
+ roughly five to seven domain-specific `\subsection` headings: objective and
220
+ inputs, method rationale, model/constraints, solution procedure, results,
221
+ validation, and conclusion or downstream interface. Merge adjacent stages only
222
+ for a genuinely short question. Do not reuse the same four broad headings such
223
+ as “方法选择与模型建立” and “结果与解释” for every question; rename headings to
224
+ state what is being estimated, optimized, compared, or verified. Keep the
225
+ abstract informative: each question must retain its model, algorithm, key
226
+ values, and conclusion.
227
+
228
+ Keep only decision-relevant summaries in the paper body. When daily, per-item,
229
+ per-grid, or all-sample detail would take more than one page, replace it with a
230
+ grouped summary or representative slice and retain every row in CSV/XLSX under
231
+ `results/qN`; cite that relative path in the paper. Never paste machine-readable
232
+ detail into a long table merely to prove that it was generated.
165
233
 
166
234
  In revision mode, prefer surgical additions and corrections. Do not compress
167
235
  the abstract, change global spacing, or replace large passages without factual
@@ -170,10 +238,23 @@ near first discussion, and free of clipping, overlap, drift, cross-question
170
238
  misplacement, and abnormal whitespace. Check reference aliases, table labels,
171
239
  paper-number shorthand, and bibliography numbering for mismatches.
172
240
 
173
- If the appendix includes source code, regenerate it from the current code tree.
174
- Whether support-file lists or source appendices are included is controlled by
175
- the contest profile; official CUMCM requirements must not be disabled merely as
176
- a stylistic preference.
241
+ Regenerate the appendix from the current project immediately before the final
242
+ build. For CUMCM, the support-file list and complete runnable source appendix
243
+ are mandatory and cannot be disabled as a stylistic preference. The displayed
244
+ file list must match the final ZIP exactly; group entries by directory to keep
245
+ the list readable without omitting filenames.
246
+ Build a source appendix from the actual runnable files; never maintain a
247
+ parallel `core_code` excerpt or hand-written substitute. Include the unified
248
+ entry point and its modeling dependency closure, but omit empty `__init__.py`,
249
+ finalizer launchers, packagers, audit scripts, and caches. Use numbered,
250
+ line-wrapped, thin-framed listings.
251
+
252
+ Before packaging, derive `code/requirements.txt` from the imports and actual
253
+ file readers used by the runnable model (including engines such as `openpyxl`),
254
+ then remove unused packages and stale dependency entries. Keep validation-set
255
+ metrics and model-selection evidence, but do not deliver scratch verifiers,
256
+ cleanup/rebuild scripts, contact-sheet generators, nested project archives, or
257
+ temporary caches unless the problem explicitly requires them.
177
258
 
178
259
  ### 5. Audit, build, package, and inspect every page
179
260
 
@@ -201,6 +282,12 @@ missing TeX assets, unresolved references, weak question sections, and stale
201
282
  PDFs. Render the final PDF and inspect every page. There must be no blank page,
202
283
  orphan heading, overflow, missing glyph, undefined reference, overfull/underfull
203
284
  box, clipped figure/table, or inexplicable whitespace.
285
+ Log checks do not replace visual judgment: inspect glyph overlap, column drift,
286
+ and repeated headers in dense pages. Any detail table continuing for two or
287
+ more pages must be challenged; if the complete data already exists in support
288
+ files, replace the body table with a compact summary.
289
+ Ensure every bibliography entry is cited and every externally sourced method
290
+ has a nearby citation; remove ornamental uncited references.
204
291
 
205
292
  Clean only known caches and temporary render products after verification:
206
293
 
@@ -213,12 +300,22 @@ TeX sources, final PDFs, or unknown files.
213
300
 
214
301
  ## AI-use compliance
215
302
 
216
- Using this Skill is itself AI assistance. For CUMCM 2026, default to the
217
- official “used AI” declaration unless the project demonstrably predates use.
218
- Keep the declaration immediately before references and generate the required
219
- `AI工具使用详情.pdf`. Record tool/model, stage and purpose, prompting process,
220
- adoption/manual changes, and verification. Never present an unofficial AIGC or
221
- AIDC percentage from a secondary article as an official disqualification rule.
303
+ Using this Skill is itself AI assistance. Apply the official 2025 trial AI rule
304
+ unless a newer primary CUMCM source has replaced it: mark AI-generated or
305
+ AI-revised content at the corresponding body locations, list each used tool in
306
+ the references as tool name, version/model, provider, and date, and include
307
+ `AI工具使用详情.pdf` inside the support ZIP. The details PDF must record tool and
308
+ model, purpose and stage, key prompt-and-response interactions, adoption and
309
+ manual changes, and verification. A generic declaration paragraph is optional
310
+ and never substitutes for inline marks, the reference entry, or the details
311
+ PDF. If no AI was used, place the exact official unused declaration after the
312
+ references; this path is impossible when this Skill contributed to the work.
313
+
314
+ Do not rewrite deep AI participation as team-independent core modeling. If AI
315
+ performed core modeling or analysis in a training artifact, disclose that fact
316
+ and warn that the artifact cannot be submitted as an independently completed
317
+ contest entry without being independently redone. Never present an unofficial
318
+ AIGC/AIDC percentage as an official threshold.
222
319
 
223
320
  ## Completion gate
224
321
 
@@ -0,0 +1,6 @@
1
+ interface:
2
+ display_name: "CUMCM Draft"
3
+ short_description: "Complete CUMCM paper, code, PDF, AI record, and support ZIP"
4
+ default_prompt: "Use $cumcm-draft to audit the current official CUMCM rules, read every problem and attachment, complete the modeling and runnable q1/q2 code, generate verified evidence and figures, write the full Chinese LaTeX paper with current AI-use marks, compile and inspect every page, and package a matching submission PDF and support ZIP."
5
+ policy:
6
+ allow_implicit_invocation: false
@@ -12,6 +12,7 @@ RANDOM_STATE = 2026
12
12
 
13
13
 
14
14
  def question_output_dirs(question: str) -> tuple[Path, Path]:
15
+ # 只允许 qN,避免输出目录越过项目边界。
15
16
  if not question.startswith("q") or not question[1:].isdigit():
16
17
  raise ValueError(f"Invalid question name: {question}")
17
18
  return RESULTS_DIR / question, FIGURES_DIR / question
@@ -9,6 +9,7 @@ from always.config import QUESTION_DIR
9
9
 
10
10
 
11
11
  def input_files(suffixes: Iterable[str]) -> list[Path]:
12
+ # 统一转为小写,兼容 Windows 数据文件的大小写后缀。
12
13
  normalized = {suffix.lower() for suffix in suffixes}
13
14
  return sorted(
14
15
  path
@@ -6,6 +6,7 @@ import matplotlib.pyplot as plt
6
6
 
7
7
 
8
8
  def setup_plotting() -> None:
9
+ # 字体按可用顺序回退,保证中文图在不同机器上仍可复现。
9
10
  plt.rcParams["font.sans-serif"] = [
10
11
  "Microsoft YaHei",
11
12
  "SimHei",
@@ -8,6 +8,7 @@ import numpy as np
8
8
 
9
9
 
10
10
  def require_finite(values: np.ndarray, label: str) -> None:
11
+ # 在结果落盘前阻断 NaN 和无穷值,避免论文引用无效数值。
11
12
  if not np.isfinite(values).all():
12
13
  raise ValueError(f"{label} contains non-finite values.")
13
14
 
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import json
4
+ import os
4
5
  import runpy
5
6
  import shutil
6
7
  import subprocess
@@ -12,7 +13,12 @@ PROJECT_ROOT = Path(__file__).resolve().parent.parent
12
13
 
13
14
 
14
15
  def resolve_finalizer() -> Path:
15
- personal = Path.home() / ".orbit" / "skills" / "math-model-draft" / "scripts" / "finalize_project.py"
16
+ development_root = os.environ.get("CUMCM_DRAFT_SKILL_ROOT")
17
+ if development_root:
18
+ candidate = Path(development_root).resolve() / "scripts" / "finalize_project.py"
19
+ if candidate.is_file() and not candidate.is_symlink():
20
+ return candidate
21
+ personal = Path.home() / ".orbit" / "skills" / "cumcm-draft" / "scripts" / "finalize_project.py"
16
22
  if personal.is_file():
17
23
  return personal
18
24
  orbit = shutil.which("orbit")
@@ -33,13 +39,13 @@ def resolve_finalizer() -> Path:
33
39
  except json.JSONDecodeError:
34
40
  payload = {}
35
41
  for skill in payload.get("skills", []):
36
- if skill.get("name") != "math-model-draft":
42
+ if skill.get("name") != "cumcm-draft":
37
43
  continue
38
44
  candidate = Path(str(skill.get("path", ""))).resolve().parent / "scripts" / "finalize_project.py"
39
45
  if candidate.is_file():
40
46
  return candidate
41
47
  raise SystemExit(
42
- "Active math-model-draft finalizer is missing. Run `orbit skills list` "
48
+ "Active cumcm-draft finalizer is missing. Run `orbit skills list` "
43
49
  "and ensure the bundled or personal Skill is enabled."
44
50
  )
45
51
 
@@ -17,9 +17,18 @@
17
17
  \TODO{逐项填写实际工具名称、版本、模型、提供方,以及使用阶段和用途。}
18
18
 
19
19
  \section{主要提示方式与过程}
20
- \TODO{概述如何提供题目、代码和证据约束,可列典型提示词;不得虚构未发生的交互。}
20
+ \TODO{概述如何提供题目、代码和证据约束;不得虚构未发生的交互。}
21
+
22
+ \section{关键交互记录}
23
+ \renewcommand{\arraystretch}{1.15}
24
+ \begin{longtable}{@{}L{0.06\textwidth}L{0.26\textwidth}L{0.31\textwidth}L{0.25\textwidth}@{}}
25
+ \hline
26
+ 序号 & 重要提示词(摘要) & AI回复(摘要) & 采纳及人工修改 \\
27
+ \hline
28
+ 1 & \TODO{填写真实提示词} & \TODO{填写真实回复要点} & \TODO{填写采纳与修改} \\
29
+ \hline
30
+ \end{longtable}
21
31
 
22
- \clearpage
23
32
  \section{采纳、人工修改与核验}
24
33
  \renewcommand{\arraystretch}{1.3}
25
34
  \begin{longtable}{@{}L{0.06\textwidth}L{0.13\textwidth}L{0.15\textwidth}L{0.23\textwidth}L{0.25\textwidth}@{}}
@@ -31,5 +40,5 @@
31
40
  \end{longtable}
32
41
 
33
42
  \section{责任确认}
34
- \TODO{确认核心建模与分析由团队主导,AI输出均经人工复核,论文、代码、数据与本记录一致。}
43
+ \TODO{如实确认AI参与深度、人工复核范围及论文/代码/数据一致性;不得把AI完成的核心建模改写为团队独立完成。}
35
44
  \end{document}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema_version": 1,
3
3
  "profile": "cumcm-2026",
4
- "rules_checked_at": "2026-08-05",
4
+ "rules_checked_at": "2026-08-11",
5
5
  "paper": {
6
6
  "max_pdf_mb": 20,
7
7
  "max_body_pages": 30,
@@ -13,13 +13,16 @@
13
13
  "include_ai_log": false
14
14
  },
15
15
  "ai": {
16
- "policy": "cumcm-2026",
16
+ "policy": "cumcm-2025-trial",
17
17
  "used": true,
18
- "declaration_before_references": true,
18
+ "inline_markers_required": true,
19
+ "reference_entry_required": true,
20
+ "reference_key": "ai-tool",
19
21
  "details_pdf_required": true
20
22
  },
21
23
  "sources": [
22
24
  "https://www.mcm.edu.cn/html_cn/node/4cd596519c9eb9fbd866398f6df0caa3.html",
23
- "https://www.mcm.edu.cn/html_cn/node/fef94648f2836ab6cc81586f4c38512b.html"
25
+ "https://www.mcm.edu.cn/html_cn/node/9d8e511fe7a1447b35f53a82c908e2e0.html",
26
+ "https://www.mcm.edu.cn/html_cn/node/eebcfb6dc37fd2de9603dc16026fdf01.html"
24
27
  ]
25
28
  }
@@ -9,6 +9,7 @@
9
9
  \usepackage{xcolor}
10
10
  \usepackage{fancyhdr}
11
11
  \usepackage{fvextra}
12
+ \usepackage{listings}
12
13
  \usepackage{hyperref}
13
14
 
14
15
  \hypersetup{hidelinks}
@@ -21,6 +22,32 @@
21
22
  {\IfFontExistsTF{Noto Sans Mono}
22
23
  {\setmonofont{Noto Sans Mono}[Scale=MatchLowercase]}
23
24
  {\IfFontExistsTF{DejaVu Sans Mono}{\setmonofont{DejaVu Sans Mono}[Scale=MatchLowercase]}{}}}
25
+ \definecolor{codeblue}{RGB}{31,78,121}
26
+ \definecolor{codegreen}{RGB}{40,110,85}
27
+ \definecolor{codegray}{RGB}{95,105,115}
28
+ \lstdefinestyle{modelpython}{
29
+ language=Python,
30
+ numbers=left,
31
+ numberstyle=\tiny\color{codegray},
32
+ numbersep=8pt,
33
+ basicstyle=\ttfamily\fontsize{8.0}{9.2}\selectfont,
34
+ keywordstyle=\color{codeblue}\bfseries,
35
+ commentstyle=\color{codegreen},
36
+ stringstyle=\color{purple!70!black},
37
+ breaklines=true,
38
+ breakatwhitespace=false,
39
+ frame=single,
40
+ rulecolor=\color{black!38},
41
+ columns=fullflexible,
42
+ keepspaces=true,
43
+ linewidth=\textwidth,
44
+ showstringspaces=false,
45
+ tabsize=4,
46
+ xleftmargin=2.3em,
47
+ framexleftmargin=0pt,
48
+ aboveskip=3pt,
49
+ belowskip=3pt
50
+ }
24
51
  \graphicspath{{../figures/}}
25
52
  \captionsetup{font=small,labelsep=quad}
26
53
  \setlength{\parindent}{2em}
@@ -29,6 +56,7 @@
29
56
  \pagestyle{plain}
30
57
  \newcommand{\TODO}[1]{\textcolor{red}{\textbf{TODO[#1]}}}
31
58
  \newcommand{\papertitle}{TODO[填写能够概括方法与对象的论文标题]}
59
+ \newcommand{\AIUseMark}{\textsuperscript{\cite{ai-tool}}}
32
60
 
33
61
  \begin{document}
34
62
 
@@ -0,0 +1,3 @@
1
+ \section*{AI工具使用声明}
2
+
3
+ 本参赛队在竞赛过程中使用了AI工具,主要用于\TODO{如实简述用途与参与深度}。正文相应位置已标注AI辅助内容,所用工具已列入参考文献,关键交互、采纳与人工修改情况见支撑材料中的《AI工具使用详情》。本段不能替代逐处标注、AI参考文献或详情PDF。
@@ -0,0 +1,3 @@
1
+ \IfFileExists{sections/support-files.tex}{\input{sections/support-files}}{}
2
+
3
+ \IfFileExists{sections/source-code.tex}{\input{sections/source-code}}{}
@@ -0,0 +1,12 @@
1
+ {\footnotesize
2
+ \begin{thebibliography}{99}
3
+ \setlength{\itemsep}{0.2em}
4
+
5
+ \bibitem{todo-reference}
6
+ \TODO{按正文首次引用顺序补充真实、可核验的参考文献。}
7
+
8
+ \bibitem{ai-tool}
9
+ \TODO{按“工具名称,版本/型号,开发机构/公司,使用日期”如实填写AI工具。}
10
+
11
+ \end{thebibliography}
12
+ }
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Python structure
4
4
 
5
- Use:
5
+ Use responsibility-based modules after reading the actual problem. For example:
6
6
 
7
7
  ```text
8
8
  code/
@@ -17,16 +17,29 @@ code/
17
17
  └── qN/
18
18
  ├── __init__.py
19
19
  ├── main.py
20
- ├── model.py
21
- ├── output.py
22
- └── domain_specific.py
20
+ ├── preprocessing.py
21
+ ├── forecasting.py
22
+ ├── evaluation.py
23
+ └── reporting.py
23
24
  ```
24
25
 
25
- Create only domain modules that carry real logic. Keep `main.py` orchestral.
26
+ The names above are examples, not a fixed template. Another question may need
27
+ `simulation.py`, `policy_search.py`, or `sensitivity.py`. Create only modules
28
+ that carry real logic, keep `main.py` orchestral, and keep dependencies one-way:
29
+ `main -> domain logic -> always`.
30
+
31
+ Avoid these patterns:
32
+
33
+ - generating the same `main.py + model.py + output.py` trio for every question;
34
+ - leaving one oversized `model.py` that mixes preprocessing, fitting, evaluation,
35
+ plotting, and file output;
36
+ - keeping a trivial wrapper module solely to make the directory look modular;
37
+ - splitting one short, cohesive algorithm into many one-function files.
26
38
 
27
39
  ## Comments
28
40
 
29
- - Prefer short `#` comments.
41
+ - Prefer short Chinese `#` comments unless the surrounding project uses another
42
+ language consistently.
30
43
  - Comment the reason, invariant, unit conversion, or numerical safeguard.
31
44
  - Do not restate the following line.
32
45
  - Do not use decorative separators or paragraph-length comments.
@@ -50,6 +63,12 @@ pipeline = make_pipeline(transformer, estimator)
50
63
  - Keep plotting headless and deterministic.
51
64
  - Close figures after saving.
52
65
  - Fail early with a concise message when required columns or units are absent.
66
+ - Keep an explicit decision-time feature list beside forecasting code and
67
+ comment every non-obvious lag that prevents target leakage.
68
+ - Validate upstream result schemas before downstream use; never silently
69
+ substitute a historical proxy for a missing forecast.
70
+ - Keep `requirements.txt` limited to direct imports and required file readers.
71
+ Do not retain libraries used only by one-off inspection or PDF review tools.
53
72
 
54
73
  ## Results
55
74
 
@@ -89,3 +108,15 @@ Print:
89
108
  Do not dump full dataframes or stack traces during normal runs. Save detailed
90
109
  diagnostics under the matching `results/qN`. ASCII status tags also remain
91
110
  legible in a LaTeX source-code appendix without relying on symbol fonts.
111
+
112
+ ## Delivery hygiene
113
+
114
+ - Retain model-selection tables, validation metrics, and independent test
115
+ outputs that substantiate claims.
116
+ - Remove one-off verifier, cleanup, ZIP-rebuild, and contact-sheet scripts after
117
+ their reusable checks are covered by the trusted finalizer.
118
+ - Never place nested project archives, `__pycache__`, `.pyc`, TeX intermediates,
119
+ or temporary render directories in the support archive.
120
+ - Do not compress source merely to save a nearly blank appendix tail page;
121
+ first remove dead code and meaningless blank lines, then adjust listing layout
122
+ while preserving reviewability.
@@ -0,0 +1,64 @@
1
+ # CUMCM compliance profile
2
+
3
+ Checked against the official CUMCM site on 2026-08-11. Recheck the official
4
+ site at the start of every contest cycle; newer organizer material and supplied
5
+ regional requirements outrank this reference.
6
+
7
+ ## 2026 paper and support-material rules
8
+
9
+ - Use white A4 paper with every margin at least 2.5 cm.
10
+ - The electronic paper starts with the title, Chinese abstract, and keywords on
11
+ a single abstract page numbered 1. Do not include the commitment or numbering
12
+ pages in the electronic paper.
13
+ - Start the body on page 2 of the electronic PDF, include no table of contents,
14
+ and keep the body within 30 pages. Appendix pages are unlimited.
15
+ - Submit one uncompressed PDF or Word paper file no larger than 20 MB.
16
+ - Submit a separate ZIP/RAR support archive no larger than 20 MB.
17
+ - Put an exact support-archive file list in the paper appendix. Grouping by
18
+ directory is acceptable for readability, but every filename must remain
19
+ identifiable and the list must match the final archive.
20
+ - Include every complete runnable source program and necessary supporting data,
21
+ results, and large intermediate figures. Do not include organizer-supplied raw
22
+ problem files merely to duplicate them.
23
+ - Keep commitment/numbering pages and all team, school, region, instructor, and
24
+ other identifying information out of the paper and support archive.
25
+ - Cite every external or public source near its use and list it in the
26
+ references.
27
+
28
+ Official format source:
29
+ <https://www.mcm.edu.cn/html_cn/node/4cd596519c9eb9fbd866398f6df0caa3.html>
30
+
31
+ ## Current AI-use rule
32
+
33
+ The official site still lists the “2025 trial” AI-use rule alongside the 2026
34
+ format and participation rules. Until a newer primary rule replaces it:
35
+
36
+ 1. Treat language models, generative AI, code assistants, agents, and intelligent
37
+ mathematical software as AI tools.
38
+ 2. Keep core modeling and analysis team-led; the team remains responsible for
39
+ originality, truthfulness, and accuracy.
40
+ 3. Mark AI-generated content at the corresponding locations in the body.
41
+ 4. Add each used tool to the references in the form: tool name, version/model,
42
+ provider/company, use date.
43
+ 5. Put `AI工具使用详情.pdf` in the support archive. Record the actual tool/model,
44
+ purposes and stages, key prompt-and-response interactions, and adopted content
45
+ plus manual changes.
46
+ 6. If no AI was used, place `本参赛队未使用任何 AI 工具` after the references.
47
+ Never claim this when an AI Skill or agent contributed.
48
+
49
+ Official AI source:
50
+ <https://www.mcm.edu.cn/html_cn/node/eebcfb6dc37fd2de9603dc16026fdf01.html>
51
+
52
+ The 2026 participation rule explicitly allows AI only as an auxiliary tool and
53
+ requires compliance with the AI-use rule:
54
+ <https://www.mcm.edu.cn/html_cn/node/9d8e511fe7a1447b35f53a82c908e2e0.html>
55
+
56
+ ## Guardrails
57
+
58
+ - A training artifact substantially modeled or written by AI cannot truthfully
59
+ be relabeled as team-independent core work. Preserve the disclosure and require
60
+ an independent redo before formal submission.
61
+ - A generic AI declaration paragraph is not an official substitute for body
62
+ marks, reference entries, or `AI工具使用详情.pdf`.
63
+ - No official source above establishes an AIGC/AIDC percentage threshold. Do not
64
+ encode secondary “20%” claims as a disqualification rule.
@@ -29,6 +29,9 @@
29
29
  - Keep tables within text width; use landscape or appendix for genuinely wide
30
30
  data rather than shrinking to unreadable text.
31
31
  - Do not paste raw intermediate tables into the body.
32
+ - Treat more than about 25 detail rows or more than one continued page as a
33
+ prompt to aggregate. Keep complete rows in CSV/XLSX and show a compact
34
+ category, period, quantile, or representative-item summary in the paper.
32
35
 
33
36
  ## Figures
34
37
 
@@ -58,3 +61,5 @@
58
61
  - Render the final PDF and inspect every page.
59
62
  - Check the abstract page, dense equations, wide tables, multi-panel figures,
60
63
  appendix transitions, page numbers, and final blank pages.
64
+ - Inspect text alignment visually; a clean TeX log does not detect overlapping
65
+ glyphs inside dense `longtable` rows.