dsh-math-modeling-agent 0.3.1 → 0.5.0

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 (43) hide show
  1. package/README.md +247 -172
  2. package/package.json +34 -34
  3. package/skills/math-modeling-agent/SKILL.md +70 -56
  4. package/skills/math-modeling-agent/references/claims-evidence.md +53 -41
  5. package/skills/math-modeling-agent/references/interaction-protocol.md +165 -163
  6. package/skills/math-modeling-agent/references/original-project-parity.md +19 -0
  7. package/skills/math-modeling-agent/references/report-contract.md +130 -122
  8. package/skills/math-modeling-agent/references/run-directory.md +65 -62
  9. package/skills/math-modeling-agent/references/subagent-dispatch.md +3 -2
  10. package/skills/math-modeling-agent/references/tool-policy.md +11 -0
  11. package/skills/math-modeling-agent/references/verification-recipes.md +43 -0
  12. package/skills/math-modeling-agent/references/workflow.md +10 -9
  13. package/skills/math-modeling-agent/schemas/attempt.schema.json +89 -70
  14. package/skills/math-modeling-agent/schemas/evidence.schema.json +110 -0
  15. package/skills/math-modeling-agent/schemas/failure.schema.json +30 -0
  16. package/skills/math-modeling-agent/schemas/ledger.schema.json +88 -68
  17. package/skills/math-modeling-agent/schemas/run.schema.json +126 -102
  18. package/skills/math-modeling-agent/schemas/verification.schema.json +60 -0
  19. package/skills/math-modeling-agent/scripts/computation/README.md +20 -0
  20. package/skills/math-modeling-agent/scripts/computation/backend-inventory.schema.json +78 -0
  21. package/skills/math-modeling-agent/scripts/computation/backend_inventory.ps1 +351 -0
  22. package/skills/math-modeling-agent/scripts/computation/backend_inventory.py +322 -0
  23. package/skills/math-modeling-agent/scripts/computation/computation_record.py +361 -0
  24. package/skills/math-modeling-agent/scripts/computation/probe_backends.ps1 +396 -0
  25. package/skills/math-modeling-agent/scripts/computation/probe_backends.py +230 -0
  26. package/skills/math-modeling-agent/scripts/correction-lineage.mjs +78 -0
  27. package/skills/math-modeling-agent/scripts/distribution-parity.mjs +123 -0
  28. package/skills/math-modeling-agent/scripts/evidence-store.mjs +349 -0
  29. package/skills/math-modeling-agent/scripts/failure-insights.mjs +79 -0
  30. package/skills/math-modeling-agent/scripts/input-snapshot.mjs +98 -0
  31. package/skills/math-modeling-agent/scripts/ledger-mutation.mjs +82 -0
  32. package/skills/math-modeling-agent/scripts/migration-v3.mjs +31 -0
  33. package/skills/math-modeling-agent/scripts/output-integrity.mjs +82 -0
  34. package/skills/math-modeling-agent/scripts/paper-evidence.mjs +45 -0
  35. package/skills/math-modeling-agent/scripts/report-contract.mjs +112 -0
  36. package/skills/math-modeling-agent/scripts/run-state.mjs +829 -707
  37. package/skills/math-modeling-agent/scripts/verification-recipes.mjs +52 -0
  38. package/skills/math-modeling-agent/scripts/verification-runner.mjs +8 -0
  39. package/skills/math-modeling-audit/SKILL.md +41 -41
  40. package/skills/math-modeling-audit/references/mcm-icm-final-judge.md +335 -331
  41. package/skills/math-modeling-audit/scripts/mcm-score.mjs +293 -218
  42. package/skills/math-modeling-audit/scripts/paper-final-review.mjs +40 -0
  43. package/skills/math-modeling-audit/scripts/project-initial-review.mjs +41 -0
