diff --git a/work-items/open/20260605-203006-builtin-yoi-local-ticket-backend-config/artifacts/.gitkeep b/work-items/open/20260605-203006-builtin-yoi-local-ticket-backend-config/artifacts/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/work-items/open/20260605-203006-builtin-yoi-local-ticket-backend-config/item.md b/work-items/open/20260605-203006-builtin-yoi-local-ticket-backend-config/item.md new file mode 100644 index 00000000..e1774928 --- /dev/null +++ b/work-items/open/20260605-203006-builtin-yoi-local-ticket-backend-config/item.md @@ -0,0 +1,60 @@ +--- +id: 20260605-203006-builtin-yoi-local-ticket-backend-config +slug: builtin-yoi-local-ticket-backend-config +title: Builtin yoi_local Ticket backend config +status: open +kind: task +priority: P1 +labels: [ticket, backend, config] +created_at: 2026-06-05T20:30:06Z +updated_at: 2026-06-05T20:30:06Z +assignee: null +legacy_ticket: null +--- + +## Background + +The Ticket backend should be configured as an explicit built-in Yoi local backend rather than an implicit generic local root. + +The desired config is: + +```toml +[backend] +provider = "builtin:yoi_local" +root = ".yoi/tickets" +``` + +This makes the backend an explicit Yoi product capability and prepares for removing `tickets.sh` and moving storage under `.yoi/`. + +## Requirements + +- Extend `.yoi/ticket.config.toml` backend schema from `kind = "local"` toward `provider = "builtin:yoi_local"`. +- Support `provider = "builtin:yoi_local"` as the canonical spelling. +- Decide whether old `kind = "local"` is rejected immediately or accepted only as a short transitional alias. Prefer avoiding long-term compatibility aliases. +- Default backend provider should become `builtin:yoi_local`. +- Default backend root should become `.yoi/tickets` once migration is ready, or support a transition mode if this ticket lands before storage migration. +- Update Ticket tools / Pod Ticket feature adapter to use the configured provider/root. +- Update role launcher/TUI paths if they inspect backend diagnostics. +- Keep backend root path containment and fail-closed behavior. +- Do not auto-create active storage unless the CLI command explicitly creates/migrates records. + +## Non-goals + +- Moving existing records; handled by `migrate-ticket-storage-to-yoi-tickets`. +- Removing `tickets.sh`; handled by `remove-tickets-sh`. +- External provider implementation. +- GitHub/Linear/Jira/MCP backend support. +- TUI UI changes. + +## Acceptance criteria + +- `.yoi/ticket.config.toml` with `provider = "builtin:yoi_local"` parses and resolves. +- Missing config defaults to the selected built-in backend semantics. +- Tests cover provider parsing, unsupported provider diagnostics, relative root resolution, missing/unusable root behavior, and Pod Ticket feature adapter integration. +- Docs/examples use `provider = "builtin:yoi_local"`. +- `cargo test -p ticket` and focused Pod Ticket tests pass. +- `cargo check --workspace --all-targets`, `cargo fmt --check`, `git diff --check`, and Ticket doctor validations pass. + +## Dependency + +Prefer after `yoi-ticket-cli-parity`, so validation and migration can use `yoi ticket doctor`. diff --git a/work-items/open/20260605-203006-builtin-yoi-local-ticket-backend-config/thread.md b/work-items/open/20260605-203006-builtin-yoi-local-ticket-backend-config/thread.md new file mode 100644 index 00000000..6c371d61 --- /dev/null +++ b/work-items/open/20260605-203006-builtin-yoi-local-ticket-backend-config/thread.md @@ -0,0 +1,7 @@ + + +## Created + +Created by tickets.sh create. + +--- diff --git a/work-items/open/20260605-203006-migrate-ticket-storage-to-yoi-tickets/artifacts/.gitkeep b/work-items/open/20260605-203006-migrate-ticket-storage-to-yoi-tickets/artifacts/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/work-items/open/20260605-203006-migrate-ticket-storage-to-yoi-tickets/item.md b/work-items/open/20260605-203006-migrate-ticket-storage-to-yoi-tickets/item.md new file mode 100644 index 00000000..16b87e92 --- /dev/null +++ b/work-items/open/20260605-203006-migrate-ticket-storage-to-yoi-tickets/item.md @@ -0,0 +1,66 @@ +--- +id: 20260605-203006-migrate-ticket-storage-to-yoi-tickets +slug: migrate-ticket-storage-to-yoi-tickets +title: Migrate Ticket storage to .yoi/tickets +status: open +kind: task +priority: P1 +labels: [ticket, migration, storage] +created_at: 2026-06-05T20:30:06Z +updated_at: 2026-06-05T20:30:06Z +assignee: null +legacy_ticket: null +--- + +## Background + +The active Ticket storage should move from top-level `work-items/` to `.yoi/tickets/` so Yoi project orchestration state lives under `.yoi/` with workflows and Ticket config. + +This is a project-record migration. Preserve all existing Ticket ids, thread history, artifacts, and resolutions. + +## Requirements + +- Move active storage: + +```text +work-items/open/ -> .yoi/tickets/open/ +work-items/pending/ -> .yoi/tickets/pending/ +work-items/closed/ -> .yoi/tickets/closed/ +``` + +- Use `git mv` or equivalent tracked moves so history remains inspectable. +- Update code defaults/tests/docs/workflows to refer to `.yoi/tickets` as active storage. +- Update `.yoi/ticket.config.toml` examples/defaults to `root = ".yoi/tickets"`. +- Update worktree workflow guidance if necessary: child worktrees still exclude `.yoi`; Ticket mutation remains main-workspace/orchestrator authority. +- Ensure `.yoi/tickets` is tracked project state, not ignored generated memory. +- Adjust `.gitignore` if needed so `.yoi/tickets`, `.yoi/workflow`, `.yoi/knowledge`, and `.yoi/ticket.config.toml` can be tracked while generated `.yoi/memory` remains ignored. +- Do not rewrite historical thread/artifact body references unless they are current docs/config paths. Historical mentions of `work-items/` may remain as history. + +## Non-goals + +- Removing `tickets.sh`; handled later. +- Changing Ticket ids/slugs/status semantics. +- External tracker migration. +- Scheduler/lease/queue automation. + +## Acceptance criteria + +- All active Ticket records are under `.yoi/tickets/`. +- Top-level `work-items/` no longer exists as active storage. +- `yoi ticket list/show/doctor` works against `.yoi/tickets/`. +- Ticket tools and TUI role actions use `.yoi/tickets/` through configured backend root. +- Documentation no longer tells users to use `work-items/` as active storage. +- `git status` shows intentional tracked moves, not delete/recreate loss of records. +- Validation passes: + - `yoi ticket doctor` + - transitional `./tickets.sh doctor` only if still present and intentionally updated; + - `cargo check --workspace --all-targets`; + - `cargo fmt --check`; + - `git diff --check`. + +## Dependency + +Prefer after: + +- `yoi-ticket-cli-parity` +- `builtin-yoi-local-ticket-backend-config` diff --git a/work-items/open/20260605-203006-migrate-ticket-storage-to-yoi-tickets/thread.md b/work-items/open/20260605-203006-migrate-ticket-storage-to-yoi-tickets/thread.md new file mode 100644 index 00000000..6c371d61 --- /dev/null +++ b/work-items/open/20260605-203006-migrate-ticket-storage-to-yoi-tickets/thread.md @@ -0,0 +1,7 @@ + + +## Created + +Created by tickets.sh create. + +--- diff --git a/work-items/open/20260605-203006-remove-tickets-sh/artifacts/.gitkeep b/work-items/open/20260605-203006-remove-tickets-sh/artifacts/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/work-items/open/20260605-203006-remove-tickets-sh/item.md b/work-items/open/20260605-203006-remove-tickets-sh/item.md new file mode 100644 index 00000000..948833a1 --- /dev/null +++ b/work-items/open/20260605-203006-remove-tickets-sh/item.md @@ -0,0 +1,53 @@ +--- +id: 20260605-203006-remove-tickets-sh +slug: remove-tickets-sh +title: Remove tickets.sh compatibility CLI +status: open +kind: task +priority: P1 +labels: [ticket, cleanup, cli] +created_at: 2026-06-05T20:30:06Z +updated_at: 2026-06-05T20:30:06Z +assignee: null +legacy_ticket: null +--- + +## Background + +After `yoi ticket ...` has CLI parity and active Ticket storage has moved to `.yoi/tickets/`, the old shell compatibility CLI should be removed. + +Keeping `tickets.sh` would leave a second mutation path and force duplicate semantics for create/comment/review/status/close/doctor. + +## Requirements + +- Delete `tickets.sh`. +- Remove or update every active doc/workflow/test reference that tells users/agents to run `./tickets.sh`. +- Replace validation references with `yoi ticket doctor`. +- Remove shell-specific tests if any, or port them to `yoi ticket ...` / Rust backend tests. +- Ensure no production code shells out to `tickets.sh`. +- Ensure all Ticket mutation paths use `crates/ticket` backend APIs or the `yoi ticket` CLI. +- Preserve historical Ticket thread/artifact mentions if they are closed historical context; do not rewrite old records unnecessarily. + +## Non-goals + +- Moving storage; must already be complete. +- Adding new Ticket features. +- External tracker support. +- TUI changes beyond documentation/help if needed. + +## Acceptance criteria + +- `tickets.sh` no longer exists. +- Repository docs/workflows no longer present `tickets.sh` as an active command. +- Validation docs use `yoi ticket doctor`. +- `rg "tickets.sh"` returns only closed historical records or no active references. +- `yoi ticket doctor` passes. +- `cargo check --workspace --all-targets`, `cargo fmt --check`, `git diff --check`, and relevant tests pass. + +## Dependencies + +Requires: + +- `yoi-ticket-cli-parity` +- `builtin-yoi-local-ticket-backend-config` +- `migrate-ticket-storage-to-yoi-tickets` diff --git a/work-items/open/20260605-203006-remove-tickets-sh/thread.md b/work-items/open/20260605-203006-remove-tickets-sh/thread.md new file mode 100644 index 00000000..6c371d61 --- /dev/null +++ b/work-items/open/20260605-203006-remove-tickets-sh/thread.md @@ -0,0 +1,7 @@ + + +## Created + +Created by tickets.sh create. + +--- diff --git a/work-items/open/20260605-203006-yoi-local-ticket-backend-migration/artifacts/.gitkeep b/work-items/open/20260605-203006-yoi-local-ticket-backend-migration/artifacts/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/work-items/open/20260605-203006-yoi-local-ticket-backend-migration/item.md b/work-items/open/20260605-203006-yoi-local-ticket-backend-migration/item.md new file mode 100644 index 00000000..90437821 --- /dev/null +++ b/work-items/open/20260605-203006-yoi-local-ticket-backend-migration/item.md @@ -0,0 +1,106 @@ +--- +id: 20260605-203006-yoi-local-ticket-backend-migration +slug: yoi-local-ticket-backend-migration +title: Yoi-local Ticket backend migration +status: open +kind: task +priority: P1 +labels: [ticket, backend, migration, cli] +created_at: 2026-06-05T20:30:06Z +updated_at: 2026-06-05T20:32:09Z +assignee: null +legacy_ticket: null +--- + +## Background + +Ticket development is now user-facing through TUI role actions, typed Ticket tools, Ticket workflows, and the Rust `ticket` crate. The old `tickets.sh` CLI and top-level `work-items/` storage are no longer the right long-term authority boundary. + +The desired end state is: + +- `yoi` binary owns Ticket operations. +- Ticket backend is configured as a built-in Yoi local backend. +- Ticket records live under `.yoi/tickets/`. +- `tickets.sh` is removed. +- `work-items/` is removed after migration. + +This is an umbrella for the migration. Child tickets should land in order so the repository remains operable at each step. + +## Target model + +```toml +# .yoi/ticket.config.toml + +[backend] +provider = "builtin:yoi_local" +root = ".yoi/tickets" +``` + +Storage: + +```text +.yoi/tickets/{open,pending,closed}// + item.md + thread.md + artifacts/ + resolution.md # closed Tickets only +``` + +User-facing operations: + +```text +yoi ticket create +yoi ticket list +yoi ticket show +yoi ticket comment +yoi ticket review +yoi ticket status +yoi ticket close +yoi ticket doctor +``` + +## Child tickets + +1. `yoi-ticket-cli-parity` + - Add `yoi ticket ...` CLI parity over the Rust Ticket backend. + - Keep existing storage initially. + +2. `builtin-yoi-local-ticket-backend-config` + - Add `provider = "builtin:yoi_local"` backend config and default root `.yoi/tickets`. + - Preserve compatibility with existing storage during transition. + +3. `migrate-ticket-storage-to-yoi-tickets` + - Move existing records from `work-items/` to `.yoi/tickets/`. + - Update docs/workflows/tests/defaults. + +4. `remove-tickets-sh` + - Remove `tickets.sh` after `yoi ticket ...` and `.yoi/tickets` are authoritative. + +## Requirements + +- Do not leave two authoritative mutation paths. +- Do not shell out from product code to `tickets.sh`. +- Preserve existing Ticket history and artifacts. +- Preserve `git history + Ticket files` as the durable project record. +- Keep child worktrees excluding `.yoi`; orchestration state remains in the main workspace. +- Keep `.yoi/tickets`, `.yoi/workflow`, and `.yoi/ticket.config.toml` tracked project state. +- Do not mix this migration with scheduler/lease/TUI dashboard work. + +## Acceptance criteria + +- All child tickets are closed. +- `yoi ticket ...` is the documented direct CLI path. +- Ticket tools and TUI role actions use the configured built-in backend. +- Existing records are under `.yoi/tickets/`. +- `work-items/` no longer exists as active storage. +- `tickets.sh` no longer exists. +- Repository validation uses `yoi ticket doctor` instead of `./tickets.sh doctor`. +- Docs explain user-facing TUI/Ticket tool workflows first and local backend details only as implementation details. + +## Non-goals + +- External tracker integration. +- GitHub/Linear/Jira/MCP backend support. +- Scheduler/lease/queue automation. +- Stateful workflow engine. +- Changing Ticket content semantics beyond storage/config migration. diff --git a/work-items/open/20260605-203006-yoi-local-ticket-backend-migration/thread.md b/work-items/open/20260605-203006-yoi-local-ticket-backend-migration/thread.md new file mode 100644 index 00000000..69bc6d03 --- /dev/null +++ b/work-items/open/20260605-203006-yoi-local-ticket-backend-migration/thread.md @@ -0,0 +1,54 @@ + + +## Created + +Created by tickets.sh create. + +--- + + + +## Decision + +Decision: migrate Ticket authority to the `yoi` binary and Yoi's built-in local backend. + +Target state: + +- Direct CLI operations use `yoi ticket ...`. +- Backend config uses `provider = "builtin:yoi_local"`. +- Active Ticket storage lives under `.yoi/tickets/`. +- `tickets.sh` is removed. +- Top-level `work-items/` is removed as active storage. + +Rationale: + +- Normal users should use TUI role actions, Ticket tools, workflows, and `yoi ticket ...`, not a shell script. +- Keeping `tickets.sh` as a live mutation path duplicates Ticket semantics and undermines the Rust backend as authority. +- `.yoi/tickets/` aligns Ticket records with `.yoi/workflow` and `.yoi/ticket.config.toml` as tracked project orchestration state. +- `work-items/` is legacy storage naming after the project concept was renamed to Ticket. + +Migration should land in child tickets so the repository remains operable at each step. + + +--- + + + +## Plan + +Plan: + +1. `yoi-ticket-cli-parity` + - Add `yoi ticket ...` operations over the Rust Ticket backend. + +2. `builtin-yoi-local-ticket-backend-config` + - Add canonical `provider = "builtin:yoi_local"` backend config and defaults. + +3. `migrate-ticket-storage-to-yoi-tickets` + - Move active Ticket records from `work-items/` to `.yoi/tickets/`. + +4. `remove-tickets-sh` + - Delete the shell compatibility CLI and update active docs/workflows/validation to `yoi ticket doctor`. + + +--- diff --git a/work-items/open/20260605-203006-yoi-ticket-cli-parity/artifacts/.gitkeep b/work-items/open/20260605-203006-yoi-ticket-cli-parity/artifacts/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/work-items/open/20260605-203006-yoi-ticket-cli-parity/item.md b/work-items/open/20260605-203006-yoi-ticket-cli-parity/item.md new file mode 100644 index 00000000..ac6aa3da --- /dev/null +++ b/work-items/open/20260605-203006-yoi-ticket-cli-parity/item.md @@ -0,0 +1,66 @@ +--- +id: 20260605-203006-yoi-ticket-cli-parity +slug: yoi-ticket-cli-parity +title: Yoi ticket CLI parity +status: open +kind: task +priority: P1 +labels: [ticket, cli, backend] +created_at: 2026-06-05T20:30:06Z +updated_at: 2026-06-05T20:30:06Z +assignee: null +legacy_ticket: null +--- + +## Background + +Before `tickets.sh` can be removed, the `yoi` binary must provide direct Ticket CLI operations over the Rust Ticket backend. + +This ticket moves the direct local CLI surface from shell script compatibility into the product binary. It should use `crates/ticket` APIs directly, not shell out to `tickets.sh`. + +## Requirements + +Add `yoi ticket ...` subcommands with parity for the operations currently used through the local compatibility CLI: + +- `yoi ticket create --title "..." [--slug slug] [--kind task] [--priority P2] [--label a,b]` +- `yoi ticket list [--status open|pending|closed|all]` +- `yoi ticket show ` +- `yoi ticket comment [--role comment|plan|decision|implementation_report] [--file path|--message text]` +- `yoi ticket review --approve|--request-changes [--file path|--message text]` +- `yoi ticket status open|pending|closed` +- `yoi ticket close [--resolution text|--file path]` +- `yoi ticket doctor` + +Use `ticket::TicketBackend` / `LocalTicketBackend` or the configured backend resolver if available. + +## Scope + +- Product CLI belongs in the `insomnia`/top-level `yoi` binary crate, consistent with current CLI ownership. +- CLI output should be stable enough for human use and tests, but does not need to preserve exact `tickets.sh` output formatting. +- Preserve existing Ticket file compatibility. +- Keep `tickets.sh` in place for this ticket; removal happens later. +- Keep active storage where it is for now unless the backend config ticket has already landed. + +## Non-goals + +- Moving storage to `.yoi/tickets/`. +- Removing `tickets.sh`. +- External tracker backends. +- TUI changes. +- Scheduler/lease/queue. + +## Acceptance criteria + +- `yoi ticket --help` documents available subcommands. +- Each required operation works through Rust backend APIs without invoking `tickets.sh`. +- `yoi ticket doctor` can replace `./tickets.sh doctor` in validation after the migration. +- Tests cover create/list/show/comment/review/status/close/doctor in temp roots or fixtures. +- Files written by `yoi ticket ...` are readable by existing backend/tests. +- `cargo test` for affected crates passes. +- `cargo check --workspace --all-targets`, `cargo fmt --check`, `git diff --check`, and both `yoi ticket doctor` and `./tickets.sh doctor` pass during the transition. + +## Follow-up + +- `builtin-yoi-local-ticket-backend-config` +- `migrate-ticket-storage-to-yoi-tickets` +- `remove-tickets-sh` diff --git a/work-items/open/20260605-203006-yoi-ticket-cli-parity/thread.md b/work-items/open/20260605-203006-yoi-ticket-cli-parity/thread.md new file mode 100644 index 00000000..6c371d61 --- /dev/null +++ b/work-items/open/20260605-203006-yoi-ticket-cli-parity/thread.md @@ -0,0 +1,7 @@ + + +## Created + +Created by tickets.sh create. + +---