5.3 KiB
5.3 KiB
Created
Created by tickets.sh create.
Decision
Decision: keep built-in Task feature inside pod for now
Task is a stateful built-in feature, not a low-level tools crate concern. The next step should keep the feature inside pod rather than creating a new crate.
Rationale:
pod::feature/pod::hookare still defined in thepodcrate.- Creating
builtin-featuresnow would either depend onpodor require premature extraction of a feature-api crate. - Feature-per-crate would create too many crates; a future
builtin-featurescrate may be appropriate only after the API boundary is stable. - Moving Task domain state out of
toolsand intopod::feature::builtin::taskfixes the immediate semantic split without forcing crate-boundary churn.
Desired result for this ticket:
toolsprovides low-level generic tool helpers.pod::feature::builtin::taskowns TaskStore, Task types, Task tool implementations, Task reminders, and Task feature lifecycle.
Plan
Delegation intent: move Task domain into pod built-in feature
Intent
Move Task domain state and Task tool implementation out of the tools crate and into the pod::feature::builtin::task module. Keep this inside the pod crate for now; do not create a new built-in-features crate.
The goal is cohesion: Task is now a stateful built-in feature, so TaskStore, Task types, Task tools, reminder hooks, and snapshot/restore façade should live together.
Worktree / branch
- worktree:
/home/hare/Projects/yoi/.worktree/task-domain-in-pod-feature - branch:
work/task-domain-in-pod-feature
Requirements
- Move Task domain implementation from
crates/tools/src/task.rsinto the Pod built-in Task feature module.- If the file becomes large, prefer
crates/pod/src/feature/builtin/task/with submodules such asstore.rs,tools.rs,reminder.rs, andmod.rs. - A single
task.rsfile is acceptable if the change stays clear and maintainable.
- If the file becomes large, prefer
- Task feature should own:
TaskStoreTaskEntryTaskStatusTaskSnapshotTaskCreate/TaskUpdate/TaskGet/TaskListtool implementations- reminder hooks/state already moved to the feature
- snapshot/restore/rewind/compaction façade
- Remove Task production API from
tools.- Remove
tools::TaskStore,tools::TaskEntry,tools::TaskStatus,tools::TaskSnapshot, andtools::task_toolsre-exports unless a narrowly justified temporary test-only compatibility path is required. - Remove or update
tools::builtin_tools(..., task_store, ...); production tools should not imply Task belongs totools. - Keep
tools::core_builtin_tools(...)and non-Task low-level tools intact.
- Remove
- Update Pod Task feature code to use local Task types and local Task tool factories.
- Move/port Task tests from
toolstopodas needed. - Update
toolsintegration tests so they no longer expect Task tools intools::builtin_toolsregistration order. - Update TUI compatibility tests that currently depend on
toolsTask types.- Prefer local JSON fixtures or local mirrored structs in TUI tests.
- Do not make TUI depend on
podjust for tests unless there is a strong reason and it does not create an undesirable dependency.
- Preserve observable behavior exactly:
- tool names/schemas/descriptions;
- tool outputs;
- TaskStore replay/snapshot text;
- Task reminder body/cooldown/source;
- TUI parsing compatibility;
- normal ToolRegistry / PreToolCall path.
Non-goals
- Creating a new
builtin-featurescrate. - Extracting
feature-apifrompod. - External plugin loading, WASM, package approval, sandbox authority work.
- Moving other built-in tool groups.
- TUI UI changes.
- Changing Task semantics.
Suggested files
crates/pod/src/feature/builtin/task.rscrates/pod/src/feature/builtin.rscrates/pod/src/feature.rscrates/tools/src/task.rscrates/tools/src/lib.rscrates/tools/tests/integration.rscrates/tools/tests/edge_cases.rscrates/tui/src/task.rscrates/tui/src/app.rs/ TUI task compatibility tests if needed
Validation
Run at least:
- focused Task feature tests moved/updated by this ticket
cargo test -p pod task --libcargo test -p tools --libcargo test -p tools --testscargo test -p tui task --libor relevant focused TUI task testscargo test -p pod --libcargo test -p llm-worker --libcargo check --workspace --all-targetscargo fmt --check./tickets.sh doctorgit diff --check
Run nix build .#yoi if feasible.
Escalate if
- Removing
tools::builtin_toolsbreaks important non-Pod production callers. - TUI compatibility checks require a shared Task schema crate to avoid duplication.
- Moving Task tool implementation into
podcreates an unexpected dependency cycle. - Preserving Task snapshot/replay semantics would require behavior changes.
Completion report
Report:
- worktree path / branch
- commit hash
- changed files
- final Task module layout
- what remains in
toolsand why - evidence production code no longer uses
tools::TaskStore/tools::task_tools - tests/validation results
- unresolved risks/follow-ups
- whether ready for external review