Compare commits

..
Author SHA1 Message Date
cflmy 33df185e04 fix(proof): distinguish kernel checking at issuance from independent certificate replay 2026-11-18 17:00:13 +08:00
cflmy f8d2f0a9d6 ci(release): run full 2.9.0 promotion preflight on PR; only tag on verified main 2026-11-18 16:58:55 +08:00
cflmy c952765845 merge: reconcile 2.9.0 proof release with latest native AI extension updates 2026-11-18 16:58:35 +08:00
cflmy 8440e563e8 release: prepare Marqdo v2.9.0 full with exact versioning, documented proof limits, and guarded tag promotion 2026-11-18 16:57:04 +08:00
cflmy a5a9001a54 test(proof): assert core-Lean branch case analysis instead of Mathlib tactic 2026-11-18 16:45:14 +08:00
cflmy 074c4e4994 fix(proof): use core Lean by_cases/simp_all instead of unavailable split_ifs tactic 2026-11-18 16:45:03 +08:00
cflmy 5d6b8e66b8 fix(proof): preserve existing simple-forwarder receipts while unifying complex DAG and branching contracts 2026-11-18 16:40:34 +08:00
cflmy 1d7d376396 docs(architecture): record verified knowledge compiler goals, Lean limits, evidence grades and stop criteria 2026-11-18 16:39:34 +08:00
cflmy d919e886d8 ci(proof): gate unified 3-module branch composition and evidence-grade integrity 2026-11-18 16:39:05 +08:00
cflmy 4bec0f809e test(proof): 3-level contract DAG, sequential calls, exhaustive branches, and Lean replay 2026-11-18 16:38:59 +08:00
cflmy cba6218cdb fix(proof): avoid self-borrow conflicts and handle solved Lean subgoals 2026-11-18 16:38:35 +08:00
cflmy 97b38c6311 feat(knowledge): expose proven-vs-assumed evidence on modular obligations without promoting audit to proof 2026-11-18 16:38:10 +08:00
cflmy 65b876d6d7 feat(knowledge): attach nonpromoting evidence levels to proof links, index and replay 2026-11-18 16:38:01 +08:00
cflmy d67689f295 feat(proof): prioritize unified contract DAG while retaining legacy certificate replay 2026-11-18 16:37:53 +08:00
cflmy f84e79250c feat(proof): prioritize unified contract DAG while retaining legacy certificate replay 2026-11-18 16:37:50 +08:00
cflmy 1b0ca8e3c8 feat(proof): prioritize unified contract DAG while retaining legacy certificate replay 2026-11-18 16:37:48 +08:00
cflmy de1716cc8d feat(knowledge): wire unified proof engine and evidence lattice 2026-11-18 16:37:39 +08:00
cflmy eab44128f9 feat(knowledge): typed provenance evidence grades with strict runtime-proof nonpromotion 2026-11-18 16:37:33 +08:00
cflmy 024b6b5bec feat(knowledge): unified source-driven modular contracts for pure sequential, branched and transitive calls 2026-11-18 16:37:18 +08:00
cflmy ec80b00b15 ci(proof): add full source-to-Lean, semantic, knowledge and runtime regression gate 2026-11-18 15:26:50 +08:00
cflmy e282dae2b8 ci(proof): gate source-derived linear path preconditions against Lean kernel 2026-11-18 15:23:38 +08:00
cflmy e2953153dd test(proof): real Lean linear arithmetic callsite implication and runtime-scope guard 2026-11-18 15:23:31 +08:00
cflmy 52c7690324 feat(proof): preserve source arithmetic in exact branch path obligations 2026-11-18 15:23:22 +08:00
cflmy a5c250641d feat(proof): source-derived linear arithmetic symbolic path VCs with nonlinear fail-closed 2026-11-18 15:23:03 +08:00
cflmy 0f54b33971 fix(proof): use public SymbolId re-export to restore Rust compilation 2026-11-18 15:19:51 +08:00
cflmy 3cb85fc48e test(proof): explicitly identify Marqdo parameter variables in expression fixtures 2026-11-18 15:19:23 +08:00
cflmy a49a507c21 ci(proof): gate pure-expression source matching and independently replayed Lean certificates 2026-11-18 15:17:53 +08:00
cflmy 176ba3832b test(proof): real Lean arithmetic module composition and stale/false claim rejection 2026-11-18 15:17:47 +08:00
cflmy 05ef930878 feat(proof): compose/replay polymorphic source-derived arithmetic contract proof certificates 2026-11-18 15:17:35 +08:00
cflmy bfe7d73862 feat(proof): register independently checked pure-expression proof backend 2026-11-18 15:17:26 +08:00
cflmy 21f1003450 feat(proof): source-matched pure arithmetic contract composition and independent Lean replay 2026-11-18 15:17:13 +08:00
cflmy eda0bad6d5 refactor(proof): reuse source-resolved forwarder and exact closure logic across verified composition backends 2026-11-18 15:16:47 +08:00
cflmy 07623f613f docs(proof): specify parameter projection certificates, real Lean scope and unresolved general semantics 2026-11-18 15:07:40 +08:00
cflmy 8aa6a70fe9 fix(proof): require unique source declarations and semantic symbols for projection certificates 2026-11-18 15:07:31 +08:00
cflmy 57e060477a fix(proof): restore literal backtick identifiers in real-Lean fixtures 2026-11-18 15:04:38 +08:00
cflmy cd07e9a959 fix(proof): correct raw Marqdo parameter fixtures and literal backtick encoding 2026-11-18 15:04:31 +08:00
cflmy 261b2d77ed test(proof): symbolic argument permutation and ambiguous projection contracts fail closed 2026-11-18 15:03:29 +08:00
cflmy ec567a70e6 ci(proof): execute parameter projection composition and replay against real Lean 2026-11-18 15:03:01 +08:00
cflmy e125636767 test(proof): real Lean parameter-projection caller proof, replay and stale-source refusal 2026-11-18 15:02:54 +08:00
cflmy 4981a77d5e feat(proof): compose and replay independently verified parameter projections 2026-11-18 15:02:42 +08:00
cflmy 9b82044b69 feat(proof): register parameter projection proof backend 2026-11-18 15:02:33 +08:00
cflmy 8f5d3e1a03 feat(proof): independent Lean projection-contract composition with source-bound replay 2026-11-18 15:02:24 +08:00
cflmy d0d9b7a9c0 docs(proof): clarify strict claim uniqueness and intermodule certificate boundary 2026-11-18 15:00:06 +08:00
cflmy bb41674665 test(proof): duplicate matching constant contracts fail closed 2026-11-18 14:59:52 +08:00
cflmy bf546eb62d fix(proof): reject ambiguous constant claims and same-file pseudo-composition 2026-11-18 14:59:41 +08:00
cflmy 6a2d0067ad docs(proof): document exact closure and unique callsite replay gate 2026-11-18 14:58:48 +08:00
cflmy c61af4b829 test(proof): reject duplicate, injected and stale composition closure receipts 2026-11-18 14:58:36 +08:00
cflmy 1965faf189 fix(proof): require unambiguous composition replay and exact source closure set 2026-11-18 14:58:27 +08:00
cflmy a3948dbe0d ci: remove temporary extension validation trigger 2026-11-18 14:53:54 +08:00
cflmy 24959a0ba8 fix: validate Windows extension packs with 7-Zip 2026-11-18 14:40:07 +08:00
cflmy b982c1dbe0 ci(proof): recheck deterministic source-to-Lean regeneration against original proof receipts 2026-11-18 14:00:36 +08:00
cflmy a2629068fd security(proof): regenerate plan and Lean source from current Marqdo before accepting cached theorem receipts 2026-11-18 14:00:25 +08:00
cflmy 2f79ffd646 security(sema): unknown earlier branch guards block proof of all subsequent else/elif arms 2026-11-18 13:57:12 +08:00
cflmy c09dcc50b2 ci(lean): verify stronger symbolic branch guard implication end to end under real Lean 2026-11-18 13:55:30 +08:00
cflmy 5ee23d8fc8 ci: cancel outdated modular proof smoke jobs to prioritize latest validated branch head 2026-11-18 13:53:43 +08:00
cflmy 8f9b8cbf34 fix(symbolic): encode non-identical guard implication as optional exact index for omega proof 2026-11-18 13:53:14 +08:00
cflmy fcc4d27856 test(lean): omega proves stronger symbolic branch guard without promoting runtime proof status 2026-11-18 13:52:46 +08:00
cflmy 7881cd4663 ci(lean): focused smoke tests also kernel-check abstract ABI/exception/loop models 2026-11-18 13:52:33 +08:00
cflmy 65779ef2ae feat(modular): explicitly distinguish Int abstraction from verified Marqdo runtime type domain 2026-11-18 13:51:42 +08:00
cflmy 6f4575e4d5 fix(proof): run Lean on Number-contract Int abstraction but never claim runtime type equivalence 2026-11-18 13:51:39 +08:00
cflmy 4a142843c8 feat(proof): admit only Int abstraction for Number contracts and generate omega path implication goals 2026-11-18 13:51:30 +08:00
cflmy 9956f2ff1f docs(proof): acknowledge number/int/float contract normalization and limited Int-model certificate scope 2026-11-18 13:51:03 +08:00
cflmy 761f35201d test(proof): require explicit Int-model-only composition scope, not arbitrary runtime number correctness 2026-11-18 13:50:44 +08:00
cflmy 5b785a196c fix(proof): treat canonical number contract only as Int-model proof, never claim runtime i64 typing 2026-11-18 13:50:35 +08:00
cflmy 15ae30ff70 ci(proof): kernel-check stateful ABI failure and finite-fuel loop semantics 2026-11-18 13:49:36 +08:00
cflmy e6b9e4f83b feat(lean): model stateful ABI outcomes and fuel-bounded loops without assuming plugin correctness or termination 2026-11-18 13:49:30 +08:00
cflmy d4514f7b0c ci(modular): focused isolated composition/VC tests and real Lean replay with diagnostics 2026-11-18 13:47:54 +08:00
cflmy a8e7b1bb05 debug(composition): explain precise AST, call binding, type and evidence rejection gates 2026-11-18 13:45:53 +08:00
cflmy 167d2fadda test(modular): print exact source-grounded eligibility diagnostics on composition regression failure 2026-11-18 13:44:39 +08:00
cflmy bf80f4527e feat(composition): return source-grounded rejection diagnostics for unsupported proof fragments 2026-11-18 13:44:18 +08:00
cflmy 7436ecaa3e fix(lean): emit actual newlines and indented tactic in independent caller and callee modules 2026-11-18 13:43:12 +08:00
cflmy a46f01b906 docs(modular): document independent Lean caller certificate and replay, including loop/ABI/symbolic limitations 2026-11-18 13:42:28 +08:00
cflmy ca92b031b1 test(lean): independently replay caller certificate and reject stale callee source 2026-11-18 13:41:44 +08:00
cflmy 3a5c7478a0 feat(cli): knowledge replay checks independently issued composition certificate and current semantic source 2026-11-18 13:41:34 +08:00
cflmyandCursor afbb9f191c ci: retrigger EK for ext-v2.8.1 release gate
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-18 13:41:29 +08:00
cflmy ccf513aa4b feat(proof): independently replay caller composition certificate against current source and two Lean module hashes 2026-11-18 13:41:26 +08:00
cflmy e242870d0f ci(lean): run semantic proof module tests and trigger on knowledge compiler changes 2026-11-18 13:41:00 +08:00
cflmy dba9b31726 ci(proof): include new symbolic branch, closed VC and independent composition unit tests 2026-11-18 13:40:53 +08:00
cflmy 32859c48d3 test(modular): source-grounded independent composition accepts pure forwarding and rejects branches 2026-11-18 13:40:24 +08:00
cflmy 1cd0ddaa50 fix(prove): preserve existing proof tactic scaffold while separately simplifying imported arithmetic 2026-11-18 13:40:10 +08:00
cflmy 16d9cc1610 fix(lean): annotate polymorphic divergence type to discharge implicit universe inference 2026-11-18 13:39:34 +08:00
cflmy 1f730ad4fd test(lean): independent callee theorem imports into caller composition and produces scope-limited certificate 2026-11-18 13:39:02 +08:00
cflmy 8dede5b888 feat(cli): knowledge compose produces independent Lean import proof and restricted replayable composition certificate 2026-11-18 13:38:49 +08:00
cflmy ff1887d6a3 feat(knowledge): export independent two-module Lean composition prover 2026-11-18 13:38:42 +08:00
cflmy 54f38b1b40 security(composition): require exact resolved forwarded call identity and unique bound call 2026-11-18 13:38:24 +08:00
cflmy 92fee48910 feat(modular): create standalone Lean callee and caller modules with replayable composed certificate for pure typed-int forwarders 2026-11-18 13:38:00 +08:00
cflmy 4e61b33c90 feat(lean): compile independent imported Lean proof modules with timeout and source race detection 2026-11-18 13:37:40 +08:00
cflmy 8db699191e release(ext-2.8.1): AI durable workflow pack with Windows packaging fixes 2026-11-18 13:37:02 +08:00
cflmy e5da4e90fd fix(prove): unfold bounded arithmetic helper equations in Lean auto proofs of imported pure functions 2026-11-18 13:36:32 +08:00
cflmy b9fc9f1dbf fix(knowledge): canonicalize empty parent as current directory when compiling bare filename 2026-11-18 13:36:20 +08:00
cflmy e833898fb5 feat(lean): total-correctness assume-guarantee theorem tracks plugin error and loop divergence explicitly 2026-11-18 13:35:41 +08:00
cflmy d8182ae405 feat(cli): Lean-check typed symbolic branch path goals as model proofs without upgrading runtime contract status 2026-11-18 13:35:08 +08:00
cflmy e48172153c test(modular): branch guard with typed symbolic caller param generates Lean implication without assuming callee result 2026-11-18 13:34:48 +08:00
cflmy 6807600404 feat(modular): publish symbolic guarded goals, block effects and loops before contract audit success 2026-11-18 13:34:39 +08:00
cflmy 986ddb0040 feat(proof): expose symbolic path-sensitive Lean goal generator 2026-11-18 13:34:32 +08:00
cflmy 9e09a4434f feat(proof): generate branch-guarded symbolic Int Lean goals without assuming runtime equivalence 2026-11-18 13:34:19 +08:00
cflmy 668c465658 feat(sema): preserve branch path predicates and loop blockers on bound calls for modular symbolic VCs 2026-11-18 13:33:51 +08:00
cflmy 57a57745da fix(sema): remove duplicate derive and restore BoundCall Debug Clone Eq after StaticCallArg insertion 2026-11-18 13:32:30 +08:00
cflmy e5580d9640 release(ext-2.8.3): use Windows System32 tar for pack ZIP encoding 2026-11-18 13:25:09 +08:00
cflmy 9ce2ae1037 release(ext-2.8.2): fix Windows packs.ci root and ship AI durable workflow 2026-11-18 13:08:59 +08:00
cflmy 38785c5960 test(lean): remove redundant fixture string transformation in modular replay test 2026-11-18 13:03:25 +08:00
cflmy 8c93c9711b docs(modular): document real Lean receipt replay, closed callsite VCs and explicit incomplete proof boundaries 2026-11-18 13:02:44 +08:00
cflmy 1763891ba9 test(proof): kernel must replay callee proof and closed caller premise before contract becomes available 2026-11-18 13:02:18 +08:00
cflmy faafc75129 security(modular): require Lean replay of callee certificates before discharging caller preconditions 2026-11-18 13:02:08 +08:00
cflmy c0ac1f4599 security(proof): re-run Lean kernel on every imported receipt before accepting modular --verify 2026-11-18 13:01:49 +08:00
cflmy 35bd542a04 test(proof): tampering with generated Lean source invalidates otherwise valid certificate 2026-11-18 13:01:05 +08:00
cflmy df9f7fea84 security(lean): reject modified goal module during kernel invocation 2026-11-18 13:00:29 +08:00
cflmy a198cbfdd0 test(proof): real imported call has exact actuals and generated Lean goal, not assumed proof 2026-11-18 13:00:01 +08:00
cflmy 9d41779c22 test(modular): keep unknown-argument preconditions pending rather than guessing a Lean bridge 2026-11-18 12:59:46 +08:00
cflmy 553bf1aeb0 security(proof): validate Lean source, plan cache key and embedded proof-library identity before reusing receipts 2026-11-18 12:58:56 +08:00
cflmy 9e181704f5 test(proof): invalid actual argument cannot inherit verified callee proof 2026-11-18 12:58:19 +08:00
cflmy 88295a40c9 test(proof): end-to-end real Lean checks closed imported precondition and verified callee certificate 2026-11-18 12:58:07 +08:00
cflmy 9072e1b8a7 security(proof): derive VC actuals only after runtime-equivalent call normalization 2026-11-18 12:57:50 +08:00
cflmy 4b2f3c8e15 feat(cli): knowledge proof-deps --verify invokes Lean to discharge closed actual-argument preconditions 2026-11-18 12:57:33 +08:00
cflmy edd477c967 feat(lean): check closed modular precondition goals with real Lean process and timeout 2026-11-18 12:57:21 +08:00
cflmy 270d8b8148 feat(modular): expose instantiated actual-argument Lean goals and accept only kernel-discharge results 2026-11-18 12:57:10 +08:00
cflmy a1a933b112 feat(proof): expose closed callsite Lean verification conditions 2026-11-18 12:56:53 +08:00
cflmy d99d6e46d4 feat(proof): generate strictly closed actual-argument Lean precondition goals with checked i64 semantics 2026-11-18 12:56:34 +08:00
cflmy 40b87bd15e feat(sema): retain exact call-site arg identities and overflow-safe closed integer actuals for modular VCs 2026-11-18 12:56:12 +08:00
cflmy 7d00043236 test(proof): reject overflowing actual call argument in cross-module source proof 2026-11-18 12:52:03 +08:00
cflmy ebe795f847 security(proof): require call argument arithmetic itself to be closed and i64-safe before imported proof inlining 2026-11-18 12:51:55 +08:00
cflmy 50786ddea0 security(proof): keep imported division opaque pending interpreter-to-Lean quotient semantic equivalence 2026-11-18 12:51:44 +08:00
cflmy 42600c8a2c docs(proof): define limits of pure source transparency and bounded i64 arithmetic 2026-11-18 12:51:01 +08:00
cflmy 8e41337e17 test(proof): arithmetic overflow at imported call boundary remains opaque, not misproved by unbounded Lean Int 2026-11-18 12:50:20 +08:00
cflmy b168e56dd0 security(proof): reject unsafe i64 overflow and division-by-zero in imported pure-source proof inlining 2026-11-18 12:50:11 +08:00
cflmy 26fc74646c test(prove): verify actual call argument substitution across imported pure module with Lean 2026-11-18 12:49:28 +08:00
cflmy 70249bc972 test(prove): effectful imported calls remain opaque, never silently inlined for Lean 2026-11-18 12:47:29 +08:00
cflmy a1fd279641 test(prove): real Lean proves function across file import through sound pure-leaf source substitution 2026-11-18 12:47:06 +08:00
cflmy 51aa97fb2c feat(prove): verify narrow pure imported leaf calls through exact source substitution rather than opaque model 2026-11-18 12:46:55 +08:00
cflmy 7ac2456b76 test(modular): even verified callee requires clause cannot self-discharge caller bridge 2026-11-18 12:46:28 +08:00
cflmy 267a304a04 fix(modular): use compiler-resolved caller identity in proof obligation graph 2026-11-18 12:45:45 +08:00
cflmy c4ccce13c0 fix(sema): bind every static call to exact owning SymbolId, never infer caller by source line 2026-11-18 12:45:39 +08:00
cflmy f25108f04c docs(proof): distinguish Lean composition rule, proof graph audit and missing runtime entailment 2026-11-18 12:45:20 +08:00
cflmy 51cb8d52f2 feat(proof): show declared but undischarged operation assumptions alongside proof receipts 2026-11-18 12:44:48 +08:00
cflmy ab6c781947 fix(proof): check --proof rejects malformed/misplaced assumption tables instead of silently treating as evidence 2026-11-18 12:44:30 +08:00
cflmy 4da9e2d775 fix(cli): proof-deps works with bare .mq.md filename in current directory 2026-11-18 12:44:10 +08:00
cflmy ab6eca1b68 fix(knowledge): accept bare filename as project root dot in Lean proof publication 2026-11-18 12:44:00 +08:00
cflmy 24cbc61ca5 test(modular): use canonical nested imported class path for bound-call proof obligations 2026-11-18 12:43:19 +08:00
cflmy 37ebbfd319 test(knowledge): assumed operation tables publish inert contract metadata, never a proof 2026-11-18 12:43:12 +08:00
cflmy 6854fcd33b feat(modular): bind caller assumption declarations to exact static callsite and expose pending obligations 2026-11-18 12:42:57 +08:00
cflmy 4ae150eb7b feat(knowledge): publish modular assumption identities and declarations in semantic graph 2026-11-18 12:42:47 +08:00
cflmy 2cdb453547 test(proof): assumption tables survive into IR and cannot confer proof status alone 2026-11-18 12:42:27 +08:00
cflmy 166b01c86b release(ext-2.8.1): AI native durable workflow pack notes and VERSION 2026-11-18 12:41:57 +08:00
cflmy 6a9441d188 test(proof): GFM assumption tables remain metadata and coexist with theorem tables 2026-11-18 12:41:34 +08:00
cflmy 4495021b70 feat(prove): lower modular assumption declarations into explicit proof IR 2026-11-18 12:41:21 +08:00
cflmy c185078bb8 feat(contract): parse explicit assume-guarantee operation tables with strict row validation 2026-11-18 12:41:14 +08:00
cflmy a2cab8cdb1 feat(parse): extract GFM assumption tables before executable body without changing runtime semantics 2026-11-18 12:41:05 +08:00
cflmy 663c44ead7 feat(proof): carry non-executable assumption table declarations in function AST 2026-11-18 12:41:02 +08:00
cflmyandCursor 87cfe05095 docs(next): add 014 knowledge-anchor compilation direction
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-18 12:40:41 +08:00
cflmy 21a70198b2 ci(proof): kernel-check modular assume-guarantee composition lemma and missing-bridge counterexample 2026-11-18 12:39:48 +08:00
cflmy cefcc9e0d1 fix(proof): use core Lean elimination for modular composition counterexample 2026-11-18 12:39:39 +08:00
cflmy 0fdc9f1309 fix(lean): make modular-rule counterexample use identity downstream function without omega 2026-11-18 12:39:31 +08:00
cflmy d9a1df72ab feat(proof): Lean-checked assume–guarantee composition rule with explicit call-site bridge 2026-11-18 12:39:22 +08:00
cflmy d2a44afbd7 test(modular): strict knowledge proof-deps rejects unproven claims with machine-readable obligations 2026-11-18 12:39:10 +08:00
cflmy cc1788ca64 test(proof): use valid nested imported class path and require bound call before invalidation 2026-11-18 12:39:02 +08:00
cflmy ac3777882c feat(cli): add marqdo knowledge proof-deps --strict for machine-checkable modular proof obligations 2026-11-18 12:38:24 +08:00
cflmy 819051d2af feat(proof): audit verified callee receipts and independent caller claims without conflating graph audit with formal proof 2026-11-18 12:38:16 +08:00
cflmy 77989362ca fix(sema): bind imported calls to full declaration path for sound transitive proof invalidation 2026-11-18 12:36:36 +08:00
cflmy da0fc6a188 fix(proof): keep modular verifier compatible with Rust 1.81 2026-11-18 12:35:46 +08:00
cflmy 25833895db feat(knowledge): atomically publish proof obligation graph with semantic generation 2026-11-18 12:35:43 +08:00
cflmy 5c728b6581 feat(knowledge): expose module proof dependency planner 2026-11-18 12:35:40 +08:00
cflmy 980309a6e0 feat(proof): add fail-closed intermodule proof obligation graph and contract precondition tracking 2026-11-18 12:35:33 +08:00
cflmy 475a0d6810 fix(sema): initialize target_claim exactly once in both knowledge ref variants 2026-11-18 12:34:37 +08:00
cflmy b37387e6da Merge native AI flow workflow into main
Integrate the v2.8.0-based native agent workflow branch:
- durable open/next/inspect/list/commit/cancel step state with resume_dir isolation
- verified small-model choices, scoped context and bounded parallel recovery
- failed-only read-only retry through the Agent ABI plugin
- offline interpreter fixtures, contract checks and focused CI gates
2026-11-18 12:33:54 +08:00
cflmy 895752a1fd Merge v2.8.0 into native AI flow branch
- take the 2.8.0 crate versions, Cargo.lock dependency graph and release workflows
- keep the native workflow inspect/list, resume_dir isolation and repeatable fixtures
- satisfy the 2.8.0 library narrative gate for workflow.tick
- resolve CHANGELOG ordering with the v2.8.0 release entry
2026-11-18 12:14:03 +08:00
cflmy f18e7691be test(prove): real Lean proof must survive semantic knowledge publication with validated cache 2026-11-18 12:06:02 +08:00
cflmy 79f3eca2f3 security(proof): verify declared claim and original certificate content before publishing proved receipts 2026-11-18 12:05:21 +08:00
cflmy c841bfb5dc test(proof): changed theorem conclusion cannot inherit old proof by matching function name 2026-11-18 12:04:13 +08:00
cflmy 9a22a70db7 test(knowledge): published theorem declarations are separate from proof status 2026-11-18 12:03:57 +08:00
cflmy 1e3f56d8e5 docs(knowledge): document stable theorem claim identity and proof-declaration references 2026-11-18 12:03:48 +08:00
cflmy 18dc20e138 docs(knowledge): document stable theorem claim identity and proof-declaration references 2026-11-18 12:03:45 +08:00
cflmy d38ec25d2c docs(knowledge): document stable theorem claim identity and proof-declaration references 2026-11-18 12:03:43 +08:00
cflmy dc4acda005 fix(knowledge): borrow resolved source path in knowledge diagnostics 2026-11-18 12:03:30 +08:00
cflmy a856bc52f4 fix(knowledge): use explicit file path type in duplicate theorem diagnostics 2026-11-18 12:03:22 +08:00
cflmy 9f7ae6c919 fix(knowledge): duplicate theorem names and ambiguous anchor links fail closed with diagnostics 2026-11-18 12:03:16 +08:00
cflmy 6e5f9bafb7 feat(parse): treat canonical theorem mq://claim references as inert Markdown knowledge links 2026-11-18 12:03:08 +08:00
cflmy 206b142444 test(knowledge): theorem table declarations gain inert stable claim addresses 2026-11-18 12:03:03 +08:00
cflmy 37dff4f757 test(knowledge): synthetic receipts require exact matching theorem tables in source 2026-11-18 12:02:56 +08:00
cflmy 34d90a114a feat(prove): bind receipts only when exact source theorem declaration and premise match 2026-11-18 12:02:43 +08:00
cflmy 1c06ed13e3 feat(knowledge): stable theorem claim identities in SemanticProject and inert claim references 2026-11-18 12:02:26 +08:00
cflmy 20f7602eb4 fix(knowledge): keep diagnostic positions in u32 source span representation 2026-11-18 12:01:42 +08:00
cflmy 12523fea4f feat(knowledge): emit source-located unresolved anchor diagnostics instead of silent fallback 2026-11-18 12:01:34 +08:00
cflmy f52e728c87 test(prove): verify genuine Lean receipt binds to semantic function proof link 2026-11-18 12:01:17 +08:00
cflmy 298e0e00c4 test(knowledge): verify full EK compile publishes anchors and proof index atomically 2026-11-18 12:00:34 +08:00
cflmy 7e194b41a3 examples(knowledge): Markdown-native anchor with function theorem and nonexecuting reference 2026-11-18 12:00:17 +08:00
cflmy c7ad19b5e1 examples(knowledge): Markdown-native anchor with function theorem and nonexecuting reference 2026-11-18 12:00:15 +08:00
cflmy d6485e8b5f test(knowledge): canonical mq:// cross-function narrative references do not execute 2026-11-18 11:59:49 +08:00
cflmy 79d58bb755 test(proof): invalidate dependent caller evidence when imported knowledge changes 2026-11-18 11:59:38 +08:00
cflmy f4059f57e4 docs(knowledge): specify stable anchor links and exact proof receipt trust boundaries 2026-11-18 11:59:03 +08:00
cflmy ba889ce87f test(knowledge): prove pipeline writes semantic claim linkage as artifact sidecar 2026-11-18 11:58:45 +08:00
cflmy 5236cf6fa3 feat(parse): classify mq:// knowledge-anchor links as inert narrative references 2026-11-18 11:58:18 +08:00
cflmy 95cf2e79a2 feat(knowledge): resolve inert Markdown knowledge anchor refs, fail closed for missing targets 2026-11-18 11:58:12 +08:00
cflmy b7a4bb5f57 test(knowledge): proof-owner linkage, stale invalidation, fake certificate and duplicate fail-closed checks 2026-11-18 11:57:33 +08:00
cflmy a0b0e01b07 fix(prove): gate knowledge linkage behind CLI feature 2026-11-18 11:57:24 +08:00
cflmy 38c07d9a0e feat(agent): add workflow inspection and durable isolation
- add agent_workflow_inspect/list primitives and ext/ai wrappers
- expose host-relative resume_dir on every workflow operation
- make offline workflow fixture repeatable with a timestamped run id
- fix flow.choose branch scoping contract diagnostic
- build the agent cdylib and drop the removed run --effects flag in CI
2026-11-18 11:57:12 +08:00
cflmy 1fb87b37c7 ci(knowledge): focused semantic anchors and proof linkage verification 2026-11-18 11:57:09 +08:00
cflmy eb56c0cf02 feat(knowledge): publish verified proof link index atomically in semantic generation 2026-11-18 11:57:02 +08:00
cflmy 2826924361 feat(prove): emit sidecar linking function claims to semantic identities 2026-11-18 11:56:59 +08:00
cflmy c989152c6d feat(knowledge): export proof linkage module 2026-11-18 11:56:57 +08:00
cflmy 40fd31a34a fix(knowledge): compare raw v2.8.0 source SHA-256 encoding 2026-11-18 11:56:55 +08:00
cflmy 06c54ec4db feat(knowledge): proof reports bind to exact function symbols and reject stale/counterfeit evidence 2026-11-18 11:56:41 +08:00
cflmy db4a7a848d test(knowledge): anchor stability across insertions, digest change and duplicate-label rejection 2026-11-18 11:55:36 +08:00
cflmy 8bf7ace9e3 feat(knowledge): stable unique marked-step anchors, definition digests and semantic projection 2026-11-18 11:55:26 +08:00
cflmy a7a5554c0f ci(proof): elan 钉 v4.35.0——lean-action 已移除 lean4-version,安装改走 elan-init
proof job 在 2.8.0 HEAD 因 Unexpected input lean4-version 立刻失败;
判定流水线只需 lean 二进制(底座内嵌),与 skill-proof/lean-toolchain 对齐。
2026-11-18 10:57:28 +08:00
cflmy 343504c7a8 release(2.8.0): local.bump — wasm 包版本与 debian/changelog 2.8.0 stanza,Cargo check 更新锁文件
按发版手册 cli 模式:两个 Cargo 包版本一致(marqdo/marqdo-wasm 2.8.0),
ext/VERSION 保持 2.7.0 不动;PPA stanza 保留原维护者、Asia/Shanghai 时间。
2026-11-18 10:29:26 +08:00
cflmy 3d9fa0da96 docs(public): 新增 23-prove 特性页——页面自身定理表经 Lean 全 proved
- 英文特性页(public/features/23-prove.mq.md):六段管线/状态阶梯/
  反例见证/单调性护栏/可证片段边界,示例即页面内的台账.记一笔;
