refactor: rename pod crate to worker

This commit is contained in:
2026-06-26 00:05:57 +09:00
parent 4c677640f4
commit 6c59fe927b
194 changed files with 6637 additions and 6146 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ A report is useful when it explains:
After rebuilding and restarting during dogfooding, `current_exe()` can point at a deleted binary path. Use typed runtime-command configuration and the development-only `YOI_POD_RUNTIME_COMMAND` executable override rather than reviving shell-command overrides.
## Multi-Pod work
## Multi-Worker work
Use child Pods for scoped tasks and reviews, but keep orchestration decisions in visible project records. Do not merge, close, or clean up merely because a child notification arrived.
+2 -2
View File
@@ -14,11 +14,11 @@ Yoi keeps environment variables for narrow bootstrap and development cases, whil
- Prefer embedded builtin resources over installed runtime resource directories.
- Use explicit secret refs for provider and WebSearch credentials.
- Keep dev-only executable overrides clearly named and documented.
- Avoid shell-command parser overrides for runtime Pod launch.
- Avoid shell-command parser overrides for runtime Worker launch.
- Tests should prefer typed fixtures/injection and mutate process environment only around thin env-reader behavior.
## Current surface
Use `YOI_*` for current environment variables. Old project prefixes should not be reintroduced.
`YOI_POD_RUNTIME_COMMAND` is a development-only executable-path override for typed `yoi pod` launch. It is not a general shell-command override.
`YOI_POD_RUNTIME_COMMAND` is a legacy-named development-only executable-path override for typed `yoi worker` launch. It is not a general shell-command override.
+2 -2
View File
@@ -8,7 +8,7 @@ Yoi Plugins are intentionally explicit. The Plugin system is designed around the
- a Profile/config entry must explicitly enable each Plugin package by source-qualified id, version, and digest;
- Plugin grants must allow each surface and host API before registration or execution can use it;
- Plugin code runs only through the configured sandbox runtime;
- Plugin packages do not inherit Pod workspace filesystem, network, environment, or Ticket authority;
- Plugin packages do not inherit Worker workspace filesystem, network, environment, or Ticket authority;
- Tool calls and Tool results use the ordinary Yoi Tool/Engine history path;
- Plugin metadata, output, and diagnostics are untrusted unless Yoi host policy says otherwise.
@@ -426,7 +426,7 @@ Yoi checks scheme (`ws`/`wss`), host, optional port, and path prefix against bot
## `fs` host API
The `fs` host API is Plugin-scoped and grant-gated. Plugins do not inherit the Pod/workspace filesystem authority automatically.
The `fs` host API is Plugin-scoped and grant-gated. Plugins do not inherit the Worker/workspace filesystem authority automatically.
Example grant shape:
+1 -1
View File
@@ -44,4 +44,4 @@ Use work item review to verify that the implementation satisfies the ticket, not
## Current limitation
End-to-end tests that spawn real processes are not yet designed. When changing Pod restoration, socket behavior, or orchestration, compensate with targeted unit/integration tests and concrete manual evidence in the implementation report.
End-to-end tests that spawn real processes are not yet designed. When changing Worker restoration, socket behavior, or orchestration, compensate with targeted unit/integration tests and concrete manual evidence in the implementation report.
+17 -17
View File
@@ -4,14 +4,14 @@ Yoi project work is tracked through Tickets. For normal use, interact with Ticke
The current local backend stores each Ticket in the flat `.yoi/tickets/<ticket-id>/` layout. The directory name is the canonical opaque Ticket id: a fixed-width Crockford base32 Unix epoch millisecond timestamp. Slugs and frontmatter `id`/`slug` fields are not current-state authority. 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.
Do not treat ad-hoc chat summaries, memory records, or Worker 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.
- `Objective`: first-class medium-term goal record. It stores goal, motivation/background, strategy/design direction, success criteria/exit conditions, decision context, current Objective lifecycle, and canonical Ticket links under `.yoi/objectives/<objective-id>/item.md`. Objective context is judgment/background context; it is not implementation authority and does not replace reading each Ticket body/thread/artifacts.
- `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 Pod or task-specific helper Pod.
- `Task`: session-local progress tracking inside a Worker. It is not the project record.
- `Assignment`: a concrete delegation from an Orchestrator to a coder/reviewer Worker or task-specific helper Worker.
- `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.
- `Ticket relation`: durable project-level Ticket-to-Ticket metadata stored as forward canonical-id relations (`depends_on`, `blocks`, `related`, `supersedes`, `duplicate_of`). Inverse views such as `blocked_by` are derived, not stored.
@@ -46,9 +46,9 @@ Pods with the Ticket built-in feature can use typed Ticket tools:
These tools operate through the typed Ticket backend. They are not arbitrary filesystem write permission to `.yoi/tickets/`.
Relation tools are for non-hierarchical project metadata only. Use canonical opaque Ticket ids, store forward relations only, and keep runtime execution planning (capacity, ordering decisions, do-not-parallelize notes, Pod/session/worktree ownership) in OrchestrationPlan or session-local records instead of relation metadata. Unresolved `depends_on` and incoming unresolved `blocks` are queue/acceptance blockers; `related` is not blocking, and `supersedes` / `duplicate_of` are diagnostics rather than automatic lifecycle transitions.
Relation tools are for non-hierarchical project metadata only. Use canonical opaque Ticket ids, store forward relations only, and keep runtime execution planning (capacity, ordering decisions, do-not-parallelize notes, Worker/session/worktree ownership) in OrchestrationPlan or session-local records instead of relation metadata. Unresolved `depends_on` and incoming unresolved `blocks` are queue/acceptance blockers; `related` is not blocking, and `supersedes` / `duplicate_of` are diagnostics rather than automatic lifecycle transitions.
Use them when a Pod needs to materialize or update project records:
Use them when a Worker needs to materialize or update project records:
- Intake creates a new Ticket after user agreement.
- Orchestrator records routing decisions and intent packets.
@@ -59,7 +59,7 @@ Do not bypass workflow gates just because Ticket tools are available. Ticket mut
## Objective records
Objectives are lightweight medium-term project records, not Tickets, Ticket relations, OrchestrationPlan execution records, or Pod/session claims. Use them when a goal spans several concrete Tickets and the durable motivation, design direction, success criteria, or decision context would otherwise be repeated or lost.
Objectives are lightweight medium-term project records, not Tickets, Ticket relations, OrchestrationPlan execution records, or Worker/session claims. Use them when a goal spans several concrete Tickets and the durable motivation, design direction, success criteria, or decision context would otherwise be repeated or lost.
The local Objective surface stores records under:
@@ -90,7 +90,7 @@ The Markdown body should include these sections:
- `## Success criteria / exit conditions`
- `## Decision context`
Linked Tickets must be canonical opaque Ticket ids that exist in the configured Ticket backend root. Objective-to-Ticket links are context links only: they are not dependency, blocking, ordering, ownership, or scheduling relations. Use typed Ticket relations for Ticket-to-Ticket dependency/blocking/related metadata, OrchestrationPlan records for routing/execution plans, and Pod/session claims for runtime ownership hints.
Linked Tickets must be canonical opaque Ticket ids that exist in the configured Ticket backend root. Objective-to-Ticket links are context links only: they are not dependency, blocking, ordering, ownership, or scheduling relations. Use typed Ticket relations for Ticket-to-Ticket dependency/blocking/related metadata, OrchestrationPlan records for routing/execution plans, and Worker/session claims for runtime ownership hints.
Objective lifecycle is only Objective lifecycle. `active`, `paused`, `done`, and `archived` do not drive Ticket `state`, do not authorize implementation, and do not close linked Tickets. A role reading Objective context must still inspect each Ticket body, thread, artifacts, explicit Ticket relations, and OrchestrationPlan records before acting.
@@ -146,9 +146,9 @@ Fixed roles are:
This is not an arbitrary role registry. The fixed roles are the roles required by Ticket orchestration.
Stale `[roles.investigator]` config is rejected as an unsupported fixed role; remove it and,
when a spike is useful, let the Orchestrator create an ordinary task-specific read-only helper Pod.
when a spike is useful, let the Orchestrator create an ordinary task-specific read-only helper Worker.
`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.
`profile` selects the Worker 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.
@@ -243,7 +243,7 @@ The Orchestrator should prepare an `IntentPacket` with:
- 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.
Implementation normally happens in a child git worktree created by the Orchestrator, not by the coder Worker. The coder Worker receives narrow write scope to the worktree and must report changed files, implementation summary, validation, unresolved risks, and review readiness.
### 5. Review
@@ -259,7 +259,7 @@ Unless explicitly authorized otherwise, final merge, cleanup, design-boundary de
Before closing, verify concrete evidence:
- child Pod output via `ReadPodOutput`;
- child Worker output via `ReadWorkerOutput`;
- worktree state and diff;
- validation command output;
- review result;
@@ -270,7 +270,7 @@ Close with a resolution that summarizes what changed, key commits, validation, r
## Workspace Dashboard Ticket role actions
`yoi panel` is the active Ticket/Intake/Orchestrator Dashboard. It owns fixed Ticket role-launch actions and uses the shared client Ticket role launcher. The single-Pod Console no longer supports `:ticket ...` commands; typing them in command mode is treated like any other unknown command.
`yoi panel` is the active Ticket/Intake/Orchestrator Dashboard. It owns fixed Ticket role-launch actions and uses the shared client Ticket role launcher. The single-Worker Console no longer supports `:ticket ...` commands; typing them in command mode is treated like any other unknown command.
Role actions map to the same fixed roles configured in `.yoi/ticket.config.toml`:
@@ -279,7 +279,7 @@ Role actions map to the same fixed roles configured in `.yoi/ticket.config.toml`
- implement launches the coder role for an implementation assignment.
- review launches the reviewer role for review.
All actions are explicit and user-triggered. They are not a scheduler, queue, spawned-Pod Dashboard, or automatic maintainer loop.
All actions are explicit and user-triggered. They are not a scheduler, queue, spawned-Worker Dashboard, or automatic maintainer loop.
### Dashboard execution path
@@ -290,13 +290,13 @@ User triggers a Ticket action in yoi panel
-> Dashboard 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 spawns the role Worker
-> launcher sends Method::Run with WorkflowInvoke + Text segments
-> launcher waits for run-acceptance evidence
-> Dashboard reports success/failure
```
The launched Pod receives dynamic Ticket/action context as its first committed run input. The Dashboard does not inject hidden context, does not write Ticket files directly, and does not construct prompt/workflow segments by hand.
The launched Worker receives dynamic Ticket/action context as its first committed run input. The Dashboard 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:
@@ -343,7 +343,7 @@ If a role still uses `profile = "inherit"`, the Dashboard fails closed with a di
- `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 for route, implement, or review actions: provide the target Ticket.
- launch success but no visible completion: attach to or inspect the launched Pod; completion notifications are hints, not authority.
- launch success but no visible completion: attach to or inspect the launched Worker; completion notifications are hints, not authority.
## Granularity
@@ -383,7 +383,7 @@ Do not store secrets, credentials, private prompt contents, or raw logs containi
## 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.
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 Worker.
```sh
yoi ticket create --title "..." [--priority P2]
+3 -3
View File
@@ -14,7 +14,7 @@ Current workflow themes include:
- Orchestrator routing from Tickets to the next workflow/action
- planning/requirements synchronization when concrete missing decisions or information block routing
- worktree setup and cleanup
- sibling coder/reviewer Pod orchestration
- sibling coder/reviewer Worker orchestration
- human-gated maintenance and merge readiness
## Child Pods
@@ -23,8 +23,8 @@ Spawned Pods are useful for scoped implementation, review, or exploration. They
A parent/orchestrator must verify:
- child output via `ReadPodOutput`
- live/restorable state via Pod tools when relevant
- child output via `ReadWorkerOutput`
- live/restorable state via Worker tools when relevant
- worktree state and diff
- validation command output
- Ticket requirements and acceptance criteria