Files
marqdo/tests/ext/agent-soft-match.mq.md
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

1.1 KiB
Executable File

markup, title, description, import
markup title description import
occlusion OKF soft_match protocol parse (offline) REUSE/NEW + SLUG extractors; no network.
agent json
ext/ai/agent.mq.md lib/json.mq.md

main

samples = > json.parse text={"reuse":"DECISION: REUSE\nSLUG: trip-plan\n","new":"DECISION: NEW\n","zh":"决定:复用\n标识:行程-a\n"} r1 = > json.get value=samples key="reuse" d1 = > agent.extract_plan_decision reply=r1

print text=d1 s1 = > agent.extract_soft_match_slug reply=r1 print text=s1

r2 = > json.get value=samples key="new" d2 = > agent.extract_plan_decision reply=r2

print text=d2

r3 = > json.get value=samples key="zh" d3 = > agent.extract_plan_decision reply=r3

print text=d3 s3 = > agent.extract_soft_match_slug reply=r3 print text=s3

tasks = > json.parse text=[{"slug":"a","title":"Alpha"},{"slug":"b","title":"Beta"}] prompt = > agent.build_soft_match_prompt goal="demo" tasks=tasks has = > split value=prompt sep="DECISION: REUSE" n = > len value=has

  1. n > 1

print text=prompt-ok

print text=prompt-bad