@@ -1,122 +1,130 @@
1
- # Report Contract
2
-
3
- ## Attempt report
4
-
5
- Every attempt report contains exactly:
6
-
7
- 1. one round objective;
8
- 2. candidate/direction;
9
- 3. assumption delta;
10
- 4. claims changed;
11
- 5. actual execution or derivation artifacts;
12
- 6. new evidence IDs;
13
- 7. obligations closed;
14
- 8. issues opened and closed;
15
- 9. delta from prior attempt;
16
- 10. valid-progress decision;
17
- 11. budget usage;
18
- 12. current status;
19
- 13. one next action.
20
-
21
- Do not copy full prior solutions or private reasoning.
22
-
23
- ## Terminal report
24
-
25
- State the frozen question, final scientific status, answer/recommendation, verified claims and evidence links, conditional/unresolved claims, assumptions and sensitivity, candidate comparison, data and parameter sources, validation, failure cases, limitations, reproducibility commands, and resume conditions when non-SOLVED.
26
-
27
- 整体感 requirement (v0.3): the terminal report is ONE narrative, not a
28
- concatenation of sub-question reports — it must show the question-dependency
29
- chain (which model fed which), the shared global assumptions, and the
30
- cross-sub-question consistency checks. A reader must be able to see the whole
31
- problem as one connected argument.
32
-
33
- ## Chat display — the runlog digest (MUST output, v2.7)
34
-
35
- The following is shown DIRECTLY IN THE CHAT, not only on disk.
36
-
37
- ### Readability standard — write for a human reader, never a bullet list
38
-
39
- Every section is an EXPOSITION, not a summary: state WHY the step is taken,
40
- HOW the reasoning runs (derivation, mechanism, first-principles chain), WHAT
41
- came out (numbers with units), and HOW it is checked. A reader who knows
42
- nothing about the problem must be able to follow each section without
43
- guessing.
44
-
45
- Style: step-by-step numbered exposition with plain direct language (this is
46
- a working document, not a final paper — no paper-style formal phrasing
47
- required), but with MORE detail than a paper would carry: every parameter
48
- choice gets its reason, every formula is followed by a plain-language
49
- explanation of each symbol, every step ends with a transition line
50
- ("这一步保证了…,为下一步…做好准备"), and every conclusion states what it
51
- would take to be wrong. Minimum expectations per section:
52
-
53
- - 问题重述:restate the question in your own words, explaining every
54
- parameter's meaning and where it comes from in the problem text.
55
- - 问题分析:walk the physical/geometric mechanism step by step (e.g. why the
56
- nodes move radially, how the focal geometry pins the paraboloid), each
57
- step justified by problem text, data, or derivation.
58
- - 模型假设:for EVERY assumption give the reason it is justified
59
- (original wording / data statistic / derivation / literature) and what
60
- happens if it fails.
61
- - 模型建立与求解:write the derivation in full (equations, variable
62
- definitions, units, how the equation is solved, numerical method and why
63
- it was chosen), not just the final formula.
64
- - 验证:explain the verification LOGIC for each obligation (what would
65
- falsify it, what tolerance is used and why), then the outcome.
66
- - 鲁棒性:for each perturbation say what was varied, why that parameter,
67
- and what would count as a conclusion flip.
68
- - 评价与改进 / 参考文献:state the comparison criterion and map each
69
- reference to the exact method it supports.
70
-
71
- ### Intake digest (once, at intake completion) — the six-section deep restatement
72
-
73
- 【题目要点摘录】the problem's own numbers and constraints, quoted, each explained
74
- 【背景解读】engineering/physical mechanism, walked through
75
- 【数据语义】every attachment column by column (meaning/units/coordinate system/magnitudes), with observed statistics
76
- 【隐含信息与歧义清单】numbered; each = LLM reading + derivation/basis + risk (the user corrects entries here)
77
- 【各子问题数学本质判定】every sub-question (any count) classified + why
78
- 【待澄清问题】open questions inviting user background/corrections/references
79
-
80
- After the D0 exchange, show the delta applied to problem-brief.md.
81
-
82
- ### Quality self-check (MUST run before every D4 verdict)
83
-
84
- Before presenting a D4 verdict, run the self-check on the current attempt's
85
- report and show the result in the chat: for each of the eight digest sections,
86
- confirm whether it answers all four questions — WHY (why this step), HOW
87
- (how the reasoning runs), WHAT (result with units), CHECK (how it is
88
- verified, or what would falsify it). Any section failing one of the four is
89
- flagged as incomplete and the round is NOT presented for verdict until fixed.
90
- The self-check is a human-facing declaration: the user decides whether the
91
- exposition is actually sufficient. This is the quality gate; the machine
92
- gates above only guarantee existence and structure.
93
-
94
- ### Per-round digest (after EVERY attempt round)
95
-
96
- ```text
97
- ## Attempt N 摘要
98
- 问题重述:<1-2 sentences, current subproblem>
99
- 问题分析:<2-4 sentences, this round's inputs/insights/delta vs last round>
100
- 模型假设:<沿用 X 条 + 新增 Y 条 + 修订 Z 条;修订注明原因;重中之中,不得省略>
101
- 模型建立与求解:<core equations + method + key numbers>
102
- 验证:<obligations ✓/✗ + evidence levels + most important failure>
103
- 鲁棒性:<this round's sensitivity results, or "未覆盖,计划在 attempt M">
104
- 评价与改进:<candidate comparison / limitations / next improvement>
105
- 参考文献:<new citations or "无新增">
106
- ```
107
-
108
- Rules:
109
- - The restatement is frozen after intake; analysis and assumptions ROLL FORWARD
110
- per subproblem and per round (they change, and the digest shows the delta).
111
- - Private chain-of-thought is never shown; only auditable content.
112
- - The digest is a hard requirement of the round contract: a round whose digest
113
- is missing does not count as a completed round.
114
-
115
- ## Cleanup checklist (before ANY terminal transition)
116
-
117
- 1. attempts/<n>/code holds only final reproducible scripts with header comments.
118
- 2. Exploratory/buggy code is moved to _drafts/ or failed/code-drafts/ — never deleted.
119
- 3. No debug prints or machine-specific hardcoded paths.
120
- 4. figures → plots/, tables → data/, deliverable at run root.
121
- 5. reproducibility.json matches the final scripts.
122
- 6. run-state validate passes; every obligation has a terminal status.
1
+ # Report Contract
2
+
3
+ ## Attempt report
4
+
5
+ Every attempt report contains exactly:
6
+
7
+ 1. one round objective;
8
+ 2. candidate/direction;
9
+ 3. assumption delta;
10
+ 4. claims changed;
11
+ 5. actual execution or derivation artifacts;
12
+ 6. new evidence IDs;
13
+ 7. obligations closed;
14
+ 8. issues opened and closed;
15
+ 9. delta from prior attempt;
16
+ 10. valid-progress decision;
17
+ 11. budget usage;
18
+ 12. current status;
19
+ 13. one next action.
20
+
21
+ Do not copy full prior solutions or private reasoning.
22
+
23
+ ## Terminal report
24
+
25
+ State the frozen question, final scientific status, answer/recommendation, verified claims and evidence links, conditional/unresolved claims, assumptions and sensitivity, candidate comparison, data and parameter sources, validation, failure cases, limitations, reproducibility commands, and resume conditions when non-SOLVED.
26
+
27
+ 整体感 requirement (v0.3): the terminal report is ONE narrative, not a
28
+ concatenation of sub-question reports — it must show the question-dependency
29
+ chain (which model fed which), the shared global assumptions, and the
30
+ cross-sub-question consistency checks. A reader must be able to see the whole
31
+ problem as one connected argument.
32
+
33
+ ## Chat display — the runlog digest (MUST output, v2.7)
34
+
35
+ The following is shown DIRECTLY IN THE CHAT, not only on disk.
36
+
37
+ ### Readability standard — write for a human reader, never a bullet list
38
+
39
+ Every section is an EXPOSITION, not a summary: state WHY the step is taken,
40
+ HOW the reasoning runs (derivation, mechanism, first-principles chain), WHAT
41
+ came out (numbers with units), and HOW it is checked. A reader who knows
42
+ nothing about the problem must be able to follow each section without
43
+ guessing.
44
+
45
+ Style: step-by-step numbered exposition with plain direct language (this is
46
+ a working document, not a final paper — no paper-style formal phrasing
47
+ required), but with MORE detail than a paper would carry: every parameter
48
+ choice gets its reason, every formula is followed by a plain-language
49
+ explanation of each symbol, every step ends with a transition line
50
+ ("这一步保证了…,为下一步…做好准备"), and every conclusion states what it
51
+ would take to be wrong. Minimum expectations per section:
52
+
53
+ - 问题重述:restate the question in your own words, explaining every
54
+ parameter's meaning and where it comes from in the problem text.
55
+ - 问题分析:walk the physical/geometric mechanism step by step (e.g. why the
56
+ nodes move radially, how the focal geometry pins the paraboloid), each
57
+ step justified by problem text, data, or derivation.
58
+ - 模型假设:for EVERY assumption give the reason it is justified
59
+ (original wording / data statistic / derivation / literature) and what
60
+ happens if it fails.
61
+ - 模型建立与求解:write the derivation in full (equations, variable
62
+ definitions, units, how the equation is solved, numerical method and why
63
+ it was chosen), not just the final formula.
64
+ - 验证:explain the verification LOGIC for each obligation (what would
65
+ falsify it, what tolerance is used and why), then the outcome.
66
+ - 鲁棒性:for each perturbation say what was varied, why that parameter,
67
+ and what would count as a conclusion flip.
68
+ - 评价与改进 / 参考文献:state the comparison criterion and map each
69
+ reference to the exact method it supports.
70
+
71
+ ### Intake digest (once, at intake completion) — the six-section deep restatement
72
+
73
+ 【题目要点摘录】the problem's own numbers and constraints, quoted, each explained
74
+ 【背景解读】engineering/physical mechanism, walked through
75
+ 【数据语义】every attachment column by column (meaning/units/coordinate system/magnitudes), with observed statistics
76
+ 【隐含信息与歧义清单】numbered; each = LLM reading + derivation/basis + risk (the user corrects entries here)
77
+ 【各子问题数学本质判定】every sub-question (any count) classified + why
78
+ 【待澄清问题】open questions inviting user background/corrections/references
79
+
80
+ After the D0 exchange, show the delta applied to problem-brief.md.
81
+
82
+ ### Quality self-check (MUST run before every D4 verdict)
83
+
84
+ Before presenting a D4 verdict, run the self-check on the current attempt's
85
+ report and show the result in the chat: for each of the eight digest sections,
86
+ confirm whether it answers all four questions — WHY (why this step), HOW
87
+ (how the reasoning runs), WHAT (result with units), CHECK (how it is
88
+ verified, or what would falsify it). Any section failing one of the four is
89
+ flagged as incomplete and the round is NOT presented for verdict until fixed.
90
+ The self-check is a human-facing declaration: the user decides whether the
91
+ exposition is actually sufficient. This is the quality gate; the machine
92
+ gates above only guarantee existence and structure.
93
+
94
+ ### Per-round digest (after EVERY attempt round)
95
+
96
+ ```text
97
+ ## Attempt N 摘要
98
+ 问题重述:<1-2 sentences, current subproblem>
99
+ 问题分析:<2-4 sentences, this round's inputs/insights/delta vs last round>
100
+ 模型假设:<沿用 X 条 + 新增 Y 条 + 修订 Z 条;修订注明原因;重中之中,不得省略>
101
+ 模型建立与求解:<core equations + method + key numbers>
102
+ 验证:<obligations ✓/✗ + evidence levels + most important failure>
103
+ 鲁棒性:<this round's sensitivity results, or "未覆盖,计划在 attempt M">
104
+ 评价与改进:<candidate comparison / limitations / next improvement>
105
+ 参考文献:<new citations or "无新增">
106
+ ```
107
+
108
+ Rules:
109
+ - The restatement is frozen after intake; analysis and assumptions ROLL FORWARD
110
+ per subproblem and per round (they change, and the digest shows the delta).
111
+ - Private chain-of-thought is never shown; only auditable content.
112
+ - The digest is a hard requirement of the round contract: a round whose digest
113
+ is missing does not count as a completed round.
114
+
115
+ ## Cleanup checklist (before ANY terminal transition)
116
+
117
+ 1. attempts/<n>/code holds only final reproducible scripts with header comments.
118
+ 2. Exploratory/buggy code is moved to _drafts/ or failed/code-drafts/ — never deleted.
119
+ 3. No debug prints or machine-specific hardcoded paths.
120
+ 4. figures → plots/, tables → data/, deliverable at run root.
121
+ 5. reproducibility.json matches the final scripts.
122
+ 6. run-state validate passes; every obligation has a terminal status.
123
+
124
+ ## v0.5 machine contract
125
+
126
+ Every attempt report contains the nine scientific sections in this order: 问题重述、问题分析、模型假设、符号说明、模型建立与求解、验证、鲁棒性分析、模型的评价与改进、参考文献. The existing 13 administrative fields remain front matter and are not a substitute for scientific exposition.
127
+
128
+ The report validator emits section coverage, WHY/HOW/WHAT/CHECK diagnostics, symbol errors, unsupported claim language, evidence references and requirement coverage. Missing or stale requirement coverage blocks report/evaluation/terminal transitions; partial coverage may only produce CONDITIONAL.
129
+
130
+ The paper-evidence directory is an evidence package, not a silently generated manuscript. Every section cites claim/evidence IDs and preserves limitations, failures and unresolved scope.
@@ -1,62 +1,65 @@
1
- # Run Directory Contract (v2)
2
-
3
- The run directory is the ONLY place work artifacts live. It must stay clean at
4
- every moment, not only at the end.
5
-
6
- ## Layout
7
-
8
- ```text
9
- math-modeling-runs/<task-id>/
10
- ├── run.json ledger.json events.jsonl # run-state files (only run-state.mjs writes them)
11
- ├── problem-brief.md inputs.json # frozen restatement + input manifest
12
- ├── attempts/<n>/
13
- ├── report.md # 13-section contract + 8-section digest
14
- ├── code/ # final reproducible scripts ONLY (clean)
15
- │ ├── data/ # results: json/csv/npy/xlsx
16
- │ ├── plots/ # figures
17
- └── _drafts/ # this attempt's exploratory code (kept, isolated)
18
- ├── failed/
19
- ├── directions/<id>/ # direction-level failures: wall memo + code + why
20
- ├── code-drafts/<attempt>-<name>/ # implementation-level failures: buggy/timed-out/deprecated
21
- └── issues.md # failure ledger index (see below)
22
- ├── research/ # literature (only when research happened)
23
- ├── walls/ # breakthrough memos (legacy path kept)
24
- ├── result.xlsx # the deliverable (when the problem asks for one)
25
- ├── reproducibility.json # final command list + env + hashes
26
- └── final-report.md # terminal report
27
- ```
28
-
29
- ## Failure classification (failure ledger)
30
-
31
- Every problem in ANY stage is recorded in `failed/issues.md` with:
32
-
33
- ```text
34
- #<seq> | 环节(DATA/TOOL/IMPLEMENTATION/MODEL/VALIDATION/EVIDENCE/RESEARCH_GAP) | 发现时间/attempt
35
- 症状:…
36
- 根因:…
37
- 处置:修了/绕过/放弃(→wall memo id)
38
- 影响:哪些 claim/obligation 被污染,下游如何重验
39
- ```
40
-
41
- Direction-level failures additionally get `failed/directions/<id>/wall.md`
42
- (target, paths tried, exact wall, wall type, breakthrough condition, restart
43
- checklist) and their code snapshot. Implementation-level failures get
44
- `failed/code-drafts/<attempt>-<name>/` with a README stating the failure.
45
-
46
- ## Cleanup gate (MUST run before ANY terminal transition)
47
-
48
- 1. attempts/<n>/code contains only the final reproducible scripts; each starts
49
- with a header comment: purpose, inputs, outputs, reproduction command.
50
- Exploratory/buggy versions move to `_drafts/` or `failed/code-drafts/` — never deleted.
51
- 2. No debug prints, unused variables, or hardcoded machine-specific paths
52
- (the data-root constant is the only allowed absolute path).
53
- 3. Figures in `plots/`, tables in `data/`; the deliverable at the run root.
54
- 4. reproducibility.json is complete and matches the final scripts.
55
- 5. `run-state.mjs validate <dir>` passes and every obligation has a terminal status.
56
- 6. The cleanup itself is noted in the terminal transition reason.
57
-
58
- ## Tidiness invariants
59
-
60
- - Code is refactored as soon as it stabilizes within an attempt (not only at the end).
61
- - Every script file maps 1:1 to an attempt artifact or a final deliverable.
62
- - Nothing outside the run directory is written by the modeling work.
1
+ # Run Directory Contract (v2)
2
+
3
+ The run directory is the ONLY place work artifacts live. It must stay clean at
4
+ every moment, not only at the end.
5
+ - After intake, calculations read only inputs/raw and inputs/manifest.json. External source paths are provenance only; source changes are diagnostic and do not alter the frozen snapshot.
6
+
7
+ ## Layout
8
+
9
+ ```text
10
+ math-modeling-runs/<task-id>/
11
+ ├── run.json ledger.json events.jsonl # run-state files (only run-state.mjs writes them)
12
+ ├── problem-brief.md inputs.json # frozen restatement + input manifest
13
+ ├── inputs/raw/ inputs/manifest.json # immutable source snapshot + hashes
14
+ ├── attempts/<n>/
15
+ │ ├── report.md # 13-section contract + 8-section digest
16
+ │ ├── code/ # final reproducible scripts ONLY (clean)
17
+ ├── data/ # results: json/csv/npy/xlsx
18
+ ├── plots/ # figures
19
+ └── _drafts/ # this attempt's exploratory code (kept, isolated)
20
+ ├── failed/
21
+ ├── directions/<id>/ # direction-level failures: wall memo + code + why
22
+ ├── code-drafts/<attempt>-<name>/ # implementation-level failures: buggy/timed-out/deprecated
23
+ ├── failures.jsonl # structured failure records
24
+ │ └── issues.md # failure ledger index (see below)
25
+ ├── research/ # literature (only when research happened)
26
+ ├── walls/ # breakthrough memos (legacy path kept)
27
+ ├── result.xlsx # the deliverable (when the problem asks for one)
28
+ ├── reproducibility.json # final command list + env + hashes
29
+ └── final-report.md # terminal report
30
+ ```
31
+
32
+ ## Failure classification (failure ledger)
33
+
34
+ Every problem in ANY stage is recorded in failed/failures.jsonl and indexed in failed/issues.md with:
35
+
36
+ ```text
37
+ #<seq> | 环节(DATA/TOOL/IMPLEMENTATION/MODEL/VALIDATION/EVIDENCE/RESEARCH_GAP) | 发现时间/attempt
38
+ 症状:…
39
+ 根因:…
40
+ 处置:修了/绕过/放弃(→wall memo id)
41
+ 影响:哪些 claim/obligation 被污染,下游如何重验
42
+ ```
43
+
44
+ Direction-level failures additionally get `failed/directions/<id>/wall.md`
45
+ (target, paths tried, exact wall, wall type, breakthrough condition, restart
46
+ checklist) and their code snapshot. Implementation-level failures get
47
+ `failed/code-drafts/<attempt>-<name>/` with a README stating the failure.
48
+
49
+ ## Cleanup gate (MUST run before ANY terminal transition)
50
+
51
+ 1. attempts/<n>/code contains only the final reproducible scripts; each starts
52
+ with a header comment: purpose, inputs, outputs, reproduction command.
53
+ Exploratory/buggy versions move to `_drafts/` or `failed/code-drafts/` never deleted.
54
+ 2. No debug prints, unused variables, or hardcoded machine-specific paths
55
+ (the data-root constant is the only allowed absolute path).
56
+ 3. Figures in `plots/`, tables in `data/`; the deliverable at the run root.
57
+ 4. reproducibility.json is complete and matches the final scripts.
58
+ 5. `run-state.mjs validate <dir>` passes and every obligation has a terminal status.
59
+ 6. The cleanup itself is noted in the terminal transition reason.
60
+
61
+ ## Tidiness invariants
62
+
63
+ - Code is refactored as soon as it stabilizes within an attempt (not only at the end).
64
+ - Every script file maps 1:1 to an attempt artifact or a final deliverable.
65
+ - Nothing outside the run directory is written by the modeling work.
@@ -7,8 +7,9 @@ produce reports and evidence. Never let a subagent mutate run-state directly.
7
7
 
