Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Plan — 轻量 Todo 录入
> Task version: v1
> Status: checking

## Spec Pointers
- spec.md

## Reference Pointers
- hooks/task、hooks/smoke-test、skills/taskflow/SKILL.md:近似扫描与重叠义务。

## Related Tasks
- 2026-11-10-token-review v3:此前实现中文候选提示;用户选择独立修复,保留历史与其工作树。

## Skills / Tools Used
- [PRD] Unaided — 根据代码和用户选择确定范围;considered: root cause investigation
- [Spec] Unaided — 确定现有接口边界;considered: architecture and design specification
- [Plan] Unaided — 按依赖及验收划分;considered: work breakdown and task decomposition
- [Test] Unaided — 使用现有回归;considered: testing strategy

## Preconditions
- 工作树 .worktrees/capability-outcomes,分支 fix/todo-intake-lightweight,基于本地 origin/main 5bf7551,远端新鲜度未核实。
- 已读 TaskFlowDocs/repository-docs/index.md、LICENSE、CONTRIBUTING.md、README.md;遵循工作树隔离、计划审批和 AGPL 许可。变更属于插件自身行为,影响所有使用者。

## Plan Review
- Verdict: sound
- Coverage: Step 1 覆盖录入与任务选择边界以及扫描移除;Step 2 覆盖中英文、精确重复、ID 和相关检查。
- Verifiability: 隔离 Todo 夹具检查输出、文件和回归。
- Layer ownership: Agent 流程属 Skill,候选扫描属 intake;精确重复保护不变。

## Approval
- Status: approved
- Approved by: user
- Approved at: 2026-11-17 16:04 +0800
- Approved version: v1
- Approved scope: PRD / Spec / Plan

## Steps

### Step 1 — 简化录入
- Goal: 只录入后停止,移除近似候选扫描。
- Dependencies: 用户批准 v1。
- Files: skills/taskflow/SKILL.md、hooks/task、必要引用文档。
- Implementation checklist:
- [x] 明确本地和远程的只录入边界,保留开始工作前的重叠检查。
- [x] 删除近似扫描,保留精确重复、ID 与错误处理。
- Acceptance: 满足 PRD 行为要求。
- Verification: 隔离夹具和 Skill 检查。
- Rollback: 回退本任务改动。
- Status: done

### Step 2 — 验证
- Goal: 验证录入和既有保护。
- Dependencies: Step 1。
- Files: hooks/smoke-test 等相关测试。
- Implementation checklist:
- [x] 覆盖中英文近似录入无提示、精确重复及确定性 ID。
- [x] 运行适用测试并记录结果。
- Acceptance: 所有验收标准通过,限制明确。
- Verification: 针对性测试、脚本语法和 diff 检查,适用时运行 smoke。
- Rollback: 回退本任务改动。
- Status: done

## Checkpoints
实施完成后记录 Git 检查点。

## Verification / Review
Windows Git Bash:中英文相似目标成功且 stderr 为空,精确重复拒绝且文件不变,相同目标跨夹具 ID 一致;Skill 两阶段边界检查通过。bash -n 与 git diff --check 通过。完整 smoke 首次因默认临时目录权限失败;套件会删除测试文件,按用户禁止删除文件的要求未重试。夹具保留在 .worktrees/todo-intake-verification-20261117。

## Change Log
- 2026-11-17:用户选择独立修复、移除相似检查并保留精确重复拒绝;已实现并完成针对性验证。

## Follow-ups
Issue 计划存储不在本次范围。

## Version History
- v1 — planning.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 简化 Todo 录入
> Task version: v1
> Status: checking

## Goal
只要求添加 Todo 时记录后结束,不做相似项或任务调查。

## Task Kind
- Kind: internal

## Background / Confirmed Facts
intake 目前扫描并提示相似目标;Skill 要求在选择任务前检查重叠。用户选择独立修复,保留 token-review 历史、精确相同目标的拒绝和确定性 ID。

