1.5 KiB
1.5 KiB
Investigation: Task state and Hook side-effect boundary
Findings
- Hook action types are already separated per hook point after Hook hardening. The next design should preserve that: flow-control actions stay event-specific rather than becoming one global
HookDecision. - Hook inputs are still summary structs, not contexts with host-created handles. That is the missing abstraction for feature-owned behavior that needs durable host side effects.
TaskStoreis still owned byPod, andTaskReminderState/reminder emission is still owned byPodInterceptor.- The Task built-in feature module currently contributes only the four Task tools and receives
TaskStorefrom Pod. This is an incomplete internal-module boundary: Task-specific state still remains on the Pod side. SystemItem::TaskReminderis currently appended throughPodInterceptor::pending_history_appends(), which is the correct durable history direction but the wrong ownership location for Task-specific logic.
Decision
Split follow-up into two steps:
- Add Hook context host handles, especially a durable
SystemItemappend handle. Hook returns remain per-hook-point flow-control actions. No rawIteminjection and no generic effect/event channel. - Move TaskStore and Task reminder logic into the Task feature module, implemented as Task-owned tools plus hooks that use the host-provided SystemItem append handle.
This keeps Pod responsible for generic host surfaces and history authority, while Task owns Task-specific state and policy.