From 9669b5249823296fca3daffc0275ff9914b91ada Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Tue, 14 Jul 2026 21:24:59 +0800 Subject: [PATCH] chore(openspec): archive uv-workspace-packaging Change is complete (17/17 tasks) and its delta spec has been synced into a new main spec openspec/specs/workspace-packaging/spec.md. Co-Authored-By: Claude Opus 4.6 --- .../.openspec.yaml | 0 .../design.md | 0 .../proposal.md | 0 .../specs/workspace-packaging/spec.md | 0 .../tasks.md | 0 openspec/specs/workspace-packaging/spec.md | 56 +++++++++++++++++++ 6 files changed, 56 insertions(+) rename openspec/changes/{uv-workspace-packaging => archive/2026-07-14-uv-workspace-packaging}/.openspec.yaml (100%) rename openspec/changes/{uv-workspace-packaging => archive/2026-07-14-uv-workspace-packaging}/design.md (100%) rename openspec/changes/{uv-workspace-packaging => archive/2026-07-14-uv-workspace-packaging}/proposal.md (100%) rename openspec/changes/{uv-workspace-packaging => archive/2026-07-14-uv-workspace-packaging}/specs/workspace-packaging/spec.md (100%) rename openspec/changes/{uv-workspace-packaging => archive/2026-07-14-uv-workspace-packaging}/tasks.md (100%) create mode 100644 openspec/specs/workspace-packaging/spec.md diff --git a/openspec/changes/uv-workspace-packaging/.openspec.yaml b/openspec/changes/archive/2026-07-14-uv-workspace-packaging/.openspec.yaml similarity index 100% rename from openspec/changes/uv-workspace-packaging/.openspec.yaml rename to openspec/changes/archive/2026-07-14-uv-workspace-packaging/.openspec.yaml diff --git a/openspec/changes/uv-workspace-packaging/design.md b/openspec/changes/archive/2026-07-14-uv-workspace-packaging/design.md similarity index 100% rename from openspec/changes/uv-workspace-packaging/design.md rename to openspec/changes/archive/2026-07-14-uv-workspace-packaging/design.md diff --git a/openspec/changes/uv-workspace-packaging/proposal.md b/openspec/changes/archive/2026-07-14-uv-workspace-packaging/proposal.md similarity index 100% rename from openspec/changes/uv-workspace-packaging/proposal.md rename to openspec/changes/archive/2026-07-14-uv-workspace-packaging/proposal.md diff --git a/openspec/changes/uv-workspace-packaging/specs/workspace-packaging/spec.md b/openspec/changes/archive/2026-07-14-uv-workspace-packaging/specs/workspace-packaging/spec.md similarity index 100% rename from openspec/changes/uv-workspace-packaging/specs/workspace-packaging/spec.md rename to openspec/changes/archive/2026-07-14-uv-workspace-packaging/specs/workspace-packaging/spec.md diff --git a/openspec/changes/uv-workspace-packaging/tasks.md b/openspec/changes/archive/2026-07-14-uv-workspace-packaging/tasks.md similarity index 100% rename from openspec/changes/uv-workspace-packaging/tasks.md rename to openspec/changes/archive/2026-07-14-uv-workspace-packaging/tasks.md diff --git a/openspec/specs/workspace-packaging/spec.md b/openspec/specs/workspace-packaging/spec.md new file mode 100644 index 0000000..641e5a8 --- /dev/null +++ b/openspec/specs/workspace-packaging/spec.md @@ -0,0 +1,56 @@ +## Purpose + +Define how the Python repository is structured as a uv workspace, including the shared lockfile, one-way dependency direction between the Runtime and cloud platform packages, import-path and behavior compatibility during the packaging migration, independent buildability of workspace members, and the boundary that keeps the frontend JavaScript project outside the Python workspace. + +## Requirements + +### Requirement: Repository uses a uv workspace with a shared lockfile +The repository SHALL define a uv workspace containing the root `device-agent-runtime` project and the extracted `device-cloud-platform` project, and SHALL commit one generated `uv.lock` that resolves all workspace members. + +#### Scenario: Clean workspace synchronization +- **WHEN** a developer synchronizes the repository from a clean checkout using uv +- **THEN** uv installs the workspace members and their locked dependencies without requiring manual editable-install commands + +#### Scenario: Lockfile consistency check +- **WHEN** CI validates dependency metadata without updating dependencies +- **THEN** the committed lockfile is accepted as current for every workspace member + +### Requirement: Cloud packaging has an explicit one-way Runtime dependency +The `device-cloud-platform` project SHALL declare `device-agent-runtime` as a uv workspace dependency, and the `device-agent-runtime` project MUST NOT depend on `device-cloud-platform` or import the `cloud` package. + +#### Scenario: Cloud modules consume Runtime contracts +- **WHEN** the cloud platform is installed through the workspace +- **THEN** its imports of existing Runtime, workflow, storage, and driver contracts resolve through the declared Runtime workspace dependency + +#### Scenario: Runtime remains cloud-independent +- **WHEN** dependency-direction tests inspect Runtime-owned source packages +- **THEN** no Runtime-owned package imports `cloud` or requires the cloud distribution to execute existing local capabilities + +### Requirement: Existing cloud import paths and behavior remain compatible +The packaging migration SHALL preserve the existing `cloud.*` Python import paths and SHALL NOT change REST, MCP, scheduling, dispatch, persistence, or SDK behavior. + +#### Scenario: Existing cloud tests run after extraction +- **WHEN** the existing cloud test suite runs from the workspace root after the package is moved +- **THEN** the tests import the same `cloud.*` modules and retain their pre-migration behavior + +#### Scenario: Local Runtime runs without cloud application members +- **WHEN** a developer starts or tests the root Runtime project without starting a cloud application +- **THEN** existing Runtime entry points and local device behavior remain available + +### Requirement: Workspace members are independently buildable and selectable +Each Python workspace member SHALL contain valid build metadata, SHALL produce an installable distribution, and SHALL support member-scoped uv commands while root-level tests remain supported. + +#### Scenario: Build all distributions +- **WHEN** CI builds the Runtime and cloud platform workspace members +- **THEN** each build produces a wheel whose declared packages can be imported in an isolated environment + +#### Scenario: Run a member-scoped command +- **WHEN** a developer selects a workspace member with uv's package selection option +- **THEN** the command executes with that member's declared dependencies and workspace sources + +### Requirement: Frontend package management remains separate +The Vue/Vite `console` project SHALL remain managed by its existing JavaScript package manager and SHALL NOT become a Python uv workspace member. + +#### Scenario: Synchronize Python workspace +- **WHEN** a developer runs uv synchronization at the repository root +- **THEN** uv does not install or modify the console's JavaScript dependencies