From 070654c8beb38c25bf086a797946cf0e2a7485a8 Mon Sep 17 00:00:00 2001 From: hkwuks <25031515+hkwuks@users.noreply.github.com> Date: Tue, 1 Dec 2026 22:08:26 +0800 Subject: [PATCH 1/6] docs: plan research evidence across TaskFlow artifacts --- .../2026-12-01-research-evidence/plan.md | 91 +++++++++++++++++++ .../2026-12-01-research-evidence/prd.md | 59 ++++++++++++ .../reference/evidence.md | 15 +++ .../2026-12-01-research-evidence/spec.md | 40 ++++++++ TaskFlowDocs/todo.md | 16 ++++ 5 files changed, 221 insertions(+) create mode 100644 TaskFlowDocs/2026-12-01-research-evidence/plan.md create mode 100644 TaskFlowDocs/2026-12-01-research-evidence/prd.md create mode 100644 TaskFlowDocs/2026-12-01-research-evidence/reference/evidence.md create mode 100644 TaskFlowDocs/2026-12-01-research-evidence/spec.md diff --git a/TaskFlowDocs/2026-12-01-research-evidence/plan.md b/TaskFlowDocs/2026-12-01-research-evidence/plan.md new file mode 100644 index 0000000..9cfc5d6 --- /dev/null +++ b/TaskFlowDocs/2026-12-01-research-evidence/plan.md @@ -0,0 +1,91 @@ +# Plan — 研究证据进入 PRD、Spec 和 Plan +> Task version: v1 +> Status: planning + +## Spec Pointers + +- `spec.md` 的标记、证据和未知契约。验收以 `prd.md` A1–A4 为准。 + +## Reference Pointers + +- `reference/evidence.md`。两类实际证据与可重复复核方法。 +- 基线 `main@92b10c6`。工作树 `D:/WorkSpace/Agent/TaskFlow/.worktrees/2026-12-01-research-evidence`。分支 `feature/2026-12-01-research-evidence`。 + +## Related Tasks + +- Related: `TaskFlowDocs/achieved/2026-10-31-external-facts/` 和 `TaskFlowDocs/achieved/2026-11-12-capability-outcomes/`。 + +## Skills / Tools Used + +- [PRD] Declared `agent-skills:spec-driven-development` — purpose: 把研究文档过薄拆成证据发现、呈现和审批三个可验收问题。outcome: 确定启用范围和未知处理。incorporated: PRD A1–A4。 +- [Spec] Declared `agent-skills:spec-driven-development` — purpose: 定义证据编号、复核与审批边界。outcome: 明确中央索引和各阶段用途。incorporated: Spec 数据契约。 +- [Plan] Declared `agent-skills:planning-and-task-breakdown` — purpose: 将工作分拆为可验证的流程和门。outcome: 先跑文档样例,再接批准并复测。incorporated: Steps 1–4。 +- [Test] Unaided — no capability applied to this phase; considered: testing strategy + +## Evidence Use + +- E-01: 用公开来源验证 PRD、Spec、Plan 三种引用会分别检查什么。样例公开说明只支撑能力边界,真实执行另验。 +- E-02: 用源码和可重复命令验证本地分析同样能够推动需求、设计和测试。即使没有专用工具,文档仍要写出可以复核的选择。 + +## Preconditions + +- 研究标记范围、索引集中记录、允许保留未知由用户确认。 +- Plan 获批后开始实现。测试数据和样例使用公开或可共享材料。 + +## Plan Review + +- Verdict: sound +- Coverage: Step 1 覆盖 A1、A2 的文档结构。Steps 2–3 覆盖 A1、A3、A4。Step 4 按真实样本复核 A2、A4。 +- Verifiability: 样例可以从公共源或仓库基线独立复核。机械测试对照退出码、具体诊断和批准状态。内容评审核对来源实际改变的决策。 +- Layer ownership: 索引持有可读证据,阶段工件持有基于这些证据的决定。结构检查保护执行入口,批准者判断充分性。 + +## Approval + +- Status: requested +- Approved by: pending +- Approved at: pending +- Approved version: pending +- Approved scope: pending + +## Steps + +### Step 1 — 用两类证据走通三份文档 + +- [ ] 更新 Skill 和工件规则,说明建议标记、集中索引、阶段用途以及未知写法。 +- [ ] 用 `reference/evidence.md` 的公开资料和本地分析构成可复核的样例,核对三份文件对同一证据写了不同的决定。 +- Acceptance: 两个真实样例的来源、结论、限制和复核命令明确。一份研究结果的完整正文只存一处。 +- Verification: 比对官方来源段落、Git 基线源码和三份规划文档的引用。检查没有专用 Skill 时的完整路线。 +- Status: pending + +### Step 2 — 检查证据索引与阶段引用 + +- [ ] 增加独立只读校验,解析任务标记、索引 ID、字段、阶段用途和未知组合。围栏中的示例不生效。 +- [ ] 给出指向文件和字段的错误。为公共 URL、仓库材料、重复 ID、悬空引用、完整未知和免写 Spec 建立针对性 fixture。 +- Acceptance: 完整证据和完整未知通过。不完整证据或无用法说明能准确拒绝。输入不引发文档写入。 +- Verification: 运行新 fixture,使用正负用例核对具体错误与退出码。 +- Status: pending + +### Step 3 — 接入 TaskFlow 审批 + +- [ ] opt-in 任务复用同一校验结果。普通任务的审批与外部证据规则保持现有行为。 +- [ ] 批准前捕获缺项,检查失败时保留原状态。追加验证工作流使用的脚本清单。 +- Acceptance: 已标记的两阶段对照批准按预期通过或拒绝。既有无标记任务无额外门槛。 +- Verification: 用真实 `task approve` 入口验证审批成功、缺证据时状态保持与 Spec 免写。 +- Status: pending + +### Step 4 — 复核两类真实样例和运行差异 + +- [ ] 对照公开来源和仓库内分析,解释证据分别改变需求、设计、执行和验收的哪个决定。 +- [ ] 核对工具观察、来源记录和阶段用途可分别阅读,检查共享证据定位无隐私内容。 +- Acceptance: 两个样例均由读者复核得到同样的结论边界。保留未知时有可执行的验证步骤。 +- Verification: 记录真实样例审阅结果、结构校验、聚焦回归和三平台 CI。 +- Status: pending + +## Verification / Review + +- 规划样例已读取公开来源和 Git 基线。当本 PRD、Spec、Plan 进入审批后,再实现检查器并用正反用例复核。 +- 回退顺序:先撤批准入口,再撤校验器与模板。用户已有证据笔记继续可读。 + +## Change Log + +- 2026-12-01 v1 — 用户确认三项需求边界,编写研究证据落地方案。 diff --git a/TaskFlowDocs/2026-12-01-research-evidence/prd.md b/TaskFlowDocs/2026-12-01-research-evidence/prd.md new file mode 100644 index 0000000..d85d0af --- /dev/null +++ b/TaskFlowDocs/2026-12-01-research-evidence/prd.md @@ -0,0 +1,59 @@ +# 研究证据进入 PRD、Spec 和 Plan +> Task version: v1 +> Status: planning + +## Goal + +研究型 TaskFlow 任务的读者能从问题、方法和执行计划追溯到证据,知道已核实什么、什么仍未知、哪些决定因证据发生改变,以及怎样独立复核。 + +## Task Kind + +- Kind: capability + +## Background / Confirmed Facts + +- TaskFlow 已分别记录某阶段使用的工具和外部来源。现有批准检查能确认声明的 URL 有记录,也能核对阶段的能力凭据。它们没有提供本地分析、计算或工具产物的统一证据索引,也没有要求证据进入各阶段的具体判断。 +- 用户确认,Agent 应主动建议标记已进入 TaskFlow、且以研究或数据分析作出主要判断的任务。已标记的任务才触发检查。 +- 用户确认,证据集中存一份,PRD、Spec 和 Plan 各写它改变的判断或步骤。未知可以保留,需写明影响与验证步骤。 + +## Research Evidence + +- Mode: required + +## Evidence Use + +- E-01: 将公开资料的验收样本拆成宿主提供的能力和候选代码消费唤醒的证据。单有官方说明时仍要保留真实宿主验证。 +- E-02: 将仓库内分析列为第一类证据。已有记录能证明已发生的执行,却不能推导从未出现的窗口,影响续跑需求的判定标准。 + +## Requirements + +1. 当已纳入 TaskFlow 的工作依赖研究、实验或数据分析解决主要决策时,Agent 主动识别并说明是否建议标记。零散引用和普通只读答复沿用现有流程。 +2. 已采用的证据在任务自己的 `reference/evidence.md` 中集中记录。公共文档、仓库源码与数据、可复算输出、已审阅工具或研究产物都可登记。来源、结论、复核办法与限制必须能辨认。 +3. PRD 把证据落到问题与判断标准。Spec 把证据落到方法、选型、样本或限制。Plan 把证据落到执行、验收或停止条件。每个记录文档引用证据 ID 并写明具体影响。允许记录经过明确说明的设计免写决定。 +4. 已标记研究任务的批准能定位缺项、无法解析的证据 ID、无复核方法以及只列名而没有具体内容的引用。证据仍未知时可以批准可执行的研究计划,写明未知、影响与核实步骤。已有普通任务的批准行为保持原口径。 +5. 共享记录只保留可分享或脱敏材料。模型和用户仍负责判断证据质量,工具调用次数、文件长度及材料表项的数量没有验收权重。 + +## Acceptance Criteria + +- A1:普通任务、只有零散资料链接的任务、只读答复不会因为缺少研究证据索引而改变行为。已标记的研究任务进入证据检查,缺项能定位到文件和证据 ID。 +- A2:一份公开来源和一份仓库内分析在各自的真实样例中可独立回查。三份规划文档引用相同 ID 但写出不同用途。无专用 Skill 的仓库样例仍通过结构检查。 +- A3:悬空、重复证据 ID,含糊空值、缺失索引或缺复核方法会阻止已标记任务批准。充分记录影响和验证步骤的未知可以通过。验证仍读取现有批准字段。 +- A4:一次任务从候选证据到批准完整跑通。测试包含 Markdown 示例围栏、Spec 免写、真实阶段能力台账和现有外部事实门。避免读出或保存仅供本机核验的原始材料。 + +## External Facts + +- Depends on external facts: yes +- Source: https://learn.chatgpt.com/docs/automations?surface=app +- What it settled: 公开样例可逐条核对真实宿主对本地项目的定时能力及运行前提。由任务的自有实现和真实运行举证具体执行行为。 + +## In Scope + +适用指引、任务内证据索引及三份文档模板、标记后的批准结构检查、两类可复核样例和针对性回归。 + +## Out of Scope + +强制使用某个研究 Skill,自动替用户搜集任意数据,服务器端保存证据,评分文档长度或自动判定结论真假。 + +## Open Questions + +已确认启用范围、集中记录方式与未知处理。本计划进入用户审批。 diff --git a/TaskFlowDocs/2026-12-01-research-evidence/reference/evidence.md b/TaskFlowDocs/2026-12-01-research-evidence/reference/evidence.md new file mode 100644 index 0000000..4b69198 --- /dev/null +++ b/TaskFlowDocs/2026-12-01-research-evidence/reference/evidence.md @@ -0,0 +1,15 @@ +# 研究证据索引 + +## E-01 + +- Source: https://learn.chatgpt.com/docs/automations?surface=app +- Finding: Codex 的本地定时任务可以在项目目录或独立工作树运行。依赖本地文件的运行需要对应机器和应用可用。宿主创建日程后,任务提示可以使用已配置的工具或技能。 +- Verify: 打开官方文档的本地项目和插件/技能段落。核对该能力描述没有替任何插件的候选分支证明具体执行成功。 +- Limitation: 文档说明宿主能力及前提。任务的窗口计算、检查点、工作树释放与关闭回执仍需通过实际运行核对。 + +## E-02 + +- Source: Git 基线 `92b10c6` 的 `hooks/task-run-context` 和 `hooks/task-dispatch`。 +- Finding: v1 的列表从已存在的窗口文件读取结果。派发入口接受一个已经给出的窗口。因此只能看到已留下记录的窗口,不能发现整周从未运行。 +- Verify: 在基线运行 `git show 92b10c6:hooks/task-run-context`,查看 `list_records` 的文件枚举。再用 `git show 92b10c6:hooks/task-dispatch` 核对参数和转发路径。 +- Limitation: 该检查描述候选版本开发之前的 v1 行为。它证明为什么 v2 需要从计划推导窗口。它不能证明另一个已配置日程实际触发。 diff --git a/TaskFlowDocs/2026-12-01-research-evidence/spec.md b/TaskFlowDocs/2026-12-01-research-evidence/spec.md new file mode 100644 index 0000000..745aa35 --- /dev/null +++ b/TaskFlowDocs/2026-12-01-research-evidence/spec.md @@ -0,0 +1,40 @@ +# Spec — 研究证据进入 PRD、Spec 和 Plan +> Task version: v1 + +## Objective and Success Criteria + +任务通过稳定证据 ID 把出处、复核方法和每阶段实际影响串起来。批准检查只覆盖明示标记的任务,验收以 PRD A1–A4 为准。 + +## Architecture Boundaries and Responsibilities + +任务内索引保存人能复核的证据。TaskFlow 检查声明、ID、结构和引用。Agent 或负责人核实证据真假、相关性和局限,负责决定能否支持结论。`Skills / Tools Used` 继续解释本阶段如何使用能力,`External Facts` 继续声明、核对文档所依赖的外部事实。 + +## Evidence Use + +- E-01: 索引将来源支持的范围、可复核的位置和限制分列。宿主公开说明不会自动作为某个候选版本已执行的结果。 +- E-02: 保存能定位到源码和提交的仓库证据,并允许直接通过读源码或复算复核。本机没有专用研究能力时仍有可核查输入。 + +## Interfaces, Data Flow, and Contracts + +1. PRD 通过唯一的 `## Research Evidence` 和 `- Mode: required` 标记。模板保持未启用状态,遇到以研究作决定的 TaskFlow 任务由 Agent 建议添加。只在已标记时检查证据。 +2. `reference/evidence.md` 用 `## E-XX` 标识一项已核实证据。字段为 `Source`、`Finding`、`Verify`、`Limitation`。来源是公共 URL 或明确的共享材料定位。Local command、计算方法、版本或章节写入复核位置。每个 ID 在任务内唯一。私人账户、内部密钥及未脱敏数据仅在原项目的私有位置保存。 +3. PRD、Spec 和 Plan 以 `## Evidence Use` 下的 `- E-XX: <对当前文档具体影响>` 引用索引。未核实处可用按组排列的 `Unknown`、`Impact`、`Verify`。结构只确认可核查的表述,语义由评审读原材料。 +4. 已标记任务每份实存核心文档至少有一条证据用途或一组完整未知。Spec 按现有约定免写时仍在 Plan 解释依据。只有实际引用了证据时索引才必须存在。 +5. `hooks/research-evidence ` 作为只读诊断入口,`hooks/task approve` 调用同一检查。失败给出文档名、字段或证据 ID,退出前不改变审批或任务状态。现有外部事实与能力台账验证继续执行。 +6. 证据索引允许组合来源和方法。阶段可复用其他阶段的证据,引用写明当前决策。后续新证据可追加新 ID 并修改相应判断,是否需要重新批准按现有任务版本规则处理。 + +## Invariants and Compatibility + +证据归属当前任务。不同任务或版本的材料需保持来源可追到原位置,并在本任务索引声明采用的具体范围。普通任务不额外要求证据文件。目录和 Markdown 示例中的结构不应被误判为生效声明。共享文档的链接和可复核方法不得指向只有撰写者可读的私有材料。 + +## Validation and Error Semantics + +拒绝重复标记、悬空引用、重复 ID、不完整的一组未知和缺失索引字段。要复核证据所主张的内容时去其原始来源。证据结构通过后仍需核对研究问题与真实来源的一致性。 + +## Design Decisions and Alternatives + +只增加一种可选标记、一个任务级索引、一个阶段用法小节。继续复用 TaskFlow 已有批准入口和 Markdown 限定字段,不增加第三方运行时或强制外部工具。 + +## Open Questions + +无待解决的需求选择。 diff --git a/TaskFlowDocs/todo.md b/TaskFlowDocs/todo.md index ac49ab8..0a1c7bd 100644 --- a/TaskFlowDocs/todo.md +++ b/TaskFlowDocs/todo.md @@ -35,6 +35,22 @@ has an issue number or URL. +## 让研究证据支撑研究型任务的 PRD、Spec 和 Plan + +- ID: TF-20261201-d3ab22 +- Status: promoted +- Priority: normal +- Owner: Unknown +- Source: 用户反馈 2026-12-01,规划长期研究后续时提出 +- Kind: capability +- Added: 2026-12-01 +- Updated: 2026-12-01 +- Goal: 让研究型任务的 PRD、Spec 和 Plan 使用可核对的研究证据,并说明证据实际改变了哪些问题、方法、决策和验收 +- Task: `TaskFlowDocs/2026-12-01-research-evidence/` +- Initial files: plan.md=e8622400e86885f9af5e24897526f30e4ef8088b1befe96f55adfcdc4ef2b610 prd.md=e7eff6153e7410460049d03174c9bdaab6dfcfa21d4ecd2c1b651bb7a5941853 spec.md=cabd33c8ea39fba3d5e4c1fe0cfa781daf7b01bd39c3c45459c92ca381e3dd94 +- Next action: Complete PRD / Spec / Plan and request approval. +- Notes: PRD 说明研究问题、已知事实、证据限制和判断标准。Spec 说明数据来源、样本和比较方法、无法验证的范围。Plan 写出可执行的采集、分析、复核和中止条件。评估如何复用实际来源、仓库文件、计算结果、图表或外部研究产物,例如 Web、MCP、Python 和研究 Skill 的输出。验收要能指明哪些证据影响了哪个决定、如何复核,允许无专用 Skill 的研究用本地或既有证据完成。 + ## 修复工作树写入口:重新领取已释放会话的占用,首次规划 - ID: TF-20261201-d77eb7 From 78cc61a3d83e122e686e62938075a7528c7d809b Mon Sep 17 00:00:00 2001 From: hkwuks <25031515+hkwuks@users.noreply.github.com> Date: Tue, 1 Dec 2026 22:22:40 +0800 Subject: [PATCH 2/6] feat: trace research evidence to TaskFlow planning decisions --- .../2026-12-01-research-evidence/plan.md | 41 ++-- .../2026-12-01-research-evidence/prd.md | 2 +- TaskFlowDocs/todo.md | 4 +- hooks/README.md | 2 + hooks/markdown-field | 10 +- hooks/research-evidence | 139 ++++++++++++ hooks/smoke-test | 1 + hooks/smoke-test-windows.ps1 | 2 +- hooks/task | 14 +- hooks/test-research-evidence | 204 ++++++++++++++++++ skills/taskflow/SKILL.md | 4 +- skills/taskflow/references/artifacts.md | 35 ++- skills/taskflow/references/runtime.md | 2 + 13 files changed, 427 insertions(+), 33 deletions(-) create mode 100755 hooks/research-evidence create mode 100755 hooks/test-research-evidence diff --git a/TaskFlowDocs/2026-12-01-research-evidence/plan.md b/TaskFlowDocs/2026-12-01-research-evidence/plan.md index 9cfc5d6..7d9ea35 100644 --- a/TaskFlowDocs/2026-12-01-research-evidence/plan.md +++ b/TaskFlowDocs/2026-12-01-research-evidence/plan.md @@ -1,6 +1,6 @@ # Plan — 研究证据进入 PRD、Spec 和 Plan > Task version: v1 -> Status: planning +> Status: checking ## Spec Pointers @@ -41,49 +41,52 @@ ## Approval -- Status: requested -- Approved by: pending -- Approved at: pending -- Approved version: pending -- Approved scope: pending +- Status: approved +- Approved by: user +- Approved at: 2026-12-01 22:10 +0800 +- Approved version: v1 +- Approved scope: PRD / Spec / Plan ## Steps ### Step 1 — 用两类证据走通三份文档 -- [ ] 更新 Skill 和工件规则,说明建议标记、集中索引、阶段用途以及未知写法。 -- [ ] 用 `reference/evidence.md` 的公开资料和本地分析构成可复核的样例,核对三份文件对同一证据写了不同的决定。 +- [x] 更新 Skill 和工件规则,说明建议标记、集中索引、阶段用途以及未知写法。 +- [x] 用 `reference/evidence.md` 的公开资料和本地分析构成可复核的样例,核对三份文件对同一证据写了不同的决定。 - Acceptance: 两个真实样例的来源、结论、限制和复核命令明确。一份研究结果的完整正文只存一处。 - Verification: 比对官方来源段落、Git 基线源码和三份规划文档的引用。检查没有专用 Skill 时的完整路线。 -- Status: pending +- Status: done ### Step 2 — 检查证据索引与阶段引用 -- [ ] 增加独立只读校验,解析任务标记、索引 ID、字段、阶段用途和未知组合。围栏中的示例不生效。 -- [ ] 给出指向文件和字段的错误。为公共 URL、仓库材料、重复 ID、悬空引用、完整未知和免写 Spec 建立针对性 fixture。 +- [x] 增加独立只读校验,解析任务标记、索引 ID、字段、阶段用途和未知组合。围栏中的示例不生效。 +- [x] 给出指向文件和字段的错误。为公共 URL、仓库材料、重复 ID、悬空引用、完整未知和免写 Spec 建立针对性 fixture。 - Acceptance: 完整证据和完整未知通过。不完整证据或无用法说明能准确拒绝。输入不引发文档写入。 - Verification: 运行新 fixture,使用正负用例核对具体错误与退出码。 -- Status: pending +- Status: done ### Step 3 — 接入 TaskFlow 审批 -- [ ] opt-in 任务复用同一校验结果。普通任务的审批与外部证据规则保持现有行为。 -- [ ] 批准前捕获缺项,检查失败时保留原状态。追加验证工作流使用的脚本清单。 +- [x] opt-in 任务复用同一校验结果。普通任务的审批与外部证据规则保持现有行为。 +- [x] 批准前捕获缺项,检查失败时保留原状态。追加验证工作流使用的脚本清单。 - Acceptance: 已标记的两阶段对照批准按预期通过或拒绝。既有无标记任务无额外门槛。 - Verification: 用真实 `task approve` 入口验证审批成功、缺证据时状态保持与 Spec 免写。 -- Status: pending +- Status: done ### Step 4 — 复核两类真实样例和运行差异 -- [ ] 对照公开来源和仓库内分析,解释证据分别改变需求、设计、执行和验收的哪个决定。 -- [ ] 核对工具观察、来源记录和阶段用途可分别阅读,检查共享证据定位无隐私内容。 +- [x] 对照公开来源和仓库内分析,解释证据分别改变需求、设计、执行和验收的哪个决定。 +- [x] 核对工具观察、来源记录和阶段用途可分别阅读,检查共享证据定位无隐私内容。 - Acceptance: 两个样例均由读者复核得到同样的结论边界。保留未知时有可执行的验证步骤。 - Verification: 记录真实样例审阅结果、结构校验、聚焦回归和三平台 CI。 -- Status: pending +- Status: in_progress ## Verification / Review -- 规划样例已读取公开来源和 Git 基线。当本 PRD、Spec、Plan 进入审批后,再实现检查器并用正反用例复核。 +- 公开来源和 Git 基线已核对。E-01 区分了宿主提供的调度能力与候选分支实际执行。E-02 说明为什么已存在的窗口文件无法发现整周漏跑。PRD、Spec 和 Plan 各自引用证据支持不同判断。 +- 新 fixture 通过 Windows 启动器验证,夹具路径含中文和空格。只读校验覆盖围栏、缺索引、缺复核方法、私有路径、重复与悬空 ID、占位文字和未知的验证步骤。 +- 真实审批入口通过正反例。普通任务图样不触发检查。被拦截时 PRD、Spec、Plan 和 Todo 内容保持原样。已标记任务依然校验外部事实查证。有可执行验证步骤的未知可以批准,Spec 免写仍可使用。 +- 既有能力证据归因 fixture、Skill 快速校验、插件发布元数据校验和 Git 差异检查均通过。三平台 CI 随此任务的 PR 验证。 - 回退顺序:先撤批准入口,再撤校验器与模板。用户已有证据笔记继续可读。 ## Change Log diff --git a/TaskFlowDocs/2026-12-01-research-evidence/prd.md b/TaskFlowDocs/2026-12-01-research-evidence/prd.md index d85d0af..aaed509 100644 --- a/TaskFlowDocs/2026-12-01-research-evidence/prd.md +++ b/TaskFlowDocs/2026-12-01-research-evidence/prd.md @@ -1,6 +1,6 @@ # 研究证据进入 PRD、Spec 和 Plan > Task version: v1 -> Status: planning +> Status: checking ## Goal diff --git a/TaskFlowDocs/todo.md b/TaskFlowDocs/todo.md index 0a1c7bd..eb43e39 100644 --- a/TaskFlowDocs/todo.md +++ b/TaskFlowDocs/todo.md @@ -38,7 +38,7 @@ has an issue number or URL. ## 让研究证据支撑研究型任务的 PRD、Spec 和 Plan - ID: TF-20261201-d3ab22 -- Status: promoted +- Status: in_progress - Priority: normal - Owner: Unknown - Source: 用户反馈 2026-12-01,规划长期研究后续时提出 @@ -48,7 +48,7 @@ has an issue number or URL. - Goal: 让研究型任务的 PRD、Spec 和 Plan 使用可核对的研究证据,并说明证据实际改变了哪些问题、方法、决策和验收 - Task: `TaskFlowDocs/2026-12-01-research-evidence/` - Initial files: plan.md=e8622400e86885f9af5e24897526f30e4ef8088b1befe96f55adfcdc4ef2b610 prd.md=e7eff6153e7410460049d03174c9bdaab6dfcfa21d4ecd2c1b651bb7a5941853 spec.md=cabd33c8ea39fba3d5e4c1fe0cfa781daf7b01bd39c3c45459c92ca381e3dd94 -- Next action: Complete PRD / Spec / Plan and request approval. +- Next action: 本地功能和真实批准入口回归已通过。独立提交研究证据 PR 后核对三平台 CI。 - Notes: PRD 说明研究问题、已知事实、证据限制和判断标准。Spec 说明数据来源、样本和比较方法、无法验证的范围。Plan 写出可执行的采集、分析、复核和中止条件。评估如何复用实际来源、仓库文件、计算结果、图表或外部研究产物,例如 Web、MCP、Python 和研究 Skill 的输出。验收要能指明哪些证据影响了哪个决定、如何复核,允许无专用 Skill 的研究用本地或既有证据完成。 ## 修复工作树写入口:重新领取已释放会话的占用,首次规划 diff --git a/hooks/README.md b/hooks/README.md index b47e957..2f395ac 100644 --- a/hooks/README.md +++ b/hooks/README.md @@ -55,6 +55,7 @@ taskflow/hooks/ ├── approval-check # the one rule for whether a Plan's current version is approved ├── completion-gate # the one rule for what counts as an approved, finished Plan ├── markdown-field # read task metadata outside fenced examples +├── research-evidence # check evidence references for marked research tasks ├── version-baseline # verify each task version has a Git rollback point ├── task # explicit intake/promote/unpromote/state/progress/unaided/recover/complete edits ├── archive # full archive transaction (incl. Todo update) @@ -70,6 +71,7 @@ taskflow/hooks/ ├── run-hook.cmd # cross-platform launcher (polyglot batch/bash) ├── test-capability-attribution # task and stage attribution regression ├── test-capability-context # invocation context regression +├── test-research-evidence # evidence structure and approval regression ├── test-host-parity # synthetic host event and capability declaration fixture ├── smoke-test-windows.ps1 # Windows PowerShell/cmd lifecycle regression ├── test-multi-todo # shared task and per-item lifecycle regression diff --git a/hooks/markdown-field b/hooks/markdown-field index 465dcd0..7a5c901 100644 --- a/hooks/markdown-field +++ b/hooks/markdown-field @@ -1,11 +1,11 @@ #!/usr/bin/env bash # Read exactly one document metadata field outside fenced Markdown examples. set -euo pipefail -[ "$#" -eq 2 ] || { echo 'usage: markdown-field ' >&2; exit 1; } -case "$1" in 'Task version'|Status|'Todo Record'|'Todo entry'|Check) ;; *) echo 'unsupported metadata field' >&2; exit 1 ;; esac +[ "$#" -eq 2 ] || { echo 'usage: markdown-field ' >&2; exit 1; } +case "$1" in 'Task version'|Status|'Todo Record'|'Todo entry'|Check|Content) ;; *) echo 'unsupported metadata field' >&2; exit 1 ;; esac awk -v field="$1" ' { - text = $0; sub(/\r$/, "", text) + raw = $0; sub(/\r$/, "", raw); text = raw for (indent = 0; indent < 3 && substr(text, 1, 1) == " "; indent++) text = substr(text, 2) marker = substr(text, 1, 1); run = 0 if (marker == "`" || marker == "~") while (substr(text, run + 1, 1) == marker) run++ @@ -17,6 +17,7 @@ awk -v field="$1" ' fence = marker; fence_len = run; next } if (field == "Check") next + if (field == "Content") { print raw; next } if (field == "Todo Record") { if ($0 == "## Todo Record") count++; next } if (field == "Todo entry") { if ($0 ~ /^## /) { inside = 1; id = task = 0 } @@ -31,9 +32,10 @@ awk -v field="$1" ' END { if (fence != "") { print "unclosed Markdown fence" > "/dev/stderr"; exit 1 } if (field == "Check") { print "ok"; exit 0 } + if (field == "Content") exit 0 if (field == "Todo Record") { if (count > 1) { print "ambiguous Todo Record" > "/dev/stderr"; exit 1 } print count + 0; exit 0 } if (field == "Todo entry") { print found + 0; exit 0 } if (count != 1 || value == "") { print "missing or ambiguous " field > "/dev/stderr"; exit 1 } print value } -' "$2" \ No newline at end of file +' "$2" diff --git a/hooks/research-evidence b/hooks/research-evidence new file mode 100755 index 0000000..5114958 --- /dev/null +++ b/hooks/research-evidence @@ -0,0 +1,139 @@ +#!/usr/bin/env bash +# Check evidence traceability for explicitly marked research tasks. +set -euo pipefail +HERE="$(cd "$(dirname "$0")" && pwd)" +[ "$#" -eq 1 ] || { echo 'Usage: research-evidence ' >&2; exit 2; } +task_dir="$1" +blocked() { printf 'research evidence: %s\n' "$*" >&2; exit 3; } +visible() { bash "$HERE/markdown-field" Content "$1"; } +[ -f "$task_dir/prd.md" ] || blocked 'prd.md is unavailable.' +prd="$(visible "$task_dir/prd.md")" || blocked 'Cannot read prd.md.' +marker="$(awk ' + /^## Research Evidence$/ { sections++; inside=1; next } + /^# / || /^## / { inside=0 } + inside && /^- Mode:/ { modes++; if ($0 ~ /^- Mode: required[[:space:]]*$/) required=1 } + END { + if (!sections) exit 0 + if (sections!=1 || modes!=1 || !required) exit 3 + print "required" + } +' <<< "$prd")" || blocked 'prd.md needs one Research Evidence section with - Mode: required.' +[ "$marker" = required ] || exit 0 + +common=' + function value(line, result) { + result=substr(line,index(line,":")+1) + sub(/^[[:space:]]+/,"",result) + sub(/[[:space:]]+$/,"",result) + return result + } + function meaningful(text, normalized) { + normalized=tolower(text) + gsub(/[[:space:]]/,"",normalized) + return normalized!="" && normalized !~ /^(\?|[-_.…]+|todo|tbd|pending|placeholder|unknown|none|n\/a|待定|待补|暂无|未知|略)$/ + } + function note(message) { + print "research evidence: " subject ": " message > "/dev/stderr" + failed=1 + } +' +uses() { + awk -v subject="$1" "$common"' + function close_unknown() { + if (unknown==1) note("the Unknown entry needs Impact and Verify.") + if (unknown==2) note("the Unknown entry needs Verify.") + unknown=0 + } + /^## Evidence Use$/ { close_unknown(); sections++; inside=1; next } + /^# / || /^## / { close_unknown(); inside=0 } + !inside { next } + /^- E-[0-9][0-9]+:/ { + close_unknown() + id=substr($0,3,index($0,":")-3) + if (!meaningful(value($0))) note(id " needs a concrete decision or step.") + else { print subject ":" id; entries++ } + next + } + /^- E-/ { note("use - E-01: followed by the decision or step it informs."); next } + /^- Unknown:/ { + close_unknown() + if (!meaningful(value($0))) note("Unknown needs an unresolved question.") + unknown=1 + next + } + /^- Impact:/ { + if (unknown!=1 || !meaningful(value($0))) note("Unknown needs a concrete Impact after its question.") + else unknown=2 + next + } + /^- Verify:/ { + if (unknown!=2 || !meaningful(value($0))) note("Unknown needs a concrete Verify step after Impact.") + else { entries++; unknown=0 } + } + END { + close_unknown() + if (sections!=1) note("write one Evidence Use section.") + if (!entries) note("add a supported decision or an Unknown with Impact and Verify.") + if (failed) exit 3 + } + ' <<< "$2" +} +index_ids() { + awk -v subject=reference/evidence.md "$common"' + /^## E-[0-9][0-9]+[[:space:]]*$/ { + id=$2 + if (id in indexed) note(id " is declared more than once.") + indexed[id]=1 + next + } + /^## E-/ { note("use an evidence ID heading such as ## E-01."); id=""; next } + /^# / || /^## / { id=""; next } + id!="" && /^- (Source|Finding|Verify|Limitation):/ { + field=substr($0,3,index($0,":")-3) + entry=value($0) + if (seen[id,field]++) note(id " repeats " field ".") + if (!meaningful(entry)) note(id " needs meaningful " field ".") + if (field=="Source") { + path=entry + sub("^" sprintf("%c",96), "", path) + if (path ~ /^(file:|[A-Za-z]:[\\\/]|[~\/\\])/) + note(id " needs a public URL or shareable repository-relative source.") + } + } + END { + split("Source Finding Verify Limitation", fields, " ") + for (id in indexed) { + for (i=1;i<=4;i++) if (!seen[id,fields[i]]) note(id " needs " fields[i] ".") + print id + } + if (failed) exit 3 + } + ' <<< "$1" +} +plan="$(visible "$task_dir/plan.md")" || blocked 'Cannot read plan.md.' +prd_refs="$(uses prd.md "$prd")" || exit $? +plan_refs="$(uses plan.md "$plan")" || exit $? +spec_refs='' +if [ -f "$task_dir/spec.md" ]; then + spec="$(visible "$task_dir/spec.md")" || blocked 'Cannot read spec.md.' + spec_refs="$(uses spec.md "$spec")" || exit $? +else + awk ' + /^## Spec Pointers$/ { inside=1; next } + /^# / || /^## / { inside=0 } + inside && /^No spec required —[[:space:]]+[^[:space:]]/ { found++ } + END { exit found!=1 } + ' <<< "$plan" || blocked 'plan.md needs a reason for omitting spec.md under Spec Pointers.' +fi + +index="$task_dir/reference/evidence.md" +if [ -z "$prd_refs$spec_refs$plan_refs" ] && [ ! -e "$index" ] && [ ! -L "$index" ]; then exit 0; fi +[ ! -L "$task_dir/reference" ] && [ ! -L "$index" ] || + blocked 'reference/evidence.md must be an ordinary task file.' +[ -f "$index" ] || blocked 'reference/evidence.md is missing for the cited evidence IDs.' +reference_text="$(visible "$index")" || blocked 'Cannot read reference/evidence.md.' +ids="$(index_ids "$reference_text")" || exit $? +while IFS=: read -r doc id; do + [ -n "$id" ] || continue + grep -Fxq -- "$id" <<< "$ids" || blocked "$doc cites $id, which is missing from reference/evidence.md." +done <<< "$prd_refs"$'\n'"$spec_refs"$'\n'"$plan_refs" diff --git a/hooks/smoke-test b/hooks/smoke-test index 4672fa0..0ce40d0 100755 --- a/hooks/smoke-test +++ b/hooks/smoke-test @@ -36,6 +36,7 @@ bash "$HERE/test-ledger-lock" "$tmp/ledger-lock-fixture" bash "$HERE/test-reuse-worktree" "$tmp/reuse-worktree-fixture" bash "$HERE/test-capability-context" "$tmp/capability-context-fixture" bash "$HERE/test-capability-attribution" "$tmp/capability-attribution-fixture" +bash "$HERE/test-research-evidence" "$tmp/research-evidence-fixture" bash "$HERE/test-base-document-permit" bash "$HERE/test-worktree-candidates" bash "$HERE/test-worktree-ownership" diff --git a/hooks/smoke-test-windows.ps1 b/hooks/smoke-test-windows.ps1 index 8485b95..4155e21 100755 --- a/hooks/smoke-test-windows.ps1 +++ b/hooks/smoke-test-windows.ps1 @@ -343,7 +343,7 @@ try { # can be caught automatically. # if ($env:TASKFLOW_STDIN_SELFCHECK -ne '1') { - foreach ($fixtureTest in @('test-ledger-lock', 'test-reuse-worktree', 'test-recurring-tasks')) { + foreach ($fixtureTest in @('test-ledger-lock', 'test-reuse-worktree', 'test-recurring-tasks', 'test-research-evidence')) { & "$here\run-hook.cmd" $fixtureTest (Join-Path $Root $fixtureTest) if ($LASTEXITCODE -ne 0) { throw "$fixtureTest failed" } } diff --git a/hooks/task b/hooks/task index 377c204..e007319 100755 --- a/hooks/task +++ b/hooks/task @@ -1709,10 +1709,16 @@ case "$command" in /^## (Skills \/ Tools Used|Plan Review|Verification \/ Review|Change Log|Steps)$/ { if (++seen[$0] > 1) bad = 1 } END { exit bad } ' "$plan" || fail "duplicate reserved Plan section; approval not written" - [ ! -f "$prd" ] || awk "$fence_rules"' - /^## (External Facts|Task Kind)$/ { if (++seen[$0] > 1) bad = 1 } - END { exit bad } - ' "$prd" || fail "duplicate reserved PRD section; approval not written" + if [ -f "$prd" ]; then + research_mark="$(awk "$fence_rules"' + /^## (External Facts|Task Kind)$/ { if (++seen[$0] > 1) bad = 1 } + /^## Research Evidence$/ { research=1 } + END { if (bad) exit 1; if (research) print "required" } + ' "$prd")" || fail "duplicate reserved PRD section; approval not written" + if [ "$research_mark" = required ]; then + bash "$SCRIPT_DIR/research-evidence" "$base" || fail "approve blocked: repair the research evidence above; approval not written." + fi + fi # Reconcile each stage with its own validated release or declaration. cap_git_dir="$(git -C "$root" rev-parse --absolute-git-dir 2>/dev/null)" || cap_git_dir="" cap_released="$cap_git_dir/taskflow/released" diff --git a/hooks/test-research-evidence b/hooks/test-research-evidence new file mode 100755 index 0000000..3314bdd --- /dev/null +++ b/hooks/test-research-evidence @@ -0,0 +1,204 @@ +#!/usr/bin/env bash +# Exercise the evidence checker and the actual approval entry point. +set -euo pipefail +HERE="$(cd "$(dirname "$0")" && pwd)" +[ "$#" -eq 1 ] && [ ! -e "$1" ] || exit 2 +mkdir -p "$1" +fixture="$(cd "$1" && pwd -P)" +samples="$fixture/samples"; public=https://example.invalid/research-evidence/guide +mkdir -p "$samples/reference" +checker() { bash "$HERE/research-evidence" "$1"; } +expect_error() { + local expected="$1" message="$2" rc=0 + shift 2 + "$@" > "$fixture/diagnostic" 2>&1 || rc=$? + if [ "$rc" -ne "$expected" ] || ! grep -Fq -- "$message" "$fixture/diagnostic"; then + printf 'Expected exit %s with %s, got %s\n' "$expected" "$message" "$rc" >&2 + cat "$fixture/diagnostic" >&2 + exit 1 + fi +} +declare_research() { printf '\n## Research Evidence\n\n- Mode: required\n'; } +evidence_use() { printf '\n## Evidence Use\n\n- %s: %s\n' "$1" "$2"; } +unknown_use() { + printf '\n## Evidence Use\n\n- Unknown: Does the new client preserve local timestamps?\n- Impact: This constrains the portable parsing decision.\n- Verify: Replay the documented sample in both host environments.\n' +} +index_text() { + cat < "$samples/prd.md" +checker "$samples" +declare_research >> "$samples/prd.md" +evidence_use E-01 'Keep the acceptance tied to the documented host behavior.' >> "$samples/prd.md" +evidence_use E-02 'Choose date enumeration instead of scanning only stored windows.' > "$samples/spec.md" +evidence_use E-02 'Build a fixture with an entirely absent weekly result.' > "$samples/plan.md" +index_text > "$samples/reference/evidence.md" +before="$(git hash-object "$samples/prd.md" "$samples/spec.md" "$samples/plan.md" "$samples/reference/evidence.md")" +checker "$samples" +[ "$before" = "$(git hash-object "$samples/prd.md" "$samples/spec.md" "$samples/plan.md" "$samples/reference/evidence.md")" ] + +mv "$samples/reference/evidence.md" "$fixture/verified-index" +expect_error 3 'reference/evidence.md is missing' checker "$samples" +sed '/^- Verify: Check the source section/d' "$fixture/verified-index" > "$samples/reference/evidence.md" +expect_error 3 'E-01 needs Verify' checker "$samples" +sed 's@^- Source: https://.*@- Source: C:/Users/example/private.txt@' "$fixture/verified-index" > "$samples/reference/evidence.md" +expect_error 3 'E-01 needs a public URL or shareable repository-relative source' checker "$samples" +sed -e 's@^## E-02$@## E-01@' "$fixture/verified-index" > "$samples/reference/evidence.md" +expect_error 3 'E-01 is declared more than once' checker "$samples" +cp "$fixture/verified-index" "$samples/reference/evidence.md" +evidence_use E-42 'Use the source to select the observation duration.' > "$samples/spec.md" +expect_error 3 'spec.md cites E-42' checker "$samples" +evidence_use E-01 'TODO' > "$samples/spec.md" +expect_error 3 'spec.md: E-01 needs a concrete decision' checker "$samples" +evidence_use E-02 'Limit output claims to verified windows.' > "$samples/spec.md" +printf '~~~~markdown\n## Evidence Use\n- E-999: Example only.\n~~~~\n' >> "$samples/plan.md" +checker "$samples" +declare_research >> "$samples/prd.md" +expect_error 3 'needs one Research Evidence section' checker "$samples" + +declare_research > "$samples/prd.md" +unknown_use >> "$samples/prd.md" +mv "$samples/spec.md" "$fixture/old-spec" +mv "$samples/reference/evidence.md" "$fixture/old-index" +printf '## Spec Pointers\n\nNo spec required — small research question.\n' > "$samples/plan.md" +unknown_use >> "$samples/plan.md" +checker "$samples" +sed '/^- Verify:/d' "$samples/plan.md" > "$fixture/missing-verify" +mv "$fixture/missing-verify" "$samples/plan.md" +expect_error 3 'plan.md: the Unknown entry needs Verify.' checker "$samples" +printf '%s\n' 'PASS read-only evidence validation, scoped activation, coverage and unknowns' + +repo="$fixture/repo"; work="$fixture/approval checkout" +git init -qb main "$repo" +git -C "$repo" -c user.name=Fixture -c user.email=fixture@example.invalid -c commit.gpgsign=false commit -qm initial --allow-empty +git -C "$repo" worktree add -qb feature/research-fixture "$work" +cd "$work" +export TASKFLOW_SESSION_ID=research-evidence-fixture +task_command() { bash "$HERE/task" "$@"; } +ready_plan() { + local size="$1" + cat <<'PLAN' +# Fixture +> Task version: v1 +> Status: planning + +## Spec Pointers + +PLAN + if [ "$size" = small ]; then echo 'No spec required — isolated decision.'; else echo '- spec.md'; fi + cat <<'PLAN' + +## Skills / Tools Used + +- [PRD] Unaided — considered: requirements elicitation and framing +- [Plan] Unaided — considered: work breakdown and task decomposition +- [Test] Unaided — considered: testing strategy +PLAN + if [ "$size" = large ]; then echo '- [Spec] Unaided — considered: architecture and design specification'; fi + cat <<'PLAN' + +## Plan Review + +- Verdict: sound +- Coverage: The fixture verifies the approved behavior. +- Verifiability: Check the approval state and outcome. +- Layer ownership: The fixture supplies input to the real checker. + +## Approval + +- Status: requested +- Approved by: pending +- Approved at: pending +- Approved version: pending +- Approved scope: pending +PLAN +} +prepare() { + local slug="$1" size="$2" goal="$3" todo + task_command intake "$goal" fixture --local > "$fixture/intake" + todo="$(awk '/^intake OK:/ { print $3 }' "$fixture/intake")" + task_command promote "$todo" "$slug" "$size" --kind capability >/dev/null + export TASKFLOW_TASK_ID="$slug" + task_dir="TaskFlowDocs/$slug" + ready_plan "$size" > "$task_dir/plan.md" + task_command unaided PRD --considered 'requirements elicitation and framing' >/dev/null + task_command unaided Plan --considered 'work breakdown and task decomposition' >/dev/null + task_command unaided Test --considered 'testing strategy' >/dev/null + if [ "$size" = large ]; then task_command unaided Spec --considered 'architecture and design specification' >/dev/null; fi +} +commit_fixture() { + git add -- TaskFlowDocs + git -c user.name=Fixture -c user.email=fixture@example.invalid -c commit.gpgsign=false commit -qm "$1" +} +prepare 2026-12-01-plain-approval small 'Verify ordinary document routing' +cat > "$task_dir/prd.md" <<'PRD' +# Ordinary task +> Task version: v1 +> Status: planning + +## External Facts + +- Depends on external facts: no +- Why not: The local decision follows from `prd.md`. + +~~~~markdown +## Research Evidence +- Mode: required +~~~~ +PRD +task_command approve "$TASKFLOW_TASK_ID" fixture >/dev/null +grep -qF -- '- Status: approved' "$task_dir/plan.md" +commit_fixture 'Record ordinary approval' + +prepare 2026-12-01-research-approval large 'Compare sources for observation methods' +printf '# Marked task\n> Task version: v1\n> Status: planning\n\n## External Facts\n\n- Depends on external facts: yes\n- Source: %s\n- What it settled: Defines where the fixture can run.\n' "$public" > "$task_dir/prd.md" +declare_research >> "$task_dir/prd.md" +evidence_use E-01 'Follow the documented local execution scope.' >> "$task_dir/prd.md" +printf '# Spec\n> Task version: v1\n' > "$task_dir/spec.md" +evidence_use E-02 'Use the existing record shape for checkpoints.' >> "$task_dir/spec.md" +evidence_use E-02 'Include a window without a checkpoint in the test.' >> "$task_dir/plan.md" +before="$(git hash-object "$task_dir/prd.md" "$task_dir/spec.md" "$task_dir/plan.md" TaskFlowDocs/todo.md)" +expect_error 1 'reference/evidence.md is missing' task_command approve "$TASKFLOW_TASK_ID" fixture +[ "$before" = "$(git hash-object "$task_dir/prd.md" "$task_dir/spec.md" "$task_dir/plan.md" TaskFlowDocs/todo.md)" ] +mkdir -p "$task_dir/reference" +index_text > "$task_dir/reference/evidence.md" +expect_error 1 'no lookup backs' task_command approve "$TASKFLOW_TASK_ID" fixture +[ "$before" = "$(git hash-object "$task_dir/prd.md" "$task_dir/spec.md" "$task_dir/plan.md" TaskFlowDocs/todo.md)" ] +task_command external "$public" --why 'Synthetic lookup provenance for this approval fixture.' >/dev/null +task_command approve "$TASKFLOW_TASK_ID" fixture >/dev/null +grep -qF -- '- Status: approved' "$task_dir/plan.md" +commit_fixture 'Record sourced research approval' + +prepare 2026-12-01-open-research small 'Investigate unresolved local timestamp behavior' +cat > "$task_dir/prd.md" <<'PRD' +# Open research +> Task version: v1 +> Status: planning + +## External Facts + +- Depends on external facts: no +- Why not: Run the comparison locally, as specified in `plan.md`. +PRD +declare_research >> "$task_dir/prd.md" +unknown_use >> "$task_dir/prd.md" +unknown_use >> "$task_dir/plan.md" +task_command approve "$TASKFLOW_TASK_ID" fixture >/dev/null +grep -qF -- '- Status: approved' "$task_dir/plan.md" +printf '%s\n' 'PASS approval preserves plain tasks, checks sources, and accepts a testable unknown without a Spec' diff --git a/skills/taskflow/SKILL.md b/skills/taskflow/SKILL.md index 5515b4f..93747e6 100644 --- a/skills/taskflow/SKILL.md +++ b/skills/taskflow/SKILL.md @@ -275,7 +275,7 @@ Record which repository documents were inspected and which apply. If remote PR-r **Before this phase converges, ask where the answer comes from.** A requirement earned from memory is indistinguishable, in the document, from one earned by looking — and everything this phase is told to inspect is inside the repository, so nothing here prompts the question. Ask it once, explicitly: *which of these conclusions would a reader have to check against something outside this repository* — a version, a specification, another project's documented behaviour, a price, a limit. When the answer is none, say so in `## External Facts` and point at where the reasoning is settled inside the repository; when it is not none, go and look before writing the criterion, and the lookup is recorded for you. If looking is what the criterion needs, look: you are allowed to search, and nothing about this workflow treats a lookup as scope creep. A `yes` with no lookup behind it is refused by `task approve`, which is the whole point: the field records a decision, and the record makes the decision checkable. Do not answer `no` because the work feels internal — that is the default this question exists to displace. -Expose assumptions and turn vague requests into testable criteria using the approach that best fits the task. Do not silently decide product, compatibility, or risk questions owned by the user. +Expose assumptions and turn vague requests into testable criteria using the approach that best fits the task. When research or data analysis informs a material decision, propose the [research evidence workflow](references/artifacts.md#research-evidence-in-planning) before drafting the PRD. Do not silently decide product, compatibility, or risk questions owned by the user. **When the request is to fix something already wrong, find out why before writing what should be true.** A defect request is not a feature request with a different subject line. Its requirements come from an explanation of the current behaviour, and without one the only requirements available are descriptions of the symptom — which is how a task ends up delivering a marker beside the defect instead of a change to it. So a task promoted with `--kind defect` opens this phase by invoking a capability of the investigating kind (`root cause`, `defect investigation`), or by recording that none was available: `hooks/task unaided PRD --considered 'root cause investigation'`. `hooks/task approve` refuses a defect task's PRD that does neither. @@ -287,6 +287,8 @@ Expose assumptions and turn vague requests into testable criteria using the appr Use `reference/` only when external evidence, codebase investigation, experiments, or papers materially affect the decision. Preserve external originals; write conclusions, source status, and links in team-maintained notes. If `reference/index.md` exists, treat it as navigation, not a second requirements source. +For a task that selects the research evidence workflow, mark its PRD and record reviewed findings in the task's evidence index. Use existing materials and available capabilities. In the PRD, explain the question or acceptance decision each finding informs. In the Spec, explain its effect on the method or design. In the Plan, explain its effect on execution, verification, or the decision to stop. For an open question, record its impact and how to verify it. Only marked tasks run the evidence check at approval. + Agent suggestions may mark evidence as candidate. Only the Primary Agent or user confirms `verified`, `rejected`, or `superseded` status. ### 3. Design — Spec decision diff --git a/skills/taskflow/references/artifacts.md b/skills/taskflow/references/artifacts.md index ff4d560..30619dc 100644 --- a/skills/taskflow/references/artifacts.md +++ b/skills/taskflow/references/artifacts.md @@ -237,6 +237,39 @@ Put lightweight dependency links in `plan.md`: `Parent` and `Children` carry direction; `Related` is symmetric and covers tasks with neither. `Parent` names the Task version the link was planned against, because that is the version the relationship was reasoned from — the coordination rules that use it are in `SKILL.md` (Existing-task-first selection). Do not create a global task index solely for these links. +## Research evidence in planning + +Propose this workflow when research or data analysis informs a material decision in a TaskFlow task. The selected task declares the workflow in its PRD. + +```markdown +## Research Evidence + +- Mode: required +``` + +Record one entry per reviewed finding in `reference/evidence.md`. Keep the reference to a public source, tracked repository material, or shareable output. Adopt useful findings from external or local tools after review. Keep raw private data at its existing location and use a shareable result or a redacted reference. + +```markdown +## E-01 + +- Source: the public URL, repository file and revision, or shared result +- Finding: the claim the source supports +- Verify: the section, command, or method a reader can use to check it +- Limitation: the evidence boundary that matters to the decision +``` + +In each of the PRD, Spec, and Plan, add one `## Evidence Use` section. One entry can inform different decisions across documents. Link its ID with `- E-01: `. In the PRD explain its effect on a question or acceptance criterion. In the Spec explain its effect on a method, design, or limitation. In the Plan explain its effect on the execution sequence, a verification step, or a stop condition. If the existing small-task route omits a Spec, record the usual reason under Plan's `## Spec Pointers` and explain the design decision in the Plan. + +If an answer depends on evidence that has not arrived, use a group of three lines in that document's Evidence Use section. + +```markdown +- Unknown: which observation remains unresolved +- Impact: which decision is constrained by this gap +- Verify: how and when to close it +``` + +At least one supported decision or complete Unknown group belongs in each applicable document. An index is required when a document cites an evidence ID. In a marked task, `bash /research-evidence ` checks the same structure as `task approve`. Review each underlying source, its limitations, and the decision it informs before approval. Keep the existing `External Facts` and `Skills / Tools Used` records for external lookups and stage activity. + ## Reference index when needed When `reference/` is large enough to need navigation, add `reference/index.md` and list each item with: @@ -250,7 +283,7 @@ When `reference/` is large enough to need navigation, add `reference/index.md` a - Integrity: file hash or access date when useful ``` -Do not alter external source files to add status metadata. Update the index or a team-authored note instead. +Do not alter external source files to add status metadata. Update the index or a team-authored note. When `reference/evidence.md` exists, link to it from the navigation index. ## Session outline diff --git a/skills/taskflow/references/runtime.md b/skills/taskflow/references/runtime.md index 189fc0d..94af84f 100644 --- a/skills/taskflow/references/runtime.md +++ b/skills/taskflow/references/runtime.md @@ -407,6 +407,7 @@ repo-root/ ├── approval-check # the one rule for whether a Plan's version is approved ├── completion-gate # the one rule for an approved, finished Plan ├── markdown-field # read task metadata outside fenced examples + ├── research-evidence # check evidence references for marked research tasks ├── version-baseline # verify each task version has a Git rollback point ├── task # explicit intake/promote/state/progress/unaided/complete ├── summarize-state # shared state-summary generator @@ -422,6 +423,7 @@ repo-root/ ├── todo-check # no merge in a commit or rev range dropped a Todo entry ├── test-capability-attribution # task and stage attribution regression ├── test-capability-context # invocation context regression + ├── test-research-evidence # evidence structure and approval regression ├── test-host-parity # synthetic host event and declaration fixture ├── smoke-test-windows.ps1 # PowerShell/cmd full lifecycle regression ├── test-multi-todo # shared task and per-item lifecycle regression From d747926c61f8e1b73b18a479aebacd3916b8222e Mon Sep 17 00:00:00 2001 From: hkwuks <25031515+hkwuks@users.noreply.github.com> Date: Tue, 1 Dec 2026 23:06:39 +0800 Subject: [PATCH 3/6] fix: recheck research evidence before task completion --- TaskFlowDocs/2026-12-01-research-evidence/plan.md | 3 +++ hooks/completion-gate | 7 +++++++ hooks/test-research-evidence | 8 ++++++++ skills/taskflow/references/artifacts.md | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/TaskFlowDocs/2026-12-01-research-evidence/plan.md b/TaskFlowDocs/2026-12-01-research-evidence/plan.md index 7d9ea35..d635164 100644 --- a/TaskFlowDocs/2026-12-01-research-evidence/plan.md +++ b/TaskFlowDocs/2026-12-01-research-evidence/plan.md @@ -89,6 +89,9 @@ - 既有能力证据归因 fixture、Skill 快速校验、插件发布元数据校验和 Git 差异检查均通过。三平台 CI 随此任务的 PR 验证。 - 回退顺序:先撤批准入口,再撤校验器与模板。用户已有证据笔记继续可读。 +- 2026-12-01:Windows Git Bash 的证据和批准端到端夹具通过。标记后的索引被移走时,task complete 拒绝完成,四份文件的指纹和归档目录状态保持原样。恢复索引后共享完成校验通过。 + ## Change Log +- 2026-12-01 — 工作修订,审批后索引缺失仍可通过完成检查。将已标记任务的同一证据校验接到共享完成入口,并加入原状态保留的回归。 - 2026-12-01 v1 — 用户确认三项需求边界,编写研究证据落地方案。 diff --git a/hooks/completion-gate b/hooks/completion-gate index ec487f6..c528a9e 100644 --- a/hooks/completion-gate +++ b/hooks/completion-gate @@ -189,4 +189,11 @@ result="$(awk -v approval_only="$approval_only" ' exit bad } ' "$plan")" || { printf '%s\n' "$result" >&2; exit 1; } + +# Evidence referenced by an approved research task must still be available +# when either completion entry point archives it. Mid-task callers exit above. +prd="$1/prd.md" +if [ -f "$prd" ] && grep -Eq '^## Research Evidence[[:space:]]*$' "$prd"; then + bash "$HERE/research-evidence" "$1" || exit 1 +fi exit 0 diff --git a/hooks/test-research-evidence b/hooks/test-research-evidence index 3314bdd..9cee8ee 100755 --- a/hooks/test-research-evidence +++ b/hooks/test-research-evidence @@ -183,6 +183,14 @@ expect_error 1 'no lookup backs' task_command approve "$TASKFLOW_TASK_ID" fixtur task_command external "$public" --why 'Synthetic lookup provenance for this approval fixture.' >/dev/null task_command approve "$TASKFLOW_TASK_ID" fixture >/dev/null grep -qF -- '- Status: approved' "$task_dir/plan.md" +before="$(git hash-object "$task_dir/prd.md" "$task_dir/spec.md" "$task_dir/plan.md" TaskFlowDocs/todo.md)" +mv "$task_dir/reference/evidence.md" "$fixture/saved-evidence" +expect_error 1 'reference/evidence.md is missing' task_command complete "$TASKFLOW_TASK_ID" --user-accepted +[ "$before" = "$(git hash-object "$task_dir/prd.md" "$task_dir/spec.md" "$task_dir/plan.md" TaskFlowDocs/todo.md)" ] +[ ! -e "TaskFlowDocs/achieved/$TASKFLOW_TASK_ID" ] +bash "$HERE/completion-gate" --approval-only "$task_dir" +mv "$fixture/saved-evidence" "$task_dir/reference/evidence.md" +bash "$HERE/completion-gate" "$task_dir" commit_fixture 'Record sourced research approval' prepare 2026-12-01-open-research small 'Investigate unresolved local timestamp behavior' diff --git a/skills/taskflow/references/artifacts.md b/skills/taskflow/references/artifacts.md index 30619dc..295634e 100644 --- a/skills/taskflow/references/artifacts.md +++ b/skills/taskflow/references/artifacts.md @@ -268,7 +268,7 @@ If an answer depends on evidence that has not arrived, use a group of three line - Verify: how and when to close it ``` -At least one supported decision or complete Unknown group belongs in each applicable document. An index is required when a document cites an evidence ID. In a marked task, `bash /research-evidence ` checks the same structure as `task approve`. Review each underlying source, its limitations, and the decision it informs before approval. Keep the existing `External Facts` and `Skills / Tools Used` records for external lookups and stage activity. +At least one supported decision or complete Unknown group belongs in each applicable document. An index is required when a document cites an evidence ID. In a marked task, `bash /research-evidence ` checks the evidence structure used by approval and final completion. Keep the cited material available through archive. Review each underlying source, its limitations, and the decision it informs before approval. Keep the existing `External Facts` and `Skills / Tools Used` records for external lookups and stage activity. ## Reference index when needed From a98e8e3ff82c6d93bd6f25046af7708cfb9d77a1 Mon Sep 17 00:00:00 2001 From: hkwuks <25031515+hkwuks@users.noreply.github.com> Date: Wed, 2 Dec 2026 16:38:17 +0800 Subject: [PATCH 4/6] docs: verify the research evidence workflow across host entry points --- .../2026-12-01-research-evidence/plan.md | 24 +++++++++++++++- .../reference/host-checks.md | 28 +++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 TaskFlowDocs/2026-12-01-research-evidence/reference/host-checks.md diff --git a/TaskFlowDocs/2026-12-01-research-evidence/plan.md b/TaskFlowDocs/2026-12-01-research-evidence/plan.md index 4178550..3b59615 100644 --- a/TaskFlowDocs/2026-12-01-research-evidence/plan.md +++ b/TaskFlowDocs/2026-12-01-research-evidence/plan.md @@ -22,6 +22,12 @@ - [Plan] Declared `agent-skills:planning-and-task-breakdown` — purpose: 将工作分拆为可验证的流程和门。outcome: 先跑文档样例,再接批准并复测。incorporated: Steps 1–4。 - [Test] Unaided — no capability applied to this phase; considered: testing strategy +## Capability Contributions + +- [PRD] `agent-skills:spec-driven-development` | prd.md#Acceptance Criteria | 将证据索引、阶段用途和未知处理写成可复核的验收。 +- [Spec] `agent-skills:spec-driven-development` | spec.md#Interfaces, Data Flow, and Contracts | 明确一个证据索引对应三份文档中的不同决策。 +- [Plan] `agent-skills:planning-and-task-breakdown` | plan.md#Step 2 — 检查证据索引与阶段引用 | 把索引结构校验与批准入口验证分成可独立复核的步骤。 + ## Evidence Use - E-01: 用公开来源验证 PRD、Spec、Plan 三种引用会分别检查什么。样例公开说明只支撑能力边界,真实执行另验。 @@ -43,9 +49,19 @@ - Status: approved - Approved by: user -- Approved at: 2026-12-01 22:10 +0800 +- Approved at: 2026-12-02 16:38 +0800 - Approved version: v1 - Approved scope: PRD / Spec / Plan +- Approved repository checks: cbe12f7ab1ee448533ea6de068b6724fc89ad2dd + +## Repository Rule Checks + +- host-coverage: applies +- host-coverage/claude-code: Step 4 | 核对 Windows Bash 转发和共享证据校验。 +- host-coverage/codex: Step 4 | 核对 Windows 启动器和共享证据校验。 +- host-coverage/codebuddy: Step 4 | 核对 Bash 入口和共享证据校验。 +- host-coverage/dsh: Step 4 | 核对 dsh 使用的 Bash 入口和共享证据校验。 +- host-coverage/trae: Step 4 | 核对 Trae 手动选择工作树后可运行的 Bash 校验。 ## Steps @@ -85,6 +101,12 @@ - 2026-12-02:用户确认保留当前 main 的有效检查与本任务研究行为,测试保留双方用例。 +- host-coverage/claude-code: verified | reference/host-checks.md +- host-coverage/codex: verified | reference/host-checks.md +- host-coverage/codebuddy: verified | reference/host-checks.md +- host-coverage/dsh: verified | reference/host-checks.md +- host-coverage/trae: verified | reference/host-checks.md + - 公开来源和 Git 基线已核对。E-01 区分了宿主提供的调度能力与候选分支实际执行。E-02 说明为什么已存在的窗口文件无法发现整周漏跑。PRD、Spec 和 Plan 各自引用证据支持不同判断。 - 新 fixture 通过 Windows 启动器验证,夹具路径含中文和空格。只读校验覆盖围栏、缺索引、缺复核方法、私有路径、重复与悬空 ID、占位文字和未知的验证步骤。 - 真实审批入口通过正反例。普通任务图样不触发检查。被拦截时 PRD、Spec、Plan 和 Todo 内容保持原样。已标记任务依然校验外部事实查证。有可执行验证步骤的未知可以批准,Spec 免写仍可使用。 diff --git a/TaskFlowDocs/2026-12-01-research-evidence/reference/host-checks.md b/TaskFlowDocs/2026-12-01-research-evidence/reference/host-checks.md new file mode 100644 index 0000000..a88b930 --- /dev/null +++ b/TaskFlowDocs/2026-12-01-research-evidence/reference/host-checks.md @@ -0,0 +1,28 @@ +# Research evidence host checks + +The fixture called the shared evidence checker against the same marked task through the relevant launch forms. A separate focused fixture exercised real approval and completion commands. No live Agent session was launched. + +## host-coverage/claude-code + +- Evidence: On Windows, the cmd wrapper forwarded the marked task directory to the shared checker and returned exit 0. +- Limitation: No new Claude Code conversation was used. + +## host-coverage/codex + +- Evidence: The Windows launcher handled the same marked task and returned exit 0. The validator reads the shared task directory. +- Limitation: No new Codex conversation was used. + +## host-coverage/codebuddy + +- Evidence: Direct Bash execution validated the marked task and returned exit 0. +- Limitation: Direct command evidence covers the shared workflow, not the host's event dispatch. + +## host-coverage/dsh + +- Evidence: The launcher was called through Bash using the same marked task and returned exit 0. +- Limitation: No new dsh Agent session was used. + +## host-coverage/trae + +- Evidence: The launcher was called directly from Bash with an explicit marked task path and returned exit 0. +- Limitation: The verification was of the shared manual workflow. From 43d0f34e9067b344598ccb111754b8a80f8ab76b Mon Sep 17 00:00:00 2001 From: hkwuks <25031515+hkwuks@users.noreply.github.com> Date: Wed, 2 Dec 2026 16:39:07 +0800 Subject: [PATCH 5/6] docs: record TaskFlow pull request scope --- TaskFlowDocs/2026-12-01-research-evidence/plan.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/TaskFlowDocs/2026-12-01-research-evidence/plan.md b/TaskFlowDocs/2026-12-01-research-evidence/plan.md index 3b59615..f527621 100644 --- a/TaskFlowDocs/2026-12-01-research-evidence/plan.md +++ b/TaskFlowDocs/2026-12-01-research-evidence/plan.md @@ -119,3 +119,11 @@ - 2026-12-01 — 工作修订,审批后索引缺失仍可通过完成检查。将已标记任务的同一证据校验接到共享完成入口,并加入原状态保留的回归。 - 2026-12-01 v1 — 用户确认三项需求边界,编写研究证据落地方案。 + + +## Pull request + +- Summary: 让已标记的研究任务用一份索引支持 PRD、Spec 和 Plan,批准和完成时校验。 +- TaskFlow traceability: TF-20261201-d3ab22,当前任务代码、文档和回归,目标 hkwuks/TaskFlow 的 main。 +- Verification: 记录定向回归、差异检查、宿主覆盖及 GitHub CI。 +- Review boundaries: 单独交付当前已批准范围,明确实际宿主覆盖边界。 From 28e6e26f0ad6059cf100983f9963f47f259095f5 Mon Sep 17 00:00:00 2001 From: hkwuks <25031515+hkwuks@users.noreply.github.com> Date: Wed, 2 Dec 2026 16:49:53 +0800 Subject: [PATCH 6/6] docs: archive verified TaskFlow task --- .../2026-12-01-research-evidence/plan.md | 14 ++++++++++++-- .../2026-12-01-research-evidence/prd.md | 2 +- .../reference/evidence.md | 0 .../reference/host-checks.md | 0 .../2026-12-01-research-evidence/spec.md | 0 TaskFlowDocs/todo.md | 14 +++----------- 6 files changed, 16 insertions(+), 14 deletions(-) rename TaskFlowDocs/{ => achieved}/2026-12-01-research-evidence/plan.md (90%) rename TaskFlowDocs/{ => achieved}/2026-12-01-research-evidence/prd.md (99%) rename TaskFlowDocs/{ => achieved}/2026-12-01-research-evidence/reference/evidence.md (100%) rename TaskFlowDocs/{ => achieved}/2026-12-01-research-evidence/reference/host-checks.md (100%) rename TaskFlowDocs/{ => achieved}/2026-12-01-research-evidence/spec.md (100%) diff --git a/TaskFlowDocs/2026-12-01-research-evidence/plan.md b/TaskFlowDocs/achieved/2026-12-01-research-evidence/plan.md similarity index 90% rename from TaskFlowDocs/2026-12-01-research-evidence/plan.md rename to TaskFlowDocs/achieved/2026-12-01-research-evidence/plan.md index f527621..98cb9bb 100644 --- a/TaskFlowDocs/2026-12-01-research-evidence/plan.md +++ b/TaskFlowDocs/achieved/2026-12-01-research-evidence/plan.md @@ -1,6 +1,6 @@ # Plan — 研究证据进入 PRD、Spec 和 Plan > Task version: v1 -> Status: checking +> Status: completed ## Spec Pointers @@ -95,10 +95,12 @@ - [x] 核对工具观察、来源记录和阶段用途可分别阅读,检查共享证据定位无隐私内容。 - Acceptance: 两个样例均由读者复核得到同样的结论边界。保留未知时有可执行的验证步骤。 - Verification: 记录真实样例审阅结果、结构校验、聚焦回归和三平台 CI。 -- Status: in_progress +- Status: done ## Verification / Review +- 2026-12-02 Step 4: PR #162 的提交 43d0f34 已通过三平台 Hooks CI。用户要求通过验证后分别归档合并。[CI](https://github.com/hkwuks/TaskFlow/actions/runs/46843290895) + - 2026-12-02:用户确认保留当前 main 的有效检查与本任务研究行为,测试保留双方用例。 - host-coverage/claude-code: verified | reference/host-checks.md @@ -127,3 +129,11 @@ - TaskFlow traceability: TF-20261201-d3ab22,当前任务代码、文档和回归,目标 hkwuks/TaskFlow 的 main。 - Verification: 记录定向回归、差异检查、宿主覆盖及 GitHub CI。 - Review boundaries: 单独交付当前已批准范围,明确实际宿主覆盖边界。 + +## Todo Record + +Moved verbatim from the TODO entry by `hooks/archive`, grouped by the field each block followed. + +### `- Notes:` + +- PRD 说明研究问题、已知事实、证据限制和判断标准。Spec 说明数据来源、样本和比较方法、无法验证的范围。Plan 写出可执行的采集、分析、复核和中止条件。评估如何复用实际来源、仓库文件、计算结果、图表或外部研究产物,例如 Web、MCP、Python 和研究 Skill 的输出。验收要能指明哪些证据影响了哪个决定、如何复核,允许无专用 Skill 的研究用本地或既有证据完成。 diff --git a/TaskFlowDocs/2026-12-01-research-evidence/prd.md b/TaskFlowDocs/achieved/2026-12-01-research-evidence/prd.md similarity index 99% rename from TaskFlowDocs/2026-12-01-research-evidence/prd.md rename to TaskFlowDocs/achieved/2026-12-01-research-evidence/prd.md index aaed509..2e17f61 100644 --- a/TaskFlowDocs/2026-12-01-research-evidence/prd.md +++ b/TaskFlowDocs/achieved/2026-12-01-research-evidence/prd.md @@ -1,6 +1,6 @@ # 研究证据进入 PRD、Spec 和 Plan > Task version: v1 -> Status: checking +> Status: completed ## Goal diff --git a/TaskFlowDocs/2026-12-01-research-evidence/reference/evidence.md b/TaskFlowDocs/achieved/2026-12-01-research-evidence/reference/evidence.md similarity index 100% rename from TaskFlowDocs/2026-12-01-research-evidence/reference/evidence.md rename to TaskFlowDocs/achieved/2026-12-01-research-evidence/reference/evidence.md diff --git a/TaskFlowDocs/2026-12-01-research-evidence/reference/host-checks.md b/TaskFlowDocs/achieved/2026-12-01-research-evidence/reference/host-checks.md similarity index 100% rename from TaskFlowDocs/2026-12-01-research-evidence/reference/host-checks.md rename to TaskFlowDocs/achieved/2026-12-01-research-evidence/reference/host-checks.md diff --git a/TaskFlowDocs/2026-12-01-research-evidence/spec.md b/TaskFlowDocs/achieved/2026-12-01-research-evidence/spec.md similarity index 100% rename from TaskFlowDocs/2026-12-01-research-evidence/spec.md rename to TaskFlowDocs/achieved/2026-12-01-research-evidence/spec.md diff --git a/TaskFlowDocs/todo.md b/TaskFlowDocs/todo.md index 66d57a0..873b857 100644 --- a/TaskFlowDocs/todo.md +++ b/TaskFlowDocs/todo.md @@ -38,18 +38,10 @@ has an issue number or URL. ## 让研究证据支撑研究型任务的 PRD、Spec 和 Plan - ID: TF-20261201-d3ab22 -- Status: in_progress -- Priority: normal -- Owner: Unknown -- Source: 用户反馈 2026-12-01,规划长期研究后续时提出 -- Kind: capability -- Added: 2026-12-01 -- Updated: 2026-12-01 +- Status: done - Goal: 让研究型任务的 PRD、Spec 和 Plan 使用可核对的研究证据,并说明证据实际改变了哪些问题、方法、决策和验收 -- Task: `TaskFlowDocs/2026-12-01-research-evidence/` -- Initial files: plan.md=e8622400e86885f9af5e24897526f30e4ef8088b1befe96f55adfcdc4ef2b610 prd.md=e7eff6153e7410460049d03174c9bdaab6dfcfa21d4ecd2c1b651bb7a5941853 spec.md=cabd33c8ea39fba3d5e4c1fe0cfa781daf7b01bd39c3c45459c92ca381e3dd94 -- Next action: 本地功能和真实批准入口回归已通过。独立提交研究证据 PR 后核对三平台 CI。 -- Notes: PRD 说明研究问题、已知事实、证据限制和判断标准。Spec 说明数据来源、样本和比较方法、无法验证的范围。Plan 写出可执行的采集、分析、复核和中止条件。评估如何复用实际来源、仓库文件、计算结果、图表或外部研究产物,例如 Web、MCP、Python 和研究 Skill 的输出。验收要能指明哪些证据影响了哪个决定、如何复核,允许无专用 Skill 的研究用本地或既有证据完成。 +- Task: `TaskFlowDocs/achieved/2026-12-01-research-evidence/` +- Next action: None — completed and archived. ## 修复工作树写入口:重新领取已释放会话的占用,首次规划