- import result 模块使 result.ok 内联(轨迹语义与定理匹配:大额必经复核
  + 大额单次外呼 + 必有回执);
- 实测 marqdo prove 23-prove.mq.md → status proved,3 定理全部
  decided_by=lean;公开文档重建后 23-prove 页面入站。
2026-11-18 10:29:26 +08:00
cflmy bb8960c5eb fix(env): 重放测试可移植 shebang + dev-env 工具箱目录——全量 1105 测试零失败
- notebook_api.rs:replay 包装脚本 shebang /usr/bin/python3 →
  /usr/bin/env python3(本机 /usr/bin 只读无 python3,CI 与工具链均兼容);
- scripts/dev-env.sh:PATH 预置 target/toolchain/bin(本机 zip shim
  所在,gitignored;CI 用真实 zip),修复 release_handbook packs
  边界 cannot start zip 环境缺口;
- 全量 cargo test:1105 通过 / 0 失败(此前 2 个记录在案的环境基线
  失败——replay python 包装与 packs zip——均已消除)。
2026-11-18 10:29:26 +08:00
cflmy 9331af78e2 release(2.8.0): 合入 CHANGELOG/README/发版说明/skills prove 任务;CI 链接指向 doc/releases
- CHANGELOG.md:v2.8.0 条目(中英双语);
- README.md:版本行 2.7.1→2.8.0 + 愿景第 6 条(知识可证明);
- doc/releases/v2.8.0.md:双语发版说明(亮点/用法/已知限制);
- skills/marqdo-dev/index.mq.md:新增 prove 任务(路径/目录模式/
  require_lean/json;参数用 + 行声明升参,check 与 narrative-ratio 通过);
