Skip to content

Commit 7c9e509

Browse files
CyningMMcursoragent
andcommitted
docs(task): Intent Hints Step2 Harness 关账 · KPI 88%
50 已落盘 · HG-REINSPECT approved · PR #111 @ 0fe7d2d 已合 main; Fresh Context 复验全绿;git mv done/ · _views 索引 · CLOSE invoke。 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 777dbeb commit 7c9e509

3 files changed

Lines changed: 127 additions & 6 deletions

File tree

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Invoke 快照 · CLOSE · chatbi_intent_hints_step2_v1
2+
3+
| 字段 ||
4+
| --- | --- |
5+
| **hat_id** | CLOSE |
6+
| **task_slug** | `chatbi_intent_hints_step2_v1` |
7+
| **task_path** | `docs/tasks/done/task_chatbi_intent_hints_step2_v1.md` |
8+
| **git_branch** | `task/close-chatbi-intent-hints-step2-v1` |
9+
| **freeze_id** | `CHATBI-INTENT-HINTS@2026-06-09` |
10+
| **merge_ref** | PR [#111](https://github.com/Cyning12/ai-ink-brain-api-python/pull/111) @ `0fe7d2d` |
11+
| **date** | `20260606` |
12+
13+
---
14+
15+
## 执行路线与 Commit 回溯
16+
17+
**一句结论**:50 复检 pass-with-notes → HG-REINSPECT approved → PR #111 已合 main 且 CI 全绿 → Fresh Context 复验全绿 → Harness 关账(无下一棒)。
18+
19+
| 序号 | 阶段 / 帽子 | 关键动作 | 落盘工件 | commit |
20+
| ---: | --- | --- | --- | --- |
21+
| 1 | 10 需求 | U2 Step2 task · Q-2 resolved | `docs/tasks/active/task_chatbi_intent_hints_step2_v1.md` | (10 轮) |
22+
| 2 | 22 R1 | 零阻塞 | `docs/harness/reviews/by-task/chatbi_intent_hints_step2_v1/task_chatbi_intent_hints_step2_v1_audit_R1_20260604.md` | (22 轮) |
23+
| 3 | 人签 | HG-TASK-DRAFT + HG-AUDIT-R1 + HG-REINSPECT | task `human_gate`| `80f455d`|
24+
| 4 | 30 执行 | router 合并 · LLM 仲裁 · yaml/env | `api/intent_hints.py` · `api/intent_router.py` · `api/intent_agent.py` | (30 轮) |
25+
| 5 | 40 自检 | 312 pytest 绿 | task `### 自检结论` | (40 轮) |
26+
| 6 | 50 复检 | pass-with-notes | `docs/tasks/reinspect_results/reinspect_chatbi_intent_hints_step2_v1_20260604_v1.md` | (50 轮) |
27+
| 7 | PR 合入 | Step2 交付 | PR #111 | `0fe7d2d` |
28+
| 8 | CLOSE | KPI · 经验摘要 · git mv done | task `done/` · `_views/done.md` · 本 invoke | (本 CLOSE commit) |
29+
30+
### api-python(ai-ink-brain-api-python)
31+
32+
```text
33+
- (CLOSE)docs(task): Intent Hints Step2 Harness 关账 · KPI 88%
34+
- 0fe7d2d feat(chatbi): intent_hints Step2 — router 同步、LLM 仲裁与 Timeline 可观测 (#111)
35+
- (50/40/30/22/10 轮 harness 工件见 invokes/by-task/chatbi_intent_hints_step2_v1/)
36+
```
37+
38+
---
39+
40+
## human_gate 复读(关账 · 文件状态)
41+
42+
| human_gate_id | status | blocks_hats |
43+
| --- | --- | --- |
44+
| HG-TASK-DRAFT | **approved** | 22-R1, 30 |
45+
| HG-AUDIT-R1 | **approved** | 30 |
46+
| HG-REINSPECT | **approved** | done, 合并 PR |
47+
48+
`python tools/harness_human_gate_check.py --task docs/tasks/active/task_chatbi_intent_hints_step2_v1.md`**OK**
49+
50+
---
51+
52+
## Fresh Context 复验(关账 · main @ `0fe7d2d`
53+
54+
| 命令 | exit | 要点 |
55+
| --- | ---: | --- |
56+
| `pytest tests/test_intent_hints_arbitration.py tests/test_intent_router_backend_v1.py -q` | 0 | 17 passed |
57+
| `pytest tests/test_intent_hints_loader.py -q` | 0 | 9 passed |
58+
| `pytest tests -m "not intent_eval and not intent_benchmark" -q` | 0 | 323 passed · 1 skipped |
59+
| `git diff origin/main -- api/graph/` || 0 行 |
60+
| `python tools/harness_task_validate.py docs/tasks/active/task_chatbi_intent_hints_step2_v1.md` | 0 | OK(关账前 active 路径) |
61+
62+
---
63+
64+
## §3 调用体(快照)
65+
66+
```text
67+
Harness 关账(无下一棒):50 已落盘 · HG-REINSPECT approved · PR #111 已合 main。
68+
任务:git mv task → done/ · 填 KPI(00)· experience_capture 经验摘要 · _views/done.md 索引。
69+
禁止改 api/graph/* · 禁止启动 Step3 范围。
70+
按 HANDOFF_AUTO_COMMIT 仅 add 本轮路径并 commit。
71+
对话末尾:执行路线与 Commit 回溯 + Harness 状态栏(版本 B)· 下一棒:— · 关账完成。
72+
```

docs/tasks/_views/done.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
55
## 已完成
66

7+
- `../done/task_chatbi_intent_hints_step2_v1.md`(2026-06-06:Intent Hints Step2 C-mid · router 同步 + LLM 仲裁 · PR #111 @ `0fe7d2d` · KPI 88% pass · 50 `reinspect_chatbi_intent_hints_step2_v1_20260604_v1.md` · **unblocks** Step3)
78
- `../done/task_chatbi_baseline_merge_gate_v1.md`(2026-06-06:ChatBI 基线合并闸 · v3 clarify 测试环境 + contract label · PR #106 @ `26e1c45` · KPI 100% pass · 50 `reinspect_chatbi_baseline_merge_gate_v1_20260604_v1.md` · **unblocks** P0 Graph)
8-
- `../done/task_chatbi_graph_p0_foundation_v1.md`(2026-06-04:LangChain 路线图 P0 · 共享层抽取 + State/边表 + Graph stub 路由 · PR #106+#107 · 50 `reinspect_chatbi_graph_p0_foundation_v1_20260603_v1.md` · `main@f53327a` · **blocks** P1 Task-B)
9+
- `../done/task_chatbi_graph_p0_foundation_v1.md`(2026-06-04:LangChain 路线图 P0 · 共享层抽取 + State/边表 + Graph stub 路由 · PR #107 · 50 `reinspect_chatbi_graph_p0_foundation_v1_20260603_v1.md` · `main@f53327a` · **blocks** P1 Task-B · 关账 #115
910
- `../done/task_chatbi_intent_hints_step1_v1.md`(2026-06-04:Intent Hints Step1 C-lite · yaml+loader+Prompt 注入 · KPI 94% pass-with-notes · `CHATBI-INTENT-HINTS@2026-06-09` · reinspect `reinspect_chatbi_intent_hints_step1_v1_20260604_v1.md` · 分支 `task/chatbi-intent-hints-step1-v1` · 实现 `bb59beb` · **待人 HG-REINSPECT + PR CI + RUNBOOK 集成**
1011
- `../done/task_harness_invokes_by_task_prompts_sync_v1.md`(2026-06-02:prompts/HANDOFF + 05 rule 对齐 by-task invoke 落盘 · 配对 Ink PR #48 · `HARNESS-INVOKES-BY-TASK-PROMPTS@2026-06-02`
1112
- `../done/task_chatbi_v3_lowconf_rag_preview_v1.md`(2026-05-31:§5-3 RAG 预览+token · KPI 100% pass · `CHATBI-LOWCONF-RAG-PREVIEW@2026-05-31` · reinspect `reinspect_chatbi-v3-lowconf-rag-preview_20260531_v1.md` · 分支 `task/chatbi-v3-lowconf-rag-preview` · Ink `72f8f0c`

docs/tasks/active/task_chatbi_intent_hints_step2_v1.md renamed to docs/tasks/done/task_chatbi_intent_hints_step2_v1.md

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# Task:ChatBI Intent Hints — Step 2(C-mid · router 同步 + LLM 仲裁)
22

3-
> **状态**`active(2026-06-04 · 30/40 完成 · 待 50 落盘 + HG-REINSPECT 人签)`
3+
> **状态**`done`(2026-06-06 · `CHATBI-INTENT-HINTS@2026-06-09` · PR [#111](https://github.com/Cyning12/ai-ink-brain-api-python/pull/111) @ `0fe7d2d` · Task_KPI% 88 pass)
44
> **Epic**:ChatBI Intent Hints · **U2 · Step 2**
55
> **时间门槛**[`投递冲刺_20260609_v1_zh.md`](../spec/governance/投递冲刺_20260609_v1_zh.md) §2 — **6/9 sprint 建议合 main**(优先于 Step3)
66
> **关联图谱**`api/intent_hints.py` · `api/intent_router.py` · `api/intent_agent.py` · `api/agent.py` · **** `api/graph/*`
7-
> **母单回链**[`task_chatbi_intent_hints_step1_v1.md`](done/task_chatbi_intent_hints_step1_v1.md) · U1.5 已合 #110
7+
> **母单回链**[`task_chatbi_intent_hints_step1_v1.md`](done/task_chatbi_intent_hints_step1_v1.md) · U1.5 已合 #110
8+
> **50 复检**[`reinspect_chatbi_intent_hints_step2_v1_20260604_v1.md`](../reinspect_results/reinspect_chatbi_intent_hints_step2_v1_20260604_v1.md)
9+
> **22 R1**[`task_chatbi_intent_hints_step2_v1_audit_R1_20260604.md`](../harness/reviews/by-task/chatbi_intent_hints_step2_v1/task_chatbi_intent_hints_step2_v1_audit_R1_20260604.md)
10+
> **关闭回溯**[`invoke_20260606_CLOSE_chatbi-intent-hints-step2-v1.md`](../harness/invokes/by-task/chatbi_intent_hints_step2_v1/invoke_20260606_CLOSE_chatbi-intent-hints-step2-v1.md)
811
912
---
1013

@@ -34,7 +37,7 @@
3437
| ------------- | ------ | ----------- | ---- |
3538
| HG-TASK-DRAFT | approved | 22-R1, 30 | 10 帽初稿 · 2026-06-04 人签 |
3639
| HG-AUDIT-R1 | approved | 30 | 22 R1 零阻塞 · 2026-06-04 人签 |
37-
| HG-REINSPECT | pending | done, 合并 PR | 50 落盘 `reinspect_results/` 后人签 |
40+
| HG-REINSPECT | approved | done, 合并 PR | 50 落盘 `reinspect_results/` 后人签 |
3841

3942
---
4043

@@ -161,9 +164,10 @@ Step1(#109)通过 **Prompt 注入** 使 Portfolio Q4 / Q-INTENT 在 Intent L
161164
- [x] 负例「解释一下量子计算,用通俗语言」→ **** 触发仲裁 · 仍 `direct_answer`
162165
- [x] `INTENT_HINTS_ARBITRATION=0` → 行为 **等同 Step1**(仲裁不生效 · 单测断言)
163166
- [x] Intent 超时 → V1:`decide_intent_v2` mock 超时 + Q4 → V1 rule_hits 含 **portfolio** 类 · candidate rag(单测或 router 直测)
164-
- [x] `pytest tests -m "not intent_eval and not intent_benchmark"` **全绿**
167+
- [x] `pytest tests -m "not intent_eval and not intent_benchmark"` **全绿**(关账 Fresh Context:**323 passed** · 1 skipped)
165168
- [x] diff **不含** `api/graph/*`
166169
- [x] `python tools/harness_task_validate.py docs/tasks/active/task_chatbi_intent_hints_step2_v1.md` **OK**
170+
- [x] PR **`pytest`** workflow Required check 全绿(PR #111 · 2026-06-04 merge · `gh` 核对 SUCCESS)
167171

168172
**PR 标题(建议)**`feat(chatbi): intent_hints Step2 — router 同步与 LLM 仲裁`
169173

@@ -225,14 +229,58 @@ pytest tests -m "not intent_eval and not intent_benchmark"
225229
- `intent_hints.yaml``arbitration.enabled: true` · env `INTENT_HINTS_ARBITRATION`
226230
- `tests/test_intent_hints_arbitration.py`(新建)· router Portfolio 扩展 3 用例
227231

228-
**已知未测**:PR Actions workflow · RUNBOOK 五问/Q-INTENT **真实 LLM 人验**(Step1 已 5/5,本 task 以 mock/router 单测为准)。
232+
**已知未测**:RUNBOOK 五问/Q-INTENT **真实 LLM 人验**(Step1 已 5/5,本 task 以 mock/router 单测为准)。
233+
234+
#### 关账补记(2026-06-06 · main @ `0fe7d2d`
235+
236+
|| 结果 |
237+
| --- | --- |
238+
| 合入 | PR **#111** `0fe7d2d` · 2026-06-04 merged |
239+
| PR CI | `pytest` · `contract_check` · `manifest_check` · `verify`**SUCCESS** |
240+
| Fresh Context 复验 | 仲裁+router **17 passed** · loader **9 passed** · 全集 **323 passed** · graph diff **0 行** |
241+
| human_gate | HG-TASK-DRAFT / HG-AUDIT-R1 / HG-REINSPECT — **approved**`harness_human_gate_check` OK) |
242+
| 与 50 差异 | 50 时点 312 passed / HG-REINSPECT pending;关账 main 增其他 PR 用例 → **323 passed** |
243+
244+
---
245+
246+
### 经验摘要(experience_capture · required)
247+
248+
> Portfolio 仲裁 vs Prompt-only;prefer 覆盖未单测 → pass-with-notes。
249+
250+
1. **Step1 缺口**:Prompt-only 注入使 Portfolio Q4 倾向 rag,但 LLM 高置信 `direct_answer` 或 V1 超时路径仍可能 miss — Step2 补 **router YAML 合并** + **`apply_hints_arbitration`**
251+
2. **双路径设计**:router 侧 `_rag_rule_hits` 合并 YAML(V1/关 LLM);agent 侧仲裁在 LLM 成功返回前强制改 rag — 两路共用同一份 `intent_hints.yaml`
252+
3. **仲裁开关**:Q-2 默认开(YAML `arbitration.enabled: true`);`INTENT_HINTS_ARBITRATION=0`**零行为变更**(等同 Step1)。
253+
4. **prefer 优先级**`prefer=rag|text2sql|no_data` 在 router 先行,仲裁 **不覆盖** — 50 pass-with-notes:**未增 prefer 单测**,后续 Step3 或回归批次可补。
254+
5. **排障口诀**:Portfolio 仍 no_data → 先查 V1 rule_hits 是否含 portfolio 类 · 再查 LLM direct 是否被仲裁 · 最后查 env 关断。
255+
256+
---
257+
258+
## KPI(00)
259+
260+
**rubric**: KPI_RUBRIC_v1_2 · **汇总**: 88% · **状态**: pass · ****: 22→30→40→50→CLOSE · **aggregator**: CLOSE
261+
262+
| hat_code | round | agent_mode | D1 | D2 | D3 | D4 | D5 | judgment_notes |
263+
|----------|-------|------------|----|----|----|----|-----|----------------|
264+
| 22 | R1 | main_chat | 100 | 100 | 100 | 100 || Q-2 resolved · 零阻塞 |
265+
| 30 | R1 | main_chat | 100 | 100 | 100 | 100 || S2-1~S2-6 交付 · 无 graph diff |
266+
| 40 | R1 | main_chat | 100 | 100 | 100 | 100 || 312 pytest 绿(40 时点) |
267+
| 50 | v1 | main_chat | 100 | 60 | 100 | 100 | 100 | pass-with-notes:prefer 覆盖未单测 · yaml-missing router 未专测;关账 PR #111 CI SUCCESS |
268+
269+
| 指标 ||
270+
| --- | --- |
271+
| Task_KPI% | **88%** |
272+
| blocked | **** |
273+
274+
**D2 聚合**:min(100,100,100,60)=60 · **D5 聚合**:100 · **状态**:pass(≥80,无 blocked)
229275

230276
---
231277

232278
## 修订记录
233279

234280
| 日期 | 摘要 |
235281
| --- | --- |
282+
| 2026-06-06 | **Harness 关账**`git mv``done/` · KPI 88% · Fresh Context 复验 main 全绿 · 合入 PR #111 @ `0fe7d2d` |
283+
| 2026-06-04 | 50 独立复检 pass-with-notes · reinspect `reinspect_chatbi_intent_hints_step2_v1_20260604_v1.md` |
236284
| 2026-06-04 | 10 帽:U2 Step2 task 初稿 · Q-2 resolved · HG-TASK-DRAFT pending |
237285
| 2026-06-04 | 人签 HG-TASK-DRAFT approved(gate 独立 commit) |
238286
| 2026-06-04 | 30/40:Step2 实现 + 自检 · 312 pytest 绿 |

0 commit comments

Comments
 (0)