editor with write capability

This commit is contained in:
2026-04-04 11:39:04 +01:00
parent fc96e45435
commit a0e19fd143
20 changed files with 1082 additions and 410 deletions
@@ -8,7 +8,7 @@ Active
- `prometeu-studio`
- the Studio `Code Editor` workspace
- the first controlled editor write wave for supported non-frontend documents
- the first controlled editor write wave for supported documents including frontend sources
## Purpose
@@ -18,7 +18,7 @@ This specification stabilizes:
- the baseline visual composition of the workspace,
- the `Project Navigator` role and scope,
- the mixed editable and hard `read-only` file-opening model,
- the controlled editable file-opening model,
- the responsive tab baseline,
- the editor-owned composition surfaces that host save and semantic-read UX,
- the gutter-based active-structure indicator model for semantic editor scopes,
@@ -42,8 +42,7 @@ If this document conflicts with the global Studio shell specifications, the shel
The `Code Editor` workspace must assume:
- the Studio shell already mounts `Code Editor` as a baseline workspace,
- the current wave allows editing only for the supported non-frontend document classes classified by `prometeu-vfs` as editable,
- frontend-scoped supported documents remain hard `read-only`,
- the current wave allows editing for the supported document classes classified by `prometeu-vfs` as editable, including frontend-scoped supported documents,
- all project files remain visible in the editor workspace even when only some are frontend-relevant,
- `prometeu.json` plus the selected frontend may identify source roots worth tagging,
- the integrated frontend semantic-read phase may add diagnostics, symbols, outline-facing structure, definition, and highlight for frontend documents,
@@ -61,7 +60,7 @@ The `Code Editor` workspace is:
- project-aware,
- file-oriented,
- mixed-mode in this wave, with editable supported non-frontend documents and hard `read-only` frontend documents,
- controlled-editable in this wave, with supported documents following the canonical access mode provided by `prometeu-vfs`,
- and not a full semantic IDE surface yet.
The workspace must help the user:
@@ -69,15 +68,14 @@ The workspace must help the user:
- see the full project tree,
- identify frontend-relevant source roots visually,
- open supported files into editor tabs,
- save editable non-frontend documents through editor-local commands,
- save editable supported documents through editor-local commands,
- consume frontend semantic-read UX provided through the integrated LSP phase when that phase is active,
- understand the active file context,
- and understand that frontend editing and broader IDE automation remain outside this wave.
- and understand that broader IDE automation remains outside this wave.
The workspace must not pretend to offer:
- merge behavior,
- frontend editing,
- completion,
- rename, code actions, or formatting,
- or editor-owned semantic inference that bypasses the integrated LSP phase.
@@ -163,7 +161,7 @@ Rules:
- Selecting a supported file that is not already open must open it in a new tab.
- File opening must resolve document content through `prometeu-vfs`.
- The editor must maintain opened-file content in memory for the active Studio session only.
- Frontend-scoped supported documents may coexist in tabs with editable non-frontend documents.
- Frontend-scoped supported documents may coexist in tabs with other editable supported documents.
- The tab strip must be responsive rather than fixed to one hardcoded tab count.
- Overflow tabs must remain accessible through an IntelliJ-style overflow control.
- The active tab must remain visible.
@@ -193,13 +191,11 @@ Rules:
- the workspace must treat `prometeu-vfs` as the canonical source of document access mode for supported files;
- the workspace must not infer frontend scope from path heuristics, local UI state, or ad hoc extension checks;
- supported frontend-scoped documents must remain hard `read-only`;
- editable scope is limited to the supported non-frontend textual classes exposed by `prometeu-vfs` for this wave;
- the workspace must not allow local editorial mutation for hard `read-only` frontend documents;
- supported frontend-scoped documents may be editable when `prometeu-vfs` classifies them as editable;
- editable scope is limited to the supported textual classes exposed by `prometeu-vfs` for this wave, including supported frontend sources;
- the workspace must expose save behavior only through an editor-local command bar containing at least `Save` and `Save All`;
- the global shell `Save` menu item must not be the save surface for this wave;
- save intent must route through `prometeu-vfs`, which remains the owner of persistence policy;
- a frontend hard `read-only` tab must show a top warning that the file cannot be edited or saved in this wave;
- the active indentation policy for editable documents MUST come from project-local setup rather than from file-content heuristics;
- the status-bar indentation chip MUST display the active configured policy, not inferred file contents;
- pressing `Tab` in an editable document MUST insert spaces according to the active configured indentation width;
@@ -224,7 +220,7 @@ Rules:
## Integrated Semantic-Read Boundary
- Frontend documents remain hard `read-only` even when semantic-read capabilities are active.
- Frontend documents may be editable when `prometeu-vfs` grants editable access mode.
- Diagnostics, document symbols, workspace symbols, outline-facing structure, definition, and frontend highlight must come through the integrated LSP semantic-read phase rather than from editor-local inference.
- Exact anchor positions for semantic scope indicators must come from frontend-owned structural metadata rather than Studio-local text scanning when that metadata is available.
- Opened frontend documents must be analyzed from the VFS-owned in-memory snapshot exposed through `prometeu-vfs`.
@@ -234,7 +230,7 @@ Rules:
- Frontend semantic presentation resources must remain frontend-owned and must not be replaced by a Studio-owned generic fallback theme.
- When semantic presentation descriptor data or usable frontend resources are absent, the workspace must continue without semantic highlight for that frontend document.
- The workspace must not surface this condition as a product-facing editor error.
- The workspace must not treat semantic-read over editorial snapshots as authorization for frontend save, mutation, or build participation.
- The workspace must not treat semantic-read over editorial snapshots as authorization for build participation or for bypassing `prometeu-vfs` access policy.
## Inline Hint Rules
@@ -21,7 +21,7 @@ This specification stabilizes:
- the filesystem-backed first-wave contract,
- structural tree and document access responsibilities,
- canonical frontend scope and access policy ownership,
- editorial snapshot and save ownership for editable non-frontend documents,
- editorial snapshot and save ownership for editable supported documents including frontend sources,
- the semantic-read consumer boundary used by the integrated LSP phase,
- the RPC-first public API baseline,
- and explicit first-wave exclusions such as public event publication and watchers.
@@ -140,8 +140,8 @@ Rules:
- `FrontendSpec.allowedExtensions` is the source of truth for frontend scope in this wave;
- the VFS document contract must expose a canonical frontend-compatible `typeId` or equivalent scope marker derived from that source of truth;
- consumers must not infer frontend scope from raw dynamic language identifiers, path heuristics, or local UI extension checks;
- frontend-scoped supported documents must remain hard `read-only` in this wave;
- the initial editable non-frontend set is limited to the currently supported textual classes represented as `text`, `json`, `ndjson`, and `bash`;
- frontend-scoped supported documents must be editable in this wave when they are supported by the current frontend;
- the initial editable set is limited to the currently supported textual classes represented as `text`, `json`, `ndjson`, `bash`, and supported frontend source documents resolved from `FrontendSpec.allowedExtensions`;
- and no additional editable class may be inferred by implementation convenience during this wave.
## Document Access Context
@@ -161,7 +161,7 @@ Rules:
Rules:
- opened frontend documents must be exposed to `prometeu-lsp` from the in-memory editorial snapshot held by `prometeu-vfs`;
- opened frontend documents must be exposed to `prometeu-lsp` from the in-memory editorial snapshot held by `prometeu-vfs`, including dirty snapshots not yet saved to disk;
- unopened frontend documents may be exposed to `prometeu-lsp` from filesystem-backed state through the same boundary;
- `prometeu-lsp` must not bypass `prometeu-vfs` with ad hoc filesystem reads inside Studio UI code;
- `prometeu-lsp` must not become the owner of save, persistence, or access policy;
@@ -219,7 +219,6 @@ Rules:
- merge or conflict handling
- non-project content snapshots
- a generic product-wide filesystem abstraction
- frontend editing
- treating editorial snapshots as canonical build input
## Exit Criteria
@@ -230,7 +229,7 @@ This specification is complete enough when:
- the project-session lifecycle rule is unambiguous,
- the structural tree contract is explicitly non-visual,
- frontend scope and access policy ownership are explicit,
- editable non-frontend snapshot and save ownership are explicit,
- editable supported-document snapshot and save ownership are explicit,
- the semantic-read consumer boundary with `prometeu-lsp` is explicit,
- the RPC-first public API rule is explicit,
- and deferred public events and watchers are clearly out of scope.
@@ -9,7 +9,7 @@ Active
- `prometeu-studio`
- `prometeu-vfs`
- `prometeu-lsp`
- the frontend read-only semantic phase in the Studio `Code Editor` workspace
- the integrated frontend semantic phase in the Studio `Code Editor` workspace
## Purpose
@@ -17,7 +17,7 @@ Define the normative Studio contract for the integrated frontend semantic-read p
This specification stabilizes:
- the phase boundary between semantic read and frontend editing,
- the phase boundary between semantic ownership and frontend editing ownership,
- the ownership relationship between `prometeu-vfs`, `prometeu-lsp`, and the Studio editor,
- the minimum semantic capability set for frontend documents,
- the dedicated semantic surface used for structural anchors and guide-aware editor structure,
@@ -37,8 +37,8 @@ If this document conflicts with shell-wide Studio rules, shell rules control she
The integrated semantic-read phase must assume:
- frontend-scoped documents remain hard `read-only`,
- editable non-frontend documents remain governed by the controlled write wave,
- frontend-scoped documents may be editable under the controlled write wave exposed by `prometeu-vfs`,
- editable supported documents remain governed by the controlled write wave,
- `FrontendSpec.allowedExtensions` remains the source of truth for frontend scope,
- `FrontendSpec` is the canonical source of frontend semantic presentation contract data,
- `prometeu-vfs` owns document state, snapshots, persistence, and access policy,
@@ -46,13 +46,11 @@ The integrated semantic-read phase must assume:
## Phase Boundary
This phase is a semantic-read phase for frontend documents, not a frontend editing phase.
This phase is a semantic phase for frontend documents, not an ownership phase for frontend editing.
Rules:
- frontend documents must remain hard `read-only` throughout this phase;
- no capability in this phase may imply frontend save, mutation, or edit-right release;
- the future release of frontend editing requires a separate explicit decision;
- no capability in this phase may override `prometeu-vfs` access policy, save policy, or snapshot ownership;
- completion, rename, code actions, and formatting remain outside this phase.
## Ownership Rules
@@ -165,7 +163,6 @@ Rules:
## Non-Goals
- frontend editing
- frontend save policy
- completion
- rename