- 设计文档 §12.5 标记已合入;发版链接统一指向 doc/releases/v2.8.0.md。
2026-11-18 10:29:26 +08:00
cflmy 73bf574a55 ci: proof.yml Full sweep 接真任务——40 夹具单调性 + T4 一致性 + 分歧注入红线
- corpus monotonicity(offline_checked ⊆ lean_proved)与 T4 差分一致性
  进 CI(MARQDO_PROOF_REQUIRE_LEAN=1);
- Full sweep 改为分歧注入红线:--fault-inject offline-claim 必须触发
  error[proof.divergence] 且退 1,护栏失灵(静默落绿)即 CI 失败;
  本地实测 exit=1 + proof.divergence 诊断。
2026-11-18 10:28:18 +08:00
cflmy 4fae71342d prove: P3 — --all 目录模式、T4 差分一致性、库语义对齐、2.8.0 收口
- main.rs:prove --all/--max-files(递归收集,目录不带 --all 拒绝;
  聚合 JSON kind=prove-all,整体状态差者胜);--fault-inject offline-claim
  (调试分歧注入,A3 护栏验证入口)
- tests/conformance.rs:T4 差分一致性——5 例纯函数语料(算术/中文标识符/
  分支比较/字符串拼接/i64 边界)解释器求值 == Lean example(simp+try rfl);
  B4 result.ok 结构字段 access 两侧一致