8
8
  | Class | Role (lineage) | When | Count |
9
9
  |---|---|---|---|
10
- | explorer | parallel candidate exploration (legacy Modeler) | CANDIDATES_READY, >= 2 independent directions | 1 per direction |
11
- | verifier | blind re-verification (legacy Analyzer/Correction) | before terminal: key numeric/feasibility claims | Standard: 1 per task; High-Assurance: 1 per claim |
10
+ | explorer | parallel candidate exploration (original Modeler lineage) | CANDIDATES_READY, >= 2 independent directions | 1 per direction |
11
+ | verifier | blind re-verification (original Analyzer lineage) | before terminal: key numeric/feasibility claims | Standard: 1 per task; High-Assurance: 1 per claim |
12
+ | corrector | apply accepted critique and produce the next attempt (original Correction lineage) | after a failed/conditional verdict | 1 per selected direction |
12
13
  | auditor | artifact-only audit (math-modeling-audit skill) | before SOLVED | High-Assurance: mandatory; else optional |
13
14
 
14
15
  ## Brief template (self-contained; subagents see no parent context)
@@ -22,6 +22,17 @@ e.g. "本阶段用 Python+OSQP 做约束优化;Wolfram 对本题非必需,
22
22
  The problem never silently depends on a single tool: every phase names its
