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.
- package/README.md +247 -172
- package/package.json +34 -34
- package/skills/math-modeling-agent/SKILL.md +70 -56
- package/skills/math-modeling-agent/references/claims-evidence.md +53 -41
- package/skills/math-modeling-agent/references/interaction-protocol.md +165 -163
- package/skills/math-modeling-agent/references/original-project-parity.md +19 -0
- package/skills/math-modeling-agent/references/report-contract.md +130 -122
- package/skills/math-modeling-agent/references/run-directory.md +65 -62
- package/skills/math-modeling-agent/references/subagent-dispatch.md +3 -2
- package/skills/math-modeling-agent/references/tool-policy.md +11 -0
- package/skills/math-modeling-agent/references/verification-recipes.md +43 -0
- package/skills/math-modeling-agent/references/workflow.md +10 -9
- package/skills/math-modeling-agent/schemas/attempt.schema.json +89 -70
- package/skills/math-modeling-agent/schemas/evidence.schema.json +110 -0
- package/skills/math-modeling-agent/schemas/failure.schema.json +30 -0
- package/skills/math-modeling-agent/schemas/ledger.schema.json +88 -68
- package/skills/math-modeling-agent/schemas/run.schema.json +126 -102
- package/skills/math-modeling-agent/schemas/verification.schema.json +60 -0
- package/skills/math-modeling-agent/scripts/computation/README.md +20 -0
- package/skills/math-modeling-agent/scripts/computation/backend-inventory.schema.json +78 -0
- package/skills/math-modeling-agent/scripts/computation/backend_inventory.ps1 +351 -0
- package/skills/math-modeling-agent/scripts/computation/backend_inventory.py +322 -0
- package/skills/math-modeling-agent/scripts/computation/computation_record.py +361 -0
- package/skills/math-modeling-agent/scripts/computation/probe_backends.ps1 +396 -0
- package/skills/math-modeling-agent/scripts/computation/probe_backends.py +230 -0
- package/skills/math-modeling-agent/scripts/correction-lineage.mjs +78 -0
- package/skills/math-modeling-agent/scripts/distribution-parity.mjs +123 -0
- package/skills/math-modeling-agent/scripts/evidence-store.mjs +349 -0
- package/skills/math-modeling-agent/scripts/failure-insights.mjs +79 -0
- package/skills/math-modeling-agent/scripts/input-snapshot.mjs +98 -0
- package/skills/math-modeling-agent/scripts/ledger-mutation.mjs +82 -0
- package/skills/math-modeling-agent/scripts/migration-v3.mjs +31 -0
- package/skills/math-modeling-agent/scripts/output-integrity.mjs +82 -0
- package/skills/math-modeling-agent/scripts/paper-evidence.mjs +45 -0
- package/skills/math-modeling-agent/scripts/report-contract.mjs +112 -0
- package/skills/math-modeling-agent/scripts/run-state.mjs +829 -707
- package/skills/math-modeling-agent/scripts/verification-recipes.mjs +52 -0
- package/skills/math-modeling-agent/scripts/verification-runner.mjs +8 -0
- package/skills/math-modeling-audit/SKILL.md +41 -41
- package/skills/math-modeling-audit/references/mcm-icm-final-judge.md +335 -331
- package/skills/math-modeling-audit/scripts/mcm-score.mjs +293 -218
- package/skills/math-modeling-audit/scripts/paper-final-review.mjs +40 -0
- package/skills/math-modeling-audit/scripts/project-initial-review.mjs +41 -0
|
@@ -1,102 +1,126 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/yohanchen1/MathModelingAgent/schemas/run.schema.json",
|
|
4
|
-
"title": "Math Modeling Run",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"required": [
|
|
8
|
-
"schemaVersion",
|
|
9
|
-
"taskId",
|
|
10
|
-
"mode",
|
|
11
|
-
"status",
|
|
12
|
-
"eventSequence",
|
|
13
|
-
"currentAttempt",
|
|
14
|
-
"bestCandidateId",
|
|
15
|
-
"budget",
|
|
16
|
-
"createdAt",
|
|
17
|
-
"updatedAt"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/yohanchen1/MathModelingAgent/schemas/run.schema.json",
|
|
4
|
+
"title": "Math Modeling Run",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"taskId",
|
|
10
|
+
"mode",
|
|
11
|
+
"status",
|
|
12
|
+
"eventSequence",
|
|
13
|
+
"currentAttempt",
|
|
14
|
+
"bestCandidateId",
|
|
15
|
+
"budget",
|
|
16
|
+
"createdAt",
|
|
17
|
+
"updatedAt",
|
|
18
|
+
"lineageId",
|
|
19
|
+
"parentRunId",
|
|
20
|
+
"revision",
|
|
21
|
+
"inputSnapshotHash",
|
|
22
|
+
"evidenceGraphHash"
|
|
23
|
+
],
|
|
24
|
+
"properties": {
|
|
25
|
+
"schemaVersion": {
|
|
26
|
+
"const": 3
|
|
27
|
+
},
|
|
28
|
+
"taskId": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
31
|
+
},
|
|
32
|
+
"mode": {
|
|
33
|
+
"enum": [
|
|
34
|
+
"fast",
|
|
35
|
+
"standard",
|
|
36
|
+
"high-assurance"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"status": {
|
|
40
|
+
"enum": [
|
|
41
|
+
"TRIAGE",
|
|
42
|
+
"SCOPE_FROZEN",
|
|
43
|
+
"INPUT_PROFILED",
|
|
44
|
+
"CLAIMS_REGISTERED",
|
|
45
|
+
"CANDIDATES_READY",
|
|
46
|
+
"ATTEMPT",
|
|
47
|
+
"EXECUTE",
|
|
48
|
+
"VERIFY",
|
|
49
|
+
"EVALUATE",
|
|
50
|
+
"CORRECTION_REQUIRED",
|
|
51
|
+
"REVISE",
|
|
52
|
+
"RESEARCH",
|
|
53
|
+
"FORK",
|
|
54
|
+
"SOLVED",
|
|
55
|
+
"PARTIAL",
|
|
56
|
+
"CONDITIONAL",
|
|
57
|
+
"INCONCLUSIVE",
|
|
58
|
+
"REFUTED",
|
|
59
|
+
"INFEASIBLE",
|
|
60
|
+
"UNIDENTIFIABLE",
|
|
61
|
+
"BLOCKED",
|
|
62
|
+
"CANCELLED"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"eventSequence": {
|
|
66
|
+
"type": "integer",
|
|
67
|
+
"minimum": 0
|
|
68
|
+
},
|
|
69
|
+
"currentAttempt": {
|
|
70
|
+
"type": "integer",
|
|
71
|
+
"minimum": 0
|
|
72
|
+
},
|
|
73
|
+
"bestCandidateId": {
|
|
74
|
+
"type": [
|
|
75
|
+
"string",
|
|
76
|
+
"null"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"budget": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"required": [
|
|
83
|
+
"attempts",
|
|
84
|
+
"researchQueries",
|
|
85
|
+
"computeSeconds"
|
|
86
|
+
],
|
|
87
|
+
"properties": {
|
|
88
|
+
"attempts": {
|
|
89
|
+
"type": "integer",
|
|
90
|
+
"minimum": 1
|
|
91
|
+
},
|
|
92
|
+
"researchQueries": {
|
|
93
|
+
"type": "integer",
|
|
94
|
+
"minimum": 0
|
|
95
|
+
},
|
|
96
|
+
"computeSeconds": {
|
|
97
|
+
"type": "integer",
|
|
98
|
+
"minimum": 0
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"createdAt": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"updatedAt": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
"lineageId": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"minLength": 1
|
|
111
|
+
},
|
|
112
|
+
"parentRunId": {
|
|
113
|
+
"type": ["string", "null"]
|
|
114
|
+
},
|
|
115
|
+
"revision": {
|
|
116
|
+
"type": "integer",
|
|
117
|
+
"minimum": 0
|
|
118
|
+
},
|
|
119
|
+
"inputSnapshotHash": {
|
|
120
|
+
"type": ["string", "null"]
|
|
121
|
+
},
|
|
122
|
+
"evidenceGraphHash": {
|
|
123
|
+
"type": ["string", "null"]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/yohanchen1/MathModelingAgent/schemas/verification.schema.json",
|
|
4
|
+
"title": "Math Modeling Verification",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"id",
|
|
9
|
+
"recipeId",
|
|
10
|
+
"evidenceIds",
|
|
11
|
+
"verdict",
|
|
12
|
+
"independenceKey"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"minLength": 1
|
|
18
|
+
},
|
|
19
|
+
"recipeId": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1
|
|
22
|
+
},
|
|
23
|
+
"evidenceIds": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"minItems": 1,
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"verdict": {
|
|
32
|
+
"enum": [
|
|
33
|
+
"PASS",
|
|
34
|
+
"FAIL",
|
|
35
|
+
"INCONCLUSIVE",
|
|
36
|
+
"NOT_RUN"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"independenceKey": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"minLength": 1
|
|
42
|
+
},
|
|
43
|
+
"derivedFrom": {
|
|
44
|
+
"oneOf": [
|
|
45
|
+
{
|
|
46
|
+
"type": "string",
|
|
47
|
+
"minLength": 1
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "array",
|
|
51
|
+
"minItems": 1,
|
|
52
|
+
"items": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"minLength": 1
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# DSH computation tool extension
|
|
2
|
+
|
|
3
|
+
These entrypoints are adapted from the user-provided
|
|
4
|
+
`math-science-computation` toolkit. They are computation-support tools, not
|
|
5
|
+
mathematical engines: they discover callable external backends, persist a
|
|
6
|
+
local capability snapshot, and validate reproducible computation records.
|
|
7
|
+
|
|
8
|
+
## Entrypoints
|
|
9
|
+
|
|
10
|
+
- `probe_backends.py` / `probe_backends.ps1`: read-only discovery of
|
|
11
|
+
Wolfram/Mathematica, primecount, SageMath, Python, and Python library
|
|
12
|
+
availability. External probes are bounded and return structured failures.
|
|
13
|
+
- `backend_inventory.py` / `backend_inventory.ps1`: read or refresh a
|
|
14
|
+
capability snapshot. Pass a run-local `--state-file`/`-StateFile`; do not
|
|
15
|
+
use an implicit shared machine-wide path.
|
|
16
|
+
- `computation_record.py`: initialize or validate a reproducibility record
|
|
17
|
+
for every probeable backend, including primecount.
|
|
18
|
+
|
|
19
|
+
The external backend remains responsible for the actual mathematical
|
|
20
|
+
calculation. A successful probe or record validation is not a proof.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://local.codex.invalid/math-science-computation/backend-inventory.schema.json",
|
|
4
|
+
"title": "Math and science computation local backend inventory",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"inventory_schema_version",
|
|
8
|
+
"created_at_utc",
|
|
9
|
+
"updated_at_utc",
|
|
10
|
+
"local",
|
|
11
|
+
"mcp",
|
|
12
|
+
"invalidations"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"inventory_schema_version": { "const": "1.0" },
|
|
16
|
+
"created_at_utc": { "type": "string", "format": "date-time" },
|
|
17
|
+
"updated_at_utc": { "type": "string", "format": "date-time" },
|
|
18
|
+
"local": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": ["schema_version", "probed_at_utc", "host", "mathematica", "primecount", "sagemath", "python"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"schema_version": { "const": "1.0" },
|
|
23
|
+
"probed_at_utc": { "type": "string", "format": "date-time" },
|
|
24
|
+
"host": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"required": ["system", "architecture"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"system": { "enum": ["Windows", "Darwin", "Linux"] },
|
|
29
|
+
"architecture": { "type": "string", "minLength": 1 }
|
|
30
|
+
},
|
|
31
|
+
"additionalProperties": true
|
|
32
|
+
},
|
|
33
|
+
"mathematica": { "type": "object" },
|
|
34
|
+
"primecount": { "type": "object" },
|
|
35
|
+
"sagemath": { "type": "object" },
|
|
36
|
+
"python": { "type": "object" }
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": true
|
|
39
|
+
},
|
|
40
|
+
"mcp": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"required": ["authority", "persisted_status", "required_action"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"authority": { "const": "current_session_tool_discovery_and_call" },
|
|
45
|
+
"persisted_status": { "const": "historical_only" },
|
|
46
|
+
"required_action": { "type": "string" },
|
|
47
|
+
"mathematica": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"required": ["server_name", "protocol_version", "server_version", "wolfram_language_version", "observed_at_utc", "evidence"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"server_name": { "type": "string", "minLength": 1 },
|
|
52
|
+
"protocol_version": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" },
|
|
53
|
+
"server_version": { "type": "string", "minLength": 1 },
|
|
54
|
+
"wolfram_language_version": { "type": "string", "minLength": 1 },
|
|
55
|
+
"observed_at_utc": { "type": "string", "format": "date-time" },
|
|
56
|
+
"evidence": { "const": "initialize_handshake_and_evaluator" }
|
|
57
|
+
},
|
|
58
|
+
"additionalProperties": false
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"additionalProperties": false
|
|
62
|
+
},
|
|
63
|
+
"invalidations": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"items": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"required": ["backend", "reason", "recorded_at_utc"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"backend": { "enum": ["mathematica", "primecount", "sagemath", "python"] },
|
|
70
|
+
"reason": { "enum": ["user_requested", "path_missing", "execution_failed", "version_mismatch"] },
|
|
71
|
+
"recorded_at_utc": { "type": "string", "format": "date-time" }
|
|
72
|
+
},
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"additionalProperties": false
|
|
78
|
+
}
|