- MarqdoProof.lean:mqAdd 补文本拼接与 num 混合(与解释器 eval_binary(Add)
  对齐——T4 实测抓出的真分歧);mqDisplay 显示串(标量精确,容器一层,
  有意简化并记录)
- 文档:design §12 P3 落地 + §12.4 延期理由(foreach/assume-guarantee/T3
  → 2.9)+ §12.5 权限受限待合入清单;roadmap 状态 → 已实施;
  教程 §13.8 prove 章节;skills/marqdo/reference.md 定理表;
  doc/verification/skill-proof-theory.md(库形式化说明);
  doc/roadmap/prove-release-2.8.0.md(双语发版说明 + CHANGELOG/README/
  skills/marqdo-dev prove 任务待合入原文)
- Cargo.toml/Cargo.lock:2.7.1 → 2.8.0

实测:全量 516 通过(仅 2 个已记录环境基线失败);prove 23 + prove_lean 10
+ corpus 40 夹具 + conformance 6 例全绿;biz 定理 proved、假定理反例、
--all 聚合与护栏目录模式同样生效。
2026-11-18 10:28:18 +08:00
cflmy 63d60e3ba1 prove: P2 — 离线符号执行(F1–F5)+ 单调性护栏 + 语料库
- offline.rs:SymVal 符号执行(Const/Struct/OpResult/Param/Unknown);
  If 分支克隆状态并接续后续语句(修复 Return-in-outer 编排丢结果);
  可行性检查(前提∩路径条件为空 → 空真关闭,Lean 假设矛盾同构);
  F2 轨迹包含/长度、F3 构造器结构求值、F4 自由原子二分、
  F5 区间:字面重述关闭 + 区间违反反例(区间端点见证,如 金额 = 10001);
  区间蕴含保守 unverified(当前 Lean 脚本无 Val 传递引理,先于 Lean
  关闭即触发 divergence——诚实优先)
