task-signal-sync: MECE 完成信号检测(commit/verify/authorization)→ 提醒同步 tasks - #6
task-signal-sync: MECE 完成信号检测(commit/verify/authorization)→ 提醒同步 tasks#6agnitum2009 wants to merge 8 commits into
Conversation
更新 commit-task-sync-implementation.md: - v1 ui.notify + v2 context injection 演进 - 双通道验证(user TUI ✅ + agent context injection ✅) - tsc TS2769 修复(event 类型推断) - openpi hook 机制发现(pi.on tool_result/context + post-edit/injectTaskProjection 范本) - pi.on 可用事件清单 - PR openpi-dev#6(tt-a1i/openpi) - 结论:tasks 残留从靠记忆力变机制强制提醒
tasks 残留根因(遗忘+机制不全)→ commit-task-sync hook 尝试: - extensions/commit-task-sync/index.ts:pi.on(tool_result) 检测 bash git commit 成功 → pi.on(agent_settled) ctx.ui.notify 提示 agent 同步 tasks(仿 post-edit,fire-and-forget) - tsc 通过(exit 0) - docs/knowledge-base/:obsidian vault(residual-root-cause + hook-design + implementation) - 发现:openpi 有 pi.on(tool_result) 事件(PostToolUse 等价)
双通道提醒:
1. agent_settled → ui.notify(TUI/业主,建议性)
2. context → injectCommitReminder(对话/agent,强制——注入 <commit-task-sync> 块到下轮 messages)
context injection 仿 injectTaskProjection(tasks/index.ts:483 pi.on(context) return {messages})。
commit 检测后下轮注入提示+reset(仅提醒一次)。agent 不能忽略(在对话上下文)。
tsc 通过。
更新 commit-task-sync-implementation.md: - v1 ui.notify + v2 context injection 演进 - 双通道验证(user TUI ✅ + agent context injection ✅) - tsc TS2769 修复(event 类型推断) - openpi hook 机制发现(pi.on tool_result/context + post-edit/injectTaskProjection 范本) - pi.on 可用事件清单 - PR openpi-dev#6(tt-a1i/openpi) - 结论:tasks 残留从靠记忆力变机制强制提醒
升级 commit-task-sync(单信号 A)→ multi-signal-sync(MECE 全场景): - A commit(git commit exit 0,tool_result 检测) - B verify(tsc/test/verify PASS exit 0,tool_result 检测) - C authorization(user message 授权语,context 检测) dual-channel:agent_settled ui.notify + context injectSyncReminder(<multi-signal-sync> 块) D/E(无变更/取消)无信号 → 收口审计纪律(提醒文本已含) 第一性原理:tasks 完成 = 真实完成信号驱动,非 agent 记忆。 MECE:commit/验证/授权 三信号互斥穷尽(tool_result + context 可检测面)。 tsc 0错(TS2769 修复:event 类型推断)。
…ttled notify) bug: context 注入时 reset signals → agent_settled notify 不触发(signals 被 context 消费后已空)。 fix: 两个通道独立——signals(context 注入,下轮消费)+ pendingNotify(agent_settled notify,本轮消费)。 addSignal 同时加到两通道;context 消费 signals(注入块);agent_settled 消费 pendingNotify(notify)。
…s Indicator)
问题:ui.notify 瞬时消失(业主看不到驻留)。
fix:agent_settled → ctx.ui.setStatus(footer 驻留状态,跨 render 持续显示——tui.md Pattern 4)。
- 信号轮:setStatus('multi-signal-sync', '⚠️ 完成信号(...)— 请同步 tasks') 驻留
- 下一轮(无新信号):setStatus undefined 清除
- 双通道:对话 context 注入块(agent 提醒)+ footer 驻留状态(user 持续看到)
tsc 0错。
MECE 五类信号(A commit/B verify/C authorization/D 无变更/E 取消)+ 演进(v1-v5)+ 验证记录(A/B/C 三信号 notify 确认触发)+ v5 驻留(footer setStatus)+ openpi 机制发现。
5662041 to
0245d93
Compare
OpenPI review — changes appliedP0 [fixed]
Tests added
Verification
P1 product decisions still open
I am not approving or merging; final read-only re-review is running. |
0245d93 to
d4a27c7
Compare
Re-review updateThe final P0 reviewer found two remaining heuristic false positives. Fixed at
Regression tests added; full local gate remains green: 603 Node tests + 29 Vitest tests, Biome format/lint, TypeScript/Effect, frozen Bun install, pack allowlist, and GitHub CI is not running yet because this repository requires workflow approval for first-time fork contributors ( |
方案结论:收敛到现有
|
|
#7 已完成替代实现并通过 Node 22.19/24 全部 CI 与只读复审。关闭此 PR 作为 superseded;保留讨论和修复记录,感谢贡献。 |
multi-signal-sync: MECE 五类完成信号(A commit/B verify/C authorization 自动检测 + D/E 收口纪律),dual-channel(footer setStatus 驻留 + context 注入 agent 不可忽略)。A/B/C 三信号验证通过(notify 确认触发)。v5 footer 驻留显示。