@louisultra/dsh-verymath 0.0.0-stage → 0.3.2

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 (284) hide show
  1. package/CHANGELOG.md +133 -0
  2. package/LICENSE +21 -0
  3. package/NOTICE.md +35 -0
  4. package/README.md +108 -2
  5. package/README_EN.md +105 -0
  6. package/UPSTREAM.json +106 -0
  7. package/cordis.patch.yml +12 -0
  8. package/docs/capability-examples.md +581 -0
  9. package/docs/examples/README.md +32 -0
  10. package/docs/examples/bad_scan.md +10 -0
  11. package/docs/examples/broken-proof.lean +9 -0
  12. package/docs/examples/claims.md +7 -0
  13. package/docs/examples/knapsack.json +10 -0
  14. package/docs/examples/matrix.json +1 -0
  15. package/docs/examples/points.csv +21 -0
  16. package/docs/examples/qp.json +8 -0
  17. package/docs/examples/research-ws/project/GOALS.yaml +4 -0
  18. package/docs/examples/research-ws/workstreams/ws-lsa/report.md +13 -0
  19. package/docs/examples/research-ws/workstreams/ws-lsa/reviews/r1.json +1 -0
  20. package/docs/examples/research-ws/workstreams/ws-lsa/status.yaml +1 -0
  21. package/docs/examples/source.csv +4 -0
  22. package/lib/core/error.d.ts +20 -0
  23. package/lib/core/error.js +25 -0
  24. package/lib/core/gates.d.ts +42 -0
  25. package/lib/core/gates.js +217 -0
  26. package/lib/core/glossary.d.ts +101 -0
  27. package/lib/core/glossary.js +243 -0
  28. package/lib/core/graph.d.ts +118 -0
  29. package/lib/core/graph.js +460 -0
  30. package/lib/core/index.d.ts +120 -0
  31. package/lib/core/index.js +197 -0
  32. package/lib/core/paper.d.ts +163 -0
  33. package/lib/core/paper.js +73 -0
  34. package/lib/core/paths.d.ts +2 -0
  35. package/lib/core/paths.js +12 -0
  36. package/lib/core/sage.d.ts +61 -0
  37. package/lib/core/sage.js +212 -0
  38. package/lib/core/skills.d.ts +11 -0
  39. package/lib/core/skills.js +110 -0
  40. package/lib/tool/index.d.ts +21 -0
  41. package/lib/tool/index.js +1144 -0
  42. package/package.json +92 -4
  43. package/skills/after-ocr/SKILL.md +123 -0
  44. package/skills/after-ocr/references/audit-schema.md +94 -0
  45. package/skills/after-ocr/references/error-taxonomy.md +179 -0
  46. package/skills/after-ocr/scripts/merge_audit_logs.py +329 -0
  47. package/skills/after-ocr/scripts/scan_markdown_ocr.py +350 -0
  48. package/skills/after-ocr/tests/test_scripts.py +84 -0
  49. package/skills/discover-math-problems/SKILL.md +115 -0
  50. package/skills/discover-math-problems/references/artifact-contract.md +93 -0
  51. package/skills/discover-math-problems/references/autonomous-research-protocol.md +86 -0
  52. package/skills/discover-math-problems/references/conjecture-generation-protocol.md +63 -0
  53. package/skills/discover-math-problems/references/extremal-graph-variants.md +53 -0
  54. package/skills/graph-theory-paper-reading/SKILL.md +600 -0
  55. package/skills/invariant-computation/SKILL.md +169 -0
  56. package/skills/invariant-computation/examples/invariant_summary.example.json +51 -0
  57. package/skills/invariant-computation/manifest.yaml +46 -0
  58. package/skills/invariant-computation/references/INDEX.md +20 -0
  59. package/skills/invariant-computation/references/failure_modes.md +40 -0
  60. package/skills/invariant-computation/references/method_route_map.md +177 -0
  61. package/skills/invariant-computation/references/source_notes.md +19 -0
  62. package/skills/invariant-computation/references/tool_catalog.md +65 -0
  63. package/skills/invariant-computation/references/validation_checks.md +52 -0
  64. package/skills/invariant-computation/schema/invariant_summary.schema.json +260 -0
  65. package/skills/lean-formalization/SKILL.md +111 -0
  66. package/skills/lean-formalization/lean-runtime/config/env.example +5 -0
  67. package/skills/lean-formalization/lean-runtime/config/lean_agent.example.toml +28 -0
  68. package/skills/lean-formalization/lean-runtime/config/numina_runtime.example.toml +12 -0
  69. package/skills/lean-formalization/lean-runtime/examples/smoke/LocalLeanSmoke.lean +7 -0
  70. package/skills/lean-formalization/lean-runtime/prompts/complete_sorries.md +3 -0
  71. package/skills/lean-formalization/lean-runtime/prompts/formalize_statement.md +3 -0
  72. package/skills/lean-formalization/lean-runtime/prompts/prove_theorem.md +3 -0
  73. package/skills/lean-formalization/lean-runtime/prompts/repair_lean_file.md +3 -0
  74. package/skills/lean-formalization/lean-runtime/references/backend_adapter_checklist.md +36 -0
  75. package/skills/lean-formalization/lean-runtime/references/direct_lean_workflow.md +48 -0
  76. package/skills/lean-formalization/lean-runtime/references/failure_taxonomy.md +17 -0
  77. package/skills/lean-formalization/lean-runtime/references/interactive_orchestration.md +83 -0
  78. package/skills/lean-formalization/lean-runtime/references/lean_agent_capability_map.md +116 -0
  79. package/skills/lean-formalization/lean-runtime/references/lean_lsp_mcp_adapter.md +219 -0
  80. package/skills/lean-formalization/lean-runtime/references/lean_runtime_configuration.md +92 -0
  81. package/skills/lean-formalization/lean-runtime/references/numina_reverse_analysis.md +80 -0
  82. package/skills/lean-formalization/lean-runtime/references/numina_runtime.md +41 -0
  83. package/skills/lean-formalization/lean-runtime/references/numina_subagent_troubleshooting.md +77 -0
  84. package/skills/lean-formalization/lean-runtime/references/review_checklist.md +10 -0
  85. package/skills/lean-formalization/lean-runtime/references/specialist_agent_patterns.md +65 -0
  86. package/skills/lean-formalization/lean-runtime/schemas/config.schema.json +12 -0
  87. package/skills/lean-formalization/lean-runtime/schemas/result.schema.json +33 -0
  88. package/skills/lean-formalization/lean-runtime/schemas/task.schema.json +30 -0
  89. package/skills/lean-formalization/lean-runtime/scripts/ai4m_lean.py +222 -0
  90. package/skills/lean-formalization/lean-runtime/scripts/check_lean_project.py +134 -0
  91. package/skills/lean-formalization/lean-runtime/scripts/common.py +296 -0
  92. package/skills/lean-formalization/lean-runtime/scripts/configure_lean.py +222 -0
  93. package/skills/lean-formalization/lean-runtime/scripts/detect_sorry.py +49 -0
  94. package/skills/lean-formalization/lean-runtime/scripts/direct_task.py +100 -0
  95. package/skills/lean-formalization/lean-runtime/scripts/extract_minimal_failure.py +74 -0
  96. package/skills/lean-formalization/lean-runtime/scripts/numina_runtime.py +414 -0
  97. package/skills/lean-formalization/lean-runtime/scripts/smoke_test.py +75 -0
  98. package/skills/lean-formalization/lean-runtime/scripts/tool_status.py +79 -0
  99. package/skills/lean-formalization/lean-runtime/scripts/validate_patch.py +81 -0
  100. package/skills/lean-formalization/lean-runtime/scripts/verify_delivery.py +484 -0
  101. package/skills/lean-formalization/lean-runtime/tests/fixtures/after_bad.lean +4 -0
  102. package/skills/lean-formalization/lean-runtime/tests/fixtures/after_statement_changed.lean +4 -0
  103. package/skills/lean-formalization/lean-runtime/tests/fixtures/before.lean +4 -0
  104. package/skills/lean-formalization/lean-runtime/tests/fixtures/failure.lean +7 -0
  105. package/skills/lean-formalization/lean-runtime/tests/test_check_lean_project.py +59 -0
  106. package/skills/lean-formalization/lean-runtime/tests/test_cli.py +377 -0
  107. package/skills/lean-formalization/lean-runtime/tests/test_common_config.py +84 -0
  108. package/skills/lean-formalization/lean-runtime/tests/test_configure_lean.py +138 -0
  109. package/skills/lean-formalization/lean-runtime/tests/test_detect_sorry.py +24 -0
  110. package/skills/lean-formalization/lean-runtime/tests/test_direct_task.py +69 -0
  111. package/skills/lean-formalization/lean-runtime/tests/test_numina_runtime.py +168 -0
  112. package/skills/lean-formalization/lean-runtime/tests/test_validate_patch.py +29 -0
  113. package/skills/lean-setup/SKILL.md +99 -0
  114. package/skills/least-squares/README.md +85 -0
  115. package/skills/least-squares/SKILL.md +613 -0
  116. package/skills/least-squares/examples.md +380 -0
  117. package/skills/math-beamer/SKILL.md +325 -0
  118. package/skills/math-beamer/references/build-and-layout-audit.md +63 -0
  119. package/skills/math-beamer/references/math-domain-patterns.md +56 -0
  120. package/skills/math-beamer/references/template-policy.md +43 -0
  121. package/skills/math-beamer/references/template-source-index.md +51 -0
  122. package/skills/math-beamer/templates/catalog.yaml +235 -0
  123. package/skills/math-beamer/templates/packs/algebra-number-theory-talk/main.tex +45 -0
  124. package/skills/math-beamer/templates/packs/algebra-number-theory-talk/template.yaml +9 -0
  125. package/skills/math-beamer/templates/packs/algorithm-talk/main.tex +43 -0
  126. package/skills/math-beamer/templates/packs/algorithm-talk/template.yaml +9 -0
  127. package/skills/math-beamer/templates/packs/analysis-core-talk/main.tex +49 -0
  128. package/skills/math-beamer/templates/packs/analysis-core-talk/template.yaml +19 -0
  129. package/skills/math-beamer/templates/packs/backup-heavy-talk/main.tex +40 -0
  130. package/skills/math-beamer/templates/packs/backup-heavy-talk/template.yaml +9 -0
  131. package/skills/math-beamer/templates/packs/beamerposter-a0/main.tex +45 -0
  132. package/skills/math-beamer/templates/packs/beamerposter-a0/template.yaml +12 -0
  133. package/skills/math-beamer/templates/packs/combinatorics-graph-talk/main.tex +53 -0
  134. package/skills/math-beamer/templates/packs/combinatorics-graph-talk/template.yaml +18 -0
  135. package/skills/math-beamer/templates/packs/control-systems-talk/main.tex +51 -0
  136. package/skills/math-beamer/templates/packs/control-systems-talk/template.yaml +18 -0
  137. package/skills/math-beamer/templates/packs/course-lecture-zh/main.tex +43 -0
  138. package/skills/math-beamer/templates/packs/course-lecture-zh/template.yaml +9 -0
  139. package/skills/math-beamer/templates/packs/data-experiment-results/main.tex +45 -0
  140. package/skills/math-beamer/templates/packs/data-experiment-results/template.yaml +9 -0
  141. package/skills/math-beamer/templates/packs/dynamical-systems-talk/main.tex +42 -0
  142. package/skills/math-beamer/templates/packs/dynamical-systems-talk/template.yaml +9 -0
  143. package/skills/math-beamer/templates/packs/geometry-topology-talk/main.tex +43 -0
  144. package/skills/math-beamer/templates/packs/geometry-topology-talk/template.yaml +9 -0
  145. package/skills/math-beamer/templates/packs/information-coding-crypto-talk/main.tex +49 -0
  146. package/skills/math-beamer/templates/packs/information-coding-crypto-talk/template.yaml +18 -0
  147. package/skills/math-beamer/templates/packs/logic-foundations-category-talk/main.tex +51 -0
  148. package/skills/math-beamer/templates/packs/logic-foundations-category-talk/template.yaml +18 -0
  149. package/skills/math-beamer/templates/packs/numerical-analysis-talk/main.tex +51 -0
  150. package/skills/math-beamer/templates/packs/numerical-analysis-talk/template.yaml +9 -0
  151. package/skills/math-beamer/templates/packs/optimization-talk/main.tex +58 -0
  152. package/skills/math-beamer/templates/packs/optimization-talk/template.yaml +9 -0
  153. package/skills/math-beamer/templates/packs/pde-analysis-talk/main.tex +49 -0
  154. package/skills/math-beamer/templates/packs/pde-analysis-talk/template.yaml +9 -0
  155. package/skills/math-beamer/templates/packs/probability-statistics-talk/main.tex +52 -0
  156. package/skills/math-beamer/templates/packs/probability-statistics-talk/template.yaml +9 -0
  157. package/skills/math-beamer/templates/packs/reading-group-paper/main.tex +46 -0
  158. package/skills/math-beamer/templates/packs/reading-group-paper/template.yaml +9 -0
  159. package/skills/math-beamer/templates/packs/seminar-minimal-en/main.tex +60 -0
  160. package/skills/math-beamer/templates/packs/seminar-minimal-en/template.yaml +13 -0
  161. package/skills/math-beamer/templates/packs/seminar-minimal-zh/main.tex +60 -0
  162. package/skills/math-beamer/templates/packs/seminar-minimal-zh/template.yaml +13 -0
  163. package/skills/math-beamer/templates/packs/theorem-proof-talk/main.tex +60 -0
  164. package/skills/math-beamer/templates/packs/theorem-proof-talk/template.yaml +9 -0
  165. package/skills/math-beamer/templates/packs/thesis-defense/main.tex +42 -0
  166. package/skills/math-beamer/templates/packs/thesis-defense/template.yaml +9 -0
  167. package/skills/math-beamer/templates/packs/workshop-tutorial/main.tex +32 -0
  168. package/skills/math-beamer/templates/packs/workshop-tutorial/template.yaml +9 -0
  169. package/skills/math-beamer/templates/preview-gallery.md +32 -0
  170. package/skills/math-beamer/templates/previews/algebra-number-theory-talk-content.png +0 -0
  171. package/skills/math-beamer/templates/previews/algebra-number-theory-talk-cover.png +0 -0
  172. package/skills/math-beamer/templates/previews/algorithm-talk-content.png +0 -0
  173. package/skills/math-beamer/templates/previews/algorithm-talk-cover.png +0 -0
  174. package/skills/math-beamer/templates/previews/analysis-core-talk-content.png +0 -0
  175. package/skills/math-beamer/templates/previews/analysis-core-talk-cover.png +0 -0
  176. package/skills/math-beamer/templates/previews/backup-heavy-talk-content.png +0 -0
  177. package/skills/math-beamer/templates/previews/backup-heavy-talk-cover.png +0 -0
  178. package/skills/math-beamer/templates/previews/beamerposter-a0-content.png +0 -0
  179. package/skills/math-beamer/templates/previews/beamerposter-a0-cover.png +0 -0
  180. package/skills/math-beamer/templates/previews/combinatorics-graph-talk-content.png +0 -0
  181. package/skills/math-beamer/templates/previews/combinatorics-graph-talk-cover.png +0 -0
  182. package/skills/math-beamer/templates/previews/control-systems-talk-content.png +0 -0
  183. package/skills/math-beamer/templates/previews/control-systems-talk-cover.png +0 -0
  184. package/skills/math-beamer/templates/previews/course-lecture-zh-content.png +0 -0
  185. package/skills/math-beamer/templates/previews/course-lecture-zh-cover.png +0 -0
  186. package/skills/math-beamer/templates/previews/data-experiment-results-content.png +0 -0
  187. package/skills/math-beamer/templates/previews/data-experiment-results-cover.png +0 -0
  188. package/skills/math-beamer/templates/previews/dynamical-systems-talk-content.png +0 -0
  189. package/skills/math-beamer/templates/previews/dynamical-systems-talk-cover.png +0 -0
  190. package/skills/math-beamer/templates/previews/geometry-topology-talk-content.png +0 -0
  191. package/skills/math-beamer/templates/previews/geometry-topology-talk-cover.png +0 -0
  192. package/skills/math-beamer/templates/previews/information-coding-crypto-talk-content.png +0 -0
  193. package/skills/math-beamer/templates/previews/information-coding-crypto-talk-cover.png +0 -0
  194. package/skills/math-beamer/templates/previews/logic-foundations-category-talk-content.png +0 -0
  195. package/skills/math-beamer/templates/previews/logic-foundations-category-talk-cover.png +0 -0
  196. package/skills/math-beamer/templates/previews/numerical-analysis-talk-content.png +0 -0
  197. package/skills/math-beamer/templates/previews/numerical-analysis-talk-cover.png +0 -0
  198. package/skills/math-beamer/templates/previews/optimization-talk-content.png +0 -0
  199. package/skills/math-beamer/templates/previews/optimization-talk-cover.png +0 -0
  200. package/skills/math-beamer/templates/previews/pde-analysis-talk-content.png +0 -0
  201. package/skills/math-beamer/templates/previews/pde-analysis-talk-cover.png +0 -0
  202. package/skills/math-beamer/templates/previews/probability-statistics-talk-content.png +0 -0
  203. package/skills/math-beamer/templates/previews/probability-statistics-talk-cover.png +0 -0
  204. package/skills/math-beamer/templates/previews/reading-group-paper-content.png +0 -0
  205. package/skills/math-beamer/templates/previews/reading-group-paper-cover.png +0 -0
  206. package/skills/math-beamer/templates/previews/seminar-minimal-en-content.png +0 -0
  207. package/skills/math-beamer/templates/previews/seminar-minimal-en-cover.png +0 -0
  208. package/skills/math-beamer/templates/previews/seminar-minimal-zh-content.png +0 -0
  209. package/skills/math-beamer/templates/previews/seminar-minimal-zh-cover.png +0 -0
  210. package/skills/math-beamer/templates/previews/theorem-proof-talk-content.png +0 -0
  211. package/skills/math-beamer/templates/previews/theorem-proof-talk-cover.png +0 -0
  212. package/skills/math-beamer/templates/previews/thesis-defense-content.png +0 -0
  213. package/skills/math-beamer/templates/previews/thesis-defense-cover.png +0 -0
  214. package/skills/math-beamer/templates/previews/workshop-tutorial-content.png +0 -0
  215. package/skills/math-beamer/templates/previews/workshop-tutorial-cover.png +0 -0
  216. package/skills/math-beamer/templates/review-report.md +54 -0
  217. package/skills/math-beamer/templates/slide-source-ledger.md +22 -0
  218. package/skills/math-beamer/templates/source-packet.md +50 -0
  219. package/skills/math-glossary/SKILL.md +347 -0
  220. package/skills/math-glossary/references/glossary-schema.md +71 -0
  221. package/skills/math-glossary/references/glossary-usage-guide.md +176 -0
  222. package/skills/math-glossary/references/glossary-web-template.md +127 -0
  223. package/skills/math-glossary/references/glossary.schema.json +76 -0
  224. package/skills/math-glossary/references/user-manual.md +435 -0
  225. package/skills/math-glossary/requirements-ai.txt +3 -0
  226. package/skills/math-glossary/requirements.txt +3 -0
  227. package/skills/math-glossary/scripts/glossary_backup.py +42 -0
  228. package/skills/math-glossary/scripts/glossary_build.py +467 -0
  229. package/skills/math-glossary/scripts/glossary_enrich_examples.py +283 -0
  230. package/skills/math-glossary/scripts/glossary_export.py +333 -0
  231. package/skills/math-glossary/scripts/glossary_web.py +1265 -0
  232. package/skills/math-paper-reading/README.md +163 -0
  233. package/skills/math-paper-reading/SKILL.md +48 -0
  234. package/skills/math-paper-reading/agent_router.md +36 -0
  235. package/skills/math-paper-reading/references/proof_pattern_taxonomy.md +123 -0
  236. package/skills/math-paper-reading/references/quality_rubric.md +36 -0
  237. package/skills/math-paper-reading/skill_base.md +627 -0
  238. package/skills/math-paper-reading/skill_literature_search.md +866 -0
  239. package/skills/math-paper-reading/skill_paper_deep_read.md +1024 -0
  240. package/skills/math-paper-reading/skill_pathway_proof.md +718 -0
  241. package/skills/math-paper-reading/skill_reference_manager.md +746 -0
  242. package/skills/matlab-runner/SKILL.md +217 -0
  243. package/skills/matlab-runner/examples/README.md +33 -0
  244. package/skills/matlab-runner/examples/matrix_report.m +28 -0
  245. package/skills/matlab-runner/examples/plot_damped_sine.m +64 -0
  246. package/skills/matlab-runner/examples/test_vector_norm.m +12 -0
  247. package/skills/matlab-runner/references/client-setup.md +24 -0
  248. package/skills/matlab-runner/references/file-session-safety.md +86 -0
  249. package/skills/matlab-runner/references/numerical-safety.md +126 -0
  250. package/skills/matlab-runner/references/resource-safety.md +125 -0
  251. package/skills/mixed-integer-programming/SKILL.md +119 -0
  252. package/skills/mixed-integer-programming/lp-examples.md +251 -0
  253. package/skills/mixed-integer-programming/mip-examples-verified.md +118 -0
  254. package/skills/open-problem-research-pipeline/SKILL.md +76 -0
  255. package/skills/open-problem-research-pipeline/skill_literature_analysis.md +201 -0
  256. package/skills/open-problem-research-pipeline/skill_literature_proof_framework.md +206 -0
  257. package/skills/open-problem-research-pipeline/skill_literature_search.md +172 -0
  258. package/skills/open-problem-research-pipeline/skill_qskill.md +177 -0
  259. package/skills/osqp-solver/SKILL.md +245 -0
  260. package/skills/osqp-solver/references/citation.md +25 -0
  261. package/skills/osqp-solver/references/dual-infeasible-example.json +14 -0
  262. package/skills/osqp-solver/references/feasible-example.json +21 -0
  263. package/skills/osqp-solver/references/primal-infeasible-example.json +17 -0
  264. package/skills/osqp-solver/references/python-api.md +95 -0
  265. package/skills/osqp-solver/references/verification.md +94 -0
  266. package/skills/osqp-solver/scripts/check_osqp_environment.py +120 -0
  267. package/skills/osqp-solver/scripts/solve_qp.py +943 -0
  268. package/skills/paper-writing/SKILL.md +115 -0
  269. package/skills/paper-writing/skill_claim_evidence_ledger.md +55 -0
  270. package/skills/paper-writing/skill_formula_environment_and_readability.md +41 -0
  271. package/skills/paper-writing/skill_latex_build_and_layout_audit.md +73 -0
  272. package/skills/paper-writing/skill_notation_and_variable_consistency.md +42 -0
  273. package/skills/paper-writing/skill_paper_skeleton_and_logical_architecture.md +54 -0
  274. package/skills/paper-writing/skill_proof_obligation_and_assumption_audit.md +57 -0
  275. package/skills/paper-writing/templates/claim-evidence-ledger.md +23 -0
  276. package/skills/paper-writing/templates/proof-obligation-ledger.md +22 -0
  277. package/skills/paper-writing/templates/rapid-prototype-paper-skeleton.md +46 -0
  278. package/skills/paper-writing/templates/source-packet.md +37 -0
  279. package/skills/paper-writing/templates/submission-readiness.md +41 -0
  280. package/skills/proof-blueprint-review/SKILL.md +129 -0
  281. package/skills/proof-blueprint-review/references/agent-mediated-proof-protocol.md +57 -0
  282. package/skills/proof-blueprint-review/references/generation-agent.md +45 -0
  283. package/skills/proof-blueprint-review/references/proof-acceptance-contract.md +41 -0
  284. package/skills/proof-blueprint-review/references/verification-agent.md +37 -0