- 判定编排:离线先行(毫秒级 checked ≠ proved)→ Lean 复核升级 proved;
  分歧护栏:checked 但 Lean 关不掉 / 反例被 Lean 证出 ⇒
  error[proof.divergence] 退 1 永不落绿;MARQDO_PROOF_INJECT_DIVERGENCE 验证
- emit:try split 按 if 嵌套深度重复(三路分支可达);simp 清单补
  mqResultError/mqValueOr/mqAnd/mqOr/mqNot(分歧护栏暴露)
- tests/prove_corpus.rs:8 类 × 5 = 40 夹具语料库,
  offline_checked ⊆ lean_proved 强制 + 无 Lean 禁 proved;
  f5_interval_closure_scope 单测锁定 F5 诚实范围
- 设计文档 §12 记录 P2 落地、修复与文法限制

实测:biz 3 定理离线 checked→Lean proved;假定理反例 金额 = 10001
指回定理表行;注入分歧 → error/divergence 退 1;全量 516 通过
(仅剩 2 个已记录环境基线失败)。
2026-11-18 10:28:18 +08:00
cflmy 44d2928c06 prove: P1 — Lean 判定接入 CLI(driver + 证书缓存 + CI)
- driver.rs:工具链发现(--lean → MARQDO_PROOF_LEAN → PATH;显式坏路径
  error[proof.lean_missing] 不回退);MarqdoProof 库内嵌进二进制,按内容
  哈希缓存、lean -o 直接构建(运行时零 lake/elan 依赖);lean 调用带超时
  (--timeout/--heartbeats);unsolved→unproved、error→error、
  sorry→unverified;-- mq: 注释 + 定理头注释 → 证据映射指回源行
- cache.rs:复合键证书(源码⊕plan⊕库sha256⊕lean版本⊕版本),
  命中跳判定(lean.cache: hit),--no-cache/MARQDO_PROOF_NO_CACHE 绕过
- mod.rs:per-claim 判定面(status/decided_by/evidence/source_line)、
  lean JSON 对象、proof.claim_failed 诊断;文件状态只聚合有定理与被拒函数
- main.rs:--lean/--timeout/--no-cache/--heartbeats 旗标;prove emit
  子命令只生成不判定;策略 none → sorry(绝不冒充 proved)
- tests/prove_lean.rs:A1/E1/E4/F2/F3/F4/G1/G2/G2b 矩阵,无工具链 SKIP、
  MARQDO_PROOF_REQUIRE_LEAN=1 硬性要求;实测抓出并修复错误行/列解析、
  逐定理记录缺失、含点函数名归因三处判定缺陷
- CI proof.yml:装 Lean 4.35.0 → 底座校验 → 判定矩阵(CI 不许静默降级)
- 设计文档 §12 记录 P1 落地与偏差(直接 lean -o,不经 lake)

实测:业务样例 3 定理 proved;假定理 unproved 退 1 指回定理表行;
缓存命中后跳判定(假 lean 计数器验证);全量 Rust 测试 508 通过
(仅剩 2 个已记录环境基线失败)。
2026-11-18 10:28:18 +08:00
cflmy fa832268b3 prove: fix issues found in Lean verification round
- p2_len fixture claim corrected: pure function's trace is always empty,
  so '长度(轨迹) = 2' was an authoring mistake -> '长度(轨迹) = 0'
  (Nat-path coverage unchanged); all 7 claim-bearing files now prove
- generated Lean headers set linter.unusedVariables/unusedSimpArgs off:
  machine-emitted artifacts should not trigger human-authoring lints
  (0 warnings now)
- verification driver script + updated results in design doc 12 and
  library README
2026-11-18 10:28:18 +08:00
cflmy 9576188a2e prove: real Lean 4.35.0 verification round
- MarqdoProof semantic base (Val + mq* helpers + branch-contradiction
  lemmas, no axiom/opaque), lake-built; sources under doc/verification/
