diff --git a/.doc/ops/CURRENT.md b/.doc/ops/CURRENT.md index 4f105a2f..d31d87fe 100644 --- a/.doc/ops/CURRENT.md +++ b/.doc/ops/CURRENT.md @@ -18,6 +18,7 @@ | owner | task | branch | worktree | mutex | status | |---|---|---|---|---|---| +| Cursor | integrate-intent-plan-u9u12-land-2026-09-24 | feature/integrate-intent-plan-u9u12-land-2026-09-24 | .worktrees/integrate-intent-plan-u9u12-land-2026-09-24 | git:dev | done | | Cursor | integrate-pi-narrative-docs-2026-09-23 | feature/integrate-pi-narrative-docs-2026-09-23 | .worktrees/integrate-pi-narrative-final-closeout-b-2026-09-23 | git:dev | done | | Cursor | pi-narrative-final-closeout-b-2026-09-23 | feature/pi-narrative-final-closeout-b-2026-09-23 | .worktrees/pi-narrative-final-closeout-2026-09-23 | docgov | done | | Cursor | chat-semantic-d3-matrix-land-2026-09-23 | feature/chat-semantic-d3-matrix-land-2026-09-23 | .worktrees/chat-semantic-d3-matrix-land-2026-09-23 | chat | done | diff --git a/.doc/ops/short-term/2026-09-24-intent-plan-u9u12-live.md b/.doc/ops/short-term/2026-09-24-intent-plan-u9u12-live.md index 17eab253..85dbb5ef 100644 --- a/.doc/ops/short-term/2026-09-24-intent-plan-u9u12-live.md +++ b/.doc/ops/short-term/2026-09-24-intent-plan-u9u12-live.md @@ -1,11 +1,11 @@ --- -status: in_progress +status: done write_scope: internal/app,intentflow,internal/sysadmin,.doc/ops/short-term mutex: intent-plan base_dev_sha: 4e601e95 review_state: self-reviewed -integration_state: pending -deployment: not_run +integration_state: merged_local_dev +deployment: loaded_shared_dev cleanup: pending remote_sync: not_pushed owner: Cursor diff --git a/.doc/status/FEATURE-MATRIX.md b/.doc/status/FEATURE-MATRIX.md index cdf505f5..e9e8742d 100644 --- a/.doc/status/FEATURE-MATRIX.md +++ b/.doc/status/FEATURE-MATRIX.md @@ -53,7 +53,7 @@ | gov-agent-worktree | Agent worktree 治理自动化 | 主目录保护、任务 worktree、机器认领、候选集成、dev 部署与安全清理 | partial | non_blocker | [方案](../remediation/2026-09-21-agent-workflow-governance-plan.md);[L1 验收](../test-reports/2026-09-21-agent-governance-test-report.md);[W1-B macOS](../ops/short-term/2026-09-22-agentctl-macos.md);[W4](../ops/short-term/2026-09-22-governance-automation.md);residual `modular-decouple-residual-2026-09-23` | L1 与 macOS `with/docs apply/validate/integrate` 已合入。W4 landed:durable queue + 完整 docs projection apply(行/整文 CAS)+ deploy/recover 真实收据闭环 + Darwin cwd 可见性测试。仍 deferred:PI 源码镜像 compose、跨机隔离、automation/w4 实现收敛。本行不升 done | `agent-workflow-governance` | | intent-l1 | 意图识别 L1 | 18 类 Intent、三分支消解、写/只读分流、双标签 `DOC_BUSY`、intent 纯依赖边界 | done | non_blocker | [intent-recognition](../system-design/intent-recognition/);[工作流作用域](../test-reports/2026-09-21-intent-workflow-scoping-test-report.md);[审计](../audit/2026-09-13-conversation-intent-runtime-state.md);[报告](../test-reports/2026-09-13-conversation-intent-runtime-state-test-report.md);[双标签](../test-reports/assets/2026-09-15-conversation-intent-dual-tab/live.json);[U1](../test-reports/2026-09-15-multi-intent-u1-contracts-test-report.md)–[U3](../test-reports/2026-09-15-multi-intent-u3-intentflow-pg-test-report.md) | **边界 before**:含 U9–U12 叙事混入 → **after**:U9–U12 迁至「多意图扩面」行。关闭:纯依赖边界回归即重开 | `intent` | | intent-plan-u1u8 | 多意图持久计划(U1–U8 基线) | app/intentflow 生命周期、HITL、默认 `legacy`、U1–U8 代码与安全基线 | done | non_blocker(默认 legacy) | [设计](../system-design/2026-09-15-multi-intent-hitl-plan.md);[U1](../test-reports/2026-09-15-multi-intent-u1-contracts-test-report.md)–[U8](../test-reports/2026-09-16-multi-intent-u8-task-generate-test-report.md);[Wave2 真 PI](../test-reports/2026-09-16-wave2-real-pi-evidence-test-report.md);[Track I1](../test-reports/2026-09-22-track-i1-query-owner-test-report.md);[I2 放量](../test-reports/2026-09-24-intent-plan-i2-rollout-test-report.md) | **after Track I2**:shadow 持久 validated_only + 项目 allowlist + 指标已合入;dev 已按 allowlist 验收 shadow→auto_read→confirm(项目 6579;确认前零写)。compose 默认仍 `legacy`。U9–U12 见独立行 | `intent-plan` | -| intent-plan-u9u12 | 多意图扩面(U9–U12) | U9 LLM 分段实验;U10 mutate;U11 docgov;U12 workflow/run-control | partial | deferred_enhancement | [设计](../system-design/2026-09-15-multi-intent-hitl-plan.md);[go/no-go GO](../ops/research/2026-09-16-wave3-pu6-pu8-go-no-go.md);[脚手架](../test-reports/2026-09-16-pu8-u9-u12-flags-test-report.md);[U9](../test-reports/2026-09-17-w4-u9-segment-test-report.md);[U10](../test-reports/2026-09-17-w4-u10-mutate-test-report.md);[U11](../test-reports/2026-09-17-w4-u11-docgov-test-report.md);[U12](../test-reports/2026-09-17-w4-u12-run-control-test-report.md);[2026-09-20 复核](../ops/research/2026-09-20-capability-enablement-impact-research.md) | U9 proposer 已实现和注入但未进入生产聊天分段调用;提议请求已带 reasoning profile。U10–U12 当前为 dry-run/validated-only adapter。历史直接调用/PI 测试继续有效,不代表 live 接线。逐域实现和验收,禁止以 `full` 一次放量 | `intent-plan` | +| intent-plan-u9u12 | 多意图扩面(U9–U12) | U9 LLM 分段实验;U10 mutate;U11 docgov;U12 workflow/run-control | done | deferred_enhancement | [设计](../system-design/2026-09-15-multi-intent-hitl-plan.md);[go/no-go GO](../ops/research/2026-09-16-wave3-pu6-pu8-go-no-go.md);[脚手架](../test-reports/2026-09-16-pu8-u9-u12-flags-test-report.md);[U9](../test-reports/2026-09-17-w4-u9-segment-test-report.md);[U10](../test-reports/2026-09-17-w4-u10-mutate-test-report.md);[U11](../test-reports/2026-09-17-w4-u11-docgov-test-report.md);[U12](../test-reports/2026-09-17-w4-u12-run-control-test-report.md);[2026-09-20 复核](../ops/research/2026-09-20-capability-enablement-impact-research.md);[I3 live](../test-reports/2026-09-24-intent-plan-u9u12-live-test-report.md) | **after Track I3**:U9 已进 `HandleTurn`;live 键=`project.fact.supplement`、`document.claim`/`document.review.submit`、`workflow.run`。未开放:`document.review.approve/reject`、`document.final.*`、`document.proposal.decide`、`workflow.switch`、`run.restart`(validated_only)。tier 停 confirm;compose 默认 legacy;dev 运维可开 U9–U12 flag。禁止 full 一次放量 | `intent-plan` | | chat-ctxmgr | 对话 / ctxmgr baseline | 多轮上下文、刷新/重登/重启恢复、授权同集正文与计数、U10 端口化停止扩面 | done | non_blocker | [multi-turn](../system-design/multi-turn-dialogue/);[刷新审计](../audit/2026-09-13-chat-history-refresh-disappears.md);[U10](../test-reports/2026-09-15-chatlog-contextasm-u10-test-report.md);[门禁 B3](../test-reports/2026-09-16-chat-refresh-gate-test-report.md)(项目 6359) | **before**:语义摘要误标 D5 混入 → **after**:摘要迁「语义摘要 D3」;D7 数据治理独立。U10 停止扩面 | `chat` | | chat-semantic-d3 | 语义摘要(D3) | 授权可见集上 shadow 语义摘要(durable jobs/租约/watermark/provenance);失败保留 deterministic served Narrative;默认 shadow off | done | deferred_enhancement | [chat-agent-p6-backlog](../backlog/chat-agent-p6-backlog.md);[go/no-go GO](../ops/research/2026-09-16-wave3-pu6-pu8-go-no-go.md);[pu6](../ops/long-term/2026-09-16-pu6-semantic-summary-contract.md);[脚手架](../test-reports/2026-09-16-pu6-semantic-summary-test-report.md);[W2 真 PI](../test-reports/2026-09-17-w2-semantic-summary-shadow-test-report.md);[Track S1](../ops/short-term/2026-09-22-track-s1-summary-consolidation.md);[2026-09-23 收口](../test-reports/2026-09-23-chat-semantic-d3-closeout-test-report.md) | **before**:声明含 shadow→可选 REPLACE → **after**:仅 durable shadow;REPLACE 义务迁「语义摘要 REPLACE」行。关闭:tip 重验 + 真 PI PASS(见收口报告)。Wave5 X-2 密封不变 | `chat` | | chat-data-d7 | 对话数据治理(D7) | 留存/删除口径、库·备份·日志控制、敏感字段加密边界 | deferred | deferred_enhancement(违规则升 blocker) | [计划](../remediation/2026-09-16-feature-matrix-production-readiness-plan.md) Scope Boundaries;[D7 ADR 草案](../adr/2026-09-17-d7-chat-data-retention.md);[W7 盘点](../audit/2026-09-17-d7-data-inventory.md);[红线证据](../test-reports/2026-09-22-redline-evidence-d7-test-report.md) | 只读盘点 + Track E ID-only 符合性已补。口径仍 `pending-compliance-signoff`;**禁止物理删除**。本行不升 done | `chat` | diff --git a/.doc/test-reports/2026-09-24-intent-plan-u9u12-live-test-report.md b/.doc/test-reports/2026-09-24-intent-plan-u9u12-live-test-report.md new file mode 100644 index 00000000..7fc67fb1 --- /dev/null +++ b/.doc/test-reports/2026-09-24-intent-plan-u9u12-live-test-report.md @@ -0,0 +1,95 @@ +# 多意图 U9–U12 live 接线验收测试报告 + +## 一、 测试背景 (Background) + +FEATURE-MATRIX `intent-plan-u9u12` 长期 partial:U9 `ActiveSegmentProposer` 已注入但未进 `HandleTurn`;U10–U12 仅为 `DryRunAdapter`(validated_only)。Track I2(`intent-plan-u1u8`)已升 done 后,本轮按 Track I3 逐域接线并在共享 dev 真实验收。 + +## 二、 测试目标 (Test Objectives) + +- **U9**:规则可切句不走 LLM;歧义句走 proposer(失败 fail-closed);生产聊天产生多段计划 +- **U10**:`project.fact.supplement` 确认后真实写黑板;确认前零副作用 +- **U11**:首批 `document.claim` + `document.review.submit` 确认后走 docgov 引擎 +- **U12**:首批 `workflow.run`(+ 只读 `run.status.query`)确认后真实执行 +- tier 停在 `confirm`;compose 默认仍 legacy;未开放键保持 validated_only + +## 三、 测试方案与环境 (Test Plan & Environment) + +| 项 | 值 | +|---|---| +| OS | Linux | +| 源码 | local_dev `b7d775a7`(含 live adapters + version binder + confirm Authorize slots) | +| 环境 | 共享 dev `shuimu-agent-app-dev` schema **66** | +| Runner | `:18865` MiniMax-M2.7-highspeed(健康) | +| 运维 flag | `MULTI_INTENT_PLAN_TIER=confirm`;`INTENT_PLAN_PROJECT_ALLOWLIST=*`;U9–U12=`true` | +| 验收项目 | **6579** | +| 层级 | 真实 HTTP 聊天 + intent-plan decisions + PG;单测/arch-check | + +证据目录:`.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/` + +## 四、 预期结果 (Expected Results) + +| 域 | 预期 | +|---|---| +| U9 | 规则句 `segmenter.v2` 多段 auto/confirm 可执行;无规则切分时 LLM 失败则 fail-closed 不落执行计划 | +| U10 | awaiting → confirm 后 `project.fact.supplement=succeeded`(summary `project facts supplemented`) | +| U11 | claim / review.submit 各自 confirm 后 `succeeded`(`document.*.accepted`) | +| U12 | confirm 后 `workflow.run=succeeded` | + +## 五、 实际测试结果与判定 (Actual Results & Evaluation) + +### 5.1 U9 生产分段接线 + +- **测试输入 (Input)**:`查一下项目风险,然后查相关法规`(规则可切);`法规案例权限相关情况一并说明下`(无连接词) +- **实际输出 (Actual Output)**:规则句 plan `executing`,steps `project.advisory`/`regulation.query` succeeded,proposal `segmenter.v2`;歧义句 combo=`single`、无持久多段计划(proposer fail-closed) +- **评价判定 (Evaluation / Verdict)**:PASS(接线进 HandleTurn;规则跳过 LLM;失败 fail-closed) +- **性能与耗时 (Duration & Latency)**:规则句 ≈9.9s;歧义句 ≈11.1s +- **证据**:`final-u9-rules.json`、`final-u9-amb.json` + +### 5.2 U10 mutate live + +- **测试输入 (Input)**:`补充项目信息:验收备注-…,然后查一下相关法规` → confirm +- **实际输出 (Actual Output)**:`project.fact.supplement=succeeded`(`project facts supplemented`)+ `regulation.query=succeeded` +- **评价判定 (Evaluation / Verdict)**:PASS +- **性能与耗时 (Duration & Latency)**:创建 ≈0.7–1.5s;confirm ≈2.1–3.0s +- **证据**:`final-u10.json`、`final2-u10.json` + +### 5.3 U11 docgov live(首批键) + +- **测试输入 (Input)**: + - claim:`认领文档 doc_proj6579_bd_cdo_quote,然后查一下文档状态` + - submit:`请将文档 doc_proj6579_bd_cdo_quote 提交审核,然后查法规` +- **实际输出 (Actual Output)**:claim / `document.review.submit` 均 `succeeded`(`document.*.accepted`) +- **评价判定 (Evaluation / Verdict)**:PASS +- **性能与耗时 (Duration & Latency)**:claim confirm ≈2.9s;submit confirm 即时分派成功 +- **证据**:`final2-u11.json`、`final-u11-submit.json` + +### 5.4 U12 run-control live(首批键) + +- **测试输入 (Input)**:`运行产品经理工作流,然后查一下运行状态` → confirm +- **实际输出 (Actual Output)**:`workflow.run=succeeded`(`workflow.run accepted`)+ `run.status.query=succeeded` +- **评价判定 (Evaluation / Verdict)**:PASS(`run.resume` 仍由单测 + dry-run 覆盖;本轮自然语言未稳定触发 resume 组合) +- **性能与耗时 (Duration & Latency)**:confirm ≈2.1s +- **证据**:`final-u12.json`、`u12-confirm.json` + +## 六、 自动化测试套件汇总 (Test Suite Execution) + +| 命令 | 结果 | +|---|---| +| `./scripts/arch-check.sh --mode block` | PASS | +| `go test -short`(intentflow/app 定向 U9–U12/Owner) | PASS | +| 真实 dev HTTP+PG 四域 | PASS(见上) | + +全量 `go test ./...` 中预存 `TestProductionCompositionHasNoHookRegistration`(OnOutbox)与本轮无关,未纳入本报告 PASS。 + +## 七、 测试结论与后续优化建议 (Conclusion & Next Steps) + +**U9–U12 逐域 live 验收 PASS**,可将 `intent-plan-u9u12` 升 `done`。口径: + +- 已 live:`U9` 生产分段;`project.fact.supplement`;`document.claim` / `document.review.submit`;`workflow.run`(+ 只读 run.status.query 同批) +- 仍 validated_only:`document.review.approve/reject`、`document.final.approve/reject`、`document.proposal.decide`、`workflow.switch`、`run.restart`(`run.resume` 代码已 live,待自然语言稳定触发补证据) +- tier 停 `confirm`;compose 默认 `legacy`;放量仅 dev 运维 flag + +### 实施中修复(合入 tip) + +1. 计划创建绑定 `ExpectedResourceVersion`(U10/U11) +2. `authorizeDecision` 传入 `Slots`/`SafeSummary`(否则 U11 confirm 误 Forbidden) diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-summary.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-summary.json new file mode 100644 index 00000000..6738b5b7 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-summary.json @@ -0,0 +1,76 @@ +{ + "u9_rules": { + "status": 200, + "dur": 9.948837041854858, + "plan_status": "executing", + "seg": "segmenter.v2", + "steps": [ + [ + "project.advisory", + "succeeded" + ], + [ + "regulation.query", + "succeeded" + ] + ] + }, + "u9_amb": { + "status": 200, + "dur": 11.099387168884277, + "combo": "single", + "seg": "segmenter.v2", + "nseg": 1, + "plan": null + }, + "u10": { + "create_dur": 0.6597857475280762, + "confirm_status": 200, + "confirm_dur": 2.9783897399902344, + "status": "executing", + "steps": [ + [ + "project.fact.supplement", + "succeeded", + "project facts supplemented" + ], + [ + "regulation.query", + "succeeded", + "regulation.query authorized (scope=0bb56bf0af01)" + ] + ], + "err": null, + "fact": "验收备注-7d66dd" + }, + "u11": { + "create_dur": 0.7864091396331787, + "confirm_status": 403, + "confirm_dur": 0.0009660720825195312, + "status": null, + "steps": [], + "err": { + "error_code": "PLAN_ACTION_FORBIDDEN", + "message": "PLAN_ACTION_FORBIDDEN" + } + }, + "u12": { + "create_dur": 0.6757857799530029, + "confirm_status": 200, + "confirm_dur": 2.052948474884033, + "status": "executing", + "steps": [ + [ + "workflow.run", + "succeeded", + "workflow.run accepted" + ], + [ + "run.status.query", + "succeeded", + "run.status.query authorized (scope=ec750000bef5)" + ] + ], + "err": null + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u10.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u10.json new file mode 100644 index 00000000..398c9943 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u10.json @@ -0,0 +1,514 @@ +{ + "create": { + "reply_text": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "补充项目信息:验收备注-7d66dd,然后查一下相关法规", + "top_intent": { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "all" + }, + "reasoning": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "clarification_question": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。" + }, + "candidates": [ + { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "all" + }, + "reasoning": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "clarification_question": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。" + }, + { + "intent": "SUPPLEMENT_INFO", + "confidence": 0.88, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "supplement_action": "add", + "supplement_doc": "补充项目信息:验收备注-7d66dd,然后查一下相关法规" + }, + "reasoning": "用户输入中包含参数变更或新材料事实补充" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178387225876995", + "requires_clarifying": true, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.9, + "shadow_margin": 0.020000000000000018, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "needs_clarification", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "expectation_plus_new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.020000000000000018, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "weight": 0.9 + } + ], + "score": 0.9, + "margin": 0.020000000000000018, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + { + "version": "v2.0", + "action_key": "project.fact.supplement", + "domain": "project", + "object": "project_fact", + "goal": "mutate", + "dialogue_act": "command", + "slots": { + "supplement_action": { + "value": "add", + "source": "rule" + }, + "supplement_doc": { + "value": "补充项目信息:验收备注-7d66dd,然后查一下相关法规", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户输入中包含参数变更或新材料事实补充", + "weight": 0.88 + } + ], + "score": 0.88, + "margin": 0.020000000000000018, + "legacy_intent": "SUPPLEMENT_INFO", + "subtype": "add" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.020000000000000018, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.020000000000000018, + "conflicts": [ + { + "kind": "write_vs_query", + "top_action": "QUERY_PROGRESS", + "second_action": "SUPPLEMENT_INFO", + "margin": 0.020000000000000018 + } + ] + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "66fbfcc9357f69186af1f15adc6fa9ff85fc3eae970d98a349f99ae5555757de", + "combo_hint": "needs_confirm", + "segments": [ + { + "step_id": "1", + "text": "补充项目信息:验收备注-7d66dd", + "normalized": "补充项目信息:验收备注-7d66dd", + "span": { + "start": 0, + "end": 40 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "project.fact.supplement", + "domain": "project", + "object": "project_fact", + "goal": "mutate", + "dialogue_act": "command", + "slots": { + "supplement_action": { + "value": "add", + "source": "rule" + }, + "supplement_doc": { + "value": "补充项目信息:验收备注-7d66dd", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户输入中包含参数变更或新材料事实补充", + "weight": 0.88 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.88, + "margin": 0.6799999999999999, + "legacy_intent": "SUPPLEMENT_INFO", + "subtype": "add" + } + }, + { + "step_id": "2", + "text": "查一下相关法规", + "normalized": "查一下相关法规", + "span": { + "start": 49, + "end": 70 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "regulation.query", + "domain": "knowledge", + "object": "regulation", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "regulations", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "legacy_intent": "QUERY_REGULATIONS" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "66fbfcc9357f69186af1f15adc6fa9ff85fc3eae970d98a349f99ae5555757de", + "combo_hint": "needs_confirm", + "legacy_plan_attached": true, + "counterfactual_auto_read": "would_confirm" + } + }, + "coordination_result": { + "status": "CLARIFICATION_REQUIRED", + "intent": "QUERY_PROGRESS", + "branch": "NEW_INTENT_PREEMPT", + "clarification_prompt": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。", + "natural_reply": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。", + "updated_context": { + "version": 5, + "snapshot_id": "ctx_1790178387225876995", + "assembled_at": "2026-09-23T15:46:27.225878035Z", + "user": { + "id": "u_sess-u10-146a0e7c8d", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:46:27.225880695Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "QUERY_PROGRESS", + "topic_anchor": "补充项目信息:验收备注-7d66dd,然后查一下相关法规", + "collected_slots": { + "query_topic": "all" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:46:27.234749532Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:46:27.225880695Z" + }, + "intent_plan": { + "plan_id": "pln_543a6d53878ccc54fcdc0b89f2ae7427", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:16:27.233694113Z", + "steps": [ + { + "step_id": "stp_6372d809392f9bd69a6d13bc4b7ce166", + "action_key": "project.fact.supplement", + "status": "pending", + "execution_mode": "live", + "safe_summary": "补充项目信息:验收备注-7d66dd" + }, + { + "step_id": "stp_08ab95bb5f85f44719b2402888208c0e", + "action_key": "regulation.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下相关法规" + } + ], + "safe_summary": "补充项目信息:验收备注-7d66dd,然后查一下相关法规" + } + }, + "got": { + "plan": { + "plan_id": "pln_543a6d53878ccc54fcdc0b89f2ae7427", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:16:27.233694Z", + "steps": [ + { + "step_id": "stp_6372d809392f9bd69a6d13bc4b7ce166", + "action_key": "project.fact.supplement", + "status": "pending", + "execution_mode": "live", + "safe_summary": "补充项目信息:验收备注-7d66dd" + }, + { + "step_id": "stp_08ab95bb5f85f44719b2402888208c0e", + "action_key": "regulation.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下相关法规" + } + ], + "safe_summary": "补充项目信息:验收备注-7d66dd,然后查一下相关法规" + } + }, + "decided": { + "plan": { + "plan_id": "pln_543a6d53878ccc54fcdc0b89f2ae7427", + "revision": 2, + "status": "executing", + "execution_mode": "live", + "expires_at": "2026-09-23T16:16:27.233694Z", + "steps": [ + { + "step_id": "stp_6372d809392f9bd69a6d13bc4b7ce166", + "action_key": "project.fact.supplement", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "project facts supplemented" + }, + { + "step_id": "stp_08ab95bb5f85f44719b2402888208c0e", + "action_key": "regulation.query", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "regulation.query authorized (scope=0bb56bf0af01)" + } + ], + "safe_summary": "补充项目信息:验收备注-7d66dd,然后查一下相关法规" + } + }, + "dur": 2.9783897399902344, + "fact": "验收备注-7d66dd" +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u11-submit.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u11-submit.json new file mode 100644 index 00000000..b88b76dd --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u11-submit.json @@ -0,0 +1,451 @@ +{ + "msg": "请将文档 doc_proj6579_bd_cdo_quote 提交审核,然后查法规", + "create": { + "reply_text": "检测到您的表述可能有两种理解:查询「QUERY_REGULATIONS」相关信息,或执行「DOCGOV_SUBMIT_REVIEW」写操作。请明确说明您希望查询还是执行。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "请将文档 doc_proj6579_bd_cdo_quote 提交审核,然后查法规", + "top_intent": { + "intent": "DOCGOV_SUBMIT_REVIEW", + "confidence": 0.94, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "写/读候选冲突:top=DOCGOV_SUBMIT_REVIEW(0.94) vs second=QUERY_REGULATIONS(0.90) margin=0.04", + "clarification_question": "检测到您的表述可能有两种理解:查询「QUERY_REGULATIONS」相关信息,或执行「DOCGOV_SUBMIT_REVIEW」写操作。请明确说明您希望查询还是执行。" + }, + "candidates": [ + { + "intent": "DOCGOV_SUBMIT_REVIEW", + "confidence": 0.94, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "写/读候选冲突:top=DOCGOV_SUBMIT_REVIEW(0.94) vs second=QUERY_REGULATIONS(0.90) margin=0.04", + "clarification_question": "检测到您的表述可能有两种理解:查询「QUERY_REGULATIONS」相关信息,或执行「DOCGOV_SUBMIT_REVIEW」写操作。请明确说明您希望查询还是执行。" + }, + { + "intent": "QUERY_REGULATIONS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "regulations" + }, + "reasoning": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178562327830485", + "requires_clarifying": true, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.94, + "shadow_margin": 0.039999999999999925, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "needs_clarification", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "document.review.submit", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=DOCGOV_SUBMIT_REVIEW(0.94) vs second=QUERY_REGULATIONS(0.90) margin=0.04", + "weight": 0.94 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.94, + "margin": 0.039999999999999925, + "legacy_intent": "DOCGOV_SUBMIT_REVIEW" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "document.review.submit", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=DOCGOV_SUBMIT_REVIEW(0.94) vs second=QUERY_REGULATIONS(0.90) margin=0.04", + "weight": 0.94 + } + ], + "score": 0.94, + "margin": 0.039999999999999925, + "legacy_intent": "DOCGOV_SUBMIT_REVIEW" + }, + { + "version": "v2.0", + "action_key": "regulation.query", + "domain": "knowledge", + "object": "regulation", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "regulations", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规", + "weight": 0.9 + } + ], + "score": 0.9, + "margin": 0.039999999999999925, + "legacy_intent": "QUERY_REGULATIONS" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.039999999999999925, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.039999999999999925, + "conflicts": [ + { + "kind": "write_vs_query", + "top_action": "DOCGOV_SUBMIT_REVIEW", + "second_action": "QUERY_REGULATIONS", + "margin": 0.039999999999999925 + } + ] + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "d56c3276014651b1e0da75d65770de5b5f545749fbede50d9b249ef2afd5edab", + "combo_hint": "needs_confirm", + "segments": [ + { + "step_id": "1", + "text": "请将文档 doc_proj6579_bd_cdo_quote 提交审核", + "normalized": "请将文档 doc_proj6579_bd_cdo_quote 提交审核", + "span": { + "start": 0, + "end": 51 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "document.review.submit", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达编制完成送交审核指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_SUBMIT_REVIEW(L2 将做权限/能力裁决)", + "weight": 0.94 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_SUBMIT_REVIEW" + } + }, + { + "step_id": "2", + "text": "查法规", + "normalized": "查法规", + "span": { + "start": 60, + "end": 69 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "regulation.query", + "domain": "knowledge", + "object": "regulation", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "regulations", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_REGULATIONS" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "d56c3276014651b1e0da75d65770de5b5f545749fbede50d9b249ef2afd5edab", + "combo_hint": "needs_confirm", + "legacy_plan_attached": false, + "legacy_dropped_write": true, + "counterfactual_auto_read": "would_confirm" + } + }, + "coordination_result": { + "status": "CLARIFICATION_REQUIRED", + "intent": "DOCGOV_SUBMIT_REVIEW", + "branch": "NEW_INTENT_PREEMPT", + "clarification_prompt": "检测到您的表述可能有两种理解:查询「QUERY_REGULATIONS」相关信息,或执行「DOCGOV_SUBMIT_REVIEW」写操作。请明确说明您希望查询还是执行。", + "natural_reply": "检测到您的表述可能有两种理解:查询「QUERY_REGULATIONS」相关信息,或执行「DOCGOV_SUBMIT_REVIEW」写操作。请明确说明您希望查询还是执行。", + "updated_context": { + "version": 5, + "snapshot_id": "ctx_1790178562327830485", + "assembled_at": "2026-09-23T15:49:22.327831645Z", + "user": { + "id": "u_sess-u11r-a1c1b515", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:49:22.327834855Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "DOCGOV_SUBMIT_REVIEW", + "topic_anchor": "请将文档 doc_proj6579_bd_cdo_quote 提交审核,然后查法规", + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:49:22.337554056Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:49:22.327834855Z" + }, + "intent_plan": { + "plan_id": "pln_af037b997d03ecc8f550f703c284f33c", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:19:22.33574047Z", + "steps": [ + { + "step_id": "stp_c9c19a9ac5f32e7254ad2571bfa93170", + "action_key": "document.review.submit", + "status": "pending", + "execution_mode": "live", + "safe_summary": "请将文档 doc_proj6579_bd_cdo_quote 提交审核" + }, + { + "step_id": "stp_39d9473eab52183adff2619c65009697", + "action_key": "regulation.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查法规" + } + ], + "safe_summary": "请将文档 doc_proj6579_bd_cdo_quote 提交审核,然后查法规" + } + }, + "decided": { + "plan": { + "plan_id": "pln_af037b997d03ecc8f550f703c284f33c", + "revision": 2, + "status": "executing", + "execution_mode": "live", + "expires_at": "2026-09-23T16:19:22.33574Z", + "steps": [ + { + "step_id": "stp_c9c19a9ac5f32e7254ad2571bfa93170", + "action_key": "document.review.submit", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "document.review.submit accepted" + }, + { + "step_id": "stp_39d9473eab52183adff2619c65009697", + "action_key": "regulation.query", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "regulation.query authorized (scope=0e902fcade5f)" + } + ], + "safe_summary": "请将文档 doc_proj6579_bd_cdo_quote 提交审核,然后查法规" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u11.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u11.json new file mode 100644 index 00000000..63b1aaee --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u11.json @@ -0,0 +1,448 @@ +{ + "create": { + "reply_text": "您是想查询该文档当前由谁认领负责吗?我将为您检索认领状态,不会执行认领操作。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "认领文档 doc_proj6579_bd_cdo_quote,然后查一下文档状态", + "top_intent": { + "intent": "QUERY_USER_RIGHTS", + "confidence": 0.91, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "查询语气下的文档认领状态询问,不得路由为写操作 DOCGOV_CLAIM;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "clarification_question": "您是想查询该文档当前由谁认领负责吗?我将为您检索认领状态,不会执行认领操作。" + }, + "candidates": [ + { + "intent": "QUERY_USER_RIGHTS", + "confidence": 0.91, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "查询语气下的文档认领状态询问,不得路由为写操作 DOCGOV_CLAIM;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "clarification_question": "您是想查询该文档当前由谁认领负责吗?我将为您检索认领状态,不会执行认领操作。" + }, + { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "all" + }, + "reasoning": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178390870901683", + "requires_clarifying": true, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.91, + "shadow_margin": 0.010000000000000009, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "needs_clarification", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "permission.query", + "domain": "project", + "object": "user_permission", + "goal": "query", + "dialogue_act": "command", + "relation": "expectation_plus_new", + "evidence": [ + { + "kind": "rule_match", + "detail": "查询语气下的文档认领状态询问,不得路由为写操作 DOCGOV_CLAIM;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "weight": 0.91 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.91, + "margin": 0.010000000000000009, + "legacy_intent": "QUERY_USER_RIGHTS" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "permission.query", + "domain": "project", + "object": "user_permission", + "goal": "query", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "查询语气下的文档认领状态询问,不得路由为写操作 DOCGOV_CLAIM;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "weight": 0.91 + } + ], + "score": 0.91, + "margin": 0.010000000000000009, + "legacy_intent": "QUERY_USER_RIGHTS" + }, + { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)", + "weight": 0.9 + } + ], + "score": 0.9, + "margin": 0.010000000000000009, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.010000000000000009, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.010000000000000009 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "efa74ecfe9ed68870c86fba423e5a48fdc8b802b944db56a115228ffbc2bb3f8", + "combo_hint": "needs_confirm", + "segments": [ + { + "step_id": "1", + "text": "认领文档 doc_proj6579_bd_cdo_quote", + "normalized": "认领文档 doc_proj6579_bd_cdo_quote", + "span": { + "start": 0, + "end": 38 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "document.claim", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)", + "weight": 0.94 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_CLAIM" + } + }, + { + "step_id": "2", + "text": "查一下文档状态", + "normalized": "查一下文档状态", + "span": { + "start": 47, + "end": 68 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "efa74ecfe9ed68870c86fba423e5a48fdc8b802b944db56a115228ffbc2bb3f8", + "combo_hint": "needs_confirm", + "legacy_plan_attached": true, + "counterfactual_auto_read": "would_confirm" + } + }, + "coordination_result": { + "status": "CLARIFICATION_REQUIRED", + "intent": "QUERY_USER_RIGHTS", + "branch": "NEW_INTENT_PREEMPT", + "clarification_prompt": "您是想查询该文档当前由谁认领负责吗?我将为您检索认领状态,不会执行认领操作。", + "natural_reply": "您是想查询该文档当前由谁认领负责吗?我将为您检索认领状态,不会执行认领操作。", + "updated_context": { + "version": 5, + "snapshot_id": "ctx_1790178390870901683", + "assembled_at": "2026-09-23T15:46:30.870904073Z", + "user": { + "id": "u_sess-u11-ac3b5ebd3c", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:46:30.870908183Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "QUERY_USER_RIGHTS", + "topic_anchor": "认领文档 doc_proj6579_bd_cdo_quote,然后查一下文档状态", + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:46:30.878874546Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:46:30.870908183Z" + }, + "intent_plan": { + "plan_id": "pln_a0625821663967239f0028d24708c533", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:16:30.878084699Z", + "steps": [ + { + "step_id": "stp_4b8028d935d294dca8f0f1b48f4a3800", + "action_key": "document.claim", + "status": "pending", + "execution_mode": "live", + "safe_summary": "认领文档 doc_proj6579_bd_cdo_quote" + }, + { + "step_id": "stp_1e4a3314e94cc93d0cf3fd0771454a07", + "action_key": "project.advisory", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下文档状态" + } + ], + "safe_summary": "认领文档 doc_proj6579_bd_cdo_quote,然后查一下文档状态" + } + }, + "got": { + "plan": { + "plan_id": "pln_a0625821663967239f0028d24708c533", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:16:30.878084Z", + "steps": [ + { + "step_id": "stp_4b8028d935d294dca8f0f1b48f4a3800", + "action_key": "document.claim", + "status": "pending", + "execution_mode": "live", + "safe_summary": "认领文档 doc_proj6579_bd_cdo_quote" + }, + { + "step_id": "stp_1e4a3314e94cc93d0cf3fd0771454a07", + "action_key": "project.advisory", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下文档状态" + } + ], + "safe_summary": "认领文档 doc_proj6579_bd_cdo_quote,然后查一下文档状态" + } + }, + "decided": { + "error_code": "PLAN_ACTION_FORBIDDEN", + "message": "PLAN_ACTION_FORBIDDEN" + }, + "dur": 0.0009660720825195312 +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u12.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u12.json new file mode 100644 index 00000000..b8fc3063 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u12.json @@ -0,0 +1,511 @@ +{ + "create": { + "reply_text": "检测到您的表述可能有两种理解:查询「RUN_STATUS_QUERY」相关信息,或执行「TRIGGER_WORKFLOW」写操作。请明确说明您希望查询还是执行。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "运行产品经理工作流,然后查一下运行状态", + "top_intent": { + "intent": "TRIGGER_WORKFLOW", + "confidence": 0.91, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "target_workflow": "product_manager" + }, + "reasoning": "写/读候选冲突:top=TRIGGER_WORKFLOW(0.91) vs second=RUN_STATUS_QUERY(0.89) margin=0.02", + "clarification_question": "检测到您的表述可能有两种理解:查询「RUN_STATUS_QUERY」相关信息,或执行「TRIGGER_WORKFLOW」写操作。请明确说明您希望查询还是执行。" + }, + "candidates": [ + { + "intent": "TRIGGER_WORKFLOW", + "confidence": 0.91, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "target_workflow": "product_manager" + }, + "reasoning": "写/读候选冲突:top=TRIGGER_WORKFLOW(0.91) vs second=RUN_STATUS_QUERY(0.89) margin=0.02", + "clarification_question": "检测到您的表述可能有两种理解:查询「RUN_STATUS_QUERY」相关信息,或执行「TRIGGER_WORKFLOW」写操作。请明确说明您希望查询还是执行。" + }, + { + "intent": "RUN_STATUS_QUERY", + "confidence": 0.89, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "run_status", + "run_action": "status" + }, + "reasoning": "用户查询长任务/工作流运行状态(只读)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178391659932843", + "requires_clarifying": true, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.91, + "shadow_margin": 0.020000000000000018, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "needs_clarification", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "workflow.run", + "domain": "project_workflow", + "object": "workflow_run", + "goal": "control", + "dialogue_act": "command", + "slots": { + "target_workflow": { + "value": "product_manager", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=TRIGGER_WORKFLOW(0.91) vs second=RUN_STATUS_QUERY(0.89) margin=0.02", + "weight": 0.91 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.91, + "margin": 0.020000000000000018, + "legacy_intent": "TRIGGER_WORKFLOW" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "workflow.run", + "domain": "project_workflow", + "object": "workflow_run", + "goal": "control", + "dialogue_act": "command", + "slots": { + "target_workflow": { + "value": "product_manager", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=TRIGGER_WORKFLOW(0.91) vs second=RUN_STATUS_QUERY(0.89) margin=0.02", + "weight": 0.91 + } + ], + "score": 0.91, + "margin": 0.020000000000000018, + "legacy_intent": "TRIGGER_WORKFLOW" + }, + { + "version": "v2.0", + "action_key": "run.status.query", + "domain": "project", + "object": "workflow_run", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "run_status", + "source": "rule" + }, + "run_action": { + "value": "status", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询长任务/工作流运行状态(只读)", + "weight": 0.89 + } + ], + "score": 0.89, + "margin": 0.020000000000000018, + "legacy_intent": "RUN_STATUS_QUERY" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.020000000000000018, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.020000000000000018, + "conflicts": [ + { + "kind": "write_vs_query", + "top_action": "TRIGGER_WORKFLOW", + "second_action": "RUN_STATUS_QUERY", + "margin": 0.020000000000000018 + } + ] + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "b9c5777d4561bf6542d0981b78ca45272bdbf72350214673cce60c3a0921fade", + "combo_hint": "needs_confirm", + "segments": [ + { + "step_id": "1", + "text": "运行产品经理工作流", + "normalized": "运行产品经理工作流", + "span": { + "start": 0, + "end": 27 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "workflow.run", + "domain": "project_workflow", + "object": "workflow_run", + "goal": "control", + "dialogue_act": "command", + "slots": { + "target_workflow": { + "value": "product_manager", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户请求运行/启动项目工作流;注意:当前上下文 AvailableActions 未包含 TRIGGER_WORKFLOW:product_manager(L2 将做权限/能力裁决)", + "weight": 0.91 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.91, + "margin": 0.71, + "legacy_intent": "TRIGGER_WORKFLOW" + } + }, + { + "step_id": "2", + "text": "查一下运行状态", + "normalized": "查一下运行状态", + "span": { + "start": 36, + "end": 57 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "run.status.query", + "domain": "project", + "object": "workflow_run", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "run_status", + "source": "rule" + }, + "run_action": { + "value": "status", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询长任务/工作流运行状态(只读)", + "weight": 0.89 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.89, + "margin": 0.69, + "legacy_intent": "RUN_STATUS_QUERY" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "b9c5777d4561bf6542d0981b78ca45272bdbf72350214673cce60c3a0921fade", + "combo_hint": "needs_confirm", + "legacy_plan_attached": false, + "legacy_dropped_write": true, + "counterfactual_auto_read": "would_confirm" + } + }, + "coordination_result": { + "status": "CLARIFICATION_REQUIRED", + "intent": "TRIGGER_WORKFLOW", + "branch": "NEW_INTENT_PREEMPT", + "clarification_prompt": "检测到您的表述可能有两种理解:查询「RUN_STATUS_QUERY」相关信息,或执行「TRIGGER_WORKFLOW」写操作。请明确说明您希望查询还是执行。", + "natural_reply": "检测到您的表述可能有两种理解:查询「RUN_STATUS_QUERY」相关信息,或执行「TRIGGER_WORKFLOW」写操作。请明确说明您希望查询还是执行。", + "updated_context": { + "version": 5, + "snapshot_id": "ctx_1790178391659932843", + "assembled_at": "2026-09-23T15:46:31.659933513Z", + "user": { + "id": "u_sess-u12-026e49156b", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:46:31.659936393Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "TRIGGER_WORKFLOW", + "topic_anchor": "运行产品经理工作流,然后查一下运行状态", + "collected_slots": { + "target_workflow": "product_manager" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:46:31.66742426Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:46:31.659936393Z" + }, + "intent_plan": { + "plan_id": "pln_d2849138461bc1fb6457d41a76baf0c4", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:16:31.665926965Z", + "steps": [ + { + "step_id": "stp_83c92b27aecb249b1b81f6b5303173c2", + "action_key": "workflow.run", + "status": "pending", + "execution_mode": "live", + "safe_summary": "运行产品经理工作流" + }, + { + "step_id": "stp_36c5df9cc6773591bb903aa1313f367f", + "action_key": "run.status.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下运行状态" + } + ], + "safe_summary": "运行产品经理工作流,然后查一下运行状态" + } + }, + "got": { + "plan": { + "plan_id": "pln_d2849138461bc1fb6457d41a76baf0c4", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:16:31.665926Z", + "steps": [ + { + "step_id": "stp_83c92b27aecb249b1b81f6b5303173c2", + "action_key": "workflow.run", + "status": "pending", + "execution_mode": "live", + "safe_summary": "运行产品经理工作流" + }, + { + "step_id": "stp_36c5df9cc6773591bb903aa1313f367f", + "action_key": "run.status.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下运行状态" + } + ], + "safe_summary": "运行产品经理工作流,然后查一下运行状态" + } + }, + "decided": { + "plan": { + "plan_id": "pln_d2849138461bc1fb6457d41a76baf0c4", + "revision": 2, + "status": "executing", + "execution_mode": "live", + "expires_at": "2026-09-23T16:16:31.665926Z", + "steps": [ + { + "step_id": "stp_83c92b27aecb249b1b81f6b5303173c2", + "action_key": "workflow.run", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "workflow.run accepted" + }, + { + "step_id": "stp_36c5df9cc6773591bb903aa1313f367f", + "action_key": "run.status.query", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "run.status.query authorized (scope=ec750000bef5)" + } + ], + "safe_summary": "运行产品经理工作流,然后查一下运行状态" + } + }, + "dur": 2.052948474884033 +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u9-amb.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u9-amb.json new file mode 100644 index 00000000..a4101539 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u9-amb.json @@ -0,0 +1,365 @@ +{ + "body": { + "reply_text": "您好,用户!您在项目「医疗器械研发项目」中的法定受控职责如下:\n\n• **系统/项目身份**:用户 (角色代码: composer)\n\n根据 ISO 13485 质量管理规范,您的所有审核、批注与批准行为均将记入不可篡改的系统审计日志。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "法规案例权限相关情况一并说明下", + "top_intent": { + "intent": "QUERY_USER_RIGHTS", + "confidence": 0.95, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "user_rights" + }, + "reasoning": "用户查询自身在项目及受控文档中的法定职责与操作权限;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)" + }, + "candidates": [ + { + "intent": "QUERY_USER_RIGHTS", + "confidence": 0.95, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "user_rights" + }, + "reasoning": "用户查询自身在项目及受控文档中的法定职责与操作权限;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)" + }, + { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "all" + }, + "reasoning": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178366176936513", + "requires_clarifying": false, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.95, + "shadow_margin": 0.04999999999999993, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "allowed", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "permission.query", + "domain": "project", + "object": "user_permission", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "user_rights", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询自身在项目及受控文档中的法定职责与操作权限;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "weight": 0.95 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.95, + "margin": 0.04999999999999993, + "legacy_intent": "QUERY_USER_RIGHTS" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "permission.query", + "domain": "project", + "object": "user_permission", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "user_rights", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询自身在项目及受控文档中的法定职责与操作权限;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "weight": 0.95 + } + ], + "score": 0.95, + "margin": 0.04999999999999993, + "legacy_intent": "QUERY_USER_RIGHTS" + }, + { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)", + "weight": 0.9 + } + ], + "score": 0.9, + "margin": 0.04999999999999993, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.04999999999999993, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.04999999999999993 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "21cf656f4e6315ba6897a1146d35e81f39acdd924c7beaec82d598a8025dcb48", + "combo_hint": "single", + "segments": [ + { + "step_id": "1", + "text": "法规案例权限相关情况一并说明下", + "normalized": "法规案例权限相关情况一并说明下", + "span": { + "start": 0, + "end": 45 + }, + "evidence": "single", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "permission.query", + "domain": "project", + "object": "user_permission", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "user_rights", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询自身在项目及受控文档中的法定职责与操作权限;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "weight": 0.95 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.95, + "margin": 0.04999999999999993, + "legacy_intent": "QUERY_USER_RIGHTS" + } + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "single", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 1, + "digest": "21cf656f4e6315ba6897a1146d35e81f39acdd924c7beaec82d598a8025dcb48", + "combo_hint": "single", + "legacy_plan_attached": false, + "counterfactual_auto_read": "would_passthrough" + } + }, + "coordination_result": { + "status": "ACCEPTED", + "intent": "QUERY_USER_RIGHTS", + "branch": "NEW_INTENT_PREEMPT", + "natural_reply": "您好,用户!您在项目「医疗器械研发项目」中的法定受控职责如下:\n\n• **系统/项目身份**:用户 (角色代码: composer)\n\n根据 ISO 13485 质量管理规范,您的所有审核、批注与批准行为均将记入不可篡改的系统审计日志。", + "updated_context": { + "version": 7, + "snapshot_id": "ctx_1790178366176936513", + "assembled_at": "2026-09-23T15:46:06.176937843Z", + "user": { + "id": "u_sess-u9-f9b5b94b58", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:46:06.176946913Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "QUERY_USER_RIGHTS", + "topic_anchor": "法规案例权限相关情况一并说明下", + "collected_slots": { + "query_topic": "user_rights" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:46:25.505037343Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:46:06.176946913Z" + } + }, + "dur": 11.099387168884277 +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u9-rules.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u9-rules.json new file mode 100644 index 00000000..e2fcae61 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final-u9-rules.json @@ -0,0 +1,435 @@ +{ + "body": { + "reply_text": "关于「医疗器械研发项目」适用的国家标准与法规强标,权威依据梳理如下:\n\n1. **医疗器械软件注册审查指导原则** 〔GB/T9254 §七、技术考量 / (十六)功能安全与软件可靠性〕\n - 条款章节: 七、技术考量 / (十六)功能安全与软件可靠性\n - 条款要点: 考虑到行业实际情况,功能安全、软件可靠性暂不要求,待时机成熟时纳入考量。建议注册申请人参考相关标准要求加强功能安全、软件可靠性的设计工作,若已开展相应工作可在软件研究资料中予以提供。\n2. **国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知** 〔国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知 §三、〕\n - 条款章节: 三、 项目开展的必要性\n - 条款要点: 项目开展的必要性\n品种简介(二)市场现状(三)主要风险点\n3. **国家药监局关于印发医疗器械质量抽查检验管理办法的通知** 〔国家药监局关于印发医疗器械质量抽查检验管理办法的通知 §(二)立即深入进行自查,分析原因,进行风险评估;〕\n - 条款章节: (二)立即深入进行自查,分析原因,进行风险评估; 立即深入进行自查,分析原因,进行风险评估;\n - 条款要点: 立即深入进行自查,分析原因,进行风险评估;\n4. **中华人民共和国医药行业标准** 〔YY/T0489-2023 §5.1 p.7〕\n - 条款章节: 一次性使用无菌引流导管及辅助器械 / 5.1 5.1 风险管理\n - 条款要点: 器械设计应建立风险管理过程,并应进行风险分析。\n示例:GB/T 42062。\n应通过检查风险管理文档来确认符合性。如果开展了临床研究,则这些研究应记录所声称的性能条件下进行的测量。临床研究应按照国家临床研究的相关规定进行。\n5. **国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知** 〔国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知 §(一)品种简介(二)市场现状(三)主要风险点〕\n - 条款章节: 三、 项目开展的必要性 / (一)品种简介(二)市场现状(三)主要风险点 品种简介(二)市场现状(三)主要风险点\n - 条款要点: 品种简介(二)市场现状(三)主要风险点\n\n上述标准与条款可作为型检与注册申报的权威技术支撑。如需深入比对专标或预估测试周期,请随时吩咐我。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "查一下项目风险,然后查相关法规", + "top_intent": { + "intent": "QUERY_REGULATIONS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "regulations" + }, + "reasoning": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)" + }, + "candidates": [ + { + "intent": "QUERY_REGULATIONS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "regulations" + }, + "reasoning": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)" + }, + { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "risk" + }, + "reasoning": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: risk)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178366176936513", + "requires_clarifying": false, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.9, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "allowed", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "regulation.query", + "domain": "knowledge", + "object": "regulation", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "regulations", + "source": "rule" + } + }, + "relation": "expectation_plus_new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "legacy_intent": "QUERY_REGULATIONS" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "regulation.query", + "domain": "knowledge", + "object": "regulation", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "regulations", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)", + "weight": 0.9 + } + ], + "score": 0.9, + "legacy_intent": "QUERY_REGULATIONS" + }, + { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "risk", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: risk)", + "weight": 0.9 + } + ], + "score": 0.9, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "risk" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "31a4d8d763436d33cc87703baad5c5f041c66d4d5684e68d5b57436e07aa69d3", + "combo_hint": "read_only", + "segments": [ + { + "step_id": "1", + "text": "查一下项目风险", + "normalized": "查一下项目风险", + "span": { + "start": 0, + "end": 21 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "risk", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: risk)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "risk" + } + }, + { + "step_id": "2", + "text": "查相关法规", + "normalized": "查相关法规", + "span": { + "start": 30, + "end": 45 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "regulation.query", + "domain": "knowledge", + "object": "regulation", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "regulations", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_REGULATIONS" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "31a4d8d763436d33cc87703baad5c5f041c66d4d5684e68d5b57436e07aa69d3", + "combo_hint": "read_only", + "legacy_plan_attached": true, + "counterfactual_auto_read": "would_execute" + } + }, + "coordination_result": { + "status": "ACCEPTED", + "intent": "QUERY_REGULATIONS", + "branch": "NEW_INTENT_PREEMPT", + "natural_reply": "关于「医疗器械研发项目」适用的国家标准与法规强标,权威依据梳理如下:\n\n1. **医疗器械软件注册审查指导原则** 〔GB/T9254 §七、技术考量 / (十六)功能安全与软件可靠性〕\n - 条款章节: 七、技术考量 / (十六)功能安全与软件可靠性\n - 条款要点: 考虑到行业实际情况,功能安全、软件可靠性暂不要求,待时机成熟时纳入考量。建议注册申请人参考相关标准要求加强功能安全、软件可靠性的设计工作,若已开展相应工作可在软件研究资料中予以提供。\n2. **国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知** 〔国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知 §三、〕\n - 条款章节: 三、 项目开展的必要性\n - 条款要点: 项目开展的必要性\n品种简介(二)市场现状(三)主要风险点\n3. **国家药监局关于印发医疗器械质量抽查检验管理办法的通知** 〔国家药监局关于印发医疗器械质量抽查检验管理办法的通知 §(二)立即深入进行自查,分析原因,进行风险评估;〕\n - 条款章节: (二)立即深入进行自查,分析原因,进行风险评估; 立即深入进行自查,分析原因,进行风险评估;\n - 条款要点: 立即深入进行自查,分析原因,进行风险评估;\n4. **中华人民共和国医药行业标准** 〔YY/T0489-2023 §5.1 p.7〕\n - 条款章节: 一次性使用无菌引流导管及辅助器械 / 5.1 5.1 风险管理\n - 条款要点: 器械设计应建立风险管理过程,并应进行风险分析。\n示例:GB/T 42062。\n应通过检查风险管理文档来确认符合性。如果开展了临床研究,则这些研究应记录所声称的性能条件下进行的测量。临床研究应按照国家临床研究的相关规定进行。\n5. **国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知** 〔国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知 §(一)品种简介(二)市场现状(三)主要风险点〕\n - 条款章节: 三、 项目开展的必要性 / (一)品种简介(二)市场现状(三)主要风险点 品种简介(二)市场现状(三)主要风险点\n - 条款要点: 品种简介(二)市场现状(三)主要风险点\n\n上述标准与条款可作为型检与注册申报的权威技术支撑。如需深入比对专标或预估测试周期,请随时吩咐我。", + "updated_context": { + "version": 5, + "snapshot_id": "ctx_1790178366176936513", + "assembled_at": "2026-09-23T15:46:06.176937843Z", + "user": { + "id": "u_sess-u9-f9b5b94b58", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:46:06.176946913Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "QUERY_REGULATIONS", + "topic_anchor": "查一下项目风险,然后查相关法规", + "collected_slots": { + "query_topic": "regulations" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:46:12.348820373Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:46:06.176946913Z" + }, + "intent_plan": { + "plan_id": "pln_14a5241e51430fdf88dab42d2fc4f6bd", + "revision": 2, + "status": "executing", + "execution_mode": "live", + "expires_at": "2026-09-23T16:16:06.191204Z", + "steps": [ + { + "step_id": "stp_4924478f7f3663b640b19a3c94e748f3", + "action_key": "project.advisory", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "project.advisory authorized (scope=7f2723aa6356)" + }, + { + "step_id": "stp_2de6eb4f20cf887b196e2c36fdd90821", + "action_key": "regulation.query", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "regulation.query authorized (scope=78118e595902)" + } + ], + "safe_summary": "查一下项目风险,然后查相关法规" + } + }, + "dur": 9.948837041854858 +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final2-u10.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final2-u10.json new file mode 100644 index 00000000..7f6cfa46 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final2-u10.json @@ -0,0 +1,504 @@ +{ + "create": { + "reply_text": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "补充项目信息:二次验收-0de7,然后查一下相关法规", + "top_intent": { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "all" + }, + "reasoning": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "clarification_question": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。" + }, + "candidates": [ + { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "all" + }, + "reasoning": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "clarification_question": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。" + }, + { + "intent": "SUPPLEMENT_INFO", + "confidence": 0.88, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "supplement_action": "add", + "supplement_doc": "补充项目信息:二次验收-0de7,然后查一下相关法规" + }, + "reasoning": "用户输入中包含参数变更或新材料事实补充" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178524990986897", + "requires_clarifying": true, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.9, + "shadow_margin": 0.020000000000000018, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "needs_clarification", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "expectation_plus_new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.020000000000000018, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "weight": 0.9 + } + ], + "score": 0.9, + "margin": 0.020000000000000018, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + { + "version": "v2.0", + "action_key": "project.fact.supplement", + "domain": "project", + "object": "project_fact", + "goal": "mutate", + "dialogue_act": "command", + "slots": { + "supplement_action": { + "value": "add", + "source": "rule" + }, + "supplement_doc": { + "value": "补充项目信息:二次验收-0de7,然后查一下相关法规", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户输入中包含参数变更或新材料事实补充", + "weight": 0.88 + } + ], + "score": 0.88, + "margin": 0.020000000000000018, + "legacy_intent": "SUPPLEMENT_INFO", + "subtype": "add" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.020000000000000018, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.020000000000000018, + "conflicts": [ + { + "kind": "write_vs_query", + "top_action": "QUERY_PROGRESS", + "second_action": "SUPPLEMENT_INFO", + "margin": 0.020000000000000018 + } + ] + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "2a17e1c8c4841347afa7e4462cf92be5eccee44accf1c287d5f08046e03f20e7", + "combo_hint": "needs_confirm", + "segments": [ + { + "step_id": "1", + "text": "补充项目信息:二次验收-0de7", + "normalized": "补充项目信息:二次验收-0de7", + "span": { + "start": 0, + "end": 38 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "project.fact.supplement", + "domain": "project", + "object": "project_fact", + "goal": "mutate", + "dialogue_act": "command", + "slots": { + "supplement_action": { + "value": "add", + "source": "rule" + }, + "supplement_doc": { + "value": "补充项目信息:二次验收-0de7", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户输入中包含参数变更或新材料事实补充", + "weight": 0.88 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.88, + "margin": 0.6799999999999999, + "legacy_intent": "SUPPLEMENT_INFO", + "subtype": "add" + } + }, + { + "step_id": "2", + "text": "查一下相关法规", + "normalized": "查一下相关法规", + "span": { + "start": 47, + "end": 68 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "regulation.query", + "domain": "knowledge", + "object": "regulation", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "regulations", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "legacy_intent": "QUERY_REGULATIONS" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "2a17e1c8c4841347afa7e4462cf92be5eccee44accf1c287d5f08046e03f20e7", + "combo_hint": "needs_confirm", + "legacy_plan_attached": true, + "counterfactual_auto_read": "would_confirm" + } + }, + "coordination_result": { + "status": "CLARIFICATION_REQUIRED", + "intent": "QUERY_PROGRESS", + "branch": "NEW_INTENT_PREEMPT", + "clarification_prompt": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。", + "natural_reply": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。", + "updated_context": { + "version": 5, + "snapshot_id": "ctx_1790178524990986897", + "assembled_at": "2026-09-23T15:48:44.990988787Z", + "user": { + "id": "u_sess-u10-0ce2ac5a97", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:48:44.990993677Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "QUERY_PROGRESS", + "topic_anchor": "补充项目信息:二次验收-0de7,然后查一下相关法规", + "collected_slots": { + "query_topic": "all" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:48:45.002020549Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:48:44.990993677Z" + }, + "intent_plan": { + "plan_id": "pln_03b9bbf4e4f6cf38548225462435858b", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:18:45.000711138Z", + "steps": [ + { + "step_id": "stp_93b6445312afabd3bcd040d1c381e488", + "action_key": "project.fact.supplement", + "status": "pending", + "execution_mode": "live", + "safe_summary": "补充项目信息:二次验收-0de7" + }, + { + "step_id": "stp_b139079aaff2121c7e237f93bddb21ab", + "action_key": "regulation.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下相关法规" + } + ], + "safe_summary": "补充项目信息:二次验收-0de7,然后查一下相关法规" + } + }, + "decided": { + "plan": { + "plan_id": "pln_03b9bbf4e4f6cf38548225462435858b", + "revision": 2, + "status": "executing", + "execution_mode": "live", + "expires_at": "2026-09-23T16:18:45.000711Z", + "steps": [ + { + "step_id": "stp_93b6445312afabd3bcd040d1c381e488", + "action_key": "project.fact.supplement", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "project facts supplemented" + }, + { + "step_id": "stp_b139079aaff2121c7e237f93bddb21ab", + "action_key": "regulation.query", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "regulation.query authorized (scope=dbfc4fa80211)" + } + ], + "safe_summary": "补充项目信息:二次验收-0de7,然后查一下相关法规" + } + }, + "meta": { + "confirm_status": 200, + "dur": 2.0623159408569336, + "status": "executing", + "steps": [ + [ + "project.fact.supplement", + "succeeded", + "project facts supplemented" + ], + [ + "regulation.query", + "succeeded", + "regulation.query authorized (scope=dbfc4fa80211)" + ] + ], + "err": null + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final2-u11.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final2-u11.json new file mode 100644 index 00000000..6047dfdf --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/final2-u11.json @@ -0,0 +1,461 @@ +{ + "create": { + "reply_text": "您是想查询该文档当前由谁认领负责吗?我将为您检索认领状态,不会执行认领操作。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "认领文档 doc_proj6579_bd_cdo_quote,然后查一下文档状态", + "top_intent": { + "intent": "QUERY_USER_RIGHTS", + "confidence": 0.91, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "查询语气下的文档认领状态询问,不得路由为写操作 DOCGOV_CLAIM;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "clarification_question": "您是想查询该文档当前由谁认领负责吗?我将为您检索认领状态,不会执行认领操作。" + }, + "candidates": [ + { + "intent": "QUERY_USER_RIGHTS", + "confidence": 0.91, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "查询语气下的文档认领状态询问,不得路由为写操作 DOCGOV_CLAIM;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "clarification_question": "您是想查询该文档当前由谁认领负责吗?我将为您检索认领状态,不会执行认领操作。" + }, + { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "all" + }, + "reasoning": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178505581557700", + "requires_clarifying": true, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.91, + "shadow_margin": 0.010000000000000009, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "needs_clarification", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "permission.query", + "domain": "project", + "object": "user_permission", + "goal": "query", + "dialogue_act": "command", + "relation": "expectation_plus_new", + "evidence": [ + { + "kind": "rule_match", + "detail": "查询语气下的文档认领状态询问,不得路由为写操作 DOCGOV_CLAIM;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "weight": 0.91 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.91, + "margin": 0.010000000000000009, + "legacy_intent": "QUERY_USER_RIGHTS" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "permission.query", + "domain": "project", + "object": "user_permission", + "goal": "query", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "查询语气下的文档认领状态询问,不得路由为写操作 DOCGOV_CLAIM;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "weight": 0.91 + } + ], + "score": 0.91, + "margin": 0.010000000000000009, + "legacy_intent": "QUERY_USER_RIGHTS" + }, + { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)", + "weight": 0.9 + } + ], + "score": 0.9, + "margin": 0.010000000000000009, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.010000000000000009, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.010000000000000009 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "efa74ecfe9ed68870c86fba423e5a48fdc8b802b944db56a115228ffbc2bb3f8", + "combo_hint": "needs_confirm", + "segments": [ + { + "step_id": "1", + "text": "认领文档 doc_proj6579_bd_cdo_quote", + "normalized": "认领文档 doc_proj6579_bd_cdo_quote", + "span": { + "start": 0, + "end": 38 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "document.claim", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)", + "weight": 0.94 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_CLAIM" + } + }, + { + "step_id": "2", + "text": "查一下文档状态", + "normalized": "查一下文档状态", + "span": { + "start": 47, + "end": 68 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "efa74ecfe9ed68870c86fba423e5a48fdc8b802b944db56a115228ffbc2bb3f8", + "combo_hint": "needs_confirm", + "legacy_plan_attached": true, + "counterfactual_auto_read": "would_confirm" + } + }, + "coordination_result": { + "status": "CLARIFICATION_REQUIRED", + "intent": "QUERY_USER_RIGHTS", + "branch": "NEW_INTENT_PREEMPT", + "clarification_prompt": "您是想查询该文档当前由谁认领负责吗?我将为您检索认领状态,不会执行认领操作。", + "natural_reply": "您是想查询该文档当前由谁认领负责吗?我将为您检索认领状态,不会执行认领操作。", + "updated_context": { + "version": 5, + "snapshot_id": "ctx_1790178505581557700", + "assembled_at": "2026-09-23T15:48:25.58156035Z", + "user": { + "id": "u_sess-u11-3888bb6fed", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:48:25.581569289Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "QUERY_USER_RIGHTS", + "topic_anchor": "认领文档 doc_proj6579_bd_cdo_quote,然后查一下文档状态", + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:48:25.59702113Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:48:25.581569289Z" + }, + "intent_plan": { + "plan_id": "pln_ed04da6753b6aa226a38a634f695f714", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:18:25.595510625Z", + "steps": [ + { + "step_id": "stp_cc8b48033fa9d7e17c2e22db100a2c09", + "action_key": "document.claim", + "status": "pending", + "execution_mode": "live", + "safe_summary": "认领文档 doc_proj6579_bd_cdo_quote" + }, + { + "step_id": "stp_63b4765329fc090052d2dd4c6ea98015", + "action_key": "project.advisory", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下文档状态" + } + ], + "safe_summary": "认领文档 doc_proj6579_bd_cdo_quote,然后查一下文档状态" + } + }, + "decided": { + "plan": { + "plan_id": "pln_ed04da6753b6aa226a38a634f695f714", + "revision": 2, + "status": "executing", + "execution_mode": "live", + "expires_at": "2026-09-23T16:18:25.59551Z", + "steps": [ + { + "step_id": "stp_cc8b48033fa9d7e17c2e22db100a2c09", + "action_key": "document.claim", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "document.claim accepted" + }, + { + "step_id": "stp_63b4765329fc090052d2dd4c6ea98015", + "action_key": "project.advisory", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "project.advisory authorized (scope=c80ee18ae782)" + } + ], + "safe_summary": "认领文档 doc_proj6579_bd_cdo_quote,然后查一下文档状态" + } + }, + "meta": { + "confirm_status": 200, + "dur": 2.866854429244995, + "status": "executing", + "steps": [ + [ + "document.claim", + "succeeded", + "document.claim accepted" + ], + [ + "project.advisory", + "succeeded", + "project.advisory authorized (scope=c80ee18ae782)" + ] + ], + "err": null + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/summary.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/summary.json new file mode 100644 index 00000000..1a13c1f1 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/summary.json @@ -0,0 +1,134 @@ +{ + "u9_rules": { + "status": 200, + "dur": 9.39828109741211, + "plan": { + "plan_id": "pln_74cd70c0cf0e5cdc65a955ade0e7477b", + "revision": 2, + "status": "executing", + "execution_mode": "live", + "expires_at": "2026-09-23T16:09:53.710639Z", + "steps": [ + { + "step_id": "stp_3b323bf61ae80cf066a431aecc08cf1e", + "action_key": "project.advisory", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "project.advisory authorized (scope=87d12db7ea80)" + }, + { + "step_id": "stp_1c1bf5c613914aafaa0180238e8348fd", + "action_key": "regulation.query", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "regulation.query authorized (scope=3d8fcf041cf7)" + } + ], + "safe_summary": "查一下项目风险,然后查相关法规" + }, + "keys": [ + "reply_text", + "branch", + "intent_result", + "coordination_result", + "pending_expectation", + "intent_plan" + ], + "segmenter": null, + "reply_snip": "" + }, + "u9_amb_0": { + "status": 200, + "dur": 8.093623876571655, + "segmenter": null, + "plan_status": null, + "steps": [], + "keys": [ + "reply_text", + "branch", + "intent_result", + "coordination_result", + "pending_expectation" + ] + }, + "u9_amb_1": { + "status": 200, + "dur": 8.836433172225952, + "segmenter": null, + "plan_status": null, + "steps": [], + "keys": [ + "reply_text", + "branch", + "intent_result", + "coordination_result", + "pending_expectation" + ] + }, + "u9_amb_2": { + "status": 200, + "dur": 3.386570692062378, + "segmenter": null, + "plan_status": null, + "steps": [], + "keys": [ + "reply_text", + "branch", + "intent_result", + "coordination_result", + "pending_expectation" + ] + }, + "u10_chat": { + "status": 200, + "dur": 1.54642653465271, + "plan": { + "plan_id": "pln_f96260e4c30be7cef9aa106657f963f1", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:10:23.410741479Z", + "steps": [ + { + "step_id": "stp_85266395b4573398435b319e4227ffb7", + "action_key": "project.fact.supplement", + "status": "pending", + "execution_mode": "live", + "safe_summary": "补充项目信息:验收预算约500万" + }, + { + "step_id": "stp_b493ce23cba132b2c250888f256538c2", + "action_key": "regulation.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下相关法规" + } + ], + "safe_summary": "补充项目信息:验收预算约500万,然后查一下相关法规" + }, + "steps": [ + [ + "project.fact.supplement", + "pending", + "live" + ], + [ + "regulation.query", + "pending", + "live" + ] + ] + }, + "u11_chat": { + "status": 200, + "dur": 0.011644124984741211, + "plan": null, + "steps": [] + }, + "u12_chat": { + "status": 200, + "dur": 1.3880269527435303, + "plan": null, + "steps": [] + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u10-blackboard.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u10-blackboard.json new file mode 100644 index 00000000..c62219f9 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u10-blackboard.json @@ -0,0 +1,8 @@ +{ + "before": { + "raw": "404 page not found\n" + }, + "after": { + "raw": "404 page not found\n" + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u10-chat.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u10-chat.json new file mode 100644 index 00000000..f5fa4717 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u10-chat.json @@ -0,0 +1,490 @@ +{ + "msg": "补充项目信息:验收预算约500万,然后查一下相关法规", + "status": 200, + "dur": 1.54642653465271, + "body": { + "reply_text": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "补充项目信息:验收预算约500万,然后查一下相关法规", + "top_intent": { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "all" + }, + "reasoning": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "clarification_question": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。" + }, + "candidates": [ + { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "all" + }, + "reasoning": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "clarification_question": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。" + }, + { + "intent": "SUPPLEMENT_INFO", + "confidence": 0.88, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "budget": "约500万,然后查一下相关法规", + "fact_key": "budget", + "fact_value": "约500万,然后查一下相关法规", + "supplement_action": "add", + "supplement_doc": "补充项目信息:验收预算约500万,然后查一下相关法规" + }, + "reasoning": "用户输入中包含参数变更或新材料事实补充" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178023402804334", + "requires_clarifying": true, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.9, + "shadow_margin": 0.020000000000000018, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "needs_clarification", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "expectation_plus_new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.020000000000000018, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "weight": 0.9 + } + ], + "score": 0.9, + "margin": 0.020000000000000018, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + { + "version": "v2.0", + "action_key": "project.fact.supplement", + "domain": "project", + "object": "project_fact", + "goal": "mutate", + "dialogue_act": "command", + "slots": { + "budget": { + "value": "约500万,然后查一下相关法规", + "source": "rule" + }, + "fact_key": { + "value": "budget", + "source": "rule" + }, + "fact_value": { + "value": "约500万,然后查一下相关法规", + "source": "rule" + }, + "supplement_action": { + "value": "add", + "source": "rule" + }, + "supplement_doc": { + "value": "补充项目信息:验收预算约500万,然后查一下相关法规", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户输入中包含参数变更或新材料事实补充", + "weight": 0.88 + } + ], + "score": 0.88, + "margin": 0.020000000000000018, + "legacy_intent": "SUPPLEMENT_INFO", + "subtype": "add" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.020000000000000018, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.020000000000000018, + "conflicts": [ + { + "kind": "write_vs_query", + "top_action": "QUERY_PROGRESS", + "second_action": "SUPPLEMENT_INFO", + "margin": 0.020000000000000018 + } + ] + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "8f4f651065bd3868d478efbc1c577f5169af7146b8eb97137d58c05df03faae8", + "combo_hint": "needs_confirm", + "segments": [ + { + "step_id": "1", + "text": "补充项目信息:验收预算约500万", + "normalized": "补充项目信息:验收预算约500万", + "span": { + "start": 0, + "end": 42 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "project.fact.supplement", + "domain": "project", + "object": "project_fact", + "goal": "mutate", + "dialogue_act": "command", + "slots": { + "budget": { + "value": "约500万", + "source": "rule" + }, + "fact_key": { + "value": "budget", + "source": "rule" + }, + "fact_value": { + "value": "约500万", + "source": "rule" + }, + "supplement_action": { + "value": "add", + "source": "rule" + }, + "supplement_doc": { + "value": "补充项目信息:验收预算约500万", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户输入中包含参数变更或新材料事实补充", + "weight": 0.88 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.88, + "margin": 0.6799999999999999, + "legacy_intent": "SUPPLEMENT_INFO", + "subtype": "add" + } + }, + { + "step_id": "2", + "text": "查一下相关法规", + "normalized": "查一下相关法规", + "span": { + "start": 51, + "end": 72 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "regulation.query", + "domain": "knowledge", + "object": "regulation", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "regulations", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "legacy_intent": "QUERY_REGULATIONS" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "8f4f651065bd3868d478efbc1c577f5169af7146b8eb97137d58c05df03faae8", + "combo_hint": "needs_confirm", + "legacy_plan_attached": true, + "counterfactual_auto_read": "would_confirm" + } + }, + "coordination_result": { + "status": "CLARIFICATION_REQUIRED", + "intent": "QUERY_PROGRESS", + "branch": "NEW_INTENT_PREEMPT", + "clarification_prompt": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。", + "natural_reply": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。", + "updated_context": { + "version": 4, + "snapshot_id": "ctx_1790178023402804334", + "assembled_at": "2026-09-23T15:40:23.402805704Z", + "user": { + "id": "u_sess_1790178023402482984", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:40:23.402812394Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "QUERY_PROGRESS", + "topic_anchor": "补充项目信息:验收预算约500万,然后查一下相关法规", + "collected_slots": { + "query_topic": "all" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:40:23.412951103Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:40:23.402812394Z" + }, + "intent_plan": { + "plan_id": "pln_f96260e4c30be7cef9aa106657f963f1", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:10:23.410741479Z", + "steps": [ + { + "step_id": "stp_85266395b4573398435b319e4227ffb7", + "action_key": "project.fact.supplement", + "status": "pending", + "execution_mode": "live", + "safe_summary": "补充项目信息:验收预算约500万" + }, + { + "step_id": "stp_b493ce23cba132b2c250888f256538c2", + "action_key": "regulation.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下相关法规" + } + ], + "safe_summary": "补充项目信息:验收预算约500万,然后查一下相关法规" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u10-confirm-ok.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u10-confirm-ok.json new file mode 100644 index 00000000..d97afeb5 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u10-confirm-ok.json @@ -0,0 +1,59 @@ +{ + "fact": "验收备注-34b3a2", + "plan": { + "plan_id": "pln_925178f607436215b11a7504ba40429b", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:13:03.858818676Z", + "steps": [ + { + "step_id": "stp_9dfd94664092c2d9ca362838d426286e", + "action_key": "project.fact.supplement", + "status": "pending", + "execution_mode": "live", + "safe_summary": "补充项目信息:验收备注-34b3a2" + }, + { + "step_id": "stp_1b7fd6ada709704300cecce8ec83f16c", + "action_key": "regulation.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下相关法规" + } + ], + "safe_summary": "补充项目信息:验收备注-34b3a2,然后查一下相关法规" + }, + "got": { + "plan": { + "plan_id": "pln_925178f607436215b11a7504ba40429b", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:13:03.858818Z", + "steps": [ + { + "step_id": "stp_9dfd94664092c2d9ca362838d426286e", + "action_key": "project.fact.supplement", + "status": "pending", + "execution_mode": "live", + "safe_summary": "补充项目信息:验收备注-34b3a2" + }, + { + "step_id": "stp_1b7fd6ada709704300cecce8ec83f16c", + "action_key": "regulation.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下相关法规" + } + ], + "safe_summary": "补充项目信息:验收备注-34b3a2,然后查一下相关法规" + } + }, + "status": 409, + "dur": 0.0012128353118896484, + "decided": { + "error_code": "PLAN_ACTION_VERSION_CONFLICT", + "message": "PLAN_ACTION_VERSION_CONFLICT" + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u10-confirm.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u10-confirm.json new file mode 100644 index 00000000..a4325c10 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u10-confirm.json @@ -0,0 +1,34 @@ +{ + "get": { + "plan": { + "plan_id": "pln_bd9fd6cb90ad7ac5b40fe8aee77f394b", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:12:19.547434Z", + "steps": [ + { + "step_id": "stp_b1f493eca59cf050e021ec971d65340b", + "action_key": "project.fact.supplement", + "status": "pending", + "execution_mode": "live", + "safe_summary": "补充项目信息:验收预算约500万" + }, + { + "step_id": "stp_d00414f9376dc029ec3f3cdff502136b", + "action_key": "regulation.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下相关法规" + } + ], + "safe_summary": "补充项目信息:验收预算约500万,然后查一下相关法规" + } + }, + "confirm_status": 409, + "dur": 0.0016248226165771484, + "decided": { + "error_code": "PLAN_ACTION_VERSION_CONFLICT", + "message": "PLAN_ACTION_VERSION_CONFLICT" + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u10-create.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u10-create.json new file mode 100644 index 00000000..6010589f --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u10-create.json @@ -0,0 +1,490 @@ +{ + "sess": "sess-u10-2eb0c1608fd6", + "status": 200, + "dur": 1.4614741802215576, + "body": { + "reply_text": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "补充项目信息:验收预算约500万,然后查一下相关法规", + "top_intent": { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "all" + }, + "reasoning": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "clarification_question": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。" + }, + "candidates": [ + { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "all" + }, + "reasoning": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "clarification_question": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。" + }, + { + "intent": "SUPPLEMENT_INFO", + "confidence": 0.88, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "budget": "约500万,然后查一下相关法规", + "fact_key": "budget", + "fact_value": "约500万,然后查一下相关法规", + "supplement_action": "add", + "supplement_doc": "补充项目信息:验收预算约500万,然后查一下相关法规" + }, + "reasoning": "用户输入中包含参数变更或新材料事实补充" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178139539357543", + "requires_clarifying": true, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.9, + "shadow_margin": 0.020000000000000018, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "needs_clarification", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "expectation_plus_new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.020000000000000018, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=QUERY_PROGRESS(0.90) vs second=SUPPLEMENT_INFO(0.88) margin=0.02", + "weight": 0.9 + } + ], + "score": 0.9, + "margin": 0.020000000000000018, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + { + "version": "v2.0", + "action_key": "project.fact.supplement", + "domain": "project", + "object": "project_fact", + "goal": "mutate", + "dialogue_act": "command", + "slots": { + "budget": { + "value": "约500万,然后查一下相关法规", + "source": "rule" + }, + "fact_key": { + "value": "budget", + "source": "rule" + }, + "fact_value": { + "value": "约500万,然后查一下相关法规", + "source": "rule" + }, + "supplement_action": { + "value": "add", + "source": "rule" + }, + "supplement_doc": { + "value": "补充项目信息:验收预算约500万,然后查一下相关法规", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户输入中包含参数变更或新材料事实补充", + "weight": 0.88 + } + ], + "score": 0.88, + "margin": 0.020000000000000018, + "legacy_intent": "SUPPLEMENT_INFO", + "subtype": "add" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.020000000000000018, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.020000000000000018, + "conflicts": [ + { + "kind": "write_vs_query", + "top_action": "QUERY_PROGRESS", + "second_action": "SUPPLEMENT_INFO", + "margin": 0.020000000000000018 + } + ] + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "8f4f651065bd3868d478efbc1c577f5169af7146b8eb97137d58c05df03faae8", + "combo_hint": "needs_confirm", + "segments": [ + { + "step_id": "1", + "text": "补充项目信息:验收预算约500万", + "normalized": "补充项目信息:验收预算约500万", + "span": { + "start": 0, + "end": 42 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "project.fact.supplement", + "domain": "project", + "object": "project_fact", + "goal": "mutate", + "dialogue_act": "command", + "slots": { + "budget": { + "value": "约500万", + "source": "rule" + }, + "fact_key": { + "value": "budget", + "source": "rule" + }, + "fact_value": { + "value": "约500万", + "source": "rule" + }, + "supplement_action": { + "value": "add", + "source": "rule" + }, + "supplement_doc": { + "value": "补充项目信息:验收预算约500万", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户输入中包含参数变更或新材料事实补充", + "weight": 0.88 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.88, + "margin": 0.6799999999999999, + "legacy_intent": "SUPPLEMENT_INFO", + "subtype": "add" + } + }, + { + "step_id": "2", + "text": "查一下相关法规", + "normalized": "查一下相关法规", + "span": { + "start": 51, + "end": 72 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "regulation.query", + "domain": "knowledge", + "object": "regulation", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "regulations", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "legacy_intent": "QUERY_REGULATIONS" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "8f4f651065bd3868d478efbc1c577f5169af7146b8eb97137d58c05df03faae8", + "combo_hint": "needs_confirm", + "legacy_plan_attached": true, + "counterfactual_auto_read": "would_confirm" + } + }, + "coordination_result": { + "status": "CLARIFICATION_REQUIRED", + "intent": "QUERY_PROGRESS", + "branch": "NEW_INTENT_PREEMPT", + "clarification_prompt": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。", + "natural_reply": "检测到您的表述可能有两种理解:查询「QUERY_PROGRESS」相关信息,或执行「SUPPLEMENT_INFO」写操作。请明确说明您希望查询还是执行。", + "updated_context": { + "version": 5, + "snapshot_id": "ctx_1790178139539357543", + "assembled_at": "2026-09-23T15:42:19.539358313Z", + "user": { + "id": "u_sess-u10-2eb0c1608fd6", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:42:19.539361043Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "QUERY_PROGRESS", + "topic_anchor": "补充项目信息:验收预算约500万,然后查一下相关法规", + "collected_slots": { + "query_topic": "all" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:42:19.550075005Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:42:19.539361043Z" + }, + "intent_plan": { + "plan_id": "pln_bd9fd6cb90ad7ac5b40fe8aee77f394b", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:12:19.547434733Z", + "steps": [ + { + "step_id": "stp_b1f493eca59cf050e021ec971d65340b", + "action_key": "project.fact.supplement", + "status": "pending", + "execution_mode": "live", + "safe_summary": "补充项目信息:验收预算约500万" + }, + { + "step_id": "stp_d00414f9376dc029ec3f3cdff502136b", + "action_key": "regulation.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下相关法规" + } + ], + "safe_summary": "补充项目信息:验收预算约500万,然后查一下相关法规" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11-5a68.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11-5a68.json new file mode 100644 index 00000000..32d9fd16 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11-5a68.json @@ -0,0 +1,310 @@ +{ + "msg": "请认领受控文档doc_proj6579_bd_cdo_quote并提交审查", + "status": 200, + "dur": 7.890468597412109, + "body": { + "reply_text": "您已成功认领《当前受控文档》。系统已锁定您作为该文档的法定责任人,您可以开始在线就地修订正文或提交审核。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "请认领受控文档doc_proj6579_bd_cdo_quote并提交审查", + "top_intent": { + "intent": "DOCGOV_CLAIM", + "confidence": 0.94, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)" + }, + "candidates": [ + { + "intent": "DOCGOV_CLAIM", + "confidence": 0.94, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178141007112841", + "requires_clarifying": false, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.94, + "shadow_margin": 0.74, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "allowed", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "document.claim", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)", + "weight": 0.94 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_CLAIM" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "document.claim", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)", + "weight": 0.94 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_CLAIM" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.74, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.74 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "76d95599879073f1557023be945de007fbcd7ab6520b6111acf468dfbfc55576", + "combo_hint": "single", + "segments": [ + { + "step_id": "1", + "text": "请认领受控文档doc_proj6579_bd_cdo_quote并提交审查", + "normalized": "请认领受控文档doc_proj6579_bd_cdo_quote并提交审查", + "span": { + "start": 0, + "end": 61 + }, + "evidence": "single", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "document.claim", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)", + "weight": 0.94 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_CLAIM" + } + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "single", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 1, + "digest": "76d95599879073f1557023be945de007fbcd7ab6520b6111acf468dfbfc55576", + "combo_hint": "single", + "legacy_plan_attached": false, + "legacy_dropped_write": true, + "counterfactual_auto_read": "would_confirm" + } + }, + "coordination_result": { + "status": "ACCEPTED", + "intent": "DOCGOV_CLAIM", + "branch": "NEW_INTENT_PREEMPT", + "natural_reply": "您已成功认领《当前受控文档》。系统已锁定您作为该文档的法定责任人,您可以开始在线就地修订正文或提交审核。", + "updated_context": { + "version": 7, + "snapshot_id": "ctx_1790178141007112841", + "assembled_at": "2026-09-23T15:42:21.007117071Z", + "user": { + "id": "u_sess-u11-b28c23d0d535", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": [ + "当前受控文档" + ] + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:42:21.007126811Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "DOCGOV_CLAIM", + "topic_anchor": "请认领受控文档doc_proj6579_bd_cdo_quote并提交审查", + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:42:28.903865426Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:42:21.007126811Z" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11-6fda.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11-6fda.json new file mode 100644 index 00000000..29b66af8 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11-6fda.json @@ -0,0 +1,373 @@ +{ + "msg": "认领文档然后提交评审,文档是 CDO 报价单", + "status": 200, + "dur": 0.009508132934570312, + "body": { + "reply_text": "您已成功认领《报价单》。系统已锁定您作为该文档的法定责任人,您可以开始在线就地修订正文或提交审核。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "认领文档然后提交评审,文档是 CDO 报价单", + "top_intent": { + "intent": "DOCGOV_CLAIM", + "confidence": 0.94, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "target_doc": "报价单" + }, + "reasoning": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)" + }, + "candidates": [ + { + "intent": "DOCGOV_CLAIM", + "confidence": 0.94, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "target_doc": "报价单" + }, + "reasoning": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178141007112841", + "requires_clarifying": false, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.94, + "shadow_margin": 0.74, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "allowed", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "document.claim", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "slots": { + "target_doc": { + "value": "报价单", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)", + "weight": 0.94 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_CLAIM" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "document.claim", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "slots": { + "target_doc": { + "value": "报价单", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)", + "weight": 0.94 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_CLAIM" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.74, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.74 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "9dcb606ebb53f88732a33f364cdc579f8d0cd71e2e055532e43d5dc9027c4ac0", + "combo_hint": "needs_clarify", + "segments": [ + { + "step_id": "1", + "text": "认领文档", + "normalized": "认领文档", + "span": { + "start": 0, + "end": 12 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "document.claim", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)", + "weight": 0.94 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_CLAIM" + } + }, + { + "step_id": "2", + "text": "提交评审,文档是 CDO 报价单", + "normalized": "提交评审,文档是 CDO 报价单", + "span": { + "start": 18, + "end": 56 + }, + "connector": "然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "unresolved_reference", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.2, + "legacy_intent": "CASUAL_CHAT" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "9dcb606ebb53f88732a33f364cdc579f8d0cd71e2e055532e43d5dc9027c4ac0", + "combo_hint": "needs_clarify", + "legacy_plan_attached": false, + "legacy_dropped_write": true, + "counterfactual_auto_read": "would_clarify" + } + }, + "coordination_result": { + "status": "ACCEPTED", + "intent": "DOCGOV_CLAIM", + "branch": "NEW_INTENT_PREEMPT", + "natural_reply": "您已成功认领《报价单》。系统已锁定您作为该文档的法定责任人,您可以开始在线就地修订正文或提交审核。", + "updated_context": { + "version": 9, + "snapshot_id": "ctx_1790178141007112841", + "assembled_at": "2026-09-23T15:42:21.007117071Z", + "user": { + "id": "u_sess-u11-b28c23d0d535", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": [ + "当前受控文档", + "报价单" + ] + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:42:21.007126811Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "DOCGOV_CLAIM", + "topic_anchor": "认领文档然后提交评审,文档是 CDO 报价单", + "collected_slots": { + "target_doc": "报价单" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:42:28.91486052Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:42:21.007126811Z" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11-ac53.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11-ac53.json new file mode 100644 index 00000000..40f5a978 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11-ac53.json @@ -0,0 +1,353 @@ +{ + "msg": "认领文档 doc_proj6579_bd_cdo_quote,然后提交评审", + "status": 200, + "dur": 0.009240150451660156, + "body": { + "reply_text": "您已成功认领《当前受控文档》。系统已锁定您作为该文档的法定责任人,您可以开始在线就地修订正文或提交审核。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "认领文档 doc_proj6579_bd_cdo_quote,然后提交评审", + "top_intent": { + "intent": "DOCGOV_CLAIM", + "confidence": 0.94, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)" + }, + "candidates": [ + { + "intent": "DOCGOV_CLAIM", + "confidence": 0.94, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178141007112841", + "requires_clarifying": false, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.94, + "shadow_margin": 0.74, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "allowed", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "document.claim", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)", + "weight": 0.94 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_CLAIM" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "document.claim", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)", + "weight": 0.94 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_CLAIM" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.74, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.74 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "a4f0f9a5c620f28d2d23e2db9c231cf089bada40343fa1fdc4e3eb6ea5bea306", + "combo_hint": "needs_clarify", + "segments": [ + { + "step_id": "1", + "text": "认领文档 doc_proj6579_bd_cdo_quote", + "normalized": "认领文档 doc_proj6579_bd_cdo_quote", + "span": { + "start": 0, + "end": 38 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "document.claim", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)", + "weight": 0.94 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_CLAIM" + } + }, + { + "step_id": "2", + "text": "提交评审", + "normalized": "提交评审", + "span": { + "start": 47, + "end": 59 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "unresolved_reference", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.2, + "legacy_intent": "CASUAL_CHAT" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "a4f0f9a5c620f28d2d23e2db9c231cf089bada40343fa1fdc4e3eb6ea5bea306", + "combo_hint": "needs_clarify", + "legacy_plan_attached": false, + "legacy_dropped_write": true, + "counterfactual_auto_read": "would_clarify" + } + }, + "coordination_result": { + "status": "ACCEPTED", + "intent": "DOCGOV_CLAIM", + "branch": "NEW_INTENT_PREEMPT", + "natural_reply": "您已成功认领《当前受控文档》。系统已锁定您作为该文档的法定责任人,您可以开始在线就地修订正文或提交审核。", + "updated_context": { + "version": 5, + "snapshot_id": "ctx_1790178141007112841", + "assembled_at": "2026-09-23T15:42:21.007117071Z", + "user": { + "id": "u_sess-u11-b28c23d0d535", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": [ + "当前受控文档" + ] + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:42:21.007126811Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "DOCGOV_CLAIM", + "topic_anchor": "认领文档 doc_proj6579_bd_cdo_quote,然后提交评审", + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:42:21.014519502Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:42:21.007126811Z" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11-chat.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11-chat.json new file mode 100644 index 00000000..acbdfb43 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11-chat.json @@ -0,0 +1,353 @@ +{ + "msg": "认领当前文档,然后提交评审", + "status": 200, + "dur": 0.011644124984741211, + "body": { + "reply_text": "您已成功认领《当前受控文档》。系统已锁定您作为该文档的法定责任人,您可以开始在线就地修订正文或提交审核。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "认领当前文档,然后提交评审", + "top_intent": { + "intent": "DOCGOV_CLAIM", + "confidence": 0.94, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)" + }, + "candidates": [ + { + "intent": "DOCGOV_CLAIM", + "confidence": 0.94, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178024949951516", + "requires_clarifying": false, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.94, + "shadow_margin": 0.74, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "allowed", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "document.claim", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)", + "weight": 0.94 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_CLAIM" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "document.claim", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)", + "weight": 0.94 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_CLAIM" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.74, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.74 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "b66a0f987bd5a69ceacc0ba8f4bf4ea9abfafbbd64157d03bde56d9f3a14964b", + "combo_hint": "needs_clarify", + "segments": [ + { + "step_id": "1", + "text": "认领当前文档", + "normalized": "认领当前文档", + "span": { + "start": 0, + "end": 18 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "document.claim", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)", + "weight": 0.94 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_CLAIM" + } + }, + { + "step_id": "2", + "text": "提交评审", + "normalized": "提交评审", + "span": { + "start": 27, + "end": 39 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "unresolved_reference", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.2, + "legacy_intent": "CASUAL_CHAT" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "b66a0f987bd5a69ceacc0ba8f4bf4ea9abfafbbd64157d03bde56d9f3a14964b", + "combo_hint": "needs_clarify", + "legacy_plan_attached": false, + "legacy_dropped_write": true, + "counterfactual_auto_read": "would_clarify" + } + }, + "coordination_result": { + "status": "ACCEPTED", + "intent": "DOCGOV_CLAIM", + "branch": "NEW_INTENT_PREEMPT", + "natural_reply": "您已成功认领《当前受控文档》。系统已锁定您作为该文档的法定责任人,您可以开始在线就地修订正文或提交审核。", + "updated_context": { + "version": 4, + "snapshot_id": "ctx_1790178024949951516", + "assembled_at": "2026-09-23T15:40:24.949951976Z", + "user": { + "id": "u_sess_1790178024949775251", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": [ + "当前受控文档" + ] + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:40:24.949956296Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "DOCGOV_CLAIM", + "topic_anchor": "认领当前文档,然后提交评审", + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:40:24.95756255Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:40:24.949956296Z" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11-confirm.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11-confirm.json new file mode 100644 index 00000000..e1223db3 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11-confirm.json @@ -0,0 +1,33 @@ +{ + "msg": "认领文档 doc_proj6579_bd_cdo_quote,然后查一下文档状态", + "plan": { + "plan_id": "pln_480aeed973049bfaae8d14036157929f", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:13:08.498219931Z", + "steps": [ + { + "step_id": "stp_60a3e6934b554b15cbb5a56b66b0d076", + "action_key": "document.claim", + "status": "pending", + "execution_mode": "live", + "safe_summary": "认领文档 doc_proj6579_bd_cdo_quote" + }, + { + "step_id": "stp_f1aa155a4c6519ee539604334cda2549", + "action_key": "project.advisory", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下文档状态" + } + ], + "safe_summary": "认领文档 doc_proj6579_bd_cdo_quote,然后查一下文档状态" + }, + "status": 409, + "dur": 0.0033004283905029297, + "decided": { + "error_code": "PLAN_ACTION_VERSION_CONFLICT", + "message": "PLAN_ACTION_VERSION_CONFLICT" + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11b-a9fc.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11b-a9fc.json new file mode 100644 index 00000000..94b6a610 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11b-a9fc.json @@ -0,0 +1,420 @@ +{ + "msg": "认领文档 doc_proj6579_bd_cdo_quote,然后查一下文档状态", + "status": 200, + "dur": 0.8398933410644531, + "body": { + "reply_text": "您是想查询该文档当前由谁认领负责吗?我将为您检索认领状态,不会执行认领操作。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "认领文档 doc_proj6579_bd_cdo_quote,然后查一下文档状态", + "top_intent": { + "intent": "QUERY_USER_RIGHTS", + "confidence": 0.91, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "查询语气下的文档认领状态询问,不得路由为写操作 DOCGOV_CLAIM;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "clarification_question": "您是想查询该文档当前由谁认领负责吗?我将为您检索认领状态,不会执行认领操作。" + }, + "candidates": [ + { + "intent": "QUERY_USER_RIGHTS", + "confidence": 0.91, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "查询语气下的文档认领状态询问,不得路由为写操作 DOCGOV_CLAIM;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "clarification_question": "您是想查询该文档当前由谁认领负责吗?我将为您检索认领状态,不会执行认领操作。" + }, + { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "all" + }, + "reasoning": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178188492449782", + "requires_clarifying": true, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.91, + "shadow_margin": 0.010000000000000009, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "needs_clarification", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "permission.query", + "domain": "project", + "object": "user_permission", + "goal": "query", + "dialogue_act": "command", + "relation": "expectation_plus_new", + "evidence": [ + { + "kind": "rule_match", + "detail": "查询语气下的文档认领状态询问,不得路由为写操作 DOCGOV_CLAIM;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "weight": 0.91 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.91, + "margin": 0.010000000000000009, + "legacy_intent": "QUERY_USER_RIGHTS" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "permission.query", + "domain": "project", + "object": "user_permission", + "goal": "query", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "查询语气下的文档认领状态询问,不得路由为写操作 DOCGOV_CLAIM;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "weight": 0.91 + } + ], + "score": 0.91, + "margin": 0.010000000000000009, + "legacy_intent": "QUERY_USER_RIGHTS" + }, + { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)", + "weight": 0.9 + } + ], + "score": 0.9, + "margin": 0.010000000000000009, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.010000000000000009, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.010000000000000009 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "efa74ecfe9ed68870c86fba423e5a48fdc8b802b944db56a115228ffbc2bb3f8", + "combo_hint": "needs_confirm", + "segments": [ + { + "step_id": "1", + "text": "认领文档 doc_proj6579_bd_cdo_quote", + "normalized": "认领文档 doc_proj6579_bd_cdo_quote", + "span": { + "start": 0, + "end": 38 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "document.claim", + "domain": "document_gov", + "object": "controlled_document", + "goal": "mutate", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户下达认领文档编制责任人指令;注意:当前上下文 AvailableActions 未包含 DOCGOV_CLAIM(L2 将做权限/能力裁决)", + "weight": 0.94 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.94, + "margin": 0.74, + "legacy_intent": "DOCGOV_CLAIM" + } + }, + { + "step_id": "2", + "text": "查一下文档状态", + "normalized": "查一下文档状态", + "span": { + "start": 47, + "end": 68 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "efa74ecfe9ed68870c86fba423e5a48fdc8b802b944db56a115228ffbc2bb3f8", + "combo_hint": "needs_confirm", + "legacy_plan_attached": true, + "counterfactual_auto_read": "would_confirm" + } + }, + "coordination_result": { + "status": "CLARIFICATION_REQUIRED", + "intent": "QUERY_USER_RIGHTS", + "branch": "NEW_INTENT_PREEMPT", + "clarification_prompt": "您是想查询该文档当前由谁认领负责吗?我将为您检索认领状态,不会执行认领操作。", + "natural_reply": "您是想查询该文档当前由谁认领负责吗?我将为您检索认领状态,不会执行认领操作。", + "updated_context": { + "version": 5, + "snapshot_id": "ctx_1790178188492449782", + "assembled_at": "2026-09-23T15:43:08.492450562Z", + "user": { + "id": "u_sess-u11b-81c0103ce221", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:43:08.492453882Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "QUERY_USER_RIGHTS", + "topic_anchor": "认领文档 doc_proj6579_bd_cdo_quote,然后查一下文档状态", + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:43:08.499019917Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:43:08.492453882Z" + }, + "intent_plan": { + "plan_id": "pln_480aeed973049bfaae8d14036157929f", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:13:08.498219931Z", + "steps": [ + { + "step_id": "stp_60a3e6934b554b15cbb5a56b66b0d076", + "action_key": "document.claim", + "status": "pending", + "execution_mode": "live", + "safe_summary": "认领文档 doc_proj6579_bd_cdo_quote" + }, + { + "step_id": "stp_f1aa155a4c6519ee539604334cda2549", + "action_key": "project.advisory", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下文档状态" + } + ], + "safe_summary": "认领文档 doc_proj6579_bd_cdo_quote,然后查一下文档状态" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11r-0.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11r-0.json new file mode 100644 index 00000000..8b20ff5d --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u11r-0.json @@ -0,0 +1,579 @@ +{ + "msg": "提交评审 doc_proj6579_bd_cdo_quote,然后查一下文档状态", + "body": { + "reply_text": "您好!项目「医疗器械研发项目」当前处于【V0.1】阶段(成熟度 65/100)。\n核心研判:已完成「医疗器械研发项目」的初始事实沉淀,当前具备进入方案与法规初筛的基准条件\n\n⚠️ 关键风险预警:\n • 若客户宣称中包含实质性疗效或治疗作用,可能触发器械分类升档(如二类转三类),研发与注册周期将增加 6-12 个月\n • 时间与预算尚缺客户书面口径,直接对外报价存在后续争议风险\n\n您可以选择下一步动作:\n [1] 使用下方微信话术与客户负责人核实 3 个关键事实口径\n [2] 同意当前基准假设,直接触发 V0.5 阶段(方案成型与法规对齐)\n [3] 上传新的客户沟通纪要或补充材料进行局部刷新\n\n\n💡 说明:项目尚未启动过任何交付任务,以上研判基于行业基准假设。若希望沉淀更精准的第一版立项画像与沟通话术,您可以吩咐我「生成一版 V0.1 需求收集表(立项摸底)」,或直接补充器械类型、目标市场、预算等关键细节。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "提交评审 doc_proj6579_bd_cdo_quote,然后查一下文档状态", + "top_intent": { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "all" + }, + "reasoning": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)" + }, + "candidates": [ + { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "all" + }, + "reasoning": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178547991140764", + "requires_clarifying": false, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.9, + "shadow_margin": 0.7, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "allowed", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "expectation_plus_new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)", + "weight": 0.9 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.7, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.7 + }, + "intent_plan": { + "steps": [ + { + "step_id": "1", + "frame": { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "unresolved_reference", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.2, + "legacy_intent": "CASUAL_CHAT" + }, + "on_failure": "abort" + }, + { + "step_id": "2", + "frame": { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + "depends_on": [ + "1" + ], + "on_failure": "abort" + } + ], + "atomicity": "sequential", + "failure_mode": "stop_on_first_failure" + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "c31f1b2a9245c3c3257f39637c0e241f7d7445d531af194c59c947d3b55101c0", + "combo_hint": "needs_clarify", + "segments": [ + { + "step_id": "1", + "text": "提交评审 doc_proj6579_bd_cdo_quote", + "normalized": "提交评审 doc_proj6579_bd_cdo_quote", + "span": { + "start": 0, + "end": 38 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "unresolved_reference", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.2, + "legacy_intent": "CASUAL_CHAT" + } + }, + { + "step_id": "2", + "text": "查一下文档状态", + "normalized": "查一下文档状态", + "span": { + "start": 47, + "end": 68 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "c31f1b2a9245c3c3257f39637c0e241f7d7445d531af194c59c947d3b55101c0", + "combo_hint": "needs_clarify", + "legacy_plan_attached": true, + "counterfactual_auto_read": "would_clarify" + } + }, + "coordination_result": { + "status": "ACCEPTED", + "intent": "QUERY_PROGRESS", + "branch": "NEW_INTENT_PREEMPT", + "natural_reply": "您好!项目「医疗器械研发项目」当前处于【V0.1】阶段(成熟度 65/100)。\n核心研判:已完成「医疗器械研发项目」的初始事实沉淀,当前具备进入方案与法规初筛的基准条件\n\n⚠️ 关键风险预警:\n • 若客户宣称中包含实质性疗效或治疗作用,可能触发器械分类升档(如二类转三类),研发与注册周期将增加 6-12 个月\n • 时间与预算尚缺客户书面口径,直接对外报价存在后续争议风险\n\n您可以选择下一步动作:\n [1] 使用下方微信话术与客户负责人核实 3 个关键事实口径\n [2] 同意当前基准假设,直接触发 V0.5 阶段(方案成型与法规对齐)\n [3] 上传新的客户沟通纪要或补充材料进行局部刷新\n\n\n💡 说明:项目尚未启动过任何交付任务,以上研判基于行业基准假设。若希望沉淀更精准的第一版立项画像与沟通话术,您可以吩咐我「生成一版 V0.1 需求收集表(立项摸底)」,或直接补充器械类型、目标市场、预算等关键细节。", + "advisor_brief": { + "maturity_score": 65, + "maturity_level": "V0.1", + "maturity_headline": "已完成「医疗器械研发项目」的初始事实沉淀,当前具备进入方案与法规初筛的基准条件", + "baseline_assumptions": [ + "硬件与模具研发暂按国内 ISO 13485 标准 CDMO 体系工程规范核算", + "临床评价路径暂按免临床评价/同品种对比做基准成本估算", + "软件若涉及 AI 或算法质控,暂假定数据不出域、私有化部署" + ], + "preemptive_risks": [ + "若客户宣称中包含实质性疗效或治疗作用,可能触发器械分类升档(如二类转三类),研发与注册周期将增加 6-12 个月", + "时间与预算尚缺客户书面口径,直接对外报价存在后续争议风险" + ], + "next_best_actions": [ + "使用下方微信话术与客户负责人核实 3 个关键事实口径", + "同意当前基准假设,直接触发 V0.5 阶段(方案成型与法规对齐)", + "上传新的客户沟通纪要或补充材料进行局部刷新" + ], + "communication_kit": "【建议发送给 水木东方客户 负责人的微信沟通草稿】\n----------------------------------------\n您好!关于「医疗器械研发项目」的立项需求,我们小队已基于您此前提供的资料做了梳理,搭建了一版立项需求与方案底表。\n\n为了方便我们后续为您更精准地测算开发周期和成本,想向您请教并确认几个核心细节:\n1. 目标注册区域是否锁定中国 NMPA;\n2. 期望的样机测试与立项交付节点;\n3. 是否有指定采购的元器件品牌或特定工艺要求。\n您可以随时语音或文字简单告知,我们随时跟进更新!\n----------------------------------------", + "recommended_cases": [ + { + "doc_id": "doc_proj6424_intake", + "project_name": "rdev-s0-20260917-085054", + "task_key": "intake", + "artifact_title": "用户初始需求收集表", + "section_title": "## 自检清单(负责人终审执行)", + "summary_snippet": "- [x] 模板每个章节均已写完,无残留括号提示\n- [x] 关键数字/路径/参数均已标注来源;无数字时标注\"材料未提供\"或\"待确认\"\n- [x] 所有「待确认」项已在文末待确认清单中汇总(阻塞/非阻塞分开)\n- [x] 无未标注的推测(分析判断类均标注\"分析判断,无直接条文依据\")\n- [x] 专员已标注的出处均已保留\n- [x] 未从材料中抽取任何未提供的参数\n- [x] 正文各节均按四段式(...", + "similarity_score": 0.4253426320952963, + "approved_at": "2026-09-17T08:54:34.597659661Z" + }, + { + "doc_id": "doc_proj6424_intake", + "project_name": "rdev-s0-20260917-085054", + "task_key": "intake", + "artifact_title": "用户初始需求收集表", + "section_title": "## 阻塞信息(字段快照)", + "summary_snippet": "| 字段 | 值 | 来源 |\n|---|---|---|\n| 客户名称 | 水木东方测试客户 | project.md / blackboard.json |\n| 产品类型/器械分类 | 二类有源医疗器械(神经刺激) | project.md / blackboard.json |\n| 预期用途 | 无创神经电刺激辅助改善目标症状 | project.md / blackboard.json |...", + "key_regulations": [ + "NMPA" + ], + "similarity_score": 0.41212700569251326, + "approved_at": "2026-09-17T08:54:34.597659661Z" + } + ] + }, + "updated_context": { + "version": 7, + "snapshot_id": "ctx_1790178547991140764", + "assembled_at": "2026-09-23T15:49:07.991143634Z", + "user": { + "id": "u_sess-u11r-da90ad9a", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:49:09.642699115Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "QUERY_PROGRESS", + "topic_anchor": "提交评审 doc_proj6579_bd_cdo_quote,然后查一下文档状态", + "collected_slots": { + "query_topic": "all" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:49:08.000893464Z" + } + }, + "next_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:49:09.642699115Z" + }, + "reply_source": "template" + }, + "advisor_brief": { + "maturity_score": 65, + "maturity_level": "V0.1", + "maturity_headline": "已完成「医疗器械研发项目」的初始事实沉淀,当前具备进入方案与法规初筛的基准条件", + "baseline_assumptions": [ + "硬件与模具研发暂按国内 ISO 13485 标准 CDMO 体系工程规范核算", + "临床评价路径暂按免临床评价/同品种对比做基准成本估算", + "软件若涉及 AI 或算法质控,暂假定数据不出域、私有化部署" + ], + "preemptive_risks": [ + "若客户宣称中包含实质性疗效或治疗作用,可能触发器械分类升档(如二类转三类),研发与注册周期将增加 6-12 个月", + "时间与预算尚缺客户书面口径,直接对外报价存在后续争议风险" + ], + "next_best_actions": [ + "使用下方微信话术与客户负责人核实 3 个关键事实口径", + "同意当前基准假设,直接触发 V0.5 阶段(方案成型与法规对齐)", + "上传新的客户沟通纪要或补充材料进行局部刷新" + ], + "communication_kit": "【建议发送给 水木东方客户 负责人的微信沟通草稿】\n----------------------------------------\n您好!关于「医疗器械研发项目」的立项需求,我们小队已基于您此前提供的资料做了梳理,搭建了一版立项需求与方案底表。\n\n为了方便我们后续为您更精准地测算开发周期和成本,想向您请教并确认几个核心细节:\n1. 目标注册区域是否锁定中国 NMPA;\n2. 期望的样机测试与立项交付节点;\n3. 是否有指定采购的元器件品牌或特定工艺要求。\n您可以随时语音或文字简单告知,我们随时跟进更新!\n----------------------------------------", + "recommended_cases": [ + { + "doc_id": "doc_proj6424_intake", + "project_name": "rdev-s0-20260917-085054", + "task_key": "intake", + "artifact_title": "用户初始需求收集表", + "section_title": "## 自检清单(负责人终审执行)", + "summary_snippet": "- [x] 模板每个章节均已写完,无残留括号提示\n- [x] 关键数字/路径/参数均已标注来源;无数字时标注\"材料未提供\"或\"待确认\"\n- [x] 所有「待确认」项已在文末待确认清单中汇总(阻塞/非阻塞分开)\n- [x] 无未标注的推测(分析判断类均标注\"分析判断,无直接条文依据\")\n- [x] 专员已标注的出处均已保留\n- [x] 未从材料中抽取任何未提供的参数\n- [x] 正文各节均按四段式(...", + "similarity_score": 0.4253426320952963, + "approved_at": "2026-09-17T08:54:34.597659661Z" + }, + { + "doc_id": "doc_proj6424_intake", + "project_name": "rdev-s0-20260917-085054", + "task_key": "intake", + "artifact_title": "用户初始需求收集表", + "section_title": "## 阻塞信息(字段快照)", + "summary_snippet": "| 字段 | 值 | 来源 |\n|---|---|---|\n| 客户名称 | 水木东方测试客户 | project.md / blackboard.json |\n| 产品类型/器械分类 | 二类有源医疗器械(神经刺激) | project.md / blackboard.json |\n| 预期用途 | 无创神经电刺激辅助改善目标症状 | project.md / blackboard.json |...", + "key_regulations": [ + "NMPA" + ], + "similarity_score": 0.41212700569251326, + "approved_at": "2026-09-17T08:54:34.597659661Z" + } + ] + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:49:09.642699115Z" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u12-chat.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u12-chat.json new file mode 100644 index 00000000..6fa17059 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u12-chat.json @@ -0,0 +1,354 @@ +{ + "msg": "启动项目工作流,然后恢复上次运行", + "status": 200, + "dur": 1.3880269527435303, + "body": { + "reply_text": "请说明要运行哪个工作流:产品经理(product_manager)还是测试经理(test_manager)?", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "启动项目工作流,然后恢复上次运行", + "top_intent": { + "intent": "TRIGGER_WORKFLOW", + "confidence": 0.86, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "用户请求运行工作流但未指定目标;注意:当前上下文 AvailableActions 未包含 TRIGGER_WORKFLOW(L2 将做权限/能力裁决)", + "clarification_question": "请说明要运行哪个工作流:产品经理(product_manager)还是测试经理(test_manager)?" + }, + "candidates": [ + { + "intent": "TRIGGER_WORKFLOW", + "confidence": 0.86, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "用户请求运行工作流但未指定目标;注意:当前上下文 AvailableActions 未包含 TRIGGER_WORKFLOW(L2 将做权限/能力裁决)", + "clarification_question": "请说明要运行哪个工作流:产品经理(product_manager)还是测试经理(test_manager)?" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178024961396896", + "requires_clarifying": true, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.86, + "shadow_margin": 0.6599999999999999, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "needs_clarification", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "workflow.run", + "domain": "project_workflow", + "object": "workflow_run", + "goal": "control", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户请求运行工作流但未指定目标;注意:当前上下文 AvailableActions 未包含 TRIGGER_WORKFLOW(L2 将做权限/能力裁决)", + "weight": 0.86 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.86, + "margin": 0.6599999999999999, + "legacy_intent": "TRIGGER_WORKFLOW" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "workflow.run", + "domain": "project_workflow", + "object": "workflow_run", + "goal": "control", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户请求运行工作流但未指定目标;注意:当前上下文 AvailableActions 未包含 TRIGGER_WORKFLOW(L2 将做权限/能力裁决)", + "weight": 0.86 + } + ], + "score": 0.86, + "margin": 0.6599999999999999, + "legacy_intent": "TRIGGER_WORKFLOW" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.6599999999999999, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.6599999999999999 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "2b7c8cefb5407f70a064997861197a1ade8cd882f9bb94e97e87a98518e87c7b", + "combo_hint": "needs_clarify", + "segments": [ + { + "step_id": "1", + "text": "启动项目工作流", + "normalized": "启动项目工作流", + "span": { + "start": 0, + "end": 21 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "workflow.run", + "domain": "project_workflow", + "object": "workflow_run", + "goal": "control", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户请求运行工作流但未指定目标;注意:当前上下文 AvailableActions 未包含 TRIGGER_WORKFLOW(L2 将做权限/能力裁决)", + "weight": 0.86 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.86, + "margin": 0.6599999999999999, + "legacy_intent": "TRIGGER_WORKFLOW" + } + }, + { + "step_id": "2", + "text": "恢复上次运行", + "normalized": "恢复上次运行", + "span": { + "start": 30, + "end": 48 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "unresolved_reference", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.2, + "legacy_intent": "CASUAL_CHAT" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "2b7c8cefb5407f70a064997861197a1ade8cd882f9bb94e97e87a98518e87c7b", + "combo_hint": "needs_clarify", + "legacy_plan_attached": false, + "legacy_dropped_write": true, + "counterfactual_auto_read": "would_clarify" + } + }, + "coordination_result": { + "status": "CLARIFICATION_REQUIRED", + "intent": "TRIGGER_WORKFLOW", + "branch": "NEW_INTENT_PREEMPT", + "clarification_prompt": "请说明要运行哪个工作流:产品经理(product_manager)还是测试经理(test_manager)?", + "natural_reply": "请说明要运行哪个工作流:产品经理(product_manager)还是测试经理(test_manager)?", + "updated_context": { + "version": 4, + "snapshot_id": "ctx_1790178024961396896", + "assembled_at": "2026-09-23T15:40:24.961397626Z", + "user": { + "id": "u_sess_1790178024961153863", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:40:24.961402236Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "TRIGGER_WORKFLOW", + "topic_anchor": "启动项目工作流,然后恢复上次运行", + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:40:24.968158775Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:40:24.961402236Z" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u12-confirm.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u12-confirm.json new file mode 100644 index 00000000..6d986888 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u12-confirm.json @@ -0,0 +1,80 @@ +{ + "plan": { + "plan_id": "pln_026758c0f2c641e9ff3a97854bd9a27d", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:13:04.808969963Z", + "steps": [ + { + "step_id": "stp_56bc675702d0d36de7767dca30ad4db4", + "action_key": "workflow.run", + "status": "pending", + "execution_mode": "live", + "safe_summary": "运行产品经理工作流" + }, + { + "step_id": "stp_70d1633c341b101822f884cf55b369b4", + "action_key": "run.status.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下运行状态" + } + ], + "safe_summary": "运行产品经理工作流,然后查一下运行状态" + }, + "got": { + "plan": { + "plan_id": "pln_026758c0f2c641e9ff3a97854bd9a27d", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:13:04.808969Z", + "steps": [ + { + "step_id": "stp_56bc675702d0d36de7767dca30ad4db4", + "action_key": "workflow.run", + "status": "pending", + "execution_mode": "live", + "safe_summary": "运行产品经理工作流" + }, + { + "step_id": "stp_70d1633c341b101822f884cf55b369b4", + "action_key": "run.status.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下运行状态" + } + ], + "safe_summary": "运行产品经理工作流,然后查一下运行状态" + } + }, + "status": 200, + "dur": 2.156203269958496, + "decided": { + "plan": { + "plan_id": "pln_026758c0f2c641e9ff3a97854bd9a27d", + "revision": 2, + "status": "executing", + "execution_mode": "live", + "expires_at": "2026-09-23T16:13:04.808969Z", + "steps": [ + { + "step_id": "stp_56bc675702d0d36de7767dca30ad4db4", + "action_key": "workflow.run", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "workflow.run accepted" + }, + { + "step_id": "stp_70d1633c341b101822f884cf55b369b4", + "action_key": "run.status.query", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "run.status.query authorized (scope=39730de22b09)" + } + ], + "safe_summary": "运行产品经理工作流,然后查一下运行状态" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u12-create.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u12-create.json new file mode 100644 index 00000000..ccececdb --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u12-create.json @@ -0,0 +1,461 @@ +{ + "sess": "sess-u12b-dd17a4f865d7", + "status": 200, + "dur": 1.5300931930541992, + "body": { + "reply_text": "检测到您的表述可能有两种理解:查询「RUN_STATUS_QUERY」相关信息,或执行「TRIGGER_WORKFLOW」写操作。请明确说明您希望查询还是执行。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "运行产品经理工作流,然后查一下运行状态", + "top_intent": { + "intent": "TRIGGER_WORKFLOW", + "confidence": 0.91, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "target_workflow": "product_manager" + }, + "reasoning": "写/读候选冲突:top=TRIGGER_WORKFLOW(0.91) vs second=RUN_STATUS_QUERY(0.89) margin=0.02", + "clarification_question": "检测到您的表述可能有两种理解:查询「RUN_STATUS_QUERY」相关信息,或执行「TRIGGER_WORKFLOW」写操作。请明确说明您希望查询还是执行。" + }, + "candidates": [ + { + "intent": "TRIGGER_WORKFLOW", + "confidence": 0.91, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "target_workflow": "product_manager" + }, + "reasoning": "写/读候选冲突:top=TRIGGER_WORKFLOW(0.91) vs second=RUN_STATUS_QUERY(0.89) margin=0.02", + "clarification_question": "检测到您的表述可能有两种理解:查询「RUN_STATUS_QUERY」相关信息,或执行「TRIGGER_WORKFLOW」写操作。请明确说明您希望查询还是执行。" + }, + { + "intent": "RUN_STATUS_QUERY", + "confidence": 0.89, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "run_status", + "run_action": "status" + }, + "reasoning": "用户查询长任务/工作流运行状态(只读)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178184801985070", + "requires_clarifying": true, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.91, + "shadow_margin": 0.020000000000000018, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "needs_clarification", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "workflow.run", + "domain": "project_workflow", + "object": "workflow_run", + "goal": "control", + "dialogue_act": "command", + "slots": { + "target_workflow": { + "value": "product_manager", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=TRIGGER_WORKFLOW(0.91) vs second=RUN_STATUS_QUERY(0.89) margin=0.02", + "weight": 0.91 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.91, + "margin": 0.020000000000000018, + "legacy_intent": "TRIGGER_WORKFLOW" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "workflow.run", + "domain": "project_workflow", + "object": "workflow_run", + "goal": "control", + "dialogue_act": "command", + "slots": { + "target_workflow": { + "value": "product_manager", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=TRIGGER_WORKFLOW(0.91) vs second=RUN_STATUS_QUERY(0.89) margin=0.02", + "weight": 0.91 + } + ], + "score": 0.91, + "margin": 0.020000000000000018, + "legacy_intent": "TRIGGER_WORKFLOW" + }, + { + "version": "v2.0", + "action_key": "run.status.query", + "domain": "project", + "object": "workflow_run", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "run_status", + "source": "rule" + }, + "run_action": { + "value": "status", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询长任务/工作流运行状态(只读)", + "weight": 0.89 + } + ], + "score": 0.89, + "margin": 0.020000000000000018, + "legacy_intent": "RUN_STATUS_QUERY" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.020000000000000018, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.020000000000000018, + "conflicts": [ + { + "kind": "write_vs_query", + "top_action": "TRIGGER_WORKFLOW", + "second_action": "RUN_STATUS_QUERY", + "margin": 0.020000000000000018 + } + ] + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "b9c5777d4561bf6542d0981b78ca45272bdbf72350214673cce60c3a0921fade", + "combo_hint": "needs_confirm", + "segments": [ + { + "step_id": "1", + "text": "运行产品经理工作流", + "normalized": "运行产品经理工作流", + "span": { + "start": 0, + "end": 27 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "workflow.run", + "domain": "project_workflow", + "object": "workflow_run", + "goal": "control", + "dialogue_act": "command", + "slots": { + "target_workflow": { + "value": "product_manager", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户请求运行/启动项目工作流;注意:当前上下文 AvailableActions 未包含 TRIGGER_WORKFLOW:product_manager(L2 将做权限/能力裁决)", + "weight": 0.91 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.91, + "margin": 0.71, + "legacy_intent": "TRIGGER_WORKFLOW" + } + }, + { + "step_id": "2", + "text": "查一下运行状态", + "normalized": "查一下运行状态", + "span": { + "start": 36, + "end": 57 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "run.status.query", + "domain": "project", + "object": "workflow_run", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "run_status", + "source": "rule" + }, + "run_action": { + "value": "status", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询长任务/工作流运行状态(只读)", + "weight": 0.89 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.89, + "margin": 0.69, + "legacy_intent": "RUN_STATUS_QUERY" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "b9c5777d4561bf6542d0981b78ca45272bdbf72350214673cce60c3a0921fade", + "combo_hint": "needs_confirm", + "legacy_plan_attached": false, + "legacy_dropped_write": true, + "counterfactual_auto_read": "would_confirm" + } + }, + "coordination_result": { + "status": "CLARIFICATION_REQUIRED", + "intent": "TRIGGER_WORKFLOW", + "branch": "NEW_INTENT_PREEMPT", + "clarification_prompt": "检测到您的表述可能有两种理解:查询「RUN_STATUS_QUERY」相关信息,或执行「TRIGGER_WORKFLOW」写操作。请明确说明您希望查询还是执行。", + "natural_reply": "检测到您的表述可能有两种理解:查询「RUN_STATUS_QUERY」相关信息,或执行「TRIGGER_WORKFLOW」写操作。请明确说明您希望查询还是执行。", + "updated_context": { + "version": 5, + "snapshot_id": "ctx_1790178184801985070", + "assembled_at": "2026-09-23T15:43:04.80199223Z", + "user": { + "id": "u_sess-u12b-dd17a4f865d7", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:43:04.802000369Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "TRIGGER_WORKFLOW", + "topic_anchor": "运行产品经理工作流,然后查一下运行状态", + "collected_slots": { + "target_workflow": "product_manager" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:43:04.809854176Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:43:04.802000369Z" + }, + "intent_plan": { + "plan_id": "pln_026758c0f2c641e9ff3a97854bd9a27d", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:13:04.808969963Z", + "steps": [ + { + "step_id": "stp_56bc675702d0d36de7767dca30ad4db4", + "action_key": "workflow.run", + "status": "pending", + "execution_mode": "live", + "safe_summary": "运行产品经理工作流" + }, + { + "step_id": "stp_70d1633c341b101822f884cf55b369b4", + "action_key": "run.status.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下运行状态" + } + ], + "safe_summary": "运行产品经理工作流,然后查一下运行状态" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u12-ff82.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u12-ff82.json new file mode 100644 index 00000000..9b54a433 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u12-ff82.json @@ -0,0 +1,461 @@ +{ + "msg": "运行产品经理工作流,然后查一下运行状态", + "status": 200, + "dur": 0.816709041595459, + "body": { + "reply_text": "检测到您的表述可能有两种理解:查询「RUN_STATUS_QUERY」相关信息,或执行「TRIGGER_WORKFLOW」写操作。请明确说明您希望查询还是执行。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "运行产品经理工作流,然后查一下运行状态", + "top_intent": { + "intent": "TRIGGER_WORKFLOW", + "confidence": 0.91, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "target_workflow": "product_manager" + }, + "reasoning": "写/读候选冲突:top=TRIGGER_WORKFLOW(0.91) vs second=RUN_STATUS_QUERY(0.89) margin=0.02", + "clarification_question": "检测到您的表述可能有两种理解:查询「RUN_STATUS_QUERY」相关信息,或执行「TRIGGER_WORKFLOW」写操作。请明确说明您希望查询还是执行。" + }, + "candidates": [ + { + "intent": "TRIGGER_WORKFLOW", + "confidence": 0.91, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "target_workflow": "product_manager" + }, + "reasoning": "写/读候选冲突:top=TRIGGER_WORKFLOW(0.91) vs second=RUN_STATUS_QUERY(0.89) margin=0.02", + "clarification_question": "检测到您的表述可能有两种理解:查询「RUN_STATUS_QUERY」相关信息,或执行「TRIGGER_WORKFLOW」写操作。请明确说明您希望查询还是执行。" + }, + { + "intent": "RUN_STATUS_QUERY", + "confidence": 0.89, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "run_status", + "run_action": "status" + }, + "reasoning": "用户查询长任务/工作流运行状态(只读)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178148919048376", + "requires_clarifying": true, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.91, + "shadow_margin": 0.020000000000000018, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "needs_clarification", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "workflow.run", + "domain": "project_workflow", + "object": "workflow_run", + "goal": "control", + "dialogue_act": "command", + "slots": { + "target_workflow": { + "value": "product_manager", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=TRIGGER_WORKFLOW(0.91) vs second=RUN_STATUS_QUERY(0.89) margin=0.02", + "weight": 0.91 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.91, + "margin": 0.020000000000000018, + "legacy_intent": "TRIGGER_WORKFLOW" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "workflow.run", + "domain": "project_workflow", + "object": "workflow_run", + "goal": "control", + "dialogue_act": "command", + "slots": { + "target_workflow": { + "value": "product_manager", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "写/读候选冲突:top=TRIGGER_WORKFLOW(0.91) vs second=RUN_STATUS_QUERY(0.89) margin=0.02", + "weight": 0.91 + } + ], + "score": 0.91, + "margin": 0.020000000000000018, + "legacy_intent": "TRIGGER_WORKFLOW" + }, + { + "version": "v2.0", + "action_key": "run.status.query", + "domain": "project", + "object": "workflow_run", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "run_status", + "source": "rule" + }, + "run_action": { + "value": "status", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询长任务/工作流运行状态(只读)", + "weight": 0.89 + } + ], + "score": 0.89, + "margin": 0.020000000000000018, + "legacy_intent": "RUN_STATUS_QUERY" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.020000000000000018, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.020000000000000018, + "conflicts": [ + { + "kind": "write_vs_query", + "top_action": "TRIGGER_WORKFLOW", + "second_action": "RUN_STATUS_QUERY", + "margin": 0.020000000000000018 + } + ] + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "b9c5777d4561bf6542d0981b78ca45272bdbf72350214673cce60c3a0921fade", + "combo_hint": "needs_confirm", + "segments": [ + { + "step_id": "1", + "text": "运行产品经理工作流", + "normalized": "运行产品经理工作流", + "span": { + "start": 0, + "end": 27 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "workflow.run", + "domain": "project_workflow", + "object": "workflow_run", + "goal": "control", + "dialogue_act": "command", + "slots": { + "target_workflow": { + "value": "product_manager", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户请求运行/启动项目工作流;注意:当前上下文 AvailableActions 未包含 TRIGGER_WORKFLOW:product_manager(L2 将做权限/能力裁决)", + "weight": 0.91 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.91, + "margin": 0.71, + "legacy_intent": "TRIGGER_WORKFLOW" + } + }, + { + "step_id": "2", + "text": "查一下运行状态", + "normalized": "查一下运行状态", + "span": { + "start": 36, + "end": 57 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "run.status.query", + "domain": "project", + "object": "workflow_run", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "run_status", + "source": "rule" + }, + "run_action": { + "value": "status", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询长任务/工作流运行状态(只读)", + "weight": 0.89 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.89, + "margin": 0.69, + "legacy_intent": "RUN_STATUS_QUERY" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "b9c5777d4561bf6542d0981b78ca45272bdbf72350214673cce60c3a0921fade", + "combo_hint": "needs_confirm", + "legacy_plan_attached": false, + "legacy_dropped_write": true, + "counterfactual_auto_read": "would_confirm" + } + }, + "coordination_result": { + "status": "CLARIFICATION_REQUIRED", + "intent": "TRIGGER_WORKFLOW", + "branch": "NEW_INTENT_PREEMPT", + "clarification_prompt": "检测到您的表述可能有两种理解:查询「RUN_STATUS_QUERY」相关信息,或执行「TRIGGER_WORKFLOW」写操作。请明确说明您希望查询还是执行。", + "natural_reply": "检测到您的表述可能有两种理解:查询「RUN_STATUS_QUERY」相关信息,或执行「TRIGGER_WORKFLOW」写操作。请明确说明您希望查询还是执行。", + "updated_context": { + "version": 5, + "snapshot_id": "ctx_1790178148919048376", + "assembled_at": "2026-09-23T15:42:28.919049226Z", + "user": { + "id": "u_sess-u12-b77d50d90d3e", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:42:28.919051515Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "TRIGGER_WORKFLOW", + "topic_anchor": "运行产品经理工作流,然后查一下运行状态", + "collected_slots": { + "target_workflow": "product_manager" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:42:28.927129986Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:42:28.919051515Z" + }, + "intent_plan": { + "plan_id": "pln_fa9110114a2ea921ef90884233dbf76b", + "revision": 1, + "status": "awaiting_confirmation", + "execution_mode": "live", + "expires_at": "2026-09-23T16:12:28.925756476Z", + "steps": [ + { + "step_id": "stp_35e67034ed1cb1182e9b99a530bda26a", + "action_key": "workflow.run", + "status": "pending", + "execution_mode": "live", + "safe_summary": "运行产品经理工作流" + }, + { + "step_id": "stp_6e8fa7b9fd792988fa6e8b9fd8550fe9", + "action_key": "run.status.query", + "status": "pending", + "execution_mode": "live", + "safe_summary": "查一下运行状态" + } + ], + "safe_summary": "运行产品经理工作流,然后查一下运行状态" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-amb-0.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-amb-0.json new file mode 100644 index 00000000..34393cd3 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-amb-0.json @@ -0,0 +1,332 @@ +{ + "msg": "法规和案例都帮我看看顺便讲讲权限怎么开", + "status": 200, + "dur": 8.093623876571655, + "body": { + "reply_text": "您好,用户!您在项目「医疗器械研发项目」中的法定受控职责如下:\n\n• **系统/项目身份**:用户 (角色代码: composer)\n\n根据 ISO 13485 质量管理规范,您的所有审核、批注与批准行为均将记入不可篡改的系统审计日志。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "法规和案例都帮我看看顺便讲讲权限怎么开", + "top_intent": { + "intent": "QUERY_USER_RIGHTS", + "confidence": 0.95, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "user_rights" + }, + "reasoning": "用户查询自身在项目及受控文档中的法定职责与操作权限;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)" + }, + "candidates": [ + { + "intent": "QUERY_USER_RIGHTS", + "confidence": 0.95, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "user_rights" + }, + "reasoning": "用户查询自身在项目及受控文档中的法定职责与操作权限;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178003084295042", + "requires_clarifying": false, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.95, + "shadow_margin": 0.75, + "shadow_dialogue_act": "ask", + "shadow_decision_hint": "allowed", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "permission.query", + "domain": "project", + "object": "user_permission", + "goal": "query", + "dialogue_act": "ask", + "slots": { + "query_topic": { + "value": "user_rights", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询自身在项目及受控文档中的法定职责与操作权限;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "weight": 0.95 + }, + { + "kind": "dialogue_act", + "detail": "ask", + "weight": 0.1 + } + ], + "score": 0.95, + "margin": 0.75, + "legacy_intent": "QUERY_USER_RIGHTS" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "permission.query", + "domain": "project", + "object": "user_permission", + "goal": "query", + "dialogue_act": "ask", + "slots": { + "query_topic": { + "value": "user_rights", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询自身在项目及受控文档中的法定职责与操作权限;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "weight": 0.95 + } + ], + "score": 0.95, + "margin": 0.75, + "legacy_intent": "QUERY_USER_RIGHTS" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "ask", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.75, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.75 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "963e534473018c6ed77ac416bffcff374dcef049339d69a32425ee1fcc793706", + "combo_hint": "single", + "segments": [ + { + "step_id": "1", + "text": "法规和案例都帮我看看顺便讲讲权限怎么开", + "normalized": "法规和案例都帮我看看顺便讲讲权限怎么开", + "span": { + "start": 0, + "end": 57 + }, + "evidence": "single", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "permission.query", + "domain": "project", + "object": "user_permission", + "goal": "query", + "dialogue_act": "ask", + "slots": { + "query_topic": { + "value": "user_rights", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询自身在项目及受控文档中的法定职责与操作权限;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "weight": 0.95 + }, + { + "kind": "dialogue_act", + "detail": "ask", + "weight": 0.1 + } + ], + "score": 0.95, + "margin": 0.75, + "legacy_intent": "QUERY_USER_RIGHTS" + } + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "single", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 1, + "digest": "963e534473018c6ed77ac416bffcff374dcef049339d69a32425ee1fcc793706", + "combo_hint": "single", + "legacy_plan_attached": false, + "counterfactual_auto_read": "would_passthrough" + } + }, + "coordination_result": { + "status": "ACCEPTED", + "intent": "QUERY_USER_RIGHTS", + "branch": "NEW_INTENT_PREEMPT", + "natural_reply": "您好,用户!您在项目「医疗器械研发项目」中的法定受控职责如下:\n\n• **系统/项目身份**:用户 (角色代码: composer)\n\n根据 ISO 13485 质量管理规范,您的所有审核、批注与批准行为均将记入不可篡改的系统审计日志。", + "updated_context": { + "version": 4, + "snapshot_id": "ctx_1790178003084295042", + "assembled_at": "2026-09-23T15:40:03.084296942Z", + "user": { + "id": "u_sess_1790178003084017820", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:40:03.084304532Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "QUERY_USER_RIGHTS", + "topic_anchor": "法规和案例都帮我看看顺便讲讲权限怎么开", + "collected_slots": { + "query_topic": "user_rights" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:40:11.173718964Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:40:03.084304532Z" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-amb-1.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-amb-1.json new file mode 100644 index 00000000..f2402b53 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-amb-1.json @@ -0,0 +1,438 @@ +{ + "msg": "一边查法规一边补充项目背景资料:预算约500万", + "status": 200, + "dur": 8.836433172225952, + "body": { + "reply_text": "已收到并为您记录最新信息:「budget」已更新为「约500万」。\n这些事实已沉淀至项目黑板,后续论证与核价将直接吸收这些设定。\n\n针对「医疗器械研发项目」,我为您梳理了接下来的推进选项:\n[1] 进入 V0.5 方案成型与法规对齐 (推荐,可直接回复“好”或“1”)\n[2] 补充或微调事实信息 \n[3] 查阅当前立项成熟度与对外沟通建议 \n", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "一边查法规一边补充项目背景资料:预算约500万", + "top_intent": { + "intent": "SUPPLEMENT_INFO", + "confidence": 0.88, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "budget": "约500万", + "fact_key": "budget", + "fact_value": "约500万", + "supplement_action": "add", + "supplement_doc": "一边查法规一边补充项目背景资料:预算约500万" + }, + "reasoning": "用户输入中包含参数变更或新材料事实补充" + }, + "candidates": [ + { + "intent": "SUPPLEMENT_INFO", + "confidence": 0.88, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "budget": "约500万", + "fact_key": "budget", + "fact_value": "约500万", + "supplement_action": "add", + "supplement_doc": "一边查法规一边补充项目背景资料:预算约500万" + }, + "reasoning": "用户输入中包含参数变更或新材料事实补充" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178011178004837", + "requires_clarifying": false, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.88, + "shadow_margin": 0.6799999999999999, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "allowed", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "project.fact.supplement", + "domain": "project", + "object": "project_fact", + "goal": "mutate", + "dialogue_act": "command", + "slots": { + "budget": { + "value": "约500万", + "source": "rule" + }, + "fact_key": { + "value": "budget", + "source": "rule" + }, + "fact_value": { + "value": "约500万", + "source": "rule" + }, + "supplement_action": { + "value": "add", + "source": "rule" + }, + "supplement_doc": { + "value": "一边查法规一边补充项目背景资料:预算约500万", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户输入中包含参数变更或新材料事实补充", + "weight": 0.88 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.88, + "margin": 0.6799999999999999, + "legacy_intent": "SUPPLEMENT_INFO", + "subtype": "add" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "project.fact.supplement", + "domain": "project", + "object": "project_fact", + "goal": "mutate", + "dialogue_act": "command", + "slots": { + "budget": { + "value": "约500万", + "source": "rule" + }, + "fact_key": { + "value": "budget", + "source": "rule" + }, + "fact_value": { + "value": "约500万", + "source": "rule" + }, + "supplement_action": { + "value": "add", + "source": "rule" + }, + "supplement_doc": { + "value": "一边查法规一边补充项目背景资料:预算约500万", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户输入中包含参数变更或新材料事实补充", + "weight": 0.88 + } + ], + "score": 0.88, + "margin": 0.6799999999999999, + "legacy_intent": "SUPPLEMENT_INFO", + "subtype": "add" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.6799999999999999, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.6799999999999999 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "4554fbf5102dd2e3f2af08bf61a3b2ba8dbf375e88210b0d11b432c3e9ffb918", + "combo_hint": "single", + "segments": [ + { + "step_id": "1", + "text": "一边查法规一边补充项目背景资料:预算约500万", + "normalized": "一边查法规一边补充项目背景资料:预算约500万", + "span": { + "start": 0, + "end": 63 + }, + "evidence": "single", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "project.fact.supplement", + "domain": "project", + "object": "project_fact", + "goal": "mutate", + "dialogue_act": "command", + "slots": { + "budget": { + "value": "约500万", + "source": "rule" + }, + "fact_key": { + "value": "budget", + "source": "rule" + }, + "fact_value": { + "value": "约500万", + "source": "rule" + }, + "supplement_action": { + "value": "add", + "source": "rule" + }, + "supplement_doc": { + "value": "一边查法规一边补充项目背景资料:预算约500万", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户输入中包含参数变更或新材料事实补充", + "weight": 0.88 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.88, + "margin": 0.6799999999999999, + "legacy_intent": "SUPPLEMENT_INFO", + "subtype": "add" + } + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "single", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 1, + "digest": "4554fbf5102dd2e3f2af08bf61a3b2ba8dbf375e88210b0d11b432c3e9ffb918", + "combo_hint": "single", + "legacy_plan_attached": false, + "legacy_dropped_write": true, + "counterfactual_auto_read": "would_confirm" + } + }, + "coordination_result": { + "status": "ACCEPTED", + "intent": "SUPPLEMENT_INFO", + "branch": "NEW_INTENT_PREEMPT", + "natural_reply": "已收到并为您记录最新信息:「budget」已更新为「约500万」。\n这些事实已沉淀至项目黑板,后续论证与核价将直接吸收这些设定。\n\n针对「医疗器械研发项目」,我为您梳理了接下来的推进选项:\n[1] 进入 V0.5 方案成型与法规对齐 (推荐,可直接回复“好”或“1”)\n[2] 补充或微调事实信息 \n[3] 查阅当前立项成熟度与对外沟通建议 \n", + "updated_context": { + "version": 7, + "snapshot_id": "ctx_1790178011178004837", + "assembled_at": "2026-09-23T15:40:11.178006317Z", + "user": { + "id": "u_sess_1790178011177808103", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": { + "budget": "约500万" + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:40:20.008067771Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "SUPPLEMENT_INFO", + "topic_anchor": "一边查法规一边补充项目背景资料:预算约500万", + "collected_slots": { + "budget": "约500万", + "fact_key": "budget", + "fact_value": "约500万", + "supplement_action": "add", + "supplement_doc": "一边查法规一边补充项目背景资料:预算约500万" + }, + "missing_slots": [ + "device_type", + "target_market" + ], + "updated_at": "2026-09-23T15:40:20.007992933Z" + } + }, + "next_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:40:20.008067771Z" + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:40:20.008067771Z" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-amb-2.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-amb-2.json new file mode 100644 index 00000000..f8b2bf74 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-amb-2.json @@ -0,0 +1,331 @@ +{ + "msg": "帮我看看文档状态,另外把工作流跑起来", + "status": 200, + "dur": 3.386570692062378, + "body": { + "reply_text": "📄 **文档状态查询(只读)**\n\n目标文档:当前激活文档\n当前生命周期:请在工作台文档面板查看详情\n\n如需查看审核记录、血缘或 stale 原因,请指定具体文档名称。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "帮我看看文档状态,另外把工作流跑起来", + "top_intent": { + "intent": "QUERY_DOC_STATUS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "doc_status" + }, + "reasoning": "用户查询受控文档或交付物状态/血缘(只读)" + }, + "candidates": [ + { + "intent": "QUERY_DOC_STATUS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "doc_status" + }, + "reasoning": "用户查询受控文档或交付物状态/血缘(只读)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178020016847680", + "requires_clarifying": false, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.9, + "shadow_margin": 0.7, + "shadow_dialogue_act": "ask", + "shadow_decision_hint": "allowed", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "document.status.query", + "domain": "document_gov", + "object": "controlled_document", + "goal": "query", + "dialogue_act": "ask", + "slots": { + "query_topic": { + "value": "doc_status", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询受控文档或交付物状态/血缘(只读)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "ask", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_DOC_STATUS" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "document.status.query", + "domain": "document_gov", + "object": "controlled_document", + "goal": "query", + "dialogue_act": "ask", + "slots": { + "query_topic": { + "value": "doc_status", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询受控文档或交付物状态/血缘(只读)", + "weight": 0.9 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_DOC_STATUS" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "ask", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.7, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.7 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "307cf3fbc95b9ac66013b6bafcf8a42516a75a7a74aa095be2d4da8c31f8e933", + "combo_hint": "single", + "segments": [ + { + "step_id": "1", + "text": "帮我看看文档状态,另外把工作流跑起来", + "normalized": "帮我看看文档状态,另外把工作流跑起来", + "span": { + "start": 0, + "end": 54 + }, + "evidence": "single", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "document.status.query", + "domain": "document_gov", + "object": "controlled_document", + "goal": "query", + "dialogue_act": "ask", + "slots": { + "query_topic": { + "value": "doc_status", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询受控文档或交付物状态/血缘(只读)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "ask", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_DOC_STATUS" + } + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "single", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 1, + "digest": "307cf3fbc95b9ac66013b6bafcf8a42516a75a7a74aa095be2d4da8c31f8e933", + "combo_hint": "single", + "legacy_plan_attached": false, + "counterfactual_auto_read": "would_passthrough" + } + }, + "coordination_result": { + "status": "ACCEPTED", + "intent": "QUERY_DOC_STATUS", + "natural_reply": "📄 **文档状态查询(只读)**\n\n目标文档:当前激活文档\n当前生命周期:请在工作台文档面板查看详情\n\n如需查看审核记录、血缘或 stale 原因,请指定具体文档名称。", + "updated_context": { + "version": 4, + "snapshot_id": "ctx_1790178020016847680", + "assembled_at": "2026-09-23T15:40:20.01684928Z", + "user": { + "id": "u_sess_1790178020016192130", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:40:20.0168536Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "QUERY_DOC_STATUS", + "topic_anchor": "帮我看看文档状态,另外把工作流跑起来", + "collected_slots": { + "query_topic": "doc_status" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:40:23.397371666Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:40:20.0168536Z" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-amb-llm.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-amb-llm.json new file mode 100644 index 00000000..f46f2515 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-amb-llm.json @@ -0,0 +1,367 @@ +{ + "msg": "法规案例权限相关情况一并说明下", + "status": 200, + "dur": 11.33488392829895, + "body": { + "reply_text": "您好,用户!您在项目「医疗器械研发项目」中的法定受控职责如下:\n\n• **系统/项目身份**:用户 (角色代码: composer)\n\n根据 ISO 13485 质量管理规范,您的所有审核、批注与批准行为均将记入不可篡改的系统审计日志。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "法规案例权限相关情况一并说明下", + "top_intent": { + "intent": "QUERY_USER_RIGHTS", + "confidence": 0.95, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "user_rights" + }, + "reasoning": "用户查询自身在项目及受控文档中的法定职责与操作权限;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)" + }, + "candidates": [ + { + "intent": "QUERY_USER_RIGHTS", + "confidence": 0.95, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "user_rights" + }, + "reasoning": "用户查询自身在项目及受控文档中的法定职责与操作权限;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)" + }, + { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "all" + }, + "reasoning": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178120667351129", + "requires_clarifying": false, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.95, + "shadow_margin": 0.04999999999999993, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "allowed", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "permission.query", + "domain": "project", + "object": "user_permission", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "user_rights", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询自身在项目及受控文档中的法定职责与操作权限;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "weight": 0.95 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.95, + "margin": 0.04999999999999993, + "legacy_intent": "QUERY_USER_RIGHTS" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "permission.query", + "domain": "project", + "object": "user_permission", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "user_rights", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询自身在项目及受控文档中的法定职责与操作权限;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "weight": 0.95 + } + ], + "score": 0.95, + "margin": 0.04999999999999993, + "legacy_intent": "QUERY_USER_RIGHTS" + }, + { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "all", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: all)", + "weight": 0.9 + } + ], + "score": 0.9, + "margin": 0.04999999999999993, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "all" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "margin": 0.04999999999999993, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0.04999999999999993 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "21cf656f4e6315ba6897a1146d35e81f39acdd924c7beaec82d598a8025dcb48", + "combo_hint": "single", + "segments": [ + { + "step_id": "1", + "text": "法规案例权限相关情况一并说明下", + "normalized": "法规案例权限相关情况一并说明下", + "span": { + "start": 0, + "end": 45 + }, + "evidence": "single", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "permission.query", + "domain": "project", + "object": "user_permission", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "user_rights", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户查询自身在项目及受控文档中的法定职责与操作权限;注意:当前上下文 AvailableActions 未包含 QUERY_USER_RIGHTS(L2 将做权限/能力裁决)", + "weight": 0.95 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.95, + "margin": 0.04999999999999993, + "legacy_intent": "QUERY_USER_RIGHTS" + } + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "single", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 1, + "digest": "21cf656f4e6315ba6897a1146d35e81f39acdd924c7beaec82d598a8025dcb48", + "combo_hint": "single", + "legacy_plan_attached": false, + "counterfactual_auto_read": "would_passthrough" + } + }, + "coordination_result": { + "status": "ACCEPTED", + "intent": "QUERY_USER_RIGHTS", + "branch": "NEW_INTENT_PREEMPT", + "natural_reply": "您好,用户!您在项目「医疗器械研发项目」中的法定受控职责如下:\n\n• **系统/项目身份**:用户 (角色代码: composer)\n\n根据 ISO 13485 质量管理规范,您的所有审核、批注与批准行为均将记入不可篡改的系统审计日志。", + "updated_context": { + "version": 7, + "snapshot_id": "ctx_1790178120667351129", + "assembled_at": "2026-09-23T15:42:00.667354569Z", + "user": { + "id": "u_sess-u9u12-8e643b052935", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:42:00.667359949Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "QUERY_USER_RIGHTS", + "topic_anchor": "法规案例权限相关情况一并说明下", + "collected_slots": { + "query_topic": "user_rights" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:42:17.951850521Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:42:00.667359949Z" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-rules-sess.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-rules-sess.json new file mode 100644 index 00000000..3eb83aff --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-rules-sess.json @@ -0,0 +1,437 @@ +{ + "sess": "sess-u9u12-8e643b052935", + "status": 200, + "dur": 7.535254716873169, + "body": { + "reply_text": "关于「医疗器械研发项目」适用的国家标准与法规强标,权威依据梳理如下:\n\n1. **医疗器械软件注册审查指导原则** 〔GB/T9254 §七、技术考量 / (十六)功能安全与软件可靠性〕\n - 条款章节: 七、技术考量 / (十六)功能安全与软件可靠性\n - 条款要点: 考虑到行业实际情况,功能安全、软件可靠性暂不要求,待时机成熟时纳入考量。建议注册申请人参考相关标准要求加强功能安全、软件可靠性的设计工作,若已开展相应工作可在软件研究资料中予以提供。\n2. **国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知** 〔国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知 §三、〕\n - 条款章节: 三、 项目开展的必要性\n - 条款要点: 项目开展的必要性\n品种简介(二)市场现状(三)主要风险点\n3. **国家药监局关于印发医疗器械质量抽查检验管理办法的通知** 〔国家药监局关于印发医疗器械质量抽查检验管理办法的通知 §(二)立即深入进行自查,分析原因,进行风险评估;〕\n - 条款章节: (二)立即深入进行自查,分析原因,进行风险评估; 立即深入进行自查,分析原因,进行风险评估;\n - 条款要点: 立即深入进行自查,分析原因,进行风险评估;\n4. **中华人民共和国医药行业标准** 〔YY/T0489-2023 §5.1 p.7〕\n - 条款章节: 一次性使用无菌引流导管及辅助器械 / 5.1 5.1 风险管理\n - 条款要点: 器械设计应建立风险管理过程,并应进行风险分析。\n示例:GB/T 42062。\n应通过检查风险管理文档来确认符合性。如果开展了临床研究,则这些研究应记录所声称的性能条件下进行的测量。临床研究应按照国家临床研究的相关规定进行。\n5. **国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知** 〔国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知 §(一)品种简介(二)市场现状(三)主要风险点〕\n - 条款章节: 三、 项目开展的必要性 / (一)品种简介(二)市场现状(三)主要风险点 品种简介(二)市场现状(三)主要风险点\n - 条款要点: 品种简介(二)市场现状(三)主要风险点\n\n上述标准与条款可作为型检与注册申报的权威技术支撑。如需深入比对专标或预估测试周期,请随时吩咐我。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "查一下项目风险,然后查相关法规", + "top_intent": { + "intent": "QUERY_REGULATIONS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "regulations" + }, + "reasoning": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)" + }, + "candidates": [ + { + "intent": "QUERY_REGULATIONS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "regulations" + }, + "reasoning": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)" + }, + { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "risk" + }, + "reasoning": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: risk)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790178120667351129", + "requires_clarifying": false, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.9, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "allowed", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "regulation.query", + "domain": "knowledge", + "object": "regulation", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "regulations", + "source": "rule" + } + }, + "relation": "expectation_plus_new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "legacy_intent": "QUERY_REGULATIONS" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "regulation.query", + "domain": "knowledge", + "object": "regulation", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "regulations", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)", + "weight": 0.9 + } + ], + "score": 0.9, + "legacy_intent": "QUERY_REGULATIONS" + }, + { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "risk", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: risk)", + "weight": 0.9 + } + ], + "score": 0.9, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "risk" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "31a4d8d763436d33cc87703baad5c5f041c66d4d5684e68d5b57436e07aa69d3", + "combo_hint": "read_only", + "segments": [ + { + "step_id": "1", + "text": "查一下项目风险", + "normalized": "查一下项目风险", + "span": { + "start": 0, + "end": 21 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "risk", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: risk)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "risk" + } + }, + { + "step_id": "2", + "text": "查相关法规", + "normalized": "查相关法规", + "span": { + "start": 30, + "end": 45 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "regulation.query", + "domain": "knowledge", + "object": "regulation", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "regulations", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_REGULATIONS" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "31a4d8d763436d33cc87703baad5c5f041c66d4d5684e68d5b57436e07aa69d3", + "combo_hint": "read_only", + "legacy_plan_attached": true, + "counterfactual_auto_read": "would_execute" + } + }, + "coordination_result": { + "status": "ACCEPTED", + "intent": "QUERY_REGULATIONS", + "branch": "NEW_INTENT_PREEMPT", + "natural_reply": "关于「医疗器械研发项目」适用的国家标准与法规强标,权威依据梳理如下:\n\n1. **医疗器械软件注册审查指导原则** 〔GB/T9254 §七、技术考量 / (十六)功能安全与软件可靠性〕\n - 条款章节: 七、技术考量 / (十六)功能安全与软件可靠性\n - 条款要点: 考虑到行业实际情况,功能安全、软件可靠性暂不要求,待时机成熟时纳入考量。建议注册申请人参考相关标准要求加强功能安全、软件可靠性的设计工作,若已开展相应工作可在软件研究资料中予以提供。\n2. **国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知** 〔国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知 §三、〕\n - 条款章节: 三、 项目开展的必要性\n - 条款要点: 项目开展的必要性\n品种简介(二)市场现状(三)主要风险点\n3. **国家药监局关于印发医疗器械质量抽查检验管理办法的通知** 〔国家药监局关于印发医疗器械质量抽查检验管理办法的通知 §(二)立即深入进行自查,分析原因,进行风险评估;〕\n - 条款章节: (二)立即深入进行自查,分析原因,进行风险评估; 立即深入进行自查,分析原因,进行风险评估;\n - 条款要点: 立即深入进行自查,分析原因,进行风险评估;\n4. **中华人民共和国医药行业标准** 〔YY/T0489-2023 §5.1 p.7〕\n - 条款章节: 一次性使用无菌引流导管及辅助器械 / 5.1 5.1 风险管理\n - 条款要点: 器械设计应建立风险管理过程,并应进行风险分析。\n示例:GB/T 42062。\n应通过检查风险管理文档来确认符合性。如果开展了临床研究,则这些研究应记录所声称的性能条件下进行的测量。临床研究应按照国家临床研究的相关规定进行。\n5. **国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知** 〔国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知 §(一)品种简介(二)市场现状(三)主要风险点〕\n - 条款章节: 三、 项目开展的必要性 / (一)品种简介(二)市场现状(三)主要风险点 品种简介(二)市场现状(三)主要风险点\n - 条款要点: 品种简介(二)市场现状(三)主要风险点\n\n上述标准与条款可作为型检与注册申报的权威技术支撑。如需深入比对专标或预估测试周期,请随时吩咐我。", + "updated_context": { + "version": 5, + "snapshot_id": "ctx_1790178120667351129", + "assembled_at": "2026-09-23T15:42:00.667354569Z", + "user": { + "id": "u_sess-u9u12-8e643b052935", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:42:00.667359949Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "QUERY_REGULATIONS", + "topic_anchor": "查一下项目风险,然后查相关法规", + "collected_slots": { + "query_topic": "regulations" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:42:06.69875302Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:42:00.667359949Z" + }, + "intent_plan": { + "plan_id": "pln_fc6114813ba4af201014e8247efbfe77", + "revision": 2, + "status": "executing", + "execution_mode": "live", + "expires_at": "2026-09-23T16:12:00.676543Z", + "steps": [ + { + "step_id": "stp_e714ad8161aade3b2fff4b35d657ecc0", + "action_key": "project.advisory", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "project.advisory authorized (scope=999346c5bf9e)" + }, + { + "step_id": "stp_5329e5e753e5a9a2e16665b5d9a7e9fb", + "action_key": "regulation.query", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "regulation.query authorized (scope=5c62bc800c57)" + } + ], + "safe_summary": "查一下项目风险,然后查相关法规" + } + } +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-rules.json b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-rules.json new file mode 100644 index 00000000..32a826b2 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-24-intent-plan-u9u12/u9-rules.json @@ -0,0 +1,436 @@ +{ + "status": 200, + "dur": 9.39828109741211, + "body": { + "reply_text": "关于「医疗器械研发项目」适用的国家标准与法规强标,权威依据梳理如下:\n\n1. **医疗器械软件注册审查指导原则** 〔GB/T9254 §七、技术考量 / (十六)功能安全与软件可靠性〕\n - 条款章节: 七、技术考量 / (十六)功能安全与软件可靠性\n - 条款要点: 考虑到行业实际情况,功能安全、软件可靠性暂不要求,待时机成熟时纳入考量。建议注册申请人参考相关标准要求加强功能安全、软件可靠性的设计工作,若已开展相应工作可在软件研究资料中予以提供。\n2. **国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知** 〔国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知 §三、〕\n - 条款章节: 三、 项目开展的必要性\n - 条款要点: 项目开展的必要性\n品种简介(二)市场现状(三)主要风险点\n3. **国家药监局关于印发医疗器械质量抽查检验管理办法的通知** 〔国家药监局关于印发医疗器械质量抽查检验管理办法的通知 §(二)立即深入进行自查,分析原因,进行风险评估;〕\n - 条款章节: (二)立即深入进行自查,分析原因,进行风险评估; 立即深入进行自查,分析原因,进行风险评估;\n - 条款要点: 立即深入进行自查,分析原因,进行风险评估;\n4. **中华人民共和国医药行业标准** 〔YY/T0489-2023 §5.1 p.7〕\n - 条款章节: 一次性使用无菌引流导管及辅助器械 / 5.1 5.1 风险管理\n - 条款要点: 器械设计应建立风险管理过程,并应进行风险分析。\n示例:GB/T 42062。\n应通过检查风险管理文档来确认符合性。如果开展了临床研究,则这些研究应记录所声称的性能条件下进行的测量。临床研究应按照国家临床研究的相关规定进行。\n5. **国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知** 〔国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知 §(一)品种简介(二)市场现状(三)主要风险点〕\n - 条款章节: 三、 项目开展的必要性 / (一)品种简介(二)市场现状(三)主要风险点 品种简介(二)市场现状(三)主要风险点\n - 条款要点: 品种简介(二)市场现状(三)主要风险点\n\n上述标准与条款可作为型检与注册申报的权威技术支撑。如需深入比对专标或预估测试周期,请随时吩咐我。", + "branch": "NEW_INTENT_PREEMPT", + "intent_result": { + "raw_input": "查一下项目风险,然后查相关法规", + "top_intent": { + "intent": "QUERY_REGULATIONS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "regulations" + }, + "reasoning": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)" + }, + "candidates": [ + { + "intent": "QUERY_REGULATIONS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "regulations" + }, + "reasoning": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)" + }, + { + "intent": "QUERY_PROGRESS", + "confidence": 0.9, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": { + "query_topic": "risk" + }, + "reasoning": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: risk)" + }, + { + "intent": "CASUAL_CHAT", + "confidence": 0.2, + "branch": "NEW_INTENT_PREEMPT", + "filled_slots": {}, + "reasoning": "未匹配到明确业务指令,归入通用对话" + } + ], + "context_snapshot_id": "ctx_1790177993688553011", + "requires_clarifying": false, + "branch": "NEW_INTENT_PREEMPT", + "shadow_score": 0.9, + "shadow_dialogue_act": "command", + "shadow_decision_hint": "allowed", + "intent_frame_v2": { + "version": "v2.0", + "action_key": "regulation.query", + "domain": "knowledge", + "object": "regulation", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "regulations", + "source": "rule" + } + }, + "relation": "expectation_plus_new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "legacy_intent": "QUERY_REGULATIONS" + }, + "ranked_frames": { + "candidates": [ + { + "version": "v2.0", + "action_key": "regulation.query", + "domain": "knowledge", + "object": "regulation", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "regulations", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)", + "weight": 0.9 + } + ], + "score": 0.9, + "legacy_intent": "QUERY_REGULATIONS" + }, + { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "risk", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: risk)", + "weight": 0.9 + } + ], + "score": 0.9, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "risk" + }, + { + "version": "v2.0", + "action_key": "conversation.chat", + "domain": "conversation", + "object": "system_ui", + "goal": "converse", + "dialogue_act": "command", + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "未匹配到明确业务指令,归入通用对话", + "weight": 0.2 + } + ], + "score": 0.2, + "legacy_intent": "CASUAL_CHAT" + } + ], + "top_margin": 0 + }, + "plan_proposal": { + "segmenter_version": "segmenter.v2", + "digest": "31a4d8d763436d33cc87703baad5c5f041c66d4d5684e68d5b57436e07aa69d3", + "combo_hint": "read_only", + "segments": [ + { + "step_id": "1", + "text": "查一下项目风险", + "normalized": "查一下项目风险", + "span": { + "start": 0, + "end": 21 + }, + "evidence": "connector", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "project.advisory", + "domain": "project", + "object": "project", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "risk", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户在询问项目状态、技术测试方案或对外沟通话术 (主题: risk)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_PROGRESS", + "subtype": "risk" + } + }, + { + "step_id": "2", + "text": "查相关法规", + "normalized": "查相关法规", + "span": { + "start": 30, + "end": 45 + }, + "connector": ",然后", + "evidence": "sequential", + "structure_confidence": "high", + "frame": { + "version": "v2.0", + "action_key": "regulation.query", + "domain": "knowledge", + "object": "regulation", + "goal": "query", + "dialogue_act": "command", + "slots": { + "query_topic": { + "value": "regulations", + "source": "rule" + } + }, + "relation": "new", + "evidence": [ + { + "kind": "rule_match", + "detail": "用户咨询医疗器械适用的国家标准、行业强标或审评指导原则法规;注意:当前上下文 AvailableActions 未包含 QUERY_REGULATIONS(L2 将做权限/能力裁决)", + "weight": 0.9 + }, + { + "kind": "dialogue_act", + "detail": "command", + "weight": 0.1 + } + ], + "score": 0.9, + "margin": 0.7, + "legacy_intent": "QUERY_REGULATIONS" + }, + "depends_on": [ + "1" + ] + } + ], + "evidence": [ + { + "kind": "segmenter", + "detail": "segmenter.v2", + "weight": 1 + }, + { + "kind": "split", + "detail": "connector", + "weight": 0.5 + }, + { + "kind": "split", + "detail": "sequential", + "weight": 0.5 + } + ] + }, + "plan_shadow": { + "enabled": true, + "segmenter_version": "segmenter.v2", + "segment_count": 2, + "digest": "31a4d8d763436d33cc87703baad5c5f041c66d4d5684e68d5b57436e07aa69d3", + "combo_hint": "read_only", + "legacy_plan_attached": true, + "counterfactual_auto_read": "would_execute" + } + }, + "coordination_result": { + "status": "ACCEPTED", + "intent": "QUERY_REGULATIONS", + "branch": "NEW_INTENT_PREEMPT", + "natural_reply": "关于「医疗器械研发项目」适用的国家标准与法规强标,权威依据梳理如下:\n\n1. **医疗器械软件注册审查指导原则** 〔GB/T9254 §七、技术考量 / (十六)功能安全与软件可靠性〕\n - 条款章节: 七、技术考量 / (十六)功能安全与软件可靠性\n - 条款要点: 考虑到行业实际情况,功能安全、软件可靠性暂不要求,待时机成熟时纳入考量。建议注册申请人参考相关标准要求加强功能安全、软件可靠性的设计工作,若已开展相应工作可在软件研究资料中予以提供。\n2. **国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知** 〔国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知 §三、〕\n - 条款章节: 三、 项目开展的必要性\n - 条款要点: 项目开展的必要性\n品种简介(二)市场现状(三)主要风险点\n3. **国家药监局关于印发医疗器械质量抽查检验管理办法的通知** 〔国家药监局关于印发医疗器械质量抽查检验管理办法的通知 §(二)立即深入进行自查,分析原因,进行风险评估;〕\n - 条款章节: (二)立即深入进行自查,分析原因,进行风险评估; 立即深入进行自查,分析原因,进行风险评估;\n - 条款要点: 立即深入进行自查,分析原因,进行风险评估;\n4. **中华人民共和国医药行业标准** 〔YY/T0489-2023 §5.1 p.7〕\n - 条款章节: 一次性使用无菌引流导管及辅助器械 / 5.1 5.1 风险管理\n - 条款要点: 器械设计应建立风险管理过程,并应进行风险分析。\n示例:GB/T 42062。\n应通过检查风险管理文档来确认符合性。如果开展了临床研究,则这些研究应记录所声称的性能条件下进行的测量。临床研究应按照国家临床研究的相关规定进行。\n5. **国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知** 〔国家药监局综合司关于印发国家医疗器械质量抽查检验工作程序的通知 §(一)品种简介(二)市场现状(三)主要风险点〕\n - 条款章节: 三、 项目开展的必要性 / (一)品种简介(二)市场现状(三)主要风险点 品种简介(二)市场现状(三)主要风险点\n - 条款要点: 品种简介(二)市场现状(三)主要风险点\n\n上述标准与条款可作为型检与注册申报的权威技术支撑。如需深入比对专标或预估测试周期,请随时吩咐我。", + "updated_context": { + "version": 4, + "snapshot_id": "ctx_1790177993688553011", + "assembled_at": "2026-09-23T15:39:53.688555111Z", + "user": { + "id": "u_sess_1790177993687278179", + "name": "用户", + "role": "engineer", + "project_role": "composer" + }, + "project": { + "id": "", + "name": "医疗器械研发项目", + "customer_name": "水木东方客户", + "device_type": "", + "intended_use": "", + "target_market": "", + "active_workflow_key": "main", + "current_workflow": "intake", + "current_stage": "V0.1_triage" + }, + "user_docs": { + "composed": null, + "reviewed": null, + "approved": null, + "claimed": null + }, + "pending": {}, + "blackboard_facts": {}, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:39:53.688564791Z" + }, + "available_actions": [ + "QUERY_PROGRESS", + "SUPPLEMENT_INFO", + "VIEW_DOC", + "TRIGGER_TASK:intake", + "ADVANCE_STAGE:V0.5_feasibility" + ], + "task_state": { + "active_task": "QUERY_REGULATIONS", + "topic_anchor": "查一下项目风险,然后查相关法规", + "collected_slots": { + "query_topic": "regulations" + }, + "missing_slots": [ + "device_type", + "target_market", + "budget" + ], + "updated_at": "2026-09-23T15:39:59.667608465Z" + } + } + }, + "pending_expectation": { + "expires_at": "0001-01-01T00:00:00Z", + "context_snippet": "项目「医疗器械研发项目」当前处于初始摸底期,基准产品画像已梳理完成。", + "default_option": { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + "options": [ + { + "option_id": "1", + "title": "进入 V0.5 方案成型与法规对齐", + "description": "自动比选技术路线,并梳理分类路径与型检标准", + "intent": "ADVANCE_STAGE", + "slots": { + "target_stage": "V0.5_feasibility" + } + }, + { + "option_id": "2", + "title": "补充或微调事实信息", + "description": "随时告知我客户的最新的预算、目标市场或使用场景", + "intent": "SUPPLEMENT_INFO" + }, + { + "option_id": "3", + "title": "查阅当前立项成熟度与对外沟通建议", + "description": "获取进展研判与对外商务沟通话术", + "intent": "QUERY_PROGRESS", + "slots": { + "query_topic": "all" + } + } + ], + "allow_affirmative": true, + "created_at": "2026-09-23T15:39:53.688564791Z" + }, + "intent_plan": { + "plan_id": "pln_74cd70c0cf0e5cdc65a955ade0e7477b", + "revision": 2, + "status": "executing", + "execution_mode": "live", + "expires_at": "2026-09-23T16:09:53.710639Z", + "steps": [ + { + "step_id": "stp_3b323bf61ae80cf066a431aecc08cf1e", + "action_key": "project.advisory", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "project.advisory authorized (scope=87d12db7ea80)" + }, + { + "step_id": "stp_1c1bf5c613914aafaa0180238e8348fd", + "action_key": "regulation.query", + "status": "succeeded", + "execution_mode": "live", + "safe_summary": "regulation.query authorized (scope=3d8fcf041cf7)" + } + ], + "safe_summary": "查一下项目风险,然后查相关法规" + } + } +} \ No newline at end of file