23
23
  backend, its fallback, and the degradation path when the backend fails.
24
24
 
25
+ ## Computation backend extension
26
+
27
+ Before selecting an external computation backend, run
28
+ `scripts/computation/probe_backends.py` (or its PowerShell compatibility entry)
29
+ and use only the live capability result. Persist a backend snapshot with
30
+ `scripts/computation/backend_inventory.py` and an explicit run-local
31
+ `--state-file` when the phase needs a stable inventory. Use
32
+ `scripts/computation/computation_record.py` for reproducible/file or
33
+ high-assurance computation. A probe, inventory, or record validation does not
34
+ prove a mathematical claim.
35
+
25
36
  ## Python
26
37
 
27
38
  Use `scripts/python-environment.mjs`. Prefer uv, then an existing Python runtime plus venv. Keep the environment under the run directory. Install only required normalized PyPI package names; VCS URLs, local wheels, or arbitrary indexes require explicit user approval. Record lock, seed, command, workdir, timeout, stdout/stderr, exit code, and generated files.
@@ -0,0 +1,43 @@
1
+ # Verification Recipes (v0.5)
2
+
3
+ Recipes are selected by claim type before a phase can advance. A verification verdict is local to one recipe; it does not directly set an obligation or claim verdict.
4
+
5
+ ## Status layers
6
+
7
+ - Verification: PASS, FAIL, INCONCLUSIVE, NOT_RUN.
8
+ - Obligation: OPEN, SATISFIED, BLOCKED, WAIVED, STALE.
9
+ - Claim: SUPPORTED, CONDITIONAL, INCONCLUSIVE, REFUTED, STALE.
10
+ - Run: lifecycle state such as VERIFY, EVALUATE, REVISE, CONDITIONAL or SOLVED.
11
+
12
+ ## Recipes
13
+
14
+ | Recipe | Required checks | Typical claim |
15
+ |---|---|---|
16
+ | data | schema, ids, references, hash, independent-parser | attachment/data interpretation |
17
+ | numeric | recompute, domain, strict, tolerance, counterexample | numeric value or formula |
18
+ | feasibility | all-constraints, actual-output, strict-and-tolerance | optimization/engineering feasibility |
19
+ | optimization | objective-scope, coverage, initialization, local-global-label | best-found or optimum claim |
20
+ | simulation | baseline, bounds, sampling, independent-implementation | simulation/ratio |
21
+ | report | nine-sections, why-how-what-check, coverage, symbols, citations | paper/report completeness |
22
+ | reproducibility | snapshot, command, environment, hash, clean-rerun | reproduction |
23
+ | branch-coverage | candidate-enumeration, branch-switch | branch stability |
24
+
25
+ ## Independence rule
26
+
27
+ Two checks count separately only when their calculation path or code provenance differs. Reusing a deterministic result, solver-internal result, branch summary, derived artifact, code path, or reprint does not create a second independent verification. The runner records an independenceKey and rejects duplicate or summary-derived keys.
28
+
29
+ ## Numeric and output rules
30
+
31
+ A numeric recipe reports strict and tolerance outcomes separately. A display format is not numeric quantization. When an output is rounded, the quantized values are generated first and every original hard constraint is rerun on the quantized artifact.
32
+
33
+ ## Branch rules
34
+
35
+ If a declared four-branch problem executes only one branch, the recipe returns or raises branch-switch-not-tested; branch_changed=false is not evidence of stability. Branch ranking from an existing solver summary is only a consistency check, not an independent rerun.
36
+
37
+ ## Benchmark rule
38
+
39
+ An expensive recipe must carry a PASS benchmark artifact before full execution. The benchmark records command, input subset, expected time, environment, stdout/stderr and exit code. Missing or failed benchmark evidence blocks the expensive recipe.
40
+
41
+ ## Scope rule
42
+
43
+ If a required check was not executed, the recipe is INCONCLUSIVE. If the user explicitly waives the check, the result is WAIVED and may only contribute to a CONDITIONAL run.
@@ -8,7 +8,7 @@
8
8
 
