5.6 KiB
Delegation intent: migrate Ticket storage to .yoi/tickets
Classification
implementation-ready with repository-record migration risk.
The prerequisite builtin-yoi-local-ticket-backend-config is complete: Ticket backend config now has canonical provider builtin:yoi_local while preserving transitional work-items storage. This ticket performs the storage move.
Intent
Move the active built-in Yoi local Ticket backend storage from repository-root work-items/ to .yoi/tickets/ and make that the default/configured root for the Rust Ticket backend.
Target active layout:
.yoi/tickets/{open,pending,closed}/<id>/item.md
.yoi/tickets/{open,pending,closed}/<id>/thread.md
.yoi/tickets/{open,pending,closed}/<id>/artifacts/
Target config example:
[backend]
provider = "builtin:yoi_local"
root = ".yoi/tickets"
Worktree / branch
- worktree:
/home/hare/Projects/yoi/.worktree/migrate-ticket-storage-to-yoi-tickets - branch:
work/migrate-ticket-storage-to-yoi-tickets
This ticket is an explicit exception to the normal child-worktree .yoi exclusion pattern because the implementation must add/modify tracked files under .yoi/. Do not read or edit .yoi/memory/; it is ignored generated memory state and is not part of this migration.
Requirements
- Move tracked Ticket records from
work-items/to.yoi/tickets/using git-tracked file moves. - Update
crates/ticket/src/config.rsdefaults so missing Ticket config resolves to<workspace>/.yoi/tickets. - Preserve canonical provider behavior from the previous ticket:
provider = "builtin:yoi_local"remains the canonical provider;- unsupported providers still fail closed;
- transitional
kind = "local"handling should not become the documented path.
- Add or update the project
.yoi/ticket.config.tomlif needed so this repository explicitly configures:
[backend]
provider = "builtin:yoi_local"
root = ".yoi/tickets"
- Update code/docs/tests that refer to
work-items/as the active backend root. - Update
tickets.shonly as a temporary compatibility/maintainer shim if it remains present after this ticket:- it should operate on
.yoi/ticketsby default after the migration; - its help text must stop claiming
work-items/is canonical; - keep
WORK_ITEMS_DIRoverride if useful for recovery/back-compat.
- it should operate on
- Keep Ticket tools,
yoi ticket ..., TUI role launcher, and Pod Ticket feature registration working against the new root. - Ensure
target/debug/yoi ticket doctor/ built binary equivalent sees the migrated.yoi/ticketsrecords. - Ensure
./tickets.sh doctorworks during the transition iftickets.shstill exists in this ticket.
Non-goals
- Removing
tickets.sh; that is the next ticket. - Rewriting historical thread text/artifacts merely because they mention
work-items/. - Migrating generated memory, workflows, Pod sessions, or non-Ticket state.
- Changing Ticket role profile mappings, workflows, role launcher semantics, or TUI UI.
- External Ticket provider support.
Current code map
crates/ticket/src/config.rs- Default root currently remains
work-items; change to.yoi/tickets. - Tests should be updated for the new default and explicit config root.
- Default root currently remains
crates/pod/src/feature/builtin/ticket.rs- Uses
TicketConfig::load_workspace(...)andconfig.backend.root; verify diagnostics/root handling remain correct.
- Uses
crates/yoi/src/ticket_cli.rs- Uses Ticket config/backend root for
yoi ticket ...; verify CLI commands against migrated storage.
- Uses Ticket config/backend root for
tickets.sh- Still hardcodes
WORK_ITEMS_DIR=${WORK_ITEMS_DIR:-work-items}and help text; update for transition or document if intentionally unsupported.
- Still hardcodes
docs/development/work-items.md- Update active user documentation to
.yoi/ticketsandyoi ticket;tickets.shshould remain maintainer/transition-only until removal.
- Update active user documentation to
AGENTS.md/ project instructions references may still saywork-items/is authoritative. Update active instructions if in scope so future agents do not mutate the wrong path.
Migration cautions
- Do not create two active mutable roots. After migration,
.yoi/ticketsis active;work-items/should not remain as a second live backend. - Do not leave open tickets split between old and new roots.
- Do not mass-rewrite old ticket thread prose solely for path hygiene.
- Verify lock-file behavior does not leave
.ticket-backend.lockin the old root. - Since the migration moves the ticket records themselves, expect the current ticket directory to move from
work-items/open/...to.yoi/tickets/open/...in the implementation commit.
Validation
Run at least:
cargo test -p ticket configcargo test -p ticketcargo test -p pod ticket --libcargo test -p yoi ticketcargo check --workspace --all-targetscargo fmt --checkgit diff --checktarget/debug/yoi ticket doctoror built binary equivalent./tickets.sh doctorduring transition if still present
Run nix build .#yoi --no-link if feasible.
Also manually check:
- no active Ticket records remain under
work-items/unless intentionally retained as a compatibility notice/stub; .yoi/tickets/open,.yoi/tickets/pending, and.yoi/tickets/closedcontain the migrated records;- new
yoi ticket createcreates under.yoi/ticketsin a scratch temp workspace or controlled test fixture, notwork-items.
Completion report
Report:
- worktree path / branch;
- commit hash;
- final storage root and config behavior;
- whether
.yoi/ticket.config.tomlwas added/updated; - what happened to
work-items/; - whether
tickets.shwas updated and how; - docs/tests updated;
- validation results;
- whether
remove-tickets-shcan proceed.