7.3 KiB
| id | ticket | title | status | created | accepted | agenda | plans | tags | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DEC-0010 | studio-editor-write-wave-supported-non-frontend-files | Establish the controlled non-frontend editor write wave in Studio | accepted | 2026-03-31 | 2026-03-31 | AGD-0013 |
|
|
Context
The first Studio Code Editor wave established a read-only editorial shell and later moved project-document ownership into prometeu-vfs.
That left one immediate follow-up decision:
- which files may become editable now,
- which files must remain
read-only, - where access policy lives,
- how save works,
- and how editorial in-memory state stays contained away from build-facing state.
The accepted agenda closed the intended first write wave as deliberately narrower than "all supported text files":
- the same supported-document universe remains valid for opening,
- but access policy must distinguish
read-onlyfromeditable, - frontend-scoped files remain
read-only, - and only already-supported non-frontend text classes enter the first write wave.
Decision
- Studio SHALL introduce a controlled first editor write wave only for supported non-frontend documents.
- The canonical document universe for this wave SHALL remain the same universe already supported for opening through
prometeu-vfs. prometeu-vfsSHALL own document access policy for this wave, includingload,save, and the classification of each supported document asread-onlyoreditable.EditorWorkspaceMUST consume access policy fromprometeu-vfsand MUST NOT rederive editability rules locally.- Frontend-scoped documents SHALL remain hard
read-onlyin this wave. - Frontend scope SHALL be decided inside
prometeu-vfsusingFrontendSpec.allowedExtensionsas the source of truth. - The
prometeu-vfscontract SHALL evolve so thattypeIdcanonically represents that frontend scope in a way compatible withFrontendSpec.allowedExtensions, rather than exposing only a raw dynamic language identifier. - The initial editable non-frontend document classes SHALL be limited to the currently supported textual classes represented as
text,json,ndjson, andbash. - No additional document-support class SHALL be inferred or added by implementation convenience during this wave.
- For editable documents in this wave,
prometeu-vfsSHALL maintain an in-memory editorial snapshot for the current Studio session. saveSHALL persist that in-memory editorial snapshot to disk throughprometeu-vfs.- The global shell
Savemenu item MUST NOT be the save surface for this wave. - Save actions for this wave SHALL live inside the editor itself through a top command bar containing at least
SaveandSave All. - Frontend-scoped hard
read-onlytabs MAY coexist with editable non-frontend tabs in the same editor workspace. - Frontend-scoped hard
read-onlydocuments SHALL expose aread-onlystate in the editor status bar. - The status-bar
read-onlysurface SHOULD be designed so that it can evolve later into a per-file toggle without requiring a model rewrite. - Frontend-scoped hard
read-onlydocuments MUST NOT allow local editorial mutation in this wave. - Opening a frontend-scoped hard
read-onlydocument SHALL also show a top-of-editor warning stating that the file isread-only, cannot be edited, and cannot be saved in this wave. - The editable documents in this wave SHALL be treated as editorial scope and SHALL NOT participate in the build by implication.
- The in-memory editorial snapshot used for this wave MUST remain contained and MUST NOT be treated as canonical build input.
- No implementation in this wave MAY collapse editorial session snapshots into build-facing or artifact-facing document state by inference.
Rationale
This decision preserves the correct architectural order.
The editor needed real write behavior, but not at the cost of undoing the prometeu-vfs boundary that was just established.
Keeping access policy in prometeu-vfs prevents a return to editor-local conditional logic.
Keeping frontend documents read-only avoids releasing mutation for language-owned files before semantic support is ready.
At the same time, allowing already-supported non-frontend text classes to become editable gives the Studio a meaningful write wave without pretending that all textual files belong to the same product tier.
The decision also protects the build boundary. Having an in-memory editorial snapshot is necessary for writing, but it must not silently become the source of truth for build consumers.
Technical Specification
1. Access Policy Surface
prometeu-vfsMUST expose access policy as part of the document contract for supported files.- That policy MUST distinguish at least:
- unsupported document,
- supported
read-onlydocument, - supported editable document.
- The editor MUST treat this classification as canonical.
2. Frontend Classification
prometeu-vfsMUST classify frontend scope internally.FrontendSpec.allowedExtensionsMUST be the source of truth for that classification.- The VFS contract MUST expose a frontend-compatible canonical
typeIdor equivalent scope marker derived from that source of truth. - The editor MUST NOT infer frontend scope from path heuristics, local UI state, or ad hoc extension checks.
3. Editable Non-Frontend Set
- Editable scope in this wave is limited to the currently supported textual document classes:
textjsonndjsonbash
- Future additions require explicit decision revision or a new decision.
4. Editorial Snapshot and Save
- Editable documents MUST have a session-owned in-memory editorial snapshot.
prometeu-vfsMUST own the mutation-ready document state thatSaveandSave Alluse.- Persisting to disk MUST happen through
prometeu-vfs. - The editor MUST remain a caller of save intent, not the owner of persistence policy.
5. UI Surfaces
- The editor MUST provide a top command bar with at least
SaveandSave All. - Frontend hard
read-onlystate MUST be visible in the status bar. - A frontend hard
read-onlydocument MUST show a top warning that it cannot be edited or saved in this wave. - Mixed tabs between editable and
read-onlydocuments are allowed.
6. Boundary with Build
- Editorial snapshots for this wave MUST remain separate from build-facing state.
- This wave MUST NOT introduce recompilation, artifact invalidation, build triggers, or any implied build participation.
- Any future bridge between editorial state and build-facing state requires a separate explicit decision.
Constraints
- This decision does not release frontend editing.
- This decision does not authorize completion, semantic gating, or LSP-owned save policy.
- This decision does not authorize build-side observation of editorial in-memory snapshots.
- Any ambiguity found later in planning or implementation MUST be resolved by a new explicit clarification instead of local inference.
Revision Log
- 2026-03-31: Initial accepted decision from AGD-0013.
- 2026-03-31: Clarified that
FrontendSpec.allowedExtensionsis the source of truth for frontend scope, that VFStypeIdmust represent that scope canonically, and that frontend documents are hard read-only in this wave.