implements PLN-0026 frontend-owned semantic presentation spec propagation
This commit is contained in:
parent
c00fc221be
commit
78758c1023
@ -57,3 +57,14 @@ The active PBS chapter focus is:
|
|||||||
- `11. AST Specification.md`
|
- `11. AST Specification.md`
|
||||||
- `12. Diagnostics Specification.md`
|
- `12. Diagnostics Specification.md`
|
||||||
- `13. Lowering IRBackend Specification.md`
|
- `13. Lowering IRBackend Specification.md`
|
||||||
|
|
||||||
|
## Frontend-Owned Semantic Presentation Rule
|
||||||
|
|
||||||
|
PBS, as a frontend, owns its semantic vocabulary and semantic editor presentation contract.
|
||||||
|
|
||||||
|
That means:
|
||||||
|
|
||||||
|
- PBS semantic keys are PBS-owned contract data,
|
||||||
|
- PBS semantic highlight resources belong to PBS rather than to Studio or LSP,
|
||||||
|
- PBS publishes that contract through `FrontendSpec`,
|
||||||
|
- and Studio/LSP consume that contract without becoming owners of PBS semantic presentation assets.
|
||||||
|
|||||||
@ -52,6 +52,7 @@ This document depends on:
|
|||||||
- `20. IRBackend to IRVM Lowering Specification.md`
|
- `20. IRBackend to IRVM Lowering Specification.md`
|
||||||
- `21. IRVM Optimization Pipeline Specification.md`
|
- `21. IRVM Optimization Pipeline Specification.md`
|
||||||
- `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md`
|
- `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md`
|
||||||
|
- the frontend-owned semantic presentation contract published through `FrontendSpec`
|
||||||
|
|
||||||
## 5. Canonical Shared Pipeline
|
## 5. Canonical Shared Pipeline
|
||||||
|
|
||||||
@ -191,6 +192,24 @@ Those configs/contexts MUST NOT:
|
|||||||
|
|
||||||
Filesystem-default composition MUST happen outside the pipeline core.
|
Filesystem-default composition MUST happen outside the pipeline core.
|
||||||
|
|
||||||
|
## 8.1 FrontendSpec-Owned Semantic Presentation Contract
|
||||||
|
|
||||||
|
`FrontendSpec` MUST remain the canonical static contract surface for frontend-owned semantic presentation metadata.
|
||||||
|
|
||||||
|
At minimum, that contract MUST allow frontend publication of:
|
||||||
|
|
||||||
|
1. stable frontend-owned `semanticKeys`,
|
||||||
|
2. frontend-owned `resources`,
|
||||||
|
3. and enough static metadata for downstream semantic consumers to derive a consumable descriptor without inventing host-owned fallback semantics.
|
||||||
|
|
||||||
|
This contract MUST NOT:
|
||||||
|
|
||||||
|
1. move frontend semantic presentation ownership into Studio,
|
||||||
|
2. move frontend semantic presentation ownership into LSP,
|
||||||
|
3. or force frontend semantic output into a shared artificial host vocabulary.
|
||||||
|
|
||||||
|
Tooling consumers such as integrated LSP and Studio MAY derive downstream descriptors from `FrontendSpec`, but they MUST treat `FrontendSpec` as the canonical source rather than a host-owned replacement contract.
|
||||||
|
|
||||||
## 9. Public Surface Rule
|
## 9. Public Surface Rule
|
||||||
|
|
||||||
The shared compiler public surface MUST expose explicit entrypoints equivalent in meaning to:
|
The shared compiler public surface MUST expose explicit entrypoints equivalent in meaning to:
|
||||||
|
|||||||
@ -46,9 +46,10 @@ The `Code Editor` workspace must assume:
|
|||||||
- all project files remain visible in the editor workspace even when only some are frontend-relevant,
|
- 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,
|
- `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,
|
- the integrated frontend semantic-read phase may add diagnostics, symbols, outline-facing structure, definition, and highlight for frontend documents,
|
||||||
|
- frontend semantic presentation contract data comes from frontend-owned metadata published through `FrontendSpec`,
|
||||||
- and the current wave must not depend on semantic behavior to remain coherent.
|
- and the current wave must not depend on semantic behavior to remain coherent.
|
||||||
|
|
||||||
This workspace may consume Studio project metadata and Studio-owned workspace framework primitives, but it must not infer a semantic-provider contract beyond keeping the path open for later integration.
|
This workspace may consume Studio project metadata and Studio-owned workspace framework primitives, but it must not infer a semantic-provider contract beyond the explicit frontend-owned descriptor surfaced by the integrated semantic-read phase.
|
||||||
This workspace must consume project tree and document data through `prometeu-vfs` rather than through editor-owned direct filesystem readers.
|
This workspace must consume project tree and document data through `prometeu-vfs` rather than through editor-owned direct filesystem readers.
|
||||||
This workspace must consume document access policy and save capability from `prometeu-vfs` rather than rederiving editability locally.
|
This workspace must consume document access policy and save capability from `prometeu-vfs` rather than rederiving editability locally.
|
||||||
|
|
||||||
@ -213,7 +214,10 @@ Rules:
|
|||||||
- Opened frontend documents must be analyzed from the VFS-owned in-memory snapshot exposed through `prometeu-vfs`.
|
- Opened frontend documents must be analyzed from the VFS-owned in-memory snapshot exposed through `prometeu-vfs`.
|
||||||
- Unopened frontend documents may be analyzed from filesystem-backed state exposed through the same `prometeu-vfs` boundary.
|
- Unopened frontend documents may be analyzed from filesystem-backed state exposed through the same `prometeu-vfs` boundary.
|
||||||
- Non-frontend highlight may remain Studio-local in this phase.
|
- Non-frontend highlight may remain Studio-local in this phase.
|
||||||
- Frontend highlight must come from the integrated LSP semantic-read phase and use frontend-owned color semantics.
|
- Frontend highlight must come from the integrated LSP semantic-read phase and use frontend-owned semantic presentation contract data derived from `FrontendSpec`.
|
||||||
|
- 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 frontend save, mutation, or build participation.
|
||||||
|
|
||||||
## Status Bar Rules
|
## Status Bar Rules
|
||||||
|
|||||||
@ -39,6 +39,7 @@ The integrated semantic-read phase must assume:
|
|||||||
- frontend-scoped documents remain hard `read-only`,
|
- frontend-scoped documents remain hard `read-only`,
|
||||||
- editable non-frontend documents remain governed by the controlled write wave,
|
- editable non-frontend documents remain governed by the controlled write wave,
|
||||||
- `FrontendSpec.allowedExtensions` remains the source of truth for frontend scope,
|
- `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,
|
- `prometeu-vfs` owns document state, snapshots, persistence, and access policy,
|
||||||
- and semantic-read over editorial snapshots must remain separate from build-facing ownership.
|
- and semantic-read over editorial snapshots must remain separate from build-facing ownership.
|
||||||
|
|
||||||
@ -58,6 +59,7 @@ Rules:
|
|||||||
- `prometeu-vfs` owns document state, access policy, editorial snapshots, and persistence.
|
- `prometeu-vfs` owns document state, access policy, editorial snapshots, and persistence.
|
||||||
- `prometeu-lsp` is a semantic consumer above `prometeu-vfs`.
|
- `prometeu-lsp` is a semantic consumer above `prometeu-vfs`.
|
||||||
- the Studio `Code Editor` owns UX surfaces that render semantic-read output.
|
- the Studio `Code Editor` owns UX surfaces that render semantic-read output.
|
||||||
|
- each frontend owns its semantic vocabulary and semantic presentation resources.
|
||||||
- build-facing document ownership remains outside this phase.
|
- build-facing document ownership remains outside this phase.
|
||||||
|
|
||||||
`prometeu-lsp` must not become the owner of:
|
`prometeu-lsp` must not become the owner of:
|
||||||
@ -65,6 +67,7 @@ Rules:
|
|||||||
- save,
|
- save,
|
||||||
- persistence,
|
- persistence,
|
||||||
- document access policy,
|
- document access policy,
|
||||||
|
- frontend semantic presentation assets,
|
||||||
- or frontend edit-right release.
|
- or frontend edit-right release.
|
||||||
|
|
||||||
## Document Source-of-Truth Rules
|
## Document Source-of-Truth Rules
|
||||||
@ -88,7 +91,14 @@ The minimum semantic capability set of this phase must include:
|
|||||||
## Highlight Ownership Rules
|
## Highlight Ownership Rules
|
||||||
|
|
||||||
- frontend highlight must come from semantic information provided through `prometeu-lsp`;
|
- frontend highlight must come from semantic information provided through `prometeu-lsp`;
|
||||||
- frontend highlight must use frontend-owned color semantics rather than a Studio-local fallback token scheme;
|
- frontend highlight must use frontend-owned semantic presentation contract data derived from `FrontendSpec`;
|
||||||
|
- `prometeu-lsp` must expose a dedicated semantic presentation descriptor derived from the resolved `FrontendSpec`;
|
||||||
|
- that descriptor must remain simple and include frontend-owned `semanticKeys` plus frontend-owned `resources` in the same message surface;
|
||||||
|
- `prometeu-lsp` must not collapse frontend semantic keys into host-owned generic categories;
|
||||||
|
- Studio must project semantic keys mechanically to CSS classes without semantic translation;
|
||||||
|
- frontend semantic presentation resources must remain under frontend `resources/` and be resolved like ordinary Java resources;
|
||||||
|
- when semantic presentation descriptor data or usable resources are absent, Studio must continue without semantic highlight;
|
||||||
|
- this condition must not become a product-facing Studio error and may at most produce normal development logs;
|
||||||
- non-frontend highlight may remain on the existing Studio-local highlighting path in this phase.
|
- non-frontend highlight may remain on the existing Studio-local highlighting path in this phase.
|
||||||
|
|
||||||
## Packaging Rules
|
## Packaging Rules
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user