Skip to content

refactor: deepen the Task store - #45

Merged
frantufro merged 1 commit into
mainfrom
refactor/deepen-task-store
Nov 13, 2026
Merged

frantufro merged 1 commit into
mainfrom
refactor/deepen-task-store

Conversation

@frantufro

Copy link
Copy Markdown
Owner

Summary

Adds src/core/store.rs with a TaskStore module (find, tasks, lookup, create, move_to, transition, remove). Collision, ambiguity, reserved-directory and missing-Status rules now live behind that interface.

  • mv, start and finish share one move path (TaskStore::move_to / transition); the duplicated body in commands/mod.rs is gone.
  • rm, show, edit, new and list use the store instead of their own root discovery and scanning.
  • roadmap show, next and add take their slug-to-status lookup from TaskStore::lookup.
  • slug.rs keeps slugify; scanning and resolution moved to the store. The "backlog" literal for new Tasks lives in the store.
  • CLI behavior and output are unchanged. Unit tests for the store run against a tempdir through its interface.
  • The task deepen-the-task-store is moved to done.

Three sibling refactors (roadmap module, table/JSON output, task document) run in parallel and touch neighbouring files (commands/roadmap/*, commands/list.rs, commands/new.rs), so small merge conflicts are possible.

Verification

  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings -W clippy::pedantic (local rustc 1.99, CI pins 1.98.0)
  • cargo test --locked

… and remove

Commands no longer repeat root discovery, scanning and slug resolution.
mv, start and finish share one move path, and the roadmap commands take
their slug-to-status lookup from the store. Behavior and output are
unchanged.
@frantufro
frantufro merged commit bc9064d into main Nov 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant