Why: I2 layering - between rules and the L2 classifier there is now
a deterministic host-scored semantic layer (rules then semantic then
model), and fallback can be rescued by a validated command
generator instead of going straight to the default channel.
Evidence: go vet clean; full suite ok, including ten new tests
(rerank resolve/below-threshold/tie/error-then-L2, generator
valid/invalid/error, catalog top-k).
Impact: IntentSpec gains Examples; Options gains Semantic (with
threshold), Generator; ambiguous candidates rerank through host
scores before L2; fallback validates generated commands
(action/slots/kind fail-closed) and synthesizes Top with slots;
generated commands are no longer overwritten by deriveCommands;
CatalogTopK by priority.
Refs: Documents proposal 2026-10-07-agent-stack-n1q1i1-plans.md I2
weichen
merged commit fcf9ec4b2a into main2026-10-07 10:57:50 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I2 增量一:语义重排端口、examples 与命令生成端口(分层与评测)
按 Documents 提案
2026-10-07-agent-stack-n1q1i1-plans.md§5 I2 落地库侧第一部分。「快慢分层」成形:规则(快、确定性)→ 语义(中、确定性宿主打分)→ L2 模型(慢)→ fallback 模型命令生成(兜底)。改动
IntentSpec.Examples:示例句(semantic-router 借鉴;向量模型宿主注入,库不做 I/O)。SemanticScorer端口 + 歧义重排:歧义候选先经宿主打分按 examples 重排——过阈且唯一或分差 ≥ margin 才 matched(标注refined_by=semantic);不达阈/打分错误/tie 才到 L2 分类器(分层顺序测试在案)。候选只从当前集合选,构造上不可能引入未知 ID。CommandGenerator端口 + fallback 兜底:规则与语义都未命中时调用宿主生成器;输出校验(start 的 ActionRef 必须在目录 spec ID 或 Handler 集合内、命令种类受限、槽位键在目标 spec 键集内)——幻觉一律 fail-closed 回 fallback;合法 start 合成 Top(携带生成槽位,标注 generated_by)。deriveCommands覆盖。CatalogTopK:priority 降序取 k(文档注明口径是 priority 而非语义相关度)。验证
主任务:Dev 仓
feature/agent-stack-i2。