Compare commits
97
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ffe06d7afa | ||
|
|
180a111799 | ||
|
|
a3948dbe0d | ||
|
|
24959a0ba8 | ||
|
|
afbb9f191c | ||
|
|
8db699191e | ||
|
|
e5580d9640 | ||
|
|
9ce2ae1037 | ||
|
|
166b01c86b | ||
|
|
87cfe05095 | ||
|
|
b37387e6da | ||
|
|
895752a1fd | ||
|
|
38c07d9a0e | ||
|
|
a7a5554c0f | ||
|
|
343504c7a8 | ||
|
|
3d9fa0da96 | ||
|
|
bb8960c5eb | ||
|
|
9331af78e2 | ||
|
|
73bf574a55 | ||
|
|
4fae71342d | ||
|
|
63d60e3ba1 | ||
|
|
44d2928c06 | ||
|
|
fa832268b3 | ||
|
|
9576188a2e | ||
|
|
528a1f0dbc | ||
|
|
a11b347659 | ||
|
|
8e437e2cd3 | ||
|
|
23229a6ac9 | ||
|
|
58b65215a1 | ||
|
|
92c3f80055 | ||
|
|
8a66f803cb | ||
|
|
3ce59a4da8 | ||
|
|
90688741c5 | ||
|
|
70b88b3767 | ||
|
|
f859e6eeea | ||
|
|
6705e2e6b7 | ||
|
|
6e8a62928b | ||
|
|
398a0b7222 | ||
|
|
e8f1a3e126 | ||
|
|
8ea56cbe30 | ||
|
|
8085d06124 | ||
|
|
6f929dc2da | ||
|
|
dd22180269 | ||
|
|
cc48bf6d05 | ||
|
|
19f986953a | ||
|
|
770dee5199 | ||
|
|
f6612813e3 | ||
|
|
643ea06340 | ||
|
|
0cd64a7450 | ||
|
|
981faac022 | ||
|
|
f818834ec1 | ||
|
|
8d47507d15 | ||
|
|
1e1f05c087 | ||
|
|
06e61efc51 | ||
|
|
2dfa0b2a5b | ||
|
|
629ad8ed39 | ||
|
|
ee677478be | ||
|
|
edbf241d99 | ||
|
|
add6a7d32c | ||
|
|
c64ec99115 | ||
|
|
60a3b84a84 | ||
|
|
02a4f2d20d | ||
|
|
88490e3092 | ||
|
|
9031c106a1 | ||
|
|
633436e40f | ||
|
|
cf73fcf1ef | ||
|
|
e48fd5b0f4 | ||
|
|
b2f97e72c3 | ||
|
|
c7c0f66d1f | ||
|
|
d5ab9daebb | ||
|
|
5795236d1f | ||
|
|
e8d6dc92fc | ||
|
|
afe31cb2a8 | ||
|
|
905a67df32 | ||
|
|
f63b7ef48d | ||
|
|
393558ca97 | ||
|
|
0d9bd99fc0 | ||
|
|
a0c779e022 | ||
|
|
a82b6fdde1 | ||
|
|
3613ed7c4e | ||
|
|
9564dff777 | ||
|
|
f56deffefe | ||
|
|
bdedf3ecd8 | ||
|
|
b0ee958fcf | ||
|
|
e64f6b23b4 | ||
|
|
eed4f05ea4 | ||
|
|
d88ed274ed | ||
|
|
7fdd97f675 | ||
|
|
c299efe589 | ||
|
|
b3867c46db | ||
|
|
1a39a53d93 | ||
|
|
6d6f580d24 | ||
|
|
af05f19301 | ||
|
|
3201369470 | ||
|
|
05197378b3 | ||
|
|
f3b3152f07 | ||
|
|
22364f2f1b |
No files matched your search
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
@@ -0,0 +1,46 @@
|
||||
name: Build cinematic Markdown-to-execution video
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [docs/markdown-execution-cinematic-v2]
|
||||
paths:
|
||||
- "scripts/render-markdown-execution-promo.py"
|
||||
- ".github/workflows/build-markdown-execution-video.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
video:
|
||||
if: github.ref_name == 'docs/markdown-execution-cinematic-v2'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 25
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: true
|
||||
- name: Prepare fonts, Chrome and Python tools
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y -qq ffmpeg fonts-noto-cjk
|
||||
python -m pip install --quiet pillow numpy markdown-it-py selenium
|
||||
google-chrome --version
|
||||
- name: Render promo video from two original images and Marqdo source
|
||||
run: python scripts/render-markdown-execution-promo.py
|
||||
- name: Check resulting video
|
||||
run: |
|
||||
test -s assets/marketing/marqdo-2.7.1-markdown-to-execution.mp4
|
||||
test -s assets/marketing/marqdo-2.7.1-markdown-to-execution-cover.jpg
|
||||
test -s assets/marketing/marqdo-2.7.1-markdown-to-execution.srt
|
||||
ffprobe -v error -show_entries format=duration,size:stream=codec_name,width,height -of json assets/marketing/marqdo-2.7.1-markdown-to-execution.mp4
|
||||
- name: Commit compiled video, poster and subtitles
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add assets/marketing/marqdo-2.7.1-markdown-to-execution.mp4 \
|
||||
assets/marketing/marqdo-2.7.1-markdown-to-execution-cover.jpg \
|
||||
assets/marketing/marqdo-2.7.1-markdown-to-execution.srt \
|
||||
assets/marketing/marqdo-procurement-standard-markdown.png
|
||||
git diff --cached --quiet || git commit -m "docs: publish cinematic Markdown-to-execution promotional film"
|
||||
git push origin HEAD:docs/markdown-execution-cinematic-v2
|
||||
Regular → Executable
+16
@@ -15,6 +15,22 @@ jobs:
|
||||
run: |
|
||||
cargo build -p marqdo_plugin_agent --locked
|
||||
cargo build -p marqdo_plugin_llm --locked
|
||||
- name: Native agent choice and bounded recovery unit tests
|
||||
run: cargo test -p marqdo_plugin_agent --locked
|
||||
- name: Check short AI flow documents
|
||||
run: |
|
||||
cargo run --locked -- check ext/ai/flow.mq.md
|
||||
cargo run --locked -- check ext/ai/recovery.mq.md
|
||||
cargo run --locked -- check ext/ai/context.mq.md
|
||||
cargo run --locked -- check tests/ext/ai-native-flow.mq.md
|
||||
cargo run --locked -- check ext/ai/workflow.mq.md
|
||||
cargo run --locked -- check tests/ext/ai-native-workflow.mq.md
|
||||
- name: Native AI flow interpreter smoke (offline)
|
||||
env:
|
||||
MARQDO_AGENT_PLUGIN: ${{ github.workspace }}/target/debug/libagent.so
|
||||
run: |
|
||||
cargo run --locked -- run tests/ext/ai-native-flow.mq.md
|
||||
cargo run --locked -- run tests/ext/ai-native-workflow.mq.md
|
||||
- name: Workbench contracts (M00–M06 / F-subset)
|
||||
run: cargo test --test workbench_contracts --locked
|
||||
- name: Offline executable-knowledge gate
|
||||
|
||||
Regular → Executable
+9
-5
@@ -32,11 +32,15 @@ jobs:
|
||||
cargo build --release -p marqdo -p marqdo_plugin_agent -p marqdo_plugin_quantum -p marqdo_plugin_linalg -p marqdo_plugin_llm -p marqdo_plugin_engineering
|
||||
bash scripts/build-web-plugin.sh
|
||||
- name: Build and validate the runner's exact pack bytes
|
||||
shell: pwsh
|
||||
run: ./target/release/marqdo.exe call skills/marqdo-release/packs.mq.md ci --effects plugin,fs.write,environment.read --fs-root . --require-ok --json
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
./target/release/marqdo.exe call skills/marqdo-release/packs.mq.md ci --effects plugin,fs.read,fs.write,environment.read --fs-root . --require-ok --json
|
||||
- name: Attach source and Windows native packs without replacement
|
||||
shell: pwsh
|
||||
run: ./target/release/marqdo.exe call skills/marqdo-release/packs.mq.md attach_ci --effects plugin,fs.read,environment.read --fs-root . --require-ok --json
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
./target/release/marqdo.exe call skills/marqdo-release/packs.mq.md attach_ci --effects plugin,fs.read,environment.read --fs-root . --require-ok --json
|
||||
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -59,6 +63,6 @@ jobs:
|
||||
cargo build --release -p marqdo -p marqdo_plugin_agent -p marqdo_plugin_quantum -p marqdo_plugin_linalg -p marqdo_plugin_llm -p marqdo_plugin_engineering
|
||||
bash scripts/build-web-plugin.sh
|
||||
- name: Build and validate the runner's exact pack bytes
|
||||
run: target/release/marqdo call skills/marqdo-release/packs.mq.md ci --effects plugin,fs.write,environment.read --fs-root . --require-ok --json
|
||||
run: target/release/marqdo call skills/marqdo-release/packs.mq.md ci --effects plugin,fs.read,fs.write,environment.read --fs-root . --require-ok --json
|
||||
- name: Attach Linux native pack without replacement
|
||||
run: target/release/marqdo call skills/marqdo-release/packs.mq.md attach_ci --effects plugin,fs.read,environment.read --fs-root . --require-ok --json
|
||||
@@ -0,0 +1,40 @@
|
||||
# Cargo feature compatibility gate.
|
||||
#
|
||||
# `sema` (the core compiler) must build without the `cli` feature. Library
|
||||
# consumers such as qdagent depend on `marqdo` with `default-features = false`,
|
||||
# so any unconditional reference to a `cli`-gated module is a release blocker.
|
||||
# Keep this matrix in sync with the feature graph in Cargo.toml.
|
||||
name: feature-matrix
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "src/**"
|
||||
- "Cargo.toml"
|
||||
- "Cargo.lock"
|
||||
- ".github/workflows/feature-matrix.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "src/**"
|
||||
- "Cargo.toml"
|
||||
- "Cargo.lock"
|
||||
- ".github/workflows/feature-matrix.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: feature-matrix-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
lib-feature-matrix:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@1.81.0
|
||||
- name: Library builds with no default features
|
||||
run: cargo check --locked --lib --no-default-features
|
||||
- name: Library builds with only the cli feature
|
||||
run: cargo check --locked --lib --no-default-features --features cli
|
||||
- name: Library builds with default features
|
||||
run: cargo check --locked --lib
|
||||
@@ -0,0 +1,50 @@
|
||||
name: knowledge-proof-full-gate
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "src/knowledge/**"
|
||||
- "src/sema/**"
|
||||
- "src/prove/**"
|
||||
- "tests/**"
|
||||
- "doc/verification/skill-proof/**"
|
||||
- ".github/workflows/knowledge-proof-full-gate.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: knowledge-proof-full-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
complete-proof-regression:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Install pinned Lean kernel
|
||||
run: |
|
||||
curl -sSf https://elan.lean-lang.org/elan-init.sh | sh -s -- -y --default-toolchain leanprover/lean4:v4.35.0
|
||||
echo "$HOME/.elan/bin" >> "$GITHUB_PATH"
|
||||
- name: Validate Lean kernel and embedded proof library
|
||||
run: |
|
||||
lean --version
|
||||
bash scripts/check-proof-library.sh
|
||||
lean doc/verification/skill-proof/MarqdoModularProof.lean
|
||||
lean doc/verification/skill-proof/MarqdoEffects.lean
|
||||
- name: Build and run all knowledge unit tests
|
||||
run: |
|
||||
cargo build --locked
|
||||
cargo test --locked --lib knowledge::
|
||||
cargo test --locked --lib sema::ir::tests
|
||||
- name: Knowledge and execution compatibility suites
|
||||
run: |
|
||||
cargo test --locked --test knowledge_proof
|
||||
cargo test --locked --test executable_knowledge
|
||||
cargo test --locked --test prove
|
||||
- name: Full genuine Lean proof matrix
|
||||
env:
|
||||
MARQDO_PROOF_REQUIRE_LEAN: "1"
|
||||
run: |
|
||||
cargo test --locked --test prove_lean
|
||||
cargo test --locked --test prove_corpus
|
||||
cargo test --locked --test conformance
|
||||
@@ -0,0 +1,70 @@
|
||||
name: modular-proof-smoke
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "src/knowledge/**"
|
||||
- "src/sema/ir.rs"
|
||||
- "src/prove/**"
|
||||
- "tests/prove_lean.rs"
|
||||
- "doc/verification/skill-proof/**"
|
||||
- ".github/workflows/modular-proof-smoke.yml"
|
||||
workflow_dispatch:
|
||||
concurrency:
|
||||
group: modular-proof-smoke-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
modular:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Compile isolated modular proof candidates
|
||||
run: cargo test --locked --lib knowledge::composition::tests -- --nocapture
|
||||
- name: Compile parameter-projection proof backend
|
||||
run: cargo test --locked --lib knowledge::projection -- --nocapture
|
||||
- name: Compile pure-expression VC backend
|
||||
run: cargo test --locked --lib knowledge::expression::tests -- --nocapture
|
||||
- name: Unified contract engine and evidence lattice unit tests
|
||||
run: |
|
||||
cargo test --locked --lib knowledge::unified::tests -- --nocapture
|
||||
cargo test --locked --lib knowledge::evidence::tests -- --nocapture
|
||||
- name: Compile path-sensitive VCs
|
||||
run: cargo test --locked --lib knowledge::symbolic::tests -- --nocapture
|
||||
- name: Compile closed-argument VCs
|
||||
run: cargo test --locked --lib knowledge::vc::tests -- --nocapture
|
||||
- name: Install Lean 4.35
|
||||
run: |
|
||||
curl -sSf https://elan.lean-lang.org/elan-init.sh | sh -s -- -y --default-toolchain leanprover/lean4:v4.35.0
|
||||
echo "$HOME/.elan/bin" >> "$GITHUB_PATH"
|
||||
- name: Lean proof of exception, ABI and fuel-bound models
|
||||
run: |
|
||||
lean doc/verification/skill-proof/MarqdoModularProof.lean
|
||||
lean doc/verification/skill-proof/MarqdoEffects.lean
|
||||
- name: Independently composed Lean modules
|
||||
env:
|
||||
MARQDO_PROOF_REQUIRE_LEAN: "1"
|
||||
run: cargo test --locked --test prove_lean composition_emits_independently_replayable_caller_certificate -- --nocapture
|
||||
- name: Symbolic parameter projection with independent Lean replay
|
||||
env:
|
||||
MARQDO_PROOF_REQUIRE_LEAN: "1"
|
||||
run: cargo test --locked --test prove_lean projection_composition_proves_symbolic_caller_and_replays_from_source -- --nocapture
|
||||
- name: Independent arithmetic contract composition with real Lean
|
||||
env:
|
||||
MARQDO_PROOF_REQUIRE_LEAN: "1"
|
||||
run: cargo test --locked --test prove_lean pure_expression_composition_proves_and_replays_real_lean -- --nocapture
|
||||
- name: Three module DAG and branching caller with independent Lean replay
|
||||
env:
|
||||
MARQDO_PROOF_REQUIRE_LEAN: "1"
|
||||
run: cargo test --locked --test prove_lean unified_modular_contract_proves_multicall_branch_and_transitive_dag -- --nocapture
|
||||
- name: Regenerated provenance for original Lean certificates
|
||||
env:
|
||||
MARQDO_PROOF_REQUIRE_LEAN: "1"
|
||||
run: cargo test --locked --test prove_lean g2_certificate_hit_after_real_run -- --nocapture
|
||||
- name: Linear symbolic arithmetic path implication with real Lean
|
||||
env:
|
||||
MARQDO_PROOF_REQUIRE_LEAN: "1"
|
||||
run: cargo test --locked --test prove_lean arithmetic_symbolic_path_implication_uses_real_lean -- --nocapture
|
||||
- name: Symbolic path implication with real Lean
|
||||
env:
|
||||
MARQDO_PROOF_REQUIRE_LEAN: "1"
|
||||
run: cargo test --locked --test prove_lean symbolic_path_implication_uses_real_lean_without_runtime_promotion -- --nocapture
|
||||
@@ -0,0 +1,40 @@
|
||||
name: native-ai-flow
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- feat/native-ai-flow-recovery-20261118
|
||||
pull_request:
|
||||
paths:
|
||||
- 'plugins/agent/**'
|
||||
- 'ext/ai/flow.mq.md'
|
||||
- 'ext/ai/context.mq.md'
|
||||
- 'ext/ai/recovery.mq.md'
|
||||
- 'ext/ai/workflow.mq.md'
|
||||
- 'tests/ext/ai-native-*.mq.md'
|
||||
- '.github/workflows/native-ai-flow.yml'
|
||||
|
||||
jobs:
|
||||
agent:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Build the agent plugin
|
||||
run: cargo build -p marqdo_plugin_agent --locked
|
||||
- name: Run native agent and workflow tests
|
||||
run: cargo test -p marqdo_plugin_agent --locked
|
||||
- name: Check the public Marqdo ABI libraries
|
||||
run: |
|
||||
cargo run --locked -- check ext/ai/flow.mq.md
|
||||
cargo run --locked -- check ext/ai/context.mq.md
|
||||
cargo run --locked -- check ext/ai/recovery.mq.md
|
||||
cargo run --locked -- check ext/ai/workflow.mq.md
|
||||
cargo run --locked -- check tests/ext/ai-native-flow.mq.md
|
||||
cargo run --locked -- check tests/ext/ai-native-workflow.mq.md
|
||||
- name: Exercise offline integration through Marqdo
|
||||
env:
|
||||
MARQDO_AGENT_PLUGIN: ${{ github.workspace }}/target/debug/libagent.so
|
||||
run: |
|
||||
cargo run --locked -- run tests/ext/ai-native-flow.mq.md
|
||||
cargo run --locked -- run tests/ext/ai-native-workflow.mq.md
|
||||
Regular → Executable
File mode changed.
@@ -0,0 +1,43 @@
|
||||
name: Build Marqdo promotional video
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [docs/promo-video-271]
|
||||
paths:
|
||||
- scripts/make-procurement-promo.py
|
||||
- .github/workflows/promo-video.yml
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build-video:
|
||||
if: github.ref_name == 'docs/promo-video-271'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: true
|
||||
- name: Prepare video environment
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -qq -y ffmpeg fonts-noto-cjk
|
||||
python -m pip install --quiet --disable-pip-version-check pillow numpy
|
||||
ffmpeg -version | head -n 2
|
||||
- name: Compose 32-second Marqdo video
|
||||
run: python scripts/make-procurement-promo.py
|
||||
- name: Verify deliverable
|
||||
run: |
|
||||
test -s assets/marketing/marqdo-2.7.1-promo.mp4
|
||||
test -s assets/marketing/marqdo-2.7.1-poster.jpg
|
||||
test -s assets/marketing/marqdo-2.7.1-promo.srt
|
||||
ffprobe -v error -show_entries format=duration,size -of default=noprint_wrappers=1 assets/marketing/marqdo-2.7.1-promo.mp4
|
||||
- name: Commit video into promotional branch
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add assets/marketing/marqdo-2.7.1-promo.mp4 assets/marketing/marqdo-2.7.1-poster.jpg assets/marketing/marqdo-2.7.1-promo.srt
|
||||
git diff --cached --quiet || git commit -m "docs: render Marqdo 2.7.1 promotional video from existing assets"
|
||||
git push origin HEAD:docs/promo-video-271
|
||||
@@ -0,0 +1,115 @@
|
||||
# 判定流水线(marqdo prove)
|
||||
#
|
||||
# 验证「SKILL 编排文档 → Lean 4 → 自动证明」全链路:
|
||||
# 1. 构建内置 Lean 底座(MarqdoProof.lean)。
|
||||
# 2. 跑判定矩阵(tests/prove_lean.rs):真定理 proved、假定理 unproved、
|
||||
# 证书缓存命中跳判定、--require-lean 退出码。
|
||||
# 3. CI 硬性要求(MARQDO_PROOF_REQUIRE_LEAN=1):没有工具链即失败,
|
||||
# 不允许悄悄降级成 unverified。
|
||||
#
|
||||
# 说明:仓库不强制贡献者装 Lean——本工作流在装有 elan 的 runner 上运行;
|
||||
# 本地无 Lean 时判定状态为 unverified(advisory,不阻塞)。
|
||||
name: proof
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "src/prove/**"
|
||||
- "doc/verification/skill-proof/**"
|
||||
- "lib/**"
|
||||
- "tests/prove*.rs"
|
||||
- ".github/workflows/proof.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "src/prove/**"
|
||||
- "doc/verification/skill-proof/**"
|
||||
- "lib/**"
|
||||
- "tests/prove*.rs"
|
||||
- ".github/workflows/proof.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
proof:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust (1.81)
|
||||
run: |
|
||||
rustup toolchain install 1.81.0 --profile minimal
|
||||
rustup default 1.81.0
|
||||
|
||||
# leanprover/lean-action@v1 已移除 lean4-version;本仓库运行时只需 lean 二进制
|
||||
# (底座内嵌、不经 lake)。用 elan 钉 v4.35.0,与 doc/verification/skill-proof/lean-toolchain 一致。
|
||||
- name: Install Lean 4.35.0 (elan)
|
||||
run: |
|
||||
curl -sSf https://elan.lean-lang.org/elan-init.sh | sh -s -- -y --default-toolchain leanprover/lean4:v4.35.0
|
||||
echo "$HOME/.elan/bin" >> "$GITHUB_PATH"
|
||||
"$HOME/.elan/bin/lean" --version
|
||||
|
||||
- name: Verify embedded proof library
|
||||
run: |
|
||||
chmod +x scripts/check-proof-library.sh
|
||||
scripts/check-proof-library.sh
|
||||
|
||||
- name: Build
|
||||
run: cargo build --locked
|
||||
|
||||
- name: Judgment matrix (real Lean; CI requires toolchain)
|
||||
env:
|
||||
MARQDO_PROOF_REQUIRE_LEAN: "1"
|
||||
run: cargo test --locked --test prove_lean
|
||||
|
||||
- name: Rest of prove suite (no toolchain assumptions)
|
||||
run: cargo test --locked --test prove
|
||||
|
||||
- name: Corpus monotonicity — offline_checked ⊆ lean_proved (40 fixtures)
|
||||
env:
|
||||
MARQDO_PROOF_REQUIRE_LEAN: "1"
|
||||
run: cargo test --locked --test prove_corpus
|
||||
|
||||
- name: T4 differential consistency — interpreter == Lean
|
||||
env:
|
||||
MARQDO_PROOF_REQUIRE_LEAN: "1"
|
||||
run: cargo test --locked --test conformance
|
||||
|
||||
- name: Full sweep — divergence guard bites on injected fault
|
||||
env:
|
||||
MARQDO_PROOF_REQUIRE_LEAN: "1"
|
||||
run: |
|
||||
# A3:注入分歧必须显式失败(error[proof.divergence],退 1)——
|
||||
# 护栏失灵(静默落绿)比单点失败严重得多。
|
||||
set -e
|
||||
tmp=$(mktemp -d)
|
||||
cat > "$tmp/审批.mq.md" <<'FIXTURE'
|
||||
---
|
||||
markup: occlusion
|
||||
---
|
||||
|
||||
# 台账
|
||||
|
||||
## 记录
|
||||
+ `金额`
|
||||
|
||||
| 定理 | 结论 | 策略 |
|
||||
|---|---|---|
|
||||
| 记过即记 | 长度(轨迹) = 1 | auto |
|
||||
|
||||
**结果 = [登记](result.ok(value=`金额`))**
|
||||
|
||||
*结果*
|
||||
FIXTURE
|
||||
set +e
|
||||
out=$(cargo run --locked -- prove "$tmp/审批.mq.md" --fault-inject offline-claim --json 2>/dev/null)
|
||||
code=$?
|
||||
echo "$out" | head -c 400
|
||||
if [ "$code" -ne 1 ]; then
|
||||
echo "::error::注入分歧未被拦截(exit=$code)——单调性护栏失灵"
|
||||
exit 1
|
||||
fi
|
||||
echo "$out" | grep -q "proof.divergence" || {
|
||||
echo "::error::未出现 proof.divergence 诊断"
|
||||
exit 1
|
||||
}
|
||||
echo "divergence guard OK"
|
||||
@@ -5,6 +5,7 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -51,6 +52,7 @@ jobs:
|
||||
New-Item -ItemType Directory -Force -Path dist | Out-Null
|
||||
Push-Location vscode-extension
|
||||
npm ci
|
||||
npm version "$ver" --no-git-tag-version --allow-same-version
|
||||
npm run compile
|
||||
npx @vscode/vsce package --no-dependencies -o "../dist/marqdo-$ver.vsix"
|
||||
Pop-Location
|
||||
|
||||
Regular → Executable
+2
@@ -1,5 +1,7 @@
|
||||
/target/
|
||||
/dist/
|
||||
# Plugin unit tests use package-relative scratch checkpoints.
|
||||
/plugins/agent/target/
|
||||
|
||||
# Copied by gold harness for ABI plugins
|
||||
/tests/lib/demo.dll
|
||||
|
||||
+82
-1
@@ -1,6 +1,87 @@
|
||||
# Changelog
|
||||
|
||||
## Unreleased
|
||||
## v2.9.1 — 2026-11-18 · Full release / 正式补丁版本
|
||||
|
||||
Marqdo 2.9.1 修复 2.9.0 的库构建回归:`knowledge` 属于核心编译器,不再由 `cli` 特性门控,`default-features = false` 的下游库恢复可编译;并新增 feature-matrix CI 守卫。无运行时语义、插件 ABI 或证书格式变化。
|
||||
|
||||
**EN:** 2.9.1 fixes the 2.9.0 library regression where the core compiler's `knowledge` module was gated on `cli`, breaking `default-features = false` consumers; a feature-matrix CI gate now prevents regressions. No runtime semantics, plugin ABI or certificate format changes.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Library builds with `--no-default-features` again. `sema::ir` unconditionally
|
||||
emits `proof-index.json` / `proof-obligations.json` through `knowledge`, but
|
||||
`knowledge` was gated on `cli`; it is now part of the core compiler, so
|
||||
downstream crates using `default-features = false` no longer hit
|
||||
`E0433: could not find knowledge in the crate root`.
|
||||
- CI: `feature-matrix` checks the library with no features, `cli` only, and
|
||||
default features to prevent feature-gate regressions.
|
||||
|
||||
详情 / Details: [2.9.1 release notes](doc/releases/v2.9.1.md).
|
||||
|
||||
## v2.9.0 — 2026-11-18 · Full release / 正式完整版本
|
||||
|
||||
Marqdo Verified Knowledge Compiler: source-addressable knowledge proof artifacts, bounded Lean 4 modular contract composition, precise evidence grades, independent replay, and fail-closed unsupported semantics.
|
||||
|
||||
- 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 2.9.0(full)发布可寻址知识制品、统一纯函数模块化契约组合、真实 Lean 证书独立重放与证据等级;保留旧证明证书重放。仅支持明确的纯整数抽象子集,不宣称完整运行时正确性或所有函数自动可证。
|
||||
|
||||
详情 / Details: [2.9.0 release notes](doc/releases/v2.9.0.md) · [Trust boundaries](doc/design/verified-knowledge-compiler-boundaries.md).
|
||||
|
||||
## Ext pack v2.8.1 — 2026-11-18
|
||||
|
||||
### Highlights
|
||||
|
||||
**AI native durable workflow(CLI 仍为 v2.8.0)**:`ext/ai` 以插件侧步骤机交付持久化
|
||||
工作流(`workflow`/`flow`/`context`/`recovery`),含有界模型选择、作用域上下文、
|
||||
只读失败恢复、`inspect`/`list` 与可隔离 `resume_dir`。Windows 打包使用 `path.join`
|
||||
根路径与 `System32\tar.exe`。详见 [双语发布说明](doc/releases/ext-2.8.1.md)。
|
||||
|
||||
```bash
|
||||
marqdo ext add agent # CDN latest → 2.8.1
|
||||
# 或:MARQDO_EXT_VERSION=2.8.1 marqdo ext add agent
|
||||
```
|
||||
|
||||
**核心表面 Δ(Core surface Δ)**:**无增删**——仅 Extension / Agent Runtime。
|
||||
|
||||
### Added
|
||||
|
||||
- `ext/ai/workflow`:`open/next/commit/cancel/tick/retry_*`,以及只读 `inspect`/`list`
|
||||
与各操作的 host-relative `resume_dir`。
|
||||
- `ext/ai/flow` · `context` · `recovery`:ask/choose、作用域打包、CheckpointV2 恢复面。
|
||||
- Agent ABI:`agent_workflow_*`、`agent_choice_parse`、`agent_context_scope`、
|
||||
`agent_input_*`、`agent_parallel_report`。
|
||||
- Offline fixtures:`tests/ext/ai-native-flow.mq.md`、`tests/ext/ai-native-workflow.mq.md`;
|
||||
CI:`.github/workflows/native-ai-flow.yml`。
|
||||
|
||||
### Fixed
|
||||
|
||||
- `flow.choose` no longer leaks a branch-local `parsed` value into the function
|
||||
contract; the repaired-choice path is fully scoped.
|
||||
- CI builds the agent cdylib and runs offline integration without the removed
|
||||
`run --effects` flag, using `MARQDO_AGENT_PLUGIN` instead.
|
||||
- Atomic checkpoint/effect temp names no longer collide under parallel writes;
|
||||
resume tests no longer race on process-wide cwd.
|
||||
- Windows `extension-release`:engineering root 使用 `path.join` / cwd 回退;
|
||||
ZIP 显式调用 `System32\tar.exe`(bsdtar);`packs.ci` 授予 `fs.read`。
|
||||
|
||||
### Changed
|
||||
|
||||
- 扩展包 SemVer **2.8.1**(`ext/VERSION`);与 CLI **v2.8.0** 可独立安装。
|
||||
- 分支已合并 v2.8.0 依赖锁后的 AI 工作流增量,不再从 2.7.1 基线分叉。
|
||||
|
||||
## v2.8.0 — 2026-11-17
|
||||
|
||||
`marqdo prove` 正式发布:定理表 → Lean 4 证明 → 自动判定。离线符号执行(F1–F5)无工具链可用,`checked` 永远弱于 `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.
|
||||
|
||||
详见 [双语发布说明](doc/releases/v2.8.0.md)。
|
||||
|
||||
## v2.7.1 — 2026-11-11
|
||||
|
||||
|
||||
Generated
+15
-15
@@ -143,9 +143,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.20.3"
|
||||
version = "3.20.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
|
||||
checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db"
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
@@ -582,9 +582,9 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.106"
|
||||
version = "0.3.107"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5"
|
||||
checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"futures-util",
|
||||
@@ -615,7 +615,7 @@ checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
|
||||
|
||||
[[package]]
|
||||
name = "marqdo"
|
||||
version = "2.7.1"
|
||||
version = "2.9.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"assert_cmd",
|
||||
@@ -656,7 +656,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "marqdo-wasm"
|
||||
version = "2.7.1"
|
||||
version = "2.9.1"
|
||||
dependencies = [
|
||||
"marqdo",
|
||||
"serde_json",
|
||||
@@ -668,6 +668,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"marqdo-plugin-sdk",
|
||||
"pulldown-cmark",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
@@ -1456,12 +1457,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.129"
|
||||
version = "0.2.130"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409"
|
||||
checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
"rustversion",
|
||||
"wasm-bindgen-macro",
|
||||
"wasm-bindgen-shared",
|
||||
@@ -1469,9 +1469,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.129"
|
||||
version = "0.2.130"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535"
|
||||
checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"wasm-bindgen-macro-support",
|
||||
@@ -1479,9 +1479,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.129"
|
||||
version = "0.2.130"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7"
|
||||
checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"proc-macro2",
|
||||
@@ -1492,9 +1492,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.129"
|
||||
version = "0.2.130"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6"
|
||||
checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
+7
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "marqdo"
|
||||
version = "2.7.1"
|
||||
version = "2.9.1"
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "Marqdo — Markdown markers as an interpreted programming language"
|
||||
@@ -12,6 +12,12 @@ name = "marqdo"
|
||||
path = "src/main.rs"
|
||||
required-features = ["cli"]
|
||||
|
||||
# Lean 判定集成测试(独立目标:缓存/判定/退出码矩阵,见 tests/prove_lean.rs)。
|
||||
[[test]]
|
||||
name = "prove_lean"
|
||||
path = "tests/prove_lean.rs"
|
||||
required-features = ["cli"]
|
||||
|
||||
[features]
|
||||
default = ["native"]
|
||||
native = ["cli", "view", "net-host", "plugin-host", "exec-host", "fs-host", "tty"]
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<p align="center"><em>让 SKILL 真正成为工具:文档即知识,知识即可执行。</em></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/cflmy/marqdo/releases/tag/v2.7.1"><img alt="release" src="https://img.shields.io/badge/release-v2.7.1-DDBA86?style=flat-square"></a>
|
||||
<a href="https://github.com/cflmy/marqdo/releases/tag/v2.9.0"><img alt="release" src="https://img.shields.io/badge/release-v2.9.0-DDBA86?style=flat-square"></a>
|
||||
<a href="LICENSE"><img alt="Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square"></a>
|
||||
<img alt="Rust runtime" src="https://img.shields.io/badge/runtime-Rust-B38E68?style=flat-square">
|
||||
<img alt="Pure by default" src="https://img.shields.io/badge/call-pure_by_default-467C83?style=flat-square">
|
||||
@@ -15,21 +15,43 @@
|
||||
**Not a prompt wrapper.** The document is interpreted as a program by Marqdo; its tool functions are not merely natural-language instructions.
|
||||
|
||||
<p align="center">
|
||||
<a href="#one-markdown-file-three-views-real-execution">56s film</a> ·
|
||||
<a href="#quickstart--one-function-one-command">Quickstart</a> ·
|
||||
<a href="#a-procurement-skill-with-a-600-budget">Procurement demo</a> ·
|
||||
<a href="#explore-the-view">View</a> ·
|
||||
<a href="doc/library-development.mq.md">Guide</a> ·
|
||||
<a href="https://www.marqdo.com/">Website</a> ·
|
||||
<a href="doc/releases/v2.7.1.md">Release notes</a>
|
||||
<a href="doc/releases/v2.9.0.md">Release notes</a>
|
||||
</p>
|
||||
|
||||

|
||||
## Marqdo 2.9.0 — Verified Knowledge Compiler
|
||||
|
||||
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>
|
||||
|
||||
**One `.mq.md` source, three ways to interact:**
|
||||
|
||||
| Source | Standard Markdown | Marqdo runtime + View |
|
||||
|---|---|---|
|
||||
| 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` |
|
||||
|
||||
|
||||
<sub>Animated walkthrough assembled from **real Marqdo 2.7.1 function-call results**, including the accepted **simulated** order and an over-budget refusal. Curated frames, not a recording of typing or a production transaction. [Reproduce the capture](scripts/capture-procurement-showcase.py) · [CI run](https://github.com/cflmy/marqdo/actions/runs/43358103498).</sub>
|
||||
|
||||
## Quickstart — one function, one command
|
||||
|
||||
Install the [2.7.1 CLI release for Windows or Linux](https://github.com/cflmy/marqdo/releases/tag/v2.7.1), then run from this repository's root:
|
||||
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:
|
||||
|
||||
```bash
|
||||
marqdo call examples/calculator.mq.md 计算器.加法 a=2 b=3
|
||||
@@ -44,6 +66,10 @@ The function heading is the callable name. The function's explanation, parameter
|
||||
|
||||
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.
|
||||
marqdo call examples/procurement/index.mq.md 查询采购商 "采购商状态='正常'" --json
|
||||
@@ -79,9 +105,9 @@ Marqdo 2.7.1 improves the interactive reading experience: implementation details
|
||||
marqdo view examples/procurement --no-open
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
<sub>**Actual screenshot** captured in Chromium from a Marqdo **2.7.1** View static export, scrolled to `向采购商发工单`. It shows the real rendered document, not a promotional mockup. [Screenshot generation source](scripts/capture-procurement-showcase.py).</sub>
|
||||
<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>
|
||||
|
||||
## One document, multiple uses
|
||||
|
||||
@@ -95,12 +121,23 @@ marqdo view examples/procurement --no-open
|
||||
|
||||
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.
|
||||
|
||||
**Resources:** [Release v2.7.1](https://github.com/cflmy/marqdo/releases/tag/v2.7.1) · [Procurement example](examples/procurement/index.mq.md) · [Executable library authoring](doc/library-development.mq.md) · [Function calling](public/features/22-函数调用.mq.md) · [Link syntax](doc/design/link-syntax.md) · [Website](https://www.marqdo.com/)
|
||||
**Resources:** [Release v2.8.0](https://github.com/cflmy/marqdo/releases/tag/v2.8.0) · [Ext pack 2.8.1](https://github.com/cflmy/marqdo/releases/tag/ext-v2.8.1) · [Procurement example](examples/procurement/index.mq.md) · [Executable library authoring](doc/library-development.mq.md) · [Function calling](public/features/22-函数调用.mq.md) · [Link syntax](doc/design/link-syntax.md) · [Website](https://www.marqdo.com/)
|
||||
|
||||
---
|
||||
|
||||
## Deep dive · 语言、设计与执行系统
|
||||
|
||||
标准库单文件本身就是手册:直接阅读[文件库](lib/文件.mq.md)、[集合库](lib/表.mq.md)等源码,按函数标题下的参数表、返回契约和动作说明调用;[工程实践](examples/stdlib-handbook/索引.mq.md)演示文件整理、CSV 汇总与文档维护。
|
||||
开发标准库和拓展库请直接阅读[可执行库开发指南](doc/library-development.mq.md):契约表、叙述式实现、遮蔽调用与多文件工程组织均有可运行示范。
|
||||
|
||||
当前 CLI **2.8.0** 新增 `marqdo prove`:知识文件的定理表编译为 Lean 4 并自动判定真假——没有 Lean 工具链也能离线符号执行(诚实降级,绝不冒充证明),有 Lean 时全链路证明并给出反例见证。参见[发布说明](doc/releases/v2.8.0.md)。
|
||||
|
||||
独立拓展包 **2.8.1**(CLI 仍为 2.8.0):`ext/ai` 插件侧持久化工作流(选择 / 作用域上下文 / 只读失败恢复 / `inspect`)。`marqdo ext add agent` → CDN latest。参见[拓展包说明](doc/releases/ext-2.8.1.md)。
|
||||
|
||||
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`.
|
||||
|
||||
## 核心优势:可执行知识(Executable Knowledge)
|
||||
|
||||
> **Knowledge That Can Run —— 知识即可执行。**
|
||||
@@ -220,6 +257,7 @@ Agent Skills already support scripts; Marqdo's claim is **one document-native la
|
||||
3. **程序即 AI 长期记忆**:`.mq.md` 工程 = 可执行知识库 = AI 的世界模型(Executable Knowledge Representation)。
|
||||
4. **链接即调用 / 可执行知识图**:`[描述](类.函数)` 既是文档链接,也是类/函数调用;编译器解析目标、校验签名、返回 LinkInfo;`view` 显示调用点;`.mq.md` 之间的链接长成文档图 + 知识图 + 程序图(Executable Knowledge Graph)。
|
||||
5. **知识可测试**:文档中的示例表自动执行;知识与执行结果不一致会被机器报告——Knowledge-Code Coherence 从理念变为日常。
|
||||
6. **知识可证明**:知识文件内的定理表 → Lean 4 定理 → 自动判定(`marqdo prove`);离线符号执行与 Lean 单调一致,分歧显式报错——Trusted Knowledge,判定器缺陷优先于任何绿灯。
|
||||
6. **可靠性基准**:让同一个 AI 分别用 Python / TypeScript / Marqdo 完成真实任务,测量生成长度、语法 / 语义错误率、修复轮次、token 消耗与人类阅读 / 修改成本——用实验数据证明「文档型语法降低 LLM 生成熵」。
|
||||
|
||||
---
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 132 KiB |
Binary file not shown.
@@ -0,0 +1,35 @@
|
||||
1
|
||||
00:00:00,000 --> 00:00:04,800
|
||||
Your SKILL is now a TOOL.
|
||||
让 Markdown 直接承载可执行语义。
|
||||
|
||||
2
|
||||
00:00:04,800 --> 00:00:11,600
|
||||
源码态:标题、段落、表格都沿用 Markdown。
|
||||
执行逻辑就在文档之中。
|
||||
|
||||
3
|
||||
00:00:11,600 --> 00:00:18,000
|
||||
渲染态:同一份代码也能成为普通 Markdown 文档。
|
||||
|
||||
4
|
||||
00:00:18,000 --> 00:00:25,000
|
||||
源码态、标准 Markdown 渲染态、Marqdo View 态。
|
||||
三种视图,同一份源文件。
|
||||
|
||||
5
|
||||
00:00:25,000 --> 00:00:32,500
|
||||
一份 .mq.md,既可以阅读,也可以编译执行。
|
||||
|
||||
6
|
||||
00:00:32,500 --> 00:00:42,000
|
||||
真实 View 截图:函数调用和值沿着优雅曲线呈现。
|
||||
|
||||
7
|
||||
00:00:42,000 --> 00:00:50,800
|
||||
预算校验不是文字承诺,而是函数执行。
|
||||
模拟订单通过或拒绝,均由运行时返回结果。
|
||||
|
||||
8
|
||||
00:00:50,800 --> 00:00:56,000
|
||||
Marqdo 2.7.1 · github.com/cflmy/marqdo
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
1
|
||||
00:00:00,000 --> 00:00:03,900
|
||||
Your SKILL is now a TOOL.
|
||||
让 SKILL 真正成为工具。
|
||||
|
||||
2
|
||||
00:00:03,900 --> 00:00:09,000
|
||||
One readable document. Callable business logic.
|
||||
规则、数据、工具在同一份文档里。
|
||||
|
||||
3
|
||||
00:00:09,000 --> 00:00:17,400
|
||||
Five verified CLI calls, from quote to decision.
|
||||
真实 CLI 结果:询价、预算、模拟发单。
|
||||
|
||||
4
|
||||
00:00:17,400 --> 00:00:23,400
|
||||
¥120 spent: mock order. ¥360 spent: rejected.
|
||||
¥120 时模拟通过;¥360 时预算不足。
|
||||
|
||||
5
|
||||
00:00:23,400 --> 00:00:29,000
|
||||
Inspect the actual document in Marqdo View.
|
||||
查看 Marqdo 真实 View 页面。
|
||||
|
||||
6
|
||||
00:00:29,000 --> 00:00:32,000
|
||||
github.com/cflmy/marqdo
|
||||
开源 · Marqdo 2.7.1
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 161 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.9 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 523 KiB |
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "marqdo-wasm"
|
||||
version = "2.7.1"
|
||||
version = "2.9.1"
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "Marqdo interpreter as WebAssembly (browser host bridge)"
|
||||
|
||||
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
File mode changed.
Vendored
+12
@@ -1,3 +1,15 @@
|
||||
marqdo (2.9.1-1ppa1) noble; urgency=medium
|
||||
|
||||
* Release 2.9.1; see the reviewed upstream CHANGELOG.
|
||||
|
||||
-- Marqdo Maintainers <cflmy@users.noreply.github.com> Wed, 18 Nov 2026 18:43:10 +0800
|
||||
|
||||
marqdo (2.8.0-1ppa1) noble; urgency=medium
|
||||
|
||||
* Release 2.8.0; see the reviewed upstream CHANGELOG.
|
||||
|
||||
-- Marqdo Maintainers <cflmy@users.noreply.github.com> Wed, 18 Nov 2026 10:24:08 +0800
|
||||
|
||||
marqdo (2.7.1-1ppa2) noble; urgency=medium
|
||||
|
||||
* Release 2.7.1; see the reviewed upstream CHANGELOG.
|
||||
|
||||
File mode changed.
File mode changed.
File mode changed.
File mode changed.
File mode changed.
File mode changed.
Regular → Executable
+3
@@ -19,6 +19,9 @@
|
||||
|
||||
| 文档 | 摘要 |
|
||||
|------|------|
|
||||
| [design/prove-cli.md](design/prove-cli.md) | **Proposed:`marqdo prove` 设计**;SKILL 控制平面 → Lean 4、函数级定理表与语言习惯审查、离线判定片段、`proved`/`checked` 诚实性契约、无公理 TCB |
|
||||
| [roadmap/prove.md](roadmap/prove.md) | **Proposed:`marqdo prove` 实施路线**;P0–P3 周计划、8 类测试矩阵(单调性/一致性/不执行/子集/定理表/CLI/缓存/编码)、CI 与验收证据 |
|
||||
| [adr/0010-skill-proof-boundary.md](adr/0010-skill-proof-boundary.md) | **ADR 0010**:定理表作为契约表第四角色、可证子集封闭、Lean 为唯一 `proved` 来源、顾问式不强制 |
|
||||
| [roadmap/agent-reliability-crossrepo-2026-10-27.md](roadmap/agent-reliability-crossrepo-2026-10-27.md) | **Proposed:跨仓 Agent 可靠性开发计划**;M-A0–M-A6 ∥ Q-A0–Q-A7 排期、依赖图、F01–F20 映射、MA-T*/QA-* 验收与第一刀切片;协议真源仍见下方设计文档 |
|
||||
| [design/agent-reliability-tools-resources-2026-10-27.md](design/agent-reliability-tools-resources-2026-10-27.md) | **Proposed:智能体能力补足**;基于 `16f26d7`,增量设计错误恢复、检查点/效应账本、结构化工具、输出通道、上下文与只读资源视图;含跨仓边界、阶段计划和故障验收 |
|
||||
| [research/agent-capabilities-2026-10-27.md](research/agent-capabilities-2026-10-27.md) | **官方能力调研与源码复核**;OpenAI/Claude/Gemini/LangGraph/Deep Agents/MCP,求道当前问题 F01–F20;区分现有能力、设计推导与待实测项 |
|
||||
|
||||
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Executable
+79
@@ -0,0 +1,79 @@
|
||||
# ADR 0010: SKILL 证明边界:定理表、可证子集与顾问式判定
|
||||
|
||||
| 项目 | 约定 |
|
||||
|---|---|
|
||||
| 状态 | **Accepted(决策已定)**;实现未开始,路线见 [roadmap/prove.md](../roadmap/prove.md) |
|
||||
| 日期 | 2026-11-13 |
|
||||
| 设计 | [design/prove-cli.md](../design/prove-cli.md) |
|
||||
| 相关 | [core-surface.md](../design/core-surface.md)(不新增标记)· [layers.md](../design/layers.md)(Language 层扩表角色)· [contract.rs](../../src/contract.rs)(既有契约表提取)· [replay-policy](../../verification/replay-policy/README.md)(Lean 伴随判定先例) |
|
||||
|
||||
## 背景
|
||||
|
||||
Agent 改写 SKILL 后,人需要逐行确认"分支是否绕开审核、失败是否被吞掉"。这类**控制平面**性质适合形式化:编排是带条件的有限 DAG,没有死循环、没有指针。同时,把整个 Marqdo 当通用语言编译到 Lean 会立刻撞上字符串/JSON/浮点/IO 的语义鸿沟,收益被稀释。
|
||||
|
||||
项目已有一条 Lean 纪律:`verification/replay-policy` 用 Lean 做唯一判定,Rust 不保留第二份实现,缺伴随进程时失败关闭。本 ADR 决定把同样的纪律用于 SKILL 编排,但**降级为顾问式**:证明用于减少审核量,不作为发布门禁。
|
||||
|
||||
## 决策
|
||||
|
||||
1. **定理是契约表的第四种角色**,不是新标记。
|
||||
函数体首条可执行语句之前可放一张「定理表」(`定理 | 结论 | 前提 | 策略`),与 `参数`/`返回`/`字段` 表同槽位;解析期提取进 `Function.claims`,从 body 移除,不参与运行。核心标记计数不变,`CORE_CONSTRUCTS` 不增行;`layers.md` 的 Language 清单补记该角色。
|
||||
|
||||
2. **可证子集显式封闭**:无 `while`、无递归、无动态派发(插件、变量函数名、`code` 值调用)。越界函数被跳过(`rejected`),不降级成不透明块。外部操作是 `Env := Op → Val` 参数,不是公理;后置条件只能来自 `假设` 表并成为定理前提。
|
||||
|
||||
3. **Lean 是唯一能产生 `proved` 的判定器**。离线判定只到 `checked`,且被限制在一个极小的片段(路径枚举、轨迹、字面结果、命题组合、单变量区间),凡是离线判定为真的定理都必须同时生成 Lean 脚本。运行期若 Lean 可用则复核;离线 `checked` 而 Lean 未关闭视为内部错误(`proof.divergence`),以 Lean 为准并退出非零。
|
||||
|
||||
4. **顾问式,不强制**。默认退出码只对"作者写下的定理未被关闭"(`unproved`)与工具错误非零;缺工具链、`rejected`、`unverified` 默认 0。需要严格覆盖的调用方显式传 `--require-lean`。规范与技能手册**推荐**在发布 SKILL 前运行,但不设为门禁。
|
||||
|
||||
5. **`prove` 不执行被证程序**。只读源码、写缓存与 `--emit` 目录;这一点由测试夹具(带 `fs.write` 的函数)守住。
|
||||
|
||||
## 备选与取舍
|
||||
|
||||
| 备选 | 否决理由 |
|
||||
|---|---|
|
||||
| frontmatter `proof:` 块 | 丢函数作用域与行级锚点;多函数文件无法分派;诊断指不回具体行 |
|
||||
| `# 证明` 标题 | `#` 是对象、`##` 是函数;新增"标题=命题"破坏"标题即可调用单元"的既有习惯,还会进命名空间 |
|
||||
| ` ```proof ` 围栏 | 代码围栏必须跟在空赋值后,为写定理先造死变量,比表更别扭;且会被当作可执行值 |
|
||||
| 普通注释承载定理 | 注释不参与语义,无法可靠区分说明与定理,拿不到行锚点 |
|
||||
| 旁挂 `.proof.md` | 把真理拆成两份,违背"文档与代码同一份"的项目前提 |
|
||||
| 细化类型(refinement types) | 语义增量过大,且与既有契约表形成两份作者真相 |
|
||||
| 强制门禁(proved 才能发布) | 与"降低审核难度"的目标冲突;无 Lean 的团队会绕过工具 |
|
||||
|
||||
## 后果
|
||||
|
||||
**正面**
|
||||
|
||||
- 作者在一个地方写清"这条编排保证什么",机器可判定、行号可定位;
|
||||
- 定理表与契约表同一提取路径,`check` / `view` / `catalog` 可逐步接入,不产生第二套声明;
|
||||
- 外部依赖以假设形式显式化,证书是本项目一贯的"可复核证据";
|
||||
- 不新增核心标记,守卫测试与文档计数不膨胀。
|
||||
|
||||
**负面 / 代价**
|
||||
|
||||
- 新增一个语言层语义角色与一个 CLI 命令,需要 ADR + 测试 + 文档(本 ADR 即准入材料);
|
||||
- 离线判定器是新代码,必须长期用 Lean 语料护栏,防止"过度自信";
|
||||
- 作者可能误以为定理会在运行时生效——需要文档、`view` 与 `check` 三处反复澄清;
|
||||
- `proved` 容易被读成"整份 SKILL 安全"——README 必须写死"只对陈述负责"。
|
||||
|
||||
## 语义增量清单
|
||||
|
||||
| 新增 | 是否进运行时 | 说明 |
|
||||
|---|---|---|
|
||||
| `Function.claims` | 否 | 与 `Function.contract` 同类的声明元数据 |
|
||||
| `结果` / `轨迹` 与 `包含` / `长度` / `下标` | 否 | 仅定理作用域;与普通表达式作用域隔离 |
|
||||
| `check --proof` | 否 | 静态校验,默认关 |
|
||||
|
||||
不新增:求值规则、作用域规则、调用约定、核心标记、类型系统扩展。同名遮蔽(参数或局部变量叫 `结果`/`轨迹`)一律报 `proof.name_shadow`,不做隐式优先。
|
||||
|
||||
## 验收(摘要)
|
||||
|
||||
- 核心表面:`cargo test --test core_surface` 不变红;`CORE_CONSTRUCTS` 计数不变。
|
||||
- 单调性:语料中每条离线 `checked` 的定理,Lean 均 `proved`;分歧为 0。
|
||||
- 不执行:带 `fs.write` 的夹具在 `prove` 后无副作用。
|
||||
- 确定性:同输入两次 `emit` 字节一致。
|
||||
- 诚实性:文本、JSON、证书三处对 `checked`/`proved` 的措辞一致。
|
||||
|
||||
## 未决(不阻塞实现)
|
||||
|
||||
- `假设` 表是否需要扩展列(`来源`、`责任方`)。
|
||||
- `--all` 的聚合粒度(按文件/按函数)。
|
||||
- 证书是否需要签名,以及签名由谁持有。
|
||||
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Loaded 100 of 1841 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user