feat: executable-knowledge S0–S1 gate plus effect and MLSP reuse subset
Establish author baseline fixtures and offline tests, make SemanticProject the sole authority for graph edges, classify named steps, and tighten local reuse so unknown effects are not pure and MLSP binds by SymbolId. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
bedd53e212
commit
ecbdd18303
31 files changed
+1324
-56
No files matched your search
@@ -0,0 +1,12 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S0 单文件内联计算
|
||||
status: implemented
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
这是演示订单,单价与数量直接写在计算处。
|
||||
|
||||
**小计 = [两件商品的小计](2 * 30)**
|
||||
> print text=`小计`
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S0 提取命名函数
|
||||
status: implemented
|
||||
---
|
||||
|
||||
## 商品小计
|
||||
|
||||
根据购买数量`数量`和商品单价`单价`计算小计。
|
||||
|
||||
*[按数量与单价计算](数量 * 单价)*
|
||||
|
||||
# main
|
||||
|
||||
计算同一笔演示订单。
|
||||
|
||||
**小计 = [两件商品的小计](商品小计(数量=2, 单价=30))**
|
||||
> print text=`小计`
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S0 两文档显式 import
|
||||
status: implemented
|
||||
import:
|
||||
pricing: pricing.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
跨文档复用已提取的定价能力。
|
||||
|
||||
**小计 = [两件商品的小计](pricing.商品小计(数量=2, 单价=30))**
|
||||
> print text=`小计`
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S0 定价能力(被引用模块)
|
||||
status: implemented
|
||||
---
|
||||
|
||||
## 商品小计
|
||||
|
||||
根据购买数量`数量`和商品单价`单价`计算小计。
|
||||
|
||||
*[按数量与单价计算](数量 * 单价)*
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S0 表格取元与遍历
|
||||
status: implemented
|
||||
import:
|
||||
json: lib/json.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
`表` = > json.parse text={"键":"值"}
|
||||
`列` = > json.parse text=["一","二"]
|
||||
|
||||
**a = [取表项](access(`表`, "键"))**
|
||||
**b = [取列表第二项](access(`列`, 2))**
|
||||
> print text="a=" + `a`
|
||||
> print text="b=" + `b`
|
||||
- [篮子里的每个果子](遍历 `列` 为 `果`)
|
||||
> print text="果子=" + `果`
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S0 业务政策草稿(设计态)
|
||||
status: design
|
||||
description: >
|
||||
展示作者将来如何就地写来源与适用条件。当前运行时尚未强制 SourceRef /
|
||||
适用性校验(见缺口 G05)。本文件可本地试跑纯计算,但不计入「业务事实已证实」。
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
某地区标准增值税率为 13%。若要成为可复用业务事实,还需要原始资料、有效期、
|
||||
适用范围与验证事件——这些**尚未由编译器强制**,故本样例标为 design。
|
||||
|
||||
## 标准税率
|
||||
|
||||
*[当前标准税率](0.13)*
|
||||
|
||||
**税率 = [读取标准税率](标准税率())**
|
||||
**含税 = [演示含税价](100 * (1 + 税率))**
|
||||
> print text=`含税`
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S0 同名模块 A
|
||||
status: expected_failure
|
||||
---
|
||||
|
||||
## 商品小计
|
||||
|
||||
根据购买数量`数量`和商品单价`单价`计算小计(A 侧)。
|
||||
|
||||
*[A 侧实现](数量 * 单价)*
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S0 拒绝复用:裸名无法消歧(现状基线)
|
||||
status: expected_failure
|
||||
description: >
|
||||
两模块均定义「商品小计」。当前默认语法要求显式路径调用;
|
||||
裸名调用不导入任何一方时,应失败而非猜一个目标。
|
||||
(同名已 import 仍误连是 S1 验收项,不在本负例。)
|
||||
import:
|
||||
a: a.mq.md
|
||||
b: b.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
**小计 = [未消歧的同名调用](商品小计(数量=2, 单价=30))**
|
||||
> print text=`小计`
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S0 同名模块 B
|
||||
status: expected_failure
|
||||
---
|
||||
|
||||
## 商品小计
|
||||
|
||||
根据购买数量`数量`和商品单价`单价`计算小计(B 侧加倍)。
|
||||
|
||||
*[B 侧实现](数量 * 单价 * 2)*
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S0 拒绝复用:缺 import
|
||||
status: expected_failure
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
未 import 时不得静默解析外部模块。
|
||||
|
||||
**小计 = [误用外部定价](pricing.商品小计(数量=2, 单价=30))**
|
||||
> print text=`小计`
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S1 步骤 kind 分类样例
|
||||
status: implemented
|
||||
import:
|
||||
json: lib/json.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
`列` = > json.parse text=["一","二"]
|
||||
|
||||
**a = [取列表首项](access(`列`, 1))**
|
||||
**b = [两件商品的小计](2 * 30)**
|
||||
- [篮子里的每个果子](遍历 `列` 为 `果`)
|
||||
> print text=`果`
|
||||
> print text=`a`
|
||||
> print text=`b`
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S1 同名模块 A(应被选中)
|
||||
status: implemented
|
||||
---
|
||||
|
||||
## 商品小计
|
||||
|
||||
根据购买数量`数量`和商品单价`单价`计算(A)。
|
||||
|
||||
*[A 侧](数量 * 单价)*
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S1 同名模块 B(不应被选中)
|
||||
status: implemented
|
||||
---
|
||||
|
||||
## 商品小计
|
||||
|
||||
根据购买数量`数量`和商品单价`单价`计算(B 加倍)。
|
||||
|
||||
*[B 侧](数量 * 单价 * 2)*
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S1 同名仅 import A
|
||||
status: implemented
|
||||
import:
|
||||
pricing: a.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
只 import A;不得落到 B。
|
||||
|
||||
**小计 = [两件商品的小计](pricing.商品小计(数量=2, 单价=30))**
|
||||
> print text=`小计`
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S2 G06 效应传递与未知不纯
|
||||
status: implemented
|
||||
---
|
||||
|
||||
## save
|
||||
|
||||
写入演示文件。
|
||||
|
||||
> fs.write_text path=out.txt text=ok
|
||||
*1*
|
||||
|
||||
## wrap
|
||||
|
||||
无危险词包装,内部调用 save。
|
||||
|
||||
> save
|
||||
*None*
|
||||
|
||||
# main
|
||||
|
||||
> wrap
|
||||
> print text=ok
|
||||
Reference in new issue
Block a user