diff --git a/.yoi/tickets/00001KWHEM8YJ/artifacts/orchestration-plan.jsonl b/.yoi/tickets/00001KWHEM8YJ/artifacts/orchestration-plan.jsonl new file mode 100644 index 00000000..1eed0012 --- /dev/null +++ b/.yoi/tickets/00001KWHEM8YJ/artifacts/orchestration-plan.jsonl @@ -0,0 +1,3 @@ +{"id":"orch-plan-20260702-164730-1","ticket_id":"00001KWHEM8YJ","kind":"waiting_capacity_note","note":"Dashboard 起動時の queue review。対象 Ticket は未指定で、ユーザー指示により explicit follow-up まで role Pod spawn / queued->inprogress acceptance は行わない human gate として待機する。確認済み: Ticket 本文/最近の thread、TicketRelationQuery(0件)、TicketOrchestrationPlanQuery(0件)、workspace git/worktree 状態、visible Pods、TicketDoctor(0 errors)。","author":"orchestrator","at":"2026-07-02T16:47:30Z"} +{"id":"orch-plan-20260702-170047-2","ticket_id":"00001KWHEM8YJ","kind":"accepted_plan","accepted_plan":{"summary":"`00001KWHHRTM9` と `00001KWHEM8YJ` は workspace Browser の runtime/worker UI/API surface が重なるため、別 worktree 並列ではなく同一 branch/worktree で順序実装する。human gate は明示 follow-up で解除済み。","branch":"work/00001KWHHRTM9-00001KWHEM8YJ","worktree":"/home/hare/Projects/yoi/.worktree/00001KWHHRTM9-00001KWHEM8YJ","role_plan":"単一 sibling Coder Pod に同一 implementation worktree を委譲し、Runtime connection settings/API を先に実装してから Manual Coding Worker launch 導線を実装する。実装後は別 sibling Reviewer Pod で両 Ticket の recorded IntentPacket / invariants / acceptance criteria に照らしてレビューする。"},"author":"orchestrator","at":"2026-07-02T17:00:47Z"} +{"id":"orch-plan-20260702-170054-3","ticket_id":"00001KWHEM8YJ","kind":"after","related_ticket":"00001KWHHRTM9","note":"同一 worktree で順序実装する。Manual Coding Worker launch は Runtime connection settings/API の candidate/projection 境界に合わせて後続実装する。","author":"orchestrator","at":"2026-07-02T17:00:54Z"} diff --git a/.yoi/tickets/00001KWHEM8YJ/item.md b/.yoi/tickets/00001KWHEM8YJ/item.md index 6b24327d..bda02d0b 100644 --- a/.yoi/tickets/00001KWHEM8YJ/item.md +++ b/.yoi/tickets/00001KWHEM8YJ/item.md @@ -1,8 +1,8 @@ --- title: 'Workspace Browserから手動Coding Workerを作成する導線を追加する' -state: 'queued' +state: 'inprogress' created_at: '2026-07-02T12:59:57Z' -updated_at: '2026-07-02T16:13:24Z' +updated_at: '2026-07-02T17:01:11Z' assignee: null queued_by: 'workspace-panel' queued_at: '2026-07-02T16:13:24Z' diff --git a/.yoi/tickets/00001KWHEM8YJ/thread.md b/.yoi/tickets/00001KWHEM8YJ/thread.md index 08fac08d..2b91487c 100644 --- a/.yoi/tickets/00001KWHEM8YJ/thread.md +++ b/.yoi/tickets/00001KWHEM8YJ/thread.md @@ -62,4 +62,97 @@ Marked ready by `yoi ticket state`. Ticket を `workspace-panel` が queued にしました。 +--- + + + +## Decision + +Routing decision: implementation_ready + +Reason: +- Ticket は Manual Coding Worker launch の product-level API / Sidebar New form / sanitized payload / success Console navigation / unsupported runtime diagnostic を具体化しており、observable な acceptance criteria と validation がある。 +- typed relation blocker は 0 件、OrchestrationPlan は prior human-gate waiting note のみで、ユーザーから「2つとも消化して」と明示 follow-up があったため human gate は解除された。 +- `00001KWHHRTM9` の Runtime connection management と UI/API surface が近く、別 worktree 並列では衝突リスクが高いので、同一 implementation worktree/branch で `00001KWHHRTM9` を先に実装し、その Runtime candidate/projection を利用して本 Ticket を続けて実装する。 + +Evidence checked: +- Ticket body / thread / artifacts。 +- `TicketRelationQuery(00001KWHEM8YJ)` は 0 件。 +- `TicketOrchestrationPlanQuery(00001KWHEM8YJ)` は prior human-gate waiting note のみ。 +- queued Ticket 一覧では `00001KWHHRTM9` も queued、ready/inprogress は 0 件。 +- workspace/orchestration git state と worktree 一覧、visible Pods、TicketDoctor(0 errors / 既存 warning のみ)。 +- Bounded code map: `web/workspace/src/lib/workspace-sidebar/WorkersNavSection.svelte`、console route under `web/workspace/src/routes/runtimes/[runtimeId]/workers/[workerId]/console/`、existing `/api/workers` list projection、`/api/runtimes/{runtime_id}/workers` internal-ish Runtime spawn path、`crates/workspace-server` runtime/backend/config areas。 + +IntentPacket: + +Intent: +- Workspace Browser sidebar の WORKER heading 横に `New` button と作成 form を追加し、Browser-facing `/api/workers` product-level endpoint から coding Worker を作成し、成功後に Worker Console へ遷移する。 + +Binding decisions / invariants: +- Browser UI は existing Runtime create payload を直接露出しない。 +- Browser-facing request fields は `runtime_id` / `display_name` / `profile` / `initial_text` のみ。`kind` は endpoint/backend launch mode として扱い、form input や request field にしない。 +- Browser-facing payload/response/form に raw workspace path、cwd、tool scope、`ConfigBundleRef`、requested capabilities、secret/token、Runtime endpoint、socket/session/store path を含めない。 +- `profile` は Backend が公開する候補から選ばせ、自由入力にしない。 +- v0 は embedded/local Runtime を primary target とし、remote Runtime の workspace provisioning が未対応なら typed diagnostic で拒否してよい。 +- `/api/runtimes/{runtime_id}/workers` は残してよいが、New Worker UI は新しい product-level `/api/workers` POST を使う。 + +Requirements / acceptance criteria: +- Sidebar WORKER heading 横に `New` button がある。 +- `New` で display name / runtime / profile / initial text だけの form が開く。 +- Form submit は `/api/workers` product-level endpoint を使い、coding Worker を作成できる。 +- Backend は request の `profile` から Profile / ConfigBundle / execution backend を解決する。 +- 作成成功後、Worker list を refresh し、`/runtimes/{runtime_id}/workers/{worker_id}/console` へ遷移する。 +- 作成失敗時、入力値を保持して sanitized diagnostic を form に表示する。 +- focused backend/UI tests を追加し、指定 validation を可能な範囲で実行する。 + +Implementation latitude: +- Runtime candidate は `00001KWHHRTM9` の projection を利用する。v0 で embedded-only fallback が必要なら許容されるが、Browser 自由入力にはしない。 +- Product-level endpoint の internal mapping、response shape、Svelte form placement(inline/sidebar panel/modal)は既存 UX を壊さない範囲で選んでよい。 +- Profile candidate の v0 source は backend-provided static/builtin candidates でもよい。ただし自由入力化しない。 + +Escalate if: +- Browser-facing API に raw path/cwd/scope/secret/runtime internal location を含めないと実装できない場合。 +- Profile/ConfigBundle resolution の既存 boundary を変える必要が出た場合。 +- remote runtime provisioning を完成させないと acceptance を満たせない場合。 + +Validation: +- `cd web/workspace && deno task test` +- `cd web/workspace && deno task check` +- `cargo test -p yoi-workspace-server` +- `cargo check -p yoi` +- `git diff --check` +- `nix build .#yoi --no-link` は時間/依存変更の重さを見て実行、未実行なら理由を report。 + +Current code map: +- Sidebar UI: `web/workspace/src/lib/workspace-sidebar/WorkersNavSection.svelte`, `WorkspaceSidebar.svelte`。 +- Worker console/navigation: `web/workspace/src/lib/workspace-console/model`, `web/workspace/src/routes/runtimes/[runtimeId]/workers/[workerId]/console/`。 +- Existing worker list and runtime spawn APIs: `crates/workspace-server` `/api/workers` and `/api/runtimes/{runtime_id}/workers` handlers, worker-runtime `CreateWorkerRequest` / config bundle resolution paths。 +- Runtime candidates/settings base: `00001KWHHRTM9` implementation in the same worktree. + +Critical risks / reviewer focus: +- Product-level endpoint does not deserialize or expose the internal Runtime create request shape. +- Browser-facing surfaces are sanitized and do not leak raw path/cwd/scope/ConfigBundleRef/requested capabilities/secret/runtime endpoint/socket/session/store path. +- Profile/runtime selectors are bounded to backend-published choices. +- Success navigation and worker list refresh are deterministic. +- The combined implementation with `00001KWHHRTM9` keeps runtime connection management and manual worker launch contracts consistent. + +--- + + + +## State changed + +Queued acceptance recorded after explicit user follow-up 「2つとも消化して」。 + +Checked context: +- Ticket body / thread / artifacts。 +- `TicketRelationQuery(00001KWHEM8YJ)`: blocking relation 0 件。 +- `TicketOrchestrationPlanQuery(00001KWHEM8YJ)`: prior human-gate waiting note を確認し、今回 accepted_plan / after ordering を記録済み。 +- workspace/worktree/visible Pod/TicketDoctor/code-map の bounded check。 + +Acceptance basis: +- concrete missing decision / information は残っていない。 +- `00001KWHHRTM9` と surface が重なるため、同一 implementation worktree で `00001KWHHRTM9` の後に実装する。 +- side effect はこの `queued -> inprogress` acceptance 後に開始する。 + --- diff --git a/.yoi/tickets/00001KWHHRTM9/artifacts/orchestration-plan.jsonl b/.yoi/tickets/00001KWHHRTM9/artifacts/orchestration-plan.jsonl new file mode 100644 index 00000000..54c99e75 --- /dev/null +++ b/.yoi/tickets/00001KWHHRTM9/artifacts/orchestration-plan.jsonl @@ -0,0 +1,3 @@ +{"id":"orch-plan-20260702-164730-1","ticket_id":"00001KWHHRTM9","kind":"waiting_capacity_note","note":"Dashboard 起動時の queue review。対象 Ticket は未指定で、ユーザー指示により explicit follow-up まで role Pod spawn / queued->inprogress acceptance は行わない human gate として待機する。確認済み: Ticket 本文/最近の thread、TicketRelationQuery(0件)、TicketOrchestrationPlanQuery(0件)、workspace git/worktree 状態、visible Pods、TicketDoctor(0 errors)。本文上の依存先 00001KWHJ0XH6 は TicketShow で closed を確認済み。","author":"orchestrator","at":"2026-07-02T16:47:30Z"} +{"id":"orch-plan-20260702-170047-2","ticket_id":"00001KWHHRTM9","kind":"accepted_plan","accepted_plan":{"summary":"`00001KWHHRTM9` と `00001KWHEM8YJ` は workspace Browser の runtime/worker UI/API surface が重なるため、別 worktree 並列ではなく同一 branch/worktree で順序実装する。human gate は明示 follow-up で解除済み。","branch":"work/00001KWHHRTM9-00001KWHEM8YJ","worktree":"/home/hare/Projects/yoi/.worktree/00001KWHHRTM9-00001KWHEM8YJ","role_plan":"単一 sibling Coder Pod に同一 implementation worktree を委譲し、Runtime connection settings/API を先に実装してから Manual Coding Worker launch 導線を実装する。実装後は別 sibling Reviewer Pod で両 Ticket の recorded IntentPacket / invariants / acceptance criteria に照らしてレビューする。"},"author":"orchestrator","at":"2026-07-02T17:00:47Z"} +{"id":"orch-plan-20260702-170054-3","ticket_id":"00001KWHHRTM9","kind":"before","related_ticket":"00001KWHEM8YJ","note":"同一 worktree で順序実装する。Runtime connection settings/API が Manual Coding Worker form の runtime candidate/projection 基盤になるため、まずこちらを実装する。","author":"orchestrator","at":"2026-07-02T17:00:54Z"} diff --git a/.yoi/tickets/00001KWHHRTM9/item.md b/.yoi/tickets/00001KWHHRTM9/item.md index 8ebe1eaa..18cfc11b 100644 --- a/.yoi/tickets/00001KWHHRTM9/item.md +++ b/.yoi/tickets/00001KWHHRTM9/item.md @@ -1,8 +1,8 @@ --- title: 'Workspace Backend Runtime接続の管理画面と永続configを追加する' -state: 'queued' +state: 'inprogress' created_at: '2026-07-02T13:54:52Z' -updated_at: '2026-07-02T16:45:19Z' +updated_at: '2026-07-02T17:01:01Z' assignee: null queued_by: 'workspace-panel' queued_at: '2026-07-02T16:45:19Z' diff --git a/.yoi/tickets/00001KWHHRTM9/thread.md b/.yoi/tickets/00001KWHHRTM9/thread.md index 9a653bf8..b34a63a3 100644 --- a/.yoi/tickets/00001KWHHRTM9/thread.md +++ b/.yoi/tickets/00001KWHHRTM9/thread.md @@ -78,4 +78,101 @@ Marked ready by `yoi ticket state`. Ticket を `workspace-panel` が queued にしました。 +--- + + + +## Decision + +Routing decision: implementation_ready + +Reason: +- Ticket は Runtime connection settings API / `.yoi/workspace-backend.local.toml` 永続化 / Settings UI / sanitized diagnostics / restart_required の v0 境界を具体化しており、observable な acceptance criteria と validation がある。 +- 先行 Settings shell Ticket `00001KWHJ0XH6` は closed を確認済み。 +- typed relation blocker は 0 件、OrchestrationPlan は human gate の waiting note のみで、ユーザーから「2つとも消化して」と明示 follow-up があったため human gate は解除された。 +- Manual Coding Worker Ticket `00001KWHEM8YJ` と UI/API surface が近く、並列別 worktree では衝突リスクが高いので、同一 implementation worktree/branch で Runtime connection 管理を先に実装し、続けて manual Worker 作成導線を実装する。 + +Evidence checked: +- Ticket body / thread / artifacts。 +- `TicketRelationQuery(00001KWHHRTM9)` は 0 件。 +- `TicketOrchestrationPlanQuery(00001KWHHRTM9)` は prior human-gate waiting note のみ。 +- `TicketShow(00001KWHJ0XH6)` は closed。 +- queued Ticket 一覧では `00001KWHEM8YJ` も queued、ready/inprogress は 0 件。 +- workspace/orchestration git state と worktree 一覧、visible Pods、TicketDoctor(0 errors / 既存 warning のみ)。 +- Bounded code map: `crates/workspace-server` の workspace backend / runtime registry / config file 周辺、`web/workspace/src/lib/workspace-settings/SettingsPage.svelte`、`web/workspace/src/routes/settings/+page.svelte`、既存 `/api/workers` / `/api/runtimes/{runtime_id}/workers` projection、`WorkersNavSection.svelte`。 + +IntentPacket: + +Intent: +- Workspace Browser の Settings / Runtime Connections で embedded Runtime 表示、remote Runtime connection の list/add/delete/test negotiation、`.yoi/workspace-backend.local.toml` 永続化、restart_required diagnostic を提供する。 +- `00001KWHEM8YJ` が使う Runtime candidate projection の基盤を作る。 + +Binding decisions / invariants: +- Runtime が Backend に接続するのではなく、Backend が configured Runtime source を `RuntimeRegistry` に登録する現行構造を前提にする。 +- embedded Runtime は built-in として表示し、config 管理対象や削除対象にしない。 +- remote Runtime connection は既存 `[[runtimes.remote]]` schema に保存する。 +- v0 は config persistence 優先で、config 更新後は `restart_required = true`。live register/unregister は対象外。 +- raw token 値、secret、socket/session/store path、Runtime event cursor、live handle、config file path は UI/API response に出さない。 +- negotiation/test result、observed capabilities、health result、checked_at は local config に保存しない。 +- protocol version が無ければ fake version を作らず、compatibility basis として表現する。 + +Requirements / acceptance criteria: +- Runtime Connections 管理画面が Settings shell 内にある。 +- embedded Runtime は built-in / delete不可として表示される。 +- remote connection を add/delete でき、config の `[[runtimes.remote]]` が read-modify-write される。 +- test negotiation は `GET /v1/runtime` parse と Browser 必要操作に対する compatibility/sanitized diagnostics を返す。 +- duplicate id / invalid endpoint / incompatible runtime / embedded delete attempt は typed diagnostic。 +- request/response/config に raw token 値や internal paths を含めない。 +- focused backend/UI tests を追加し、指定 validation を可能な範囲で実行する。 + +Implementation latitude: +- TOML comments/format preservation は v0 で typed serialize により失われてもよい。ただし implementation report/docs/test で明記する。 +- POST 保存前に test を必須にするか、保存は許して test diagnostic を別扱いにするかは、Ticket の v0 境界内で選んでよい。 +- API response shape / Svelte component分割 / test helper構成は既存 style に合わせて選んでよい。 + +Escalate if: +- secret store / raw token input / live RuntimeRegistry unregister / remote workspace provisioning / protocol version追加を必須にしないと満たせない場合。 +- existing config schema を壊す必要がある場合。 +- Browser-facing API に raw path/secret/runtime internal location を出す誘惑が出た場合。 + +Validation: +- `cd web/workspace && deno task test` +- `cd web/workspace && deno task check` +- `cargo test -p yoi-workspace-server` +- `cargo check -p yoi` +- `git diff --check` +- `nix build .#yoi --no-link` は時間/依存変更の重さを見て実行、未実行なら理由を report。 + +Current code map: +- Settings UI: `web/workspace/src/lib/workspace-settings/SettingsPage.svelte`, `web/workspace/src/routes/settings/+page.svelte`。 +- Worker/sidebar UI: `web/workspace/src/lib/workspace-sidebar/WorkersNavSection.svelte`, console route under `web/workspace/src/routes/runtimes/[runtimeId]/workers/[workerId]/console/`。 +- Backend/runtime/config areas: `crates/workspace-server`, existing `/api/workers`, `/api/runtimes/{runtime_id}/workers`, `WorkspaceBackendConfigFile`, `ServerConfig.remote_runtime_sources`, `RuntimeRegistry`, `EmbeddedWorkerRuntime`。 + +Critical risks / reviewer focus: +- persisted config、live registry state、test/negotiation observation を混同していないか。 +- Browser-facing API に secrets/internal paths/runtime store/socket/session/config file path が漏れていないか。 +- embedded delete が fail closed か。 +- restart_required semantics が UI/API で明確か。 +- `00001KWHEM8YJ` と同一 worktreeで実装し、runtime candidates の shared contract が破綻していないか。 + +--- + + + +## State changed + +Queued acceptance recorded after explicit user follow-up 「2つとも消化して」。 + +Checked context: +- Ticket body / thread / artifacts。 +- `TicketRelationQuery(00001KWHHRTM9)`: blocking relation 0 件。 +- `TicketOrchestrationPlanQuery(00001KWHHRTM9)`: prior human-gate waiting note を確認し、今回 accepted_plan / before ordering を記録済み。 +- `00001KWHJ0XH6` は closed。 +- workspace/worktree/visible Pod/TicketDoctor/code-map の bounded check。 + +Acceptance basis: +- concrete missing decision / information は残っていない。 +- `00001KWHEM8YJ` と surface が重なるため、同一 implementation worktree でこの Ticket を先に実装する。 +- side effect はこの `queued -> inprogress` acceptance 後に開始する。 + ---