- emitter: ASCII-only namespaces (uXXXX encoding), guillemet wrapping
  for all non-ASCII identifiers, ':' -> '_' inside op ctor names,
  ctor pattern arg binding, ASCII-safe rename forms, placeholder ctor
  via op_ctor, flipped run equation (outputs on the left), try-split
  for branchless bodies, validated proof script (simp_all + .elim
  contradiction + omega)
- business example: 3/3 theorems proved by real Lean; 5/6 claim
  fixtures proved, p2_len honestly unproved (false claim)
- design doc section 12: Lean round findings + results
2026-11-18 10:28:18 +08:00
cflmy 528a1f0dbc prove: fix 4 review defects (honesty + compilability) + business validation
Code review after the initial prove commit found and fixed:

1. Calls inside table/list literals were silently dropped — a function
   with side-effectful cells lowered to "no ops" and claimed purity in
   Lean. lower_expr's fallback now rejects with proof.unsupported
   (author must bind the call to a variable first).
2. Same-callee call sites with different arities (optional params)
   shared one Op whose ctor declared the first-seen arity, emitting
   uncompilable Lean. register_op now suffixes `/N` per arity.
3. proof.name_shadow fired once per walked function (N functions → N
   duplicates) and checked params of claim-free functions. Predicate
   check runs once per module; param check only for functions that
   carry claims.
4. 长度(轨迹) = 2 emitted mqEq (Nat) (Val) — type-mismatched Lean.
   Nat-context detection renders trace-length comparisons natively;
   untranslatable shapes become comments instead of broken Lean.

Hardening: lean_ident reserves 轨迹₀ / h_前提 (theorem binder
collision); emit_theorems dedups repeated claim ids.

Tests: +4 integration regressions (p2_a..p2_d), 23 prove tests total;
full suite green except the documented env-limited failures (one
host::foreign_session flake passes standalone).

Business validation (doc §12): e-commerce order-approval SKILL with 3
theorems cross-checked against the real interpreter — 5000 → auto
(1-step trace), 20000/60000 → manual ticket T-20000/T-60000
(需人工→创建, exactly 2 steps); corrupted claim tables hit
check --proof codes while staying default-off; double emit
byte-identical.
2026-11-18 10:28:18 +08:00
cflmy a11b347659 prove: add marqdo prove (P0 emit/audit + P1 claim tables & check --proof)
Language layer (ADR 0010):
- claim tables (定理|结论|前提|策略) parsed before first executable
  statement, extracted into Function.claims, removed from body
- check --proof (default off): proof.claim_malformed / claim_ambiguous /
  claim_misplaced / claim_duplicate / claim_unknown_symbol /
  claim_unsupported / name_shadow

Runtime layer (src/prove/):
- ir.rs: Plan IR with stable hand-rolled JSON (schema 1)
- lower.rs: subset acceptance (proof.while / proof.recursion /
  proof.dynamic_call), inlining for straight-line pure callees, opaque
  ops with effect labels, --allow-opaque whole-function downgrade
- types.rs: literal-driven inference + branch confluence
  (proof.type_mismatch, exit 1)
- emit.rs: deterministic Lean emission (Val × List Op, continuation
  style, -- mq: line:col anchors, «…» for dotted idents, theorem
  scaffolds from claims with unfold/split script)
- mod.rs: prove/emit/audit/clean commands, Verdict taxonomy
  (error > unproved > rejected > unverified > checked > proved),
  exit codes 0/1/2 per design §3.3

Tests: tests/prove.rs 19 integration cases (no Lean required) + module
unit tests; full suite stays green except the 3 documented
env-limited failures.

Docs: doc/design/prove-cli.md (§12 records deviations: result.ok/error
vs drafted success/failure, Val-based run at P1, op arity, opaque
effect label), doc/roadmap/prove.md, doc/adr/0010.

