P4 验证执行:(a)锚点消融✅/(c)契约消融✅/(d)防漂移✅/(e)守卫演练✅;(b)盲测 deepseek-flash 完成未达标、mimo-v2.6-pro 重跑中
- perf-validation.md:五实验协议/判据/材料(2026-09-23 自设计) - perf-validation-report-2026-09-23.md:汇总报告(判据逐项对照 + 诚实结论) - tests/blind_experiment.rs + tests/blind/:盲测 harness(查询通道/修复回路/usage 计量)+ 冻结材料(6 任务书 + docs-bundle) - tests/contract_ablation.rs:四边界×三情形消融(拦截 100%/误报 0%/零回归) - tests/drift_drill.rs:9 漂移必报 + 2 负对照 - src/mlsp.rs:syntax 卡片自持化(semantics/rule/sample/doc_quote) - three-problems.md §5.1 判据矩阵逐行判定(问题 1✅ 2✅ 3❌);three-problems-plan.md Phase 4 落地记录 - 全量干净回归零失败 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
00c763300e
commit
1a729eb9ec
18 files changed
+1848
-11
No files matched your search
+38
-2
@@ -93,17 +93,53 @@ const ALIASES: &[(&str, &[&str])] = &[
|
||||
("soft-emphasis", &["强调", "emphasis", "软强调"]),
|
||||
];
|
||||
|
||||
/// core-surface.md 全文(与 `tests/core_surface.rs` 守卫同源)——卡片机械携带
|
||||
/// 语义/戒律/样例**原文**,AI 一次查询即可自持,不必回读文档(three-problems.md §3.2「单构造戒律」)。
|
||||
const SURFACE_MD: &str = include_str!("../doc/design/core-surface.md");
|
||||
|
||||
/// 机械提取 core-surface.md 清单行:`| \`id\` | 外形 | 语义 | 戒律 | 样例 |` →
|
||||
///(语义, 戒律, 样例, 行原文);只读不改,卡片内容与文档永不漂移。
|
||||
fn surface_row(id: &str) -> Option<(String, String, String, String)> {
|
||||
for line in SURFACE_MD.lines() {
|
||||
let t = line.trim();
|
||||
if !t.starts_with('|') {
|
||||
continue;
|
||||
}
|
||||
let cells: Vec<&str> = t.trim_matches('|').split('|').map(str::trim).collect();
|
||||
if cells.len() != 5 {
|
||||
continue;
|
||||
}
|
||||
let rid = cells[0].trim_matches('`');
|
||||
if rid == id && !rid.is_empty() && !rid.contains(' ') && !rid.starts_with('-') {
|
||||
return Some((
|
||||
cells[2].to_string(),
|
||||
cells[3].to_string(),
|
||||
cells[4].to_string(),
|
||||
t.to_string(),
|
||||
));
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
fn card(id: &str) -> Value {
|
||||
let form = CORE_CONSTRUCTS
|
||||
.iter()
|
||||
.find(|(cid, _)| *cid == id)
|
||||
.map(|(_, f)| *f)
|
||||
.unwrap_or("?");
|
||||
json!({
|
||||
let mut v = json!({
|
||||
"id": id,
|
||||
"form": form,
|
||||
"manual": "doc/design/core-surface.md",
|
||||
})
|
||||
});
|
||||
if let Some((semantics, rule, sample, quote)) = surface_row(id) {
|
||||
v["semantics"] = semantics.into();
|
||||
v["rule"] = rule.into();
|
||||
v["sample"] = sample.into();
|
||||
v["doc_quote"] = quote.into();
|
||||
}
|
||||
v
|
||||
}
|
||||
|
||||
fn match_constructs(query: &str) -> Vec<Value> {
|
||||
|
||||
Reference in new issue
Block a user