Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
b69a90501d | ||
|
|
7ff881f506 | ||
|
|
9acbe10986 | ||
|
|
81989a26d7 | ||
|
|
cf0ba6dccd | ||
|
|
0de703f86a | ||
|
|
4907f92d84 |
No files matched your search
@@ -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
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
name: capture-procurement-marketing-assets
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [docs/executable-skill-showcase-271]
|
||||||
|
paths:
|
||||||
|
- "scripts/capture-procurement-showcase.py"
|
||||||
|
- ".github/workflows/capture-procurement-marketing.yml"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
capture:
|
||||||
|
if: github.ref_name == 'docs/executable-skill-showcase-271'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: true
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
- name: Prepare Chrome, Chinese fonts and Python imaging
|
||||||
|
run: |
|
||||||
|
python -m pip install --quiet pillow selenium
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install -y -qq fonts-noto-cjk
|
||||||
|
google-chrome --version
|
||||||
|
- name: Download Marqdo v2.7.1 Linux release
|
||||||
|
run: |
|
||||||
|
mkdir -p /tmp/marqdo-marketing-cli
|
||||||
|
curl -fL --retry 3 "https://github.com/cflmy/marqdo/releases/download/v2.7.1/marqdo-2.7.1-x86_64-unknown-linux-gnu.zip" -o /tmp/marqdo-marketing.zip
|
||||||
|
unzip -q /tmp/marqdo-marketing.zip -d /tmp/marqdo-marketing-cli
|
||||||
|
BIN="$(find /tmp/marqdo-marketing-cli -type f -name marqdo | head -n 1)"
|
||||||
|
test -n "$BIN"
|
||||||
|
chmod +x "$BIN"
|
||||||
|
echo "CLI_BIN=$BIN" >> "$GITHUB_ENV"
|
||||||
|
- name: Record real command outputs and capture real View
|
||||||
|
run: python scripts/capture-procurement-showcase.py --cli "$CLI_BIN"
|
||||||
|
- name: Commit reproducible promotional assets
|
||||||
|
run: |
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
git add assets/marketing/procurement-cli.gif assets/marketing/procurement-view.png
|
||||||
|
git diff --cached --quiet || git commit -m "docs: capture live procurement CLI GIF and View screenshot"
|
||||||
|
git push origin HEAD:docs/executable-skill-showcase-271
|
||||||
@@ -15,6 +15,22 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cargo build -p marqdo_plugin_agent --locked
|
cargo build -p marqdo_plugin_agent --locked
|
||||||
cargo build -p marqdo_plugin_llm --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)
|
- name: Workbench contracts (M00–M06 / F-subset)
|
||||||
run: cargo test --test workbench_contracts --locked
|
run: cargo test --test workbench_contracts --locked
|
||||||
- name: Offline executable-knowledge gate
|
- name: Offline executable-knowledge gate
|
||||||
|
|||||||
@@ -2,7 +2,15 @@
|
|||||||
name: Extension Release
|
name: Extension Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: Extension version to validate
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- codex/ext-release-validation
|
||||||
tags:
|
tags:
|
||||||
- "ext-v*"
|
- "ext-v*"
|
||||||
|
|
||||||
@@ -14,6 +22,7 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GITHUB_REF_NAME_OVERRIDE: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || format('ext-v{0}', inputs.version || '2.8.1') }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -32,17 +41,23 @@ 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
|
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
|
bash scripts/build-web-plugin.sh
|
||||||
- name: Build and validate the runner's exact pack bytes
|
- name: Build and validate the runner's exact pack bytes
|
||||||
shell: pwsh
|
shell: bash
|
||||||
run: ./target/release/marqdo.exe call skills/marqdo-release/packs.mq.md ci --effects plugin,fs.write,environment.read --fs-root . --require-ok --json
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
GITHUB_REF_NAME="$GITHUB_REF_NAME_OVERRIDE" ./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
|
- name: Attach source and Windows native packs without replacement
|
||||||
shell: pwsh
|
if: startsWith(github.ref, 'refs/tags/ext-v')
|
||||||
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:
|
linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: windows
|
needs: windows
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GITHUB_REF_NAME_OVERRIDE: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || format('ext-v{0}', inputs.version || '2.8.1') }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -59,6 +74,7 @@ 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
|
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
|
bash scripts/build-web-plugin.sh
|
||||||
- name: Build and validate the runner's exact pack bytes
|
- 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: GITHUB_REF_NAME="$GITHUB_REF_NAME_OVERRIDE" 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
|
- name: Attach Linux native pack without replacement
|
||||||
|
if: startsWith(github.ref, 'refs/tags/ext-v')
|
||||||
run: target/release/marqdo call skills/marqdo-release/packs.mq.md attach_ci --effects plugin,fs.read,environment.read --fs-root . --require-ok --json
|
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 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
name: procurement-example-smoke
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, docs/executable-skill-showcase-271]
|
||||||
|
paths: ["examples/procurement/**", ".github/workflows/procurement-example.yml"]
|
||||||
|
pull_request:
|
||||||
|
paths: ["examples/procurement/**", ".github/workflows/procurement-example.yml"]
|
||||||
|
jobs:
|
||||||
|
smoke:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Fetch released v2.7.1 Linux CLI
|
||||||
|
run: |
|
||||||
|
curl -fL --retry 3 "https://github.com/cflmy/marqdo/releases/download/v2.7.1/marqdo-2.7.1-x86_64-unknown-linux-gnu.zip" -o /tmp/marqdo.zip
|
||||||
|
unzip -q /tmp/marqdo.zip -d /tmp
|
||||||
|
BIN="$(find /tmp -type f -name marqdo | head -n 1)"
|
||||||
|
test -n "$BIN"
|
||||||
|
chmod +x "$BIN"
|
||||||
|
echo "CLI_BIN=$BIN" >> "$GITHUB_ENV"
|
||||||
|
- name: Check and run procurement skill
|
||||||
|
run: |
|
||||||
|
"$CLI_BIN" check examples/procurement/index.mq.md
|
||||||
|
"$CLI_BIN" call examples/procurement/index.mq.md 查询余额 已花费=120 --json
|
||||||
|
"$CLI_BIN" call examples/procurement/index.mq.md 向采购商发工单 "采购商标识符='SUP_JN'" 数量=8 单价=36 已花费=120 交付要求天数=7 --effects time.read,process.control --json | tee /tmp/allowed.json
|
||||||
|
"$CLI_BIN" call examples/procurement/index.mq.md 向采购商发工单 "采购商标识符='SUP_JN'" 数量=8 单价=36 已花费=360 交付要求天数=7 --effects time.read,process.control --json | tee /tmp/denied.json
|
||||||
|
grep -q '本地模拟' /tmp/allowed.json
|
||||||
|
grep -q '采购金额超过' /tmp/denied.json
|
||||||
@@ -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"
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
/target/
|
/target/
|
||||||
/dist/
|
/dist/
|
||||||
|
# Plugin unit tests use package-relative scratch checkpoints.
|
||||||
|
/plugins/agent/target/
|
||||||
|
|
||||||
# Copied by gold harness for ABI plugins
|
# Copied by gold harness for ABI plugins
|
||||||
/tests/lib/demo.dll
|
/tests/lib/demo.dll
|
||||||
|
|||||||
@@ -2,6 +2,56 @@
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## 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
|
## v2.7.1 — 2026-11-11
|
||||||
|
|
||||||
CLI 修复发布:View 实际逻辑的手动开合不再被布局重排或运行结果刷新覆盖;函数、链接、列表和记录按内容排版,手机详情整行展示。核心仍为 19 个构造;拓展库保留 2.7.0。
|
CLI 修复发布:View 实际逻辑的手动开合不再被布局重排或运行结果刷新覆盖;函数、链接、列表和记录按内容排版,手机详情整行展示。核心仍为 19 个构造;拓展库保留 2.7.0。
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# This file is automatically @generated by Cargo.
|
# This file is automatically @generated by Cargo.
|
||||||
# It is not intended for manual editing.
|
# It is not intended for manual editing.
|
||||||
version = 4
|
version = 3
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "adler2"
|
name = "adler2"
|
||||||
@@ -143,9 +143,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bumpalo"
|
name = "bumpalo"
|
||||||
version = "3.20.3"
|
version = "3.20.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
|
checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "byteorder"
|
name = "byteorder"
|
||||||
@@ -582,9 +582,9 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "js-sys"
|
name = "js-sys"
|
||||||
version = "0.3.106"
|
version = "0.3.107"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5"
|
checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@@ -615,7 +615,7 @@ checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "marqdo"
|
name = "marqdo"
|
||||||
version = "2.7.1"
|
version = "2.8.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"assert_cmd",
|
"assert_cmd",
|
||||||
@@ -656,7 +656,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "marqdo-wasm"
|
name = "marqdo-wasm"
|
||||||
version = "2.7.1"
|
version = "2.8.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"marqdo",
|
"marqdo",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
@@ -668,6 +668,7 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"marqdo-plugin-sdk",
|
"marqdo-plugin-sdk",
|
||||||
|
"pulldown-cmark",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1456,12 +1457,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen"
|
name = "wasm-bindgen"
|
||||||
version = "0.2.129"
|
version = "0.2.130"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409"
|
checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"once_cell",
|
|
||||||
"rustversion",
|
"rustversion",
|
||||||
"wasm-bindgen-macro",
|
"wasm-bindgen-macro",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
@@ -1469,9 +1469,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-macro"
|
name = "wasm-bindgen-macro"
|
||||||
version = "0.2.129"
|
version = "0.2.130"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535"
|
checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"wasm-bindgen-macro-support",
|
"wasm-bindgen-macro-support",
|
||||||
@@ -1479,9 +1479,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-macro-support"
|
name = "wasm-bindgen-macro-support"
|
||||||
version = "0.2.129"
|
version = "0.2.130"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7"
|
checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bumpalo",
|
"bumpalo",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
@@ -1492,9 +1492,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-shared"
|
name = "wasm-bindgen-shared"
|
||||||
version = "0.2.129"
|
version = "0.2.130"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6"
|
checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "marqdo"
|
name = "marqdo"
|
||||||
version = "2.7.1"
|
version = "2.8.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
description = "Marqdo — Markdown markers as an interpreted programming language"
|
description = "Marqdo — Markdown markers as an interpreted programming language"
|
||||||
@@ -12,6 +12,12 @@ name = "marqdo"
|
|||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
required-features = ["cli"]
|
required-features = ["cli"]
|
||||||
|
|
||||||
|
# Lean 判定集成测试(独立目标:缓存/判定/退出码矩阵,见 tests/prove_lean.rs)。
|
||||||
|
[[test]]
|
||||||
|
name = "prove_lean"
|
||||||
|
path = "tests/prove_lean.rs"
|
||||||
|
required-features = ["cli"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["native"]
|
default = ["native"]
|
||||||
native = ["cli", "view", "net-host", "plugin-host", "exec-host", "fs-host", "tty"]
|
native = ["cli", "view", "net-host", "plugin-host", "exec-host", "fs-host", "tty"]
|
||||||
|
|||||||
@@ -1,24 +1,138 @@
|
|||||||
# Marqdo
|
# Marqdo — Your SKILL is now a TOOL.
|
||||||
|
|
||||||
**代码即文档。文档即知识库。知识即可执行。**
|
<p align="center"><strong>Write it. Inspect it. Call it.</strong></p>
|
||||||
|
<p align="center"><em>让 SKILL 真正成为工具:文档即知识,知识即可执行。</em></p>
|
||||||
|
|
||||||
Marqdo 把 Markdown **标记当作编程语法**:同一个 `.mq.md` 文件,既是给人读的文稿,也是给机器跑的程序。写文档的过程就是在写可执行逻辑——大型项目里,说明、示例与实现不再分叉成三份真相。它不是「又一个 Markdown 编程语言」,而是**文档原生的编程运行时(Document-native runtime)**——一门关于**可执行知识(Executable Knowledge)**的语言。
|
<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="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">
|
||||||
|
</p>
|
||||||
|
|
||||||
v2.2.0 起,`marqdo call` 可以直接调用这份文件里的一个函数。读的是同一页说明,跑的是同一个实现。知识因此可以当工具用,测试也不必再包一层 `# main`。
|
**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.
|
||||||
|
|
||||||
欢迎访问 [marqdo 官方网站](https://www.marqdo.com/) 阅读更多特性与可执行文档。
|
**Not a prompt wrapper.** The document is interpreted as a program by Marqdo; its tool functions are not merely natural-language instructions.
|
||||||
|
|
||||||
**链接语法**:[doc/design/link-syntax.md](doc/design/link-syntax.md) · 语法宪法:[doc/design/markdown-mapping.md](doc/design/markdown-mapping.md) · 对象:[objects.md](doc/design/objects.md) · 调用实参:[call-arguments.md](doc/design/call-arguments.md) · 用户站:[user-site.md](doc/design/user-site.md) · 浏览:[view.md](doc/design/view.md) · 调试:[view-debug.md](doc/design/view-debug.md) · OKF 清单:[catalog-cli.md](doc/design/catalog-cli.md) · Engineering Knowledge:[engineering-knowledge.md](doc/design/engineering-knowledge.md) · VS Code 扩展:[vscode-extension.md](doc/design/vscode-extension.md)(分支 **`vscode-extension`**;提交约定 [vscode-extension-commit.md](doc/design/vscode-extension-commit.md)) · **AI Skill**:[skills/marqdo/](skills/marqdo/)(说明 [ai-skill.md](doc/design/ai-skill.md)) · 官方扩展:[ext-llm.md](doc/design/ext-llm.md)(`ext/llm`)· [ext-agent.md](doc/design/ext-agent.md)(智能体开发框架)· [ext-cli.md](doc/design/ext-cli.md)(`marqdo ext list/add/remove`) · 原生插件 ABI:[ext-abi.md](doc/design/ext-abi.md)(`lib/plugin`) · 金样例:[tests/](tests/) · 用户文档:[public/](public/) · 变更:[CHANGELOG.md](CHANGELOG.md)
|
<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>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
## 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` |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 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:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
marqdo call examples/calculator.mq.md 计算器.加法 a=2 b=3
|
||||||
|
# => 5
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
marqdo call examples/procurement/index.mq.md 查询采购商 "采购商状态='正常'" --json
|
||||||
|
|
||||||
|
# 2. Quote: SUP_JN, 8 ball bearings × ¥36 = ¥288 (sample price).
|
||||||
|
marqdo call examples/procurement/index.mq.md 查询采购商价格 "采购商标识符='SUP_JN'" 数量=8 有效秒数=300 --json
|
||||||
|
|
||||||
|
# 3. Budget: ¥600 - ¥120 = ¥480.
|
||||||
|
marqdo call examples/procurement/index.mq.md 查询余额 已花费=120 --json
|
||||||
|
|
||||||
|
# 4. Recheck supplier, quote, delivery and budget before a local mock order.
|
||||||
|
marqdo call examples/procurement/index.mq.md 向采购商发工单 "采购商标识符='SUP_JN'" 数量=8 单价=36 已花费=120 交付要求天数=7 --effects time.read,process.control --json
|
||||||
|
|
||||||
|
# 5. Over budget: ¥600 - ¥360 = ¥240 < ¥288. The mock work order must be denied.
|
||||||
|
marqdo call examples/procurement/index.mq.md 向采购商发工单 "采购商标识符='SUP_JN'" 数量=8 单价=36 已花费=360 交付要求天数=7 --effects time.read,process.control --json
|
||||||
|
```
|
||||||
|
|
||||||
|
| Case | Budget check | Expected business result |
|
||||||
|
|---|---|---|
|
||||||
|
| `已花费=120` | ¥480 available ≥ ¥288 | `ok: true`, **local simulation only, not sent** |
|
||||||
|
| `已花费=360` | ¥240 available < ¥288 | `ok: false`, budget denial |
|
||||||
|
| `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>
|
||||||
|
|
||||||
|
## One document, multiple uses
|
||||||
|
|
||||||
|
| Prompt-oriented agent skill | Marqdo executable skill |
|
||||||
|
|---|---|
|
||||||
|
| Natural-language tool instructions | Natural-language guidance **and** executable functions |
|
||||||
|
| 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.
|
||||||
|
|
||||||
|
**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 汇总与文档维护。
|
标准库单文件本身就是手册:直接阅读[文件库](lib/文件.mq.md)、[集合库](lib/表.mq.md)等源码,按函数标题下的参数表、返回契约和动作说明调用;[工程实践](examples/stdlib-handbook/索引.mq.md)演示文件整理、CSV 汇总与文档维护。
|
||||||
开发标准库和拓展库请直接阅读[可执行库开发指南](doc/library-development.mq.md):契约表、叙述式实现、遮蔽调用与多文件工程组织均有可运行示范。
|
开发标准库和拓展库请直接阅读[可执行库开发指南](doc/library-development.mq.md):契约表、叙述式实现、遮蔽调用与多文件工程组织均有可运行示范。
|
||||||
|
|
||||||
|
当前 CLI **2.8.0** 新增 `marqdo prove`:知识文件的定理表编译为 Lean 4 并自动判定真假——没有 Lean 工具链也能离线符号执行(诚实降级,绝不冒充证明),有 Lean 时全链路证明并给出反例见证。参见[发布说明](doc/releases/v2.8.0.md)。
|
||||||
|
|
||||||
当前 CLI **2.7.1** 修复 View 详情展开后自动折叠,并改进函数、链接及结构化内容侧注;已有静态页面需重新导出。独立拓展库继续使用 **2.7.0**。参见[发布说明](doc/releases/v2.7.1.md)与[阅读示例](examples/view-details.mq.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.7.1** preserves View disclosure choices across layout and live updates. Regenerate existing static exports to include the fix; independent extension packs stay at **2.7.0**.
|
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)
|
## 核心优势:可执行知识(Executable Knowledge)
|
||||||
|
|
||||||
@@ -139,6 +253,7 @@ CLI **2.7.1** preserves View disclosure choices across layout and live updates.
|
|||||||
3. **程序即 AI 长期记忆**:`.mq.md` 工程 = 可执行知识库 = AI 的世界模型(Executable Knowledge Representation)。
|
3. **程序即 AI 长期记忆**:`.mq.md` 工程 = 可执行知识库 = AI 的世界模型(Executable Knowledge Representation)。
|
||||||
4. **链接即调用 / 可执行知识图**:`[描述](类.函数)` 既是文档链接,也是类/函数调用;编译器解析目标、校验签名、返回 LinkInfo;`view` 显示调用点;`.mq.md` 之间的链接长成文档图 + 知识图 + 程序图(Executable Knowledge Graph)。
|
4. **链接即调用 / 可执行知识图**:`[描述](类.函数)` 既是文档链接,也是类/函数调用;编译器解析目标、校验签名、返回 LinkInfo;`view` 显示调用点;`.mq.md` 之间的链接长成文档图 + 知识图 + 程序图(Executable Knowledge Graph)。
|
||||||
5. **知识可测试**:文档中的示例表自动执行;知识与执行结果不一致会被机器报告——Knowledge-Code Coherence 从理念变为日常。
|
5. **知识可测试**:文档中的示例表自动执行;知识与执行结果不一致会被机器报告——Knowledge-Code Coherence 从理念变为日常。
|
||||||
|
6. **知识可证明**:知识文件内的定理表 → Lean 4 定理 → 自动判定(`marqdo prove`);离线符号执行与 Lean 单调一致,分歧显式报错——Trusted Knowledge,判定器缺陷优先于任何绿灯。
|
||||||
6. **可靠性基准**:让同一个 AI 分别用 Python / TypeScript / Marqdo 完成真实任务,测量生成长度、语法 / 语义错误率、修复轮次、token 消耗与人类阅读 / 修改成本——用实验数据证明「文档型语法降低 LLM 生成熵」。
|
6. **可靠性基准**:让同一个 AI 分别用 Python / TypeScript / Marqdo 完成真实任务,测量生成长度、语法 / 语义错误率、修复轮次、token 消耗与人类阅读 / 修改成本——用实验数据证明「文档型语法降低 LLM 生成熵」。
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
|
After Width: | Height: | Size: 132 KiB |
@@ -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
|
||||||
|
After Width: | Height: | Size: 78 KiB |
@@ -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
|
||||||
|
After Width: | Height: | Size: 161 KiB |
|
After Width: | Height: | Size: 139 KiB |
@@ -0,0 +1,42 @@
|
|||||||
|
<svg xmlns="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">
|
||||||
|
<defs><linearGradient id="night" x1="0" y1="0" x2="1" y2="1"><stop stop-color="#0b1324"/><stop offset="1" stop-color="#1a2335"/></linearGradient></defs>
|
||||||
|
<rect x="0" y="0" width="1340" height="720" rx="0" fill="url(#night)" stroke="none"/>
|
||||||
|
<text x="46" y="52" fill="#f6d39c" font-size="30" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="700">Marqdo</text>
|
||||||
|
<text x="207" y="50" fill="#9eacc1" font-size="17" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">/ EXECUTABLE SKILLS</text>
|
||||||
|
<rect x="1137" y="25" width="165" height="38" rx="19" fill="#283348" stroke="#4b5b6b"/>
|
||||||
|
<text x="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>
|
||||||
|
<text x="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>
|
||||||
|
<text x="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>
|
||||||
|
<rect x="43" y="168" width="608" height="493" rx="18" fill="#182235" stroke="#38485c"/>
|
||||||
|
<rect x="677" y="168" width="620" height="493" rx="18" fill="#111a2b" stroke="#38485c"/>
|
||||||
|
<rect x="43" y="168" width="608" height="57" rx="18" fill="#263349" stroke="none"/>
|
||||||
|
<rect x="677" y="168" width="620" height="57" rx="18" fill="#263349" stroke="none"/>
|
||||||
|
<text x="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>
|
||||||
|
<text x="707" y="204" fill="#e5eaf4" font-size="17" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">$ marqdo call ... 向采购商发工单</text>
|
||||||
|
<text x="66" y="266" fill="#faf7f1" font-size="27" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="700">## 向采购商发工单</text>
|
||||||
|
<text x="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>
|
||||||
|
<rect x="65" y="328" width="564" height="166" rx="9" fill="#101a2a" stroke="none"/>
|
||||||
|
<text x="86" y="365" fill="#abd6fa" font-size="19" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">报价 = 查询采购商价格(...)</text>
|
||||||
|
<text x="86" y="407" fill="#abd6fa" font-size="19" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">预算 = 查询余额(已花费=...)</text>
|
||||||
|
<text x="86" y="453" fill="#e9ba84" font-size="19" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">1. 剩余额度 < 本单金额 → 拒绝</text>
|
||||||
|
<text x="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>
|
||||||
|
<text x="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>
|
||||||
|
<text x="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>
|
||||||
|
<text x="706" y="311" fill="#98aec9" font-size="18" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">最高预算 = ¥600</text>
|
||||||
|
<g opacity=".18"><animate attributeName="opacity" values="0.18;0.18;1;1;0.18" keyTimes="0;0.04;0.09;0.91;1" dur="13s" repeatCount="indefinite"/><rect x="704" y="345" width="565" height="45" rx="9" fill="#233248" stroke="none"/><text x="719" y="374" fill="#9db5cf" font-size="17" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">01 SUPPLIER</text><text x="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>
|
||||||
|
<g opacity=".18"><animate attributeName="opacity" values="0.18;0.18;1;1;0.18" keyTimes="0;0.19;0.24;0.91;1" dur="13s" repeatCount="indefinite"/><rect x="704" y="399" width="565" height="45" rx="9" fill="#233248" stroke="none"/><text x="719" y="428" fill="#9db5cf" font-size="17" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">02 QUOTE</text><text x="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>
|
||||||
|
<g opacity=".18"><animate attributeName="opacity" values="0.18;0.18;1;1;0.18" keyTimes="0;0.35;0.39999999999999997;0.91;1" dur="13s" repeatCount="indefinite"/><rect x="704" y="453" width="565" height="45" rx="9" fill="#233248" stroke="none"/><text x="719" y="482" fill="#9db5cf" font-size="17" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">03 BALANCE</text><text x="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>
|
||||||
|
<g opacity=".18"><animate attributeName="opacity" values="0.18;0.18;1;1;0.18" keyTimes="0;0.53;0.5800000000000001;0.91;1" dur="13s" repeatCount="indefinite"/><rect x="704" y="507" width="565" height="45" rx="9" fill="#233248" stroke="none"/><text x="719" y="536" fill="#9db5cf" font-size="17" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">04 DECISION</text><text x="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>
|
||||||
|
<g opacity="0"><animate attributeName="opacity" values="0;0;1;1;0" keyTimes="0;0.62;0.66;0.85;1" dur="13s" repeatCount="indefinite"/>
|
||||||
|
<rect x="704" y="572" width="565" height="68" rx="10" fill="#193a34" stroke="#478a71"/>
|
||||||
|
<text x="718" y="600" fill="#b5ebcb" font-size="18" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="600">✓ 已花费=120 ¥480 ≥ ¥288</text>
|
||||||
|
<text x="718" y="625" fill="#d9f7e8" font-size="17" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">ok: true · 本地模拟,未发送</text>
|
||||||
|
</g>
|
||||||
|
<g opacity="0"><animate attributeName="opacity" values="0;0;0;1;1;0" keyTimes="0;0.78;0.84;0.88;0.95;1" dur="13s" repeatCount="indefinite"/>
|
||||||
|
<rect x="704" y="572" width="565" height="68" rx="10" fill="#42252d" stroke="#a45a67"/>
|
||||||
|
<text x="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>
|
||||||
|
<text x="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>
|
||||||
|
<path d="M 652 430 C 665 429 674 429 688 430" fill="none" stroke="#f0c58c" stroke-width="3"/><circle cx="665" cy="429" r="4" fill="#f0c58c"><animate attributeName="cx" values="656;681;656" dur="2.5s" repeatCount="indefinite"/></circle>
|
||||||
|
<text x="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>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 7.4 KiB |
@@ -0,0 +1,35 @@
|
|||||||
|
<svg xmlns="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">
|
||||||
|
<rect x="0" y="0" width="1340" height="740" rx="0" fill="#f8f6f0" stroke="none"/>
|
||||||
|
<rect x="0" y="0" width="1340" height="68" rx="0" fill="#f2ede4" stroke="none"/>
|
||||||
|
<text x="69" y="45" fill="#8d7358" font-size="29" font-family="Georgia,serif" font-weight="600">marqdo</text>
|
||||||
|
<text x="577" y="43" fill="#665d53" font-size="17" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">文档 函数 执行 变量</text>
|
||||||
|
<text x="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>
|
||||||
|
<line x1="325" y1="113" x2="325" y2="688" stroke="#e0d5c7"/><line x1="1032" y1="113" x2="1032" y2="688" stroke="#e0d5c7"/>
|
||||||
|
<text x="374" y="128" fill="#b0895e" font-size="16" font-family="Georgia,'Noto Serif CJK SC',serif" font-weight="400">采购智能体</text>
|
||||||
|
<text x="372" y="196" fill="#39352d" font-size="37" font-family="'Noto Serif CJK SC',Georgia,serif" font-weight="600">向采购商发工单</text>
|
||||||
|
<text x="374" y="238" fill="#5d5851" font-size="17" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">核对准入、价格、交付与预算之后,生成本地模拟工单。</text>
|
||||||
|
<line x1="374" y1="267" x2="993" y2="267" stroke="#b69b78"/>
|
||||||
|
<text x="375" y="309" fill="#514a41" font-size="21" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="600">参数</text>
|
||||||
|
<text x="375" y="348" fill="#5b5146" font-size="17" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">采购商标识符</text>
|
||||||
|
<text x="625" y="348" fill="#96754f" font-size="17" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">text</text>
|
||||||
|
<text x="811" y="348" fill="#8e8171" font-size="17" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">必填</text>
|
||||||
|
<line x1="374" y1="365" x2="994" y2="365" stroke="#ded6c9"/>
|
||||||
|
<text x="375" y="392" fill="#5b5146" font-size="17" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">数量 / 单价 / 已花费</text>
|
||||||
|
<text x="625" y="392" fill="#96754f" font-size="17" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">number</text>
|
||||||
|
<text x="811" y="392" fill="#8e8171" font-size="17" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">必填</text>
|
||||||
|
<line x1="374" y1="408" x2="994" y2="408" stroke="#ded6c9"/>
|
||||||
|
<text x="374" y="463" fill="#5e584f" font-size="18" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">发单前,必须再次查询并核对本轮的可用余额。</text>
|
||||||
|
<rect x="373" y="483" width="618" height="48" rx="8" fill="#ebe3d5" stroke="none"/>
|
||||||
|
<text x="391" y="513" fill="#805b35" font-size="18" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">预算 = [重新查询预算](查询余额(...))</text>
|
||||||
|
<text x="374" y="565" fill="#7b5b4b" font-size="19" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">1. 剩余额度 < 本单金额</text>
|
||||||
|
<text x="374" y="612" fill="#a06b5f" font-size="18" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400"> 返回 [预算不足,拒绝模拟工单](...)</text>
|
||||||
|
<text x="375" y="682" fill="#8c8276" font-size="16" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">仅在全部检查通过时产生“本地模拟、未发送”的结果。</text>
|
||||||
|
<path d="M 408 503 C 295 503 278 339 146 339" stroke="#ba9a75" stroke-width="1.7" fill="none"/><circle cx="408" cy="503" r="4.3" fill="#ba9a75"/>
|
||||||
|
<text x="73" y="281" fill="#a78255" font-size="15" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">BUDGET CHECK</text>
|
||||||
|
<text x="73" y="315" fill="#756350" font-size="18" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">已花费 ¥360</text>
|
||||||
|
<text x="73" y="343" fill="#756350" font-size="18" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">剩余额度 ¥240</text>
|
||||||
|
<path d="M 823 602 C 1010 586 1026 396 1122 396" stroke="#b7837e" stroke-width="1.7" fill="none"/><circle cx="823" cy="602" r="4.3" fill="#b7837e"/>
|
||||||
|
<text x="1080" y="319" fill="#a67871" font-size="15" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">REJECTION</text>
|
||||||
|
<text x="1080" y="354" fill="#945e55" font-size="22" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="700">¥240 < ¥288</text>
|
||||||
|
<text x="1080" y="393" fill="#945e55" font-size="19" font-family="ui-monospace,Consolas,'Noto Sans CJK SC',monospace" font-weight="400">拒绝工单</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 204 KiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 523 KiB |
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "marqdo-wasm"
|
name = "marqdo-wasm"
|
||||||
version = "2.7.1"
|
version = "2.8.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
description = "Marqdo interpreter as WebAssembly (browser host bridge)"
|
description = "Marqdo interpreter as WebAssembly (browser host bridge)"
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
marqdo (2.7.1-1ppa1) noble; urgency=medium
|
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.
|
* Release 2.7.1; see the reviewed upstream CHANGELOG.
|
||||||
|
* Stop reapplying the engineering compatibility fix already in upstream.
|
||||||
|
* Include cached orig bytes until publication is confirmed by Launchpad.
|
||||||
|
|
||||||
-- Marqdo Maintainers <cflmy@users.noreply.github.com> Wed, 11 Nov 2026 00:03:29 +0800
|
-- Marqdo Maintainers <cflmy@users.noreply.github.com> Wed, 11 Nov 2026 00:03:29 +0800
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
engineering-stable-option.patch
|
# engineering-stable-option.patch
|
||||||
|
# The fix is already in upstream 2.7.1.
|
||||||
@@ -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-* 验收与第一刀切片;协议真源仍见下方设计文档 |
|
| [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`,增量设计错误恢复、检查点/效应账本、结构化工具、输出通道、上下文与只读资源视图;含跨仓边界、阶段计划和故障验收 |
|
| [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;区分现有能力、设计推导与待实测项 |
|
| [research/agent-capabilities-2026-10-27.md](research/agent-capabilities-2026-10-27.md) | **官方能力调研与源码复核**;OpenAI/Claude/Gemini/LangGraph/Deep Agents/MCP,求道当前问题 F01–F20;区分现有能力、设计推导与待实测项 |
|
||||||
|
|||||||
@@ -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` 的聚合粒度(按文件/按函数)。
|
||||||
|
- 证书是否需要签名,以及签名由谁持有。
|
||||||