Files
marqdo/skills/marqdo/reference.md
T
cflmy 9331af78e2 release(2.8.0): 合入 CHANGELOG/README/发版说明/skills prove 任务;CI 链接指向 doc/releases
- CHANGELOG.md:v2.8.0 条目(中英双语);
- README.md:版本行 2.7.1→2.8.0 + 愿景第 6 条(知识可证明);
- doc/releases/v2.8.0.md:双语发版说明(亮点/用法/已知限制);
- skills/marqdo-dev/index.mq.md:新增 prove 任务(路径/目录模式/
  require_lean/json;参数用 + 行声明升参,check 与 narrative-ratio 通过);
- 设计文档 §12.5 标记已合入;发版链接统一指向 doc/releases/v2.8.0.md。
2026-11-18 10:29:26 +08:00

2.3 KiB
Executable File

Marqdo executable reference

The maintained programming rules and runnable examples live in the executable programming guide. Read its parameter and return contracts, then call the actual source heading. The development entry provides native file operations and verification tasks; the release entry provides publication workflows.

Use the recursive Markdown web example and the quantum workflow for domain development. Their real source is the manual. Classic migration context remains for explicitly historical syntax; new programs use readable occlusion and access(collection, key). Do not copy a second fenced program from this discovery note.

Theorem tables (marqdo prove, CLI 2.8.0+)

A knowledge function may carry a theorem table before its first executable statement. Place it right under the parameter list:

定理 结论 前提 策略
大额必经人工 包含(轨迹, "工单.创建") 金额 > 10000 auto
  • 结论 grammar: 结果.ok = True/False, 包含(轨迹, "操作名"), 长度(轨迹) ⋈ n, 参数 ⋈ 常量, combined with 且/或/非. 轨迹 names the operation trace by the link's display text; 结果 is the returned value.
  • 前提 restricts the claim's scope (same comparison grammar). Keep it a single-variable linear condition.
  • 策略 is auto (generated proof script) or none (theorem generated but not proven — honest unverified).

Judge with marqdo prove 文件.mq.md --json. Statuses, strongest first: proved (Lean confirms) > checked (offline symbolic execution closed the path — advisory, never a proof) > unverified (outside the provable subset)

rejected (subset check refused) > unproved (counterexample found, e.g. 金额 = 10001) > error. Without a Lean toolchain the run stays honest at checked/unverified and exits 0; --require-lean makes unjudged statuses exit 2 for CI. Never weaken a failing claim to make it pass — fix the claim or the code, and let proof.divergence stop the line when the offline judger and Lean disagree. Full contract: design/prove-cli.md.