## Requirements
本地和远程仅录入请求写入后结束;本地 intake 不进行近似比较;开始工作时仍检查重叠。保留精确重复、ID 冲突及写入失败保护。

## Acceptance Criteria
中英文相似目标成功录入且无相似提示;精确重复仍拒绝且文件不变;Skill 清楚区分录入和开始工作;相关回归通过。

## External Facts
- Depends on external facts: no
- Why not: 用户决策和本仓库 `hooks/task`、`skills/taskflow/SKILL.md` 与 `hooks/smoke-test` 决定行为和验证。

## In Scope
插件 Skill、intake、相关测试和文档。

## Out of Scope
Issue 计划存储、修改已有任务历史、取消精确重复保护。

## Risks / Deferred Items
录入时不再提示近似重复;开始工作时仍须判断重叠。

## Open Questions
无。
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Spec — 轻量 Todo 录入
> Task version: v1

## Objective and Success Criteria
单纯记录只写入并报告结果;任务选择仍检查重叠。

## Architecture Boundaries and Responsibilities
Skill 区分只记录与开始工作;本地 intake 负责写入和身份保护;远程 Issue 继续由现有工具负责。

## Project Structure / Affected Files
skills/taskflow/SKILL.md、hooks/task、hooks/smoke-test 及必要的引用文档。

## Interfaces, Data Flow, and Contracts
成功输出仍为 intake OK 和 ID;不再输出近似候选。精确重复和 ID 冲突仍失败且不改文件。只录入不进行任务选择或相似调查。

## Invariants and Compatibility
保持 Todo 格式、确定性 ID、精确重复检查及既有任务历史,不增加兼容层。

## Validation and Error Semantics
保留输入、后端配置和写入错误;远程失败保留既有恢复规则。

## Code and Test Constraints
删除仅用于近似匹配的逻辑和失效断言;验证中英文相似录入无候选,保留精确重复与 ID 回归;验证 Skill 两阶段边界。

## Design Decisions and Alternatives
不增加参数:intake 本身不再扫描近似项,开始工作时仍进行人工重叠判断。

## Open Questions
无。
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Archived Version v1 — Plan — 轻量 Todo 录入
> Task: 2026-11-17-lightweight-todo-intake
> Version: v1
> Status: superseded
> Archived: 2026-11-17 16:14 +0800
> Superseded by: v2
> Archive mode: file

## Change Summary
v1 错误移除了近似目标扫描。用户澄清需要保留提示,仅避免录入时提前调研 Todo 内容;v2 恢复扫描和原测试,并调整 Skill。v1 代码检查点 5bf7551..b26c039。

## Archived Materials
- prd.md
- spec.md
- plan.md

## Restore
Read the archived v1 core docs from a new temporary restore root. Do not overwrite the current task root.
79 changes: 79 additions & 0 deletions TaskFlowDocs/achieved/2026-11-17-lightweight-todo-intake/plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Plan — 轻量 Todo 录入
> Task version: v2
> Status: completed

## Spec Pointers
- spec.md

## Reference Pointers
- hooks/task、hooks/smoke-test、skills/taskflow/SKILL.md:近似扫描与重叠义务。

## Related Tasks
- 2026-11-10-token-review v3:此前实现中文候选提示;用户选择独立修复,保留历史与其工作树。

## Skills / Tools Used
- [PRD] Unaided — 根据代码和用户选择确定范围;considered: root cause investigation
- [Spec] Unaided — 确定现有接口边界;considered: architecture and design specification
- [Plan] Unaided — 按依赖及验收划分;considered: work breakdown and task decomposition
- [Test] Unaided — 使用现有回归;considered: testing strategy

