cflmy
6a9441d188
test(proof): GFM assumption tables remain metadata and coexist with theorem tables
2026-11-18 12:41:34 +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
6e5f9bafb7
feat(parse): treat canonical theorem mq://claim references as inert Markdown knowledge links
2026-11-18 12:03:08 +08:00
cflmy
5236cf6fa3
feat(parse): classify mq:// knowledge-anchor links as inert narrative references
2026-11-18 11:58:18 +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
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
d9aef957f7
Release 2.7.0: executable handbooks and native user-site workflows
2026-11-10 17:03:06 +08:00
cflmy
c50c515c4a
Refactor executable library handbooks and improve document reading
2026-11-08 22:19:11 +08:00
cflmy and Cursor
8f1010f967
Ship oracle journal values, bytecode/frontend hardening, and replay-policy Lean.
...
Host exposes oracle journals as language values with refuse/copy gates; bytecode and foreign session paths get modularized; applications and verification replay-policy sources land with Lake builds ignored.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-11-06 15:04:27 +08:00
cflmy and Cursor
142ab523d6
release: v2.3.0 Foreign Strong session/handle/replay/arity
...
Opaque session handles, affine close, replay_check vs oracle journal,
table arity refuse, and Ω∈V_safe gate for the Strong foreign narrative.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-11-01 14:46:08 +08:00
cflmy and Cursor
dcd3d329d4
feat: land S1–S6 executable-knowledge slices (NarrativeRef through CI)
...
Add comment-line NarrativeRef steps, generation CURRENT snapshots, frontmatter
sources/applicability, digest-guarded artifact.patch, lock change classes, and
an offline CI gate so the documented S0–S6 path has reviewable evidence.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-23 23:24:18 +08:00
cflmy
aea86746e7
feat: migrate corpus to file-scoped occlusion
2026-10-23 12:45:01 +00:00
cflmy
c773503938
Merge branch 'main' of https://github.com/cflmy/marqdo
...
# Conflicts:
# tests/migrate.rs
# tests/occlusion/classic-index.mq.md
2026-10-23 12:11:58 +00:00
cflmy
939e23ee88
refactor: scope markup compatibility per invocation
2026-10-23 12:11:26 +00:00
cflmy and Cursor
687c168014
feat(parse): use nested YAML import: maps instead of one-liner binds
...
Frontmatter imports are now valid YAML (`import:` / `导入:` with bind→target
entries), removing spaced keys. Add `marqdo migrate imports`, hard-error the
old one-liner form, and migrate lib/ext/examples/tests/docs accordingly.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-23 19:33:58 +08:00
cflmy
fc7097bae4
test: validate executable knowledge syntax across libraries
2026-10-23 08:47:49 +00:00
cflmy
0bbe735c3c
feat: add stable executable knowledge symbols
2026-10-23 08:24:10 +00:00
cflmy
bcfc763ba4
fix(parse): 孤立 * 行不再 panic(exit 101 → 干净诊断)
...
qdagent 全仓 labels 扫描期间实测:任何 .mq.md 里有一行只含单个 `*`
(markdown 强调残留)时,`*…* = 返回` 分支同时满足 starts_with/ends_with('*'),
切片 &trimmed[1..0] 越界,整条 labels 扫描被一个文件打死(exit 101)。
修复:斜体返回分支要求 len >= 2,裸 `*` 落回 "unrecognized statement"
干净错误而非崩溃。
实测:
- tests/errors/lone-asterisk.mq.md → check 报 "unrecognized statement: *",
exit 1(不再 101)
- gold 回归 error_lone_asterisk_line 通过
- cargo test --release 全套件 0 failed
2026-10-22 19:04:25 +08:00
cflmy
a14a6e221d
refactor: 删除无调用点的死代码(审计项)
...
- src/parse/mod.rs: parse_italic_assign(17 行,0 引用)
- src/host/sandbox_fs.rs: unavailable
- src/knowledge/extract.rs: stem_of
- src/knowledge/lifecycle.rs: _system_time_now
- src/debug/ctrl.rs: action_channel
- 连带清理 3 处随之失效的 import
cargo build 零警告;cargo test --release 605 passed / 0 failed。
src 行数 53,079 → 52,96x。
2026-10-22 15:40:31 +08:00
cflmy
4488a3cb70
feat(migrate): M7 迁移与版本门 — per-file markup + migrate labels + 全仓迁移
...
原计划的"翻转默认 + 旧形硬报错"不可行:`[键](集合)` 与 `[描述](实现)` 外形相同,
翻转会让 506 处取元静默变义,硬报错又拿不到证据。改为**按文件声明**。
一、per-file markup
- frontmatter `markup: occlusion`(或 `标记: 遮蔽`)决定该文件模式
- load.rs 先取模式,用 parse::expr::with_markup(线程局部压栈)包住解析
- 同一进程可同时加载两种模式的文件(imports);MARQDO_MARKUP 仍作进程默认
- 好处:迁移逐文件、可增量、可回滚,不存在半迁移的静默错义
二、`marqdo migrate labels [--write|--json]`
改写规则:
[键](集合) → [键](access(集合, "键"))
[`名`](集合) → [名](access(集合, `名`))
- [项](集合) → - [项](遍历 集合 为 项)
安全模型:改写 → 重解析 → 证明等价 → 才写
- 原文件按 classic 解析得 AST-A;改写后按 occlusion 解析得 AST-B
- 反归一化 B(标签与键同名且 payload 为 access 的遮蔽还原成 Index)
- Debug(A) == Debug(反归一化(B))(抹掉行号)才写入,否则原文件一字不动
只改代码行(LineKind::Code);表格行只改 **…** 单元格,散文 markdown 链接不碰;
链式索引由内向外改写,已迁移的有守卫不二次改。
三、access 提升为宿主函数 HostFn::Access(u16 id 212)
与旧取元逐字一致(Map 按键 / List 1-based / 缺键 missing map key);
进 HostFn 是为了两个后端共用同一实现,interp 里的特例已删除。
四、顺带修的两处真实语义缺陷
1. payload 继承外层"文本模式":`f text=[k](access(c,k))` 中 access 不被当调用
→ `()` 内永远允许 callee(args)
2. 遮蔽形状判定过宽:`[问候] ([格式化] "Bo")` 误判为遮蔽
→ 要求 `]` 后紧跟 `(`,否则落回方括号调用
五、全仓迁移结果
migrate labels: 256 index, 23 loop, 80 file written;0 文件被等价性拒绝;
迁移后 cargo test --release → 604 passed / 0 failed;再跑迁移幂等。
等价性检查先后抓出 4 类改写 bug(表格散文链接、payload 文本模式、链式索引、
遮蔽与方括号调用混淆),每类都是先拦下再修工具,未污染文件。
测试:6 个单测 + 3 个集成(干跑不写盘 / 写入后运行输出不变且幂等 /
等价失败文件不动);全量 604 passed / 0 failed(M3 后 595 + 9);双后端一致。
文档:doc/design/change-m7-migration.md
2026-10-22 15:33:31 +08:00
cflmy
0405a60d68
feat(lang): M3 access 内建与遮蔽循环 — 为 M7 迁移准备等价语义
...
access(集合, 键)(别名 取/取值):
- 复用 builtin_footnote_get,与旧 [键](集合) 语义完全一致
(Map 按键 / List 1-based 下标 / 缺键报 missing map key,不静默 None)
- 不新增平行实现,避免两套索引语义漂移
- 用途:M7 把 506 处 [k](c) 机械改写成 access(c, k),语义零漂移
遮蔽循环:- [描述](遍历 集合 为 变量)
- 仅 occlusion 模式识别;接受 遍历/for 与 为/as/in
- 描述存入 Stmt::ForEach.label(Option<String>),供 M8 渲染/诊断
为什么先 M3 后 M7:迁移目标必须先存在且等价,否则就是"边迁移边发明语义"。
实测:
access(`表`,"键") → 值;access(`列`,2) → 二;
缺键 → missing map key(与旧取元同一错误)
- [篮子里的每个果子](遍历 `列` 为 `果`) → 果=一 / 果=二
测试:2 个集成(含缺键错误保真);全量 595 passed / 0 failed(M5 后 593 + 2)
文档:doc/design/change-m3-access-and-loop.md
2026-10-22 15:23:36 +08:00
cflmy
11417c42e0
feat(lang): M2 遮蔽语法 [描述](实现) — 描述不执行,payload 是唯一执行体
...
新增 Expr::Occluded { label, payload: Option<Box<Expr>> }:
- [] 描述:自由文本,永不执行(仅用于检索/统计/过期校验)
- () 实现:唯一执行体;为空时值为 None(空载荷桩)
- 支持嵌套遮蔽、描述含空格与中文标点、\] 转义
关键决策:**模式开关,暂不切换语义**
[键](集合) 与 [描述](实现) 外形完全相同;M2 若直接改语义,全仓 506 处取元会
静默变成"遮蔽整个集合"(同形换义,文档点名的最坏一类)。
故 M2 只实现能力:
- 默认 Classic:MARQDO_MARKUP 未设 → [a](b) 仍是取元
- 纯度 Occlusion:MARQDO_MARKUP=occlusion/purity/1/on → 遮蔽
M7 才迁移语料、翻转默认、对旧形报 syntax.legacy_index 硬错误。
实现:
- ast.rs 新节点
- parse/expr.rs:Markup 枚举 + set_markup_default + parse_expr_markup(显式模式,
避免测试依赖全局) + parse_occluded(描述扫描到 ]、\] 转义、必须紧跟 (、
空载荷 → None)+ Parser.markup 字段
- interp.rs:有 payload 求值 payload,否则 None;collect_decl_reads 递归 payload
- bytecode/compile.rs:编译 payload(空则 Op::None_),双后端一致
- view/render.rs:expr_prec 渲染 [描述](payload) / [描述]()
- parse/mod.rs:pub mod expr
- main.rs:MARQDO_MARKUP 环境变量(init_markup_from_env)
测试:
- 8 个单元(值直通/空载荷/描述空格标点/转义/嵌套/classic 仍取元/缺括号报错)
- 3 个集成 tests/occlusion.rs + tests/occlusion/*.mq.md
- 全量 cargo test --release:575 passed / 0 failed(M1 后 565 + 10)
- tree 与 bytecode 双后端一致
文档:doc/design/change-m2-occlusion.md
2026-10-22 15:11:59 +08:00
cflmy
5a0f4ed747
refactor(parse): M1 收尾 — 删除重构后变成死代码的两个函数
...
- parse_call_arg_value_prefer_var:统一成 parse_call_arg_value_mode 后无调用点
- Parser::new_plain:改回 new(唯一构造点)
cargo build --release 警告清零;cargo test --lib 248 passed。
2026-10-22 15:08:55 +08:00
cflmy
05b8edc186
feat(parse): M1 ()内调用语法 — ) 终止 / 逗号 / 嵌套 / 带空格 callee
...
实现 M1(occlusion-syntax.md §13):把 `(…)` 变成一等调用外形。
四件事:
1. `)` 是参数终止符(历史缺陷:末个位置实参吞掉 `)`,导致 `加(31)` 报
unknown function `加(31`)
2. 可选逗号分隔:`加(1, 2)` / `加(1 2)` 等价
3. 嵌套调用:`加(加(1 2), 10)` → 13
4. **callee 可含空格**:`加一 号(31)` → 32 —— 这是缺陷 D8 的结构性解法
(`(` 是明确分隔符,空格不再参与切词)
实现要点:
- split_first_token / find_next_arg_boundary 重写为深度感知扫描器:
跟踪 ()[]{} 嵌套 + 字符串 + 反引号;顶层 )/空白(括号形还含逗号)终止 token
且不吞终止符;字符串内逗号不受影响。
- 新增 try_paren_call:callee = 第一个 '(' 之前的全部文本。
护栏:callee 含 = [ ] ( ) " ' 即拒绝(避免把 `text=a(b)` 具名实参与
`trim [stdout](…)` 方括号实参误判为调用);反引号允许(保留 `obj`.方法 写法)。
- 表达式级 postfix 调用(parse_primary 裸词分支,要求 `(` 紧跟)。
- is_bracket_callee_inner 允许空格:[加一 号] 31 亦可用。
关键决策(回归测试逼出来的):括号形与空格形的**参数值语义不同**——
括号形是表达式(允许嵌套调用),空格形仍是文本(`source=print(2+2)` 必须保持文本,
否则 foreign.run_lang 报 source must be text)。用 Parser.allow_paren_call +
parse_call_arg_value_mode(input, prefer_var, allow_call) 区分。
测试:新增 11 个单测(TDD:先 10 红后全绿);全量 cargo test --release
565 passed / 0 failed(基线 554 + 11);tree 与 bytecode 双后端输出一致;
端到端 marqdo run 六用例符合预期。
顺带:删除变成死代码的 end_of_quoted_string(编译警告清零)。
文档:doc/design/change-m1-paren-call.md(含决策依据、护栏表、边界)。
2026-10-22 15:08:02 +08:00
cflmy
b6629e5450
fix(parse): D9 未闭合引号不再静默吞行(分类层 + 解析层双层修复)
...
缺陷:`**s = "abc`(引号未闭合)被静默当成叙述丢弃,退出码 0,
没有输出也没有报错,该行凭空消失。对「文档即程序」来说这是最危险的一类
错误——文档看起来完整、能跑、check 通过,实际少了一节。
根因在**分类层**而不是解析层:
parse_quoted_string 里 `unterminated " string` 的报错一直都在,
但 matching_bold_close 扫描时遇到未闭合的 '"' 后一直处于 in_str 状态,
再也找不到收尾 '**',于是 is_marqdo_star_line 返回 false,
该行被判为 LineKind::Comment 成为叙述,解析器根本看不到它。
解析层精心准备的报错不可达。
修复(两层,缺一不可):
1. src/lex/mod.rs
- 新增 pub fn has_unterminated_string:统计未被 \ 转义的 '"',奇数即「开了没收」
- is_marqdo_star_line:粗体起始且找不到收尾时,若引号未闭合则仍判 Code
(判 Comment 会静默丢行;判 Code 才能让解析器说话)
2. src/parse/mod.rs
- parse_simple_stmt 紧跟既有粗体分支之后,对「粗体起始 + 引号未闭合」
给出精确报错,而不是笼统的 unrecognized statement
影响面(改前量化,避免凭直觉改核心解析):
- 全仓库 845 个 .mq.md、620 个含代码行文件
- 引号计数为奇数的代码行:**0**
- 结论:不改变任何现有文件的解析结果,只作用于畸形输入
测试(TDD,先写测试确认失败再修):
- 新增 4 个单测:未闭合→Code、闭合→Code、叙述含引号→Comment、
叙述含孤立引号→Comment
- 修复前 unterminated_quote_inside_bold_is_code_not_comment 如期失败
- 修复后 lex 14/14;cargo test --lib 237 passed 0 failed(基线 233 + 新增 4)
- cargo test --test gold 276 passed 8 failed;git stash 验证基线同样 8 failed,
失败全部是 ext_web_*(依赖 Go 插件 libweb,本机环境不具备),与本次无关
文档:
- doc/design/parser-diagnostics-d8-d9.md 设计依据、根因链路、候选方案评判、影响面
- doc/design/change-d9-unterminated-string.md 变更记录(现象/根因/改法/测试/边界)
- doc/design/spaced-function-names-d8.md D8 方案评估(待审阅,未改代码)
已知边界:单引号 '...' 未闭合仍是旧行为,留作后续评估
(单引号兼作英文撇号,误判风险高于双引号)。
2026-10-22 11:52:27 +08:00
cflmy
d99b275336
fix(parse): do not over-promote branch-local variables to params
...
If/else arms that all bind a local (e.g. # llm key/url/mdl/nm) no longer leak it into constructor params. This fixes the missing `key` error in llm.create and restores the agent/llm gold tests. Adds a regression test.
2026-10-18 02:09:16 +08:00
cflmy and Cursor
ba675a4767
fix(parse): promote a bare self-increment to a required parameter.
...
Design §8.2 treats the first bold assignment as a declaration, but merging only walked backtick mentions, so n = n + 1 never entered the signature.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-16 23:55:30 +08:00
cflmy and Cursor
9cf98a98b5
feat: block formula meta bind and control-flow prose
...
Support $$ % marqdo: var= binding, arm/loop narrative (fix comment-paragraph
swallow of branch arms), foreach ZH/EN sugar, and condition-line narrative.
Welcome pages and gold samples updated; view skips meta formula fence bodies.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-15 15:28:46 +08:00
cflmy and Cursor
88dc6d5a54
feat(core): Artifact Metadata Binding (${env|arg|sys|secret})
...
Load-time resolve of frontmatter bindings into Module.metadata; Secret
masking; sys.meta / --bind; llm ctor prefers meta over env_get.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-24 19:51:24 +08:00
cflmy and Cursor
7a449c40b1
feat(contract): Phase 2 渐进式契约层 —— 契约表提取 + 四边界校验 + marqdo check 防漂移(T2.1–T2.5)
...
- src/contract.rs: 类型词汇(渐进标注)、参数/返回/字段三形状契约表解析、合并、四边界校验诊断
- src/parse/mod.rs: extract_function_contract —— 位置+形状双重判定,在升参推断之前提取;
绑定表/普通文档表绝不吃(P1 零回归),契约表从 body 移除(元数据永不执行)
- src/interp.rs: 四边界校验 —— 调用实参(3 条调用路径)/返回/表绑定/字段访问
- src/check.rs + marqdo check [--json]: 漂移双向互查、未知类型名(附建议)、错位契约
- src/load.rs: label_error 保留结构化诊断(错误出口唯一,不拍平成字符串)
- T2.4: 全部契约诊断带 doc_anchor/doc_quote/contract_ref
- tests/contracts.rs 12 例全绿;全量回归零失败(含 262 gold)
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-22 19:40:08 +08:00
cflmy and Cursor
97fda7aa10
feat(core): Phase 1 —— 核心收口 + 诊断地基(core-surface 守卫 · 三层准入 · Diagnostic JSON)
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-22 19:03:03 +08:00
cflmy and Cursor
d1e2f0ced0
fix(parse): allow unbound GFM tables as discarded values
...
Bare tables in a function body evaluate as collections without requiring
a name bind; restores welcome-page install tables.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-17 10:29:13 +08:00
cflmy and Cursor
7554e45f60
feat(debug): dump v0.3 prose bits, inferred params, and dead binds
...
--dump-lines tags [decl]/[bold]/[italic]; --dump-ast prints `inferred` params
and `dead=[…]`. Migrate leftover italic-assign unit fixtures to bold/return.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-14 15:33:45 +08:00
cflmy and Cursor
6994acb91d
fix(prose): mid-line italic emphasis is not a return
...
Skip *very important* / *foo.bar* / *code-as-docs* so narrative emphasis cannot end a function; keep whole-line *n* and 返回*n*.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-14 15:25:26 +08:00
cflmy and Cursor
bccfec86ba
feat(parse): bold infix expressions are ExprStmt, not calls
...
`` **n + 1** `` evaluates and discards (design §6.2); keep assign-first and
bare-call fallback. Explicit `` **> …** `` uses standalone bare=text rules.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-14 15:12:00 +08:00
cflmy and Cursor
114fd53cd1
fix(prose): Decl names are identifiers; skip non-decl tick spans
...
Reject `` `n+1` `` as Decl, and when skipping non-decl `` `…` `` advance past the closing tick so inner `*` cannot open italic (fixes `` `OPENAI_*` `` in ext/ai/llm).
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-14 14:50:01 +08:00
cflmy and Cursor
c8f41164c5
fix(parse): keep GAP recovery for unclosed bold
...
Hard-erroring code-shaped `` **… `` broke tests/structure/gap-star-json-body.mq.md; unclosed bold stays Comment so later statements still run.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-14 14:41:51 +08:00
cflmy and Cursor
6f303ff957
fix(parse): diagnose unclosed code-shaped bold
...
Treat `` **x = 1 `` as Code and error with a clear unclosed-`**` diagnostic instead of silently skipping it as a comment.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-14 14:39:58 +08:00
cflmy and Cursor
551f4ff322
feat(view): preserve bracket-marked calls without modifiers
...
Track CallExpr.bracket_marked from `[callee]` parse so Structure display keeps `[fn] …` instead of falling back to `> fn …` when there are no pre-modifiers.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-14 13:39:12 +08:00
cflmy and Cursor
0e0655b316
feat(markup): bracket-marked calls with pre_modifiers
...
Stabilize `mod… [callee] args` (modifiers → name=True) alongside link-index
disambiguation; expand in interp/bytecode, show in view, and document lib/view
code-as-docs waves before stdlib rewrite.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-14 11:33:11 +08:00
cflmy and Cursor
4a1c9c48a2
feat(markup): prefer [key](collection) for map and list access
...
Add GFM link-shaped index as the primary get surface, keep footnote
index as transitional compatibility, and align the coffee example.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-14 10:44:18 +08:00
cflmy and Cursor
5e74ff39f2
feat(markup): code-as-docs narration surface (G1–G4) and drop --- body end
...
Treat --- as Markdown HR everywhere, end side-effect helpers with empty returns,
and accept soft emphasis, float literals, and dynamic footnote keys so LLM-friendly
.mq.md stays runnable. Ship the weekend coffee example plus gold fixtures.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-14 10:16:48 +08:00
cflmy and Cursor
b5c07385e9
feat(markup): finish v0.3 stock migration and green gold
...
Migrate remaining .mq.md (tests/ext/public/examples), stop elevating local assigns to params, inject form_target in Go libweb, and skip live LLM gold without a real key.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 23:43:44 +08:00
cflmy and Cursor
bfb10d172b
feat(markup): adopt v0.3 as sole mapping (** code, * return)
...
Make prose-unified Markup the only runtime: bold segments are executable,
italic is return, params can be inferred from body/prose, with no v0.2 dual
mode. Migrate lib and structure/keywords golds; gate on tests/markup-v03.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 20:38:53 +08:00
cflmy and Cursor
1637acce6e
fix: GAP-06–10 parser, invoke Null, exec capture, SSE headers
...
Recover ## bodies after bad *…* terminators; bracket-aware call args;
invoke Null is 500 not fake ok; sys.exec capture={code,stdout,stderr};
proxy stream sets anti-buffer headers.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-09 13:58:02 +08:00
cflmy and Cursor
7645dd4c1f
Extend network stack: session/auth, WebSocket, cookie/multipart primitives
...
Add the network-extension wave to lib/net and the web ABI plugin:
- lib/net cookie_parse / multipart_parse host primitives (EN/ZH)
- plugins/web session store + /admin login gate + WebSocket client/server
- ext/web author surface (EN/ZH) for session, auth, ws
- form update flow and page-level validation echo tests
- fix string escapes: \xHH, \u{...}, unknown escapes kept verbatim
- map Chinese component slots (导航/侧栏/页脚) so sidebar renders
- resolve relative static/db paths against the entry script dir (entry_dir)
- new tutorial chapter 14, EN/ZH example sites, and gold tests
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-25 14:58:46 +08:00
cflmy and Cursor
b84e82eb56
Support footnote indexing inside interpolated call args and strings
...
Parse `` `var`[^key] `` in `` *…* `` segments and quoted strings as an
Index part (chained `` [^a][^b] `` folds into one part) in both the
tree-walk interpreter and the bytecode compiler, and render it back in
`view`. Also make bytecode `_type` stamping always overwrite like the
interpreter does, so child constructors yield the most specific type.
Adds gold/unit tests for interp footnote indexing and a bytecode
inherit-explicit-super case.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-24 14:45:56 +08:00
cflmy and Cursor
bd5555afaa
Unify bare-identifier semantics in *…* / **…** (Python namespace)
...
Inside italic/bold code segments every bare word is a variable — including
call arguments and method-call receivers — so text literals must be quoted
and receivers no longer need backticks. A bare dotted callee `a.b` resolves
as a method call when `a` is a local variable, otherwise as a library path
(Python-style unified namespace), in both the tree-walk and bytecode backends.
Migrate ~70 tests plus ext/web, ext/quantum, ext/ai and the example projects
to the new idiom; update SKILL.md and the design docs; fix the web/quantum
example data model (db/index.mq.md). Unit and gold suites pass; only the 3
network-live tests fail offline.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-18 11:20:46 +08:00
cflmy and Cursor
ecc92f473a
Unify frontmatter imports as import bind:target and drop > imports.
...
`import json:lib/json.mq.md` binds file libraries; `import fmt:time.format`
binds member short names (replaces `> use`). Legacy `> path.mq.md` / `> use`
now hard-error with a hint. Migrates repo docs, skills, ext, lib, public, examples,
man-test and tests; adds a negative gold and updates view/catalog rendering.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-13 10:03:21 +08:00
cflmy and Cursor
d269ccb7e7
Add formula-matrix custom gates and fix Variables modal in view.
...
Parse $$ pmatrix/[[…]] into executable matrices for quantum.gate matrix=, and make the vars panel open a rich modal without breaking the page script.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-12 14:40:55 +08:00