Env fixes carried in: scratch dirs in test helpers honor
CARGO_TARGET_DIR (needed on this machine's read-only target/debug).
2026-11-18 10:28:18 +08:00
cflmy 8e437e2cd3 ci(agent): permit native ABI loading in offline Agent integration tests 2026-11-18 10:17:47 +08:00
cflmy 23229a6ac9 ci(agent): permit native ABI loading in offline Agent integration tests 2026-11-18 10:17:44 +08:00
cflmy 58b65215a1 test(agent): show the failed native choice result in interpreter smoke diagnostics 2026-11-18 10:16:43 +08:00
cflmy 92c3f80055 fix(agent): compare branch labels using explicit text conversion 2026-11-18 09:59:27 +08:00
cflmy 8a66f803cb feat(agent): add validated forward-only branching from model choices to registered SKILL steps 2026-11-18 09:59:16 +08:00
cflmy 3ce59a4da8 test(ai): verify JSON-formatted small-model option parsing from Marqdo 2026-11-18 09:57:47 +08:00
cflmy 90688741c5 feat(agent): parse bounded JSON choice envelopes without relaxing skill allowlist 2026-11-18 09:57:37 +08:00
cflmy 70b88b3767 security(agent): require explicit read-only classification before automatic SKILL/parallel dispatch 2026-11-18 09:57:06 +08:00
cflmy f859e6eeea test(ai): include required short model prompt in workflow fixture 2026-11-18 09:56:55 +08:00
cflmy 6705e2e6b7 fix(agent): require explicit local prompt for model workflow steps 2026-11-18 09:56:49 +08:00
cflmy 6e8a62928b test(ai): verify plugin-only tick returns waiting input and commits final step 2026-11-18 09:56:39 +08:00
cflmy 398a0b7222 ci(agent): introduce focused plugin-only native workflow gate separate from long EK suite 2026-11-18 09:56:28 +08:00
cflmy e8f1a3e126 fix(agent): deduplicate equivalent numbered and labeled user replies 2026-11-18 09:56:16 +08:00
cflmy 8ea56cbe30 test(ai): exercise ABI failed-only recovery without executing already successful children 2026-11-18 09:55:42 +08:00
cflmy 8085d06124 feat(ai): expose failed-only read-only child recovery as a short Marqdo workflow 2026-11-18 09:55:30 +08:00
cflmy 6f929dc2da feat(agent): publish safe partial fan-out recovery through Agent ABI 2026-11-18 09:55:19 +08:00
cflmy dd22180269 feat(agent): recover failed read-only children only, preserving successful subtask results 2026-11-18 09:55:11 +08:00
cflmy cc48bf6d05 docs(agent): document plugin-only durable step state engine and safety boundaries 2026-11-18 09:54:45 +08:00
cflmy 19f986953a test(ai): prove successful parallel child outputs survive failed sibling and checkpoint reload 2026-11-18 09:54:21 +08:00
cflmy 770dee5199 fix(agent): prevent EffectLedger atomic temp collisions under parallel operations 2026-11-18 09:54:06 +08:00
cflmy f6612813e3 fix(agent): remove resume test global cwd races and make atomic temp names unique 2026-11-18 09:53:58 +08:00
cflmy 643ea06340 feat(ai): add one-step native workflow driver for model input and bounded child tasks 2026-11-18 09:53:17 +08:00
cflmy 0cd64a7450 fix(agent): persist partial child outcomes and require verified process success before workflow commit 2026-11-18 09:53:02 +08:00
cflmy 981faac022 ci(ai): test native workflow plugin through actual Marqdo interpreter 2026-11-18 09:52:42 +08:00
cflmy f818834ec1 test(ai): exercise ABI-only durable workflow in actual Marqdo interpreter 2026-11-18 09:52:35 +08:00
cflmy 8d47507d15 feat(ai): expose a concise ABI-backed durable workflow library 2026-11-18 09:52:13 +08:00
cflmy 1e1f05c087 feat(agent): register ABI workflow state transitions and cancellation 2026-11-18 09:51:59 +08:00
cflmy 06e61efc51 feat(agent): implement plugin-only durable step workflow with deterministic next/commit/cancel and tests 2026-11-18 09:51:51 +08:00
cflmy 2dfa0b2a5b fix(ai): do not mistake LLM transport errors for choices or trigger format repair 2026-11-18 09:46:24 +08:00
cflmy 629ad8ed39 feat(agent): tolerate short deterministic small-model selection phrases 2026-11-18 09:43:59 +08:00
cflmy ee677478be test(ai): verify file/class/function context composition in Marqdo interpreter 2026-11-18 09:43:30 +08:00
cflmy edbf241d99 feat(ai): compose current user and scoped file/class/function source into a bounded context pack 2026-11-18 09:43:24 +08:00
cflmy add6a7d32c docs(agent): record implemented contracts and precise VM/runtime completion gates 2026-11-18 09:42:07 +08:00
cflmy c64ec99115 feat(ai): expose minimal ask/start/wait on top of native LLM and subtask APIs 2026-11-18 09:41:28 +08:00
cflmy 60a3b84a84 test(ai): exercise durable input and reply from a real Marqdo program 2026-11-18 09:41:08 +08:00
cflmy 02a4f2d20d fix(agent): skip YAML setext lookalikes in document-scope parser 2026-11-18 09:40:50 +08:00
cflmy 88490e3092 ci(ai): execute real native choice and scoped-context Marqdo smoke 2026-11-18 09:40:15 +08:00
cflmy 9031c106a1 test(ai): add offline Marqdo interpreter smoke for native choice and scoped context 2026-11-18 09:40:08 +08:00
cflmy 633436e40f fix(agent): compare owned JSON values with dereferenced optional identity values 2026-11-18 09:39:53 +08:00
cflmy cf73fcf1ef feat(ai): add allowlisted SKILL enter via standard Marqdo subtasks 2026-11-18 09:39:37 +08:00
cflmy e48fd5b0f4 feat(ai): aggregate concurrent child status without losing successful siblings 2026-11-18 09:39:06 +08:00
cflmy b2f97e72c3 build(agent): lock pulldown-cmark dependency for native scoped context 2026-11-18 09:38:58 +08:00
cflmy c7c0f66d1f feat(agent): register typed concurrent task result aggregator 2026-11-18 09:38:33 +08:00
cflmy d5ab9daebb feat(agent): classify parallel child successes, failures and unknown outcomes 2026-11-18 09:38:26 +08:00
cflmy 5795236d1f feat(ai): expose durable step-boundary input/reply in flow SKILL 2026-11-18 09:37:56 +08:00
cflmy e8d6dc92fc feat(agent): register user-input pause/reply gate primitives 2026-11-18 09:37:44 +08:00
cflmy afe31cb2a8 feat(agent): durable user-input gate with idempotent reply, revision and session checks 2026-11-18 09:37:35 +08:00
cflmy 905a67df32 feat(ai): expose native Markdown scope selection to Marqdo authors 2026-11-18 09:37:18 +08:00
cflmy f63b7ef48d feat(agent): register scoped context projection in native plugin 2026-11-18 09:37:02 +08:00
cflmy 393558ca97 feat(agent): register scoped context projection in native plugin 2026-11-18 09:36:59 +08:00
cflmy 0d9bd99fc0 feat(agent): add Markdown heading-scoped bounded file/class/function prompt projection with tests 2026-11-18 09:36:52 +08:00
cflmy a0c779e022 fix(ai): declare function parameters in Marqdo prose syntax 2026-11-18 09:36:31 +08:00
cflmy a82b6fdde1 fix(ai): declare function parameters in Marqdo prose syntax 2026-11-18 09:36:28 +08:00
cflmy 3613ed7c4e fix(ai): declare function parameters in Marqdo prose syntax 2026-11-18 09:36:26 +08:00
cflmy 9564dff777 docs(ai): link the new native flow, context and recovery modules 2026-11-18 09:34:13 +08:00
cflmy f56deffefe test(agent): isolate EffectLedger tests without process-global cwd races 2026-11-18 09:33:28 +08:00
cflmy bdedf3ecd8 ci(ai): include scoped context pack in syntax gates 2026-11-18 09:32:55 +08:00
cflmy b0ee958fcf feat(ai): add explicit small-model file/class/function context pack 2026-11-18 09:32:48 +08:00
cflmy e64f6b23b4 fix(ai): use valid Marqdo branch expressions and literal main reference 2026-11-18 09:32:04 +08:00
cflmy eed4f05ea4 ci(agent): test native parser and check the new Marqdo flow modules 2026-11-18 09:31:14 +08:00
cflmy d88ed274ed feat(ai): expose short checkpoint and bounded recovery functions 2026-11-18 09:30:49 +08:00
cflmy 7fdd97f675 feat(agent): classify invalid model output and bound local recovery 2026-11-18 09:30:33 +08:00
cflmy c299efe589 feat(ai): add thin model-choice and parallel-document flow library 2026-11-18 09:30:22 +08:00
cflmy b3867c46db feat(agent): register native choice parser in plugin ABI 2026-11-18 09:30:10 +08:00
cflmy 1a39a53d93 feat(agent): add fail-closed small-model choice parser and tests 2026-11-18 09:30:03 +08:00
cflmy 6d6f580d24 docs: lead with Markdown-to-execution film and original View imagery 2026-11-13 12:06:30 +08:00
github-actions[bot] af05f19301 docs: publish cinematic Markdown-to-execution promotional film 2026-11-13 04:05:04 +00:00
cflmy 3201369470 docs: build cinematic 3-view Markdown execution promotion from original screenshots 2026-11-13 12:04:18 +08:00
cflmy 05197378b3 assets: add original procurement View screenshot and Markdown three-view concept art 2026-11-13 12:01:22 +08:00
github-actions[bot] f3b3152f07 docs: render Marqdo 2.7.1 promotional video from existing assets 2026-11-13 03:35:16 +00:00
cflmy 22364f2f1b feat(docs): add reproducible Marqdo v2.7.1 promotional video editor 2026-11-13 11:34:12 +08:00
cflmy b69a90501d docs: feature verified procurement GIF and real Marqdo View screenshot 2026-11-13 11:19:51 +08:00
github-actions[bot] 7ff881f506 docs: capture live procurement CLI GIF and View screenshot 2026-11-13 03:19:13 +00:00
cflmy 9acbe10986 build(docs): reproducibly capture real procurement CLI and View assets 2026-11-13 11:18:41 +08:00
cflmy 81989a26d7 fix(demo): bind numeric quote validity explicitly for contract checks 2026-11-13 11:08:48 +08:00
cflmy cf0ba6dccd docs: launch executable skills with procurement showcase and animated assets 2026-11-13 11:07:57 +08:00
cflmy 0de703f86a debian: include cached orig until its publication is confirmed 2026-11-11 01:04:18 +08:00
cflmy 4907f92d84 debian: stop reapplying the upstream engineering compatibility fix 2026-11-11 00:57:16 +08:00
cflmy eac6921524 view: preserve disclosure state and release CLI 2.7.1 2026-11-11 00:44:32 +08:00
1850 changed files with 24947 additions and 341 deletions

No files matched your search

View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
Regular → Executable
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
Regular → Executable
View File
File mode changed.
Regular → Executable
View File
File mode changed.
Regular → Executable
View File
File mode changed.
Regular → Executable
View File
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
@@ -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
+16
View File
@@ -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
+9 -5
View File
@@ -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,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
+70
View File
@@ -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
+40
View File
@@ -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
View File
File mode changed.
+28
View File
@@ -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
+43
View File
@@ -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
+115
View File
@@ -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"
+91
View File
@@ -0,0 +1,91 @@
# One-time, fail-closed promotion from verified main to immutable v2.9.0.
# GITHUB_TOKEN-created tag pushes do not recursively start tag workflows.
# Explicit workflow_dispatch is used to run the existing multi-platform
# Release workflow against the immutable tag itself.
name: Release v2.9.0 promotion
on:
push:
branches: [main]
paths:
- "Cargo.toml"
- "doc/releases/v2.9.0.md"
- ".github/workflows/release-v2.9.yml"
pull_request:
paths:
- "Cargo.toml"
- "Cargo.lock"
- "crates/marqdo-wasm/Cargo.toml"
- "ext/VERSION"
- "doc/releases/v2.9.0.md"
- ".github/workflows/release-v2.9.yml"
workflow_dispatch:
permissions:
contents: write
actions: write
concurrency:
group: release-v2.9-promotion
cancel-in-progress: false
jobs:
verify-and-dispatch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true
- uses: dtolnay/rust-toolchain@stable
- name: Verify complete, matching release metadata
run: |
set -euo pipefail
python3 - <<'PY'
import re, pathlib
want = '2.9.0'
for file in ['Cargo.toml', 'crates/marqdo-wasm/Cargo.toml']:
data = pathlib.Path(file).read_text()
assert re.search(r'^version\s*=\s*"2\.9\.0"\s*$', data, re.M), file
lock = pathlib.Path('Cargo.lock').read_text()
for name in ['marqdo', 'marqdo-wasm']:
assert re.search(r'\[\[package\]\]\nname = "'+name+r'"\nversion = "2\.9\.0"', lock), name
assert pathlib.Path('ext/VERSION').read_text().strip() == want
assert pathlib.Path('doc/releases/v2.9.0.md').exists()
PY
git diff --exit-code
- name: Install pinned Lean checker
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 and source-derived 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 gate source semantics, actual Lean and compatibility
env:
MARQDO_PROOF_REQUIRE_LEAN: "1"
run: |
cargo build --locked
cargo test --locked --lib knowledge::
cargo test --locked --test knowledge_proof
cargo test --locked --test prove_lean
cargo test --locked --test prove_corpus
cargo test --locked --test conformance
cargo test --locked --test executable_knowledge
cargo test --locked --test release_handbook
- name: Create v2.9.0 only once and dispatch full platform release
if: github.repository == 'cflmy/marqdo' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
if git ls-remote --exit-code --tags origin refs/tags/v2.9.0 >/dev/null 2>&1; then
echo "v2.9.0 already exists; refusing to replace or re-dispatch assets"
exit 1
fi
test "$(git rev-parse HEAD)" = "$GITHUB_SHA"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag -a v2.9.0 "$GITHUB_SHA" -m "Marqdo v2.9.0 full: Verified Knowledge Compiler"
git push origin refs/tags/v2.9.0
gh workflow run release.yml --ref v2.9.0
echo "Dispatched Release workflow for immutable tag v2.9.0"
+26 -3
View File
@@ -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
@@ -118,6 +120,7 @@ jobs:
echo "VSIX=$vsix" >> $env:GITHUB_ENV
echo "SOURCE=$source" >> $env:GITHUB_ENV
echo "PUBLIC=$public" >> $env:GITHUB_ENV
echo "PUBLISH_EXT=$((Get-Content ext/VERSION -Raw).Trim() -eq $ver)" >> $env:GITHUB_ENV
echo "EXT=$extZip" >> $env:GITHUB_ENV
echo "NATIVE=$nativeZip" >> $env:GITHUB_ENV
@@ -129,8 +132,6 @@ jobs:
dist/${{ env.EXE }}
dist/${{ env.ZIP }}
dist/${{ env.STDLIB }}
dist/${{ env.EXT }}
dist/${{ env.NATIVE }}
dist/${{ env.VSIX }}
dist/${{ env.SOURCE }}
dist/${{ env.PUBLIC }}
@@ -138,6 +139,17 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload independently versioned extension assets
if: env.PUBLISH_EXT == 'True'
uses: softprops/action-gh-release@v2
with:
files: |
dist/${{ env.EXT }}
dist/${{ env.NATIVE }}
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
linux:
runs-on: ubuntu-latest
# Wait until Windows has created the GitHub Release, then attach Linux zips
@@ -169,6 +181,9 @@ jobs:
set -euo pipefail
VER="${GITHUB_REF_NAME#v}"
TARGET="x86_64-unknown-linux-gnu"
if [[ "$(tr -d '[:space:]' < ext/VERSION)" == "$VER" ]]; then
echo "PUBLISH_EXT=true" >> "$GITHUB_ENV"
fi
mkdir -p dist/stage-native/native
for lib in libweb.so libagent.so libquantum.so liblinalg.so libllm.so libengineering.so; do
src="target/release/${lib}"
@@ -197,8 +212,16 @@ jobs:
uses: softprops/action-gh-release@v2
with:
files: |
dist/${{ env.NATIVE }}
dist/${{ env.LINUX_ZIP }}
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload independently versioned Linux native pack
if: env.PUBLISH_EXT == 'true'
uses: softprops/action-gh-release@v2
with:
files: dist/${{ env.NATIVE }}
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Regular → Executable
+2
View File
@@ -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
+73
View File
@@ -2,6 +2,79 @@
## Unreleased
## 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
CLI 修复发布:View 实际逻辑的手动开合不再被布局重排或运行结果刷新覆盖;函数、链接、列表和记录按内容排版,手机详情整行展示。核心仍为 19 个构造;拓展库保留 2.7.0。
CLI fix release: implementation disclosures retain mouse/keyboard choices across resize, nested source reading and live replacement. Typed call/link/value details preserve real navigation and read-only inspection. Independent extension packs remain 2.7.0.
详见 [双语发布说明](doc/releases/v2.7.1.md)。旧静态站点需要用新 CLI 重新导出。
## v2.7.0 — 2026-11-10
### Highlights / 亮点
Generated
+16 -16
View File
@@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
version = 3
[[package]]
name = "adler2"
@@ -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.0"
version = "2.9.0"
dependencies = [
"anyhow",
"assert_cmd",
@@ -656,7 +656,7 @@ dependencies = [
[[package]]
name = "marqdo-wasm"
version = "2.7.0"
version = "2.9.0"
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
View File
@@ -1,6 +1,6 @@
[package]
name = "marqdo"
version = "2.7.0"
version = "2.9.0"
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"]
Regular → Executable
View File
File mode changed.
+129 -6
View File
@@ -1,20 +1,142 @@
# 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.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">
</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.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.
[![Watch Marqdo 2.7.1 — from Markdown to execution](assets/marketing/marqdo-2.7.1-markdown-to-execution-cover.jpg)](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.
![Three views, one source — source Markdown, rendered Markdown, executable View](assets/marketing/source-markdown-view-concept.png)
<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 [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
# => 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.
![Animated results from real Marqdo 2.7.1 function calls](assets/marketing/procurement-cli.gif)
<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
```
![Marqdo View — original detailed screenshot provided by the project author](assets/marketing/user-procurement-view.png)
<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 汇总与文档维护。
开发标准库和拓展库请直接阅读[可执行库开发指南](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)
@@ -135,6 +257,7 @@ v2.2.0 起,`marqdo call` 可以直接调用这份文件里的一个函数。
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

@@ -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.
+29
View File
@@ -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: 139 KiB

+42
View File
@@ -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. 剩余额度 &lt; 本单金额 → 拒绝</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 &lt; ¥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. 剩余额度 &lt; 本单金额</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 &lt; ¥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

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 KiB

View File
File mode changed.
View File
File mode changed.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "marqdo-wasm"
version = "2.7.0"
version = "2.9.0"
edition = "2021"
license = "Apache-2.0"
description = "Marqdo interpreter as WebAssembly (browser host bridge)"
Regular → Executable
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
Regular → Executable
View File
File mode changed.
Vendored Regular → Executable
View File
File mode changed.
+14
View File
@@ -1,3 +1,17 @@
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.
* 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 (2.7.0-1ppa2) noble; urgency=medium
* Repair engineering plugin compatibility for this 2.7.0 release.
Vendored Regular → Executable
View File
File mode changed.
Vendored Regular → Executable
View File
File mode changed.
Vendored Regular → Executable
View File
File mode changed.
Vendored Regular → Executable
+2 -1
View File
@@ -1 +1,2 @@
engineering-stable-option.patch
# engineering-stable-option.patch
# The fix is already in upstream 2.7.1.
Vendored Regular → Executable
View File
File mode changed.
Vendored Regular → Executable
View File
File mode changed.
Regular → Executable
+3
View File
@@ -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;区分现有能力、设计推导与待实测项 |
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
Regular → Executable
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
+79
View File
@@ -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` 的聚合粒度(按文件/按函数)。
- 证书是否需要签名,以及签名由谁持有。
View File
File mode changed.
Regular → Executable
View File
File mode changed.
View File
File mode changed.
Regular → Executable
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
Regular → Executable
View File
File mode changed.
Regular → Executable
View File
File mode changed.
View File
File mode changed.
Regular → Executable
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
Regular → Executable
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
Regular → Executable
View File
File mode changed.
Regular → Executable
View File
File mode changed.
Regular → Executable
View File
File mode changed.
Regular → Executable
View File
File mode changed.
View File
File mode changed.
Loaded 100 of 1850 files, more files were not shown because too many files have changed in this diff. Show more