## Preconditions
- 工作树 .worktrees/capability-outcomes,分支 fix/todo-intake-lightweight,基于本地 origin/main 5bf7551,远端新鲜度未核实。
- 已读 TaskFlowDocs/repository-docs/index.md、LICENSE、CONTRIBUTING.md、README.md;遵循工作树隔离、计划审批和 AGPL 许可。变更属于插件自身行为,影响所有使用者。

## Plan Review
- Verdict: sound
- Coverage: Step 1 恢复候选扫描并明确录入边界;Step 2 验证相似提示、精确重复、ID 和相关检查。
- Verifiability: 隔离 Todo 夹具检查输出、文件和回归。
- Layer ownership: Agent 流程属 Skill,候选扫描属 intake 且保留;精确重复保护不变。

## Approval
- Status: approved
- Approved by: user
- Approved at: 2026-11-17 16:29 +0800
- Approved version: v2
- Approved scope: PRD / Spec / Plan

## Steps

### Step 1 — 简化录入
- Goal: 只录入后停止提前调研,恢复近似候选扫描。
- Dependencies: 用户批准 v2。
- Files: skills/taskflow/SKILL.md、hooks/task、必要引用文档。
- Implementation checklist:
- [x] 明确只记录时不提前调研待办内容,保留候选提示。
- [x] 恢复 v1 错误移除的 intake 逻辑及原测试。
- Acceptance: 满足 PRD 行为要求。
- Verification: 隔离夹具和 Skill 检查。
- Rollback: 回退本任务改动。
- Status: done

### Step 2 — 验证
- Goal: 验证录入和既有保护。
- Dependencies: Step 1。
- Files: hooks/smoke-test 等相关测试。
- Implementation checklist:
- [x] 验证中英文近似提示、精确重复及确定性 ID。
- [x] 运行适用测试并记录结果。
- Acceptance: 所有验收标准通过,限制明确。
- Verification: 针对性测试、脚本语法和 diff 检查,适用时运行 smoke。
- Rollback: 回退本任务改动。
- Status: done

## Checkpoints
实施完成后记录 Git 检查点。

## Verification / Review
Windows Git Bash:中英文相似目标均产生候选提示;中文精确重复拒绝且文件不变;v1 夹具确认确定性 ID;hooks/task 与基线 5bf7551 字节相同。Skill 录入及任务选择边界检查、bash -n 和 git diff --check 通过。新增 smoke 断言针对规则本身;用户允许清理项目内临时测试文件后重跑完整 smoke:第一次因临时目录位于工作树内而误识别无仓库夹具;设置 Git 搜索上限后该场景通过,随后 Windows Git Bash 的无解释器夹具因复制的 bash 无法加载共享库而失败,故完整 smoke 未通过,未覆盖新增断言。新增断言内容已单独执行。

## Change Log
- 2026-11-17:用户选择独立修复、移除相似检查并保留精确重复拒绝;已实现并完成针对性验证。

- 2026-11-17:用户纠正 v1 对相似提示的误解,v2 恢复提示并限定不要提前调研待办内容;用户已批准 v2,针对性验证通过。

## Follow-ups
Issue 计划存储不在本次范围。

## Version History
- v1 — 已被纠正,见 old/v1。
- v2 — ready.
35 changes: 35 additions & 0 deletions TaskFlowDocs/achieved/2026-11-17-lightweight-todo-intake/prd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 简化 Todo 录入
> Task version: v2
> Status: completed

## Goal
只要求添加 Todo 时记录后结束,不提前调研待办内容;保留相似目标提示。

## Task Kind
- Kind: internal

## Background / Confirmed Facts
用户纠正:不要在录入时提前调研 Todo 要做的内容;并未要求删除近似目标提示。v1 因误解移除了提示,本版恢复。
intake 目前扫描并提示相似目标;Skill 要求在选择任务前检查重叠。用户选择独立修复,保留 token-review 历史、精确相同目标的拒绝和确定性 ID。

## Requirements
本地和远程仅录入请求写入后结束;保留本地 intake 的近似目标提示;开始工作时仍检查重叠。保留精确重复、ID 冲突及写入失败保护。

