16 KiB
Tickets and development workflow
Yoi project work is tracked through Tickets. For normal use, interact with Tickets through the TUI role commands, Ticket tools, and Ticket workflows. Git history plus Ticket files remain the authoritative state-transition record behind those interfaces.
The current local backend stores Ticket files under .yoi/tickets/. That storage detail matters for maintainers and backend compatibility, but it is not the primary user-facing workflow.
Do not treat ad-hoc chat summaries, memory records, or Pod notifications as the final source of project state. Notifications are hints to inspect concrete state, not proof of completion.
Concepts
Ticket: durable project/orchestration record. It contains requirements, decisions, plans, implementation reports, reviews, artifacts, and resolution history.Task: session-local progress tracking inside a Pod. It is not the project record.Assignment: a concrete delegation from an Orchestrator to a coder/reviewer/investigator Pod.IntentPacket: the short implementation/review contract derived from a Ticket and handed to an Assignment.LocalTicketBackend: the current.yoi/tickets/markdown/thread/artifacts storage backend.
A Ticket may represent a feature, bug, cleanup, design decision, investigation, workflow change, release task, or orchestration umbrella. The common requirement is that the closed Ticket explains a completed outcome.
User-facing entry points
Use the highest-level interface that matches the work:
- In the TUI, use
:ticket ...commands to launch fixed Ticket-role Pods. - Inside Pods, use typed Ticket tools to create, inspect, comment, review, and close Tickets.
- For multi-step work, follow the Ticket Intake, Orchestrator Routing, Preflight, and Multi-agent workflows.
Maintainers can inspect the local .yoi/tickets/ files directly when debugging storage, but normal user instructions should go through TUI role actions, Ticket tools, or yoi ticket ....
Ticket tools inside Pods
Pods with the Ticket built-in feature can use typed Ticket tools:
TicketCreateTicketListTicketShowTicketCommentTicketReviewTicketStatusTicketCloseTicketDoctor
These tools operate through the typed Ticket backend. They are not arbitrary filesystem write permission to .yoi/tickets/.
Use them when a Pod needs to materialize or update project records:
- Intake creates a new Ticket after user agreement.
- Orchestrator records routing decisions and intent packets.
- Reviewer records approve/request-changes review results.
- Maintainer closes a Ticket with a resolution when merge/validation/cleanup evidence is complete.
Do not bypass workflow gates just because Ticket tools are available. Ticket mutation is a project-record operation and should remain auditable.
Ticket configuration
Workspace Ticket orchestration is configured by .yoi/ticket.config.toml when present.
MVP shape:
[backend]
provider = "builtin:yoi_local"
root = ".yoi/tickets"
[roles.intake]
profile = "project:intake"
launch_prompt = "$workspace/ticket/intake/launch"
workflow = "ticket-intake-workflow"
[roles.orchestrator]
profile = "project:orchestrator"
launch_prompt = "$workspace/ticket/orchestrator/launch"
workflow = "ticket-orchestrator-routing"
[roles.coder]
profile = "project:coder"
launch_prompt = "$workspace/ticket/coder/launch"
workflow = "multi-agent-workflow"
[roles.reviewer]
profile = "project:reviewer"
launch_prompt = "$workspace/ticket/reviewer/launch"
workflow = "multi-agent-workflow"
[roles.investigator]
profile = "project:investigator"
launch_prompt = "$workspace/ticket/investigator/launch"
workflow = "ticket-orchestrator-routing"
Fixed roles are:
intakeorchestratorcoderreviewerinvestigator
This is not an arbitrary role registry. The fixed roles are the roles required by Ticket orchestration.
profile selects the Pod runtime Profile for that role. The selected Profile owns durable role/system behavior. ticket.config.toml does not have a role-level system_instruction field.
launch_prompt is a per-action first-run prompt reference for future prompt resolution. Current launcher behavior exposes the ref but does not treat it as system instruction.
workflow is the workflow the launched role should follow. Workflow state and phase-specific prompt injection are future work; any dynamic prompt content must be committed as history before it affects model context.
provider = "builtin:yoi_local" selects Yoi's built-in local Ticket backend. root = ".yoi/tickets" is the canonical local storage root for this repository. Legacy kind = "local" is accepted only as a short transitional alias; new configs should use provider.
If .yoi/ticket.config.toml is missing, defaults are:
- backend provider:
builtin:yoi_local - backend root:
<workspace>/.yoi/tickets - all role profiles:
inherit - no launch prompt refs
- workflows:
- intake:
ticket-intake-workflow - orchestrator:
ticket-orchestrator-routing - coder:
multi-agent-workflow - reviewer:
multi-agent-workflow - investigator:
ticket-orchestrator-routing
- intake:
Important: top-level TUI Ticket role launches cannot execute profile = "inherit" because top-level launch has no parent Profile to inherit from. Configure concrete role profiles in .yoi/ticket.config.toml before using TUI role-launch commands.
Workflow lifecycle
Ticket-driven development normally moves through these gates:
- Intake
- Orchestrator routing
- Preflight or spike when needed
- Implementation assignment
- Review
- Merge / validation / cleanup
- Close
Each gate records its decision or evidence in the Ticket thread or artifacts.
1. Intake
Use ticket-intake-workflow when a user request is broad, ambiguous, or not yet a Ticket.
Intake should:
- clarify user intent;
- check duplicate/related Tickets;
- draft background, requirements, acceptance criteria, non-goals, readiness, risk flags, and validation;
- create or update the Ticket only after user agreement.
Intake should not schedule implementation, spawn coder/reviewer Pods, create worktrees, merge, or close Tickets.
2. Orchestrator routing
Use ticket-orchestrator-routing to classify the next action for an existing Ticket.
Routing classifications include:
requirements_sync_neededpreflight_neededspike_neededimplementation_readyreview_neededblocked_action_requiredclose_readydefer_pendingclosed_or_noop
Routing decisions should be recorded with TicketComment using plan or decision role. The decision should state the classification, evidence checked, reason, next action, and escalation conditions.
3. Preflight
Use ticket-preflight-workflow before implementation when the Ticket touches design/authority boundaries, has multiple natural implementation strategies, or cannot produce a short IntentPacket.
Preflight should resolve or record:
- requirements and acceptance criteria;
- current code map;
- invariants and non-goals;
- critical risks and failure modes;
- implementation-ready vs requirements-sync/spike/blocked classification.
Do not send preflight-needed Tickets directly to coder Pods.
4. Implementation assignment
Use multi-agent-workflow for implementation-ready Tickets.
The Orchestrator should prepare an IntentPacket with:
- intent;
- requirements;
- invariants;
- non-goals;
- escalation conditions;
- validation;
- current code map;
- critical risks.
Implementation normally happens in a child git worktree created by the Orchestrator, not by the coder Pod. The coder Pod receives narrow write scope to the worktree and must report changed files, implementation summary, validation, unresolved risks, and review readiness.
5. Review
Reviewer Pods should be sibling Pods, not children of coder Pods. They should read the Ticket, intent packet, diff, implementation report, and validation evidence.
Review results should be recorded with the TicketReview tool. Maintainers working directly with the local backend can use the yoi ticket CLI documented later.
Blockers must be fixed or explicitly escalated before merge-ready submission.
6. Merge and close
Unless explicitly authorized otherwise, final merge, cleanup, design-boundary decisions, and Ticket closure remain Orchestrator/human responsibilities.
Before closing, verify concrete evidence:
- child Pod output via
ReadPodOutput; - worktree status and diff;
- validation command output;
- review result;
- Ticket requirements and acceptance criteria;
- merge/cleanup state in the main workspace.
Close with a resolution that summarizes what changed, key commits, validation, review status, and remaining follow-ups.
TUI Ticket role actions
TUI exposes explicit commands for fixed Ticket roles:
:ticket intake <context...>
:ticket route <ticket-id-or-slug> [instruction...]
:ticket investigate <ticket-id-or-slug> [instruction...]
:ticket implement <ticket-id-or-slug> [instruction...]
:ticket review <ticket-id-or-slug> [instruction...]
These commands call the shared client Ticket role launcher. TUI does not construct SpawnConfig, Profile semantics, workflow segments, or prompt content directly.
Command mapping:
intakelaunches the intake role without an existing Ticket and requires freeform context.routelaunches the orchestrator role for an existing Ticket.investigatelaunches the investigator role for a read-only spike/investigation.implementlaunches the coder role for an implementation assignment.reviewlaunches the reviewer role for review.
All actions are explicit and user-triggered. They are not a scheduler, queue, spawned-Pod panel, or automatic maintainer loop.
TUI execution path
The TUI path is:
User types :ticket ... in the TUI
-> TUI parses the command into a fixed Ticket role action
-> TUI builds a TicketRoleLaunchContext
-> client Ticket role launcher reads .yoi/ticket.config.toml
-> launcher selects the role Profile and workflow
-> launcher spawns the role Pod
-> launcher sends Method::Run with WorkflowInvoke + Text segments
-> launcher waits for run-acceptance evidence
-> TUI shows success/failure in the actionbar
The launched Pod receives dynamic Ticket/action context as its first committed run input. The TUI does not inject hidden context, does not write Ticket files directly, and does not construct prompt/workflow segments by hand.
The first run input contains:
- the selected fixed role;
- the workflow slug from
.yoi/ticket.config.toml; - Ticket id/slug when the command targets an existing Ticket;
- freeform user instruction/context from the command;
- configured
launch_promptreference if present, as an unresolved reference for future prompt resolution.
The selected Profile supplies durable system/role behavior. ticket.config.toml does not override system instruction.
TUI setup
Because top-level TUI role launches cannot inherit a parent Profile, configure concrete role profiles before using these commands:
# .yoi/ticket.config.toml
[backend]
provider = "builtin:yoi_local"
root = ".yoi/tickets"
[roles.intake]
profile = "project:intake"
workflow = "ticket-intake-workflow"
[roles.orchestrator]
profile = "project:orchestrator"
workflow = "ticket-orchestrator-routing"
[roles.coder]
profile = "project:coder"
workflow = "multi-agent-workflow"
[roles.reviewer]
profile = "project:reviewer"
workflow = "multi-agent-workflow"
[roles.investigator]
profile = "project:investigator"
workflow = "ticket-orchestrator-routing"
If a role still uses profile = "inherit", TUI will fail closed with a diagnostic explaining that a concrete profile is required.
TUI usage examples
Create or refine a Ticket from a broad request:
:ticket intake Add a safer retry policy for stream-open provider failures
Route an existing Ticket:
:ticket route ticket-local-files-backend classify next action and record routing decision
Start a read-only investigation role:
:ticket investigate plugin-extension-surface map current feature API boundaries
Launch a coder role for an implementation-ready Ticket:
:ticket implement ticket-config-role-profile-mapping implement the accepted MVP only
Launch a reviewer role:
:ticket review tui-ticket-role-actions review diff against Ticket requirements
After launch, inspect the created Pod through normal Pod/TUI surfaces. The command confirms launch/run acceptance; it does not mean the role Pod completed the assignment.
TUI troubleshooting
profile = "inherit": configure a concrete role Profile in.yoi/ticket.config.toml.- malformed
.yoi/ticket.config.toml: fix the config and retry. - missing Ticket id/slug for
route,investigate,implement, orreview: provide the target Ticket. - empty
:ticket intake: provide the request/context to clarify. - launch success but no visible completion: attach to or inspect the launched Pod; completion notifications are hints, not authority.
Granularity
One Ticket should describe a complete change that can be explained as a feature, behavior, design decision, investigation result, or maintenance outcome when closed.
Avoid Tickets that only mirror an implementation step unless that step is independently reviewable and useful. Phase/step lists inside a Ticket are execution order, not a separate dependency system.
Use umbrella Tickets only to track a split. Child Tickets should be independently reviewable and closeable.
Ticket contents
A useful Ticket states:
- background and motivation;
- requirements;
- acceptance criteria;
- relevant constraints and non-goals;
- readiness / preflight needs / risk flags when relevant;
- implementation reports when work is submitted;
- reviews;
- final resolution when closed.
Keep long research dumps out of the item body. Put necessary artifacts under the Ticket's artifacts/ directory and summarize the conclusion in the thread.
Do not store secrets, credentials, private prompt contents, or raw logs containing secrets in Ticket bodies, thread entries, artifacts, diagnostics, or model-visible prompts.
Backend/maintainer CLI: yoi ticket
The product CLI exposes the typed Ticket backend for repository maintenance and validation. It operates on the configured .yoi/tickets/ storage and is the preferred command-line surface when editing Tickets outside a Pod.
yoi ticket create --title "..." [--slug slug] [--kind task] [--priority P2] [--label a,b]
yoi ticket list [--status open|pending|closed|all]
yoi ticket show <id-or-slug>
yoi ticket comment <id-or-slug> [--role comment|plan|decision|implementation_report] [--file path]
yoi ticket review <id-or-slug> --approve|--request-changes [--file path]
yoi ticket status <id-or-slug> open|pending
yoi ticket close <id-or-slug> [--resolution text|--file path]
yoi ticket doctor
yoi ticket status intentionally does not close Tickets. Closing must use yoi ticket close so the backend writes the required resolution.md and passes yoi ticket doctor.
The current LocalTicketBackend stores records under:
.yoi/tickets/{open,pending,closed}/<id>/
item.md
thread.md
artifacts/
resolution.md # closed Tickets only
Backend integrations must preserve this format until an explicit migration changes it. The repository-root work-items/ path is no longer a live mutable backend; do not recreate it for Ticket records. Human users should prefer TUI role actions or Ticket tools; maintainers may use yoi ticket ... when working directly with repository records.
Validation
Run at least:
yoi ticket doctor
git diff --check
Implementation Tickets usually also need focused tests and broader checks, for example:
cargo fmt --check
cargo check --workspace --all-targets
cargo test -p <crate> <filter>
nix build .#yoi --no-link
Record validation commands and results in the implementation report or resolution.