@@ -0,0 +1,129 @@
1
+ ---
2
+ name: proof-blueprint-review
3
+ description: "Use when Codex should work as a coding-agent-native proof planning and review workflow: transform a candidate theorem, proof sketch, problem artifact, or proof_obligations into a proof blueprint, verifier-style report, repair hints, proof-obligation ledger patches, and a strict proof acceptance decision without treating API access as the default path."
4
+ ---
5
+
6
+ # Proof Blueprint Review
7
+
8
+ ## DSH Integration Notes
9
+
10
+ - 本技能由 `@louisultra/dsh-verymath` 插件提供;纯方法论,零外部 API("not an API wrapper")。
11
+ - 生成/验证角色分离天然映射 DSH 子代理:一次生成 + 一次独立审阅(不同上下文)。
12
+ - 证明义务(proof_obligations)可来自 math-paper-reading 的结构 JSON;最终 patch 走 lean-formalization 验证。
13
+
14
+
15
+ This file is the shared Skill layer for the proof blueprint review package.
16
+ Keep platform adapters thin and route durable proof behavior back here and to
17
+ the `references/` protocol files.
18
+
19
+ ## Core Stance
20
+
21
+ Act as a coding-agent coordinator for agent-mediated proof generation and
22
+ verification. The agent reads the problem, writes a proof blueprint, performs or
23
+ coordinates a verifier-style review, converts failures into repair hints and
24
+ proof obligations, and reports proof status with strict evidence.
25
+
26
+ This is not an API wrapper. External verifier services or model APIs
27
+ may be used when available and explicitly appropriate, but the primary workflow
28
+ is agent-mediated and artifact-first.
29
+
30
+ Reply to the user in Simplified Chinese by default. Keep commands, file paths,
31
+ JSON keys, theorem labels, verifier fields, and artifact names in English.
32
+
33
+ ## First Move
34
+
35
+ Start from the user's candidate theorem, proof sketch, proof obligations, or
36
+ problem artifact. If the statement is ambiguous, ask one focused mathematical
37
+ question. Otherwise write or update the proof-state artifacts and continue.
38
+
39
+ Use this visible loop:
40
+
41
+ 1. Normalize the problem statement and allowed assumptions.
42
+ 2. Convert known obligations into a proof blueprint plan.
43
+ 3. Draft or revise `proof_blueprint.md`.
44
+ 4. Run a verifier-style review with explicit verdict fields.
45
+ 5. Convert gaps, critical errors, and weak citations into `repair_hints` and
46
+ `proof_obligation_patches`.
47
+ 6. Iterate only on clear repair targets.
48
+ 7. Apply the proof acceptance gate before reporting any proof as accepted.
49
+
50
+ ## Role Separation
51
+
52
+ Keep generation and verification roles separate in artifacts:
53
+
54
+ - Generation role: explores proof routes, decomposes goals, records dependencies,
55
+ and drafts `proof_blueprint.md`.
56
+ - Verification role: checks the complete proof blueprint, reports gaps and
57
+ critical errors, and issues a verdict.
58
+
59
+ Do not let a generated blueprint approve itself.
60
+
61
+ ## Artifact Contract
62
+
63
+ Write durable artifacts whenever proof work is substantive:
64
+
65
+ - `problem_intake.md`
66
+ - `proof_blueprint.md`
67
+ - `generation_trace.json`
68
+ - `verification_report.json`
69
+ - `verification_summary.md`
70
+ - `repair_hints.md`
71
+ - `proof_obligation_patches.json`
72
+ - `acceptance_gate.md`
73
+
74
+ For the agent-mediated contract, read
75
+ `references/agent-mediated-proof-protocol.md`.
76
+
77
+ ## Proof Acceptance
78
+
79
+ Never present a proof as accepted merely because a blueprint is plausible.
80
+ Accept a proof only when:
81
+
82
+ - the theorem statement matches the user's intended statement;
83
+ - all assumptions and black boxes are explicit and allowed;
84
+ - the verification evidence has `verdict="correct"` or an equivalent accepted
85
+ human/verifier gate;
86
+ - there are no unresolved `critical_errors`;
87
+ - there are no unresolved `gaps`.
88
+
89
+ If any condition is missing, report the state as `exploratory`, `partial`,
90
+ `blocked`, or `unverified`.
91
+
92
+ Distinguish proof-status layers:
93
+
94
+ - `accepted_by_review`: verifier-style or human review accepts the blueprint
95
+ under stated assumptions.
96
+ - `externally_verified`: an external prover/verifier service accepted the proof
97
+ and its evidence is recorded.
98
+ - `machine_checked`: a proof assistant such as Lean checked the final proof.
99
+
100
+ Do not call `accepted_by_review` a verified proof.
101
+
102
+ ## Reference Routing
103
+
104
+ - For related public references, read the root README.
105
+ - For the full agent-mediated workflow, read
106
+ `references/agent-mediated-proof-protocol.md`.
107
+ - For proof blueprint generation, read `references/generation-agent.md`.
108
+ - For verifier-style review, read `references/verification-agent.md`.
109
+ - For final proof status, read `references/proof-acceptance-contract.md`.
110
+
111
+ ## Human Intervention
112
+
113
+ Ask the user before:
114
+
115
+ - changing the theorem statement or hypotheses;
116
+ - accepting a cited theorem as a black box;
117
+ - discarding a proof route the user prefers;
118
+ - claiming a proof has passed a human/verifier gate;
119
+ - launching an external verifier or API-backed run.
120
+
121
+ ## Failure Modes
122
+
123
+ - If the proof fails locally, preserve the failed route and write repair hints.
124
+ - If a gap changes the intended theorem, ask the user before weakening or
125
+ strengthening the statement.
126
+ - If verification evidence is unavailable, continue only as an exploratory proof
127
+ session and label all drafts unverified.
128
+ - If feedback is vague, convert it into explicit proof obligations before
129
+ attempting another proof draft.
@@ -0,0 +1,57 @@
1
+ # Agent-Mediated Proof Protocol
2
+
3
+ This protocol defines an agent-mediated generation and verification workflow as
4
+ a coding-agent artifact process. It does not require API access by default.
5
+
6
+ This protocol does not require API access by default.
7
+
8
+ ## Inputs
9
+
10
+ Accept any of:
11
+
12
+ - candidate theorem statement;
13
+ - problem artifact;
14
+ - proof sketch;
15
+ - proof obligations;
16
+ - source notes;
17
+ - previous verification report;
18
+ - repair hints.
19
+
20
+ ## Workflow
21
+
22
+ 1. Normalize the statement, hypotheses, definitions, allowed black boxes, and
23
+ target proof style.
24
+ 2. Build `problem_intake.md` with assumptions and ambiguity notes.
25
+ 3. Run the generation role to draft `proof_blueprint.md`.
26
+ 4. Write `generation_trace.json` with route choices, dependencies, and known
27
+ risks.
28
+ 5. Run the verification role on the full blueprint.
29
+ 6. Write `verification_report.json` with verdict fields.
30
+ 7. Convert failures into `repair_hints.md` and
31
+ `proof_obligation_patches.json`.
32
+ 8. Apply the proof acceptance contract.
33
+
34
+ ## Verdict Fields
35
+
36
+ Use these fields in `verification_report.json`:
37
+
38
+ - `verdict`: `correct`, `incorrect`, `incomplete`, or `uncertain`
39
+ - `critical_errors`
40
+ - `gaps`
41
+ - `unsupported_assumptions`
42
+ - `citation_or_black_box_issues`
43
+ - `repair_hints`
44
+ - `accepted_evidence`
45
+ - `next_action`
46
+
47
+ ## Agent-Mediated Contract
48
+
49
+ The contract is file-based:
50
+
51
+ - input problem artifacts in;
52
+ - blueprint and traces out;
53
+ - verifier-style report out;
54
+ - repair patches back into proof obligations.
55
+
56
+ External verifier output can be added as evidence, but absence of external
57
+ verifier output means the result remains exploratory or unverified.
@@ -0,0 +1,45 @@
1
+ # Generation Agent
2
+
3
+ The generation role explores proof routes and writes a proof blueprint. It does
4
+ not approve its own proof.
5
+
6
+ ## Responsibilities
7
+
8
+ - Restate the theorem and assumptions.
9
+ - Identify dependencies and allowed black boxes.
10
+ - Decompose the target into lemmas or proof obligations.
11
+ - Explore direct proof, contradiction, induction, compactness, construction,
12
+ reduction, or counterexample-sensitive routes as appropriate.
13
+ - Record failed branches and route choices.
14
+ - Draft `proof_blueprint.md`.
15
+
16
+ ## `proof_blueprint.md` Shape
17
+
18
+ Use:
19
+
20
+ ```text
21
+ # Proof Blueprint
22
+
23
+ ## Statement
24
+ ## Assumptions And Allowed Black Boxes
25
+ ## Strategy
26
+ ## Lemma Plan
27
+ ## Proof Steps
28
+ ## Known Gaps
29
+ ## Counterexample Pressure
30
+ ## Dependencies
31
+ ## Verification Prep
32
+ ```
33
+
34
+ ## Generation Trace
35
+
36
+ `generation_trace.json` should include:
37
+
38
+ - `problem_id`
39
+ - `route_candidates`
40
+ - `selected_route`
41
+ - `rejected_routes`
42
+ - `lemma_dependencies`
43
+ - `known_gaps`
44
+ - `risk_notes`
45
+ - `next_verification_focus`
@@ -0,0 +1,41 @@
1
+ # Proof Acceptance Contract
2
+
3
+ Accepting a proof is a gated decision, not a tone choice.
4
+
5
+ ## Accepted Proof Conditions
6
+
7
+ A proof may be reported as accepted only when all conditions hold:
8
+
9
+ - the theorem statement matches the user's intended statement;
10
+ - all assumptions are explicit;
11
+ - all black boxes are allowed and sufficient;
12
+ - verification evidence reports `verdict="correct"` or an equivalent accepted
13
+ human/verifier gate;
14
+ - `critical_errors` is empty;
15
+ - `gaps` is empty;
16
+ - unresolved counterexample pressure is absent or explicitly discharged.
17
+
18
+ ## Non-Accepted Status Labels
19
+
20
+ Use one of:
21
+
22
+ - `exploratory`
23
+ - `partial`
24
+ - `blocked`
25
+ - `unverified`
26
+ - `needs_human_decision`
27
+
28
+ ## Repair Patches
29
+
30
+ Convert verifier feedback into proof obligations:
31
+
32
+ - `patch_id`
33
+ - `source`: `verifier_feedback` or external verifier source
34
+ - `candidate_problem_id`
35
+ - `obligation`
36
+ - `status`: usually `open`
37
+ - `repair_hint`
38
+ - `next_action`
39
+
40
+ Do not silently mutate the theorem statement to make a proof pass. Ask the user
41
+ before weakening or strengthening the statement.
@@ -0,0 +1,37 @@
1
+ # Verification Agent
2
+
3
+ The verification role checks a complete proof blueprint or proof draft. It must
4
+ be stricter than the generation role.
5
+
6
+ ## Review Steps
7
+
8
+ 1. Check statement consistency.
9
+ 2. Check every hypothesis is used legally.
10
+ 3. Check every cited black box is allowed and sufficient.
11
+ 4. Check each proof step follows from prior steps.
12
+ 5. Look for hidden compactness, regularity, finiteness, measurability,
13
+ uniqueness, or boundary assumptions.
14
+ 6. Identify counterexample pressure.
15
+ 7. Return a verdict and repair hints.
16
+
17
+ ## Report Shape
18
+
19
+ `verification_report.json` should include:
20
+
21
+ - `verdict`
22
+ - `critical_errors`
23
+ - `gaps`
24
+ - `unsupported_assumptions`
25
+ - `citation_or_black_box_issues`
26
+ - `counterexample_pressure`
27
+ - `repair_hints`
28
+ - `accepted_evidence`
29
+ - `next_action`
30
+
31
+ ## Strictness
32
+
33
+ If the proof is plausible but missing a lemma, use `verdict="incomplete"`.
34
+ If a core step is wrong, use `verdict="incorrect"`.
35
+ If the proof may be right but evidence is insufficient, use
36
+ `verdict="uncertain"`.
37
+ Only use `verdict="correct"` when every acceptance condition is met.