9
9
  ## States
10
10
 
11
- TRIAGE → SCOPE_FROZEN → INPUT_PROFILED → CLAIMS_REGISTERED → CANDIDATES_READY → ATTEMPT → EXECUTE → VERIFY.
11
+ TRIAGE → RESEARCH → SCOPE_FROZEN → INPUT_PROFILED → CLAIMS_REGISTERED → CANDIDATES_READY → ATTEMPT → EXECUTE → VERIFY.
12
12
 
13
13
  VERIFY may move to REVISE, RESEARCH, FORK, an independent audit, or one terminal status:
14
14
  SOLVED, PARTIAL, CONDITIONAL, INCONCLUSIVE, REFUTED, INFEASIBLE, UNIDENTIFIABLE, BLOCKED, CANCELLED.
@@ -19,16 +19,17 @@ SOLVED, PARTIAL, CONDITIONAL, INCONCLUSIVE, REFUTED, INFEASIBLE, UNIDENTIFIABLE,
19
19
  - **逐问层**(SPi 循环):子问题分析 → 子问题假设 Si(D2-SPi)→ ATTEMPT 建模求解 → VERIFY 该问验证 → 该问鲁棒性(扰动计划→交互→执行)→ D4 裁决 → REVISE(本问修订)或进入 SPi+1(reason: "SPi 完成,进入 SPi+1")。
