125 lines
6.8 KiB
Markdown
125 lines
6.8 KiB
Markdown
# Task: Cut over Makelore Design Agent to V2 living form
|
|
|
|
## Identity
|
|
|
|
- Task ID: 20260830-design-v2-client-cutover-4e7b9a2c
|
|
- Mode: Feature
|
|
- Branch: codex/20260830-design-v2-client-cutover-4e7b9a2c-design-v2-client-cutover
|
|
- Worktree: D:\Datas\OthersProjects\makelore-design-v2-client-cutover-4e7b9a2c
|
|
- Base commit: f2456039230f68e3ecb2c8653fc3379c23bbe5ce
|
|
- Owner: codex-root
|
|
- Status: Ready for Integration
|
|
|
|
## Scope
|
|
|
|
- Replace the Canvas V1 Brief/Conversation/Quote client contract with the V2
|
|
Living Form, Design Specification, Direction, immutable Quote, Task, and Asset
|
|
projections delivered by Works Square and Agent Gateway.
|
|
- Create the form with the project, keep it visibly present throughout the
|
|
conversation, and let chat, direct edits, decision prompts, Quote request, and
|
|
confirmation update the same canonical projection.
|
|
- Replace `turn.submit`, mutable Quote PATCH, and `confirm_generation` action
|
|
shims with `design.input.apply`, `design.quote.request`, and
|
|
`design.generation.confirm` using stable command and semantic operation IDs.
|
|
- Reconcile assistant deltas, Direction snapshots, Workspace/Task events, local
|
|
edit buffers, and pending operations without treating transport sequence or
|
|
Task progress as Specification truth.
|
|
- Update the Main-owned cloud adapter, Host route, shared contracts, Renderer
|
|
store, Canvas page/sidebar, focused tests, E2E fixture, and README. Convert or
|
|
retire the V1-only local development adapter; it must not remain a second
|
|
semantic authority or a packaged fallback.
|
|
|
|
## Intent And Constraints
|
|
|
|
- The Form is a projection of the server-owned Current Design Specification,
|
|
never a second client store. Draft text and unsent direct edits remain local
|
|
buffers until accepted.
|
|
- The client does not expose provider prompts, model IDs, routes, internal cost,
|
|
storage URIs, safety evidence, or compiler internals as editable form state.
|
|
- Finite choices use explicit options; expressive design intent remains text or
|
|
identity-bearing collections. Provenance, resolution, locks, Suggestions, the
|
|
active Question, blockers, warnings, Quote summary, and recent changes remain
|
|
visible where useful.
|
|
- Renderer access continues through the Main-owned Host interface. Works token,
|
|
stream ticket, WebSocket, retry classification, and error redaction remain in
|
|
Electron Main.
|
|
- There is no low-version compatibility path or V1 DTO adapter. Client and server
|
|
authority move together after the server's one-time data gate succeeds.
|
|
- The product remains Chinese-only, cloud-only when packaged, and on the existing
|
|
Makelore light visual system.
|
|
|
|
## Outcome
|
|
|
|
- Replaced the V1 Canvas contract end to end with a V2 Workspace projection:
|
|
one persistent Living Form, one current Direction, one Agent Session, one
|
|
conversation timeline, immutable Quotes, Workspace Tasks, and Workspace
|
|
Assets. Shared DTOs, Main adapter, Host routes, Renderer API/store, Sidebar,
|
|
Canvas UI, and tests now use the same vocabulary.
|
|
- Added a persistent two-pane creator workspace. Conversation, direct scalar
|
|
edits, atomic collection edits, proposal acceptance, decision prompts, and
|
|
field locks all write through the same `design.input.apply` command and
|
|
reconcile from the server projection. Image/video-only sections are shown
|
|
progressively, while local field and chat drafts stay separate from
|
|
canonical state until accepted.
|
|
- Replaced mutable Prompt/Quote controls with server compilation and immutable
|
|
confirmation. The client displays only customer-facing output summary,
|
|
warnings, expiry, and design points; confirmation submits Quote identity and
|
|
never exposes provider Prompt, model, storage URI, or billing atoms.
|
|
- Added stable command and operation identities, preserved exact commands after
|
|
network-unknown outcomes, resumable event cursors, authoritative refresh on
|
|
revision conflict, Workspace task/asset reconciliation, and safe retry UI.
|
|
- Removed the V1 local semantic adapter, local/cloud mode switches, local
|
|
development scripts, nested Conversation navigation, and V1-only tests. Both
|
|
development and packaged builds now use the Main-owned Works Square V2
|
|
boundary with no client semantic fallback.
|
|
- Updated README and development guidance to describe the shipped V2 behavior.
|
|
Replaced the old multi-Conversation Electron E2E with cloud-contract V2
|
|
coverage for Living Form edits, conversation reconciliation, immutable Quote
|
|
confirmation, tasks, and Prompt Museum navigation.
|
|
|
|
## Verification
|
|
|
|
- `corepack pnpm typecheck` — passed.
|
|
- `corepack pnpm run lint:check` — passed with 0 errors; five pre-existing
|
|
warnings remain in unchanged `src/pages/Home/index.tsx` and
|
|
`src/pages/Makelore/index.tsx`.
|
|
- `corepack pnpm test` — passed: 181 test files, 1,425 tests passed and two
|
|
existing tests skipped.
|
|
- `corepack pnpm run build:vite` — passed for Renderer, Electron Main, Preload,
|
|
and utility worker; only existing Vite chunk/dynamic-import warnings remain.
|
|
- `corepack pnpm exec playwright test tests/e2e/image-workspace-v2.spec.ts
|
|
--workers=1` — passed: two Electron E2E tests.
|
|
- `git diff --check` — passed.
|
|
|
|
## Follow-ups
|
|
|
|
- Integrate the client commit only with the matching Works Square Design V2
|
|
server contract. Any remaining server work must start from server `master`
|
|
`05bf994df944cec169be3f2378ee29b51aeae674` in a new isolated worktree; do not
|
|
replay changes onto the old `3d4d322` frontier.
|
|
- After server integration and deployment, run one real-account installed-client
|
|
smoke covering a direct field edit, conversational edit, Quote request,
|
|
confirmation, background completion, result download, and a deliberately
|
|
interrupted network-unknown retry.
|
|
|
|
## Promotion Candidates
|
|
|
|
- Target: accepted ADR-001 plus `.project-docs/20-architecture/{system-overview,
|
|
data-flow,module-map}.md` and the AI Design section of
|
|
`.project-docs/30-worklog/current-state.md`.
|
|
Proposal: supersede the multi-Conversation / mutable Brief and Quote model
|
|
with the one-Workspace, one-Direction, one-Living-Form V2 authority described
|
|
in `10-decisions/proposals/20260830-design-v2-client-cutover-4e7b9a2c__living-form-v2-authority.md`.
|
|
Evidence: this task's implementation, full unit suite, production build, and
|
|
Electron E2E results above.
|
|
Future impact: all client/server Design changes must treat chat and direct
|
|
edits as inputs to one Specification reducer, compile immutable Quotes on the
|
|
server, and preserve stable operation identity for uncertain writes.
|
|
Semantic conflicts: directly reverses ADR-001 and several canonical AI Design
|
|
rows that require nested Conversations, editable final Prompt, mutable Quote,
|
|
and a local development semantic adapter.
|
|
Human confirmation: already supplied in this source task through the explicit
|
|
request for the complete Living Form hard cutover and no low-version
|
|
compatibility; Integration Gate must still record ADR-001 as superseded rather
|
|
than silently rewriting it.
|