prometeu-studio/discussion/workflow/decisions/DEC-0019-studio-frontend-editor-write-and-save-wave.md

5.2 KiB

id discussion agenda ticket title status created updated owner tags
DEC-0019 DSC-0021 AGD-0022 studio-frontend-editor-write-and-save-wave Enable Frontend Editing and Save in the Studio Code Editor accepted 2026-04-04 2026-04-04 studio
studio
editor
frontend
write
save
vfs
lsp
pbs
access-policy

Context

Studio already provides frontend semantic-read value through prometeu-lsp, while frontend documents remain hard read-only. The repository also already locked the architectural split between document ownership and semantic ownership:

  1. prometeu-vfs owns document classification, access mode, snapshots, and save behavior;
  2. prometeu-lsp consumes VFS-backed snapshots for semantic analysis;
  3. Studio UI consumes both boundaries and must not re-derive document rights locally.

The previous semantic-read wave explicitly stated that frontend editing requires a separate decision. This decision closes that gap.

Decision

Studio SHALL release frontend editing and frontend save together in one explicit write wave.

The wave is normatively defined as follows:

  1. Frontend editing MUST NOT be released without frontend save in the same wave.
  2. prometeu-vfs MUST remain the sole owner of frontend writable snapshots.
  3. prometeu-vfs MUST remain the sole owner of frontend access mode.
  4. prometeu-vfs MUST remain the sole owner of frontend dirty tracking.
  5. prometeu-vfs MUST remain the sole owner of frontend save and save-all behavior.
  6. Studio UI MUST consume frontend editability and save rights from prometeu-vfs rather than introducing editor-local policy.
  7. prometeu-lsp MUST continue as a semantic consumer of VFS-backed frontend snapshots, including dirty in-memory frontend state.
  8. This decision does NOT authorize a new LSP implementation wave as part of the immediate execution scope.
  9. The first frontend write wave MUST apply to all frontend-scoped supported files and MUST NOT introduce an additional narrowing rule in this wave.
  10. Releasing frontend editing MUST NOT collapse semantic ownership, document ownership, and persistence ownership into one module.

Rationale

Frontend mutation without frontend save would create a half-owned editorial state and weaken the document boundary that the repository has already stabilized. The correct release shape is therefore coherent FE mutation plus coherent FE persistence under the same owner.

Keeping prometeu-vfs as the sole owner preserves the existing architecture:

  • VFS owns documents and persistence;
  • LSP consumes document state for semantics;
  • UI renders and interacts with policy.

This decision also avoids using a fake transitional step where the editor mutates frontend text locally while persistence remains undefined.

Technical Specification

Frontend Document Ownership

Frontend-scoped supported files MUST move from hard read-only to editable only through prometeu-vfs.

That means:

  1. writable FE in-memory snapshots MUST be created and owned by VFS;
  2. FE dirty tracking MUST be owned by VFS;
  3. FE save and save-all MUST route through VFS;
  4. editor-visible FE access mode MUST be surfaced from VFS.

Editor Behavior

The Studio editor MUST consume the new FE access policy from VFS exactly as it already does for non-frontend editable documents.

The editor MUST NOT:

  1. create a separate FE-only mutation model;
  2. implement FE-local persistence outside VFS;
  3. infer FE save rights through UI heuristics.

LSP Consumption Boundary

prometeu-lsp remains authorized to consume dirty FE snapshots from VFS. However, this decision does not authorize a new LSP feature wave as part of immediate execution.

Immediate implementation may rely on the existing semantic-read seam, provided that:

  1. no new persistence ownership moves into LSP;
  2. no new access-policy ownership moves into LSP;
  3. FE write enablement does not depend on introducing a new LSP-owned document model.

Scope of First FE Write Wave

The first FE write wave applies to all frontend-scoped supported files currently recognized by the VFS/frontend boundary.

This decision does not authorize:

  1. a temporary subset of FE file classes;
  2. an editor-only FE draft mode;
  3. FE edit rights without FE save rights.

Constraints

  1. This decision does not authorize a new LSP implementation scope by itself.
  2. This decision does not authorize moving document state ownership into Studio UI.
  3. This decision does not authorize moving document state ownership into LSP.
  4. This decision does not authorize releasing FE editing through a separate temporary persistence path.

Propagation Targets

  • Specs:
    • docs/specs/studio/5. Code Editor Workspace Specification.md
    • docs/specs/studio/6. Project Document VFS Specification.md
    • docs/specs/studio/7. Integrated LSP Semantic Read Phase Specification.md
  • Plans:
    • FE VFS write/access/save propagation
    • Studio FE editor access-mode and save UX propagation
  • Code:
    • prometeu-vfs FE writable snapshot and save policy
    • prometeu-studio FE editor write UX and access-state propagation
  • Tests:
    • FE VFS access-mode and save coverage
    • FE editor editable/saveable behavior

Revision Log

  • 2026-04-04: Accepted from AGD-0022 to release FE editing and save together under VFS ownership, with no new immediate LSP implementation scope.