20
20
  - **收束层**:跨问联动检查(终态 gate 校验全部子问题 DONE + 依赖满足)→ 全题鲁棒性汇总 → 终态硬门 → SOLVED + final-report(整体叙事,非拼凑)。
21
21
 
22
- ## Pre-modeling literature research (v2.6, mandatory)
22
+ ## Pre-modeling literature research (mandatory)
23
23
 
24
- CLAIMS_REGISTERED → RESEARCH → CANDIDATES_READY. Before any candidate is
25
- built, run the D-R exchange (interaction-protocol.md): search principles and
26
- methods by direction, write research/sources.jsonl, attach a literature column
27
- to the candidate matrix. Every direction must be traceable to at least one
28
- source engineering background, methodology paper, textbook, or official
29
- documentation; a literature-free direction must be explicitly marked
24
+ TRIAGE → RESEARCH → D-R → SCOPE_FROZEN. After the initial task triage and
25
+ before D0 restatement is frozen, run the D-R exchange
26
+ (interaction-protocol.md): search principles, engineering background, and
27
+ methods by direction; write research/sources.jsonl; attach a literature
28
+ column to the candidate matrix. Every direction must be traceable to at least
29
+ one source. A literature-free direction must be explicitly marked
30
30
  "原创方向" with its derivation basis. Never search for solutions to the
31
- specific contest problem.
31
+ specific contest problem. Mid-solve evidence gaps use a recorded
32
+ RESEARCH backtrack, not an implicit bypass of the initial research phase.
32
33
 
33
34
  ## Interaction gates (v2)
34
35