Integrate the v2.8.0-based native agent workflow branch:
- durable open/next/inspect/list/commit/cancel step state with resume_dir isolation
- verified small-model choices, scoped context and bounded parallel recovery
- failed-only read-only retry through the Agent ABI plugin
- offline interpreter fixtures, contract checks and focused CI gates
- take the 2.8.0 crate versions, Cargo.lock dependency graph and release workflows
- keep the native workflow inspect/list, resume_dir isolation and repeatable fixtures
- satisfy the 2.8.0 library narrative gate for workflow.tick
- resolve CHANGELOG ordering with the v2.8.0 release entry
- add agent_workflow_inspect/list primitives and ext/ai wrappers
- expose host-relative resume_dir on every workflow operation
- make offline workflow fixture repeatable with a timestamped run id
- fix flow.choose branch scoping contract diagnostic
- build the agent cdylib and drop the removed run --effects flag in CI
Code review after the initial prove commit found and fixed:
1. Calls inside table/list literals were silently dropped — a function
with side-effectful cells lowered to "no ops" and claimed purity in
Lean. lower_expr's fallback now rejects with proof.unsupported
(author must bind the call to a variable first).
2. Same-callee call sites with different arities (optional params)
shared one Op whose ctor declared the first-seen arity, emitting
uncompilable Lean. register_op now suffixes `/N` per arity.
3. proof.name_shadow fired once per walked function (N functions → N
duplicates) and checked params of claim-free functions. Predicate
check runs once per module; param check only for functions that
carry claims.
4. 长度(轨迹) = 2 emitted mqEq (Nat) (Val) — type-mismatched Lean.
Nat-context detection renders trace-length comparisons natively;
untranslatable shapes become comments instead of broken Lean.
Hardening: lean_ident reserves 轨迹₀ / h_前提 (theorem binder
collision); emit_theorems dedups repeated claim ids.
Tests: +4 integration regressions (p2_a..p2_d), 23 prove tests total;
full suite green except the documented env-limited failures (one
host::foreign_session flake passes standalone).
Business validation (doc §12): e-commerce order-approval SKILL with 3
theorems cross-checked against the real interpreter — 5000 → auto
(1-step trace), 20000/60000 → manual ticket T-20000/T-60000
(需人工→创建, exactly 2 steps); corrupted claim tables hit
check --proof codes while staying default-off; double emit
byte-identical.
- Unified source-derived pure-function proof DAG with symbolic parameters, sequential calls, total conditional branches, multi-module imports, and kernel-checked caller contracts.
- Stable statement and theorem anchors, dependency closure signatures, proof indexes and source-change invalidation.
-`proved`, `model_proved`, `tested`, `assumed`, `unknown`, `refuted`, `stale` are distinct; Lean Int-model proofs **do not** prove the complete Marqdo `number` or i64 runtime.
- Independent Lean replay and negative regression tests for changed source, missing preconditions, unsupported effects, and false caller conclusions.
- Full CLI/WASM/ext version synchronization, Windows/Linux native archives and editor release packaging (completion requires actual release workflow and asset verification).
- Existing `marqdo prove` behavior, classic knowledge references, and `marqdo call` remain supported. Unsupported loops, recursive functions, dynamic dispatch, plugins and unverified runtime behaviors never become auto-proved.
`marqdo prove` ships: theorem tables compile to Lean 4 and are judged automatically. Offline symbolic execution works without a toolchain, monotonicity guardrails fail loudly on judger defects, fake theorems get counterexample witnesses, and certificate caching plus directory mode support agent-scale proving.
**Marqdo is a Rust-based, document-native runtime for executable AI skills and tools.** Write human-readable prose, GFM tables, parameter contracts, and real functions in one `.mq.md` document. Call a function by its heading, inspect the implementation, and grant side effects explicitly.
Knowledge statements and claims have stable addresses; verified pure contracts compose across static modules and produce independently replayable Lean certificates. Evidence distinguishes abstract `model_proved` from true runtime `proved`. Unsupported runtime effects and semantics are explicitly unverified. [Proof scope and acceptance](doc/design/verified-knowledge-compiler-boundaries.md) · [Release notes](doc/releases/v2.9.0.md).
## One Markdown file. Three views. Real execution.
[](assets/marketing/marqdo-2.7.1-markdown-to-execution.mp4)
**[▶ Watch the 56-second film](assets/marketing/marqdo-2.7.1-markdown-to-execution.mp4)** · [Bilingual captions](assets/marketing/marqdo-2.7.1-markdown-to-execution.srt) · [Reproducible video source](scripts/render-markdown-execution-promo.py)
> **The point is not to invent a new document format.** A `.mq.md` file uses Markdown headings, paragraphs and tables. Ordinary Markdown renderers still show a readable document. Marqdo adds explicit execution semantics and a View that can inspect functions, values and their relationships on the same document.
<sub>**Concept artwork** showing the design principle: **source → ordinary Markdown rendering → Marqdo View**. Illustrative labels are not a live execution trace. The video includes [a real View screenshot](assets/marketing/user-procurement-view.png), [a standard Markdown rendering](assets/marketing/marqdo-procurement-standard-markdown.png) produced from the actual procurement source, and a business example verified with the 2.7.1 CLI.</sub>
| Edit the same Markdown text | Read headings, prose and data tables | Inspect the same document's calls, values and effects |
| No separate prompt or tool implementation specification needed | Works as ordinary readable documentation | Call named functions with `marqdo call` |
## Quickstart — one function, one command
Install the [latest 2.9.0 CLI release for Windows or Linux](https://github.com/cflmy/marqdo/releases/tag/v2.9.0), then run from this repository's root:
The function heading is the callable name. The function's explanation, parameters, return contract, and implementation live **in the same source file**. Use `--json` for machine-readable call results and diagnostics. No LLM key is needed for this quickstart.
## A procurement skill with a ¥600 budget
[Read the complete executable procurement document](examples/procurement/index.mq.md) · [How to run and verify the example](examples/procurement/README.md)
This is a **seven-tool, offline demonstration**. It knows the local supplier directory, queries a static price catalog, checks the budget, and conditionally creates a **simulated** work order. It also documents receipt handling, negotiation and supplier switching as unconnected stubs.

<sub>**Real CLI results**, edited into a short animation; the accepted order is explicitly **simulated** and never sent. [Capture workflow](scripts/capture-procurement-showcase.py) · [Passing checks](https://github.com/cflmy/marqdo/actions/runs/43358288563).</sub>
```bash
# 1. Approve suppliers: paused or blacklisted entries are excluded.
| `SUP_YY` | Supplier on blacklist | Excluded from quote / order |
**Why this matters:** The document doesn't merely tell an agent to obey a limit. The work-order **function itself** calls supplier validation, price lookup, and `查询余额` before returning an order record. Agent instructions and callable business logic can be inspected together.
> **Important limits:** Price and supplier records are fixtures; `已花费` is caller supplied. No authoritative budget ledger, concurrent reservation, live supplier prices, ERP messaging, real receipt, or payment is implemented. A successful **simulated** order is **not** a real transaction. The demo is a testable starting point, not a financial safety guarantee.
## Explore the View
Marqdo 2.7.1 improves the interactive reading experience: implementation details stay open when manually expanded, structured values are presented more clearly, and function/source links are easier to inspect. It **does not introduce new language syntax or APIs**.
```bash
marqdo view examples/procurement --no-open
```

<sub>**Original View screenshot provided by the project author.** Notice the natural document typography, values in the margins, and curved connections originating from function calls in the prose. [Additional automated View capture](assets/marketing/procurement-view.png) · [Static Markdown rendering](assets/marketing/marqdo-procurement-standard-markdown.png).</sub>
| Description and code often separated | Heading, parameter table, return table and implementation in one `.mq.md` |
| Validation may require separate wiring | Named function calls can be checked, executed and tested |
| Prompts ask a model to comply | Runtime permissions control **declared** effects of a function call |
| Hard to follow implementation through files | View links readable content and implementation details |
Agent Skills already support scripts; Marqdo's claim is **one document-native language surface** for authoring, inspecting, executing and reusing functions. This is **not** a claim of full formal verification, zero-delay execution, or OS-level isolation of all plugin/process behavior.
CLI **2.8.0** adds `marqdo prove`: theorem tables in knowledge files compile to Lean 4 and are judged automatically — offline symbolic execution without a toolchain (honest degradation, never impersonating a proof), full proofs with counterexample witnesses when Lean is available.
Ext pack **2.8.1** (CLI remains 2.8.0): plugin-only durable AI workflows with bounded choice, scoped context, failed-only read-only recovery and `inspect`.
<svgxmlns="http://www.w3.org/2000/svg"width="1340"height="720"viewBox="0 0 1340 720"role="img"aria-label="Animated illustration of a procurement skill being called, including a budget denial">
<textx="1154"y="50"fill="#d3d9e4"font-size="15"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">2.7.1 · DEMO</text>
<textx="46"y="109"fill="#f6f5ee"font-size="37"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="700">Your SKILL is now a TOOL.</text>
<textx="47"y="141"fill="#a8b6c7"font-size="17"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">A human-readable document → callable business logic → structured results</text>
<textx="65"y="204"fill="#f5dba9"font-size="20"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="600">index.mq.md</text>
<textx="707"y="204"fill="#e5eaf4"font-size="17"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">$ marqdo call ... 向采购商发工单</text>
<textx="66"y="266"fill="#faf7f1"font-size="27"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="700">## 向采购商发工单</text>
<textx="66"y="307"fill="#a2b2ca"font-size="17"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">Read the rules. Call the function.</text>
<textx="86"y="365"fill="#abd6fa"font-size="19"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">报价 = 查询采购商价格(...)</text>
<textx="86"y="407"fill="#abd6fa"font-size="19"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">预算 = 查询余额(已花费=...)</text>
<textx="86"y="453"fill="#e9ba84"font-size="19"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">1. 剩余额度 < 本单金额 → 拒绝</text>
<textx="65"y="552"fill="#d4e0ee"font-size="18"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">One file: prose + contracts + tables</text>
<textx="65"y="588"fill="#d4e0ee"font-size="17"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">+ executable functions + result records</text>
<textx="706"y="272"fill="#d7deef"font-size="19"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">SUP_JN 数量=8 单价=36</text>
<textx="706"y="311"fill="#98aec9"font-size="18"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">最高预算 = ¥600</text>
<gopacity=".18"><animateattributeName="opacity"values="0.18;0.18;1;1;0.18"keyTimes="0;0.04;0.09;0.91;1"dur="13s"repeatCount="indefinite"/><rectx="704"y="345"width="565"height="45"rx="9"fill="#233248"stroke="none"/><textx="719"y="374"fill="#9db5cf"font-size="17"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">01 SUPPLIER</text><textx="920"y="374"fill="#f5d8aa"font-size="18"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">SUP_JN · active</text></g>
<gopacity=".18"><animateattributeName="opacity"values="0.18;0.18;1;1;0.18"keyTimes="0;0.19;0.24;0.91;1"dur="13s"repeatCount="indefinite"/><rectx="704"y="399"width="565"height="45"rx="9"fill="#233248"stroke="none"/><textx="719"y="428"fill="#9db5cf"font-size="17"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">02 QUOTE</text><textx="920"y="428"fill="#f5d8aa"font-size="18"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">8 × ¥36 = ¥288</text></g>
<gopacity=".18"><animateattributeName="opacity"values="0.18;0.18;1;1;0.18"keyTimes="0;0.35;0.39999999999999997;0.91;1"dur="13s"repeatCount="indefinite"/><rectx="704"y="453"width="565"height="45"rx="9"fill="#233248"stroke="none"/><textx="719"y="482"fill="#9db5cf"font-size="17"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">03 BALANCE</text><textx="920"y="482"fill="#f5d8aa"font-size="18"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">¥600 - already spent</text></g>
<gopacity=".18"><animateattributeName="opacity"values="0.18;0.18;1;1;0.18"keyTimes="0;0.53;0.5800000000000001;0.91;1"dur="13s"repeatCount="indefinite"/><rectx="704"y="507"width="565"height="45"rx="9"fill="#233248"stroke="none"/><textx="719"y="536"fill="#9db5cf"font-size="17"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">04 DECISION</text><textx="920"y="536"fill="#f5d8aa"font-size="18"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">check requested amount</text></g>
<textx="718"y="600"fill="#f8b1bc"font-size="18"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="600">✕ 已花费=360 ¥240 < ¥288</text>
<textx="718"y="625"fill="#fde7ea"font-size="17"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">ok: false · 预算不足,拒绝工单</text>
</g>
<pathd="M 652 430 C 665 429 674 429 688 430"fill="none"stroke="#f0c58c"stroke-width="3"/><circlecx="665"cy="429"r="4"fill="#f0c58c"><animateattributeName="cx"values="656;681;656"dur="2.5s"repeatCount="indefinite"/></circle>
<textx="44"y="698"fill="#7e90a7"font-size="14"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">ILLUSTRATED EXPECTED FLOW · NOT A TERMINAL CAPTURE · NO REAL PURCHASE</text>
<svgxmlns="http://www.w3.org/2000/svg"width="1340"height="740"viewBox="0 0 1340 740"role="img"aria-label="View-inspired editorial concept for the procurement function, not a real screenshot">
<textx="577"y="43"fill="#665d53"font-size="17"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">文档 函数 执行 变量</text>
<textx="1030"y="44"fill="#998773"font-size="13"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">VIEW CONCEPT / NOT CAPTURE</text>
<textx="374"y="238"fill="#5d5851"font-size="17"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">核对准入、价格、交付与预算之后,生成本地模拟工单。</text>
<textx="374"y="463"fill="#5e584f"font-size="18"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">发单前,必须再次查询并核对本轮的可用余额。</text>
<textx="391"y="513"fill="#805b35"font-size="18"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">预算 = [重新查询预算](查询余额(...))</text>
<textx="374"y="565"fill="#7b5b4b"font-size="19"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">1. 剩余额度 < 本单金额</text>
<textx="374"y="612"fill="#a06b5f"font-size="18"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400"> 返回 [预算不足,拒绝模拟工单](...)</text>
<textx="375"y="682"fill="#8c8276"font-size="16"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">仅在全部检查通过时产生“本地模拟、未发送”的结果。</text>
<pathd="M 408 503 C 295 503 278 339 146 339"stroke="#ba9a75"stroke-width="1.7"fill="none"/><circlecx="408"cy="503"r="4.3"fill="#ba9a75"/>
<textx="73"y="281"fill="#a78255"font-size="15"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">BUDGET CHECK</text>
<textx="73"y="315"fill="#756350"font-size="18"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">已花费 ¥360</text>
<textx="73"y="343"fill="#756350"font-size="18"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">剩余额度 ¥240</text>
<pathd="M 823 602 C 1010 586 1026 396 1122 396"stroke="#b7837e"stroke-width="1.7"fill="none"/><circlecx="823"cy="602"r="4.3"fill="#b7837e"/>
<textx="1080"y="319"fill="#a67871"font-size="15"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">REJECTION</text>
<textx="1080"y="354"fill="#945e55"font-size="22"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="700">¥240 < ¥288</text>
<textx="1080"y="393"fill="#945e55"font-size="19"font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace"font-weight="400">拒绝工单</text>
Loaded 100 of 1850 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.