## Acceptance Criteria
中英文相似目标仍按原逻辑提示;精确重复仍拒绝且文件不变;Skill 清楚区分录入和开始工作;相关回归通过。

## External Facts
- Depends on external facts: no
- Why not: 用户决策和本仓库 `hooks/task`、`skills/taskflow/SKILL.md` 与 `hooks/smoke-test` 决定行为和验证。

## In Scope
插件 Skill、intake、相关测试和文档。

## Out of Scope
Issue 计划存储、修改已有任务历史、取消精确重复保护。

## Risks / Deferred Items
提示仅用于指出可能重叠,不要求为录入而调查待办内容;开始工作时仍须判断重叠。

## Open Questions
无。
29 changes: 29 additions & 0 deletions TaskFlowDocs/achieved/2026-11-17-lightweight-todo-intake/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Spec — 轻量 Todo 录入
> Task version: v2

## Objective and Success Criteria
单纯记录只写入并报告结果;任务选择仍检查重叠。

## Architecture Boundaries and Responsibilities
Skill 区分只记录与开始工作;本地 intake 负责写入和身份保护;远程 Issue 继续由现有工具负责。

## Project Structure / Affected Files
skills/taskflow/SKILL.md、hooks/task、hooks/smoke-test 及必要的引用文档。

## Interfaces, Data Flow, and Contracts
成功输出仍为 intake OK 和 ID;保留近似候选提示。精确重复和 ID 冲突仍失败且不改文件。只录入不调查待办内容、不进行任务选择或规划。

## Invariants and Compatibility
保持 Todo 格式、确定性 ID、精确重复检查及既有任务历史,不增加兼容层。

## Validation and Error Semantics
保留输入、后端配置和写入错误;远程失败保留既有恢复规则。

## Code and Test Constraints
恢复近似匹配实现及其原有断言;验证中英文相似录入仍有候选,保留精确重复与 ID 回归;验证 Skill 两阶段边界。

## Design Decisions and Alternatives
不增加参数:intake 保留相似项提示;Agent 不因提示提前调查待办内容。开始工作时仍进行人工重叠判断。

## Open Questions
无。
8 changes: 8 additions & 0 deletions TaskFlowDocs/todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ has an issue number or URL.

<!-- Add new items at the top using the template below. -->

## 简化只要求添加 Todo 的处理:记录后结束,避免额外检查和

- ID: TF-20261117-0803fd
- Status: done
- Goal: 简化只要求添加 Todo 的处理:记录后结束,避免额外检查和过度分析
- Task: `TaskFlowDocs/achieved/2026-11-17-lightweight-todo-intake/`
- Next action: None — completed and archived.

## 放宽 TaskFlow 文档内容约束,允许工具补充内容

- ID: TF-20261116-b893dc
Expand Down
7 changes: 7 additions & 0 deletions hooks/smoke-test
Original file line number Diff line number Diff line change
Expand Up @@ -6025,6 +6025,13 @@ if grep -q '^## ' "$ws/check"; then
fi
echo ok

echo "== recording a Todo does not research its contents =="
grep -q -F -- 'Do not investigate the work described by the Todo, research solutions, inspect its implementation, or start planning.' "$skill/SKILL.md" \
|| { echo "FAIL record-only guidance does not stop research"; exit 1; }
grep -q -F -- 'Existing intake-time duplicate and similarity checks may still run.' "$skill/SKILL.md" \
|| { echo "FAIL record-only guidance does not preserve intake checks"; exit 1; }
echo ok

echo "== the overlap obligation is stated, and the hook report alone is not it =="
# The report is word-overlap. A goal re-worded out of the shared vocabulary
# produces no candidate at all, so the duty has to be stated in the workflow and
Expand Down
4 changes: 3 additions & 1 deletion skills/taskflow/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ For remote intake, choose the target with the user, then use `create <alias> <ti
A failed or timed-out write may already have succeeded remotely. Keep its operation ID; do not blindly retry. `resolve <operation-id> <number>` verifies a creation marker, `resolve-absent <operation-id> --checked` records the user's explicit verification that no Issue was created, and `ack-update <operation-id> --checked` records the user's review of an uncertain update. Recovery records are local-only and must not contain credentials. Stale lock directories after a crash require inspection; never remove user data to clear them. See `references/runtime.md` for commands, privacy limits and platform caveats.
### Todo-first intake

When the user only asks to record a Todo, write it to the selected backend and report the result, then stop. Do not investigate the work described by the Todo, research solutions, inspect its implementation, or start planning. Existing intake-time duplicate and similarity checks may still run. This applies to local and remote backends. Keep the backend’s exact-duplicate and write-error handling. If the user also asks to start the work, continue to task selection and the overlap check below.

Every request within TaskFlow's applicability boundary enters the selected Todo backend before task selection. For a local item record its ID, source, goal, status, next action, update date, and external identifier/link when one exists. For a remote item select the configured repository and create or use its Issue; preserve its platform, host, project and Issue number. Deduplicate imported items by source plus external identifier; preserve distinct requirements even when imported as a batch. A batch may carry common source metadata, but it is never itself a task, PRD, or requirements source.

Prefer `hooks/task intake`, `promote`, `unpromote`, `state`, `progress`, `unaided`, and `complete` for their bounded mechanical edits. Use Agent edits for semantic content and cases those commands do not cover. These commands are explicit Agent actions, not automatically bound hooks. When a Todo ID is known, use `hooks/task get <todo-id>` to read that entry instead of loading the entire Todo file; retrieve every relevant entry when checking overlaps, and read the whole file when a repository-wide review or structural check needs it.
Expand All @@ -77,7 +79,7 @@ A task name is one path component, `YYYY-MM-DD-short-slug`, and every command th

Do not create, reopen, modify, or select a task before the Todo record exists. After promotion, retain lifecycle metadata, source identity, and one task link in Todo; do not duplicate task facts. Update the Todo status as the linked task moves through `inbox → clarified → promoted → in_progress → done/cancelled`.

**Report overlap before you commit to a task.** A Todo record existing is not a fact that the work is unclaimed. Once the new item is recorded and before a task is created or selected, compare it against the live Todo items and the active tasks, on two axes: item against item, and request against task. `hooks/task intake` reports word-overlap candidates on standard error; that is a hint about wording, not a finding, and it is silent whenever the two goals happen to share little vocabulary. The judgement is yours, and where a candidate is real — the same work, a scope another item already covers, or two goals that cannot both hold — report the overlap. If the user has already clearly decided how it should be handled, state and follow that decision; otherwise get their choice before planning either one. Never leave two entries covering one piece of work without saying it out loud, and never merge, close, or re-scope another entry on your own. Only duplicated *requirements* are quietly folded: two items recorded in one turn that trace to the same source and the same external identifier are one item.
**Report overlap before you commit to a task.** A Todo record existing is not a fact that the work is unclaimed. Once the new item is recorded and before a task is created or selected, compare it against the live Todo items and the active tasks, on two axes: item against item, and request against task. `hooks/task intake` reports word-overlap candidates on standard error; that is a hint about wording, not a finding, and it is silent whenever the two goals happen to share little vocabulary. The judgement is yours, and where a candidate is real — the same work, a scope another item already covers, or two goals that cannot both hold — report the overlap. If the user has already clearly decided how it should be handled, state and follow that decision; otherwise get their choice before planning either one. When starting work, report entries covering the same work; never merge, close, or re-scope another entry on your own. Only duplicated *requirements* are quietly folded: two items recorded in one turn that trace to the same source and the same external identifier are one item.

### Existing-task-first selection

Expand Down
Loading