Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42daa49335
|
||
|
|
9e128988e1
|
||
|
|
33fd7c485e
|
||
|
|
bcc5b413fa
|
||
|
|
20a23dedb5
|
||
|
|
81187212aa
|
@@ -10,11 +10,6 @@ build
|
||||
# Ignore Kotlin plugin data
|
||||
.kotlin
|
||||
|
||||
.python-version
|
||||
.venv
|
||||
|
||||
# IA
|
||||
.junie
|
||||
/debug/
|
||||
!prometeu-studio/src/main/java/p/studio/workspaces/debug/
|
||||
!prometeu-studio/src/main/java/p/studio/workspaces/debug/**
|
||||
|
||||
@@ -1,79 +1 @@
|
||||
# Prometeu Studio
|
||||
|
||||
Prometeu Studio is the desktop development environment for the Prometeu toolchain.
|
||||
|
||||
This repository packages the Studio shell together with the embedded services it depends on: compiler pipeline integration, asset packing, runtime/debug orchestration, and project-local Studio state. The current implementation is a Java/JavaFX multi-module Gradle build.
|
||||
|
||||
## What Lives Here
|
||||
|
||||
The root project is a monorepo with these main areas:
|
||||
|
||||
- `prometeu-app`: JavaFX application entry point (`p.studio.App`).
|
||||
- `prometeu-studio`: Studio UI, workspaces, project session lifecycle, play/stop flow, and debugger-facing surfaces.
|
||||
- `prometeu-packer`: embedded packer APIs and implementation used by Studio.
|
||||
- `prometeu-compiler`: compiler core, build pipeline, frontend APIs, and the PBS frontend.
|
||||
- `prometeu-infra`: shared infrastructure used across modules.
|
||||
- `docs/`: normative specifications and architectural references.
|
||||
- `discussion/`: workflow artifacts for agendas, decisions, plans, and lessons.
|
||||
- `test-projects/`: sample workspaces used for local development and tests.
|
||||
|
||||
## Current Product Shape
|
||||
|
||||
The Studio shell currently organizes the product around three workspaces:
|
||||
|
||||
- Assets
|
||||
- Debug
|
||||
- Shipper
|
||||
|
||||
At runtime, the app boots an embedded packer, restores project-local Studio state, and opens the Studio launcher window. Project creation currently scaffolds a Prometeu workspace with `prometeu.json`, `src/`, `assets/`, `build/`, `cartridge/`, `.workspace/`, and local Studio metadata.
|
||||
|
||||
## Requirements
|
||||
|
||||
- JDK 21 or newer recommended for local development
|
||||
- Gradle wrapper (`./gradlew`) included in the repository
|
||||
- A desktop environment capable of running JavaFX
|
||||
|
||||
## Common Commands
|
||||
|
||||
Run the full project graph listing:
|
||||
|
||||
```bash
|
||||
./gradlew projects
|
||||
```
|
||||
|
||||
Run the desktop application:
|
||||
|
||||
```bash
|
||||
./gradlew :prometeu-app:run
|
||||
```
|
||||
|
||||
Run the test suite:
|
||||
|
||||
```bash
|
||||
./gradlew test
|
||||
```
|
||||
|
||||
Generate the aggregated coverage report:
|
||||
|
||||
```bash
|
||||
./gradlew jacocoTestReport
|
||||
```
|
||||
|
||||
## Repository Reading Guide
|
||||
|
||||
If you are new to the codebase, this order is usually the fastest path:
|
||||
|
||||
1. Start at `prometeu-app` to see application bootstrap.
|
||||
2. Read `prometeu-studio` for the shell, workspaces, and user-facing flows.
|
||||
3. Read `prometeu-packer` for asset and packaging boundaries.
|
||||
4. Read `prometeu-compiler` when you need compiler or PBS language behavior.
|
||||
|
||||
## Specs And Architecture
|
||||
|
||||
Important reference surfaces:
|
||||
|
||||
- `docs/specs/compiler/`: shared compiler specifications
|
||||
- `docs/specs/packer/`: packer specifications
|
||||
- `docs/vm-arch/`: VM and ISA architecture references
|
||||
|
||||
These documents are the long-term normative source for behavior and contracts. When code and docs diverge, fix the divergence explicitly instead of relying on tribal knowledge.
|
||||
# Prometeu Studio
|
||||
@@ -0,0 +1,12 @@
|
||||
{"type":"meta","next_id":{"DSC":12,"AGD":12,"DEC":9,"PLN":12,"LSN":26,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"open","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[{"id":"AGD-0002","file":"AGD-0002-palette-management-in-studio.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"open","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["studio","debugger","workspace","integration","shell"],"agendas":[{"id":"AGD-0009","file":"AGD-0009-studio-debugger-workspace-integration.md","status":"open","created_at":"2026-03-30","updated_at":"2026-03-30"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"review","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[{"id":"AGD-0010","file":"AGD-0010-studio-code-editor-workspace-foundations.md","status":"accepted","created_at":"2026-03-30","updated_at":"2026-03-30"}],"decisions":[{"id":"DEC-0008","file":"DEC-0008-studio-code-editor-read-only-workspace-foundations.md","status":"review","created_at":"2026-03-30","updated_at":"2026-03-30","ref_agenda":"AGD-0010"}],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
@@ -0,0 +1,12 @@
|
||||
{"type":"meta","next_id":{"DSC":12,"AGD":12,"DEC":9,"PLN":15,"LSN":26,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"open","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[{"id":"AGD-0002","file":"AGD-0002-palette-management-in-studio.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"open","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["studio","debugger","workspace","integration","shell"],"agendas":[{"id":"AGD-0009","file":"AGD-0009-studio-debugger-workspace-integration.md","status":"open","created_at":"2026-03-30","updated_at":"2026-03-30"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"in_progress","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[{"id":"AGD-0010","file":"AGD-0010-studio-code-editor-workspace-foundations.md","status":"accepted","created_at":"2026-03-30","updated_at":"2026-03-30"}],"decisions":[{"id":"DEC-0008","file":"DEC-0008-studio-code-editor-read-only-workspace-foundations.md","status":"accepted","created_at":"2026-03-30","updated_at":"2026-03-30","ref_agenda":"AGD-0010"}],"plans":[{"id":"PLN-0012","file":"PLN-0012-studio-code-editor-spec-propagation.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30","ref_decisions":["DEC-0008"]},{"id":"PLN-0013","file":"PLN-0013-editor-workspace-layout-and-passive-surfaces.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30","ref_decisions":["DEC-0008"]},{"id":"PLN-0014","file":"PLN-0014-project-navigator-snapshot-and-read-only-file-opening.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30","ref_decisions":["DEC-0008"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
@@ -0,0 +1,13 @@
|
||||
{"type":"meta","next_id":{"DSC":13,"AGD":13,"DEC":10,"PLN":19,"LSN":27,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"open","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[{"id":"AGD-0002","file":"AGD-0002-palette-management-in-studio.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"open","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["studio","debugger","workspace","integration","shell"],"agendas":[{"id":"AGD-0009","file":"AGD-0009-studio-debugger-workspace-integration.md","status":"open","created_at":"2026-03-30","updated_at":"2026-03-30"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-31","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0010-studio-code-editor-workspace-foundations/LSN-0026-read-only-editor-foundations-and-semantic-deferral.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0012","status":"open","ticket":"studio-editor-document-vfs-boundary","title":"Definir um boundary de VFS documental para tree/view/open files no Code Editor do Studio","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","vfs","filesystem","boundary"],"agendas":[{"id":"AGD-0012","file":"AGD-0012-studio-editor-document-vfs-boundary.md","status":"in_progress","created_at":"2026-03-31","updated_at":"2026-03-31"}],"decisions":[{"id":"DEC-0009","file":"DEC-0009-studio-prometeu-vfs-project-document-boundary.md","status":"in_progress","created_at":"2026-03-31","updated_at":"2026-03-31","ref_agenda":"AGD-0012"}],"plans":[{"id":"PLN-0015","file":"PLN-0015-propagate-dec-0009-into-studio-specs.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0009"]},{"id":"PLN-0016","file":"PLN-0016-build-prometeu-vfs-filesystem-backed-core.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0009"]},{"id":"PLN-0017","file":"PLN-0017-add-studio-project-session-ownership-for-prometeu-vfs.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0009"]},{"id":"PLN-0018","file":"PLN-0018-migrate-code-editor-to-prometeu-vfs.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0009"]}],"lessons":[]}
|
||||
@@ -1,31 +0,0 @@
|
||||
{"type":"meta","next_id":{"DSC":31,"AGD":34,"DEC":31,"PLN":62,"LSN":47,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0030","status":"done","ticket":"studio-scene-pack-runtime-binary-contract","title":"Studio scene pack contract for runtime SCENE binary payload","created_at":"2026-04-24","updated_at":"2026-05-01","tags":["studio","packer","runtime","scene","asset-pack","binary-format","tiled"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0046","file":"discussion/lessons/DSC-0030-studio-scene-pack-runtime-binary-contract/LSN-0046-canonical-scene-owns-editorial-truth-while-pack-stays-request-driven.md","status":"done","created_at":"2026-05-01","updated_at":"2026-05-01"}]}
|
||||
{"type":"discussion","id":"DSC-0029","status":"done","ticket":"studio-frame-composer-syscall-and-sprite-alignment","title":"Studio Alignment with Runtime FrameComposer Syscalls and Sprite Composition","created_at":"2026-04-18","updated_at":"2026-04-18","tags":["studio","compiler","pbs","stdlib","runtime-alignment","abi","syscall","frame-composer","sprites"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0041","file":"discussion/lessons/DSC-0029-studio-frame-composer-syscall-and-sprite-alignment/LSN-0041-composer-must-own-public-sprite-composition.md","status":"done","created_at":"2026-04-18","updated_at":"2026-04-18"}]}
|
||||
{"type":"discussion","id":"DSC-0028","status":"done","ticket":"studio-tiled-parser-assets-scene-asset-type","title":"Tiled Parser and Scene Asset-Type Ownership in Assets Workspace","created_at":"2026-04-15","updated_at":"2026-04-23","tags":["studio","assets","scene","tiled","parser","asset-type"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0045","file":"discussion/lessons/DSC-0028-studio-tiled-parser-assets-scene-asset-type/LSN-0045-asset-owned-scene-bank-and-tiled-xml-workflow.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0027","status":"abandoned","ticket":"studio-scene-workspace","title":"Scene Workspace for SCENE Authoring","created_at":"2026-04-14","updated_at":"2026-04-15","tags":["studio","workspace","scene","tilemap","asset","runtime-alignment"],"agendas":[{"id":"AGD-0029","file":"AGD-0029-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted agenda and its downstream work."}],"decisions":[{"id":"DEC-0026","file":"DEC-0026-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_agenda":"AGD-0029","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted decision and stop using it as normative guidance."}],"plans":[{"id":"PLN-0049","file":"PLN-0049-scene-workspace-spec-and-boundary-propagation.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0050","file":"PLN-0050-scene-workspace-shell-and-project-state-foundations.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0051","file":"PLN-0051-scene-artifact-and-assets-handoff-contract.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0052","file":"PLN-0052-scene-workspace-wave-1-tilemap-editor.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0026","status":"done","ticket":"glyph-bank-naming-alignment-with-runtime","title":"Glyph Bank Naming Alignment with Runtime DEC-0006","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["packer","studio","naming","asset-contract","runtime-alignment","glyph-bank"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0040","file":"discussion/lessons/DSC-0026-glyph-bank-naming-alignment-with-runtime/LSN-0040-glyph-bank-artifact-naming-alignment.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
||||
{"type":"discussion","id":"DSC-0025","status":"done","ticket":"packer-pipeline-metadata-ownership","title":"Pipeline Metadata Ownership and Runtime Contract","created_at":"2026-04-09","updated_at":"2026-04-10","tags":["packer","metadata","runtime-contract","tooling","studio"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0039","file":"discussion/lessons/DSC-0025-packer-pipeline-metadata-ownership/LSN-0039-runtime-header-boundary-and-tooling-owned-pipeline-metadata.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
||||
{"type":"discussion","id":"DSC-0024","status":"done","ticket":"jacoco-reports-consolidation","title":"JaCoCo Reports Consolidation in Gradle","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["infra","gradle","jacoco","coverage","jenkins"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0038","file":"discussion/lessons/DSC-0024-jacoco-reports-consolidation/LSN-0038-jacoco-reports-consolidation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"},{"id":"LSN-0044","file":"discussion/lessons/DSC-0024-jacoco-reports-consolidation/LSN-0044-jenkins-jacoco-alignment.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"done","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-04-23","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0042","file":"discussion/lessons/DSC-0002-palette-management-in-studio/LSN-0042-schema-driven-palette-authoring-and-local-metadata-events.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"abandoned","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-04-24","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"abandoned","created_at":"2026-03-26","updated_at":"2026-04-24","_override_reason":"Explicit user request on 2026-04-24 to abandon AGD-0004 because the agenda is no longer valid."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"done","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-04-07","tags":["studio","debugger","workspace","integration","shell"],"agendas":[],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-31","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0010-studio-code-editor-workspace-foundations/LSN-0026-read-only-editor-foundations-and-semantic-deferral.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0012","status":"done","ticket":"studio-editor-document-vfs-boundary","title":"Definir um boundary de VFS documental para tree/view/open files no Code Editor do Studio","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","vfs","filesystem","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"discussion/lessons/DSC-0012-studio-editor-document-vfs-boundary/LSN-0027-project-document-vfs-and-session-owned-editor-boundary.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"studio-editor-write-wave-supported-non-frontend-files","title":"Definir a wave inicial de edicao no Code Editor apenas para arquivos aceitos e nao relacionados ao FE","created_at":"2026-03-31","updated_at":"2026-04-02","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0028","file":"discussion/lessons/DSC-0013-studio-editor-write-wave-supported-non-frontend-files/LSN-0028-controlled-editor-write-wave-and-read-only-frontend-semantic-phase.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0014","status":"done","ticket":"studio-frontend-owned-semantic-editor-presentation","title":"Definir ownership do schema visual semantico do editor por frontend","created_at":"2026-04-02","updated_at":"2026-04-02","tags":["studio","editor","frontend","presentation","semantic-highlighting","compiler","pbs"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0029","file":"discussion/lessons/DSC-0014-studio-frontend-owned-semantic-editor-presentation/LSN-0029-frontend-owned-semantic-presentation-descriptor-and-host-consumption.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0015","status":"done","ticket":"pbs-service-facade-reserved-metadata","title":"SDK Service Bodies Calling Builtin/Intrinsic Proxies as Ordinary PBS Code","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["compiler","pbs","sdk","stdlib","lowering","service","intrinsic","sdk-interface"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0030","file":"discussion/lessons/DSC-0015-pbs-service-facade-reserved-metadata/LSN-0030-sdk-service-bodies-over-private-reserved-proxies.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}]}
|
||||
{"type":"discussion","id":"DSC-0016","status":"done","ticket":"studio-editor-scope-guides-and-brace-anchoring","title":"Scope Guides do Code Editor com ancoragem exata em braces e destaque do escopo ativo","created_at":"2026-04-03","updated_at":"2026-04-06","tags":["studio","editor","scope-guides","braces","semantic-read","frontend-contract"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0034","file":"discussion/lessons/DSC-0016-studio-editor-scope-guides-and-brace-anchoring/LSN-0034-active-scope-gutter-and-frontend-owned-structural-anchors.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0017","status":"done","ticket":"studio-editor-inline-type-hints-for-let-bindings","title":"Inline Type Hints for Let Bindings in the Studio Editor","created_at":"2026-04-03","updated_at":"2026-04-06","tags":["studio","editor","inline-hints","inlay-hints","lsp","pbs","type-inference"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0035","file":"discussion/lessons/DSC-0017-studio-editor-inline-type-hints-for-let-bindings/LSN-0035-frontend-owned-inline-hints-with-decorative-inline-rendering.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0018","status":"done","ticket":"studio-project-local-studio-state-under-dot-studio","title":"Persist project-local Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","shell","layout","setup"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0031","file":"discussion/lessons/DSC-0018-studio-project-local-studio-state-under-dot-studio/LSN-0031-project-local-studio-state-and-lifecycle-safe-layout-restoration.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0019","status":"done","ticket":"studio-project-local-setup-separate-from-main-studio-state","title":"Separate project-local setup from the main Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","setup","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0032","file":"discussion/lessons/DSC-0019-studio-project-local-setup-separate-from-main-studio-state/LSN-0032-separate-project-config-from-session-restoration-state.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0020","status":"done","ticket":"studio-editor-indentation-policy-and-project-setup","title":"Indentation Policy, Status-Bar Semantics, and Project-Local Editor Setup","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","editor","indentation","tabs","setup","dot-studio","configuration","ux"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0033","file":"discussion/lessons/DSC-0020-studio-editor-indentation-policy-and-project-setup/LSN-0033-setup-owned-indentation-policy-and-project-bootstrap-defaults.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0021","status":"done","ticket":"studio-frontend-editor-write-and-save-wave","title":"Enable Frontend Editing and Save in the Studio Code Editor","created_at":"2026-04-04","updated_at":"2026-04-06","tags":["studio","editor","frontend","write","save","vfs","lsp","pbs","access-policy"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0036","file":"discussion/lessons/DSC-0021-studio-frontend-editor-write-and-save-wave/LSN-0036-vfs-owned-frontend-edit-and-save-wave.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0022","status":"done","ticket":"studio-play-stop-cartridge-flow","title":"Wire the Studio Play/Stop button to shipper phase 1 cartridge preparation and runtime execution","created_at":"2026-04-06","updated_at":"2026-04-07","tags":["studio","play-stop","shipper","runtime","cartridge","shell"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0043","file":"discussion/lessons/DSC-0022-studio-play-stop-and-debugger-integration/LSN-0043-studio-play-stop-and-debugger-integration.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
{"type":"discussion","id":"DSC-0023","status":"done","ticket":"gradle-version-catalog-migration","title":"Move dependency version management to Version Catalog (TOML)","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["gradle","buildSrc","dependency-management","version-catalog"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0037","file":"discussion/lessons/DSC-0023-gradle-version-catalog-migration/LSN-0037-gradle-version-catalog-adoption.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
@@ -1,35 +0,0 @@
|
||||
{"type":"meta","next_id":{"DSC":35,"AGD":38,"DEC":35,"PLN":75,"LSN":47,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0034","status":"in_progress","ticket":"frontend-semantic-host-projection-flexibility","title":"Frontend semantic vocabulary flexibility and declarative host projection","created_at":"2026-05-06","updated_at":"2026-05-06","tags":["compiler","compiler-general","frontend","semantics","vscode","host-projection","lsp"],"agendas":[{"id":"AGD-0037","file":"AGD-0037-frontend-semantic-host-projection-flexibility.md","status":"accepted","created_at":"2026-05-06","updated_at":"2026-05-06"}],"decisions":[{"id":"DEC-0034","file":"DEC-0034-frontend-semantic-host-projection-flexibility.md","status":"accepted","created_at":"2026-05-06","updated_at":"2026-05-06","ref_agenda":"AGD-0037"}],"plans":[{"id":"PLN-0072","file":"PLN-0072-frontend-semantic-host-projection-contract.md","status":"done","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0034"]},{"id":"PLN-0073","file":"PLN-0073-lsp-semantic-host-projection-transport.md","status":"done","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0034"]},{"id":"PLN-0074","file":"PLN-0074-vscode-semantic-host-projection-adapter.md","status":"done","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0034"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0033","status":"in_progress","ticket":"frontend-visual-theme-spec-and-css-retirement","title":"Frontend visual theme spec and retirement of host-consumed semantic CSS","created_at":"2026-05-06","updated_at":"2026-05-06","tags":["compiler","compiler-general","frontend","presentation","theming","studio","vscode","lsp","pbs"],"agendas":[{"id":"AGD-0036","file":"AGD-0036-frontend-visual-theme-spec-and-css-retirement.md","status":"accepted","created_at":"2026-05-06","updated_at":"2026-05-06"}],"decisions":[{"id":"DEC-0033","file":"DEC-0033-frontend-visual-theme-spec-and-css-retirement.md","status":"accepted","created_at":"2026-05-06","updated_at":"2026-05-06","ref_agenda":"AGD-0036"}],"plans":[{"id":"PLN-0068","file":"PLN-0068-frontend-visual-contract-and-pbs-migration.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]},{"id":"PLN-0069","file":"PLN-0069-lsp-visual-theme-transport-and-selection.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]},{"id":"PLN-0070","file":"PLN-0070-studio-visual-theme-adapter-and-css-retirement.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]},{"id":"PLN-0071","file":"PLN-0071-vscode-dynamic-theme-translation-adapter.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0032","status":"in_progress","ticket":"studio-new-lsp-api-and-v1-boundary","title":"Novo boundary entre lsp-api, lsp-v1 e a extensao VS Code","created_at":"2026-05-05","updated_at":"2026-05-05","tags":["studio","lsp","vscode","protocol","api","boundary"],"agendas":[{"id":"AGD-0035","file":"AGD-0035-studio-new-lsp-api-and-v1-boundary.md","status":"accepted","created_at":"2026-05-05","updated_at":"2026-05-05"}],"decisions":[{"id":"DEC-0032","file":"DEC-0032-studio-new-lsp-api-and-v1-boundary.md","status":"accepted","created_at":"2026-05-05","updated_at":"2026-05-05","ref_agenda":"AGD-0035"}],"plans":[{"id":"PLN-0065","file":"PLN-0065-lsp-boundary-and-module-scaffolding.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0032"]},{"id":"PLN-0066","file":"PLN-0066-project-scoped-lsp-server-lifecycle-in-studio.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0032"]},{"id":"PLN-0067","file":"PLN-0067-compiler-backed-dumb-lsp-server-baseline.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0032"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0031","status":"in_progress","ticket":"studio-editor-workspace-cleanup","title":"Limpeza completa do Workspace Editor do Studio e remoção dos acoplamentos legados","created_at":"2026-05-05","updated_at":"2026-05-05","tags":["studio","editor","cleanup","vfs","lsp","migration"],"agendas":[{"id":"AGD-0034","file":"AGD-0034-vscode-editor-migration-feasibility.md","status":"accepted","created_at":"2026-05-05","updated_at":"2026-05-05"}],"decisions":[{"id":"DEC-0031","file":"DEC-0031-studio-editor-workspace-cleanup.md","status":"in_progress","created_at":"2026-05-05","updated_at":"2026-05-05","ref_agenda":"AGD-0034"}],"plans":[{"id":"PLN-0062","file":"PLN-0062-shell-session-and-state-cleanup-after-editor-removal.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0031"]},{"id":"PLN-0063","file":"PLN-0063-legacy-lsp-and-vfs-module-removal-with-runtime-preservation.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0031"]},{"id":"PLN-0064","file":"PLN-0064-normative-test-and-lesson-cleanup-for-editor-stack-removal.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0031"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0030","status":"done","ticket":"studio-scene-pack-runtime-binary-contract","title":"Studio scene pack contract for runtime SCENE binary payload","created_at":"2026-04-24","updated_at":"2026-05-01","tags":["studio","packer","runtime","scene","asset-pack","binary-format","tiled"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0046","file":"discussion/lessons/DSC-0030-studio-scene-pack-runtime-binary-contract/LSN-0046-canonical-scene-owns-editorial-truth-while-pack-stays-request-driven.md","status":"done","created_at":"2026-05-01","updated_at":"2026-05-01"}]}
|
||||
{"type":"discussion","id":"DSC-0029","status":"done","ticket":"studio-frame-composer-syscall-and-sprite-alignment","title":"Studio Alignment with Runtime FrameComposer Syscalls and Sprite Composition","created_at":"2026-04-18","updated_at":"2026-04-18","tags":["studio","compiler","pbs","stdlib","runtime-alignment","abi","syscall","frame-composer","sprites"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0041","file":"discussion/lessons/DSC-0029-studio-frame-composer-syscall-and-sprite-alignment/LSN-0041-composer-must-own-public-sprite-composition.md","status":"done","created_at":"2026-04-18","updated_at":"2026-04-18"}]}
|
||||
{"type":"discussion","id":"DSC-0028","status":"done","ticket":"studio-tiled-parser-assets-scene-asset-type","title":"Tiled Parser and Scene Asset-Type Ownership in Assets Workspace","created_at":"2026-04-15","updated_at":"2026-04-23","tags":["studio","assets","scene","tiled","parser","asset-type"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0045","file":"discussion/lessons/DSC-0028-studio-tiled-parser-assets-scene-asset-type/LSN-0045-asset-owned-scene-bank-and-tiled-xml-workflow.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0027","status":"abandoned","ticket":"studio-scene-workspace","title":"Scene Workspace for SCENE Authoring","created_at":"2026-04-14","updated_at":"2026-04-15","tags":["studio","workspace","scene","tilemap","asset","runtime-alignment"],"agendas":[{"id":"AGD-0029","file":"AGD-0029-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted agenda and its downstream work."}],"decisions":[{"id":"DEC-0026","file":"DEC-0026-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_agenda":"AGD-0029","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted decision and stop using it as normative guidance."}],"plans":[{"id":"PLN-0049","file":"PLN-0049-scene-workspace-spec-and-boundary-propagation.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0050","file":"PLN-0050-scene-workspace-shell-and-project-state-foundations.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0051","file":"PLN-0051-scene-artifact-and-assets-handoff-contract.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0052","file":"PLN-0052-scene-workspace-wave-1-tilemap-editor.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0026","status":"done","ticket":"glyph-bank-naming-alignment-with-runtime","title":"Glyph Bank Naming Alignment with Runtime DEC-0006","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["packer","studio","naming","asset-contract","runtime-alignment","glyph-bank"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0040","file":"discussion/lessons/DSC-0026-glyph-bank-naming-alignment-with-runtime/LSN-0040-glyph-bank-artifact-naming-alignment.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
||||
{"type":"discussion","id":"DSC-0025","status":"done","ticket":"packer-pipeline-metadata-ownership","title":"Pipeline Metadata Ownership and Runtime Contract","created_at":"2026-04-09","updated_at":"2026-04-10","tags":["packer","metadata","runtime-contract","tooling","studio"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0039","file":"discussion/lessons/DSC-0025-packer-pipeline-metadata-ownership/LSN-0039-runtime-header-boundary-and-tooling-owned-pipeline-metadata.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
||||
{"type":"discussion","id":"DSC-0024","status":"done","ticket":"jacoco-reports-consolidation","title":"JaCoCo Reports Consolidation in Gradle","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["infra","gradle","jacoco","coverage","jenkins"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0038","file":"discussion/lessons/DSC-0024-jacoco-reports-consolidation/LSN-0038-jacoco-reports-consolidation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"},{"id":"LSN-0044","file":"discussion/lessons/DSC-0024-jacoco-reports-consolidation/LSN-0044-jenkins-jacoco-alignment.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"done","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-04-23","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0042","file":"discussion/lessons/DSC-0002-palette-management-in-studio/LSN-0042-schema-driven-palette-authoring-and-local-metadata-events.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"abandoned","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-04-24","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"abandoned","created_at":"2026-03-26","updated_at":"2026-04-24","_override_reason":"Explicit user request on 2026-04-24 to abandon AGD-0004 because the agenda is no longer valid."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"done","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-04-07","tags":["studio","debugger","workspace","integration","shell"],"agendas":[],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-31","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0010-studio-code-editor-workspace-foundations/LSN-0026-read-only-editor-foundations-and-semantic-deferral.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0012","status":"done","ticket":"studio-editor-document-vfs-boundary","title":"Definir um boundary de VFS documental para tree/view/open files no Code Editor do Studio","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","vfs","filesystem","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"discussion/lessons/DSC-0012-studio-editor-document-vfs-boundary/LSN-0027-project-document-vfs-and-session-owned-editor-boundary.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"studio-editor-write-wave-supported-non-frontend-files","title":"Definir a wave inicial de edicao no Code Editor apenas para arquivos aceitos e nao relacionados ao FE","created_at":"2026-03-31","updated_at":"2026-04-02","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0028","file":"discussion/lessons/DSC-0013-studio-editor-write-wave-supported-non-frontend-files/LSN-0028-controlled-editor-write-wave-and-read-only-frontend-semantic-phase.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0014","status":"done","ticket":"studio-frontend-owned-semantic-editor-presentation","title":"Definir ownership do schema visual semantico do editor por frontend","created_at":"2026-04-02","updated_at":"2026-04-02","tags":["studio","editor","frontend","presentation","semantic-highlighting","compiler","pbs"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0029","file":"discussion/lessons/DSC-0014-studio-frontend-owned-semantic-editor-presentation/LSN-0029-frontend-owned-semantic-presentation-descriptor-and-host-consumption.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0015","status":"done","ticket":"pbs-service-facade-reserved-metadata","title":"SDK Service Bodies Calling Builtin/Intrinsic Proxies as Ordinary PBS Code","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["compiler","pbs","sdk","stdlib","lowering","service","intrinsic","sdk-interface"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0030","file":"discussion/lessons/DSC-0015-pbs-service-facade-reserved-metadata/LSN-0030-sdk-service-bodies-over-private-reserved-proxies.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}]}
|
||||
{"type":"discussion","id":"DSC-0016","status":"done","ticket":"studio-editor-scope-guides-and-brace-anchoring","title":"Scope Guides do Code Editor com ancoragem exata em braces e destaque do escopo ativo","created_at":"2026-04-03","updated_at":"2026-04-06","tags":["studio","editor","scope-guides","braces","semantic-read","frontend-contract"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0034","file":"discussion/lessons/DSC-0016-studio-editor-scope-guides-and-brace-anchoring/LSN-0034-active-scope-gutter-and-frontend-owned-structural-anchors.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0017","status":"done","ticket":"studio-editor-inline-type-hints-for-let-bindings","title":"Inline Type Hints for Let Bindings in the Studio Editor","created_at":"2026-04-03","updated_at":"2026-04-06","tags":["studio","editor","inline-hints","inlay-hints","lsp","pbs","type-inference"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0035","file":"discussion/lessons/DSC-0017-studio-editor-inline-type-hints-for-let-bindings/LSN-0035-frontend-owned-inline-hints-with-decorative-inline-rendering.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0018","status":"done","ticket":"studio-project-local-studio-state-under-dot-studio","title":"Persist project-local Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","shell","layout","setup"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0031","file":"discussion/lessons/DSC-0018-studio-project-local-studio-state-under-dot-studio/LSN-0031-project-local-studio-state-and-lifecycle-safe-layout-restoration.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0019","status":"done","ticket":"studio-project-local-setup-separate-from-main-studio-state","title":"Separate project-local setup from the main Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","setup","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0032","file":"discussion/lessons/DSC-0019-studio-project-local-setup-separate-from-main-studio-state/LSN-0032-separate-project-config-from-session-restoration-state.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0020","status":"done","ticket":"studio-editor-indentation-policy-and-project-setup","title":"Indentation Policy, Status-Bar Semantics, and Project-Local Editor Setup","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","editor","indentation","tabs","setup","dot-studio","configuration","ux"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0033","file":"discussion/lessons/DSC-0020-studio-editor-indentation-policy-and-project-setup/LSN-0033-setup-owned-indentation-policy-and-project-bootstrap-defaults.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0021","status":"done","ticket":"studio-frontend-editor-write-and-save-wave","title":"Enable Frontend Editing and Save in the Studio Code Editor","created_at":"2026-04-04","updated_at":"2026-04-06","tags":["studio","editor","frontend","write","save","vfs","lsp","pbs","access-policy"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0036","file":"discussion/lessons/DSC-0021-studio-frontend-editor-write-and-save-wave/LSN-0036-vfs-owned-frontend-edit-and-save-wave.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0022","status":"done","ticket":"studio-play-stop-cartridge-flow","title":"Wire the Studio Play/Stop button to shipper phase 1 cartridge preparation and runtime execution","created_at":"2026-04-06","updated_at":"2026-04-07","tags":["studio","play-stop","shipper","runtime","cartridge","shell"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0043","file":"discussion/lessons/DSC-0022-studio-play-stop-and-debugger-integration/LSN-0043-studio-play-stop-and-debugger-integration.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
{"type":"discussion","id":"DSC-0023","status":"done","ticket":"gradle-version-catalog-migration","title":"Move dependency version management to Version Catalog (TOML)","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["gradle","buildSrc","dependency-management","version-catalog"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0037","file":"discussion/lessons/DSC-0023-gradle-version-catalog-migration/LSN-0037-gradle-version-catalog-adoption.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
@@ -1,35 +0,0 @@
|
||||
{"type":"meta","next_id":{"DSC":35,"AGD":38,"DEC":35,"PLN":75,"LSN":49,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0034","status":"done","ticket":"frontend-semantic-host-projection-flexibility","title":"Frontend semantic vocabulary flexibility and declarative host projection","created_at":"2026-05-06","updated_at":"2026-05-07","tags":["compiler","compiler-general","frontend","semantics","vscode","host-projection","lsp"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0048","file":"discussion/lessons/DSC-0034-frontend-semantic-host-projection-flexibility/LSN-0048-frontend-owned-semantic-vocabularies-with-declarative-host-projection.md","status":"done","created_at":"2026-05-07","updated_at":"2026-05-07"}]}
|
||||
{"type":"discussion","id":"DSC-0033","status":"in_progress","ticket":"frontend-visual-theme-spec-and-css-retirement","title":"Frontend visual theme spec and retirement of host-consumed semantic CSS","created_at":"2026-05-06","updated_at":"2026-05-06","tags":["compiler","compiler-general","frontend","presentation","theming","studio","vscode","lsp","pbs"],"agendas":[{"id":"AGD-0036","file":"AGD-0036-frontend-visual-theme-spec-and-css-retirement.md","status":"accepted","created_at":"2026-05-06","updated_at":"2026-05-06"}],"decisions":[{"id":"DEC-0033","file":"DEC-0033-frontend-visual-theme-spec-and-css-retirement.md","status":"accepted","created_at":"2026-05-06","updated_at":"2026-05-06","ref_agenda":"AGD-0036"}],"plans":[{"id":"PLN-0068","file":"PLN-0068-frontend-visual-contract-and-pbs-migration.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]},{"id":"PLN-0069","file":"PLN-0069-lsp-visual-theme-transport-and-selection.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]},{"id":"PLN-0070","file":"PLN-0070-studio-visual-theme-adapter-and-css-retirement.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]},{"id":"PLN-0071","file":"PLN-0071-vscode-dynamic-theme-translation-adapter.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0032","status":"done","ticket":"studio-new-lsp-api-and-v1-boundary","title":"Novo boundary entre lsp-api, lsp-v1 e a extensao VS Code","created_at":"2026-05-05","updated_at":"2026-05-07","tags":["studio","lsp","vscode","protocol","api","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0047","file":"discussion/lessons/DSC-0032-studio-new-lsp-api-and-v1-boundary/LSN-0047-project-scoped-lsp-boundary-and-protocol-containment.md","status":"done","created_at":"2026-05-07","updated_at":"2026-05-07"}]}
|
||||
{"type":"discussion","id":"DSC-0031","status":"in_progress","ticket":"studio-editor-workspace-cleanup","title":"Limpeza completa do Workspace Editor do Studio e remoção dos acoplamentos legados","created_at":"2026-05-05","updated_at":"2026-05-05","tags":["studio","editor","cleanup","vfs","lsp","migration"],"agendas":[{"id":"AGD-0034","file":"AGD-0034-vscode-editor-migration-feasibility.md","status":"accepted","created_at":"2026-05-05","updated_at":"2026-05-05"}],"decisions":[{"id":"DEC-0031","file":"DEC-0031-studio-editor-workspace-cleanup.md","status":"in_progress","created_at":"2026-05-05","updated_at":"2026-05-05","ref_agenda":"AGD-0034"}],"plans":[{"id":"PLN-0062","file":"PLN-0062-shell-session-and-state-cleanup-after-editor-removal.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0031"]},{"id":"PLN-0063","file":"PLN-0063-legacy-lsp-and-vfs-module-removal-with-runtime-preservation.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0031"]},{"id":"PLN-0064","file":"PLN-0064-normative-test-and-lesson-cleanup-for-editor-stack-removal.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0031"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0030","status":"done","ticket":"studio-scene-pack-runtime-binary-contract","title":"Studio scene pack contract for runtime SCENE binary payload","created_at":"2026-04-24","updated_at":"2026-05-01","tags":["studio","packer","runtime","scene","asset-pack","binary-format","tiled"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0046","file":"discussion/lessons/DSC-0030-studio-scene-pack-runtime-binary-contract/LSN-0046-canonical-scene-owns-editorial-truth-while-pack-stays-request-driven.md","status":"done","created_at":"2026-05-01","updated_at":"2026-05-01"}]}
|
||||
{"type":"discussion","id":"DSC-0029","status":"done","ticket":"studio-frame-composer-syscall-and-sprite-alignment","title":"Studio Alignment with Runtime FrameComposer Syscalls and Sprite Composition","created_at":"2026-04-18","updated_at":"2026-04-18","tags":["studio","compiler","pbs","stdlib","runtime-alignment","abi","syscall","frame-composer","sprites"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0041","file":"discussion/lessons/DSC-0029-studio-frame-composer-syscall-and-sprite-alignment/LSN-0041-composer-must-own-public-sprite-composition.md","status":"done","created_at":"2026-04-18","updated_at":"2026-04-18"}]}
|
||||
{"type":"discussion","id":"DSC-0028","status":"done","ticket":"studio-tiled-parser-assets-scene-asset-type","title":"Tiled Parser and Scene Asset-Type Ownership in Assets Workspace","created_at":"2026-04-15","updated_at":"2026-04-23","tags":["studio","assets","scene","tiled","parser","asset-type"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0045","file":"discussion/lessons/DSC-0028-studio-tiled-parser-assets-scene-asset-type/LSN-0045-asset-owned-scene-bank-and-tiled-xml-workflow.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0027","status":"abandoned","ticket":"studio-scene-workspace","title":"Scene Workspace for SCENE Authoring","created_at":"2026-04-14","updated_at":"2026-04-15","tags":["studio","workspace","scene","tilemap","asset","runtime-alignment"],"agendas":[{"id":"AGD-0029","file":"AGD-0029-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted agenda and its downstream work."}],"decisions":[{"id":"DEC-0026","file":"DEC-0026-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_agenda":"AGD-0029","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted decision and stop using it as normative guidance."}],"plans":[{"id":"PLN-0049","file":"PLN-0049-scene-workspace-spec-and-boundary-propagation.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0050","file":"PLN-0050-scene-workspace-shell-and-project-state-foundations.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0051","file":"PLN-0051-scene-artifact-and-assets-handoff-contract.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0052","file":"PLN-0052-scene-workspace-wave-1-tilemap-editor.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0026","status":"done","ticket":"glyph-bank-naming-alignment-with-runtime","title":"Glyph Bank Naming Alignment with Runtime DEC-0006","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["packer","studio","naming","asset-contract","runtime-alignment","glyph-bank"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0040","file":"discussion/lessons/DSC-0026-glyph-bank-naming-alignment-with-runtime/LSN-0040-glyph-bank-artifact-naming-alignment.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
||||
{"type":"discussion","id":"DSC-0025","status":"done","ticket":"packer-pipeline-metadata-ownership","title":"Pipeline Metadata Ownership and Runtime Contract","created_at":"2026-04-09","updated_at":"2026-04-10","tags":["packer","metadata","runtime-contract","tooling","studio"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0039","file":"discussion/lessons/DSC-0025-packer-pipeline-metadata-ownership/LSN-0039-runtime-header-boundary-and-tooling-owned-pipeline-metadata.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
||||
{"type":"discussion","id":"DSC-0024","status":"done","ticket":"jacoco-reports-consolidation","title":"JaCoCo Reports Consolidation in Gradle","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["infra","gradle","jacoco","coverage","jenkins"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0038","file":"discussion/lessons/DSC-0024-jacoco-reports-consolidation/LSN-0038-jacoco-reports-consolidation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"},{"id":"LSN-0044","file":"discussion/lessons/DSC-0024-jacoco-reports-consolidation/LSN-0044-jenkins-jacoco-alignment.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"done","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-04-23","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0042","file":"discussion/lessons/DSC-0002-palette-management-in-studio/LSN-0042-schema-driven-palette-authoring-and-local-metadata-events.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"abandoned","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-04-24","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"abandoned","created_at":"2026-03-26","updated_at":"2026-04-24","_override_reason":"Explicit user request on 2026-04-24 to abandon AGD-0004 because the agenda is no longer valid."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"done","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-04-07","tags":["studio","debugger","workspace","integration","shell"],"agendas":[],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-31","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0010-studio-code-editor-workspace-foundations/LSN-0026-read-only-editor-foundations-and-semantic-deferral.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0012","status":"done","ticket":"studio-editor-document-vfs-boundary","title":"Definir um boundary de VFS documental para tree/view/open files no Code Editor do Studio","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","vfs","filesystem","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"discussion/lessons/DSC-0012-studio-editor-document-vfs-boundary/LSN-0027-project-document-vfs-and-session-owned-editor-boundary.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"studio-editor-write-wave-supported-non-frontend-files","title":"Definir a wave inicial de edicao no Code Editor apenas para arquivos aceitos e nao relacionados ao FE","created_at":"2026-03-31","updated_at":"2026-04-02","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0028","file":"discussion/lessons/DSC-0013-studio-editor-write-wave-supported-non-frontend-files/LSN-0028-controlled-editor-write-wave-and-read-only-frontend-semantic-phase.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0014","status":"done","ticket":"studio-frontend-owned-semantic-editor-presentation","title":"Definir ownership do schema visual semantico do editor por frontend","created_at":"2026-04-02","updated_at":"2026-04-02","tags":["studio","editor","frontend","presentation","semantic-highlighting","compiler","pbs"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0029","file":"discussion/lessons/DSC-0014-studio-frontend-owned-semantic-editor-presentation/LSN-0029-frontend-owned-semantic-presentation-descriptor-and-host-consumption.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0015","status":"done","ticket":"pbs-service-facade-reserved-metadata","title":"SDK Service Bodies Calling Builtin/Intrinsic Proxies as Ordinary PBS Code","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["compiler","pbs","sdk","stdlib","lowering","service","intrinsic","sdk-interface"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0030","file":"discussion/lessons/DSC-0015-pbs-service-facade-reserved-metadata/LSN-0030-sdk-service-bodies-over-private-reserved-proxies.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}]}
|
||||
{"type":"discussion","id":"DSC-0016","status":"done","ticket":"studio-editor-scope-guides-and-brace-anchoring","title":"Scope Guides do Code Editor com ancoragem exata em braces e destaque do escopo ativo","created_at":"2026-04-03","updated_at":"2026-04-06","tags":["studio","editor","scope-guides","braces","semantic-read","frontend-contract"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0034","file":"discussion/lessons/DSC-0016-studio-editor-scope-guides-and-brace-anchoring/LSN-0034-active-scope-gutter-and-frontend-owned-structural-anchors.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0017","status":"done","ticket":"studio-editor-inline-type-hints-for-let-bindings","title":"Inline Type Hints for Let Bindings in the Studio Editor","created_at":"2026-04-03","updated_at":"2026-04-06","tags":["studio","editor","inline-hints","inlay-hints","lsp","pbs","type-inference"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0035","file":"discussion/lessons/DSC-0017-studio-editor-inline-type-hints-for-let-bindings/LSN-0035-frontend-owned-inline-hints-with-decorative-inline-rendering.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0018","status":"done","ticket":"studio-project-local-studio-state-under-dot-studio","title":"Persist project-local Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","shell","layout","setup"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0031","file":"discussion/lessons/DSC-0018-studio-project-local-studio-state-under-dot-studio/LSN-0031-project-local-studio-state-and-lifecycle-safe-layout-restoration.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0019","status":"done","ticket":"studio-project-local-setup-separate-from-main-studio-state","title":"Separate project-local setup from the main Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","setup","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0032","file":"discussion/lessons/DSC-0019-studio-project-local-setup-separate-from-main-studio-state/LSN-0032-separate-project-config-from-session-restoration-state.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0020","status":"done","ticket":"studio-editor-indentation-policy-and-project-setup","title":"Indentation Policy, Status-Bar Semantics, and Project-Local Editor Setup","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","editor","indentation","tabs","setup","dot-studio","configuration","ux"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0033","file":"discussion/lessons/DSC-0020-studio-editor-indentation-policy-and-project-setup/LSN-0033-setup-owned-indentation-policy-and-project-bootstrap-defaults.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0021","status":"done","ticket":"studio-frontend-editor-write-and-save-wave","title":"Enable Frontend Editing and Save in the Studio Code Editor","created_at":"2026-04-04","updated_at":"2026-04-06","tags":["studio","editor","frontend","write","save","vfs","lsp","pbs","access-policy"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0036","file":"discussion/lessons/DSC-0021-studio-frontend-editor-write-and-save-wave/LSN-0036-vfs-owned-frontend-edit-and-save-wave.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0022","status":"done","ticket":"studio-play-stop-cartridge-flow","title":"Wire the Studio Play/Stop button to shipper phase 1 cartridge preparation and runtime execution","created_at":"2026-04-06","updated_at":"2026-04-07","tags":["studio","play-stop","shipper","runtime","cartridge","shell"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0043","file":"discussion/lessons/DSC-0022-studio-play-stop-and-debugger-integration/LSN-0043-studio-play-stop-and-debugger-integration.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
{"type":"discussion","id":"DSC-0023","status":"done","ticket":"gradle-version-catalog-migration","title":"Move dependency version management to Version Catalog (TOML)","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["gradle","buildSrc","dependency-management","version-catalog"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0037","file":"discussion/lessons/DSC-0023-gradle-version-catalog-migration/LSN-0037-gradle-version-catalog-adoption.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
+3
-39
@@ -1,40 +1,4 @@
|
||||
{"type":"meta","next_id":{"DSC":66,"AGD":69,"DEC":50,"PLN":129,"LSN":66,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0065","status":"open","ticket":"multi-frontend-avoid-premature-abstractions","title":"Evitar abstracoes prematuras na preparacao multi-frontend","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","studio","frontend","architecture","multi-frontend","simplicity"],"agendas":[{"id":"AGD-0068","file":"AGD-0068-multi-frontend-avoid-premature-abstractions.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0064","status":"open","ticket":"multi-frontend-architectural-tests","title":"Testes arquiteturais para fronteiras multi-frontend","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","studio","frontend","architecture","tests","multi-frontend"],"agendas":[{"id":"AGD-0067","file":"AGD-0067-multi-frontend-architectural-tests.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0063","status":"done","ticket":"multi-frontend-synthetic-test-frontend","title":"Frontend sintetico de teste para provar neutralidade do pipeline","created_at":"2026-07-15","updated_at":"2026-09-19","tags":["compiler","compiler-general","frontend","tests","backend","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0065","file":"discussion/lessons/DSC-0063-multi-frontend-synthetic-test-frontend/LSN-0065-synthetic-test-frontend-proves-pipeline-neutrality.md","status":"done","created_at":"2026-09-19","updated_at":"2026-09-19"}]}
|
||||
{"type":"discussion","id":"DSC-0062","status":"done","ticket":"multi-frontend-pvm-neutrality","title":"Neutralidade da PVM e identificacao PBX independente de PBS","created_at":"2026-07-15","updated_at":"2026-09-18","tags":["vm-arch","runtime","pvm","pbx","compiler","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0061","file":"discussion/lessons/DSC-0062-multi-frontend-pvm-neutrality/LSN-0061-pbx-runtime-boundary.md","status":"done","created_at":"2026-09-18","updated_at":"2026-09-18"}]}
|
||||
{"type":"discussion","id":"DSC-0061","status":"done","ticket":"multi-frontend-sdk-canonical-definition","title":"Auditoria e centralizacao gradual da definicao canonica do SDK","created_at":"2026-07-15","updated_at":"2026-09-19","tags":["compiler","compiler-general","sdk","stdlib","hostcalls","intrinsics","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0064","file":"discussion/lessons/DSC-0061-multi-frontend-sdk-canonical-definition/LSN-0064-runtime-owns-console-abi-pbs-is-delivery.md","status":"done","created_at":"2026-09-19","updated_at":"2026-09-19"}]}
|
||||
{"type":"discussion","id":"DSC-0060","status":"done","ticket":"multi-frontend-validation-boundaries","title":"Separar validacoes de linguagem e validacoes de plataforma","created_at":"2026-07-15","updated_at":"2026-09-19","tags":["compiler","compiler-general","compiler-pbs","backend","validation","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0063","file":"discussion/lessons/DSC-0060-multi-frontend-validation-boundaries/LSN-0063-language-vs-platform-validation-ownership.md","status":"done","created_at":"2026-09-19","updated_at":"2026-09-19"}]}
|
||||
{"type":"discussion","id":"DSC-0059","status":"done","ticket":"multi-frontend-common-lifecycle","title":"Extrair lifecycle comum das responsabilidades do frontend PBS","created_at":"2026-07-15","updated_at":"2026-09-19","tags":["compiler","compiler-general","compiler-pbs","lifecycle","backend","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0062","file":"discussion/lessons/DSC-0059-multi-frontend-common-lifecycle/LSN-0062-common-lifecycle-assembly-stage.md","status":"done","created_at":"2026-09-19","updated_at":"2026-09-19"}]}
|
||||
{"type":"discussion","id":"DSC-0058","status":"done","ticket":"multi-frontend-serializable-ir","title":"Manter a IR comum serializavel por design","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","ir","backend","serialization","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0060","file":"discussion/lessons/DSC-0058-multi-frontend-serializable-ir/LSN-0060-data-contract-first-for-serializable-irbackend.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15"}]}
|
||||
{"type":"discussion","id":"DSC-0057","status":"done","ticket":"multi-frontend-frontend-backend-contract","title":"Estabilizar contrato entre frontend e backend comum","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","compiler-pbs","ir","backend","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0059","file":"discussion/lessons/DSC-0057-multi-frontend-frontend-backend-contract/LSN-0059-common-irbackend-handoff-and-backend-guardrails.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15"}]}
|
||||
{"type":"discussion","id":"DSC-0056","status":"done","ticket":"multi-frontend-remove-pbs-branches","title":"Generalizar o contrato LSP/editorial para frontends","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","compiler-pbs","studio","frontend","coupling","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0058","file":"discussion/lessons/DSC-0056-multi-frontend-remove-pbs-branches/LSN-0058-generic-frontend-editorial-contract-for-lsp.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15"}]}
|
||||
{"type":"discussion","id":"DSC-0055","status":"done","ticket":"multi-frontend-compiler-vs-language-services","title":"Separar compilacao de servicos editoriais de frontend","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","studio","lsp","editor","frontend","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0056","file":"discussion/lessons/DSC-0055-multi-frontend-compiler-vs-language-services/LSN-0056-compile-first-frontends-with-optional-editorial-capabilities.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15"}]}
|
||||
{"type":"discussion","id":"DSC-0054","status":"done","ticket":"multi-frontend-provider-contract","title":"Introduzir provider completo de frontend","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","studio","frontend","registry","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0055","file":"discussion/lessons/DSC-0054-multi-frontend-provider-contract/LSN-0055-static-frontend-providers-before-plugin-architecture.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15"}]}
|
||||
{"type":"discussion","id":"DSC-0053","status":"open","ticket":"pbs-lsp-call-and-type-hierarchy","title":"PBS LSP Call and Type Hierarchy","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","call-hierarchy","type-hierarchy"],"agendas":[{"id":"AGD-0056","file":"AGD-0056-pbs-lsp-call-and-type-hierarchy.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0052","status":"open","ticket":"pbs-lsp-document-links","title":"PBS LSP Document Links","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","document-links","imports"],"agendas":[{"id":"AGD-0055","file":"AGD-0055-pbs-lsp-document-links.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0051","status":"open","ticket":"pbs-lsp-diagnostics-ux","title":"PBS LSP Diagnostics UX","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","diagnostics","ux"],"agendas":[{"id":"AGD-0054","file":"AGD-0054-pbs-lsp-diagnostics-ux.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0050","status":"open","ticket":"pbs-lsp-folding-and-selection-ranges","title":"PBS LSP Folding and Selection Ranges","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","folding","selection-range"],"agendas":[{"id":"AGD-0053","file":"AGD-0053-pbs-lsp-folding-and-selection-ranges.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0049","status":"open","ticket":"pbs-lsp-completion-depth","title":"PBS LSP Completion Depth","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","completion"],"agendas":[{"id":"AGD-0052","file":"AGD-0052-pbs-lsp-completion-depth.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0048","status":"open","ticket":"pbs-lsp-performance-cache-and-snapshots","title":"PBS LSP Performance Cache and Snapshots","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","performance","caching"],"agendas":[{"id":"AGD-0051","file":"AGD-0051-pbs-lsp-performance-cache-and-snapshots.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0047","status":"open","ticket":"pbs-lsp-semantic-tokens-semantic-classification","title":"PBS LSP Semantic Token Classification","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","semantic-tokens"],"agendas":[{"id":"AGD-0050","file":"AGD-0050-pbs-lsp-semantic-token-classification.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0046","status":"open","ticket":"pbs-lsp-import-assistance","title":"PBS LSP Import Assistance","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","imports","completion"],"agendas":[{"id":"AGD-0049","file":"AGD-0049-pbs-lsp-import-assistance.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0045","status":"open","ticket":"pbs-lsp-formatting","title":"PBS LSP Formatting","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","formatting"],"agendas":[{"id":"AGD-0048","file":"AGD-0048-pbs-lsp-formatting.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0044","status":"open","ticket":"pbs-lsp-code-actions","title":"PBS LSP Code Actions and Quick Fixes","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","code-actions","quick-fix"],"agendas":[{"id":"AGD-0047","file":"AGD-0047-pbs-lsp-code-actions-and-quick-fixes.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0043","status":"open","ticket":"pbs-lsp-rename-symbol","title":"PBS LSP Rename Symbol","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","rename"],"agendas":[{"id":"AGD-0046","file":"AGD-0046-pbs-lsp-rename-symbol.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0042","status":"open","ticket":"pbs-lsp-workspace-symbols","title":"PBS LSP Workspace Symbols","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","workspace-symbols"],"agendas":[{"id":"AGD-0045","file":"AGD-0045-pbs-lsp-workspace-symbols.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0041","status":"open","ticket":"pbs-lsp-document-symbols-outline","title":"PBS LSP Document Symbols and Outline","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","outline","document-symbols"],"agendas":[{"id":"AGD-0044","file":"AGD-0044-pbs-lsp-document-symbols-and-outline.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0040","status":"open","ticket":"pbs-lsp-find-references","title":"PBS LSP Find References","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","references"],"agendas":[{"id":"AGD-0043","file":"AGD-0043-pbs-lsp-find-references.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0039","status":"open","ticket":"pbs-lsp-go-to-definition","title":"PBS LSP Go to Definition","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","definition"],"agendas":[{"id":"AGD-0042","file":"AGD-0042-pbs-lsp-go-to-definition.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0038","status":"done","ticket":"studio-packer-rgba8888-asset-pipeline","title":"Studio and Packer RGBA8888 Asset Pipeline Alignment","created_at":"2026-05-23","updated_at":"2026-07-14","tags":["studio","packer","assets","glyph-bank","palette","rgba8888","runtime-alignment"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0053","file":"discussion/lessons/DSC-0038-studio-packer-rgba8888-asset-pipeline/LSN-0053-rgba8888-is-the-canonical-studio-packer-palette-contract.md","status":"done","created_at":"2026-07-14","updated_at":"2026-07-14"}]}
|
||||
{"type":"discussion","id":"DSC-0037","status":"done","ticket":"pbs-autocomplete-parameter-names","title":"PBS autocomplete parameter names for stdlib and method calls","created_at":"2026-05-08","updated_at":"2026-05-14","tags":["compiler-pbs","studio","lsp","autocomplete","signature-help","stdlib"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0052","file":"discussion/lessons/DSC-0037-pbs-autocomplete-parameter-names/LSN-0052-canonical-callable-parameter-names-through-pbs-editor-assistance.md","status":"done","created_at":"2026-05-14","updated_at":"2026-05-14"}]}
|
||||
{"type":"discussion","id":"DSC-0036","status":"done","ticket":"pbs-symbol-documentation-and-hover-markdown","title":"Modelo de documentacao de simbolos em PBS e consumo markdown no hover","created_at":"2026-05-08","updated_at":"2026-07-15","tags":["compiler","compiler-pbs","studio","lsp","vscode","editor","hover","documentation","markdown"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0057","file":"discussion/lessons/DSC-0036-pbs-symbol-documentation-and-hover-markdown/LSN-0057-compiler-owned-pbs-doc-markdown-for-editor-assistance.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15"}]}
|
||||
{"type":"discussion","id":"DSC-0035","status":"done","ticket":"pbs-lsp-editor-assistance-wave-1","title":"Wave 1 de assistencia editorial via LSP para PBS no VS Code","created_at":"2026-05-08","updated_at":"2026-05-08","tags":["studio","lsp","vscode","compiler","compiler-pbs","editor","completion","hover","signature-help"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0051","file":"discussion/lessons/DSC-0035-pbs-lsp-editor-assistance-wave-1/LSN-0051-compiler-backed-editor-assistance-for-pbs.md","status":"done","created_at":"2026-05-08","updated_at":"2026-05-08"}]}
|
||||
{"type":"discussion","id":"DSC-0034","status":"done","ticket":"frontend-semantic-host-projection-flexibility","title":"Frontend semantic vocabulary flexibility and declarative host projection","created_at":"2026-05-06","updated_at":"2026-05-07","tags":["compiler","compiler-general","frontend","semantics","vscode","host-projection","lsp"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0048","file":"discussion/lessons/DSC-0034-frontend-semantic-host-projection-flexibility/LSN-0048-frontend-owned-semantic-vocabularies-with-declarative-host-projection.md","status":"done","created_at":"2026-05-07","updated_at":"2026-05-07"}]}
|
||||
{"type":"discussion","id":"DSC-0033","status":"done","ticket":"frontend-visual-theme-spec-and-css-retirement","title":"Frontend visual theme spec and retirement of host-consumed semantic CSS","created_at":"2026-05-06","updated_at":"2026-05-08","tags":["compiler","compiler-general","frontend","presentation","theming","studio","vscode","lsp","pbs"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0050","file":"discussion/lessons/DSC-0033-frontend-visual-theme-spec-and-css-retirement/LSN-0050-frontend-owned-visual-themes-with-structured-contract-and-host-adapters.md","status":"done","created_at":"2026-05-08","updated_at":"2026-05-08"}]}
|
||||
{"type":"discussion","id":"DSC-0032","status":"done","ticket":"studio-new-lsp-api-and-v1-boundary","title":"Novo boundary entre lsp-api, lsp-v1 e a extensao VS Code","created_at":"2026-05-05","updated_at":"2026-05-07","tags":["studio","lsp","vscode","protocol","api","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0047","file":"discussion/lessons/DSC-0032-studio-new-lsp-api-and-v1-boundary/LSN-0047-project-scoped-lsp-boundary-and-protocol-containment.md","status":"done","created_at":"2026-05-07","updated_at":"2026-05-07"}]}
|
||||
{"type":"discussion","id":"DSC-0031","status":"done","ticket":"studio-editor-workspace-cleanup","title":"Limpeza completa do Workspace Editor do Studio e remoção dos acoplamentos legados","created_at":"2026-05-05","updated_at":"2026-05-08","tags":["studio","editor","cleanup","vfs","lsp","migration"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0049","file":"discussion/lessons/DSC-0031-studio-editor-workspace-cleanup/LSN-0049-remove-the-embedded-editor-stack-before-rebuilding-code-workflows.md","status":"done","created_at":"2026-05-08","updated_at":"2026-05-08"}]}
|
||||
{"type":"discussion","id":"DSC-0030","status":"done","ticket":"studio-scene-pack-runtime-binary-contract","title":"Studio scene pack contract for runtime SCENE binary payload","created_at":"2026-04-24","updated_at":"2026-05-01","tags":["studio","packer","runtime","scene","asset-pack","binary-format","tiled"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0046","file":"discussion/lessons/DSC-0030-studio-scene-pack-runtime-binary-contract/LSN-0046-canonical-scene-owns-editorial-truth-while-pack-stays-request-driven.md","status":"done","created_at":"2026-05-01","updated_at":"2026-05-01"}]}
|
||||
{"type":"meta","next_id":{"DSC":30,"AGD":32,"DEC":29,"PLN":59,"LSN":46,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0029","status":"done","ticket":"studio-frame-composer-syscall-and-sprite-alignment","title":"Studio Alignment with Runtime FrameComposer Syscalls and Sprite Composition","created_at":"2026-04-18","updated_at":"2026-04-18","tags":["studio","compiler","pbs","stdlib","runtime-alignment","abi","syscall","frame-composer","sprites"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0041","file":"discussion/lessons/DSC-0029-studio-frame-composer-syscall-and-sprite-alignment/LSN-0041-composer-must-own-public-sprite-composition.md","status":"done","created_at":"2026-04-18","updated_at":"2026-04-18"}]}
|
||||
{"type":"discussion","id":"DSC-0028","status":"done","ticket":"studio-tiled-parser-assets-scene-asset-type","title":"Tiled Parser and Scene Asset-Type Ownership in Assets Workspace","created_at":"2026-04-15","updated_at":"2026-04-23","tags":["studio","assets","scene","tiled","parser","asset-type"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0045","file":"discussion/lessons/DSC-0028-studio-tiled-parser-assets-scene-asset-type/LSN-0045-asset-owned-scene-bank-and-tiled-xml-workflow.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0027","status":"abandoned","ticket":"studio-scene-workspace","title":"Scene Workspace for SCENE Authoring","created_at":"2026-04-14","updated_at":"2026-04-15","tags":["studio","workspace","scene","tilemap","asset","runtime-alignment"],"agendas":[{"id":"AGD-0029","file":"AGD-0029-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted agenda and its downstream work."}],"decisions":[{"id":"DEC-0026","file":"DEC-0026-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_agenda":"AGD-0029","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted decision and stop using it as normative guidance."}],"plans":[{"id":"PLN-0049","file":"PLN-0049-scene-workspace-spec-and-boundary-propagation.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0050","file":"PLN-0050-scene-workspace-shell-and-project-state-foundations.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0051","file":"PLN-0051-scene-artifact-and-assets-handoff-contract.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0052","file":"PLN-0052-scene-workspace-wave-1-tilemap-editor.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."}],"lessons":[]}
|
||||
@@ -44,8 +8,8 @@
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"done","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-04-23","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0042","file":"discussion/lessons/DSC-0002-palette-management-in-studio/LSN-0042-schema-driven-palette-authoring-and-local-metadata-events.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"abandoned","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-04-24","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"abandoned","created_at":"2026-03-26","updated_at":"2026-04-24","_override_reason":"Explicit user request on 2026-04-24 to abandon AGD-0004 because the agenda is no longer valid."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"done","ticket":"variable-tile-bank-palette-serialization","title":"Variable Glyph Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-07-14","tags":["packer","legacy-import","glyph-bank","palette-serialization","rgba8888","runtime-alignment"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0054","file":"discussion/lessons/DSC-0005-variable-glyph-bank-palette-serialization/LSN-0054-runtime-owned-variable-glyph-palette-counts.md","status":"done","created_at":"2026-07-14","updated_at":"2026-07-14"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
|
||||
-126
@@ -1,126 +0,0 @@
|
||||
---
|
||||
id: LSN-0054
|
||||
ticket: variable-tile-bank-palette-serialization
|
||||
title: Runtime-Owned Variable Glyph Palette Counts
|
||||
created: 2026-07-14
|
||||
tags:
|
||||
- packer
|
||||
- studio
|
||||
- glyph-bank
|
||||
- palette-serialization
|
||||
- rgba8888
|
||||
- runtime-alignment
|
||||
---
|
||||
|
||||
# Runtime-Owned Variable Glyph Palette Counts
|
||||
|
||||
### Original Problem
|
||||
|
||||
The first RGBA8888 alignment wave made Studio and packer emit palette colors in
|
||||
the runtime channel order, but it deliberately kept the old fixed glyph-bank
|
||||
palette payload shape. Every `GLYPH/indexed_v1` payload still reserved room for
|
||||
64 palettes, so the emitted palette block was always `64 * 16 * 4 = 4096`
|
||||
bytes even when the bank used one or a few palettes.
|
||||
|
||||
That fixed shape left two problems:
|
||||
|
||||
- packer output was larger than the runtime needed;
|
||||
- `palette_count` could not be trusted as the effective runtime resident count,
|
||||
because the payload still looked like a 64-palette bank.
|
||||
|
||||
Runtime later accepted the variable-palette protocol for
|
||||
`GLYPH/indexed_v1`. Studio and packer had to follow that runtime-owned wire
|
||||
contract instead of keeping a stale producer-side convention.
|
||||
|
||||
### Consolidated Decision
|
||||
|
||||
Runtime owns the `GLYPH/indexed_v1` protocol. Studio and packer are downstream
|
||||
producers of runtime-conforming `assets.pa` payloads.
|
||||
|
||||
The accepted rule is:
|
||||
|
||||
1. `palette_count` is the effective serialized and resident palette count.
|
||||
2. `palette_count` must be in the inclusive range `1..=64`.
|
||||
3. Palette bytes are exactly `palette_count * 16 * 4`.
|
||||
4. `size = ceil(width * height / 2) + palette_count * 16 * 4`.
|
||||
5. `decoded_size = width * height + palette_count * 16 * 4`.
|
||||
6. Palette bytes remain RGBA8888 in `R`, `G`, `B`, `A` order.
|
||||
7. `GLYPH/indexed_v1` remains the format name. This change does not introduce
|
||||
`GLYPH/indexed_v2`.
|
||||
8. There is no compatibility mode for the old fixed 64-palette padding.
|
||||
9. Palette IDs remain direct. There is no sparse-to-dense remapping metadata in
|
||||
v1.
|
||||
10. `palette_authored`, when present, is informative tooling metadata only.
|
||||
|
||||
### Implementation Result
|
||||
|
||||
The packer specs now define `palette_count` as runtime-effective metadata for
|
||||
glyph banks and describe the variable palette payload in the build-artifact
|
||||
contract. Studio-facing asset workspace docs now keep `palette_count` distinct
|
||||
from any authored or tooling-only palette count.
|
||||
|
||||
The packer metadata model derives and validates effective palette count instead
|
||||
of hard-coding `64`. Sparse direct palette IDs are preserved by materializing
|
||||
intermediate palette slots up to the highest referenced ID; those slots are not
|
||||
a remapping table.
|
||||
|
||||
Payload emission now writes exactly the effective number of palette slots. Size
|
||||
and decoded-size accounting use the same formula as the runtime contract, so
|
||||
metadata, asset-table entries, and payload lengths agree.
|
||||
|
||||
Tests and fixtures cover `palette_count = 1`, intermediate counts, `64`, sparse
|
||||
direct identity, invalid counts above `64`, RGBA8888 byte order, and payload
|
||||
size accounting. Final validation passed with:
|
||||
|
||||
- `discussion validate`;
|
||||
- `./gradlew :prometeu-packer:prometeu-packer-v1:test`;
|
||||
- `./gradlew build`.
|
||||
|
||||
### Practical Examples
|
||||
|
||||
A 256 by 256 glyph bank with one palette has:
|
||||
|
||||
```text
|
||||
pixel bytes = ceil(256 * 256 / 2) = 32768
|
||||
palette bytes = 1 * 16 * 4 = 64
|
||||
size = 32768 + 64 = 32832
|
||||
decoded_size = 256 * 256 + 64 = 65600
|
||||
```
|
||||
|
||||
A bank that references palette ID `6` has an effective `palette_count` of at
|
||||
least `7`. Palette slots `0` through `6` exist in the serialized palette block.
|
||||
If some lower slots were not authored directly, they are deterministic
|
||||
placeholders; palette `6` is not remapped to palette `0`.
|
||||
|
||||
### Common Pitfalls and Anti-patterns
|
||||
|
||||
- Do not infer runtime payload length from the maximum allowed palette count.
|
||||
`64` is the upper bound, not the default emitted count.
|
||||
- Do not use `palette_authored` as a runtime-effective field. It may describe a
|
||||
tool view, but runtime loads `palette_count`.
|
||||
- Do not preserve fixed 4096-byte palette padding for banks with fewer than 64
|
||||
effective palettes.
|
||||
- Do not create `GLYPH/indexed_v2` to carry this change. The accepted runtime
|
||||
protocol keeps the v1 format name.
|
||||
- Do not introduce sparse-to-dense palette remapping metadata. Existing scene,
|
||||
sprite, packer, and runtime references use direct palette identity.
|
||||
- Do not combine RGBA8888 channel-order work with palette-count semantics.
|
||||
RGBA8888 defines each color value; `palette_count` defines how many palettes
|
||||
are serialized and resident.
|
||||
|
||||
### References
|
||||
|
||||
- Runtime decision:
|
||||
`../runtime/discussion/workflow/decisions/DEC-0041-variable-glyph-bank-palette-protocol.md`.
|
||||
- Studio/packer decision:
|
||||
`discussion/workflow/decisions/DEC-0038-variable-glyph-bank-palette-serialization.md`.
|
||||
- `PLN-0087`: Variable glyph palette spec propagation.
|
||||
- `PLN-0088`: Variable glyph palette metadata and count model.
|
||||
- `PLN-0089`: Variable glyph palette payload emission and size accounting.
|
||||
- `PLN-0090`: Studio and packer projections for variable glyph palettes.
|
||||
- `PLN-0091`: Variable glyph palette tests, fixtures, and final validation.
|
||||
- Prior lesson:
|
||||
`discussion/lessons/DSC-0038-studio-packer-rgba8888-asset-pipeline/LSN-0053-rgba8888-is-the-canonical-studio-packer-palette-contract.md`.
|
||||
- `docs/specs/packer/3. Asset Declaration and Virtual Asset Contract Specification.md`.
|
||||
- `docs/specs/packer/4. Build Artifacts and Deterministic Packing Specification.md`.
|
||||
- `docs/specs/studio/4. Assets Workspace Specification.md`.
|
||||
-4
@@ -6,10 +6,6 @@ created: 2026-03-31
|
||||
tags: [studio, editor, workspace, read-only, navigator, tabs, lsp-deferred, ui-foundations]
|
||||
---
|
||||
|
||||
## Historical Status
|
||||
|
||||
This lesson documents the removed embedded Studio code editor. Keep it as historical context only; do not treat it as current product guidance after `DEC-0031`.
|
||||
|
||||
## Context
|
||||
|
||||
Studio needed a real `Code Editor` workspace, but the team explicitly did not want the first wave to collapse UI structure, file management, write behavior, and language semantics into one premature implementation.
|
||||
|
||||
-4
@@ -6,10 +6,6 @@ created: 2026-03-31
|
||||
tags: [studio, editor, vfs, project-session, filesystem, boundary, architecture]
|
||||
---
|
||||
|
||||
## Historical Status
|
||||
|
||||
This lesson documents the removed embedded Studio editor/VFS split. Keep it as historical context only; do not treat it as current product guidance after `DEC-0031`.
|
||||
|
||||
## Context
|
||||
|
||||
The first Studio `Code Editor` wave had already established a read-only editorial shell, but the concrete implementation still let the editor package own direct filesystem concerns for:
|
||||
|
||||
-4
@@ -6,10 +6,6 @@ created: 2026-04-02
|
||||
tags: [studio, editor, vfs, lsp, access-policy, save, read-only, frontend-boundary]
|
||||
---
|
||||
|
||||
## Historical Status
|
||||
|
||||
This lesson documents the removed embedded Studio editor, VFS, and legacy LSP flow. Keep it as historical context only; do not treat it as current product guidance after `DEC-0031`.
|
||||
|
||||
## Context
|
||||
|
||||
The first Studio `Code Editor` implementation had already established a session-owned document boundary through `prometeu-vfs`, but it was still missing the next operational split:
|
||||
|
||||
-4
@@ -6,10 +6,6 @@ created: 2026-04-02
|
||||
tags: [studio, editor, frontend, semantic-highlighting, lsp, compiler, pbs, presentation]
|
||||
---
|
||||
|
||||
## Historical Status
|
||||
|
||||
This lesson documents the removed embedded Studio semantic editor presentation path. Keep it as historical context only; do not treat it as current product guidance after `DEC-0031`.
|
||||
|
||||
## Context
|
||||
|
||||
The first semantic highlight wave for frontend documents had already proved that Studio could consume semantic spans through the integrated LSP path.
|
||||
|
||||
-4
@@ -6,10 +6,6 @@ created: 2026-04-06
|
||||
tags: [studio, editor, scope-guides, structural-anchors, semantic-read, frontend-contract]
|
||||
---
|
||||
|
||||
## Historical Status
|
||||
|
||||
This lesson documents the removed embedded Studio editor gutter and structural-anchor flow. Keep it as historical context only; do not treat it as current product guidance after `DEC-0031`.
|
||||
|
||||
## Context
|
||||
|
||||
The Studio editor already exposed structural guides in the gutter, but the old behavior mixed two different concerns:
|
||||
|
||||
-4
@@ -6,10 +6,6 @@ created: 2026-04-06
|
||||
tags: [studio, editor, inline-hints, lsp, compiler, pbs, type-inference, rendering]
|
||||
---
|
||||
|
||||
## Historical Status
|
||||
|
||||
This lesson documents the removed embedded Studio inline-hint path. Keep it as historical context only; do not treat it as current product guidance after `DEC-0031`.
|
||||
|
||||
## Context
|
||||
|
||||
The repository needed inline type hints for inferred PBS `let` bindings, but the real architectural issue was broader than one PBS feature.
|
||||
|
||||
-4
@@ -6,10 +6,6 @@ created: 2026-04-04
|
||||
tags: [studio, editor, indentation, tabs, setup, dot-studio, project-creation, gitignore]
|
||||
---
|
||||
|
||||
## Historical Status
|
||||
|
||||
This lesson documents indentation policy choices made for the removed embedded Studio editor. Keep it as historical context only; do not treat it as current product guidance after `DEC-0031`.
|
||||
|
||||
## Context
|
||||
|
||||
The Studio editor exposed an indentation chip in the status bar, but that chip was driven by file-content heuristics rather than by a stable editor policy.
|
||||
|
||||
-4
@@ -6,10 +6,6 @@ created: 2026-04-06
|
||||
tags: [studio, editor, frontend, write, save, vfs, lsp, access-policy, persistence]
|
||||
---
|
||||
|
||||
## Historical Status
|
||||
|
||||
This lesson documents the removed embedded Studio frontend edit/save wave. Keep it as historical context only; do not treat it as current product guidance after `DEC-0031`.
|
||||
|
||||
## Context
|
||||
|
||||
The first editor write wave had deliberately kept frontend files hard `read-only` while semantic-read support shipped through `prometeu-lsp`.
|
||||
|
||||
-60
@@ -1,60 +0,0 @@
|
||||
---
|
||||
id: LSN-0046
|
||||
ticket: studio-scene-pack-runtime-binary-contract
|
||||
title: Canonical scene owns editorial truth while pack stays request-driven
|
||||
created: 2026-05-01
|
||||
tags: [studio, packer, runtime, scene, tiled, import-export]
|
||||
---
|
||||
|
||||
## Context
|
||||
|
||||
`Scene Bank` needed a stable path from Studio authoring to runtime `SCENE` bytes without letting editor-specific files become the product contract. The first accepted direction closed the `studio -> packer -> runtime` boundary correctly, but the initial editorial implementation still treated `TMX` as if it were the unit of truth. That created friction because the supported external editor (`Tiled`) was being modeled around the wrong ownership boundary.
|
||||
|
||||
The final state of `DSC-0030` keeps the publication contract from `DEC-0029` and replaces only the mistaken editorial model through `DEC-0030`.
|
||||
|
||||
## Key Decisions
|
||||
|
||||
### Request-driven publication boundary
|
||||
|
||||
**What:** Publication of `Scene Bank` assets uses a canonical `studio -> packer` request that packer compiles directly into runtime `SCENE` payload bytes.
|
||||
|
||||
**Why:** This keeps `prometeu-packer` isolated from `TMX`, `TSX`, and any future editor-specific format. It also preserves runtime ownership of `glyph_asset_id -> slot` resolution instead of leaking runtime operational details back into Studio.
|
||||
|
||||
**Trade-offs:** Studio must project editorial state into a separate publication representation, so the system carries more than one representation of the same scene on purpose.
|
||||
|
||||
### Studio-owned canonical scene entity
|
||||
|
||||
**What:** The primary editorial source of truth is a Studio-native canonical scene entity, not `TMX`, not `TSX`, and not the pack request itself.
|
||||
|
||||
**Why:** The external editor format should remain replaceable. If `TMX` becomes the canonical model, Studio evolution gets trapped by Tiled semantics and every future interoperability choice becomes harder.
|
||||
|
||||
**Trade-offs:** Studio now owns more editorial modeling and validation logic internally instead of delegating shape decisions to external files.
|
||||
|
||||
### Tiled as compatibility, not authority
|
||||
|
||||
**What:** `TMX (Tiled)` scene import/export and `TSX (Tiled)` glyph export are compatibility workflows around the canonical scene entity.
|
||||
|
||||
**Why:** This preserves interoperability with the supported wave-1 tooling while making it explicit that external files are adapters, not authoritative persistence.
|
||||
|
||||
**Trade-offs:** Import must reject unsupported structural mutations instead of silently absorbing arbitrary external edits.
|
||||
|
||||
## Patterns and Algorithms
|
||||
|
||||
- Keep three representations distinct: Studio canonical scene entity, canonical pack request, and runtime `SCENE` bytes.
|
||||
- Validate canonical scene integrity in `Analyse` and/or `Pack`, not by treating editor files as the lifecycle owner.
|
||||
- Use import compatibility checks before mutating canonical state, and fail without partial rewrite on unsupported structural divergence.
|
||||
- Keep packer request-driven so tests can prove scene packing succeeds without parsing `TMX` or `TSX`.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
- Do not let a supported editor file become a hidden canonical model just because it is easy to serialize.
|
||||
- Do not collapse the canonical Studio scene entity into the pack request; publication shape and editorial shape serve different purposes.
|
||||
- Do not reintroduce `TMX per layer` or any equivalent workflow that makes scene cohesion secondary.
|
||||
- Do not relax the packer boundary by teaching packer to read editor-native files directly.
|
||||
|
||||
## Takeaways
|
||||
|
||||
- Scene editorial truth belongs to Studio.
|
||||
- Scene publication truth belongs to the canonical request.
|
||||
- Runtime operational truth belongs to the runtime `SCENE` contract and slot resolution logic.
|
||||
- Import/export support should stay replaceable as long as it materializes the same request boundary.
|
||||
-84
@@ -1,84 +0,0 @@
|
||||
---
|
||||
id: LSN-0049
|
||||
discussion: DSC-0031
|
||||
title: Remove the embedded editor stack before rebuilding code workflows
|
||||
status: done
|
||||
created: 2026-05-08
|
||||
updated: 2026-05-08
|
||||
tags: [studio, editor, cleanup, lsp, vfs, shell, migration]
|
||||
---
|
||||
|
||||
## Original Problem
|
||||
|
||||
Studio still carried an embedded `Code Editor` workspace together with a `prometeu-vfs` boundary and a legacy `prometeu-lsp` path that existed only to support that editor.
|
||||
|
||||
That stack had become architectural drag:
|
||||
|
||||
- the JavaFX editor was no longer a product direction;
|
||||
- the legacy `VFS` and `LSP` contracts were shaped around that editor model;
|
||||
- shell state and project session still persisted editor-specific assumptions;
|
||||
- and keeping those surfaces alive made any future code-backend redesign harder.
|
||||
|
||||
## Consolidated Decision
|
||||
|
||||
`DEC-0031` locked a full cleanup of the embedded editor stack.
|
||||
|
||||
The repository removed:
|
||||
|
||||
- the `Code Editor` workspace as an active Studio surface;
|
||||
- the legacy editor-owned `VFS` boundary;
|
||||
- the legacy editor-era `LSP` assumptions;
|
||||
- shell/session/state dependencies that expected the editor to exist;
|
||||
- and normative references that treated that stack as current architecture.
|
||||
|
||||
The decision also locked an equally important limit:
|
||||
|
||||
- this cleanup was not allowed to define the future code backend;
|
||||
- a replacement LSP or automation boundary had to come later, in separate discussion.
|
||||
|
||||
## Final Result
|
||||
|
||||
The Studio shell now opens with surviving workspaces only: `Assets`, `Debug`, and `Shipper`.
|
||||
|
||||
Project-local state no longer persists editor restoration or editor layout fields, while still loading old state safely and falling back to surviving shell behavior.
|
||||
|
||||
The cleanup also succeeded without freezing the repository in a "no LSP ever again" state.
|
||||
Later work in `DSC-0032` introduced a new project-scoped LSP boundary as separate architecture, which is exactly what `DEC-0031` required: remove the old stack first, then rebuild cleanly under a new decision.
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
The cleanup landed in three coordinated waves:
|
||||
|
||||
1. shell/session/state cleanup removed `WorkspaceId.EDITOR`, editor restoration state, and editor-owned session composition;
|
||||
2. the old editor-era `VFS` and `LSP` stack stopped being the active Studio foundation;
|
||||
3. specs, tests, and historical references were revised so the removed editor stack no longer appears as current product guidance.
|
||||
|
||||
This produced an important boundary reset:
|
||||
|
||||
- Studio remains responsible for launcher, assets, shipper, debug, build, and run orchestration;
|
||||
- code-editing architecture is no longer smuggled in through dead UI or legacy session seams.
|
||||
|
||||
## Example
|
||||
|
||||
Before the cleanup, an old `.studio/state.json` could still restore editor-centric state.
|
||||
|
||||
After the cleanup, the same persisted payload is treated defensively:
|
||||
|
||||
- old editor fields are ignored;
|
||||
- the selected workspace falls back safely when `EDITOR` is present;
|
||||
- the project reopens into a surviving workspace instead of reviving a dead surface.
|
||||
|
||||
## Pitfalls and Anti-Patterns
|
||||
|
||||
- Do not preserve dead editor-era boundaries "for compatibility" when the product direction has already moved.
|
||||
- Do not treat naming continuity as architectural continuity. A later `prometeu-lsp` module can be valid if it comes from a new discussion and a new boundary.
|
||||
- Do not leave project-local state as an accidental migration trap; persisted legacy fields must degrade safely.
|
||||
|
||||
## References
|
||||
|
||||
- `AGD-0034` Limpeza completa do Workspace Editor do Studio e remoção dos acoplamentos legados
|
||||
- `DEC-0031` Limpeza completa do Workspace Editor do Studio e remoção dos acoplamentos legados
|
||||
- `PLN-0062` Shell Session and State Cleanup After Editor Removal
|
||||
- `PLN-0063` Legacy LSP and VFS Module Removal with Runtime Preservation
|
||||
- `PLN-0064` Normative Test and Lesson Cleanup for Editor Stack Removal
|
||||
- `LSN-0047` Project-scoped LSP boundary and protocol containment
|
||||
-106
@@ -1,106 +0,0 @@
|
||||
---
|
||||
id: LSN-0047
|
||||
ticket: studio-new-lsp-api-and-v1-boundary
|
||||
title: Project-Scoped LSP Boundary and Protocol Containment
|
||||
created: 2026-05-07
|
||||
tags: [studio, lsp, vscode, protocol, api, boundary, compiler]
|
||||
---
|
||||
|
||||
## Context
|
||||
|
||||
After the legacy embedded editor stack was removed, Prometeu needed a new LSP baseline without repeating the old mistake of collapsing protocol, session lifecycle, host UI, and semantic ownership into one module.
|
||||
|
||||
The main architectural pressure came from two facts:
|
||||
|
||||
- the VS Code extension already existed as a real LSP client over TCP,
|
||||
- and the compiler already existed as the canonical owner of semantic behavior.
|
||||
|
||||
That meant the missing piece was not "add editor features first". The missing piece was a strict boundary that let the Studio host, the protocol adapter, and the compiler evolve without contaminating each other.
|
||||
|
||||
## Key Decisions
|
||||
|
||||
### Keep `lsp-api` Minimal and Internal
|
||||
|
||||
**What:**
|
||||
`lsp-api` became a narrow internal Studio boundary, starting with project-scoped lifecycle operations such as boot and shutdown instead of mirroring the LSP protocol.
|
||||
|
||||
**Why:**
|
||||
The Studio needed a reusable internal service boundary, not a second copy of the external wire protocol.
|
||||
|
||||
**Trade-offs:**
|
||||
The API starts intentionally small and may need explicit growth later, but that is safer than locking protocol-shaped DTOs into the internal architecture too early.
|
||||
|
||||
### Contain `LSP4J` and Protocol DTOs Inside `lsp-v1`
|
||||
|
||||
**What:**
|
||||
`lsp-v1` became the only concrete protocol adapter and the only module allowed to depend on `LSP4J`.
|
||||
|
||||
**Why:**
|
||||
Protocol libraries are integration details. If they leak outward, the host architecture starts depending on the current transport and implementation framework instead of on stable domain boundaries.
|
||||
|
||||
**Trade-offs:**
|
||||
This forces explicit mapping layers and a little more ceremony, but it keeps protocol churn from infecting the rest of the codebase.
|
||||
|
||||
### Make the Server Lifecycle Project-Scoped
|
||||
|
||||
**What:**
|
||||
The LSP server now belongs to project open/close lifecycle instead of global Studio process startup.
|
||||
|
||||
**Why:**
|
||||
Project scope is the real ownership boundary for source roots, compiler context, and editor-facing behavior.
|
||||
|
||||
**Trade-offs:**
|
||||
Lifecycle wiring is slightly more involved, but resource ownership becomes predictable and multi-project behavior stays sane.
|
||||
|
||||
### Keep `compiler` as Semantic Owner Even in a Dumb First Wave
|
||||
|
||||
**What:**
|
||||
The baseline server remained intentionally simple in behavior, but its request handling already routes through compiler-facing bridge seams.
|
||||
|
||||
**Why:**
|
||||
A "temporary mock" becomes dangerous when it also becomes the architecture. The repository needed a structurally correct baseline before adding semantic depth.
|
||||
|
||||
**Trade-offs:**
|
||||
Wave 1 delivered less feature richness, but it created a safe foundation for later layering.
|
||||
|
||||
## Patterns and Algorithms
|
||||
|
||||
### Pattern: Internal Boundary, External Adapter
|
||||
|
||||
The stable split is:
|
||||
|
||||
1. `lsp-api` exposes internal lifecycle operations,
|
||||
2. `lsp-v1` speaks protocol and transport,
|
||||
3. `compiler` owns semantic and analysis behavior,
|
||||
4. the VS Code extension remains an ordinary external LSP client.
|
||||
|
||||
### Pattern: Build the Seams Before the Features
|
||||
|
||||
The server can begin "dumb" in capability coverage if:
|
||||
|
||||
- the lifecycle boundary is already correct,
|
||||
- compiler access already flows through explicit bridge services,
|
||||
- and protocol containment is already enforced.
|
||||
|
||||
That sequence is safer than shipping richer features on top of a blurred module boundary.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
- Do not let `lsp-api` grow into a shadow copy of the LSP protocol.
|
||||
- Do not import `LSP4J` outside `lsp-v1`, even for convenience.
|
||||
- Do not move semantic ownership into the protocol adapter just because the adapter is the caller-facing layer.
|
||||
- Do not boot a global server for the entire Studio process when the actual ownership boundary is the project session.
|
||||
- Do not treat a connectivity mock as an acceptable long-term module shape.
|
||||
|
||||
## References
|
||||
|
||||
- `DEC-0032` Boundary normativo entre lsp-api, lsp-v1 e a extensao VS Code
|
||||
- `PLN-0065` LSP Boundary and Module Scaffolding
|
||||
- `PLN-0066` Project-Scoped LSP Server Lifecycle in Studio
|
||||
- `PLN-0067` Compiler-Backed Dumb LSP Server Baseline
|
||||
|
||||
## Takeaways
|
||||
|
||||
- Protocol adapters should stay narrow and concrete; internal Studio boundaries should stay protocol-agnostic.
|
||||
- Project-scoped lifecycle is the correct owner for the LSP server.
|
||||
- A dumb first wave is acceptable only when the architecture is already correct.
|
||||
-93
@@ -1,93 +0,0 @@
|
||||
---
|
||||
id: LSN-0050
|
||||
discussion: DSC-0033
|
||||
title: Frontend-owned visual themes with structured contract and host adapters
|
||||
status: done
|
||||
created: 2026-05-08
|
||||
updated: 2026-05-08
|
||||
tags: [compiler, compiler-general, frontend, presentation, theming, lsp, vscode, pbs]
|
||||
---
|
||||
|
||||
## Original Problem
|
||||
|
||||
Frontend semantic presentation was frontend-owned in principle, but not in a form that could survive multiple hosts.
|
||||
|
||||
PBS still depended on authored semantic CSS as the practical visual source of truth, which created three problems:
|
||||
|
||||
- CSS was a host-facing artifact rather than a compiler-general contract;
|
||||
- VS Code could only approximate frontend intent through manual translation;
|
||||
- every host risked drifting away from the frontend's real visual identity.
|
||||
|
||||
## Consolidated Decision
|
||||
|
||||
`DEC-0033` replaced authored host-consumed semantic CSS with a structured frontend-owned visual contract.
|
||||
|
||||
That contract now owns:
|
||||
|
||||
- the frontend theme list;
|
||||
- the default active theme;
|
||||
- token-scoped styles;
|
||||
- editor-surface palette data;
|
||||
- and host projections used to translate frontend semantic keys into host-native semantic selectors.
|
||||
|
||||
Hosts are adapters over this data.
|
||||
They do not own frontend visual truth.
|
||||
|
||||
## Final Result
|
||||
|
||||
The canonical visual source now lives in `FrontendSemanticPresentationSpec`, with concrete PBS theme data and host projections authored in structured Java models instead of CSS resources.
|
||||
|
||||
The new LSP path transports:
|
||||
|
||||
- frontend semantic keys;
|
||||
- visual themes;
|
||||
- active theme identity;
|
||||
- and host projection metadata.
|
||||
|
||||
The VS Code extension consumes that payload and writes semantic token and workbench color customizations dynamically, which means routine frontend color changes no longer require hand-edited extension theme tables.
|
||||
|
||||
The old PBS semantic CSS still exists only as migration residue and derivative compatibility material.
|
||||
It is no longer the authored canonical contract.
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
The decision was realized across four layers:
|
||||
|
||||
1. compiler/frontend metadata grew a structured presentation contract;
|
||||
2. PBS migrated its theme definition into that contract;
|
||||
3. the LSP description path started exporting visual themes and host projections;
|
||||
4. the VS Code extension became a mechanical translator of the contract at runtime.
|
||||
|
||||
This also clarified the relationship between `DSC-0033` and `DSC-0034`:
|
||||
|
||||
- `DSC-0033` established the structured theme contract and CSS retirement;
|
||||
- `DSC-0034` established that host projections belong in the frontend contract rather than in the host.
|
||||
|
||||
Together they define the current highlight pipeline.
|
||||
|
||||
## Example
|
||||
|
||||
For PBS today:
|
||||
|
||||
- the frontend publishes semantic keys such as `pbs-keyword` and `pbs-service`;
|
||||
- the same frontend publishes the canonical theme colors and emphasis flags for those keys;
|
||||
- the LSP sends the theme plus a `vscode` host projection;
|
||||
- the VS Code extension applies both the canonical semantic selectors and the projected host selectors.
|
||||
|
||||
This is why a color change in PBS theme data can flow to VS Code without a new curated palette in `package.json`.
|
||||
|
||||
## Pitfalls and Anti-Patterns
|
||||
|
||||
- Do not reintroduce CSS as a silent second source of truth.
|
||||
- Do not move frontend theme authorship into host adapters just because one host has capability gaps.
|
||||
- Do not collapse frontend semantic identity into generic host categories during transport; host categories are projections, not the canonical vocabulary.
|
||||
|
||||
## References
|
||||
|
||||
- `AGD-0036` Frontend Visual Theme Spec and Retirement of Host-Consumed Semantic CSS
|
||||
- `DEC-0033` Frontend-owned visual theme spec as canonical presentation contract
|
||||
- `PLN-0068` Frontend Visual Contract and PBS Migration
|
||||
- `PLN-0069` LSP Visual Theme Transport and Theme Selection Propagation
|
||||
- `PLN-0070` Studio Visual Theme Adapter and CSS Retirement
|
||||
- `PLN-0071` VS Code Dynamic Theme Translation Adapter
|
||||
- `LSN-0048` Frontend-owned semantic vocabularies with declarative host projection
|
||||
-90
@@ -1,90 +0,0 @@
|
||||
---
|
||||
id: LSN-0048
|
||||
ticket: frontend-semantic-host-projection-flexibility
|
||||
title: Frontend-Owned Semantic Vocabularies with Declarative Host Projection
|
||||
created: 2026-05-07
|
||||
tags: [compiler, compiler-general, frontend, semantics, vscode, host-projection, lsp]
|
||||
---
|
||||
|
||||
## Context
|
||||
|
||||
Prometeu had already established that frontend-owned visual themes should remain canonical.
|
||||
The remaining semantic risk was subtler: VS Code prefers host-shaped token categories, and that pressure could easily turn the host taxonomy into the real source of semantic truth.
|
||||
|
||||
This discussion closed that gap by making semantic ownership explicit:
|
||||
|
||||
- the frontend keeps the canonical semantic vocabulary,
|
||||
- host adaptation is additional metadata,
|
||||
- and the adapter translates mechanically instead of inventing semantic policy.
|
||||
|
||||
## Key Decisions
|
||||
|
||||
### Keep Frontend Semantic Keys Canonical
|
||||
|
||||
**What:**
|
||||
Each frontend remains free to define and evolve its own semantic keys, and those keys stay canonical across the stack.
|
||||
|
||||
**Why:**
|
||||
Semantic meaning belongs to the language frontend, not to a single host's preferred category system.
|
||||
|
||||
**Trade-offs:**
|
||||
Adapters must handle more varied vocabularies, but that is the correct cost of preserving frontend ownership.
|
||||
|
||||
### Add Declarative Host Projection Instead of Global Normalization
|
||||
|
||||
**What:**
|
||||
The frontend now authors host projection metadata describing how canonical semantic keys should map into VS Code token types, modifiers, and fallbacks.
|
||||
|
||||
**Why:**
|
||||
Hosts still need a practical adaptation path, but that adaptation should be explicit projection data rather than a hidden normalization rule.
|
||||
|
||||
**Trade-offs:**
|
||||
The contract grows an extra layer, but it stays declarative and prevents semantic meaning from being reauthored inside the adapter.
|
||||
|
||||
### Keep LSP and the Extension Mechanical
|
||||
|
||||
**What:**
|
||||
LSP transports canonical keys plus projection metadata, and the VS Code extension consumes both mechanically.
|
||||
|
||||
**Why:**
|
||||
If either layer starts hand-mapping semantic meaning, the host stack becomes the de facto author of language semantics.
|
||||
|
||||
**Trade-offs:**
|
||||
The transport and adapter need clearer model shapes, but their responsibilities stay cleaner and more reusable.
|
||||
|
||||
## Patterns and Algorithms
|
||||
|
||||
### Pattern: Canonical Vocabulary Plus Per-Host Projection
|
||||
|
||||
The stable flow is:
|
||||
|
||||
1. frontend defines semantic keys,
|
||||
2. frontend defines host projections for those keys,
|
||||
3. LSP transports canonical keys and projection data together,
|
||||
4. the host adapter applies the projection without reinterpretation.
|
||||
|
||||
### Pattern: Mechanical Translation with Explicit Fallbacks
|
||||
|
||||
Projection metadata should say not only the preferred host token type, but also the fallback when the host cannot represent the frontend key exactly.
|
||||
That keeps fallback behavior visible and reviewable instead of implicit in adapter code.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
- Do not collapse frontend semantic keys into a repository-wide host taxonomy.
|
||||
- Do not hide semantic policy inside the VS Code extension just because the platform has its own token vocabulary.
|
||||
- Do not transport only host-shaped token types and discard canonical frontend identity.
|
||||
- Do not confuse projection metadata with the canonical semantic contract itself.
|
||||
|
||||
## References
|
||||
|
||||
- `DEC-0034` Frontend semantic vocabularies remain canonical and hosts consume declarative projections
|
||||
- `PLN-0072` Frontend Semantic Host Projection Contract
|
||||
- `PLN-0073` LSP Semantic Host Projection Transport
|
||||
- `PLN-0074` VS Code Semantic Host Projection Adapter
|
||||
- `DEC-0033` Frontend-owned visual theme spec as canonical presentation contract
|
||||
|
||||
## Takeaways
|
||||
|
||||
- Semantic ownership stays with the frontend even when the host prefers a different taxonomy.
|
||||
- Host projection is the right adaptation mechanism; global normalization is not.
|
||||
- LSP and host adapters stay healthier when they translate declaratively instead of authoring semantic meaning.
|
||||
-78
@@ -1,78 +0,0 @@
|
||||
---
|
||||
id: LSN-0051
|
||||
ticket: pbs-lsp-editor-assistance-wave-1
|
||||
title: Compiler-Backed Editor Assistance for PBS
|
||||
created: 2026-05-08
|
||||
tags: [studio, lsp, vscode, compiler, compiler-pbs, editor, completion, hover, signature-help]
|
||||
---
|
||||
|
||||
## Original Problem
|
||||
|
||||
PBS editing in VS Code already had basic diagnostics and frontend-owned semantic highlighting, but it still lacked the minimum assistance expected during everyday code authoring:
|
||||
|
||||
1. no `completion`;
|
||||
2. placeholder-only `hover`;
|
||||
3. no `signature help`.
|
||||
|
||||
Without those features, the editor behaved more like a colored diagnostic viewer than a practical PBS authoring surface.
|
||||
|
||||
## Consolidated Decision
|
||||
|
||||
Wave 1 of PBS editor assistance is `completion`, symbol-resolved `hover`, and `signature help`.
|
||||
|
||||
These features must be built on one compiler-backed editorial resolution surface. The VS Code extension remains a thin LSP client, and the LSP layer projects compiler knowledge into protocol responses instead of inventing editor-local semantic tables.
|
||||
|
||||
The shared surface must be able to describe:
|
||||
|
||||
1. symbol identity and kind;
|
||||
2. module or origin when relevant;
|
||||
3. signature or shape when applicable;
|
||||
4. available members for recognized receivers;
|
||||
5. optional documentation when available.
|
||||
|
||||
The wave explicitly excludes formatter work, robust automatic indentation, `go to definition`, `references`, `rename`, quick fixes, broad code actions, and the PBS authored-documentation syntax.
|
||||
|
||||
## Final Implementation Shape
|
||||
|
||||
The work was decomposed into three execution fronts:
|
||||
|
||||
1. `compiler/pbs` owns the editorial resolution model for symbols, members, signatures, and optional documentation.
|
||||
2. `studio/lsp` exposes completion, hover, and signature-help request handling over that model and advertises the corresponding LSP capabilities.
|
||||
3. `tools/vscode-extension` consumes the LSP responses as a thin client and must not add hardcoded PBS semantic tables for members, stdlib, or signatures.
|
||||
|
||||
This split keeps semantic truth in the compiler, protocol ownership in the LSP server, and UI integration in the extension.
|
||||
|
||||
## Examples
|
||||
|
||||
Completion should cover at least:
|
||||
|
||||
1. language keywords;
|
||||
2. local names in scope;
|
||||
3. relevant imported or public symbols;
|
||||
4. members after `.` for recognized surfaces such as services, hosts, builtin types, structs, and related callable surfaces.
|
||||
|
||||
Hover should include, when available:
|
||||
|
||||
1. symbol kind;
|
||||
2. signature;
|
||||
3. module or origin;
|
||||
4. basic type or shape.
|
||||
|
||||
Signature help should cover function, method, and constructor calls with active signature and active parameter information.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
Do not implement completion, hover, and signature help as three independent semantic paths. That duplicates parser, linking, stdlib, and member knowledge, then makes the editor inconsistent.
|
||||
|
||||
Do not patch around missing server behavior in the VS Code extension. Client-local tables for PBS members, stdlib, or signatures turn the extension into a second semantic engine.
|
||||
|
||||
Do not block this wave on authored PBS documentation syntax. The editorial model should have an optional documentation slot, but the language feature for authoring that documentation belongs to a separate discussion.
|
||||
|
||||
Do not broaden this wave into general IDE support. Definition, references, rename, formatter, quick fixes, and broad code actions are later work.
|
||||
|
||||
## References
|
||||
|
||||
- `DEC-0035` captured the normative decision for wave 1.
|
||||
- `PLN-0075` covered the compiler-side editorial resolution surface.
|
||||
- `PLN-0076` covered LSP projection and protocol capabilities.
|
||||
- `PLN-0077` covered VS Code thin-client consumption and validation.
|
||||
-104
@@ -1,104 +0,0 @@
|
||||
---
|
||||
id: LSN-0057
|
||||
ticket: pbs-symbol-documentation-and-hover-markdown
|
||||
title: Compiler-Owned PBS Doc Markdown for Editor Assistance
|
||||
created: 2026-07-15
|
||||
tags: [compiler, compiler-pbs, studio, lsp, vscode, editor, hover, documentation, markdown]
|
||||
---
|
||||
|
||||
## Original Problem
|
||||
|
||||
PBS editor assistance had compiler-backed completion, hover, and signature-help surfaces, but it did not yet have a canonical authored documentation model for named API symbols.
|
||||
|
||||
Without that model, hover could show mechanical facts such as kind, signature, origin, and type shape, but it could not reliably explain intent, parameter meaning, semantic constraints, or usage notes. Any editor-side solution would have risked reparsing PBS source or inventing a second documentation binding model outside the compiler.
|
||||
|
||||
## Consolidated Decision
|
||||
|
||||
PBS symbol documentation is authored with a reserved compiler-recognized `Doc` attribute:
|
||||
|
||||
```pbs
|
||||
[Doc(markdown = """
|
||||
Draws a sprite.
|
||||
|
||||
- `x`: screen x coordinate
|
||||
- `y`: screen y coordinate
|
||||
""")]
|
||||
```
|
||||
|
||||
The v1 shape is intentionally narrow:
|
||||
|
||||
1. `Doc` has exactly one required named argument, `markdown`.
|
||||
2. The `markdown` argument uses a triple-quoted documentation text block.
|
||||
3. The text block is documentation-only metadata, not a general runtime multiline string literal.
|
||||
4. `[Doc]` attaches to the following declaration using the normal PBS attribute association rule.
|
||||
5. Attribute order is semantically irrelevant.
|
||||
6. Parameters do not receive `[Doc]` in v1; parameter notes live inside the owning declaration's Markdown.
|
||||
7. Duplicate `Doc`, missing `markdown`, extra arguments, aliases, positional arguments, empty normalized payloads, and invalid targets are semantic errors.
|
||||
|
||||
The compiler owns documentation resolution. LSP and editor consumers receive normalized compiler metadata; they must not reparse PBS source to discover documentation.
|
||||
|
||||
## Final Implementation Shape
|
||||
|
||||
The work landed as a staged compiler-to-editor pipeline:
|
||||
|
||||
1. PBS specs define the syntax, static semantics, AST shape, diagnostics, and stdlib documentation policy for `[Doc(markdown = """...""")]`.
|
||||
2. The PBS lexer recognizes triple-quoted documentation text blocks without changing ordinary string literal behavior.
|
||||
3. The parser and AST preserve documentation text block payloads and spans as structured attribute values.
|
||||
4. A shared normalizer removes incidental surrounding blank lines and common indentation while preserving Markdown content and internal line breaks.
|
||||
5. Semantic validation reserves `Doc` and enforces the single canonical v1 shape.
|
||||
6. Normalized Markdown is attached to resolved PBS semantic symbols as structured documentation metadata.
|
||||
7. PBS editorial and LSP surfaces transport that metadata without source reparsing.
|
||||
8. Hover composition includes the normalized Markdown while preserving existing fallback behavior for undocumented symbols.
|
||||
9. Stdlib, SDK, and interface declarations use the same authored documentation surface.
|
||||
10. Runtime-facing artifacts remain unchanged by documentation metadata.
|
||||
|
||||
This preserves a clean boundary: PBS source authors write documentation in the language, the compiler resolves it, LSP transports it, and editors render it.
|
||||
|
||||
## Examples
|
||||
|
||||
Valid documentation belongs on named API declarations that introduce semantic symbols and can carry attributes, such as functions, methods, services, hosts, interface declarations, and repository-owned stdlib or SDK declarations.
|
||||
|
||||
Parameter documentation is written inside the callable's Markdown:
|
||||
|
||||
```pbs
|
||||
[Doc(markdown = """
|
||||
Fills a rectangle.
|
||||
|
||||
- `x`: left edge in screen coordinates
|
||||
- `y`: top edge in screen coordinates
|
||||
- `width`: rectangle width in pixels
|
||||
- `height`: rectangle height in pixels
|
||||
""")]
|
||||
```
|
||||
|
||||
Invalid v1 forms include:
|
||||
|
||||
```pbs
|
||||
[Doc("Draws a sprite.")]
|
||||
[Doc(text = """Draws a sprite.""")]
|
||||
[Doc(markdown = """Draws a sprite.""", format = "markdown")]
|
||||
[Documentation(markdown = """Draws a sprite.""")]
|
||||
```
|
||||
|
||||
These are rejected because accepting aliases or positional shortcuts would immediately expand the language contract and make future compatibility harder.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
Do not treat `"""..."""` as a general PBS runtime string literal. Runtime multiline strings raise separate questions about type behavior, lowering, constant pools, equality, escaping, and artifact representation.
|
||||
|
||||
Do not let LSP or editor code rediscover documentation by scanning source. That duplicates language semantics outside the compiler and breaks as soon as imports, stdlib declarations, interface modules, or generated sources participate.
|
||||
|
||||
Do not attach `[Doc]` to parameters in v1. Parameter docs are authored inside the declaration Markdown so the compiler can keep one documentation payload per API symbol.
|
||||
|
||||
Do not reflow authored Markdown in a formatter or hover composer. The normalizer may remove incidental indentation, but it must preserve the author's Markdown content.
|
||||
|
||||
Do not lower documentation into runtime artifacts by default. Documentation is compile/editor metadata unless a future runtime or packaging decision explicitly changes that boundary.
|
||||
|
||||
## References
|
||||
|
||||
- `DEC-0039` captured the normative decision for PBS `Doc` markdown text blocks.
|
||||
- `PLN-0092` specified the PBS docs and diagnostics contract.
|
||||
- `PLN-0093` through `PLN-0099` implemented lexer, parser, normalization, semantics, symbol metadata, LSP exposure, and hover composition.
|
||||
- `PLN-0100` authored stdlib, SDK, and interface documentation.
|
||||
- `PLN-0101` protected runtime artifacts from documentation lowering.
|
||||
- `PLN-0102` closed end-to-end conformance coverage.
|
||||
-77
@@ -1,77 +0,0 @@
|
||||
---
|
||||
id: LSN-0052
|
||||
ticket: pbs-autocomplete-parameter-names
|
||||
title: Canonical callable parameter names through PBS editor assistance
|
||||
created: 2026-05-14
|
||||
tags: [compiler-pbs, studio, lsp, autocomplete, signature-help, stdlib]
|
||||
---
|
||||
|
||||
## Context
|
||||
|
||||
PBS editor assistance is compiler-backed. Completion, hover, and signature help should therefore expose the same callable shape that the compiler understands, not a parallel UI-only interpretation.
|
||||
|
||||
Before this discussion, some callable surfaces could reach editor assistance with synthesized labels such as `arg0` and `arg1`. Those labels made stdlib and method calls harder to use because they erased the public meaning of each argument exactly where the editor is meant to help.
|
||||
|
||||
`DEC-0036` made callable parameter names normative semantic metadata. `PLN-0078`, `PLN-0079`, and `PLN-0080` implemented that rule in specs, compiler semantics, and LSP regression coverage.
|
||||
|
||||
## Key Decisions
|
||||
|
||||
### Compiler semantics own parameter identity
|
||||
|
||||
**What:** Every user-visible PBS callable must expose a semantic parameter list with canonical name, zero-based order, type when known, and origin/source metadata.
|
||||
|
||||
**Why:** Completion, hover, signature help, diagnostics, and later documentation surfaces need one source of truth for callable shape. If each editor adapter invents labels independently, stdlib and host-backed API names drift from compiler truth.
|
||||
|
||||
**Trade-offs:** This makes stdlib and host-backed parameter names part of public API shape. Renaming them becomes compatibility-sensitive, but that cost is appropriate because these names are visible to users and tooling.
|
||||
|
||||
### Generated ordinal names stay internal
|
||||
|
||||
**What:** `arg0`, `arg1`, and equivalent ordinal placeholders must not appear in user-facing editor or LSP output.
|
||||
|
||||
**Why:** A generated ordinal name is not a public API name. Publishing it trains users and tests to rely on a placeholder that carries no semantic meaning.
|
||||
|
||||
**Trade-offs:** If a callable genuinely lacks a canonical parameter name, the boundary should represent the metadata as incomplete instead of fabricating a plausible-looking name. That can make missing metadata more visible, but it prevents false API contracts.
|
||||
|
||||
## Patterns and Algorithms
|
||||
|
||||
The compiler-side pattern is to keep parameter identity attached to callable symbols, not only to AST declarations used by direct hover paths.
|
||||
|
||||
The PBS semantic support model now carries `CallableParameter` records beside callable input types. This preserves:
|
||||
|
||||
- authored parameter name;
|
||||
- parameter order;
|
||||
- resolved type view;
|
||||
- source span as origin metadata.
|
||||
|
||||
Editor-facing formatting should then render signatures from those semantic parameters. Direct AST formatting and model-backed callable formatting should produce the same names for user-authored methods, stdlib services, host-backed declarations, and visible builtin/intrinsic method surfaces.
|
||||
|
||||
The LSP bridge should stay thin. It should map compiler editorial signatures into baseline completion, hover, and signature-help payloads without inventing names. The LSP4J mapper should preserve labels and parameter lists exactly as received from the baseline protocol model.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
- Do not fix missing parameter names with an editor-side rename table. That creates a second source of callable truth.
|
||||
- Do not treat stdlib parameter names as incidental implementation details. They are public API surface once completion and signature help expose them.
|
||||
- Do not use `argN` as a harmless fallback in tests. A passing test that expects `arg0` is a regression against the semantic contract.
|
||||
- Be careful when testing stdlib signatures that reference imported types. A test for parameter identity should not accidentally become a test for transitive type rendering unless that is the intended scope.
|
||||
|
||||
## Final Result
|
||||
|
||||
The implemented slice updated:
|
||||
|
||||
- PBS and compiler specs to define callable parameter identity and `argN` leak prevention;
|
||||
- PBS compiler semantic callable symbols to preserve structured parameter metadata;
|
||||
- PBS editorial formatting to render semantic names instead of synthesized ordinals;
|
||||
- LSP bridge and mapper tests to prove completion, hover, and signature help preserve semantic names.
|
||||
|
||||
The validating commits were:
|
||||
|
||||
- `4e00584` implements `PLN-0078`;
|
||||
- `eab763f` implements `PLN-0079`;
|
||||
- `db8c514` implements `PLN-0080`.
|
||||
|
||||
## Takeaways
|
||||
|
||||
- Parameter names are structural callable metadata, not documentation prose.
|
||||
- Editor assistance should consume compiler semantics rather than patching over missing names locally.
|
||||
- Public stdlib and host-backed parameter renames need compatibility review.
|
||||
- Missing semantic metadata is better exposed as incomplete than disguised as `arg0`.
|
||||
-108
@@ -1,108 +0,0 @@
|
||||
---
|
||||
id: LSN-0053
|
||||
ticket: studio-packer-rgba8888-asset-pipeline
|
||||
title: RGBA8888 Is the Canonical Studio and Packer Palette Contract
|
||||
created: 2026-07-14
|
||||
tags:
|
||||
- studio
|
||||
- packer
|
||||
- assets
|
||||
- glyph-bank
|
||||
- palette
|
||||
- rgba8888
|
||||
- runtime-alignment
|
||||
---
|
||||
|
||||
# RGBA8888 Is the Canonical Studio and Packer Palette Contract
|
||||
|
||||
### Original Problem
|
||||
|
||||
The runtime moved to RGBA8888 as the canonical logical color and framebuffer
|
||||
format, but Studio and packer still treated glyph-bank palettes as RGB565-era
|
||||
data. The old pipeline exposed `convertedRgb565`, preserved ARGB as normal
|
||||
projected metadata, reserved palette index `0` for transparency, flattened or
|
||||
discarded alpha semantics, and carried magenta color-key behavior as a hidden
|
||||
transparency shortcut.
|
||||
|
||||
That made the asset pipeline ambiguous. A glyph-bank asset could look valid to
|
||||
Studio while still carrying palette data that no longer matched the runtime
|
||||
contract.
|
||||
|
||||
### Consolidated Decision
|
||||
|
||||
`GLYPH/indexed_v1` remains the runtime-facing format name and keeps its
|
||||
indexed/paletized glyph-bank identity. The incompatible change is inside the
|
||||
palette contract:
|
||||
|
||||
1. `rgba8888` is the canonical authored, projected, and emitted palette field.
|
||||
2. RGBA8888 values are interpreted as `0xRRGGBBAA` in runtime channel order.
|
||||
3. Java `BufferedImage` ARGB values are input-only host API details and must be
|
||||
converted deliberately at the packer boundary.
|
||||
4. Palette index `0` is ordinary. Glyph palettes have 16 usable entries.
|
||||
5. Transparency, including partial transparency, is represented only by alpha.
|
||||
6. Magenta color-key behavior is not a normal Studio or packer feature.
|
||||
7. RGB565 is not a compatibility path for runtime-facing glyph-bank palettes.
|
||||
|
||||
### Implementation Result
|
||||
|
||||
The packer specs now define glyph-bank palette metadata with `rgba8888`, and
|
||||
the binary `GLYPH/indexed_v1` payload uses a `64 * 16 * 4 = 4096` byte palette
|
||||
block instead of the old `64 * 16 * 2 = 2048` byte RGB565 block.
|
||||
|
||||
The packer palette model now carries canonical RGBA8888 values. Image import
|
||||
converts Java ARGB pixels into runtime RGBA values before palette extraction,
|
||||
and palette identity includes alpha. This allows transparent and partially
|
||||
transparent colors to be distinct palette entries.
|
||||
|
||||
Packer read, detail, write, and cache paths now use `rgba8888` as the normal
|
||||
metadata contract. Emission writes palette bytes in `R`, `G`, `B`, `A` order
|
||||
and no longer emits a synthetic magenta entry for index `0`.
|
||||
|
||||
Tests and fixtures were updated to prove the new contract: RGBA channel order,
|
||||
alpha preservation, 16 usable colors, index `0` as ordinary data, magenta as
|
||||
ordinary color data, and 4096-byte palette blocks. Final validation confirmed
|
||||
that remaining stale-looking references are either normative "not supported"
|
||||
statements, historical discussion context, or explicitly out-of-scope generated
|
||||
project cache data.
|
||||
|
||||
### Practical Pattern
|
||||
|
||||
When a host API exposes color in a different layout than the runtime contract,
|
||||
name the boundary explicitly and keep the canonical field runtime-oriented.
|
||||
For this pipeline:
|
||||
|
||||
- accept host ARGB only at import/read time;
|
||||
- convert to RGBA8888 before storing palette metadata;
|
||||
- project `rgba8888` to Studio and packer clients;
|
||||
- emit RGBA bytes directly into `assets.pa`;
|
||||
- convert back to UI-friendly ARGB only inside presentation code.
|
||||
|
||||
This keeps tooling convenient without letting host representation leak into the
|
||||
runtime asset contract.
|
||||
|
||||
### Common Pitfalls and Anti-patterns
|
||||
|
||||
- Do not treat `originalArgb8888` as canonical pipeline data. ARGB can be a UI
|
||||
or image-input representation, but `rgba8888` owns the contract.
|
||||
- Do not reintroduce `convertedRgb565` as a normal projected field or emitted
|
||||
payload. RGB565 compatibility was deliberately rejected for this path.
|
||||
- Do not reserve palette index `0` for transparency. Alpha owns transparency.
|
||||
- Do not use magenta as a hidden color key. A magenta RGBA value is just color
|
||||
data unless an explicit future import tool defines a separate conversion.
|
||||
- Do not change scene `palette_id` semantics as part of color-format work.
|
||||
Scene records still reference glyph-bank palette indices.
|
||||
- Do not fold `DSC-0005` variable palette-count work into RGBA8888 cleanup.
|
||||
Palette encoding changed here; palette-count optimization remains separate.
|
||||
|
||||
### References
|
||||
|
||||
- `DEC-0037`: Studio and Packer RGBA8888 Asset Pipeline Contract.
|
||||
- `PLN-0081`: Packer and Studio spec propagation.
|
||||
- `PLN-0082`: Palette model and ARGB conversion boundary.
|
||||
- `PLN-0083`: Glyph payload emission and size accounting.
|
||||
- `PLN-0084`: Packer projections and workspace APIs.
|
||||
- `PLN-0085`: Tests, fixtures, and conformance updates.
|
||||
- `PLN-0086`: Final integration and residue removal.
|
||||
- `docs/specs/packer/3. Asset Declaration and Virtual Asset Contract Specification.md`.
|
||||
- `docs/specs/packer/4. Build Artifacts and Deterministic Packing Specification.md`.
|
||||
- `docs/specs/studio/4. Assets Workspace Specification.md`.
|
||||
-74
@@ -1,74 +0,0 @@
|
||||
---
|
||||
id: LSN-0055
|
||||
ticket: multi-frontend-provider-contract
|
||||
title: Static frontend providers before plugin architecture
|
||||
created: 2026-07-15
|
||||
tags: [compiler, compiler-general, studio, frontend, registry, multi-frontend]
|
||||
---
|
||||
|
||||
## Context
|
||||
|
||||
Prometeu needed a multi-frontend boundary without turning the compiler or Studio into a dynamic plugin platform. Before this work, shared code could ask the registry for frontend specs or phase services, and PBS was registered directly as the default language. That worked for a single frontend, but it made the next frontend harder because common code could still depend on PBS-specific construction details.
|
||||
|
||||
The durable ownership rule is now: common compiler and Studio code select a frontend by `languageId`, then consume a provider contract. PBS remains the first and only real provider, but it is no longer the shape of the shared abstraction.
|
||||
|
||||
## Key Decisions
|
||||
|
||||
### `FrontendProvider` is the common registration unit
|
||||
|
||||
**What:** Each registered frontend is represented by a `FrontendProvider` with:
|
||||
|
||||
- `specification()`, for the static frontend contract and `languageId`;
|
||||
- `compiler()`, for compiler-facing frontend execution;
|
||||
- `languageService()`, as an optional editor-facing capability.
|
||||
|
||||
**Why:** This groups the frontend identity, compiler entrypoint, and optional tooling capability without forcing every frontend to implement Studio/editor services.
|
||||
|
||||
**Trade-offs:** The provider is intentionally small. It does not solve dynamic discovery, plugin installation, external loading, or all future language-service APIs. Those are separate architectural decisions.
|
||||
|
||||
### Registration is explicit
|
||||
|
||||
**What:** Frontend registration is static and composition-root-owned. The application composition path bootstraps the default provider set, and the registry resolves providers by `languageId`.
|
||||
|
||||
**Why:** Explicit registration keeps dependencies visible and testable. It lets composition know about PBS while preventing common compiler and Studio consumers from directly constructing PBS services.
|
||||
|
||||
**Trade-offs:** Adding a new in-repository frontend still requires a code change in composition. That is acceptable because this decision optimizes for repository-internal multi-frontend readiness, not external plugin extensibility.
|
||||
|
||||
### PBS is a provider, not the shared model
|
||||
|
||||
**What:** PBS is wrapped by `PBSFrontendProvider`. Shared build and Studio consumers obtain frontend behavior through `FrontendRegistryService.require(languageId)` or provider-derived listings.
|
||||
|
||||
**Why:** PBS remains the correctness baseline, but it must not become the exclusive owner of compiler pipeline semantics.
|
||||
|
||||
**Trade-offs:** PBS-specific tests may still instantiate `PBSFrontendPhaseService` directly because they test PBS internals. Common modules should not.
|
||||
|
||||
## Patterns and Algorithms
|
||||
|
||||
Use this path for common compiler execution:
|
||||
|
||||
1. Resolve the project language from the manifest or default provider.
|
||||
2. Resolve `FrontendProvider` by `languageId`.
|
||||
3. Use `provider.specification()` for static metadata.
|
||||
4. Use `provider.compiler()` for frontend compilation.
|
||||
5. Use `provider.languageService()` only when a tooling consumer needs optional editor services.
|
||||
|
||||
Use this path for Studio language catalogs:
|
||||
|
||||
1. List providers from the registry.
|
||||
2. Derive templates from `provider.specification()`.
|
||||
3. Do not hardcode PBS templates in Studio catalog code.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
- Do not add reflection, classpath scanning, external JAR loading, or runtime plugin installation to solve repository-internal frontend registration.
|
||||
- Do not make `languageService()` mandatory. Compilation and editor assistance are separate capabilities.
|
||||
- Do not instantiate `PBSFrontendPhaseService` from common build, dependency, Studio, or app code.
|
||||
- Do not use PBS as a fallback for unknown `languageId`. Unknown languages must fail explicitly.
|
||||
- Do not move frontend semantic ownership into Studio just because Studio consumes provider metadata.
|
||||
|
||||
## Takeaways
|
||||
|
||||
- Static providers are enough to prepare for multiple in-repository frontends.
|
||||
- The registry boundary is provider-based, not PBS-based.
|
||||
- Composition may know which frontends exist; common consumers should only know `FrontendProvider`.
|
||||
- Optional editor capabilities keep compiler readiness independent from Studio feature depth.
|
||||
-88
@@ -1,88 +0,0 @@
|
||||
# Compile-first frontends with optional editorial capabilities
|
||||
|
||||
## Original Problem
|
||||
|
||||
Prometeu is moving from a PBS-centered compiler/editor stack toward a multi-frontend compiler. PBS already provides compilation plus rich editor assistance, so it was easy for shared code, LSP, or Studio consumers to assume that every frontend can provide diagnostics, semantic tokens, completion, hover, and signature help as one package.
|
||||
|
||||
That assumption makes future frontend adoption too expensive. A new frontend must be able to compile before it has a complete IDE experience.
|
||||
|
||||
## Consolidated Decision
|
||||
|
||||
The frontend contract is compile-first.
|
||||
|
||||
Every frontend must provide a compiler capability through `FrontendProvider.compiler()`. Editorial services are optional and live behind `FrontendProvider.languageService()`.
|
||||
|
||||
A frontend that can compile but has no language service is valid. Missing editor assistance must not block `analyze`, `compile`, `build`, backend lowering, bytecode emission, verification, or artifact writing.
|
||||
|
||||
LSP and Studio consumers must query editorial capability before invoking editor-specific behavior. Absence of a capability is a normal state, not a compiler failure.
|
||||
|
||||
## Final Implementation
|
||||
|
||||
The compiler pipeline spec now defines the provider boundary explicitly:
|
||||
|
||||
- `compiler()` is the only required executable frontend capability.
|
||||
- `languageService()` is optional.
|
||||
- editor capabilities such as completion, hover, definition, signature help, semantic tokens, formatting, rename, and code actions are optional unless a future accepted decision narrows the requirement.
|
||||
- absent editor capabilities have deterministic fallback behavior.
|
||||
- compiler diagnostics and editor diagnostics are separate ownership surfaces.
|
||||
|
||||
PBS keeps its rich editor assistance, but now exposes it through `PBSFrontendLanguageService`, returned by `PBSFrontendProvider.languageService()`.
|
||||
|
||||
The LSP bridge resolves the active `FrontendProvider` and checks for `languageService()` before using editor behavior. For now, PBS remains an adapter-specific implementation because the common language-service DTOs are not yet generalized. That is acceptable because the important boundary is already enforced: the LSP no longer assumes that compiler support implies editor support.
|
||||
|
||||
Conformance coverage now includes:
|
||||
|
||||
- a compile-only provider fixture with no language service;
|
||||
- LSP neutral responses when editor capability is absent;
|
||||
- PBS regression coverage for existing completion, hover, signature help, semantic tokens, and documentation behavior;
|
||||
- architecture tests preventing common modules from directly instantiating PBS editor support.
|
||||
|
||||
## Examples
|
||||
|
||||
A compile-only frontend should look like this at the provider boundary:
|
||||
|
||||
```java
|
||||
public final class ExampleFrontendProvider implements FrontendProvider {
|
||||
@Override
|
||||
public FrontendSpec specification() {
|
||||
return EXAMPLE_SPEC;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrontendPhaseService compiler() {
|
||||
return exampleCompiler;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
It does not need to override `languageService()`. The default empty optional is a valid frontend state.
|
||||
|
||||
An editor consumer should treat missing services as a normal fallback:
|
||||
|
||||
```java
|
||||
return provider.languageService()
|
||||
.filter(ExpectedLanguageService.class::isInstance)
|
||||
.map(ExpectedLanguageService.class::cast)
|
||||
.map(service -> service.completion(...))
|
||||
.orElseGet(List::of);
|
||||
```
|
||||
|
||||
## Pitfalls
|
||||
|
||||
Do not use PBS as the minimum frontend contract. PBS is the first rich frontend, not the definition of frontend validity.
|
||||
|
||||
Do not make editor diagnostics a prerequisite for compilation. Build/analyze diagnostics are compiler output; live editor diagnostics may reuse compiler results but have different latency, cancellation, overlay, and UX concerns.
|
||||
|
||||
Do not split the language service into many top-level interfaces before implementation pressure proves a real lifecycle or ownership boundary. The current contract intentionally keeps an aggregated optional language-service surface.
|
||||
|
||||
Do not call PBS editorial classes directly from common compiler, LSP, Studio, or app code. Go through `FrontendProvider.languageService()` and adapter-local capability checks.
|
||||
|
||||
## References
|
||||
|
||||
- Spec: `docs/specs/compiler/23. Compiler Pipeline Entry Points Specification.md`
|
||||
- Provider API: `prometeu-compiler/prometeu-frontend-api/src/main/java/p/studio/compiler/services/FrontendProvider.java`
|
||||
- PBS language service: `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/PBSFrontendLanguageService.java`
|
||||
- LSP bridge: `prometeu-lsp/prometeu-lsp-v1/src/main/java/p/studio/lsp/services/compiler/CompilerLanguageServiceBridge.java`
|
||||
- Conformance tests:
|
||||
- `prometeu-compiler/prometeu-build-pipeline/src/test/java/p/studio/compiler/specs/FrontendProviderBoundaryTest.java`
|
||||
- `prometeu-lsp/prometeu-lsp-v1/src/test/java/p/studio/lsp/services/compiler/CompilerLanguageServiceBridgeTest.java`
|
||||
-92
@@ -1,92 +0,0 @@
|
||||
---
|
||||
id: LSN-0058
|
||||
ticket: multi-frontend-remove-pbs-branches
|
||||
title: Generic Frontend Editorial Contract for LSP
|
||||
created: 2026-07-15
|
||||
tags: [compiler, compiler-general, compiler-pbs, studio, frontend, lsp, coupling, multi-frontend]
|
||||
---
|
||||
|
||||
## Original Problem
|
||||
|
||||
Prometeu was preparing for multiple compiler frontends while the LSP bridge still knew too much about PBS internals. The first framing was broad: remove explicit PBS checks from common code. After inspection, that was too blunt.
|
||||
|
||||
PBS was already mostly centered in `prometeu-frontend-pbs`. Defaults, templates, `.pbs` fixtures, VS Code language registration, semantic keys, and composition-root bootstrap were legitimate PBS references. The real architectural problem was narrower: common LSP code imported and called PBS-specific editorial types and services for semantic tokens, completion, hover, signature help, and semantic read preparation.
|
||||
|
||||
## Consolidated Decision
|
||||
|
||||
The common LSP/editorial path must consume frontend-provided editorial capabilities through generic contracts exposed by `prometeu-frontend-api`.
|
||||
|
||||
The provider contract remains stable:
|
||||
|
||||
1. `FrontendProvider.compiler()` is mandatory.
|
||||
2. `FrontendProvider.languageService()` is optional.
|
||||
3. Compile-only frontends are valid.
|
||||
4. Unknown `languageId` values fail explicitly.
|
||||
5. PBS may be the product default only when the user has not chosen a language.
|
||||
|
||||
PBS is not the shared editor model. PBS implements the generic contract from inside its frontend boundary.
|
||||
|
||||
## Final Implementation Shape
|
||||
|
||||
The implementation introduced generic frontend editorial DTOs and default methods in `FrontendLanguageService`:
|
||||
|
||||
1. `FrontendDocumentRequest`
|
||||
2. `FrontendEditorialContext`
|
||||
3. `FrontendCompletionCandidate`
|
||||
4. `FrontendHover`
|
||||
5. `FrontendSignatureHelp`
|
||||
6. `FrontendSignature`
|
||||
7. `FrontendSymbolKind`
|
||||
8. `FrontendDocumentation`
|
||||
|
||||
`CompilerLanguageServiceBridge` now resolves the selected provider and calls generic `FrontendLanguageService` methods for semantic tokens, completion, hover, and signature help.
|
||||
|
||||
PBS-specific analysis setup moved behind `PBSFrontendLanguageService.prepareEditorialContext(...)`. The bridge no longer imports `p.studio.compiler.pbs.*`, no longer knows `PbsAst.File`, and no longer calls `PBSFrontendPhaseService.semanticReadSurface(...)` directly.
|
||||
|
||||
An architectural test now protects the common LSP code from reintroducing PBS implementation imports.
|
||||
|
||||
## Examples
|
||||
|
||||
A frontend with no language service remains valid:
|
||||
|
||||
```java
|
||||
public final class CompileOnlyFrontendProvider implements FrontendProvider {
|
||||
@Override
|
||||
public FrontendSpec specification() {
|
||||
return SPEC;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrontendPhaseService compiler() {
|
||||
return compiler;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
An LSP consumer should resolve the selected provider, ask for `languageService()`, and fall back deterministically when editorial capability is absent.
|
||||
|
||||
PBS can still keep rich internal models such as `PbsEditorialResolvedSymbol`, but those models must be mapped to generic `FrontendHover`, `FrontendCompletionCandidate`, or `FrontendSignatureHelp` before common LSP consumes them.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
Do not remove legitimate PBS defaults just because they mention PBS. PBS remains the product default when the user has not chosen another language.
|
||||
|
||||
Do not use PBS as a fallback for unknown `languageId`. Unknown language identity is a configuration error and must fail explicitly.
|
||||
|
||||
Do not make editor assistance mandatory. Compilation and editor support are separate frontend capabilities.
|
||||
|
||||
Do not move frontend semantic ownership into LSP or Studio. The LSP bridge transports frontend-owned editorial results; it does not author language semantics.
|
||||
|
||||
Do not reintroduce PBS imports in common LSP code for convenience. If a capability needs PBS-specific state, create or extend a frontend-owned generic boundary and keep the PBS mapping inside `prometeu-frontend-pbs`.
|
||||
|
||||
## References
|
||||
|
||||
- `DEC-0042` locked the generic frontend editorial language-service contract.
|
||||
- `PLN-0111` introduced generic frontend editorial DTOs and defaults.
|
||||
- `PLN-0112` migrated semantic tokens.
|
||||
- `PLN-0113` migrated completion.
|
||||
- `PLN-0114` migrated hover and documentation.
|
||||
- `PLN-0115` migrated signature help.
|
||||
- `PLN-0116` removed PBS imports from common LSP and added boundary coverage.
|
||||
- Related lesson: `LSN-0055` Static frontend providers before plugin architecture.
|
||||
- Related lesson: `LSN-0056` Compile-first frontends with optional editorial capabilities.
|
||||
-98
@@ -1,98 +0,0 @@
|
||||
---
|
||||
id: LSN-0059
|
||||
ticket: multi-frontend-frontend-backend-contract
|
||||
title: Common IRBackend handoff and backend guardrails
|
||||
created: 2026-07-15
|
||||
tags: [compiler, compiler-general, compiler-pbs, ir, backend, multi-frontend]
|
||||
---
|
||||
|
||||
# Common IRBackend handoff and backend guardrails
|
||||
|
||||
## Context
|
||||
|
||||
The multi-frontend work needed a clear boundary between language-specific frontends and common backend stages.
|
||||
|
||||
The existing code was already close to the desired architecture: PBS parsing, AST construction, and semantic analysis lowered into `IRBackend`, while the backend consumed `IRBackend` and lowered it into `IRVM`. The risk was not a known broken dependency. The risk was that common backend behavior still looked PBS-owned in specs, names, and missing guardrails, which could invite future coupling when another frontend is introduced.
|
||||
|
||||
## Key Decisions
|
||||
|
||||
### `IRBackend` is the common executable handoff
|
||||
|
||||
**What:** `IRBackend` remains the normative frontend-to-backend executable handoff. Frontends emit it; common backend stages consume it.
|
||||
|
||||
**Why:** The existing model already provides a language-neutral executable contract with modules, callable identities, executable functions, instruction metadata, globals, synthetic functions, host calls, intrinsics, spans, and capabilities. Renaming or redesigning it without a concrete leak would add churn without improving the boundary.
|
||||
|
||||
**Trade-offs:** Keeping the name `IRBackend` means the architecture relies on documentation and tests to communicate its common role. That is acceptable because the name is already established and the guardrails now enforce the boundary.
|
||||
|
||||
### PBS owns lowering into `IRBackend`, not backend consumption of it
|
||||
|
||||
**What:** PBS specs describe PBS admission and translation into `IRBackend`. Compiler-general specs describe the common `IRBackend -> IRVM` contract and backend obligations.
|
||||
|
||||
**Why:** PBS is currently the only rich frontend producing executable `IRBackend`, so many examples naturally come from PBS. Specs must still separate source-language obligations from backend obligations so future frontends do not inherit PBS-specific rules by accident.
|
||||
|
||||
**Trade-offs:** Some PBS-facing examples remain useful, especially around lifecycle wrappers and asset metadata. They must be phrased as current frontend sources of a common backend obligation, not as backend ownership by PBS.
|
||||
|
||||
## Implementation Result
|
||||
|
||||
The completed work:
|
||||
|
||||
1. rewrote the general backend spec so `IRBackend -> IRVM` is explicitly compiler-general;
|
||||
2. rewrote the PBS lowering spec so PBS emits the common handoff instead of owning backend behavior;
|
||||
3. updated the conformance matrix with DEC-0043 guardrail rows;
|
||||
4. added a direct backend test that manually constructs common `IRBackend` and lowers it without PBS parser or frontend services;
|
||||
5. added an architectural test preventing common backend imports from `p.studio.compiler.pbs`;
|
||||
6. added a reflection-based contract test preventing public `IRBackend` model types from exposing PBS packages;
|
||||
7. renamed the common lifecycle helper from `validatePbsLifecycleStructure` to `validateCommonLifecycleStructure`.
|
||||
|
||||
## Patterns and Algorithms
|
||||
|
||||
### Boundary consolidation before abstraction
|
||||
|
||||
When an existing boundary is already technically sound, prefer consolidation over redesign:
|
||||
|
||||
1. document the current contract as normative;
|
||||
2. identify only concrete leaks;
|
||||
3. add tests that would fail if the boundary regresses;
|
||||
4. avoid renames or model extraction until there is evidence of real coupling.
|
||||
|
||||
This keeps multi-frontend preparation focused on preventing regressions rather than inventing abstractions prematurely.
|
||||
|
||||
### Guardrails for common backend neutrality
|
||||
|
||||
A useful backend neutrality guardrail has two layers:
|
||||
|
||||
1. source/package guard: common backend source must not import language frontend packages;
|
||||
2. public-contract guard: common handoff types must not expose language-owned types through fields, constructors, methods, or record components.
|
||||
|
||||
The package guard catches implementation coupling. The reflection guard catches API coupling.
|
||||
|
||||
### Direct handoff construction test
|
||||
|
||||
A backend test should be able to construct executable `IRBackend` manually using only common model types and lower it through `LowerToIRVMService`.
|
||||
|
||||
That test proves the backend consumes the contract, not a specific frontend pipeline.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
- Do not treat the presence of PBS examples as proof that the backend is PBS-owned.
|
||||
- Do not move PBS source rules into compiler-general specs.
|
||||
- Do not let lifecycle terms such as published wrapper, boot guard, or frame root hide whether the obligation is common or PBS-specific.
|
||||
- Do not rename `IRBackend` for aesthetics when the real problem is missing ownership language and missing guardrails.
|
||||
- Do not use a future synthetic test frontend as a substitute for simple direct `IRBackend` construction tests.
|
||||
|
||||
## Takeaways
|
||||
|
||||
- `IRBackend` is the common executable handoff.
|
||||
- PBS owns PBS-to-`IRBackend` lowering; compiler-general owns `IRBackend -> IRVM`.
|
||||
- Common backend code must not depend on `p.studio.compiler.pbs`.
|
||||
- Public `IRBackend` contract types must not expose PBS AST, token, parser, semantic, or editorial types.
|
||||
- Multi-frontend preparation should first lock existing good boundaries before introducing new abstractions.
|
||||
|
||||
## References
|
||||
|
||||
- `docs/specs/compiler/20. IRBackend to IRVM Lowering Specification.md`
|
||||
- `docs/specs/compiler/22. Backend Spec-to-Test Conformance Matrix.md`
|
||||
- `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md`
|
||||
- `prometeu-compiler/prometeu-build-pipeline/src/test/java/p/studio/compiler/backend/irvm/LowerToIRVMServiceTest.java`
|
||||
- `prometeu-compiler/prometeu-build-pipeline/src/test/java/p/studio/compiler/specs/CommonBackendArchitectureTest.java`
|
||||
- `prometeu-compiler/prometeu-frontend-api/src/test/java/p/studio/compiler/models/IRBackendExecutableContractTest.java`
|
||||
-82
@@ -1,82 +0,0 @@
|
||||
---
|
||||
id: LSN-0060
|
||||
ticket: multi-frontend-serializable-ir
|
||||
title: Data contract first for serializable IRBackend
|
||||
created: 2026-07-15
|
||||
tags: [compiler, compiler-general, ir, backend, serialization, multi-frontend]
|
||||
---
|
||||
|
||||
# Data contract first for serializable IRBackend
|
||||
|
||||
## Original Problem
|
||||
|
||||
The compiler already had a common executable handoff: `IRBackend`. PBS emits it, and common backend stages consume it before lowering to `IRVM`.
|
||||
|
||||
The remaining risk was subtler than direct PBS coupling. A Java-only handoff can accidentally grow around process-local assumptions: callbacks, services, object identity, mutable global state, unordered collections, lazy values, or direct references between live objects. Those shapes can work inside one JVM and still make a future external frontend or out-of-process boundary expensive to add.
|
||||
|
||||
The work needed to keep the handoff serializable by design without choosing JSON, Protobuf, RPC, plugin loading, or a separate process too early.
|
||||
|
||||
## Consolidated Decision
|
||||
|
||||
`IRBackend` is a data contract first.
|
||||
|
||||
Public `IRBackend` contract types must remain modelable as an acyclic, deterministic data graph made from primitives, strings, enums, immutable values, ordered lists, explicit ids, stable symbolic keys, and source attribution values such as file ids and spans.
|
||||
|
||||
The public handoff must not expose callbacks, lambdas, service objects, registries, visitors, live compiler services, frontend AST/parser/token/semantic/editorial objects, mutable global state, object identity semantics, unordered output-affecting collections, cyclic public references, process-dependent lazy values, or a selected wire format.
|
||||
|
||||
The important boundary is the data shape, not a codec. A future serializer should be able to consume the handoff because the public model is already disciplined, but this decision does not require a serializer to exist now.
|
||||
|
||||
## Final Implementation
|
||||
|
||||
The implementation updated the compiler-general backend spec with a new `IRBackend` serializability-by-design subsection. The spec now states the allowed and forbidden public shapes and keeps wire format selection explicitly deferred.
|
||||
|
||||
The conformance matrix added `G20-4.2.x` rows for the new requirements:
|
||||
|
||||
- public `IRBackend` modelability as an acyclic deterministic data graph;
|
||||
- rejection of callbacks, services, mutable or unordered collections, frontend-owned objects, process-dependent lazy values, cyclic public references, and wire-format commitments;
|
||||
- use of explicit ids or stable symbolic keys for cross-object references.
|
||||
|
||||
The executable guardrails live in `IRBackendExecutableContractTest`:
|
||||
|
||||
- the public contract audit covers all current `p.studio.compiler.models` handoff types and nested value types;
|
||||
- support types such as `FileId`, `ModuleId`, `CallableId`, `IntrinsicId`, `Span`, table reference records, and `ReadOnlyList` are explicitly classified;
|
||||
- reflection checks inspect public fields, record components, public constructors, public methods, and generic type arguments;
|
||||
- guardrails reject PBS/frontend exposure, callback shapes, service-like public shapes, mutable/unordered collection contracts, and other non-serializable public exposures;
|
||||
- deterministic aggregation tests prove stable ordering for functions, synthetic functions, globals, executable functions, module pools, callable signatures, intrinsic pools, reserved metadata, and required capabilities;
|
||||
- known references are locked to explicit ids or stable keys rather than direct object references.
|
||||
|
||||
The audit found no concrete public serialization leak that required changing the production model. That result is meaningful: the current `IRBackend` shape was already close to the target, so the correct implementation was spec clarification plus tests, not a redesign.
|
||||
|
||||
## Examples
|
||||
|
||||
Good public handoff shapes:
|
||||
|
||||
- `ModuleId`, `CallableId`, `IntrinsicId`, and `FileId` for table-scoped references;
|
||||
- `ReadOnlyList<T>` for ordered collections;
|
||||
- `ModuleReference`, `CallableSignatureRef`, and `IntrinsicReference` as stable table values;
|
||||
- `Span` for source attribution;
|
||||
- enums and records for fixed value surfaces.
|
||||
|
||||
Bad public handoff shapes:
|
||||
|
||||
- `Map`, `Set`, or mutable collection interfaces where output order matters;
|
||||
- `Runnable`, `Callable`, `Function`, visitors, or callbacks;
|
||||
- compiler services or registries exposed as public fields or constructor parameters;
|
||||
- frontend AST, parser, token, semantic, or editor types;
|
||||
- direct references to another handoff object where an id or ordered table entry is the stable contract.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
- Do not confuse "serializable by design" with "serialize it now." A codec is a future implementation detail.
|
||||
- Do not add typed ids everywhere by taste. Add them when a real public field would otherwise depend on textual identity, object identity, or direct object references.
|
||||
- Do not treat `ReadOnlyList` as cosmetic. Ordered collections are part of the deterministic contract.
|
||||
- Do not let a private assembler or aggregator implementation shape leak into public handoff semantics.
|
||||
- Do not move the rule into PBS specs. PBS owns how it populates the handoff; compiler-general owns the common handoff contract.
|
||||
|
||||
## References
|
||||
|
||||
- `docs/specs/compiler/20. IRBackend to IRVM Lowering Specification.md`
|
||||
- `docs/specs/compiler/22. Backend Spec-to-Test Conformance Matrix.md`
|
||||
- `prometeu-compiler/prometeu-frontend-api/src/test/java/p/studio/compiler/models/IRBackendExecutableContractTest.java`
|
||||
- `prometeu-compiler/prometeu-build-pipeline/src/test/java/p/studio/compiler/specs/BackendConformanceMatrixSpecTest.java`
|
||||
- `prometeu-compiler/prometeu-build-pipeline/src/test/java/p/studio/compiler/backend/irvm/LowerToIRVMServiceTest.java`
|
||||
-143
@@ -1,143 +0,0 @@
|
||||
---
|
||||
id: LSN-0062
|
||||
ticket: multi-frontend-common-lifecycle
|
||||
title: Common lifecycle assembly after frontend declaration
|
||||
created: 2026-09-19
|
||||
tags: [compiler, compiler-general, compiler-pbs, lifecycle, backend, multi-frontend]
|
||||
---
|
||||
|
||||
# Common lifecycle assembly after frontend declaration
|
||||
|
||||
## Original Problem
|
||||
|
||||
`IRBackend` was already the common executable handoff, but the PBS frontend still
|
||||
owned two different jobs. It admitted language markers `[Init]`, `[Frame]`, and
|
||||
`InitAllowed`, and it also assembled the platform lifecycle: module init,
|
||||
project-init wrapper, published frame wrapper, physical entrypoint, and boot
|
||||
guard.
|
||||
|
||||
That second job discovered roles through `__pbs.*` names and lived inside
|
||||
`PBSFrontendPhaseService`. Another frontend could not reuse the boot sequence
|
||||
without copying PBS. Common backend code also risked treating PBS naming as the
|
||||
integration contract.
|
||||
|
||||
The old path had a concrete defect. The `[Init]` colocated with `[Frame]` is
|
||||
project init, but it was also included in the file-init fragment. The published
|
||||
wrapper then called module init and project init separately, so the same
|
||||
callable could run twice. Specs required project init exactly once, after all
|
||||
module initializers and before the frame root.
|
||||
|
||||
## Consolidated Decision
|
||||
|
||||
Declaration and assembly are separate.
|
||||
|
||||
An executable frontend emits an immutable, ordered, typed
|
||||
`IRLifecycleDeclaration` on `IRBackend`. The declaration carries:
|
||||
|
||||
- modules in explicit dependency order;
|
||||
- each module's ordered file-init fragment references;
|
||||
- an optional project-init callable;
|
||||
- exactly one frame-root callable.
|
||||
|
||||
References use `ModuleId`, `FileId`, `CallableId`, a typed role, and source
|
||||
attribution. Absence of a declaration means a deliberately non-executable
|
||||
handoff. It must not synthesize a default `main`.
|
||||
|
||||
`FrontendPhasePipelineStage` stops at that declarative backend.
|
||||
`AssembleLifecyclePipelineStage` runs immediately after it and is the terminal
|
||||
stage of `analyze()`. `LifecycleAssemblerService` is the only owner of derived
|
||||
lifecycle artifacts. `compile()` and `build()` reuse that single assembly pass.
|
||||
|
||||
`ResolveDepsPipelineStage` remains the ordering authority. Frontends propagate
|
||||
that order; the assembler validates and applies it. Neither side may rebuild
|
||||
order from synthetic names, `FileId`, textual module names, or incidental map
|
||||
order.
|
||||
|
||||
Project init is excluded from file-init fragments and runs exactly once. Common
|
||||
derived identities are neutral and deterministic. Common code must not import
|
||||
PBS packages or inspect `__pbs.*` prefixes. Typed roles, ids, and origins are
|
||||
the stable inspection surface; synthetic names are internal.
|
||||
|
||||
## Final Implementation
|
||||
|
||||
PBS now emits per-file lifecycle contributions and a project-level declaration.
|
||||
A colocated `[Init]` is the project-init reference only. File-init fragments
|
||||
remain frontend-lowered executables, consumed by id and role rather than by
|
||||
name prefix. `synthesizePublishedLifecycle` was removed.
|
||||
|
||||
The common assembler validates the declaration and materializes:
|
||||
|
||||
1. module init callables in declared module/file order;
|
||||
2. an optional project-init wrapper, invoked once;
|
||||
3. the published frame wrapper, which is the physical entrypoint;
|
||||
4. a hidden boot guard that prevents a second bootstrap after success.
|
||||
|
||||
The declaration remains on the assembled `IRBackend` as provenance. IRVM
|
||||
lowering keeps only assembled-graph preconditions such as wrapper identity,
|
||||
synthetic origin, and boot-guard presence. It does not reconstruct lifecycle
|
||||
from names.
|
||||
|
||||
`analyze()` still returns a fully assembled executable backend, without IRVM,
|
||||
bytecode, or file output. Neutral names use the `__prometeu.lifecycle.*` prefix.
|
||||
|
||||
Diagnostics stay split: PBS reports marker, signature, placement, cardinality,
|
||||
and colocation errors; the common layer reports unresolved ids, incompatible
|
||||
roles, missing frame root, invalid origins, and frontend-preassembled derived
|
||||
artifacts.
|
||||
|
||||
## Examples
|
||||
|
||||
Good frontend output:
|
||||
|
||||
- a file with globals or a non-project `[Init]` contributes a
|
||||
`FILE_INIT_FRAGMENT`;
|
||||
- the `[Init]` next to `[Frame]` is `PROJECT_INIT` only;
|
||||
- `[Frame]` is `FRAME_ROOT`;
|
||||
- module order follows the resolved dependency graph even when names or file
|
||||
ids would sort the other way.
|
||||
|
||||
Good assembled output:
|
||||
|
||||
- wrapper call order is module inits, then project init once, then frame root;
|
||||
- boot guard is a hidden global, not a user global;
|
||||
- `getLifecycleDeclaration()` still exposes the original typed references.
|
||||
|
||||
Bad output:
|
||||
|
||||
- PBS emitting `MODULE_INIT`, `PROJECT_INIT` wrappers, published wrappers, or
|
||||
boot guards;
|
||||
- common code matching `__pbs.frame_wrapper$m0` to discover the entrypoint;
|
||||
- sorting modules by `FileId` or textual path because the declaration order was
|
||||
inconvenient;
|
||||
- leaving both the PBS assembler and the common stage active.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
- Do not treat `analyze()` as "frontend only." It now includes common lifecycle
|
||||
assembly so callers still receive an executable `IRBackend`.
|
||||
- Do not keep a temporary dual path. Two assemblers duplicate wrappers or init.
|
||||
- Do not infer missing frame roots or repair invalid declarations in the common
|
||||
layer. Fail deterministically.
|
||||
- Do not move PBS marker rules into the assembler. Language admission stays in
|
||||
PBS; structural handoff checks stay common.
|
||||
- Do not preserve `__pbs.*` names for common-derived artifacts as compatibility
|
||||
behavior. They were never a public ABI.
|
||||
- Do not confuse a frontend file-init fragment name with a common-derived
|
||||
identity. PBS may still name its own fragments; common code must not parse
|
||||
those names.
|
||||
|
||||
## References
|
||||
|
||||
- Decision: `DEC-0046`
|
||||
- Plan: `PLN-0125`
|
||||
- Related lessons: `LSN-0059`, `LSN-0060`
|
||||
- `docs/specs/compiler/23. Compiler Pipeline Entry Points Specification.md`
|
||||
- `docs/specs/compiler/20. IRBackend to IRVM Lowering Specification.md`
|
||||
- `docs/specs/compiler/22. Backend Spec-to-Test Conformance Matrix.md`
|
||||
- `docs/specs/compiler-languages/pbs/4. Static Semantics Specification.md`
|
||||
- `docs/specs/compiler-languages/pbs/9. Dynamic Semantics Specification.md`
|
||||
- `docs/specs/compiler-languages/pbs/12. Diagnostics Specification.md`
|
||||
- `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md`
|
||||
- `prometeu-compiler/prometeu-frontend-api/src/main/java/p/studio/compiler/models/IRLifecycleDeclaration.java`
|
||||
- `prometeu-compiler/prometeu-build-pipeline/src/main/java/p/studio/compiler/lifecycle/LifecycleAssemblerService.java`
|
||||
- `prometeu-compiler/prometeu-build-pipeline/src/main/java/p/studio/compiler/workspaces/stages/AssembleLifecyclePipelineStage.java`
|
||||
-129
@@ -1,129 +0,0 @@
|
||||
---
|
||||
id: LSN-0063
|
||||
ticket: multi-frontend-validation-boundaries
|
||||
title: Language vs platform validation ownership
|
||||
created: 2026-09-19
|
||||
tags: [compiler, compiler-general, compiler-pbs, backend, validation, multi-frontend]
|
||||
---
|
||||
|
||||
# Language vs platform validation ownership
|
||||
|
||||
## Original Problem
|
||||
|
||||
PBS mixed two kinds of rejection. Some failures only make sense with the
|
||||
language: syntax, types, markers, barrel files, imports. Others belong to any
|
||||
executable frontend: malformed `IRBackend`, invalid lifecycle declarations,
|
||||
missing assembled wrappers, host-capability identity, bytecode/preload.
|
||||
|
||||
Without an ownership rule, the next frontend would copy PBS validators, or the
|
||||
common layer would start knowing `[Init]`, barrel, and `E_SEM_*`. Spec 19 was
|
||||
still titled as PBS verification, and the PBS diagnostics catalog listed
|
||||
wrapper and boot-guard failures as PBS coverage.
|
||||
|
||||
Lifecycle assembly had already moved (`LSN-0062`). That proved the pattern. It
|
||||
did not inventory the rest.
|
||||
|
||||
## Consolidated Decision
|
||||
|
||||
A validation lives at the lowest layer that understands the failure without
|
||||
knowing the source language.
|
||||
|
||||
- Language: needs AST, tokens, a language marker, a barrel, or another source
|
||||
rule.
|
||||
- Platform: can be checked on `IRBackend`, `IRLifecycleDeclaration`, IRVM, PBX,
|
||||
host/capability tables, or ids.
|
||||
|
||||
The discussion published that matrix. It did not extract a generic
|
||||
validator-core and did not move validators whose common contract is not closed.
|
||||
|
||||
Host admission is split. PBS owns the source shape of `[Host]` and
|
||||
`[Capability]`. Platform owns canonical `(module, name, version)` identity and
|
||||
capability consistency once those facts exist on `IRReservedMetadata`. The
|
||||
current validator may stay in the PBS package until a later plan. `E_HOST_*`
|
||||
is not eternal PBS semantics.
|
||||
|
||||
The same fact may exist on both sides with distinct identities. PBS can report
|
||||
`E_SEM_MISSING_PROJECT_FRAME`; the common layer still rejects an executable
|
||||
declaration with no frame root.
|
||||
|
||||
Platform codes are `COMMON_*`, `LOWER_IRVM_*`, or `MARSHAL_*`. PBS keeps
|
||||
`E_PARSE_*`, `E_SEM_*`, `E_LINK_*`, and `E_HOST_*`. Copy origin/span when
|
||||
present; a missing origin is a structural error, not a reason to invent a span.
|
||||
|
||||
Linking and barrel stay language-owned. `Addressable` is platform-owned and was
|
||||
classified only. SDK canonical source and the broad architectural harness stay
|
||||
on adjacent discussions.
|
||||
|
||||
## Final Implementation
|
||||
|
||||
The work was editorial and test-facing.
|
||||
|
||||
Spec 19 is now `Compiler Verification and Safety Checks Specification`. Gates
|
||||
S-U and S-I are unchanged. Section 11 states the classification rule, the
|
||||
English ownership matrix, diagnostic identity, dual reporting, and the
|
||||
host-admission split. It explicitly refuses validator-core extraction and
|
||||
package moves.
|
||||
|
||||
PBS diagnostics spec 12 keeps marker, syntax, semantics, linking, and
|
||||
host-attribute coverage. Common structural failures now point at spec 19
|
||||
section 11 and spec 20 instead of appearing as PBS required coverage.
|
||||
|
||||
Spec 20 cross-references that same compiler-general ownership. The conformance
|
||||
matrix added `G19-11.1` through `G19-11.6` and `PBS12-11`.
|
||||
`CommonBackendArchitectureTest` now guards `backend/`, `lifecycle/`, and all
|
||||
common pipeline stages. `ValidationOwnershipSpecTest` locks the title, matrix,
|
||||
and PBS recut.
|
||||
|
||||
`PbsHostAdmissionValidator` remains under `p.studio.compiler.pbs`. No linking
|
||||
or asset production code moved.
|
||||
|
||||
## Examples
|
||||
|
||||
Language-owned:
|
||||
|
||||
- parse errors;
|
||||
- `[Init]` / `[Frame]` signature and colocation;
|
||||
- barrel and import failures;
|
||||
- `host call not allowed during init`.
|
||||
|
||||
Platform-owned and already implemented:
|
||||
|
||||
- invalid `IRLifecycleDeclaration`;
|
||||
- assembled wrapper, boot guard, and synthetic origin preconditions;
|
||||
- IRVM and marshal rejection families.
|
||||
|
||||
Classified as platform, not moved:
|
||||
|
||||
- canonical host-binding identity on `IRReservedMetadata`;
|
||||
- `Addressable` / asset path.
|
||||
|
||||
Dual reporting:
|
||||
|
||||
- missing `[Frame]` in PBS source is `E_SEM_MISSING_PROJECT_FRAME`;
|
||||
- an executable declaration without frame root is a common structural error.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
- Do not treat “classified as platform” as “move the class now.” Host admission
|
||||
still waits on the SDK source discussion.
|
||||
- Do not merge language and platform failures into one hybrid code. Two
|
||||
identities are cheaper than a lost message.
|
||||
- Do not put PBS governance or PBS diagnostics in charge of compiler-general
|
||||
safety gates.
|
||||
- Do not scan PBS frontend sources with the platform architecture guard. The
|
||||
guard is for common validators, not for the language package that must remain.
|
||||
- Do not invent a validator-core because several common checks exist. They
|
||||
already live on their stages.
|
||||
|
||||
## References
|
||||
|
||||
- Decision: `DEC-0047`
|
||||
- Plan: `PLN-0126`
|
||||
- Related lesson: `LSN-0062` - Common lifecycle assembly after frontend declaration
|
||||
- Related lesson: `LSN-0059` - Common IRBackend handoff and backend guardrails
|
||||
- `docs/specs/compiler/19. Verification and Safety Checks Specification.md`
|
||||
- `docs/specs/compiler-languages/pbs/12. Diagnostics Specification.md`
|
||||
- `docs/specs/compiler/20. IRBackend to IRVM Lowering Specification.md`
|
||||
- `docs/specs/compiler/22. Backend Spec-to-Test Conformance Matrix.md`
|
||||
- `prometeu-compiler/prometeu-build-pipeline/src/test/java/p/studio/compiler/specs/ValidationOwnershipSpecTest.java`
|
||||
- `prometeu-compiler/prometeu-build-pipeline/src/test/java/p/studio/compiler/specs/CommonBackendArchitectureTest.java`
|
||||
-121
@@ -1,121 +0,0 @@
|
||||
---
|
||||
id: LSN-0064
|
||||
ticket: multi-frontend-sdk-canonical-definition
|
||||
title: Runtime owns console ABI; PBS is delivery
|
||||
created: 2026-09-19
|
||||
tags: [compiler, compiler-general, sdk, stdlib, hostcalls, intrinsics, multi-frontend]
|
||||
---
|
||||
|
||||
# Runtime owns console ABI; PBS is delivery
|
||||
|
||||
## Original Problem
|
||||
|
||||
"SDK" mixed three layers: platform ABI, PBS stdlib shells, and docs. The PBS
|
||||
compiler reads `[Host]` and `[IntrinsicCall]` from `.pbs` files. It does not
|
||||
read the runtime registry. Intrinsics already had a CSV in the runtime
|
||||
repository, a handwritten Java enum, and a disabled parity test. Spec 8
|
||||
documented `audio` and `@core:math`. Disk had `game/stdlib/1` with `color`,
|
||||
`asset`, `composer`, `gfx`, `input`, and `log`. Spec 18 preferred `@sdk:*` for
|
||||
host APIs while `@sdk:input` was a builtin.
|
||||
|
||||
There is no second language in this phase. The risk was not a missing generic
|
||||
SDK. The risk was treating PBS shells, or a stale spec, as console ABI.
|
||||
DEC-0047 had already classified canonical host identity as platform-owned and
|
||||
left `PbsHostAdmissionValidator` in the PBS package until a shared source
|
||||
existed.
|
||||
|
||||
## Consolidated Decision
|
||||
|
||||
This discussion was an audit. It published an authority map. It did not create
|
||||
a canonical schema, generate bindings, enable intrinsic parity, or move the
|
||||
host-admission validator.
|
||||
|
||||
The console has two distinct axes:
|
||||
|
||||
- VM-owned intrinsics, identity `canonical_name@version` plus `final_id`;
|
||||
- host-backed calls, identity `(module, name, version)` plus capability.
|
||||
|
||||
Do not unify those axes into one catalog while PBS is the only frontend.
|
||||
|
||||
Conflict resolution:
|
||||
|
||||
- Intrinsic conflict: `runtime/docs/vm-arch/INTRINSICS.csv` wins. Studio
|
||||
`docs/vm-arch/INTRINSICS.csv` is a mirror. `IRVMIntrinsicDefinition` is
|
||||
derived. PBS `[BuiltinType]` / `[IntrinsicCall]` shells are delivery.
|
||||
- Host conflict: runtime spec 16 and `SyscallMeta` win. PBS `[Host]` attributes
|
||||
must not define ABI. They declare the shell the PBS compiler reads today.
|
||||
|
||||
`@sdk:*` / `@core:*` paths must not imply ownership. `@sdk:input` is a
|
||||
registered builtin exception. It was not moved to `@core`.
|
||||
|
||||
PBS conformance means PBS shells and docs match runtime ABI, not the reverse.
|
||||
`PbsHostAdmissionValidator` may stay in the PBS package. `E_HOST_*` is not
|
||||
eternal PBS semantics.
|
||||
|
||||
## Final Implementation
|
||||
|
||||
The work was editorial and test-facing.
|
||||
|
||||
Spec 18 now states that PBS stdlib is delivery and must not define syscall IDs,
|
||||
intrinsic `final_id` values, or `SyscallMeta`. Runtime catalogs outrank it.
|
||||
`@sdk:input` is recorded as the current builtin exception.
|
||||
|
||||
Spec 8 now documents `<target>/stdlib/<N>/...` with current line `1` at
|
||||
`game/stdlib/1`: `core/color` and `sdk/{asset,composer,gfx,input,log}`. It no
|
||||
longer ships `audio` or `@core:math` as current modules.
|
||||
|
||||
Spec 6.2 now requires PBS host shells to repeat the runtime registry and forbids
|
||||
inventing `(module, name, version)`. The authority example is
|
||||
`("gfx2d", "clear", 1)`.
|
||||
|
||||
`ConsoleAbiAuthoritySpecTest` locks those sentences. No production compiler
|
||||
code, stdlib `.pbs`, or validator package moved. The intrinsic parity test
|
||||
stays disabled.
|
||||
|
||||
## Examples
|
||||
|
||||
Runtime wins:
|
||||
|
||||
- `color.rgb@1` / `final_id` `0x1101` come from `INTRINSICS.csv`;
|
||||
- `("gfx2d", "clear", 1)` and `("asset", "load", 1)` come from `SyscallMeta`.
|
||||
|
||||
PBS delivers, and does not own, those identities:
|
||||
|
||||
- `@core:color` with `[BuiltinType(name = "color", version = 1)]`;
|
||||
- `@sdk:gfx` `LowGfx.clear` with `[Host(module = "gfx2d", name = "clear", version = 1)]`;
|
||||
- `@sdk:input` with `[BuiltinType]` / `[IntrinsicCall]` under `@sdk`.
|
||||
|
||||
Stale docs that the recut removed as current line-1 inventory:
|
||||
|
||||
- `stdlib/1/sdk/audio`;
|
||||
- `@core:math` as a packaged module.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
- Do not treat PBS stdlib as the ABI catalog because the compiler already reads
|
||||
it. That is convenience, not authority.
|
||||
- Do not create `HOSTCALLS.csv` or generate the Java enum because the map now
|
||||
exists. A catalog waits on a second consumer.
|
||||
- Do not move `PbsHostAdmissionValidator` on the strength of this map. DEC-0047
|
||||
classified identity as platform; this discussion published who wins; the
|
||||
validator still has no shared catalog to consume.
|
||||
- Do not read `@sdk` as host and `@core` as VM. Path is packaging. `@sdk:input`
|
||||
is builtin.
|
||||
- Do not enable `IRVMIntrinsicRegistryParityTest` as a side effect of a doc
|
||||
recut. That is compiler/runtime sync, not PBS packaging conformance.
|
||||
- Do not put the authority map only in a decision. Housekeep deletes workflow
|
||||
artifacts. Specs and this lesson keep the map.
|
||||
|
||||
## References
|
||||
|
||||
- Decision: `DEC-0048`
|
||||
- Plan: `PLN-0127`
|
||||
- Related lesson: `LSN-0063` - Language vs platform validation ownership
|
||||
- Related lesson: `LSN-0061` - PBX is the language-neutral runtime boundary
|
||||
- `docs/specs/compiler/18. Standard Library Surface Specification.md`
|
||||
- `docs/specs/compiler-languages/pbs/8. Stdlib Environment Packaging and Loading Specification.md`
|
||||
- `docs/specs/compiler-languages/pbs/6.2. Host ABI Binding and Loader Resolution Specification.md`
|
||||
- `docs/vm-arch/README.md`
|
||||
- `../runtime/docs/vm-arch/INTRINSICS.csv`
|
||||
- `../runtime/docs/specs/runtime/16-host-abi-and-syscalls.md`
|
||||
- `prometeu-compiler/prometeu-build-pipeline/src/test/java/p/studio/compiler/specs/ConsoleAbiAuthoritySpecTest.java`
|
||||
-136
@@ -1,136 +0,0 @@
|
||||
---
|
||||
id: LSN-0061
|
||||
ticket: multi-frontend-pvm-neutrality
|
||||
title: PBX is the language-neutral runtime boundary
|
||||
created: 2026-09-18
|
||||
tags: [vm-arch, runtime, pvm, pbx, compiler, multi-frontend]
|
||||
---
|
||||
|
||||
# PBX is the language-neutral runtime boundary
|
||||
|
||||
## Original Problem
|
||||
|
||||
PBS was the first implemented frontend, so its name still appeared in a few
|
||||
common compiler specification titles. That editorial residue made it easier to
|
||||
misread the architecture as if PBS owned bytecode, IRVM, or the PVM execution
|
||||
model.
|
||||
|
||||
The implementation was already mostly neutral: the compiler emitted PBX, the
|
||||
runtime loaded PBX, and the common backend did not import PBS frontend packages.
|
||||
The real risk was future drift. In particular, IRVM could be mistaken for a
|
||||
runtime input, `PBS\0` could be confused with the executable magic, and duplicated
|
||||
VM-architecture documents could silently become competing authorities.
|
||||
|
||||
## Consolidated Decision
|
||||
|
||||
The executable pipeline is:
|
||||
|
||||
```text
|
||||
language frontend -> IRBackend -> IRVM -> PBX -> loader/verifier -> PVM
|
||||
```
|
||||
|
||||
`IRBackend`, `IRVM`, optimization, and PBX emission are compiler-owned.
|
||||
`IRVM` is an internal compiler representation and never crosses the runtime
|
||||
boundary. PBX is the only executable artifact consumed by the runtime.
|
||||
|
||||
The runtime repository owns PBX binary layout, Core ISA, loader behavior,
|
||||
verification, and PVM execution. Studio owns the common compiler transformations
|
||||
that produce conforming PBX. Studio copies of VM-architecture documents are
|
||||
mirrors, not independent authorities.
|
||||
|
||||
`PBS` names a language, frontend, stdlib, and explicitly language-specific
|
||||
integration. It does not name the executable format, magic, ISA, ABI, program
|
||||
image, or runtime type. The canonical persisted artifact is `program.pbx`, and
|
||||
its binary magic is `PBX\0`.
|
||||
|
||||
## Final Implementation
|
||||
|
||||
The common compiler specifications now identify bytecode/PBX and IRVM
|
||||
optimization as language-neutral surfaces. They explicitly state that IRVM is
|
||||
internal to the compiler and that PBX is the compiler/runtime boundary. Existing
|
||||
PBS references were retained where they describe legitimate frontend-specific
|
||||
publication or metadata behavior.
|
||||
|
||||
Studio's copies of `ARCHITECTURE.md`, `ISA_CORE.md`, and `INTRINSICS.csv` were
|
||||
synchronized with the runtime repository. A mirror policy now identifies the
|
||||
runtime repository as canonical and provides byte-for-byte comparison commands.
|
||||
|
||||
Existing Studio tests already proved two important invariants:
|
||||
|
||||
- `BytecodeModule` serializes the exact `PBX\0` header;
|
||||
- common backend contracts neither import nor publicly expose PBS frontend
|
||||
types.
|
||||
|
||||
Runtime conformance was strengthened in three focused places:
|
||||
|
||||
- the bytecode invalid-magic regression now explicitly proves that legacy
|
||||
`PBS\0` is rejected;
|
||||
- the PVM initialization regression now creates a `BytecodeModule` directly,
|
||||
serializes it, loads and verifies it, prepares the boot call, and executes it
|
||||
through `HALT` without any frontend;
|
||||
- a quality check inspects the `prometeu-bytecode` and `prometeu-vm` manifests
|
||||
and rejects dependencies whose identities belong to compiler or frontend
|
||||
layers.
|
||||
|
||||
No production VM behavior, ISA, ABI, or binary format changed.
|
||||
|
||||
## Examples
|
||||
|
||||
Language-specific work stops before the common backend:
|
||||
|
||||
```text
|
||||
PBS AST and semantic model
|
||||
-> PBS lowering
|
||||
-> neutral IRBackend data
|
||||
-> common IRVM lowering and optimization
|
||||
-> PBX\0
|
||||
```
|
||||
|
||||
A future frontend follows the same boundary:
|
||||
|
||||
```text
|
||||
FutureLanguage AST and semantic model
|
||||
-> FutureLanguage lowering
|
||||
-> neutral IRBackend data
|
||||
-> the same common IRVM and PBX stages
|
||||
```
|
||||
|
||||
The runtime sees the same PBX contract in both cases. It does not receive a
|
||||
`languageId`, source extension, AST object, IRVM object, or frontend service.
|
||||
|
||||
## Pitfalls and Anti-Patterns
|
||||
|
||||
- Do not expose IRVM as a convenient runtime protocol. It is optimized for
|
||||
compiler transformations, not binary compatibility or runtime loading.
|
||||
- Do not rename PBX concepts after the first frontend. `PBS\0` is invalid even
|
||||
when PBS produced the program.
|
||||
- Do not globally ban the word `PBS` from runtime documentation. PBS is a valid
|
||||
guest-language example; guards should inspect dependencies, public types, and
|
||||
format identities instead of raw text.
|
||||
- Do not duplicate tests when an existing guard proves the entire invariant.
|
||||
Extend coverage only for the missing distinction, such as explicit `PBS\0`
|
||||
rejection.
|
||||
- Do not let a documentation mirror become a second authority. Synchronize it
|
||||
against runtime or replace it with an explicit reference.
|
||||
- Loading a PBX image is not the same as beginning execution. The PVM boot test
|
||||
must prepare the published boot call before running the instruction budget.
|
||||
|
||||
## References
|
||||
|
||||
- `docs/specs/compiler/15. Bytecode and PBX Mapping Specification.md`
|
||||
- `docs/specs/compiler/20. IRBackend to IRVM Lowering Specification.md`
|
||||
- `docs/specs/compiler/21. IRVM Optimization Pipeline Specification.md`
|
||||
- `docs/vm-arch/README.md`
|
||||
- `prometeu-compiler/prometeu-build-pipeline/src/main/java/p/studio/compiler/backend/bytecode/BytecodeModule.java`
|
||||
- `prometeu-compiler/prometeu-build-pipeline/src/test/java/p/studio/compiler/specs/CommonBackendArchitectureTest.java`
|
||||
- Runtime: `crates/console/prometeu-bytecode/src/model.rs`
|
||||
- Runtime: `crates/console/prometeu-vm/src/virtual_machine.rs`
|
||||
- Runtime: `crates/dev/prometeu-quality-checks/tests/pvm_frontend_neutrality.rs`
|
||||
|
||||
## Takeaways
|
||||
|
||||
- PBX is the stable, language-neutral executable boundary.
|
||||
- IRVM stays private to the compiler pipeline.
|
||||
- Runtime authority and compiler authority are complementary, not competing.
|
||||
- Small dependency and artifact tests are enough to protect this boundary
|
||||
without introducing a plugin platform or a second language.
|
||||
-148
@@ -1,148 +0,0 @@
|
||||
---
|
||||
id: LSN-0065
|
||||
ticket: multi-frontend-synthetic-test-frontend
|
||||
title: Synthetic test frontend proves common pipeline neutrality
|
||||
created: 2026-09-19
|
||||
tags: [compiler, compiler-general, frontend, tests, backend, multi-frontend]
|
||||
---
|
||||
|
||||
# Synthetic test frontend proves common pipeline neutrality
|
||||
|
||||
## Original Problem
|
||||
|
||||
The common pipeline already had `FrontendProvider`, `IRBackend` as the
|
||||
executable handoff, common lifecycle assembly, and `IRBackend -> IRVM -> PBX`.
|
||||
Direct construction tests proved the backend could lower a handmade
|
||||
`IRBackend`. Import guards proved common backend code did not depend on PBS
|
||||
packages.
|
||||
|
||||
That was not enough. Nothing proved that a second provider, resolved by
|
||||
`languageId`, could enter through `DiscoverPhase` and
|
||||
`FrontendPhasePipelineStage`, assemble lifecycle, and finish
|
||||
`BuilderPipelineService.compile()` at verified bytecode without instantiating
|
||||
PBS, reading `.pbs` files, or loading PBS stdlib.
|
||||
|
||||
`CompileOnlyFrontendProvider` already existed as a local test double. It was
|
||||
not registered, returned an empty `IRBackend`, and never called the pipeline.
|
||||
It did not close this gap.
|
||||
|
||||
## Consolidated Decision
|
||||
|
||||
Pipeline neutrality is proved by a **test-only** compile-only
|
||||
`FrontendProvider`, not by a second product language and not by injecting IR
|
||||
into compile stages.
|
||||
|
||||
Locked shape (former Option A):
|
||||
|
||||
- `languageId` is `synth`.
|
||||
- The provider and `FrontendPhaseService` live only in
|
||||
`prometeu-build-pipeline` test sources.
|
||||
- `languageService()` is empty. There is no parser, grammar, semantic
|
||||
presentation, or stdlib catalog.
|
||||
- `sourceRoots` is `src`. `allowedExtensions` must not collide with `pbs` /
|
||||
`barrel`. The fixture must **not** create a source file of that extension.
|
||||
An empty `src/` directory must still exist because `WireProjectsPhase`
|
||||
resolves `toRealPath()`.
|
||||
- The compiler ignores source text and emits one module, one `frame` body
|
||||
that is a single `RET`, and an `IRLifecycleDeclaration` with exactly one
|
||||
`FRAME_ROOT` whose origin span is filled.
|
||||
- The handoff must not declare `FILE_INIT_FRAGMENT` or `PROJECT_INIT`, and
|
||||
must not pre-materialize wrappers, module-init, or `BOOT_GUARD`. The common
|
||||
assembler produces `__prometeu.lifecycle.frame_wrapper$mN` and the boot
|
||||
guard.
|
||||
- The IR must not contain host bindings, capabilities, intrinsics, PBS types,
|
||||
PBS stdlib, or `__pbs.` names.
|
||||
|
||||
The acceptance path is `compile()` through `VerifyBytecode`. Writing
|
||||
`program.pbx` is not the criterion. `build()` only adds disk I/O.
|
||||
|
||||
Registration stays on the existing static `FrontendRegistryService`.
|
||||
`register` and `unregister` are public. `unregister` refuses to remove the
|
||||
default PBS provider and is a no-op for unknown ids. Tests register `synth`
|
||||
for the duration of the run and unregister in `try/finally`.
|
||||
`bootstrapDefaults()`, `AppContainer`, and the Studio language catalog must
|
||||
not register `synth`.
|
||||
|
||||
Do not inject a `Registry` into the pipeline, add a `frontends/synth` module,
|
||||
scan the classpath, or treat a dummy on-disk extension as a language. Do not
|
||||
replace `LifecycleAssemblerServiceTest`, `LowerToIRVMServiceTest`, or
|
||||
`IRBackendExecutableContractTest` with this fixture.
|
||||
|
||||
A blank `prometeu.json` `language` field still defaults to PBS. The synthetic
|
||||
project must set `language: synth` explicitly.
|
||||
|
||||
## Final Implementation
|
||||
|
||||
`FrontendRegistryService.register(FrontendProvider)` is the explicit
|
||||
registration API. `unregister(String languageId)` removes a non-PBS provider
|
||||
or no-ops if the id is absent. Duplicate `register` still fails.
|
||||
`bootstrapDefaults()` still registers only PBS.
|
||||
|
||||
The test fixture is:
|
||||
|
||||
- `p.studio.compiler.synth.SyntheticFrontendProvider`
|
||||
- `p.studio.compiler.synth.SyntheticFrontendPhaseService`
|
||||
|
||||
`SyntheticFrontendPipelineTest` writes a temporary project
|
||||
(`language: synth`, `target: Game`, numeric `stdlib`, empty `src/`),
|
||||
registers the provider, calls `BuilderPipelineService.compile()`, and
|
||||
asserts:
|
||||
|
||||
- the synthetic compiler ran;
|
||||
- resolved `languageId` is `synth`, not `pbs`;
|
||||
- diagnostics have no errors;
|
||||
- in-memory bytecode is non-empty and verified;
|
||||
- assembled entrypoint is `__prometeu.lifecycle.frame_wrapper$m0`;
|
||||
- a hidden boot guard is present;
|
||||
- no `__pbs.` names;
|
||||
- no `.pbs` / `.barrel` sources were required;
|
||||
- after `unregister`, `listProviders()` is PBS-only.
|
||||
|
||||
Spec 23 section 8.3 records that a compile-only registered provider is a
|
||||
valid pipeline participant and that the common pipeline must not require PBS
|
||||
types, PBS sources, or PBS stdlib to emit verified bytecode. Spec 22 row
|
||||
`G23-8.3` binds that obligation to the synthetic pipeline test.
|
||||
|
||||
PBS production code, Studio, and `AppContainer` were not changed.
|
||||
|
||||
## Examples
|
||||
|
||||
Good:
|
||||
|
||||
- register `synth`, compile a temp project with empty `src/`, unregister;
|
||||
- `FRAME_ROOT` with `FileId(0)` and a non-none span, even with no source file
|
||||
in `FileTable`;
|
||||
- assert the synthetic compiler was invoked instead of importing
|
||||
`PBSFrontendPhaseService` from build-pipeline tests.
|
||||
|
||||
Bad:
|
||||
|
||||
- omitting `language` in the manifest so discovery silently uses PBS;
|
||||
- creating `main.dummy` and calling that a second frontend;
|
||||
- putting the provider under `prometeu-compiler/frontends/`;
|
||||
- leaving `synth` registered after the test so later tests see two providers;
|
||||
- using this pipeline test as a substitute for assembler or IRVM unit tests.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
- `WireProjectsPhase` still needs `src/` on disk. Empty is not the same as
|
||||
missing.
|
||||
- Origin span `Span.none()` is rejected by the assembler. Use a real
|
||||
`FileId` even when no file was loaded.
|
||||
- `unregister("pbs")` must fail. A cleanup path that blindly unregisters the
|
||||
resolved language would delete the product default.
|
||||
- `listProviders()` feeds the Studio catalog. A leaked test registration
|
||||
would show `synth` as a new-project language.
|
||||
- Direct `IRBackend` construction tests still own backend-only proofs. The
|
||||
synthetic frontend owns the registry-plus-pipeline proof. Keep both.
|
||||
|
||||
## References
|
||||
|
||||
- Decision: `DEC-0049`
|
||||
- Plan: `PLN-0128`
|
||||
- Related lessons: `LSN-0055`, `LSN-0056`, `LSN-0059`, `LSN-0062`, `LSN-0061`
|
||||
- `docs/specs/compiler/23. Compiler Pipeline Entry Points Specification.md`
|
||||
- `docs/specs/compiler/22. Backend Spec-to-Test Conformance Matrix.md`
|
||||
- `prometeu-compiler/prometeu-frontend-registry/src/main/java/p/studio/compiler/FrontendRegistryService.java`
|
||||
- `prometeu-compiler/prometeu-build-pipeline/src/test/java/p/studio/compiler/synth/SyntheticFrontendProvider.java`
|
||||
- `prometeu-compiler/prometeu-build-pipeline/src/test/java/p/studio/compiler/integration/SyntheticFrontendPipelineTest.java`
|
||||
@@ -0,0 +1,97 @@
|
||||
---
|
||||
id: AGD-0004
|
||||
ticket: tilemap-and-metatile-runtime-binary-layout
|
||||
title: Tilemap and Metatile Runtime Binary Layout
|
||||
status: open
|
||||
created: 2026-03-26
|
||||
resolved:
|
||||
decision:
|
||||
tags:
|
||||
- packer
|
||||
- legacy-import
|
||||
- tilemap
|
||||
- metatile
|
||||
- runtime-layout
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
The repository has conceptual alignment around map responsibility split and active-window residency, but still lacks a closed runtime binary contract for handheld maps.
|
||||
|
||||
Without a canonical decision:
|
||||
|
||||
- packer cannot close the output specification for map artifacts;
|
||||
- runtime lacks one stable reading baseline;
|
||||
- Studio cannot align authoring and preview schemas with one binary target.
|
||||
|
||||
## Context
|
||||
|
||||
Legacy source: `docs/packer/agendas/Tilemap and Metatile Runtime Binary Layout Agenda.md`
|
||||
|
||||
Domain owner: `docs/packer`
|
||||
Cross-domain impact:
|
||||
|
||||
- `docs/vm-arch`
|
||||
- `docs/studio`
|
||||
- `docs/compiler/pbs`
|
||||
|
||||
Current discussion premises retained from source:
|
||||
|
||||
- visual and collision concerns should remain separated;
|
||||
- map cells should not duplicate large metadata per tile;
|
||||
- only a `3x3` active window of maps should remain resident in memory;
|
||||
- a `64 KiB` target budget per map bank has been discussed;
|
||||
- `map bank` and `tileset bank` do not need identical size rules.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Is `collisionId` with `5` bits (`32` classes) sufficient for expected projects?
|
||||
- [ ] Should `flag0` be reserved for fast trigger semantics or contextual visual variation?
|
||||
- [ ] Which optional chunks belong in `V1`, and which should wait for a later version?
|
||||
- [ ] Must `map bank` stay strictly at `64 KiB`, or should capacity be variable with explicit metadata?
|
||||
- [ ] What compression policy should the packer adopt by default for the stream?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - `u8` cells with auxiliary tables
|
||||
- **Approach:** Store only one `metatileId` per cell and derive collision/flags from side tables.
|
||||
- **Pro:** Smallest RAM and I/O footprint.
|
||||
- **Con:** Pushes too much semantic meaning into external lookup tables.
|
||||
- **Maintainability:** Medium.
|
||||
|
||||
### Option B - `u16` bit-packed cells
|
||||
- **Approach:** Use `16` bits per cell, with a compact split such as `visualId`, `collisionId`, and `flag0`.
|
||||
- **Pro:** Balances compactness, deterministic decoding, and enough expressivity for many handheld cases.
|
||||
- **Con:** Leaves less room for inline per-cell growth than `u32`.
|
||||
- **Maintainability:** Strong.
|
||||
|
||||
### Option C - `u32` cells
|
||||
- **Approach:** Use larger cells to keep more event/flag space inline.
|
||||
- **Pro:** Highest flexibility for per-cell triggers and future expansion.
|
||||
- **Con:** Doubles memory cost versus `u16` without current evidence that it is needed.
|
||||
- **Maintainability:** Weak for the current budget target.
|
||||
|
||||
## Discussion
|
||||
|
||||
The retained source already converged toward `u16` as the best baseline.
|
||||
|
||||
The suggested runtime shape is:
|
||||
|
||||
- fixed map header;
|
||||
- contiguous cell stream;
|
||||
- optional future-proof chunks.
|
||||
|
||||
The proposed `U16_PACKED_V1` split keeps visual and collision references compact while preserving predictable memory usage and straightforward streaming behavior for a handheld target.
|
||||
|
||||
## Resolution
|
||||
|
||||
Recommended direction: adopt **Option B** as the baseline.
|
||||
|
||||
Imported retained recommendation:
|
||||
|
||||
1. authorship stays JSON-oriented around compact ids;
|
||||
2. build output packs deterministically into `U16_PACKED_V1`;
|
||||
3. runtime active-window budget remains explicit;
|
||||
4. any move to `u32` should happen only through a later versioned encoding with evidence of need.
|
||||
|
||||
Next step suggestion: convert this agenda into a decision that closes `U16_PACKED_V1`, propagation to `docs/vm-arch`, Studio editing schema alignment, and implementation planning for roundtrip tests.
|
||||
@@ -0,0 +1,87 @@
|
||||
---
|
||||
id: AGD-0005
|
||||
ticket: variable-tile-bank-palette-serialization
|
||||
title: Variable Tile Bank Palette Serialization
|
||||
status: open
|
||||
created: 2026-03-26
|
||||
resolved:
|
||||
decision:
|
||||
tags:
|
||||
- packer
|
||||
- legacy-import
|
||||
- tile-bank
|
||||
- palette-serialization
|
||||
- versioning
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
The current tile-bank contract serializes a fixed block of `64` palettes in v1 even when an asset authors far fewer palettes.
|
||||
|
||||
That keeps decoding simple, but it wastes cartridge space and leaves the system with a deliberate mismatch between authored and serialized palette counts.
|
||||
|
||||
## Context
|
||||
|
||||
Legacy source: `docs/packer/agendas/Variable Tile Bank Palette Serialization Agenda.md`
|
||||
|
||||
Domain owner: `docs/packer`
|
||||
Cross-domain dependency:
|
||||
|
||||
- runtime
|
||||
|
||||
Current aligned v1 contract:
|
||||
|
||||
- pixels are serialized as packed `u4`;
|
||||
- palettes are serialized as `RGB565 u16`;
|
||||
- `palette_count = 64`;
|
||||
- payload size includes a fixed `64 * 16 * 2` palette block.
|
||||
|
||||
The packer now exposes:
|
||||
|
||||
- `metadata.palette_count = 64`
|
||||
- `metadata.palette_authored = <actual authored count>`
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Should variable palette serialization arrive as a new payload version or as an incompatible change to the current one?
|
||||
- [ ] If `palette_count` becomes variable, should runtime still materialize a 64-slot resident bank, or truly shrink in-memory representation too?
|
||||
- [ ] Should sparse authored palette indices remain sparse in serialization, or be canonicalized into a dense runtime block?
|
||||
- [ ] Which domain owns compatibility for existing cartridges: `packer`, `runtime`, or `shipper`?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Keep fixed 64-palette serialization
|
||||
- **Approach:** Preserve the current fixed v1 payload with zero-filled unused palette slots.
|
||||
- **Pro:** No runtime change and current specs/tests remain stable.
|
||||
- **Con:** Every glyph bank keeps paying the full palette cost.
|
||||
- **Maintainability:** Medium.
|
||||
|
||||
### Option B - Move to variable palette serialization now
|
||||
- **Approach:** Serialize only authored palettes and shrink payload size immediately.
|
||||
- **Pro:** Better cartridge efficiency and tighter semantics for `palette_count`.
|
||||
- **Con:** Reopens a just-stabilized cross-domain runtime contract and forces compatibility decisions now.
|
||||
- **Maintainability:** Medium if done carefully, risky if done incidentally.
|
||||
|
||||
### Option C - Keep v1 fixed and design variable serialization for v2
|
||||
- **Approach:** Preserve v1 stability now and open a later versioned follow-up for variable palette serialization.
|
||||
- **Pro:** Keeps current work stable while preserving a clean path for future optimization.
|
||||
- **Con:** Known waste remains in v1.
|
||||
- **Maintainability:** Strong.
|
||||
|
||||
## Discussion
|
||||
|
||||
The retained agenda recommendation is already clear: the waste is real, but it is not a correctness bug, and reopening the runtime-facing contract immediately would mix optimization work into a freshly stabilized path.
|
||||
|
||||
That makes versioned follow-up a cleaner vehicle than incidental mutation of the current contract.
|
||||
|
||||
## Resolution
|
||||
|
||||
Recommended direction: adopt **Option C**.
|
||||
|
||||
Imported retained recommendation:
|
||||
|
||||
1. keep the current fixed 64-palette contract for v1;
|
||||
2. if variable serialization is desired, design it explicitly as a versioned follow-up;
|
||||
3. treat compatibility, runtime representation, and sparse-vs-dense palette identity as explicit next-wave questions rather than silent payload tweaks.
|
||||
|
||||
Next step suggestion: if the team wants to remove the fixed padding, open the corresponding runtime-side discussion and close the versioning/compatibility story before planning implementation.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0042
|
||||
ticket: pbs-lsp-go-to-definition
|
||||
title: PBS LSP Go to Definition
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, definition]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS users cannot jump from a symbol use to its declaration, which makes navigation across source files, stdlib imports, services, and generated/editorial surfaces slow and error-prone.
|
||||
|
||||
## Context
|
||||
|
||||
The current LSP exposes diagnostics, hover, completion, signature help, and semantic tokens. The compiler already builds semantic read surfaces and editorial symbol resolution for hover/completion, but there is no LSP definition capability or stable location mapping exposed to VS Code.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Which symbol categories must be supported in the first definition wave?
|
||||
- [ ] Should stdlib and generated/supplemental declarations navigate to source files, virtual documents, or remain hover-only?
|
||||
- [ ] What identity model should connect an editor token to the canonical declaration without relying on text search?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Syntactic location lookup
|
||||
|
||||
- **Approach:** Use parser spans and local AST traversal to map the token under cursor to a declaration with matching text.
|
||||
- **Pro:** Fast to implement and useful for same-file declarations.
|
||||
- **Con:** Breaks on overloads, imports, stdlib, aliases, and same-name symbols.
|
||||
- **Maintainability:** Weak; it creates a second navigation model separate from semantic resolution.
|
||||
|
||||
### Option B - Semantic identity lookup
|
||||
|
||||
- **Approach:** Extend the compiler/editorial surface with resolved declaration locations keyed by symbol identity, then expose `textDocument/definition`.
|
||||
- **Pro:** Correct for imports, overloads, methods, stdlib-backed declarations, and future references/rename.
|
||||
- **Con:** Requires explicit location metadata in semantic/editorial surfaces.
|
||||
- **Maintainability:** Strong; it becomes shared infrastructure for references, rename, hierarchy, and code actions.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
The syntactic option is tempting for speed, but it would likely be thrown away once references and rename arrive. The main tradeoff is whether stdlib/supplemental declarations must navigate to physical files immediately or can initially return no location while still supporting project symbols.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option B. Build a reusable semantic location index and implement the first wave for project source declarations, then define a policy for stdlib/supplemental targets.
|
||||
|
||||
## Discussion
|
||||
|
||||
This should probably be the first navigation agenda to resolve because references, rename, workspace symbols, and hierarchy depend on the same symbol identity/location model.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide the first-wave symbol categories and whether stdlib/supplemental declarations require virtual document support.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0043
|
||||
ticket: pbs-lsp-find-references
|
||||
title: PBS LSP Find References
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, references]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS users cannot ask where a symbol is used, so changes to functions, services, structs, constants, and stdlib-facing APIs require manual search that confuses overloads and unrelated text matches.
|
||||
|
||||
## Context
|
||||
|
||||
Completion and hover already resolve symbols in local editor context, but the LSP does not expose references and the compiler/editorial layer does not yet provide project-wide usage locations keyed by semantic identity.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Which declarations need reference tracking first: local functions, methods, types, constants, imports, stdlib symbols, or all of them?
|
||||
- [ ] How should overloads and same-name symbols in different scopes be disambiguated?
|
||||
- [ ] Should references include declarations, write/read classification, or only usage sites in the first wave?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Text search with filters
|
||||
|
||||
- **Approach:** Search workspace text for the selected identifier and filter obvious false positives by token kind.
|
||||
- **Pro:** Simple and fast for early demos.
|
||||
- **Con:** Incorrect for overloads, scope, shadowing, fields, methods, imports, and generated/stdlib surfaces.
|
||||
- **Maintainability:** Poor; later semantic references would duplicate and replace it.
|
||||
|
||||
### Option B - Semantic usage index
|
||||
|
||||
- **Approach:** During semantic analysis, emit definition and usage sites tied to stable symbol identities and expose `textDocument/references`.
|
||||
- **Pro:** Correct foundation for rename, call hierarchy, diagnostics UX, and code actions.
|
||||
- **Con:** Requires compiler-facing usage modeling and careful invalidation.
|
||||
- **Maintainability:** Strong; one source of truth for all symbol usage features.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Reference accuracy matters more than early breadth. False positives are worse than missing unsupported categories because users will trust rename and references for safe edits.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option B, but scope the first wave to project-owned declarations whose identity is already resolved reliably.
|
||||
|
||||
## Discussion
|
||||
|
||||
References should follow go-to-definition because both need the same identity and location model.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Define first-wave symbol categories and whether declarations are included in reference results.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0044
|
||||
ticket: pbs-lsp-document-symbols-outline
|
||||
title: PBS LSP Document Symbols and Outline
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, outline, document-symbols]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS files do not populate a reliable VS Code outline, forcing users to navigate long source files manually instead of scanning declarations and members structurally.
|
||||
|
||||
## Context
|
||||
|
||||
The parser and semantic surfaces know top-level declarations and many member declarations. The LSP currently does not announce documentSymbolProvider and does not map PBS declarations to DocumentSymbol or SymbolInformation payloads.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Should the first outline be syntactic, semantic, or hybrid?
|
||||
- [ ] Which hierarchy should be shown for structs, services, hosts, contracts, builtin types, enums, and methods?
|
||||
- [ ] How should invalid or partially parsed files contribute to outline during editing?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - AST-only outline
|
||||
|
||||
- **Approach:** Map parsed declarations and member spans directly to LSP `DocumentSymbol`.
|
||||
- **Pro:** Works even when semantic analysis is incomplete and gives immediate editor value.
|
||||
- **Con:** Cannot classify every symbol with semantic precision.
|
||||
- **Maintainability:** Good if kept as structural outline, not overloaded with semantic behavior.
|
||||
|
||||
### Option B - Semantic outline
|
||||
|
||||
- **Approach:** Build outline from semantic symbols after analysis.
|
||||
- **Pro:** More accurate kinds and can hide invalid/unresolved surfaces.
|
||||
- **Con:** More fragile during active editing and depends on full semantic success.
|
||||
- **Maintainability:** Good for final precision, but heavier than needed for outline.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Outline should remain available during broken intermediate edits. Semantic precision is useful, but not at the cost of disappearing structure while typing.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option A with semantic enrichment where available. Use AST spans as the stable backbone.
|
||||
|
||||
## Discussion
|
||||
|
||||
Document symbols are relatively independent and can be implemented before definition/references.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide hierarchy and symbol kinds for PBS declarations and members.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0045
|
||||
ticket: pbs-lsp-workspace-symbols
|
||||
title: PBS LSP Workspace Symbols
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, workspace-symbols]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
VS Code cannot search PBS symbols across the workspace, so users cannot quickly jump to functions, services, structs, constants, or stdlib-exposed APIs by name.
|
||||
|
||||
## Context
|
||||
|
||||
Document-level editorial features exist, but the LSP does not announce workspaceSymbolProvider and the compiler pipeline does not expose a project-wide symbol index designed for editor queries.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Should workspace symbols include only project files or also imported stdlib and SDK surfaces?
|
||||
- [ ] What symbol kinds and ranking should be returned for duplicate names or overloads?
|
||||
- [ ] Should the symbol index be cached from analysis snapshots or rebuilt per request in the first implementation?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Project source index only
|
||||
|
||||
- **Approach:** Index project-owned declarations from analysis snapshots and expose `workspace/symbol`.
|
||||
- **Pro:** Clear ownership and physical locations.
|
||||
- **Con:** Does not help users discover stdlib/SDK symbols.
|
||||
- **Maintainability:** Strong as a first wave.
|
||||
|
||||
### Option B - Project plus stdlib index
|
||||
|
||||
- **Approach:** Include project declarations and imported stdlib/SDK surfaces in the workspace symbol result set.
|
||||
- **Pro:** Better discovery, especially for new users.
|
||||
- **Con:** Requires a navigation policy for stdlib source or virtual targets.
|
||||
- **Maintainability:** Good if stdlib target handling is solved; awkward otherwise.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Workspace symbols are partly navigation and partly discovery. Including stdlib too early can create broken jumps if target locations are not defined.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option A first, then add stdlib once definition has a target policy.
|
||||
|
||||
## Discussion
|
||||
|
||||
This should follow document symbols and the semantic location/index work.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide whether first-wave workspace search includes stdlib or project-only symbols.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0046
|
||||
ticket: pbs-lsp-rename-symbol
|
||||
title: PBS LSP Rename Symbol
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, rename]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS users cannot safely rename a symbol through the editor, so they must edit text manually and risk missing references or changing unrelated overloads and same-name declarations.
|
||||
|
||||
## Context
|
||||
|
||||
Rename requires the same semantic identity and reference machinery needed by definition/references, plus workspace edits and conflict detection. The current LSP does not announce renameProvider.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Which symbols should be renameable in the first wave, and which should be protected such as stdlib, generated, host, or builtin declarations?
|
||||
- [ ] How should rename handle overloads, member methods, imports, and labels with the same text?
|
||||
- [ ] What validation should run before returning a WorkspaceEdit?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Local file rename
|
||||
|
||||
- **Approach:** Rename only references in the current file using local semantic resolution.
|
||||
- **Pro:** Smaller blast radius and easier conflict handling.
|
||||
- **Con:** Incomplete for imported symbols and project-wide APIs.
|
||||
- **Maintainability:** Acceptable only if explicitly presented as limited.
|
||||
|
||||
### Option B - Workspace semantic rename
|
||||
|
||||
- **Approach:** Use a project-wide reference index and return a `WorkspaceEdit` for all usage and declaration sites.
|
||||
- **Pro:** Matches user expectations for editor rename.
|
||||
- **Con:** Requires reliable references, collision checks, and write-safety across files.
|
||||
- **Maintainability:** Strong once references exist.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Rename is high trust. A partial or text-based rename can corrupt code silently, so scope must be explicit and conservative.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option B after semantic references are implemented. If delivered earlier, ship only a clearly limited local rename.
|
||||
|
||||
## Discussion
|
||||
|
||||
Do not implement rename before definition/references are resolved.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide whether rename waits for workspace references or ships a limited local-only wave.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0047
|
||||
ticket: pbs-lsp-code-actions
|
||||
title: PBS LSP Code Actions and Quick Fixes
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, code-actions, quick-fix]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS diagnostics are visible, but users do not get actionable quick fixes for common compiler/editor problems, making simple repairs slower than necessary.
|
||||
|
||||
## Context
|
||||
|
||||
The LSP maps diagnostics but does not announce codeActionProvider. Compiler diagnostics already carry codes and ranges, but not every diagnostic has enough structured repair data to generate safe edits.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Which diagnostics should receive quick fixes first?
|
||||
- [ ] Should code actions be produced from diagnostic codes only, or from structured compiler repair hints?
|
||||
- [ ] How should imports, reserved attributes, missing methods, and invalid Doc shapes be prioritized?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Diagnostic-code quick fixes
|
||||
|
||||
- **Approach:** Map known diagnostic codes to simple edits in the LSP layer.
|
||||
- **Pro:** Fast for a small set of obvious repairs.
|
||||
- **Con:** Couples fixes to diagnostic text/ranges and can become brittle.
|
||||
- **Maintainability:** Moderate if limited to trivial edits.
|
||||
|
||||
### Option B - Compiler repair hints
|
||||
|
||||
- **Approach:** Extend diagnostics with structured repair metadata and let the LSP map hints to code actions.
|
||||
- **Pro:** Keeps product logic close to compiler knowledge.
|
||||
- **Con:** Requires a new diagnostic/repair contract.
|
||||
- **Maintainability:** Strong for non-trivial fixes and future frontends.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Quick fixes are only useful if safe. Simple code-based fixes can ship first, but imports and generated stubs need stronger compiler context.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option B as the target design, with Option A allowed only for a small bootstrap set of unambiguous repairs.
|
||||
|
||||
## Discussion
|
||||
|
||||
This should follow diagnostics UX and import assistance for the first high-value fixes.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Pick the first three diagnostic codes eligible for safe quick fixes.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0048
|
||||
ticket: pbs-lsp-formatting
|
||||
title: PBS LSP Formatting
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, formatting]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS formatting is not automated, so style drifts across files, especially around attributes, services, blocks, imports, and multi-line Doc text blocks.
|
||||
|
||||
## Context
|
||||
|
||||
The LSP does not announce documentFormattingProvider. PBS has a parser and AST, but formatting must preserve documentation text block content while normalizing surrounding syntax and indentation.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Should formatting be AST-based, token-based, or hybrid to preserve comments and text blocks?
|
||||
- [ ] What canonical style should PBS use for attributes, braces, imports, params, and text blocks?
|
||||
- [ ] Should the first wave support full document formatting only, or also range/on-type formatting?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Token-preserving formatter
|
||||
|
||||
- **Approach:** Format from tokens and trivia, preserving comments and documentation text block contents.
|
||||
- **Pro:** Safer for active editing and text blocks.
|
||||
- **Con:** Harder to enforce deep structural layout.
|
||||
- **Maintainability:** Good if PBS formatting remains mostly syntactic.
|
||||
|
||||
### Option B - AST pretty-printer
|
||||
|
||||
- **Approach:** Reprint code from the AST using canonical style rules.
|
||||
- **Pro:** Produces consistent output.
|
||||
- **Con:** Risks losing comments/trivia and cannot handle malformed files well.
|
||||
- **Maintainability:** Strong only after AST/trivia ownership is explicit.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Formatting must not damage `Doc` text blocks. That makes trivia preservation a first-class requirement rather than an implementation detail.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option A or a hybrid token/AST formatter. Avoid a pure AST pretty-printer until comments/trivia are modeled.
|
||||
|
||||
## Discussion
|
||||
|
||||
Formatter decision should define canonical style before implementation.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide PBS canonical formatting rules for attributes, braces, imports, params, and text blocks.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0049
|
||||
ticket: pbs-lsp-import-assistance
|
||||
title: PBS LSP Import Assistance
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, imports, completion]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS users do not get import-aware assistance, so discovering exported symbols and adding the right import from barrels, stdlib, or project modules remains manual.
|
||||
|
||||
## Context
|
||||
|
||||
Completion already exists for local/editorial contexts, and stdlib imports are understood by the compiler pipeline. The LSP does not yet provide auto-import completion, organize imports, or import quick fixes.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Should auto-import target project modules, stdlib modules, or both in the first wave?
|
||||
- [ ] How should barrels and explicit module imports be ranked and rendered in completion?
|
||||
- [ ] Should organize imports be a code action, source action, formatter responsibility, or separate feature?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Import completion only
|
||||
|
||||
- **Approach:** Suggest symbols from known modules and include import detail, but do not edit imports automatically.
|
||||
- **Pro:** Low risk and improves discovery.
|
||||
- **Con:** Still leaves manual import edits.
|
||||
- **Maintainability:** Good as a stepping stone.
|
||||
|
||||
### Option B - Auto-import and organize imports
|
||||
|
||||
- **Approach:** Completion/code actions insert missing imports and source actions sort/remove unused imports.
|
||||
- **Pro:** Matches modern editor expectations.
|
||||
- **Con:** Requires robust module export indexing and edit placement rules.
|
||||
- **Maintainability:** Strong if built on a proper import graph.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Auto-import depends on knowing canonical exports and choosing an edit location. Doing that ad hoc in completion would create formatting and duplicate import issues.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option B as the target, but start with import-aware suggestions plus a limited missing-import quick fix.
|
||||
|
||||
## Discussion
|
||||
|
||||
This should be coordinated with code actions and formatter.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide first-wave import sources: stdlib only, project modules only, or both.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0050
|
||||
ticket: pbs-lsp-semantic-tokens-semantic-classification
|
||||
title: PBS LSP Semantic Token Classification
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, semantic-tokens]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS semantic highlighting exists, but parts of the token classification can remain lexical or superficial, which limits visual accuracy for same-looking identifiers with different semantic roles.
|
||||
|
||||
## Context
|
||||
|
||||
The current LSP announces full semantic tokens and maps frontend semantic presentation to VS Code. The compiler has semantic read surfaces that can classify symbols more accurately than raw tokenization.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Which token categories must become semantic identity-based first?
|
||||
- [ ] Should semantic tokens be produced from compiler semantic surfaces, parser AST, lexer tokens, or layered output?
|
||||
- [ ] How should tokens behave in files with syntax or semantic errors during active editing?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Lexical tokens with semantic overlays
|
||||
|
||||
- **Approach:** Keep lexer-based tokenization as baseline and overlay semantic categories where resolution succeeds.
|
||||
- **Pro:** Stable during broken edits and incremental to improve.
|
||||
- **Con:** Some unresolved identifiers remain visually generic.
|
||||
- **Maintainability:** Strong because fallback behavior is explicit.
|
||||
|
||||
### Option B - Fully semantic token stream
|
||||
|
||||
- **Approach:** Generate all semantic tokens from compiler semantic surfaces.
|
||||
- **Pro:** Maximum accuracy when analysis succeeds.
|
||||
- **Con:** Highlighting may disappear or degrade sharply on incomplete code.
|
||||
- **Maintainability:** Risky unless snapshot/error recovery is excellent.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Highlighting must be resilient while the user is typing. A perfect semantic pass that fails on partial code is worse than a layered model.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option A: lexical baseline plus semantic overlays from resolved symbols.
|
||||
|
||||
## Discussion
|
||||
|
||||
This can proceed independently but benefits from LSP snapshot/cache work.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Choose semantic overlay categories for the first pass.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0051
|
||||
ticket: pbs-lsp-performance-cache-and-snapshots
|
||||
title: PBS LSP Performance Cache and Snapshots
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, performance, caching]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
Several PBS LSP requests rebuild or reanalyze substantial project state, which can become slow or jittery as projects grow and as richer features are added.
|
||||
|
||||
## Context
|
||||
|
||||
The current bridge favors correctness and simplicity by invoking compiler pipeline analysis for diagnostics and editorial documents. A complete LSP needs snapshot caching, invalidation, cancellation, and predictable latency.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] What is the canonical project/document snapshot boundary for LSP requests?
|
||||
- [ ] Which requests can reuse semantic read surfaces safely across document changes?
|
||||
- [ ] How should cancellation, stale responses, and background reanalysis be handled?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Request-local analysis
|
||||
|
||||
- **Approach:** Keep each LSP request self-contained and rebuild analysis as needed.
|
||||
- **Pro:** Simple, deterministic, and less stateful.
|
||||
- **Con:** Latency grows with project size and feature richness.
|
||||
- **Maintainability:** Good for correctness, weak for interactive performance.
|
||||
|
||||
### Option B - Project snapshot cache
|
||||
|
||||
- **Approach:** Maintain per-project analysis snapshots with document overlays, invalidation, and cancellation-aware request handling.
|
||||
- **Pro:** Required for responsive definition, references, rename, and semantic tokens.
|
||||
- **Con:** Introduces lifecycle complexity and stale-result risks.
|
||||
- **Maintainability:** Strong if snapshot ownership and invalidation are explicit.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
A complete LSP needs shared state, but shared state must not leak stale analysis into edits. The decision is about the boundary, not just caching.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option B before implementing workspace-wide features like references and rename.
|
||||
|
||||
## Discussion
|
||||
|
||||
Define snapshot lifecycle, invalidation triggers, and cancellation policy.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide whether snapshot caching is a prerequisite for references/rename or can be staged later.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0052
|
||||
ticket: pbs-lsp-completion-depth
|
||||
title: PBS LSP Completion Depth
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, completion]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS completion works for core cases, but a complete daily-use experience needs ranking, resolve details, snippets, overload handling, context-aware suggestions, and richer documentation.
|
||||
|
||||
## Context
|
||||
|
||||
The current LSP announces completion with trigger character '.' and returns detail/documentation for resolved compiler candidates. It does not use resolveProvider, snippets, broad trigger contexts, or advanced ranking.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Which completion contexts should be supported first beyond member access?
|
||||
- [ ] Should completion use resolveProvider for expensive documentation/details or return everything eagerly?
|
||||
- [ ] How should overloads, snippets, imports, keywords, and stdlib candidates be ranked?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Eager rich completion
|
||||
|
||||
- **Approach:** Return labels, details, docs, and snippets directly in every completion response.
|
||||
- **Pro:** Simple client behavior and immediate docs.
|
||||
- **Con:** Can become expensive for broad/global completion.
|
||||
- **Maintainability:** Good while candidate sets remain small.
|
||||
|
||||
### Option B - Completion resolve provider
|
||||
|
||||
- **Approach:** Return lightweight candidates first and populate expensive docs/details through `completionItem/resolve`.
|
||||
- **Pro:** Scales better for large candidate sets and import-aware suggestions.
|
||||
- **Con:** Requires client/server resolve plumbing and stable candidate identities.
|
||||
- **Maintainability:** Strong for a full LSP.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
The current eager model is fine for scoped completions, but global/import-aware completion may need resolve to avoid latency.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer a staged approach: keep eager for current contexts, design resolve before broad workspace/import completion.
|
||||
|
||||
## Discussion
|
||||
|
||||
Define completion contexts and ranking before adding snippets or resolve.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
List first-wave completion contexts beyond member access.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0053
|
||||
ticket: pbs-lsp-folding-and-selection-ranges
|
||||
title: PBS LSP Folding and Selection Ranges
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, folding, selection-range]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS users do not get structural folding or smart selection ranges, so navigating and selecting nested functions, blocks, services, attributes, and Doc text blocks is more manual than it should be.
|
||||
|
||||
## Context
|
||||
|
||||
The parser knows syntactic spans for declarations and blocks. The LSP currently does not announce foldingRangeProvider or selectionRangeProvider.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Should folding ranges be computed from AST spans, token pairs, or a hybrid that handles malformed files?
|
||||
- [ ] Which constructs should fold in the first wave: imports, declarations, blocks, attributes, text blocks, or all of them?
|
||||
- [ ] What selection range hierarchy should VS Code expose for identifiers, calls, params, blocks, and declarations?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Parser span ranges
|
||||
|
||||
- **Approach:** Use AST spans for declarations, blocks, parameter lists, and text blocks.
|
||||
- **Pro:** Accurate for well-formed code and easy to map to LSP ranges.
|
||||
- **Con:** Can degrade when parsing fails mid-file.
|
||||
- **Maintainability:** Good because parser owns structure.
|
||||
|
||||
### Option B - Token pair scanning
|
||||
|
||||
- **Approach:** Compute ranges from brace/paren/text-block tokens without relying on full AST validity.
|
||||
- **Pro:** More resilient during malformed edits.
|
||||
- **Con:** Less semantically meaningful and can produce noisy ranges.
|
||||
- **Maintainability:** Good only as fallback.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Folding and selection should keep working while typing. AST ranges are higher quality, but token fallback may be needed for broken files.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer a hybrid: AST ranges first, token fallback for unmatched/incomplete constructs.
|
||||
|
||||
## Discussion
|
||||
|
||||
This is an editor UX feature with low semantic dependency and can be planned independently.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide first-wave foldable constructs and selection hierarchy.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0054
|
||||
ticket: pbs-lsp-diagnostics-ux
|
||||
title: PBS LSP Diagnostics UX
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, diagnostics, ux]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS diagnostics reach VS Code, but the editor experience can still be hard to act on when ranges, related information, severity, and phase context are too generic.
|
||||
|
||||
## Context
|
||||
|
||||
The LSP maps compiler diagnostics to LSP diagnostics. Compiler diagnostics include phase/code/message/range in several paths, but not all editor-friendly fields are consistently exposed.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Which diagnostics need better ranges or related information first?
|
||||
- [ ] Should diagnostic source include compiler phase, frontend, or both?
|
||||
- [ ] What structured diagnostic metadata is needed for future quick fixes without coupling UI to text messages?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Mapper-only UX improvements
|
||||
|
||||
- **Approach:** Improve LSP diagnostic mapping using existing diagnostic fields.
|
||||
- **Pro:** Quick improvements to source, severity, and display consistency.
|
||||
- **Con:** Cannot add missing related spans or repair metadata that compiler diagnostics do not expose.
|
||||
- **Maintainability:** Good for presentation-only changes.
|
||||
|
||||
### Option B - Structured diagnostic contract
|
||||
|
||||
- **Approach:** Extend compiler diagnostics with editor-facing metadata such as phase, related locations, stable quick-fix hints, and refined ranges.
|
||||
- **Pro:** Enables better diagnostics and future code actions without parsing message text.
|
||||
- **Con:** Requires compiler/core diagnostic API changes.
|
||||
- **Maintainability:** Strong as the foundation for quick fixes and richer UX.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Some improvements belong in the LSP mapper, but the most valuable changes require structured information at diagnostic creation time.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option B as the target, with mapper-only cleanup allowed for low-risk display fixes.
|
||||
|
||||
## Discussion
|
||||
|
||||
This agenda should inform code actions before quick fixes become broad.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Inventory high-frequency diagnostics and identify which need better ranges, related information, or repair hints.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0055
|
||||
ticket: pbs-lsp-document-links
|
||||
title: PBS LSP Document Links
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, document-links, imports]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS import/module references and asset-like surfaces are plain text in VS Code, so users cannot click through to imported modules or related project resources.
|
||||
|
||||
## Context
|
||||
|
||||
The compiler understands module references and project files. The LSP does not announce documentLinkProvider, and the VS Code extension delegates all language behavior to the server.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Which references should become document links first: imports, barrels, stdlib modules, assets/addressables, or docs?
|
||||
- [ ] How should virtual or stdlib resources be represented as link targets?
|
||||
- [ ] Should document links overlap with go-to-definition or remain a separate lightweight navigation feature?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Import/module links only
|
||||
|
||||
- **Approach:** Expose `documentLink` for module references such as `@sdk:gfx` and barrel paths.
|
||||
- **Pro:** Narrow, useful, and mostly aligned with existing module resolution.
|
||||
- **Con:** Does not cover assets/addressables or documentation links.
|
||||
- **Maintainability:** Strong first wave.
|
||||
|
||||
### Option B - General resource links
|
||||
|
||||
- **Approach:** Link imports, stdlib modules, assets, addressables, and possibly documentation/resource surfaces.
|
||||
- **Pro:** Richer navigation across project resources.
|
||||
- **Con:** Requires resource-specific target policy and may overlap with definition.
|
||||
- **Maintainability:** Good only after resource ownership is defined.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Document links should remain lightweight. If a link requires semantic identity and symbol resolution, it may belong in go-to-definition instead.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option A first: imports and module references only.
|
||||
|
||||
## Discussion
|
||||
|
||||
Coordinate stdlib target handling with go-to-definition.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide first-wave link targets and how stdlib/module URIs are represented.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0056
|
||||
ticket: pbs-lsp-call-and-type-hierarchy
|
||||
title: PBS LSP Call and Type Hierarchy
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, call-hierarchy, type-hierarchy]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS users cannot inspect call relationships or type/member relationships from the editor, which limits understanding of larger projects after basic navigation exists.
|
||||
|
||||
## Context
|
||||
|
||||
Call hierarchy and type hierarchy are advanced LSP features. They depend on reliable semantic identity, references, callsite classification, and type ownership surfaces, so they should probably follow definition/references rather than precede them.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Should call hierarchy and type hierarchy be one discussion or split after dependencies are clearer?
|
||||
- [ ] Which relationships are valuable for PBS: function call graph, service method calls, struct methods, contract implementations, host/intrinsic calls, or all of them?
|
||||
- [ ] What prerequisite symbol/reference infrastructure must be completed before this feature is safe to implement?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Call hierarchy only
|
||||
|
||||
- **Approach:** Implement incoming/outgoing calls for functions and methods after callsite references are stable.
|
||||
- **Pro:** Directly useful and builds on executable call resolution.
|
||||
- **Con:** Does not cover type ownership, contracts, or implementations.
|
||||
- **Maintainability:** Strong if based on the reference/callsite index.
|
||||
|
||||
### Option B - Split call hierarchy and type hierarchy
|
||||
|
||||
- **Approach:** Treat call graph and type/member/contract hierarchy as separate decisions and implementations.
|
||||
- **Pro:** Avoids mixing two different semantic models.
|
||||
- **Con:** Creates more workflow artifacts and sequencing work.
|
||||
- **Maintainability:** Strong; each feature can evolve on its own contract.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Call hierarchy and type hierarchy share LSP vocabulary but not the same compiler data. Coupling them too early would make the first implementation harder to reason about.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option B: split after this agenda confirms dependencies, likely implementing call hierarchy first.
|
||||
|
||||
## Discussion
|
||||
|
||||
This should wait until definition and references are complete.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide whether to split into two discussions before moving to decisions.
|
||||
@@ -1,79 +0,0 @@
|
||||
---
|
||||
id: AGD-0067
|
||||
ticket: multi-frontend-architectural-tests
|
||||
title: Testes arquiteturais para fronteiras multi-frontend
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [compiler, compiler-general, studio, frontend, architecture, tests, multi-frontend]
|
||||
---
|
||||
|
||||
# Agenda - Criar testes arquiteturais
|
||||
|
||||
## Objetivo
|
||||
|
||||
Domain owner: `compiler/general`, com impacto em `studio` e `vm-arch`.
|
||||
|
||||
Definir testes que protejam fronteiras: backend comum sem PBS, IR comum sem AST PBS, Studio comum sem instanciacao PBS fora do composition root e runtime neutro.
|
||||
|
||||
## Contexto atual
|
||||
|
||||
O repo ja tem testes Java para backend, bytecode e IRVM. ArchUnit pode ser util, mas o alinhamento proibe adicionar biblioteca arquitetural quando testes simples bastarem.
|
||||
|
||||
## Escopo
|
||||
|
||||
- Escolher ferramenta minima.
|
||||
- Definir regras por pacote.
|
||||
- Adicionar testes que sejam baratos e claros.
|
||||
|
||||
## Fora de escopo
|
||||
|
||||
- Cobrir toda arquitetura do monorepo.
|
||||
- Adicionar ArchUnit sem justificativa concreta.
|
||||
- Bloquear referencias PBS em testes PBS ou no frontend PBS.
|
||||
|
||||
## Arquivos e componentes a inspecionar
|
||||
|
||||
- `build.gradle.kts` e version catalog se houver.
|
||||
- `prometeu-compiler/prometeu-build-pipeline/src/test/java/...`
|
||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/test/java/...`
|
||||
- `prometeu-studio/src/test/java/...`
|
||||
- pacotes runtime/PVM quando presentes
|
||||
|
||||
## Alteracoes propostas
|
||||
|
||||
Opcao A: testes Java/reflection simples para imports, nomes de tipos e packages publicos.
|
||||
|
||||
Opcao B: ArchUnit caso a quantidade de regras e modulos justifique.
|
||||
|
||||
Recomendacao inicial: comecar com testes simples; reavaliar ArchUnit se as regras virarem frageis.
|
||||
|
||||
## Estrategia de implementacao
|
||||
|
||||
Definir allowlist de packages PBS, composition root e testes PBS. Escrever verificacoes independentes por dominio para falhas legiveis.
|
||||
|
||||
## Testes necessarios
|
||||
|
||||
- Backend/common nao importa `frontend.pbs`, `parser.pbs` ou `semantic.pbs`.
|
||||
- IR comum nao expoe tipos PBS.
|
||||
- Studio comum nao instancia servicos PBS fora da allowlist.
|
||||
- Runtime nao usa nomenclatura ou semantica PBS.
|
||||
|
||||
## Criterios de aceitacao
|
||||
|
||||
- Regras rodam no build local.
|
||||
- Falhas apontam arquivo/pacote responsavel.
|
||||
- Excecoes autorizadas estao documentadas.
|
||||
|
||||
## Riscos
|
||||
|
||||
- Teste textual produzir falso positivo por docs ou fixtures.
|
||||
- Criar barreira rigida antes de definir provider e lifecycle.
|
||||
|
||||
## Decisoes que devem ser registradas
|
||||
|
||||
- Ferramenta escolhida.
|
||||
- Allowlist de packages.
|
||||
- Ordem de introducao das regras.
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
---
|
||||
id: AGD-0068
|
||||
ticket: multi-frontend-avoid-premature-abstractions
|
||||
title: Evitar abstracoes prematuras na preparacao multi-frontend
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [compiler, compiler-general, studio, frontend, architecture, multi-frontend, simplicity]
|
||||
---
|
||||
|
||||
# Agenda - Evitar abstracoes prematuras
|
||||
|
||||
## Objetivo
|
||||
|
||||
Domain owner: `compiler/general`, com impacto em `studio`.
|
||||
|
||||
Definir limites para a preparacao multi-frontend: remover acoplamento com baixo custo sem construir marketplace, hot reload, RPC, sandbox ou infraestrutura generica antes da necessidade real.
|
||||
|
||||
## Contexto atual
|
||||
|
||||
O PBS continuara sendo o unico frontend implementado no curto prazo. O objetivo e preparar contratos, fronteiras e testes de neutralidade, nao criar uma plataforma completa de plugins.
|
||||
|
||||
## Escopo
|
||||
|
||||
- Estabelecer principios para as agendas derivadas.
|
||||
- Definir o que e explicitamente proibido nesta fase.
|
||||
- Criar criterio para rejeitar abstracoes sem uso real.
|
||||
|
||||
## Fora de escopo
|
||||
|
||||
- Plugin marketplace.
|
||||
- Carregamento dinamico de JARs.
|
||||
- RPC, sockets, process supervisor ou version negotiation complexa.
|
||||
- Service locator global.
|
||||
|
||||
## Arquivos e componentes a inspecionar
|
||||
|
||||
- `prometeu-compiler/prometeu-frontend-registry/...`
|
||||
- `prometeu-app/src/main/java/p/studio/AppContainer.java`
|
||||
- `prometeu-studio/src/main/java/p/studio/...`
|
||||
- planos futuros derivados das discussions multi-frontend
|
||||
|
||||
## Alteracoes propostas
|
||||
|
||||
Opcao A: registrar esta decisao como guardrail transversal antes das demais.
|
||||
|
||||
Opcao B: deixar cada agenda repetir suas restricoes locais.
|
||||
|
||||
Recomendacao inicial: criar uma decisao curta e transversal apos discussao, para guiar provider, language services, synthetic frontend e testes arquiteturais.
|
||||
|
||||
## Estrategia de implementacao
|
||||
|
||||
Transformar o alinhamento em criterios de review: interface pequena, registro explicito, DI/composicao, records imutaveis e testes; rejeitar infra que nao seja exigida pelo PBS ou pelo frontend sintetico de teste.
|
||||
|
||||
## Testes necessarios
|
||||
|
||||
- Nao ha teste direto para simplicidade, mas plans devem incluir criterio de aceite contra reflection/scanning/RPC quando aplicavel.
|
||||
- Testes arquiteturais podem proteger contra service locator global ou acoplamentos indevidos.
|
||||
|
||||
## Criterios de aceitacao
|
||||
|
||||
- Plans derivados nao introduzem infraestrutura de plugin antes da necessidade.
|
||||
- Registro manual do PBS e suficiente.
|
||||
- O frontend sintetico prova neutralidade sem virar plataforma externa.
|
||||
|
||||
## Riscos
|
||||
|
||||
- Usar "evitar abstracao" como desculpa para manter acoplamento PBS.
|
||||
- Criar contratos tao pequenos que precisem ser quebrados imediatamente.
|
||||
|
||||
## Decisoes que devem ser registradas
|
||||
|
||||
- Guardrails obrigatorios para esta fase.
|
||||
- Lista de mecanismos proibidos.
|
||||
- Criterio para aceitar uma nova abstracao.
|
||||
|
||||
@@ -462,8 +462,6 @@ Campos:
|
||||
* `sortText`: prefixado para impor bucket (ex.: `"1_"`, `"2_"`)
|
||||
* `filterText`: label
|
||||
|
||||
Callable completion details and snippets must consume parameter names from the compiler semantic callable model. LSP/editor code must not invent display names such as `arg0` or `arg1`; missing semantic names should remain visibly incomplete rather than being presented as API names.
|
||||
|
||||
---
|
||||
|
||||
## Tarefas de implementação
|
||||
|
||||
@@ -65,8 +65,6 @@ Habilitar `references`, `prepareRename`, `rename` com regras de segurança.
|
||||
|
||||
* Type facts básicos: `NodeId -> TypeId`
|
||||
* Modelo de assinatura: para functions (params, retorno)
|
||||
* Parameter names for signatureHelp and hover come from the compiler semantic callable model, including stdlib, host-backed, builtin, and intrinsic callables.
|
||||
* Generated placeholders such as `arg0` must not appear in LSP completion, signatureHelp, or hover output.
|
||||
|
||||
### Testes
|
||||
|
||||
|
||||
@@ -76,18 +76,10 @@ Mandatory declaration metadata on required declaration nodes includes:
|
||||
2. declared signature/surface when applicable (parameters/return),
|
||||
3. declaration-level syntactic flags/attributes required by later phases,
|
||||
4. stable `file/start/end` attribution,
|
||||
5. lifecycle-marker metadata when a declaration carries `[Init]` or `[Frame]`,
|
||||
6. documentation attribute metadata when a declaration carries `[Doc(markdown = """...""")]`.
|
||||
5. lifecycle-marker metadata when a declaration carries `[Init]` or `[Frame]`.
|
||||
|
||||
Missing required attribution or metadata on mandatory nodes is non-conformant.
|
||||
|
||||
Documentation metadata rules:
|
||||
|
||||
- The AST MUST preserve the `Doc` attribute name, the `markdown` argument name, the raw documentation text block payload, and source attribution for the whole attribute and payload.
|
||||
- The AST MUST distinguish documentation text block payloads from ordinary string literals.
|
||||
- The AST MUST preserve enough attribution for later diagnostics to point at malformed or invalid `Doc` usage.
|
||||
- AST construction MUST NOT normalize documentation text block content in a way that loses source-observable parse meaning before the semantic normalization step.
|
||||
|
||||
## 8. Mandatory Declaration Families
|
||||
|
||||
The v1 AST must represent, at minimum, declaration families for:
|
||||
@@ -112,8 +104,6 @@ Lifecycle-observable declarations must preserve marker metadata explicitly:
|
||||
- top-level `fn` marked with `[Frame]`,
|
||||
- and host method signatures marked with `[InitAllowed]`.
|
||||
|
||||
Documentation-observable declarations must preserve `Doc` metadata explicitly on every accepted named API declaration surface that carries `[Doc(markdown = """...""")]`.
|
||||
|
||||
## 9. Mandatory Statement and Expression Families
|
||||
|
||||
The v1 AST must represent statement/expression families for the supported core syntax slice, including at minimum:
|
||||
|
||||
@@ -82,8 +82,7 @@ The following inputs are already fixed elsewhere and must not be contradicted he
|
||||
- Stable source span metadata is required at the token level and must remain useful to later diagnostics.
|
||||
- Traps are fatal runtime outcomes rather than a recoverable userland diagnostic flow.
|
||||
- Qualitative cost facts such as retention-bearing operations and host-boundary crossings are normative, but quantitative performance metrics are not.
|
||||
- PBS requires deterministic diagnostics for source-form globals, lifecycle markers, and init admission.
|
||||
- Published-wrapper, boot-guard, synthetic-origin, and invalid-lifecycle-declaration failures are compiler-general. See `docs/specs/compiler/19. Verification and Safety Checks Specification.md` section 11 and `docs/specs/compiler/20. IRBackend to IRVM Lowering Specification.md`.
|
||||
- Topic `19` requires deterministic diagnostics for globals, lifecycle markers, init admission, and published-wrapper structural failures.
|
||||
|
||||
## 6. Required Diagnostic Phases
|
||||
|
||||
@@ -98,8 +97,6 @@ PBS-facing tooling must distinguish at least the following external diagnostic p
|
||||
|
||||
`linking` is a first-class phase in the external diagnostics contract and must not be collapsed away into a generic resolution bucket.
|
||||
|
||||
The `host-binding/capability admission` phase covers the source shape of `[Host]` and `[Capability]`. Canonical host-binding identity and capability consistency over `IRReservedMetadata` are platform-owned and are not moved by this specification.
|
||||
|
||||
This document does not require one finer-grained public phase split for verifier internals, artifact offsets, or transport-specific backend stages beyond what is stated here.
|
||||
|
||||
## 7. Required Diagnostic Identity, Payload, and Attribution
|
||||
@@ -183,7 +180,7 @@ At minimum, the PBS diagnostics baseline must cover:
|
||||
5. malformed, unauthorized, or capability-rejected host usage required by `6.2. Host ABI Binding and Loader Resolution Specification.md` and `7. Cartridge Manifest and Runtime Capabilities Specification.md`,
|
||||
6. source-attributable backend-originated failures that remain user-actionable under normative lowering or load-facing rules.
|
||||
7. dependency-scoped fail-fast admission at frontend boundary: when one module is rejected, modules that import it (directly or transitively) must not be emitted, while diagnostics collection for independent modules must continue.
|
||||
8. lifecycle-marker and source-form global diagnostics, including:
|
||||
8. lifecycle and globals diagnostics required by topic `19`, including:
|
||||
- `global initializer uses unsupported form`,
|
||||
- `global dependency cycle detected`,
|
||||
- `global import must resolve through a global barrel entry`,
|
||||
@@ -197,13 +194,16 @@ At minimum, the PBS diagnostics baseline must cover:
|
||||
- `project init must be colocated with frame`,
|
||||
- `Init attribute target invalid`,
|
||||
- `InitAllowed is valid only on SDK host methods`,
|
||||
- `host call not allowed during init`.
|
||||
9. compiler-general lifecycle-assembly and IRVM-precondition failures, which this PBS catalog MUST NOT claim as PBS required coverage; see `docs/specs/compiler/19. Verification and Safety Checks Specification.md` section 11 and `docs/specs/compiler/20. IRBackend to IRVM Lowering Specification.md`.
|
||||
10. symbolic asset-reference diagnostics required by backend-owned `Addressable` resolution, including:
|
||||
- `host call not allowed during init`,
|
||||
- `synthetic wrapper entrypoint missing`,
|
||||
- `published entrypoint is not function index 0`,
|
||||
- `hidden boot guard is missing`,
|
||||
- `synthetic callable origin missing`.
|
||||
9. symbolic asset-reference diagnostics required by backend-owned `Addressable` resolution, including:
|
||||
- unresolved terminal asset reference,
|
||||
- namespace-versus-terminal asset misuse,
|
||||
- structurally invalid symbolic asset path admitted by source syntax but rejected by semantic surface rules.
|
||||
11. ignored-value diagnostics for expression statements, including:
|
||||
10. ignored-value diagnostics for expression statements, including:
|
||||
- a stable warning when a materialized value is produced and then ignored,
|
||||
- and no warning for unit-like expression statements.
|
||||
|
||||
@@ -214,19 +214,6 @@ Reserved-attribute diagnostics for host-backed asset lowering must also cover:
|
||||
- out-of-range `AssetLowering.param` indexes,
|
||||
- and `AssetLowering` targets whose selected parameter is not statically typed as `Addressable`.
|
||||
|
||||
Documentation attribute diagnostics must cover:
|
||||
|
||||
- unterminated documentation text block syntax,
|
||||
- `Doc` used without the required `markdown` argument,
|
||||
- `Doc` with extra or unknown arguments,
|
||||
- `Doc` with a non-documentation-text-block payload,
|
||||
- duplicate `Doc` on the same declaration,
|
||||
- `Doc` applied to a parameter or other non-documentable surface,
|
||||
- normalized empty or whitespace-only documentation payload,
|
||||
- and rejected aliases or alternate forms such as `text`, positional arguments, `html`, `format`, `Document`, `Documentation`, or `md"""..."""`.
|
||||
|
||||
Diagnostics for duplicate `Doc` attributes must be static semantic diagnostics and should include a related site for the conflicting declaration attribute when available.
|
||||
|
||||
At minimum, host-admission diagnostics must cover missing or malformed host capability metadata and unknown or undeclared capability names.
|
||||
|
||||
Only backend-originated failures that remain source-attributable and user-actionable belong to the PBS-facing diagnostics contract.
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# PBS Lowering IRBackend Specification
|
||||
|
||||
Status: Draft v1 (PBS Frontend Scope + Common Handoff Emission)
|
||||
Applies to: first lowering boundary from bound PBS frontend model into the common `IRBackend`/`IRBackendFile` handoff
|
||||
Status: Draft v1 (Frontend Scope + Backend Handoff Addendum)
|
||||
Applies to: first lowering boundary from bound PBS frontend model into `IRBackend`/`IRBackendFile`, plus executable-backend handoff obligations at this boundary
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This document defines the normative frontend lowering contract from PBS source semantics to the common `IRBackend` handoff.
|
||||
This document defines the normative frontend lowering contract from PBS source semantics to `IRBackend`.
|
||||
|
||||
Its purpose is to keep PBS lowering deterministic while preserving the common frontend-to-backend contract owned by compiler-general backend specs.
|
||||
Its purpose is to keep the first lowering deterministic and shared across implementations while PBS and backend design evolve.
|
||||
|
||||
## 2. Scope
|
||||
|
||||
@@ -18,7 +18,7 @@ This document defines:
|
||||
- semantic obligations preserved in `IRBackend`,
|
||||
- deterministic rejection behavior for unsupported frontend-lowering forms,
|
||||
- diagnostics attribution obligations for lowering failures in frontend scope,
|
||||
- PBS obligations for emitting the common executable `IRBackend` handoff,
|
||||
- executable-backend handoff obligations at the `IRBackend` boundary,
|
||||
- and backend-owned symbolic lowering obligations for asset-facing references.
|
||||
|
||||
This document does not define:
|
||||
@@ -26,8 +26,7 @@ This document does not define:
|
||||
- VM lowering (`IRVM`),
|
||||
- bytecode/PBX mapping,
|
||||
- runtime execution behavior,
|
||||
- verifier/loader internals,
|
||||
- or common backend ownership of the `IRBackend -> IRVM` contract.
|
||||
- verifier/loader internals.
|
||||
|
||||
Those concerns belong to shared acceptance specs under `docs/specs/compiler`.
|
||||
|
||||
@@ -76,9 +75,9 @@ When the active source slice depends on a backend-owned symbolic surface such as
|
||||
- the frontend must not query domain services directly to discover operational assets;
|
||||
- and lowering must preserve enough identity for the backend to complete final operational resolution.
|
||||
|
||||
## 6. PBS IRBackend Emission Obligations
|
||||
## 6. IRBackend Preserved Obligations
|
||||
|
||||
For each admitted PBS source unit and callable in the current lowering slice, PBS lowering must emit `IRBackend` that preserves at minimum:
|
||||
For each admitted source unit and callable in the current lowering slice, `IRBackend` must preserve at minimum:
|
||||
|
||||
1. callable identity (name/category as applicable),
|
||||
2. callable arity,
|
||||
@@ -86,18 +85,14 @@ For each admitted PBS source unit and callable in the current lowering slice, PB
|
||||
4. source attribution anchor (`file + span`) for diagnostics and traceability,
|
||||
5. source-observable parse intent for statement/expression structure (including precedence/associativity outcome already fixed by AST shape).
|
||||
6. deterministic `requiredCapabilities` derived from admitted host-binding metadata for packer/runtime-manifest assistance.
|
||||
7. a typed `IRLifecycleDeclaration` for executable programs, with file-init fragment, optional project-init, and required frame-root references,
|
||||
8. explicit user globals and frontend-lowered file-init fragments required by later common lifecycle assembly,
|
||||
7. compiler-selected published-wrapper entrypoint identity for backend handoff,
|
||||
8. explicit global and synthetic lifecycle structure required by executable lowering.
|
||||
9. backend-owned symbolic identities that must survive to later executable lowering, including symbolic asset references when admitted by the source slice.
|
||||
|
||||
PBS lowering MUST NOT emit module init, project-init wrapper, published frame wrapper, physical entrypoint, or boot guard. Those artifacts are produced exclusively by common lifecycle assembly.
|
||||
|
||||
Lowering must not collapse source categories in a way that erases required declaration/callable identity needed by downstream diagnostics or conformance assertions.
|
||||
|
||||
The normative contract is obligation-based, not tied to one mandatory in-memory class graph.
|
||||
|
||||
`IRBackend` itself is the common frontend-to-backend executable handoff. This PBS spec owns only the PBS-specific admission and translation path into that handoff. Common backend rules for consuming `IRBackend` are owned by `docs/specs/compiler/20. IRBackend to IRVM Lowering Specification.md`.
|
||||
|
||||
## 7. Deterministic Rejection Policy
|
||||
|
||||
If a source form is outside current frontend-lowering support:
|
||||
@@ -116,7 +111,7 @@ For multi-module builds, lowering admission must apply dependency-scoped fail-fa
|
||||
|
||||
## 8. Conformance Boundary
|
||||
|
||||
PBS emission into `IRBackend` is the first PBS lowering boundary (frontend responsibility).
|
||||
`IRBackend` is the first lowering boundary (frontend responsibility).
|
||||
|
||||
Conformance-valid claims at this boundary require Gate U evidence from `docs/specs/compiler/13. Conformance Test Specification.md`.
|
||||
|
||||
@@ -153,9 +148,9 @@ This document is healthy when:
|
||||
3. deterministic rejection policy is explicit and test-backed,
|
||||
4. and scope boundaries with general/backend acceptance specs are explicit.
|
||||
|
||||
## 12. PBS Executable Handoff Emission Obligations (v1)
|
||||
## 12. Executable Backend Handoff Addendum (v1)
|
||||
|
||||
For executable backends, PBS lowering must emit `IRBackend` satisfying the additional handoff obligations below before common backend lowering starts.
|
||||
For executable backends, the `IRBackend` output from this frontend boundary must satisfy the additional handoff obligations below.
|
||||
|
||||
### 12.1 Callable obligations
|
||||
|
||||
@@ -175,7 +170,7 @@ Each executable callsite in `IRBackend` must be classified into exactly one cate
|
||||
2. `CALL_HOST`,
|
||||
3. `CALL_INTRINSIC`.
|
||||
|
||||
PBS lowering must not leave this category for backend inference by textual heuristics.
|
||||
Backend lowering must not infer this category by textual heuristics.
|
||||
|
||||
### 12.3 Host-backed metadata obligations
|
||||
|
||||
@@ -192,11 +187,11 @@ When a host-backed callsite also depends on backend-owned symbolic asset lowerin
|
||||
- the frontend boundary MUST preserve which callsite argument is asset-facing;
|
||||
- for PBS v1 this asset-facing designation is carried by reserved host metadata `[AssetLowering(param = N)]`;
|
||||
- the preserved symbolic operand MUST remain attributable to a backend-provided `Addressable` identity;
|
||||
- common backend stages MUST be able to rewrite that symbolic operand into runtime-facing `asset_id` before the final low-level host path is emitted.
|
||||
- backend stages MUST be able to rewrite that symbolic operand into runtime-facing `asset_id` before the final low-level host path is emitted.
|
||||
|
||||
When an expression statement leaves a materialized runtime value on the stack:
|
||||
|
||||
- PBS lowering into `IRBackend` MUST emit explicit discard behavior rather than relying on implicit backend stack cleanup;
|
||||
- `IRBackend` lowering MUST emit explicit discard behavior rather than relying on implicit backend stack cleanup;
|
||||
- for single-slot materialized values this discard is represented by `POP`;
|
||||
- and the discard path MUST preserve stack-accounting validity for subsequent backend lowering stages.
|
||||
|
||||
@@ -223,18 +218,20 @@ It does not replace:
|
||||
2. `docs/specs/compiler/21. IRVM Optimization Pipeline Specification.md`,
|
||||
3. or `docs/specs/compiler/15. Bytecode and PBX Mapping Specification.md`.
|
||||
|
||||
### 12.7 Executable Lifecycle Declaration Obligation
|
||||
### 12.7 Executable Lifecycle and Published Wrapper Obligation
|
||||
|
||||
For executable PBS frontends, PBS lowering MUST emit a typed `IRLifecycleDeclaration` rather than assembling the published lifecycle.
|
||||
For executable PBS frontends, backend handoff must preserve the compiler-selected published wrapper rather than a frontend-declared nominal entrypoint.
|
||||
|
||||
At frontend `IRBackend` emission time:
|
||||
At `IRBackend` emission time:
|
||||
|
||||
1. PBS MUST retain marker admission for `[Init]`, `[Frame]`, and `InitAllowed`,
|
||||
2. PBS MUST emit typed references for:
|
||||
- file-init fragments that include global materialization and non-project `[Init]`,
|
||||
- the optional project-init callable, which is the `[Init]` colocated with `[Frame]`,
|
||||
- and the required frame-root callable marked with `[Frame]`,
|
||||
3. the colocated project init MUST be excluded from file-init fragments,
|
||||
4. module order in the declaration MUST propagate the explicit dependency order already derived from resolved project/module data, without sorting by `FileId`, textual module name, or synthetic callable name,
|
||||
5. PBS MUST NOT emit module init, project-init wrapper, published frame wrapper, physical entrypoint, or boot guard,
|
||||
6. and common lifecycle assembly remains the owner of derived artifacts, including the published wrapper that becomes the physical entrypoint and owns the final frame return.
|
||||
1. the lowered graph must contain explicit lifecycle structure for:
|
||||
- user-authored globals,
|
||||
- file init fragments,
|
||||
- module init,
|
||||
- project init when present,
|
||||
- and the published frame wrapper,
|
||||
2. the published frame wrapper must be the effective entrypoint identity handed to backend stages,
|
||||
3. the userland callable marked with `[Frame]` must remain distinguishable as the logical frame root,
|
||||
4. the wrapper must own final `FRAME_RET`,
|
||||
5. backend stages must not reintroduce manifest-owned or `FrontendSpec`-owned nominal entrypoint authority,
|
||||
6. and hidden compiler-owned lifecycle state such as the boot guard must remain structurally distinguishable from user globals.
|
||||
|
||||
@@ -114,13 +114,6 @@ String literals:
|
||||
- delimited by `"`.
|
||||
- supported escapes: `\\`, `\"`, `\n`, `\r`, `\t`.
|
||||
|
||||
Documentation text block literals:
|
||||
|
||||
- delimited by `"""`.
|
||||
- valid only as the value of the `markdown` argument in the reserved `[Doc(markdown = """...""")]` attribute surface.
|
||||
- not part of the runtime expression literal surface in v1 core.
|
||||
- preserve authored text for later documentation normalization.
|
||||
|
||||
Boolean literals:
|
||||
|
||||
- `true`, `false`.
|
||||
@@ -248,8 +241,7 @@ Attribute ::= '[' Identifier AttrArgs? ']'
|
||||
AttrArgs ::= '(' AttrArgList? ')'
|
||||
AttrArgList ::= AttrArg (',' AttrArg)*
|
||||
AttrArg ::= Identifier '=' AttrValue
|
||||
AttrValue ::= StringLit | IntLit | BoolLit | DocTextBlock
|
||||
DocTextBlock ::= '"""' DocTextBlockChar* '"""'
|
||||
AttrValue ::= StringLit | IntLit | BoolLit
|
||||
```
|
||||
|
||||
Rules:
|
||||
@@ -258,16 +250,11 @@ Rules:
|
||||
- Attributes do not introduce values, types, callables, or modules by themselves.
|
||||
- In v1 core, ordinary user-authored modules MUST reject attributes unless another specification explicitly permits them.
|
||||
- Ordinary userland source MAY use `[Init]` and `[Frame]` only on top-level `fn` declarations.
|
||||
- Ordinary userland source MAY use `[Doc(markdown = """...""")]` on named API declarations where the static semantics specification permits documentation.
|
||||
- Reserved stdlib/toolchain interface modules MAY use attributes where explicitly allowed by syntax and semantics.
|
||||
- Reserved stdlib/toolchain interface modules MAY additionally use `[InitAllowed]` only on `declare host` method signatures where another specification explicitly permits it.
|
||||
- Attribute interpretation is compile-time only unless another specification explicitly lowers its effect into runtime-facing metadata.
|
||||
- Reserved attribute names used by builtin-type and intrinsic shells do not become ordinary value-level syntax.
|
||||
- `Slot(...)` is not part of the v1 attribute surface; source that uses `Slot` must be rejected in syntax phase.
|
||||
- `Doc` is a reserved documentation attribute name. Its only v1 syntactic shape is `[Doc(markdown = """...""")]`.
|
||||
- The `Doc` attribute MUST NOT accept positional arguments, `text`, `html`, `format`, `Document`, `Documentation`, or prefixed text block forms such as `md"""..."""`.
|
||||
- Documentation text blocks are not string literals and MUST NOT appear in ordinary expressions, parameter defaults, or non-`Doc` attribute arguments.
|
||||
- Attribute ordering is syntactically insignificant; semantic validation determines duplicate or invalid attribute combinations.
|
||||
|
||||
### 6.2 Top-level declarations
|
||||
|
||||
@@ -935,7 +922,7 @@ Examples in this section are intended to stay mutually consistent with the synta
|
||||
|
||||
```pbs
|
||||
declare host Gfx {
|
||||
[Host(module = "gfx2d", name = "draw_pixel", version = 1)]
|
||||
[Host(module = "gfx", name = "draw_pixel", version = 1)]
|
||||
fn draw_pixel(x: int, y: int, c: color);
|
||||
}
|
||||
```
|
||||
|
||||
@@ -80,7 +80,7 @@ Rules:
|
||||
- Attributes are not first-class values and are not reflectable in v1 core.
|
||||
- Attributes do not automatically survive into runtime or bytecode artifacts.
|
||||
- An attribute affects runtime artifacts only when another specification defines an explicit lowering for its semantic effect.
|
||||
- In v1 core, the normative reserved attributes are `Host`, `Capability`, `AssetLowering`, `BuiltinType`, `BuiltinConst`, `IntrinsicCall`, `Init`, `Frame`, `InitAllowed`, and `Doc`.
|
||||
- In v1 core, the normative reserved attributes are `Host`, `Capability`, `AssetLowering`, `BuiltinType`, `BuiltinConst`, `IntrinsicCall`, `Init`, `Frame`, and `InitAllowed`.
|
||||
- `Host` is valid only on a host method signature declared directly inside a reserved stdlib/interface-module `declare host` body.
|
||||
- `Capability` is valid only on a host method signature declared directly inside a reserved stdlib/interface-module `declare host` body.
|
||||
- `AssetLowering` is valid only on a host method signature declared directly inside a reserved stdlib/interface-module `declare host` body.
|
||||
@@ -100,42 +100,6 @@ Rules:
|
||||
- Builtin metadata is consumed by the compiler during VM-owned builtin and intrinsic lowering rather than by host-binding lowering.
|
||||
- `Init` and `Frame` are consumed by lifecycle analysis and lowering rather than by ordinary runtime reflection.
|
||||
- `InitAllowed` is consumed by init-time host-admission analysis and does not become ordinary userland metadata.
|
||||
- `Doc` is compile/editor documentation metadata and is consumed by compiler-owned editorial surfaces.
|
||||
- `Doc` MUST NOT be lowered into bytecode, PBX, cartridge, or runtime-facing artifacts unless a future specification explicitly defines such lowering.
|
||||
|
||||
### 2.3.1 `Doc` documentation metadata
|
||||
|
||||
`Doc` attaches authored Markdown documentation to a named API declaration.
|
||||
|
||||
Canonical v1 shape:
|
||||
|
||||
```pbs
|
||||
[Doc(markdown = """
|
||||
Draws a sprite.
|
||||
|
||||
- `x`: screen x
|
||||
- `y`: screen y
|
||||
""")]
|
||||
```
|
||||
|
||||
Rules:
|
||||
|
||||
- `Doc` MUST declare exactly one named argument, `markdown`.
|
||||
- `Doc.markdown` MUST be a documentation text block.
|
||||
- `Doc` MUST NOT accept aliases or alternate forms such as `text`, positional arguments, `html`, `format`, `Document`, `Documentation`, or `md"""..."""`.
|
||||
- A declaration MUST NOT carry more than one `Doc` attribute.
|
||||
- Duplicate `Doc` attributes are static semantic errors and must not be rejected only as parser errors.
|
||||
- Attribute order is semantically irrelevant; `Doc` colocated with other valid attributes has the same meaning regardless of ordering.
|
||||
- `Doc` is valid only on named API declarations that introduce named semantic symbols and can carry attributes.
|
||||
- The v1 documentable surface includes functions, methods, classes/structs when present, services, hosts, builtin and stdlib declarations, and interface declarations.
|
||||
- Parameters MUST NOT receive `Doc` in v1. Parameter documentation, when present, MUST be authored inside the Markdown payload of the owning declaration.
|
||||
- Fields, enum cases, tuple fields, local variables, expressions, and other non-API declaration surfaces MUST NOT receive `Doc` unless a future decision explicitly classifies them as documentable named API declarations.
|
||||
- Documentation text block content MUST be normalized before semantic empty-payload validation and before exposure to editor consumers.
|
||||
- Normalization MUST remove an incidental leading empty line, remove an incidental trailing empty line, compute the common indentation of non-empty content lines, remove that common indentation, preserve internal line breaks, and preserve Markdown content after indentation normalization.
|
||||
- A normalized empty or whitespace-only `Doc.markdown` payload is invalid.
|
||||
- The authored format is a supported Markdown subset. Rendering, sanitization, and unsupported Markdown constructs are consumer responsibilities.
|
||||
- Compiler semantic metadata MUST preserve normalized Markdown documentation as metadata of the documented symbol.
|
||||
- LSP and editor consumers MUST consume compiler-resolved documentation metadata rather than reparsing source text.
|
||||
|
||||
### 2.4 Tuple shapes
|
||||
|
||||
@@ -203,8 +167,6 @@ The following constructs are callable in v1 core:
|
||||
Rules:
|
||||
|
||||
- All callable categories use the same input/output tuple model.
|
||||
- Every user-visible callable category MUST expose a semantic parameter list for editor and tooling consumers.
|
||||
- Each semantic parameter record MUST carry its canonical source/API name, zero-based order, type when known, and origin/source sufficient for implementation and diagnostics.
|
||||
- A struct method is identified by `(struct type, method name, input tuple shape excluding the receiver slot, output tuple shape)`.
|
||||
- A contract value is identified at the type level by its contract type and at runtime by an underlying concrete struct instance or service singleton value plus its selected implementation.
|
||||
- A callback declaration defines a nominal callable type with exactly one input/output tuple shape.
|
||||
@@ -215,9 +177,6 @@ Rules:
|
||||
- A callback value is identified at the type level by its declared callback type and signature.
|
||||
- Contract signatures and barrel signatures must preserve the same callable shape.
|
||||
- Canonical host primitive identity and binding are governed by the Host ABI Binding specification rather than by ordinary v1 core declaration identity alone.
|
||||
- The compiler semantic model is the canonical owner of callable parameter names for completion, signature help, hover, diagnostics, and other editor-facing surfaces.
|
||||
- Generated ordinal placeholders such as `arg0`, `arg1`, or equivalent names are internal implementation fallbacks only and MUST NOT be exposed as public parameter names.
|
||||
- If a user-visible callable lacks a real canonical parameter name, semantic metadata MUST represent that name as missing or unresolved rather than fabricating an ordinal placeholder.
|
||||
|
||||
### 3.3 Declaration validity
|
||||
|
||||
@@ -250,8 +209,6 @@ Rules:
|
||||
- A file may declare at most one `[Init]`.
|
||||
- The `[Init]` colocated with `[Frame]` is the project init.
|
||||
- Project init must be colocated with `[Frame]`.
|
||||
- PBS static semantics and lowering admit those markers and translate them into a typed `IRLifecycleDeclaration`.
|
||||
- PBS MUST NOT materialize module init, project-init wrapper, published frame wrapper, physical entrypoint, or boot guard; those artifacts belong to common lifecycle assembly.
|
||||
- `InitAllowed` is valid only on SDK host methods and is invalid on userland `fn`, `global`, `service`, `const`, `struct`, `contract`, and callback surfaces.
|
||||
- A host method signature in a reserved stdlib/interface module MUST carry exactly one `Host` attribute.
|
||||
- A host method signature in a reserved stdlib/interface module MUST carry exactly one `Capability` attribute.
|
||||
|
||||
+4
-28
@@ -221,8 +221,7 @@ let status: int = Composer.emit_sprite(7, 0, 12, 18, 0, 2, false, false, 1);
|
||||
|
||||
Rules:
|
||||
|
||||
- `@sdk:composer` is the canonical frame-composition module in this wave.
|
||||
- `Composer.bind_scene(...)`, `Composer.unbind_scene()`, and `Composer.emit_sprite(...)` belong to that module.
|
||||
- `@sdk:composer` is the canonical sprite-composition module in this wave.
|
||||
- `@sdk:gfx` remains valid for primitive and overlay-oriented graphics operations.
|
||||
- `Gfx.set_sprite` is not part of the active stdlib line `1` contract.
|
||||
|
||||
@@ -343,20 +342,6 @@ This list fixes the currently required declarative role of interface modules, bu
|
||||
|
||||
An interface module is not runtime code.
|
||||
|
||||
### 9.2.1 Callable parameter identity
|
||||
|
||||
Stdlib and SDK interface modules define public callable surfaces. Their method and function signatures MUST preserve stable canonical parameter names in the compiler semantic callable model.
|
||||
|
||||
Rules:
|
||||
|
||||
- Stdlib and SDK-hosted callable definitions MUST carry parameter names, zero-based order, type when known, and source/origin metadata.
|
||||
- Stdlib and host-backed parameter names are part of the public API surface.
|
||||
- Renaming a public stdlib or host-backed parameter is API compatibility-sensitive and MUST be reviewed with the same discipline as other public callable-shape changes.
|
||||
- Interface-module loaders MUST NOT replace missing or unavailable public parameter names with generated ordinal placeholders such as `arg0` or `arg1`.
|
||||
- Missing canonical parameter identity MUST be represented as incomplete semantic metadata, not as a fabricated public name.
|
||||
- Stdlib, SDK, and interface-module API declarations SHOULD carry authored English documentation through `[Doc(markdown = """...""")]` once the documentation surface is implemented.
|
||||
- Stdlib and SDK parameter documentation MUST be authored inside the owning declaration's Markdown payload; parameters MUST NOT carry `[Doc]`.
|
||||
|
||||
### 9.3 Interface-module restrictions
|
||||
|
||||
At minimum, an interface module MUST remain declarative.
|
||||
@@ -377,7 +362,7 @@ Illustrative stdlib interface module:
|
||||
declare enum color(red, green, blue);
|
||||
|
||||
declare host Gfx {
|
||||
[Host(module = "gfx2d", name = "draw_pixel", version = 1)]
|
||||
[Host(module = "gfx", name = "draw_pixel", version = 1)]
|
||||
fn draw_pixel(x: int, y: int, c: color);
|
||||
}
|
||||
```
|
||||
@@ -393,7 +378,7 @@ Another valid reserved stdlib interface module in stdlib line `1` is the sprite-
|
||||
```pbs
|
||||
declare host LowComposer {
|
||||
[Host(module = "composer", name = "emit_sprite", version = 1)]
|
||||
[Capability(name = "composer")]
|
||||
[Capability(name = "gfx")]
|
||||
fn emit_sprite(
|
||||
glyph_id: int,
|
||||
palette_id: int,
|
||||
@@ -443,21 +428,12 @@ Rules:
|
||||
- Attributes are not exported as ordinary values, types, or runtime-reflectable objects.
|
||||
- Attributes do not automatically survive into bytecode, PBX, or runtime metadata.
|
||||
|
||||
`Doc` is a reserved documentation attribute for compiler/editor metadata.
|
||||
|
||||
Rules:
|
||||
|
||||
- Stdlib, SDK, and interface modules MUST use the same `[Doc(markdown = """...""")]` surface as ordinary PBS source for authored API documentation.
|
||||
- Authored source documentation takes precedence over imported or generated documentation for the same symbol.
|
||||
- Conflicts between authored and imported/generated documentation MUST be resolved deterministically or reported through explicit diagnostics.
|
||||
- `Doc` metadata enriches compiler/editor surfaces and MUST NOT change import resolution, host binding, ABI identity, executable lowering, or runtime behavior.
|
||||
|
||||
### 11.2 `Host` attribute
|
||||
|
||||
The canonical reserved host-binding attribute is:
|
||||
|
||||
```pbs
|
||||
[Host(module = "gfx2d", name = "draw_pixel", version = 1)]
|
||||
[Host(module = "gfx", name = "draw_pixel", version = 1)]
|
||||
```
|
||||
|
||||
Rules:
|
||||
|
||||
@@ -82,8 +82,6 @@ This document depends on, at minimum:
|
||||
|
||||
PBS distinguishes three ownership categories for callable behavior.
|
||||
|
||||
All categories share the callable parameter identity contract from the Static Semantics Specification. A PBS-visible callable MUST project canonical parameter names, order, type when known, and origin into the semantic callable model regardless of whether the behavior is program-owned, VM-owned, or host-backed.
|
||||
|
||||
### 5.1 Program-owned function
|
||||
|
||||
A program-owned function is authored by the program and compiled from a PBS body.
|
||||
@@ -131,8 +129,6 @@ Properties:
|
||||
Host-backed operations are the domain of `declare host`, PBX `SYSC`, loader
|
||||
resolution, and final `SYSCALL`.
|
||||
|
||||
Host-backed ownership changes runtime authority and lowering, but it does not remove source/API parameter identity. Host-backed callable parameter names remain public semantic metadata and MUST NOT be replaced with generated ordinal placeholders in editor-facing surfaces.
|
||||
|
||||
## 6. The Boundary Question
|
||||
|
||||
The normative classification question is:
|
||||
|
||||
@@ -106,8 +106,6 @@ reserved top-level `declare const` shell carrying builtin metadata.
|
||||
An intrinsic operation is a VM-owned callable behavior with canonical
|
||||
definition in the VM contract.
|
||||
|
||||
Visible intrinsic operations and builtin method surfaces MUST be projected into the same semantic callable parameter shape used by ordinary PBS callables. Each visible intrinsic parameter MUST expose a canonical name, order, type when known, and VM/intrinsic origin metadata. If an intrinsic registry entry or builtin descriptor lacks a real public parameter name, compiler/editor metadata MUST represent the name as missing or unresolved rather than publishing `arg0`, `arg1`, or another generated ordinal placeholder.
|
||||
|
||||
### 5.5 Canonical intrinsic registry artifact
|
||||
|
||||
Final intrinsic ids are owned by one canonical ISA-scoped registry artifact.
|
||||
|
||||
+10
-34
@@ -15,10 +15,6 @@ This document defines the current contract between:
|
||||
Its purpose is to let compiler and runtime work in parallel without diverging on the most critical boundary:
|
||||
how host-backed SDK calls become load-time-resolved numeric syscalls.
|
||||
|
||||
PBS `declare host` / `[Host]` shells are compile-time delivery. The
|
||||
loader-facing catalog is runtime-owned. This document MUST NOT publish syscall
|
||||
IDs or `SyscallMeta`.
|
||||
|
||||
This document is intentionally narrower than a full PBX or VM specification.
|
||||
It focuses on loader behavior and the minimum artifact contract the loader must consume.
|
||||
|
||||
@@ -48,20 +44,16 @@ This document does not define:
|
||||
|
||||
This document follows two prior decisions:
|
||||
|
||||
1. Canonical host identity is defined by the runtime host registry as `(module, name, version)`.
|
||||
1. Canonical host identity is defined by the hardware ABI as `(module, name, version)`.
|
||||
2. User code does not declare host bindings directly; SDK/toolchain-controlled modules expose reserved `declare host` surfaces and the compiler lowers those usages into PBX host-binding metadata.
|
||||
|
||||
PBS shells MUST repeat identities already published by the runtime registry
|
||||
(`../runtime/docs/specs/runtime/16-host-abi-and-syscalls.md` and `SyscallMeta`).
|
||||
They MUST NOT invent `(module, name, version)`.
|
||||
|
||||
This document therefore treats:
|
||||
|
||||
- `declare host LowGfx { [Host(module = "gfx2d", name = "clear", version = 1)] fn clear(...); }`
|
||||
- `declare host Gfx { fn draw_pixel(...); }`
|
||||
|
||||
as compile-time surface only, and treats:
|
||||
|
||||
- `("gfx2d", "clear", 1)`
|
||||
- `("gfx", "draw_pixel", 1)`
|
||||
|
||||
as the normative runtime-facing identity.
|
||||
|
||||
@@ -71,7 +63,7 @@ The host-binding pipeline is:
|
||||
|
||||
1. User code imports SDK surfaces such as `Gfx` from `@sdk:gfx` and `Composer` from `@sdk:composer`.
|
||||
2. The compiler resolves those surfaces against the selected stdlib line.
|
||||
3. The compiler maps each host-backed SDK member to a canonical identity `(module, name, version)` that already exists in the runtime host registry.
|
||||
3. The compiler maps each host-backed SDK member to a canonical identity `(module, name, version)`.
|
||||
4. The compiler emits those required canonical identities into the PBX `SYSC` table.
|
||||
5. The compiler emits pre-load host call sites as `HOSTCALL <sysc_index>`.
|
||||
6. At cartridge load time, the loader resolves `SYSC` entries against the host syscall registry.
|
||||
@@ -92,7 +84,7 @@ Every host binding is identified by the triple:
|
||||
|
||||
Rules:
|
||||
|
||||
- `module` is the canonical host subsystem namespace, such as `gfx2d` or `asset`.
|
||||
- `module` is the canonical host subsystem namespace, such as `gfx` or `audio`.
|
||||
- `name` is the canonical host operation name within that module.
|
||||
- `version` is the canonical ABI version of that host operation.
|
||||
- This identity is stable across source languages and SDK naming styles.
|
||||
@@ -118,9 +110,6 @@ Rules:
|
||||
- `declare host` exists to define compile-time interface shape, not executable PBS bodies.
|
||||
- The compiler is responsible for mapping each host-backed member to its canonical host identity.
|
||||
- The PBX must not depend on source spellings such as `Gfx` for runtime resolution.
|
||||
- Host-backed source/API signatures MUST preserve their canonical parameter names in compiler semantic callable metadata.
|
||||
- Host-backed parameter names are public API surface and are compatibility-sensitive.
|
||||
- Loader-facing slot counts and canonical host identity do not license compiler or editor surfaces to publish generated parameter names such as `arg0` or `arg1`.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -135,8 +124,8 @@ The source-level call may originate from an SDK declaration such as:
|
||||
|
||||
```pbs
|
||||
declare host Gfx {
|
||||
[Host(module = "gfx2d", name = "draw_pixel", version = 1)]
|
||||
[Capability(name = "gfx2d")]
|
||||
[Host(module = "gfx", name = "draw_pixel", version = 1)]
|
||||
[Capability(name = "gfx")]
|
||||
fn draw_pixel(x: int, y: int, c: color);
|
||||
}
|
||||
```
|
||||
@@ -152,16 +141,8 @@ For example, the PBS-facing declaration:
|
||||
|
||||
```pbs
|
||||
declare host LowComposer {
|
||||
[Host(module = "composer", name = "bind_scene", version = 1)]
|
||||
[Capability(name = "composer")]
|
||||
fn bind_scene(scene_bank_id: int) -> int;
|
||||
|
||||
[Host(module = "composer", name = "unbind_scene", version = 1)]
|
||||
[Capability(name = "composer")]
|
||||
fn unbind_scene() -> int;
|
||||
|
||||
[Host(module = "composer", name = "emit_sprite", version = 1)]
|
||||
[Capability(name = "composer")]
|
||||
[Capability(name = "gfx")]
|
||||
fn emit_sprite(
|
||||
glyph_id: int,
|
||||
palette_id: int,
|
||||
@@ -179,8 +160,6 @@ declare host LowComposer {
|
||||
maps to the canonical runtime identity:
|
||||
|
||||
```text
|
||||
("composer", "bind_scene", 1)
|
||||
("composer", "unbind_scene", 1)
|
||||
("composer", "emit_sprite", 1)
|
||||
```
|
||||
|
||||
@@ -318,10 +297,7 @@ Rules:
|
||||
- the loader resolves only against this canonical registry,
|
||||
- unknown identities are load errors,
|
||||
- successful resolution yields numeric syscall identifiers and associated metadata,
|
||||
- the resolved metadata is authoritative for capability gating and later runtime verification,
|
||||
- PBS `declare host` / `[Host]` shells MUST repeat identities from this registry,
|
||||
- PBS shells MUST NOT invent `(module, name, version)`,
|
||||
- this specification MUST NOT publish the syscall catalog; runtime spec 16 and `SyscallMeta` do.
|
||||
- the resolved metadata is authoritative for capability gating and later runtime verification.
|
||||
|
||||
For the current asset runtime surface, the canonical registry entries include:
|
||||
|
||||
@@ -464,7 +440,7 @@ The cartridge manifest is the current declarative source for requested runtime c
|
||||
Rules:
|
||||
|
||||
- cartridge capability declarations are external to `program.pbx`,
|
||||
- capability declarations are serializable nominal identifiers such as `gfx2d`, `composer`, or `audio`,
|
||||
- capability declarations are serializable nominal identifiers such as `gfx` or `audio`,
|
||||
- the loader converts that nominal declaration into the internal capability flag set used by the runtime,
|
||||
- the loader MUST NOT infer granted authority solely from the presence of `SYSC` entries.
|
||||
|
||||
|
||||
+5
-7
@@ -62,7 +62,7 @@ The current manifest shape relevant to this document is:
|
||||
"title": "Example",
|
||||
"app_version": "1.0.0",
|
||||
"app_mode": "game",
|
||||
"capabilities": ["gfx2d", "input"],
|
||||
"capabilities": ["gfx", "input"],
|
||||
"asset_table": [],
|
||||
"preload": []
|
||||
}
|
||||
@@ -96,8 +96,7 @@ Rules:
|
||||
The current nominal capability set is:
|
||||
|
||||
- `system`
|
||||
- `gfx2d`
|
||||
- `composer`
|
||||
- `gfx`
|
||||
- `input`
|
||||
- `audio`
|
||||
- `fs`
|
||||
@@ -124,8 +123,7 @@ The normative external model is:
|
||||
Canonical mapping:
|
||||
|
||||
- `system` -> `SYSTEM`
|
||||
- `gfx2d` -> `GFX2D`
|
||||
- `composer` -> `COMPOSER`
|
||||
- `gfx` -> `GFX`
|
||||
- `input` -> `INPUT`
|
||||
- `audio` -> `AUDIO`
|
||||
- `fs` -> `FS`
|
||||
@@ -223,7 +221,7 @@ Recommended JSON:
|
||||
|
||||
```json
|
||||
{
|
||||
"capabilities": ["gfx2d", "input", "audio"]
|
||||
"capabilities": ["gfx", "input", "audio"]
|
||||
}
|
||||
```
|
||||
|
||||
@@ -246,7 +244,7 @@ The current temporary contract is:
|
||||
|
||||
1. `manifest.json` is the cartridge-facing load descriptor.
|
||||
2. `capabilities` is declared in `manifest.json`, not in `prometeu.json`.
|
||||
3. `capabilities` uses nominal canonical names such as `gfx2d`, `composer`, and `audio`.
|
||||
3. `capabilities` uses nominal canonical names such as `gfx` and `audio`.
|
||||
4. The runtime may keep using internal `CapFlags`.
|
||||
5. The loader converts nominal manifest capabilities into internal flags.
|
||||
6. PBX `SYSC` declares required host bindings, not authority.
|
||||
|
||||
+33
-54
@@ -16,11 +16,7 @@ Its purpose is to make the stdlib:
|
||||
|
||||
This document complements the normative language-level model in:
|
||||
|
||||
- [5. Manifest, Stdlib, and SDK Resolution Specification.md](5.%20Manifest%2C%20Stdlib%2C%20and%20SDK%20Resolution%20Specification.md)
|
||||
|
||||
This document is PBS packaging. It MUST NOT define console ABI. Intrinsic
|
||||
`final_id` values and host `SyscallMeta` remain runtime-owned. Physical stdlib
|
||||
path MUST NOT imply VM-owned versus host-backed ownership.
|
||||
- [5. Manifest, Stdlib, and SDK Resolution Specification.md](/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/studio/docs/specs/pbs/5.%20Manifest,%20Stdlib,%20and%20SDK%20Resolution%20Specification.md)
|
||||
|
||||
## 2. Scope
|
||||
|
||||
@@ -57,66 +53,52 @@ The recommended Studio layout is:
|
||||
```text
|
||||
prometeu-compiler/frontends/prometeu-frontend-pbs/
|
||||
src/main/resources/
|
||||
<target>/
|
||||
stdlib/
|
||||
1/
|
||||
core/
|
||||
color/
|
||||
main.pbs
|
||||
mod.barrel
|
||||
sdk/
|
||||
asset/
|
||||
main.pbs
|
||||
mod.barrel
|
||||
composer/
|
||||
main.pbs
|
||||
mod.barrel
|
||||
gfx/
|
||||
main.pbs
|
||||
mod.barrel
|
||||
input/
|
||||
main.pbs
|
||||
mod.barrel
|
||||
log/
|
||||
main.pbs
|
||||
mod.barrel
|
||||
stdlib/
|
||||
1/
|
||||
sdk/
|
||||
composer/
|
||||
main.pbs
|
||||
mod.barrel
|
||||
gfx/
|
||||
main.pbs
|
||||
mod.barrel
|
||||
asset/
|
||||
main.pbs
|
||||
mod.barrel
|
||||
audio/
|
||||
main.pbs
|
||||
mod.barrel
|
||||
core/
|
||||
math/
|
||||
main.pbs
|
||||
mod.barrel
|
||||
```
|
||||
|
||||
Interpretation:
|
||||
|
||||
- `<target>` is the `AppMode` export name (`game` for the current line-1 environment),
|
||||
- `game/stdlib/1` selects stdlib major line `1` for that target,
|
||||
- `stdlib/1` selects stdlib major line `1`,
|
||||
- `sdk` and `core` are reserved project spaces,
|
||||
- current line `1` modules are `color`, `asset`, `composer`, `gfx`, `input`, and `log`,
|
||||
- `composer`, `gfx`, `audio`, `math` are module paths within those reserved spaces,
|
||||
- `main.pbs` and `mod.barrel` form the interface module contents.
|
||||
|
||||
Current line `1` MUST NOT be documented as shipping `audio` or `@core:math`.
|
||||
Those names are not packaged in the current environment. `@sdk:input` is a
|
||||
VM-owned builtin shell; its path does not make it host-backed.
|
||||
|
||||
## 5. Logical Mapping
|
||||
|
||||
The compiler must treat the physical layout as a logical stdlib environment.
|
||||
|
||||
Required mapping:
|
||||
|
||||
- `<target>/stdlib/<N>/<space>/<module>` -> `@<space>:<module>`
|
||||
|
||||
Current line `1` (`game`) mapping:
|
||||
|
||||
- `game/stdlib/1/core/color` -> `@core:color`
|
||||
- `game/stdlib/1/sdk/asset` -> `@sdk:asset`
|
||||
- `game/stdlib/1/sdk/composer` -> `@sdk:composer`
|
||||
- `game/stdlib/1/sdk/gfx` -> `@sdk:gfx`
|
||||
- `game/stdlib/1/sdk/input` -> `@sdk:input`
|
||||
- `game/stdlib/1/sdk/log` -> `@sdk:log`
|
||||
- `stdlib/<N>/sdk/gfx` -> `@sdk:gfx`
|
||||
- `stdlib/<N>/sdk/composer` -> `@sdk:composer`
|
||||
- `stdlib/<N>/sdk/asset` -> `@sdk:asset`
|
||||
- `stdlib/<N>/sdk/audio` -> `@sdk:audio`
|
||||
- `stdlib/<N>/core/math` -> `@core:math`
|
||||
- `stdlib/<N>/core/math/vector` -> `@core:math/vector`
|
||||
|
||||
Rules:
|
||||
|
||||
- physical storage is an implementation detail,
|
||||
- logical module identity is authoritative,
|
||||
- callers of the resolver should work with logical addresses such as `@sdk:gfx` and `@core:color`, not resource paths,
|
||||
- physical path MUST NOT imply VM-owned versus host-backed ownership.
|
||||
- callers of the resolver should work with logical addresses such as `@sdk:gfx` and `@sdk:composer`, not resource paths.
|
||||
|
||||
## 6. Module File Convention
|
||||
|
||||
@@ -168,8 +150,7 @@ Minimum operations:
|
||||
|
||||
- `resolve(@sdk:gfx)`
|
||||
- `resolve(@sdk:composer)`
|
||||
- `resolve(@sdk:input)`
|
||||
- `resolve(@core:color)`
|
||||
- `resolve(@core:math/vector)`
|
||||
|
||||
### 7.3 `StdlibModuleSource`
|
||||
|
||||
@@ -227,7 +208,7 @@ Stdlib interface modules may contain reserved compile-time attributes such as:
|
||||
|
||||
```pbs
|
||||
declare host Gfx {
|
||||
[Host(module = "gfx2d", name = "draw_pixel", version = 1)]
|
||||
[Host(module = "gfx", name = "draw_pixel", version = 1)]
|
||||
fn draw_pixel(x: int, y: int, c: color);
|
||||
}
|
||||
```
|
||||
@@ -248,7 +229,7 @@ or:
|
||||
```pbs
|
||||
declare host LowComposer {
|
||||
[Host(module = "composer", name = "emit_sprite", version = 1)]
|
||||
[Capability(name = "composer")]
|
||||
[Capability(name = "gfx")]
|
||||
fn emit_sprite(
|
||||
glyph_id: int,
|
||||
palette_id: int,
|
||||
@@ -272,9 +253,7 @@ Rules:
|
||||
- later lowering stages may consume the extracted metadata to produce PBX host-binding declarations.
|
||||
- stdlib line `1` MUST expose the sprite-composition interface module at `@sdk:composer`,
|
||||
- that module MUST declare `LowComposer` and public service `Composer`,
|
||||
- that module MUST use runtime module `composer` and capability `composer`,
|
||||
- that module MUST expose `bind_scene(scene_bank_id: int) -> int`,
|
||||
- that module MUST expose `unbind_scene() -> int`,
|
||||
- that module MUST use runtime module `composer` and capability `gfx`,
|
||||
- that module MUST expose `emit_sprite(glyph_id: int, palette_id: int, x: int, y: int, layer: int, bank_id: int, flip_x: bool, flip_y: bool, priority: int) -> int`,
|
||||
- stdlib line `1` MUST NOT expose `Gfx.set_sprite`,
|
||||
- stdlib line `1` MUST expose the low-level asset interface module at `@sdk:asset`,
|
||||
|
||||
@@ -102,21 +102,17 @@ Executable PBS programs have a logical bootstrap sequence before ordinary frame
|
||||
Normative order:
|
||||
|
||||
1. materialize globals for each file according to dependency order,
|
||||
2. execute that file's non-project `[Init]`, if present,
|
||||
2. execute that file's `[Init]`, if present,
|
||||
3. compose those steps into one synthetic module init per module,
|
||||
4. execute project init exactly once, if present, after all module initializers,
|
||||
4. execute project init, if present,
|
||||
5. then invoke the userland callable marked with `[Frame]`.
|
||||
|
||||
The `[Init]` colocated with `[Frame]` is project init. It MUST NOT also run as a file-init fragment.
|
||||
|
||||
Lifecycle bootstrap is one-shot:
|
||||
|
||||
- no automatic retry occurs after boot failure,
|
||||
- failure during module init aborts boot,
|
||||
- failure during project init aborts boot.
|
||||
|
||||
Common lifecycle assembly materializes this order from the typed declaration. PBS remains the language source of marker meaning; it is not the owner of the published wrapper.
|
||||
|
||||
## 6.2 Logical frame root and physical wrapper
|
||||
|
||||
PBS distinguishes the logical frame root from the physical published entrypoint:
|
||||
|
||||
@@ -98,18 +98,6 @@ At minimum, each language corpus must retain:
|
||||
|
||||
Regression grouping by language is expected; one shared monolithic corpus is not required.
|
||||
|
||||
### 6.1 Callable parameter identity regressions
|
||||
|
||||
PBS conformance tests MUST protect user-visible callable parameter identity.
|
||||
|
||||
At minimum, tests MUST prove that:
|
||||
|
||||
1. user-authored callable parameters preserve canonical names, order, type when known, and origin in semantic metadata,
|
||||
2. stdlib, builtins, host-backed APIs, and visible intrinsics project parameter identity through the same semantic callable model,
|
||||
3. editor-facing compiler outputs for completion, signature help, hover, and parameter documentation do not leak generated ordinal placeholders such as `arg0` or `arg1`,
|
||||
4. missing canonical parameter names are represented as incomplete metadata rather than fabricated public names,
|
||||
5. and stdlib or host-backed parameter renames are treated as public API compatibility changes.
|
||||
|
||||
## 7. Claims and Evidence
|
||||
|
||||
For PBS quality claims at this stage:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Bytecode and PBX Mapping Specification
|
||||
# PBS Bytecode and PBX Mapping Specification
|
||||
|
||||
Status: Draft v1 (Backend Baseline)
|
||||
Applies to: mapping from lowered/optimized backend programs into PBX sections, bytecode-facing artifacts, and source-to-artifact invariants required by loader/verifier/runtime
|
||||
@@ -9,10 +9,6 @@ This document defines the normative mapping between backend-lowered semantics an
|
||||
|
||||
Its purpose is to keep artifact emission deterministic and compatible with runtime loader/verifier contracts.
|
||||
|
||||
PBX is the only executable boundary between the compiler and runtime. `IRVM`
|
||||
is a compiler-internal representation consumed by bytecode emission; it MUST
|
||||
NOT be exposed to or consumed by the runtime loader, verifier, or PVM.
|
||||
|
||||
## 2. Scope
|
||||
|
||||
This document defines:
|
||||
|
||||
@@ -7,9 +7,6 @@ Applies to: normative stdlib-facing API surface, reserved stdlib project spaces,
|
||||
|
||||
This document will define the normative user-facing standard-library surface for PBS.
|
||||
|
||||
This document is PBS delivery. It does not own console ABI. Intrinsic
|
||||
`final_id` values and host syscall metadata are runtime-owned.
|
||||
|
||||
## 2. Scope
|
||||
|
||||
This document is intended to define:
|
||||
@@ -31,22 +28,15 @@ This document does not define:
|
||||
|
||||
Normative precedence:
|
||||
|
||||
1. Runtime intrinsic catalog (`../runtime/docs/vm-arch/INTRINSICS.csv`; Studio mirror `docs/vm-arch/INTRINSICS.csv`)
|
||||
2. Runtime host ABI (`../runtime/docs/specs/runtime/16-host-abi-and-syscalls.md` and `SyscallMeta`)
|
||||
3. `5. Manifest, Stdlib, and SDK Resolution Specification.md`
|
||||
4. `8. Stdlib Environment Packaging and Loading Specification.md`
|
||||
5. `6. VM-owned vs Host-backed.md`
|
||||
6. `6.1. Intrinsics and Builtin Types Specification.md`
|
||||
7. `6.2. Host ABI Binding and Loader Resolution Specification.md`
|
||||
8. This document
|
||||
1. `5. Manifest, Stdlib, and SDK Resolution Specification.md`
|
||||
2. `8. Stdlib Environment Packaging and Loading Specification.md`
|
||||
3. `6. VM-owned vs Host-backed.md`
|
||||
4. `6.1. Intrinsics and Builtin Types Specification.md`
|
||||
5. `6.2. Host ABI Binding and Loader Resolution Specification.md`
|
||||
6. This document
|
||||
|
||||
If a rule here conflicts with higher-precedence specs, it is invalid.
|
||||
|
||||
This document MUST NOT define numeric syscall identifiers, intrinsic `final_id`
|
||||
values, or `SyscallMeta`. PBS `[Host]` and `[IntrinsicCall]` attributes MUST
|
||||
repeat identities already published by those runtime catalogs. They MUST NOT
|
||||
invent console ABI.
|
||||
|
||||
## 4. Normative Inputs
|
||||
|
||||
This document depends on, at minimum:
|
||||
@@ -67,9 +57,6 @@ The following inputs are already fixed elsewhere and must not be contradicted he
|
||||
- User code must import stdlib modules explicitly.
|
||||
- Canonical host identity comes from reserved host-binding metadata, not from source owner spelling.
|
||||
- VM-owned builtin type, builtin constant, and intrinsic surfaces may be exposed through reserved stdlib shells without transferring semantic ownership away from the VM.
|
||||
- Console ABI authority is runtime-owned. PBS stdlib is delivery.
|
||||
- Reserved project-space path (`@sdk:*` / `@core:*`) MUST NOT imply VM-owned versus host-backed ownership.
|
||||
- Current stdlib line `1` ships a VM-owned builtin input shell at `@sdk:input`. That exception does not make `@sdk:*` the VM-owned space.
|
||||
|
||||
## 6. Initial Section Targets
|
||||
|
||||
@@ -91,10 +78,7 @@ The following items remain to be closed in future agenda discussion.
|
||||
- Whether `@core:*` is specified as language-adjacent utility surface or as ordinary stdlib contract.
|
||||
- How stdlib API evolution is documented and conformance-tested.
|
||||
- Whether some interface modules remain toolchain-private and outside user-facing stdlib surface.
|
||||
|
||||
Settled by DEC-0048 and not reopened here:
|
||||
|
||||
- Builtin shells MAY appear in `@sdk:*` as well as `@core:*`. Path MUST NOT imply ownership. Current line `1` exception: `@sdk:input`.
|
||||
- Whether builtin shells may appear in `@sdk:*` as well as `@core:*`, or whether `@sdk:*` should remain host-facing only by policy.
|
||||
|
||||
## 8. Non-Goals
|
||||
|
||||
@@ -143,12 +127,6 @@ Rules:
|
||||
- but ownership remains governed by the VM-owned vs host-backed classification,
|
||||
- and placing a builtin shell in stdlib does not make it host-backed.
|
||||
|
||||
Current line `1` exception:
|
||||
|
||||
- `@sdk:input` exposes VM-owned builtin input types through `[BuiltinType]` and `[IntrinsicCall]`.
|
||||
- that module is not host-backed.
|
||||
- the `@sdk:*` preference for host-backed APIs still holds for new host modules.
|
||||
|
||||
## 11. Builtin Shell Surfaces
|
||||
|
||||
Reserved stdlib modules may expose builtin declarations as compile-time-only
|
||||
@@ -194,17 +172,11 @@ Rules:
|
||||
|
||||
- `@sdk:composer` MUST expose a low-level host owner `LowComposer`.
|
||||
- `@sdk:composer` MUST expose a public service facade `Composer`.
|
||||
- `Composer.bind_scene(scene_bank_id: int)` MUST lower through canonical host identity `("composer", "bind_scene", 1)`.
|
||||
- `Composer.unbind_scene()` MUST lower through canonical host identity `("composer", "unbind_scene", 1)`.
|
||||
- `Composer.emit_sprite(...)` MUST lower through canonical host identity `("composer", "emit_sprite", 1)`.
|
||||
- `@sdk:composer` host bindings MUST require manifest capability `composer`.
|
||||
- `Composer.bind_scene(...)` MUST return a raw `int` in stdlib line `1`.
|
||||
- `Composer.unbind_scene()` MUST return a raw `int` in stdlib line `1`.
|
||||
- `Composer.emit_sprite(...)` MUST return a raw `int` in this wave.
|
||||
- `@sdk:gfx` MAY continue to expose primitive and overlay-oriented operations.
|
||||
- `@sdk:gfx` host bindings MUST require manifest capability `gfx2d`.
|
||||
- `@sdk:gfx` MUST NOT expose `set_sprite`.
|
||||
- `set_camera` may remain deferred if not yet exposed by the active stdlib line.
|
||||
- `bind_scene`, `unbind_scene`, and `set_camera` are deferred and are not required members of `@sdk:composer` in this wave.
|
||||
|
||||
## 13. Stdlib Contract Expectations for Builtin MVP
|
||||
|
||||
@@ -227,10 +199,6 @@ Their canonical runtime-facing identities still come from builtin metadata such
|
||||
as `BuiltinType(name="vec2", version=1)` and
|
||||
`BuiltinConst(target="vec2", name="zero", version=1)`.
|
||||
|
||||
Current stdlib line `1` ships `Color` at `@core:color`. The `@core:math` import
|
||||
above is an identity illustration, not a claim that `@core:math` is packaged in
|
||||
line `1`.
|
||||
|
||||
## 14. Deterministic Stdlib Surface Failures
|
||||
|
||||
At minimum, a conforming implementation must reject:
|
||||
@@ -240,15 +208,3 @@ At minimum, a conforming implementation must reject:
|
||||
3. a user-facing stdlib module that exports executable PBS bodies for builtin semantics,
|
||||
4. a stdlib line that exposes conflicting canonical builtin identities through the same resolved environment,
|
||||
5. a stdlib line that exposes conflicting canonical host identities through the same resolved environment.
|
||||
|
||||
## 15. Console ABI Non-Ownership
|
||||
|
||||
This specification MUST NOT:
|
||||
|
||||
1. define numeric syscall identifiers,
|
||||
2. define intrinsic `final_id` values,
|
||||
3. publish `SyscallMeta`,
|
||||
4. or treat PBS `[Host]` / `[IntrinsicCall]` attributes as the ABI catalog.
|
||||
|
||||
PBS shells MUST repeat identities already published by the runtime catalogs
|
||||
named in section 3.
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
# Compiler Verification and Safety Checks Specification
|
||||
# PBS Verification and Safety Checks Specification
|
||||
|
||||
Status: Draft v1 (Quality-Gate Baseline)
|
||||
Applies to: test-backed safety gates for common compiler stages, validation ownership across executable frontends, and integration regression safety checks against runtime
|
||||
Applies to: test-backed safety gates for backend compiler stages and integration regression safety checks against runtime
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This document defines the minimum safety/verification quality gates that must be enforced for executable compiler pipelines, and the ownership rule that separates language validation from platform validation.
|
||||
This document defines the minimum safety/verification quality gates that must be enforced for executable backend pipelines.
|
||||
|
||||
Its purpose is to keep safety measurable and deterministic across:
|
||||
|
||||
- lowering,
|
||||
- optimization,
|
||||
- emission,
|
||||
- runtime integration boundaries,
|
||||
- and the classification of diagnostics that every executable frontend must obey.
|
||||
|
||||
PBS is the current executable frontend. It is an example, not the owner of this specification.
|
||||
- and runtime integration boundaries.
|
||||
|
||||
## 2. Scope
|
||||
|
||||
@@ -23,41 +20,37 @@ This document defines:
|
||||
|
||||
- mandatory compiler-stage safety checks for executable pipeline stages,
|
||||
- conditional integration safety regression checks against runtime line,
|
||||
- evidence requirements for safety-related support claims,
|
||||
- and validation-ownership rules that apply to all executable frontends.
|
||||
- and evidence requirements for safety-related support claims.
|
||||
|
||||
This document does not define:
|
||||
|
||||
- full runtime verifier algorithm internals,
|
||||
- formal proof of all runtime safety properties,
|
||||
- one mandatory verifier/optimizer architecture,
|
||||
- PBS syntax or static-semantics catalogs,
|
||||
- or a generic validator-core package.
|
||||
- or one mandatory verifier/optimizer architecture.
|
||||
|
||||
## 3. Authority and Precedence
|
||||
|
||||
Normative precedence:
|
||||
|
||||
1. Runtime authority (`docs/specs/hardware/topics/chapter-2.md`, `chapter-3.md`, `chapter-9.md`, `chapter-12.md`, `chapter-16.md`)
|
||||
2. Bytecode authority (`docs/specs/bytecode/ISA_CORE.md`)
|
||||
1. `docs/pbs/specs/2. Governance and Versioning.md`
|
||||
2. `docs/pbs/specs/12. Diagnostics Specification.md`
|
||||
3. `20. IRBackend to IRVM Lowering Specification.md`
|
||||
4. `21. IRVM Optimization Pipeline Specification.md`
|
||||
5. `15. Bytecode and PBX Mapping Specification.md`
|
||||
6. `13. Conformance Test Specification.md`
|
||||
7. This document
|
||||
8. Frontend diagnostics specifications, including `docs/specs/compiler-languages/pbs/12. Diagnostics Specification.md`, for language-owned coverage only
|
||||
|
||||
If a rule here conflicts with a higher-precedence authority, it is invalid. Frontend diagnostics documents MUST NOT redefine compiler-general safety gates or platform validation ownership.
|
||||
If a rule here conflicts with higher-precedence authorities, it is invalid.
|
||||
|
||||
## 4. Normative Inputs
|
||||
|
||||
This document depends on:
|
||||
|
||||
- `docs/pbs/specs/12. Diagnostics Specification.md`
|
||||
- `13. Conformance Test Specification.md`
|
||||
- `15. Bytecode and PBX Mapping Specification.md`
|
||||
- `20. IRBackend to IRVM Lowering Specification.md`
|
||||
- `21. IRVM Optimization Pipeline Specification.md`
|
||||
- `docs/specs/compiler-languages/pbs/12. Diagnostics Specification.md` as the current frontend diagnostics catalog, not as the owner of this specification
|
||||
|
||||
## 5. Safety Gate Model
|
||||
|
||||
@@ -140,74 +133,3 @@ This document is healthy when:
|
||||
2. executable backends have explicit S-I status (`pass`/`fail`/`deferred`),
|
||||
3. integration safety regressions are preserved in tests,
|
||||
4. and safety-related support claims remain evidence-backed.
|
||||
|
||||
## 11. Validation Ownership
|
||||
|
||||
A validation MUST live at the lowest layer that understands the failure without knowing the source language.
|
||||
|
||||
- A check is language-owned if it needs AST, tokens, a language marker, a barrel, or another source-language rule.
|
||||
- A check is platform-owned if it can be performed on `IRBackend`, `IRLifecycleDeclaration`, IRVM, PBX, host/capability tables, or ids.
|
||||
|
||||
Adding a validation MUST record:
|
||||
|
||||
1. the input artifact the check reads;
|
||||
2. whether that artifact is language source/AST/marker or a common contract;
|
||||
3. the matrix owner;
|
||||
4. the code family (`E_PARSE_*` / `E_SEM_*` / `E_LINK_*` / `E_HOST_*` versus `COMMON_*` / `LOWER_IRVM_*` / `MARSHAL_*`);
|
||||
5. whether the span comes from a common-contract origin or from language tokens/AST.
|
||||
|
||||
If item 2 is both, the implementation MUST emit two diagnostics with distinct identities, not one hybrid.
|
||||
|
||||
### 11.1 Diagnostic identity and span
|
||||
|
||||
Platform diagnostics MUST use `COMMON_*`, `LOWER_IRVM_*`, or `MARSHAL_*` codes and the phase of the pipeline stage that reports them.
|
||||
|
||||
PBS MUST keep its current `E_PARSE_*`, `E_SEM_*`, `E_LINK_*`, and `E_HOST_*` codes.
|
||||
|
||||
This specification MUST NOT rewrite diagnostic messages or renumber existing codes.
|
||||
|
||||
Common code MUST copy origin/span when the declaration, instruction, or metadata carries one. A missing origin MUST be a structural error. Implementations MUST NOT invent a span.
|
||||
|
||||
The same fact MAY exist on both sides. PBS explains the language rule; the common layer rejects an invalid handoff even when the frontend has no PBS markers. The two errors MUST keep distinct identities. Example: `E_SEM_MISSING_PROJECT_FRAME` and a missing frame root on an executable `IRLifecycleDeclaration`.
|
||||
|
||||
### 11.2 Initial ownership matrix
|
||||
|
||||
| Family | Owner | Status | Notes |
|
||||
| --- | --- | --- | --- |
|
||||
| Parse / syntax (`ParseErrors`) | `compiler/pbs` | language | remains |
|
||||
| Type, flow, declaration, const, and source-form global semantics | `compiler/pbs` | language | remains |
|
||||
| Markers `[Init]`, `[Frame]`, `InitAllowed`, signature, colocation | `compiler/pbs` | language | already split by lifecycle assembly |
|
||||
| `host call not allowed during init` | `compiler/pbs` | language | marker/source rule |
|
||||
| PBS linking (`PbsLinkErrors`, barrel, import, visibility) | `compiler/pbs` | language | do not extract |
|
||||
| Source shape of `[Host]` / `[Capability]` | `compiler/pbs` | language | host-admission split |
|
||||
| Canonical host-binding identity and capability over `IRReservedMetadata` | `compiler/general` | platform | classified; validator remains in the PBS package until a later plan |
|
||||
| Lifecycle assembler | `compiler/general` | platform | already implemented |
|
||||
| IRVM preconditions for wrapper, boot guard, origin | `compiler/general` | platform | already implemented |
|
||||
| `IRVMValidator`, lowering, marshal/bytecode | `compiler/general` | platform | already implemented |
|
||||
| `Addressable` / asset path | `compiler/general` | platform | classified; no extra migration in this specification |
|
||||
| Gates S-U/S-I | `compiler/general` | platform | this document |
|
||||
|
||||
### 11.3 Host admission, assets, and linking
|
||||
|
||||
Host admission is split:
|
||||
|
||||
- language owns the source shape of `[Host]` and `[Capability]`;
|
||||
- platform owns canonical binding identity `(module, name, version)`, unknown capability, undeclared capability, and inconsistent binding once those facts exist on `IRReservedMetadata`.
|
||||
|
||||
`PbsHostAdmissionValidator` MAY remain in the PBS package until a later plan. `E_HOST_*` MUST NOT be treated as eternal PBS semantics.
|
||||
|
||||
`Addressable` / asset-path resolution is platform-owned. This specification classifies it and MUST NOT move additional asset code.
|
||||
|
||||
PBS linking, barrel files, and `PbsLinkErrors` remain language-owned. `ResolveDeps` does not authorize extracting them.
|
||||
|
||||
### 11.4 What this section does not authorize
|
||||
|
||||
This specification MUST NOT be read as authorizing:
|
||||
|
||||
- a generic validator-core package;
|
||||
- moving `PbsHostAdmissionValidator` into a common package;
|
||||
- moving asset-resolution production code;
|
||||
- extracting PBS linking;
|
||||
- or reopening lifecycle-assembly ownership.
|
||||
|
||||
Platform validators MUST NOT import `p.studio.compiler.pbs` and MUST NOT discover roles from `__pbs.` prefixes.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# IRBackend to IRVM Lowering Specification
|
||||
# PBS IRBackend to IRVM Lowering Specification
|
||||
|
||||
Status: Draft v1 (Backend Baseline)
|
||||
Applies to: executable-backend lowering from the common `IRBackend` handoff into `IRVM`
|
||||
Applies to: executable-backend lowering from `IRBackend` handoff into `IRVM`
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
@@ -9,20 +9,11 @@ This document defines the normative lowering contract from executable `IRBackend
|
||||
|
||||
Its purpose is to make backend lowering deterministic, reviewable, and compatible with runtime ISA/verification authority.
|
||||
|
||||
`IRBackend` is the common frontend-to-backend executable handoff. It is emitted by frontends and consumed by common backend stages. Backend lowering MUST NOT require PBS AST nodes, PBS tokens, PBS parser structures, PBS semantic objects, PBS editorial objects, or equivalent language-owned objects from future frontends.
|
||||
|
||||
`IRVM` is an internal compiler representation. It MUST be consumed by common
|
||||
compiler optimization and PBX emission stages, and it MUST NOT cross the
|
||||
compiler/runtime boundary or become an input, dependency, public type, or
|
||||
operational concept of the runtime loader, verifier, or PVM. PBX is the only
|
||||
executable artifact boundary between compiler and runtime.
|
||||
|
||||
## 2. Scope
|
||||
|
||||
This document defines:
|
||||
|
||||
- required backend preconditions before `IRBackend -> IRVM` starts,
|
||||
- allowed language-neutral `IRBackend` contract concepts at the backend boundary,
|
||||
- `IRVM` structural obligations needed before optimization/emission,
|
||||
- deterministic function-id assignment and control-flow lowering obligations,
|
||||
- callsite lowering obligations across function, host-backed, and VM-owned intrinsic paths,
|
||||
@@ -34,8 +25,7 @@ This document does not define:
|
||||
- binary PBX layout details,
|
||||
- loader patching internals,
|
||||
- runtime execution internals,
|
||||
- one mandatory optimizer implementation,
|
||||
- or frontend-specific lowering rules before `IRBackend` emission.
|
||||
- or one mandatory optimizer implementation.
|
||||
|
||||
## 3. Authority and Precedence
|
||||
|
||||
@@ -43,8 +33,8 @@ Normative precedence:
|
||||
|
||||
1. Runtime authority (`docs/specs/hardware/topics/chapter-2.md`, `chapter-3.md`, `chapter-9.md`, `chapter-12.md`, `chapter-16.md`)
|
||||
2. Bytecode authority (`docs/specs/bytecode/ISA_CORE.md`)
|
||||
3. This document
|
||||
4. Frontend-specific lowering specifications, including `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md`
|
||||
3. `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md`
|
||||
4. This document
|
||||
|
||||
If a rule here conflicts with higher-precedence authorities, it is invalid.
|
||||
|
||||
@@ -52,106 +42,22 @@ If a rule here conflicts with higher-precedence authorities, it is invalid.
|
||||
|
||||
This document depends on:
|
||||
|
||||
- `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md`
|
||||
- `docs/specs/compiler-languages/pbs/6.1. Intrinsics and Builtin Types Specification.md`
|
||||
- `docs/specs/compiler-languages/pbs/6.2. Host ABI Binding and Loader Resolution Specification.md`
|
||||
- frontend-specific lowering specifications that emit the common `IRBackend` handoff
|
||||
- `15. Bytecode and PBX Mapping Specification.md`
|
||||
- `21. IRVM Optimization Pipeline Specification.md`
|
||||
|
||||
## 4.1 Common IRBackend Contract
|
||||
|
||||
At this boundary, `IRBackend` may contain only language-neutral compiler concepts required by executable backend lowering:
|
||||
|
||||
1. source identity and spans,
|
||||
2. modules and module identifiers,
|
||||
3. callable identities, signatures, names, arity, and type-shape surfaces,
|
||||
4. executable functions,
|
||||
5. instruction kinds and instruction metadata,
|
||||
6. globals and global origins,
|
||||
7. synthetic executable functions and synthetic origins,
|
||||
8. host-call metadata,
|
||||
9. intrinsic metadata,
|
||||
10. reserved metadata required for backend lowering,
|
||||
11. required runtime or platform capabilities,
|
||||
12. and an optional typed `IRLifecycleDeclaration` used as lifecycle provenance after common assembly.
|
||||
|
||||
The common backend contract MUST express these concepts as backend obligations, not as PBS syntax or PBS semantic rules. When a concept currently originates from PBS, the backend contract still owns only the language-neutral obligation carried by `IRBackend`.
|
||||
|
||||
### 4.3 IRLifecycleDeclaration
|
||||
|
||||
`IRLifecycleDeclaration` is the typed, immutable, serializable-by-design lifecycle provenance carried by `IRBackend`.
|
||||
|
||||
An executable handoff MUST contain exactly one declaration before common assembly. A deliberately non-executable handoff MAY omit it; absence MUST NOT synthesize a default `main` or published wrapper.
|
||||
|
||||
The declaration MUST represent, using ordered collections and typed ids:
|
||||
|
||||
1. modules in explicit dependency order,
|
||||
2. each module's ordered file-init fragment references,
|
||||
3. an optional project-init callable reference,
|
||||
4. and exactly one frame-root callable reference.
|
||||
|
||||
References MUST use `ModuleId`, `FileId`, `CallableId`, a typed role, and source attribution. The public shape MUST NOT expose maps, sets, callbacks, compiler services, or frontend-owned types.
|
||||
|
||||
`AssembleLifecyclePipelineStage` MUST run after `FrontendPhasePipelineStage` and before `LowerToIRVMPipelineStage`. `LifecycleAssemblerService` is the only owner of derived lifecycle artifacts: module init, project-init wrapper, published frame wrapper, physical entrypoint, and hidden boot guard. Those artifacts MUST use deterministic neutral internal identities. Common code MUST NOT discover roles from `__pbs.*` prefixes or depend on PBS packages.
|
||||
|
||||
The declaration MUST remain available on the assembled `IRBackend` as typed provenance. Downstream inspection MUST use roles, ids, and origins rather than synthetic names.
|
||||
|
||||
Project init MUST be absent from file-init fragments and MUST execute exactly once, after all module initializers and before the frame root. Bootstrap failure MUST abort without retry. The boot guard MUST prevent a second bootstrap after successful completion. The published wrapper owns the final frame return.
|
||||
|
||||
The common backend contract MUST NOT expose or require:
|
||||
|
||||
1. `PbsExpression`, `PbsStatement`, `PbsToken`, or equivalent PBS-owned syntax objects,
|
||||
2. PBS parser cursors, parse contexts, parse nodes, or token kinds,
|
||||
3. PBS semantic validator internals,
|
||||
4. PBS editorial or language-service objects,
|
||||
5. or any type under a language frontend package as part of the public backend handoff.
|
||||
|
||||
## 4.2 Serializable-by-Design Contract Shape
|
||||
|
||||
The public `IRBackend` handoff MUST remain serializable by design. This requirement does not select a wire format, schema language, RPC mechanism, process boundary, plugin runtime, or external frontend transport. It only constrains the public data shape so those choices remain possible later without redesigning the handoff.
|
||||
|
||||
Public `IRBackend` contract types MUST be modelable as an acyclic, deterministic data graph made of:
|
||||
|
||||
1. primitive values and strings,
|
||||
2. enums,
|
||||
3. immutable value objects,
|
||||
4. ordered lists,
|
||||
5. nullable or optional scalar fields only where absence is part of the contract,
|
||||
6. explicit identifier values for cross-references,
|
||||
7. and source attribution values such as file ids and spans.
|
||||
|
||||
The public handoff MUST NOT expose, require, or rely on:
|
||||
|
||||
1. callbacks, lambdas, service objects, registries, visitors, or live compiler services,
|
||||
2. frontend AST, parser, token, semantic, or editorial objects,
|
||||
3. mutable global state as part of interpretation,
|
||||
4. object identity equality as a semantic key,
|
||||
5. unordered collections where iteration order affects output,
|
||||
6. cyclic references between public handoff objects,
|
||||
7. lazy values whose result depends on current process state,
|
||||
8. or a selected wire format.
|
||||
|
||||
Cross-object references MUST use explicit ids or stable symbolic keys. Existing table-scoped identifiers such as `FileId`, `ModuleId`, `CallableId`, and `IntrinsicId` are valid handoff values when their table scope is explicit and deterministic. New typed ids SHOULD be introduced only when a concrete public handoff field would otherwise depend on textual identity, object identity, or a direct object reference.
|
||||
|
||||
Ordered collections MUST preserve deterministic order. Any map-like data that becomes part of the handoff MUST either be represented as an ordered list of entries or define deterministic key ordering before it reaches the public contract.
|
||||
|
||||
Initial enforcement for this contract SHOULD be audit and guardrail based: specs, reflection tests over public handoff surfaces, deterministic ordering tests, and targeted fixes for concrete leaks. A serializer or schema implementation is not required for conformance to this subsection.
|
||||
|
||||
## 5. Backend Entry Preconditions
|
||||
|
||||
Lowering from `IRBackend` to `IRVM` may start only when:
|
||||
|
||||
1. frontend admission to `IRBackend` is complete for the active slice,
|
||||
2. common lifecycle assembly has already materialized derived artifacts for an executable handoff,
|
||||
3. required callsite categories (`CALL_FUNC`/`CALL_HOST`/`CALL_INTRINSIC`) are available,
|
||||
4. required canonical host/intrinsic metadata is available for admitted callsites,
|
||||
5. dependency-scoped fail-fast exclusions have already been applied at the `IRBackend` boundary,
|
||||
6. compiler-selected published-wrapper entrypoint identity is present and unambiguous,
|
||||
7. and target `vm_profile` is selected deterministically.
|
||||
|
||||
Declaration validation, role uniqueness, explicit order, and rejection of frontend-preassembled derived artifacts belong to `LifecycleAssemblerService`. `IRBackend -> IRVM` MUST keep only backend preconditions on the assembled graph, such as published-wrapper identity, synthetic origin presence, and hidden boot-guard presence. It MUST NOT reconstruct lifecycle order from callable names.
|
||||
|
||||
Those common structural diagnostics are compiler-general. Classification, code families, and dual language/platform reporting are owned by `docs/specs/compiler/19. Verification and Safety Checks Specification.md` section 11. They MUST NOT be catalogued as PBS-facing required coverage.
|
||||
2. required callsite categories (`CALL_FUNC`/`CALL_HOST`/`CALL_INTRINSIC`) are available,
|
||||
3. required canonical host/intrinsic metadata is available for admitted callsites,
|
||||
4. dependency-scoped fail-fast exclusions have already been applied at the `IRBackend` boundary,
|
||||
5. compiler-selected published-wrapper entrypoint identity is present and unambiguous,
|
||||
6. and target `vm_profile` is selected deterministically.
|
||||
|
||||
## 6. IRVM Model Obligations
|
||||
|
||||
@@ -192,15 +98,12 @@ Function indexing must be deterministic:
|
||||
4. manifest-owned or name-only entrypoint fallback is forbidden,
|
||||
5. and identical admitted input graphs must produce identical function-id assignments.
|
||||
|
||||
For executable lowering:
|
||||
For PBS executable lowering:
|
||||
|
||||
- the declared frame-root callable remains the logical frame root,
|
||||
- the assembled published wrapper is the physical entrypoint,
|
||||
- the wrapper path must contain the final frame return,
|
||||
- the userland callable marked with `[Frame]` remains the logical frame root,
|
||||
- the wrapper path must contain final `FRAME_RET`,
|
||||
- and lowering must preserve that distinction through `IRVM`.
|
||||
|
||||
PBS `[Init]`/`[Frame]` markers are a frontend source of the declaration. The backend-owned obligation is the neutral requirement that the compiler-selected published wrapper be the physical entrypoint and that lifecycle provenance remain explicit in `IRBackend` through typed roles and ids. Neutral synthetic names are internal and are not a public ABI.
|
||||
|
||||
## 9. Callsite Lowering Obligations
|
||||
|
||||
### 9.1 Function calls
|
||||
@@ -247,7 +150,7 @@ Before bytecode emission, backend must run structural pre-verification on lowere
|
||||
7. and structural validity of host/intrinsic call forms.
|
||||
8. and structural validity of backend-owned symbolic-to-operational rewrites such as `Addressable -> asset_id`.
|
||||
|
||||
For host-backed asset calls in v1, this validation includes backend-owned symbolic-to-operational rewrites selected by preserved host metadata. PBS currently emits this designation from metadata such as `[AssetLowering(param = N)]`, but final operational resolution is a common backend obligation.
|
||||
For PBS host-backed asset calls in v1, this validation includes the rewrite selected by preserved host metadata such as `[AssetLowering(param = N)]`.
|
||||
|
||||
This pre-verification does not replace runtime verifier authority.
|
||||
|
||||
@@ -281,6 +184,4 @@ This document is healthy when:
|
||||
1. `IRBackend -> IRVM` obligations are explicit and testable,
|
||||
2. deterministic function/call/control-flow lowering rules are explicit,
|
||||
3. mandatory pre-verification boundary is explicit,
|
||||
4. common backend obligations are not described as owned by PBS,
|
||||
5. frontend-specific lowering specs only own emission into `IRBackend`,
|
||||
6. and scope boundaries with optimization/emission specs are explicit.
|
||||
4. and scope boundaries with optimization/emission specs are explicit.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# IRVM Optimization Pipeline Specification
|
||||
# PBS IRVM Optimization Pipeline Specification
|
||||
|
||||
Status: Draft v1 (Pipeline Baseline)
|
||||
Applies to: placement and invariants of the `OptimizeIRVM` stage between lowering and bytecode emission
|
||||
@@ -9,10 +9,6 @@ This document defines the normative placement and safety invariants of the `Opti
|
||||
|
||||
Its purpose is to allow optimization in the backend pipeline without transferring semantic optimization responsibility to runtime.
|
||||
|
||||
`IRVM` is internal to the compiler. Optimization output MUST flow to PBX
|
||||
emission and MUST NOT be exposed as a runtime input or protocol. PBX remains the
|
||||
only executable boundary consumed by the runtime loader, verifier, and PVM.
|
||||
|
||||
## 2. Scope
|
||||
|
||||
This document defines:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Status: Draft v1 (Traceability Baseline)
|
||||
Applies to: compiler/backend conformance traceability for canonical stage order and entrypoint-specific contracts
|
||||
|
||||
Last Updated: 2026-09-19
|
||||
Last Updated: 2026-03-30
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
@@ -13,7 +13,7 @@ This matrix maps each normative backend MUST from:
|
||||
2. `docs/specs/compiler/20. IRBackend to IRVM Lowering Specification.md`
|
||||
3. `docs/specs/compiler/21. IRVM Optimization Pipeline Specification.md`
|
||||
4. `docs/specs/compiler/23. Compiler Pipeline Entry Points Specification.md`
|
||||
5. `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md` (PBS lowering obligations only)
|
||||
5. `docs/specs/compiler-languages/pbs/13. Lowering IRBackend Specification.md` (Section 12 addendum only)
|
||||
|
||||
to concrete positive/negative test evidence and current status.
|
||||
|
||||
@@ -40,22 +40,6 @@ to concrete positive/negative test evidence and current status.
|
||||
| G19-5.2.6 | Gate S-I MUST reject missing capability at load-time. | N/A | `BackendGateIIntegrationTest#gateI_rejectMissingCapability` | pass | |
|
||||
| G19-5.2.7 | Gate S-I MUST cover valid VM-owned intrinsic path. | `BackendGateIIntegrationTest#gateI_validIntrinsicPath` | N/A | pass | |
|
||||
| G19-5.2.8 | Gate S-I MUST cover repeatability across runtime line. | `RuntimeBackedCompatibilityAdapterTest#checkMustPassInStrictModeWhenRuntimeCommandIsValid`; `RuntimeBackedCompatibilityAdapterTest#checkMustBeRepeatableAcrossDeclaredRuntimeLinesInStrictMode` | `RuntimeBackedCompatibilityAdapterTest#checkMustFailInStrictModeWhenRuntimeCommandIsUnavailable` | pass | Multi-line repeatability is asserted with strict runtime-backed checks over distinct declared runtime lines. |
|
||||
| G19-11.1 | A validation MUST live at the lowest layer that understands the failure without knowing the source language. | `ValidationOwnershipSpecTest#spec19MustBeCompilerGeneralAndPublishValidationOwnership` | N/A | pass | Spec 19 section 11 states the classification rule. |
|
||||
| G19-11.2 | Spec 19 MUST publish the validation ownership matrix. | `ValidationOwnershipSpecTest#spec19MustBeCompilerGeneralAndPublishValidationOwnership` | N/A | pass | Matrix families include parse/syntax, PBS linking, and lifecycle assembler. |
|
||||
| G19-11.3 | Platform diagnostics MUST use `COMMON_*` / `LOWER_IRVM_*` / `MARSHAL_*` and MUST copy origin/span when present. | `ValidationOwnershipSpecTest#spec19MustBeCompilerGeneralAndPublishValidationOwnership`; `LifecycleAssemblerServiceTest#assembleMustRejectMissingFrameRootWithoutRepair` | N/A | pass | Code families and span policy are normative in spec 19 section 11.1. |
|
||||
| G19-11.4 | The same fact MAY exist as a language diagnostic and a platform diagnostic with distinct identities. | `ValidationOwnershipSpecTest#spec19MustBeCompilerGeneralAndPublishValidationOwnership` | N/A | pass | Dual reporting is required when a check reads both source and common contract. |
|
||||
| G19-11.5 | Host admission MUST split source attribute shape from canonical `IRReservedMetadata` identity without moving the PBS validator in this plan. | `ValidationOwnershipSpecTest#spec19MustBeCompilerGeneralAndPublishValidationOwnership` | N/A | pass | Classified as platform; validator remains in the PBS package. |
|
||||
| G19-11.6 | Platform validators MUST NOT import PBS packages or match `__pbs.` prefixes. | `CommonBackendArchitectureTest#commonBackendMustNotImportPbsFrontendPackages`; `CommonBackendArchitectureTest#commonLifecycleAndBackendMustNotDiscoverRolesFromPbsNamePrefixes` | N/A | pass | Guard covers backend, lifecycle, and all common pipeline stages. |
|
||||
| PBS12-11 | PBS diagnostics MUST NOT claim common structural lifecycle/IRVM failures as PBS required coverage. | `ValidationOwnershipSpecTest#pbsDiagnosticsMustNotClaimCommonStructuralFailures` | N/A | pass | PBS spec 12 points those failures at spec 19 section 11 and spec 20. |
|
||||
| G20-4.1.1 | `IRBackend` MUST be the common frontend-to-backend executable handoff. | `LowerToIRVMServiceTest#lowerMustAcceptManuallyConstructedCommonIRBackend` | N/A | pass | Direct backend lowering from manually constructed common IRBackend proves PBS parser/frontend services are not required. |
|
||||
| G20-4.1.2 | Common backend code MUST NOT depend on `p.studio.compiler.pbs`. | `CommonBackendArchitectureTest#commonBackendMustNotImportPbsFrontendPackages` | N/A | pass | Source-level architectural guard rejects PBS frontend imports in common backend packages. |
|
||||
| G20-4.1.3 | Public `IRBackend` contract MUST NOT expose PBS AST, token, parser, semantic, or editorial types. | `IRBackendExecutableContractTest#publicIRBackendContractMustNotExposePbsTypes` | N/A | pass | Reflection guard covers public contract fields, constructors, methods, and record components. |
|
||||
| G20-4.2.1 | Public `IRBackend` contract types MUST remain modelable as an acyclic, deterministic data graph. | `IRBackendExecutableContractTest#publicIRBackendContractMustExposeOnlySerializableShapes`; `IRBackendExecutableContractTest#aggregatorMustEmitDeterministicOrderedPublicContractShape` | N/A | pass | Covers public shape guardrails, generic type arguments, ordered aggregate emission, table remapping, and capability de-duplication order. |
|
||||
| G20-4.2.2 | Public `IRBackend` contract types MUST NOT expose callbacks, services, mutable/unordered collection contracts, frontend-owned objects, process-dependent lazy values, cyclic public references, or wire-format commitments. | `IRBackendExecutableContractTest#publicIRBackendContractMustExposeOnlySerializableShapes` | N/A | pass | Reflection guard covers public contract fields, constructors, methods, record components, and generic type arguments. |
|
||||
| G20-4.2.3 | Public `IRBackend` cross-object references MUST use explicit ids or stable symbolic keys. | `IRBackendExecutableContractTest#publicIRBackendContractAuditMustClassifyAllowedSupportTypes`; `IRBackendExecutableContractTest#publicIRBackendContractMustUseExplicitIdsOrStableKeysForKnownReferences` | N/A | pass | Current audit found no concrete public serialization leak requiring model correction. Existing `FileId`, `ModuleId`, `CallableId`, and `IntrinsicId` remain explicit table-scoped identifiers. |
|
||||
| G20-4.3.1 | Executable `IRBackend` MUST carry a typed, ordered, id-based `IRLifecycleDeclaration` as provenance. | `IRBackendExecutableContractTest#aggregatorMustRemapTypedLifecycleReferencesAndPreserveDeclaredModuleOrder`; `LifecycleAssemblerServiceTest#assembleMustMaterializeNeutralLifecycleArtifactsInDeclaredOrder` | `IRBackendExecutableContractTest#aggregatorMustOmitLifecycleDeclarationWhenNoFileContributesOne` | pass | Declaration uses `ReadOnlyList`, typed ids, roles, and source attribution; aggregator remaps ids with explicit module order. |
|
||||
| G20-4.3.2 | Missing lifecycle declaration MUST mean a deliberately non-executable handoff and MUST NOT synthesize entrypoints. | `LifecycleAssemblerServiceTest#assembleMustNoOpWhenLifecycleDeclarationIsAbsent`; `AssembleLifecyclePipelineStageTest#runMustNoOpForDeliberatelyNonExecutableHandoff` | N/A | pass | Assembler and stage leave the backend unchanged when the declaration is absent. |
|
||||
| G20-4.3.3 | Common lifecycle assembly MUST be the exclusive owner of derived artifacts and MUST use neutral identities. | `LifecycleAssemblerServiceTest#assembleMustMaterializeNeutralLifecycleArtifactsInDeclaredOrder`; `CommonBackendArchitectureTest#commonLifecycleAndBackendMustNotDiscoverRolesFromPbsNamePrefixes` | `LifecycleAssemblerServiceTest#assembleMustRejectPreMaterializedDerivedArtifacts` | pass | Derived wrappers and boot guard are common-owned; architecture guard rejects PBS imports and `__pbs.` prefix matching. |
|
||||
| G20-6.2 | `IRVM_EXT` MUST declare structural metadata (`pops/pushes/is_branch/is_terminator`). | `IRVMValidatorTest#validateMustApplyStructuralMetadataForCustomInternalExtension`; `IRVMValidatorTest#validateMustRejectCustomInternalExtensionWhenStructuralMetadataUnderflowsStack`; `IRVMOp` record contract (`pops/pushes/branch/terminator/internal`) | N/A | pass | Dedicated extension fixtures now assert structural metadata is consumed by validation behavior. |
|
||||
| G20-6.3 | `IRVM_EXT` MUST be eliminable before bytecode emission. | `OptimizeIRVMServiceTest#optimizeDefaultPassesMustEliminateUnreachableInternalExtensionBeforeEmission` | `EmitBytecodePipelineStageTest#runMustFailWhenInternalOpcodesRemain`; `EmitBytecodePipelineStageTest#runMustFailWhenInternalOpcodesRemainEvenWithNonEmptyEmissionPlan`; `IRVMValidatorTest#validateMustRejectInternalOpcodeWhenConfigured` | pass | Optimizer elimination path and emit-stage hard rejection path are both covered. |
|
||||
| G20-6.4 | IRVM MUST preserve per-function slot and identity headers. | `IRVMProgramTest#constructorMustRejectModuleAndEmissionPlanMismatch` | `IRVMProgramTest#constructorMustRejectModuleAndEmissionPlanMismatch` | pass | Header mismatch is rejected deterministically. |
|
||||
@@ -83,19 +67,14 @@ to concrete positive/negative test evidence and current status.
|
||||
| G21-9.1 | Validation MUST include optimized-vs-non-optimized equivalence fixtures. | `OptimizeIRVMEquivalenceHarnessTest#optimizeOnOffMustPreserveObservableTraceForLoweredHostIntrinsicFixture`; `OptimizeIRVMEquivalenceHarnessTest#optimizeOnOffMustPreserveObservableTraceForConditionalJoinFixture`; `OptimizeIRVMEquivalenceHarnessTest#optimizeOnOffMustPreserveObservableTraceForSimpleLoopFixture`; `OptimizeIRVMEquivalenceHarnessTest#optimizeOnOffMustPreserveObservableTraceForLinearCallFixture` | N/A | pass | Dedicated opt on/off harness with reusable interpreter and deterministic trace assertions is in place. |
|
||||
| G21-9.2 | Validation MUST preserve known negative loader/verifier behavior. | `BackendSafetyGateSUTest#emitStageMustExposeMarshalingLinkageFailureDeterministically`; `BackendGateIIntegrationTest` rejection suite | N/A | pass | |
|
||||
| G21-9.3 | Validation MUST preserve deterministic artifact-level invariants. | `BackendSafetyGateSUTest#fullPipelineMustProduceDeterministicBytecodeForSameInput`; `BytecodeEmitterTest#emitMustRemainDeterministicAfterInterning` | N/A | pass | |
|
||||
| G23-5.1 | Canonical compiler pipeline MUST preserve the shared stage order through `WriteBytecodeArtifact`. | `BuilderPipelineServiceOrderTest#canonicalOrderMustContainOptimizeBetweenLowerAndEmit`; `MainProjectPipelineIntegrationTest#analyzeShouldNotWriteProgramBytecode`; `MainProjectPipelineIntegrationTest#compileShouldProduceInMemoryBytecodeWithoutWritingProgramBytecode`; `MainProjectPipelineIntegrationTest#buildShouldWriteProgramBytecode` | N/A | pass | Dedicated order assertion now covers analyses, compile, and build stage lists, including `AssembleLifecyclePipelineStage`. |
|
||||
| G23-5.2 | `AssembleLifecyclePipelineStage` MUST run immediately after `FrontendPhasePipelineStage` and before IRVM lowering. | `BuilderPipelineServiceOrderTest#canonicalOrderMustContainOptimizeBetweenLowerAndEmit`; `BuilderPipelineServiceOrderTest#analyzeMustTerminateAfterLifecycleAssemblyWithoutBackendArtifacts` | N/A | pass | Analyses terminate at lifecycle assembly; compile stages begin at `LowerToIRVMPipelineStage`. |
|
||||
| G23-6.1 | `analyze` MUST terminate after `AssembleLifecycle` and MUST NOT execute backend artifact stages. | `BuilderPipelineServiceOrderTest#analyzeMustTerminateAfterLifecycleAssemblyWithoutBackendArtifacts`; `MainProjectPipelineIntegrationTest#analyzeShouldNotWriteProgramBytecode` | N/A | pass | Analyze returns an assembled executable `IRBackend` with no IRVM, bytecode, or file output. |
|
||||
| G23-5.1 | Canonical compiler pipeline MUST preserve the shared stage order through `WriteBytecodeArtifact`. | `MainProjectPipelineIntegrationTest#analyzeShouldNotWriteProgramBytecode`; `MainProjectPipelineIntegrationTest#compileShouldProduceInMemoryBytecodeWithoutWritingProgramBytecode`; `MainProjectPipelineIntegrationTest#buildShouldWriteProgramBytecode` | N/A | partial | Entrypoint execution now covers the full analyze -> compile -> build path, but a dedicated order-only assertion for every terminal boundary is still missing. |
|
||||
| G23-6.1 | `analyze` MUST terminate after `FrontendPhase` and MUST NOT execute backend artifact stages. | `MainProjectPipelineIntegrationTest#analyzeShouldNotWriteProgramBytecode` | N/A | pass | The integration fixture asserts the analysis snapshot contract and proves `program.pbx` is not written on the analysis path. |
|
||||
| G23-6.2 | `compile` MUST terminate after `VerifyBytecode` and MUST return a validated in-memory executable result without disk write. | `MainProjectPipelineIntegrationTest#compileShouldProduceInMemoryBytecodeWithoutWritingProgramBytecode`; `BuilderPipelinePublicSurfaceTest#compileResultMustExposeValidatedInMemoryArtifacts` | N/A | pass | Coverage asserts validated in-memory bytecode artifacts and the no-write boundary for `compile`. |
|
||||
| G23-6.3 | `build` MUST extend `compile` only with terminal artifact persistence. | `MainProjectPipelineIntegrationTest#buildShouldWriteProgramBytecode`; `BuilderPipelinePublicSurfaceTest#buildResultMustExposeArtifactPathAndCompilePayload` | N/A | pass | Coverage asserts that `build` retains the compile payload and writes the filesystem artifact path expected by callers. |
|
||||
| G23-7.1 | `AnalysisSnapshot` MUST expose the minimum shared analysis contract. | `MainProjectPipelineIntegrationTest#analyzeShouldNotWriteProgramBytecode`; `BuilderPipelinePublicSurfaceTest#analysisSnapshotMustExposeMinimumSharedContract` | N/A | pass | Both executable and structural contract checks now cover the shared minimum analysis payload. |
|
||||
| G23-8.1 | Caller-specific configs/contexts MUST NOT redefine canonical stage semantics. | N/A | N/A | missing | Requires explicit multi-entrypoint composition tests once non-filesystem contexts are implemented. |
|
||||
| G23-8.3 | A compile-only `FrontendProvider` registered by `languageId` MUST traverse `compile()` to verified bytecode without PBS, `.pbs` sources, or PBS stdlib. | `SyntheticFrontendPipelineTest#compileMustEmitVerifiedBytecodeWithoutPbs` | `FrontendRegistryServiceTest#unregisterMustRefuseToRemoveDefaultPbs` | pass | Synthetic `synth` provider is test-only; common pipeline must not require PBS types, PBS sources, or PBS stdlib. |
|
||||
| G23-9.1 | Legacy public `run` MUST be removed as the normative entrypoint and filesystem-default behavior MUST be expressed through `build`. | `BuilderPipelinePublicSurfaceTest#publicServiceSurfaceMustExposeExplicitEntrypointsAndNoPublicRun`; `MainProjectPipelineIntegrationTest#buildShouldWriteProgramBytecode` | N/A | partial | Public service coverage now proves `run` is no longer public and `build` is the filesystem artifact path, but the CLI composition path is not yet exercised by a dedicated automated test. |
|
||||
| PBS13-12.0 | PBS executable lowering MUST emit `IRBackend` satisfying frontend handoff obligations before common backend lowering. | `IRBackendExecutableContractTest` suite; `PBSFrontendPhaseServiceTest#shouldSynthesizePositiveTopic19FixtureAcrossFileInitProjectInitAndFrame` | `LowerToIRVMServiceTest#lowerMustRejectWhenSyntheticWrapperEntrypointIsMissing`; `LowerToIRVMServiceTest#lowerMustRejectWhenHiddenBootGuardIsMissing`; `LowerToIRVMServiceTest#lowerMustRejectWhenSyntheticCallableOriginIsMissing` | pass | Row group `PBS13-12.x` verifies PBS emission into the common handoff; common backend ownership is covered by G20 rows. |
|
||||
| PBS13-12.7 | PBS executable lowering MUST emit a typed lifecycle declaration and MUST NOT assemble derived wrappers. | `PBSFrontendPhaseServiceTest#shouldSynthesizePositiveTopic19FixtureAcrossFileInitProjectInitAndFrame`; `PbsFrontendCompilerTest#shouldExposeGlobalsAndTypedLifecycleDeclarationInBackendFile` | N/A | pass | Frontend tests assert declaration roles and the absence of module init, published wrapper, and boot guard. |
|
||||
| PBS13-12.8 | Project init MUST be excluded from file-init fragments and MUST execute exactly once after module initializers. | `PbsFrontendCompilerTest#shouldExposeGlobalsAndTypedLifecycleDeclarationInBackendFile`; `LifecycleAssemblerServiceTest#assembleMustInvokeProjectInitExactlyOnceAndExcludeItFromFileInit` | N/A | pass | Colocated `[Init]` is declared as project init and invoked once by the assembled wrapper. |
|
||||
| PBS13-12.9 | Lifecycle module order MUST propagate resolved dependency order without name or `FileId` inference. | `PBSFrontendPhaseServiceTest#shouldPublishDependencyOrderedLifecycleModulesInsteadOfNameOrFileIdOrder`; `IRBackendExecutableContractTest#aggregatorMustRemapTypedLifecycleReferencesAndPreserveDeclaredModuleOrder` | N/A | pass | Adversarial module names and file registration order do not change declared dependency order. |
|
||||
| PBS13-12.0 | Executable backend handoff MUST satisfy addendum obligations. | `IRBackendExecutableContractTest` suite; `PBSFrontendPhaseServiceTest#shouldSynthesizePositiveTopic19FixtureAcrossFileInitProjectInitAndFrame` | `LowerToIRVMServiceTest#lowerMustRejectWhenSyntheticWrapperEntrypointIsMissing`; `LowerToIRVMServiceTest#lowerMustRejectWhenHiddenBootGuardIsMissing`; `LowerToIRVMServiceTest#lowerMustRejectWhenSyntheticCallableOriginIsMissing` | pass | Row group `PBS13-12.x` details each obligation; topic 19 closure now includes lifecycle wrapper/guard/origin evidence. |
|
||||
| PBS13-12.1.1 | Callable identity MUST be preserved at handoff. | `IRBackendExecutableContractTest#aggregatorMustPreserveExecutableFunctionOrderDeterministically` | N/A | pass | |
|
||||
| PBS13-12.1.2 | Observable callable signature MUST be preserved at handoff. | `IRBackendExecutableContractTest#functionContractMustRejectInvalidSlotAndSpanBounds` | N/A | pass | |
|
||||
| PBS13-12.1.3 | Callable category MUST be preserved at handoff. | `PbsFrontendCompilerTest#shouldLowerExecutableFunctionsWithCallsiteCategories` | N/A | pass | |
|
||||
@@ -124,7 +103,7 @@ to concrete positive/negative test evidence and current status.
|
||||
|
||||
1. Any backend PR that changes conformance-relevant behavior in FE/BE pipeline MUST update this matrix.
|
||||
2. If requirement coverage changes, update: mapped tests, status, and `Last Updated` date.
|
||||
3. New normative MUSTs in specs `19/20/21` or PBS `13` lowering obligations MUST add a new matrix row before merge.
|
||||
3. New normative MUSTs in specs `19/20/21` or PBS `13` addendum MUST add a new matrix row before merge.
|
||||
4. Conformance-relevant FE/BE code paths for hard-gate are:
|
||||
- `prometeu-compiler/prometeu-build-pipeline/`
|
||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs/`
|
||||
|
||||
@@ -14,7 +14,6 @@ Its purpose is to make the compiler usable through explicit entrypoints instead
|
||||
This document defines:
|
||||
|
||||
- the canonical stage order shared by compiler entrypoints,
|
||||
- the frontend provider and registry boundary used by shared compiler composition,
|
||||
- the terminal stage and mandatory behavior of `analyze`,
|
||||
- the terminal stage and mandatory behavior of `compile`,
|
||||
- the terminal stage and mandatory behavior of `build`,
|
||||
@@ -26,7 +25,6 @@ This document does not define:
|
||||
- one mandatory Java class or package layout,
|
||||
- editor-specific source providers or document-session providers,
|
||||
- frontend-specific semantic facts beyond the minimum shared `AnalysisSnapshot` contract,
|
||||
- dynamic frontend plugin discovery,
|
||||
- or one mandatory CLI architecture.
|
||||
|
||||
## 3. Authority and Precedence
|
||||
@@ -65,13 +63,12 @@ The canonical stage order is:
|
||||
1. `ResolveDepsPipelineStage`
|
||||
2. `LoadSourcesPipelineStage`
|
||||
3. `FrontendPhasePipelineStage`
|
||||
4. `AssembleLifecyclePipelineStage`
|
||||
5. `LowerToIRVMPipelineStage`
|
||||
6. `OptimizeIRVMPipelineStage`
|
||||
7. `EmitBytecodePipelineStage`
|
||||
8. `LinkBytecodePipelineStage`
|
||||
9. `VerifyBytecodePipelineStage`
|
||||
10. `WriteBytecodeArtifactPipelineStage`
|
||||
4. `LowerToIRVMPipelineStage`
|
||||
5. `OptimizeIRVMPipelineStage`
|
||||
6. `EmitBytecodePipelineStage`
|
||||
7. `LinkBytecodePipelineStage`
|
||||
8. `VerifyBytecodePipelineStage`
|
||||
9. `WriteBytecodeArtifactPipelineStage`
|
||||
|
||||
Public entrypoints MAY terminate early according to this document, but they MUST NOT:
|
||||
|
||||
@@ -83,23 +80,21 @@ Public entrypoints MAY terminate early according to this document, but they MUST
|
||||
|
||||
### 6.1 `analyze`
|
||||
|
||||
`analyze` MUST terminate at `AssembleLifecyclePipelineStage`.
|
||||
`analyze` MUST terminate at `FrontendPhasePipelineStage`.
|
||||
|
||||
`analyze` is defined as:
|
||||
|
||||
1. `ResolveDeps`
|
||||
2. `LoadSources`
|
||||
3. `FrontendPhase`
|
||||
4. `AssembleLifecycle`
|
||||
|
||||
`analyze` MUST:
|
||||
|
||||
1. resolve workspace/dependency inputs needed by the frontend,
|
||||
2. load source surfaces admitted by the selected compiler configuration,
|
||||
3. run frontend semantic analysis and emit a declarative `IRBackend`,
|
||||
4. assemble the common lifecycle from `IRLifecycleDeclaration` when present,
|
||||
5. return an `AnalysisSnapshot` or equivalent result contract whose `IRBackend` is fully assembled when the handoff is executable,
|
||||
6. and remain free of backend artifact side effects.
|
||||
3. run frontend semantic analysis,
|
||||
4. return an `AnalysisSnapshot` or equivalent result contract,
|
||||
5. and remain free of backend artifact side effects.
|
||||
|
||||
`analyze` MUST NOT:
|
||||
|
||||
@@ -234,60 +229,6 @@ This authority model MUST NOT:
|
||||
2. move semantic inline hint policy into LSP,
|
||||
3. or imply that the host editor may synthesize semantic hints when the frontend did not publish them.
|
||||
|
||||
## 8.3 Frontend Provider and Registry Contract
|
||||
|
||||
The shared compiler composition surface MUST represent each registered frontend through a `FrontendProvider` or equivalent provider contract.
|
||||
|
||||
At minimum, each provider MUST expose:
|
||||
|
||||
1. `specification()`, returning the frontend-owned static contract, including its stable `languageId`;
|
||||
2. `compiler()`, returning the compiler-facing frontend service used by the shared build pipeline;
|
||||
3. `languageService()`, returning an optional editor-facing language-service capability for tooling consumers.
|
||||
|
||||
`compiler()` is the only required executable frontend capability. It MUST be sufficient for `analyze`, `compile`, `build`, and backend-facing pipeline flows.
|
||||
|
||||
`languageService()` MUST be optional. A frontend that supports compilation but does not provide editor services MUST remain a valid provider. Absence of `languageService()` MUST NOT prevent project analysis, compilation, backend lowering, bytecode emission, verification, or artifact writing.
|
||||
|
||||
The first shared editor-facing contract SHOULD remain an aggregated language-service capability surface. The common compiler contract MUST NOT require separate top-level service interfaces for each editor feature until a future accepted decision and plan identify a real lifecycle, ownership, or testing boundary that requires that split.
|
||||
|
||||
When exposed, editor-facing capabilities MAY include:
|
||||
|
||||
1. diagnostics intended for live editor sessions,
|
||||
2. completion,
|
||||
3. hover,
|
||||
4. definition and navigation,
|
||||
5. signature help,
|
||||
6. semantic tokens for a live document,
|
||||
7. formatting,
|
||||
8. rename,
|
||||
9. code actions,
|
||||
10. and other host-facing editor assistance.
|
||||
|
||||
These capabilities are optional unless a future frontend- or host-specific decision makes one of them mandatory for a narrower surface. Tooling consumers MUST query capability availability before invoking editor-specific behavior.
|
||||
|
||||
Absent editor capabilities MUST have deterministic fallback behavior at tooling boundaries:
|
||||
|
||||
1. collection-shaped responses SHOULD be empty;
|
||||
2. scalar optional responses SHOULD be absent or use a documented neutral response;
|
||||
3. host protocols that can represent unsupported operations SHOULD do so explicitly;
|
||||
4. and absent editor capability MUST NOT be reported as a compiler failure.
|
||||
|
||||
Compiler diagnostics and editor diagnostics are distinct ownership surfaces. Diagnostics returned by `analyze`, `compile`, and `build` are compiler contract output. Editor diagnostics MAY reuse compiler analysis results, live overlays, caches, or cancellation-aware tooling state, but a frontend MUST NOT be required to provide editor diagnostics in order to compile.
|
||||
|
||||
`FrontendSpec` remains the source of static frontend-owned presentation metadata such as semantic vocabularies, host projections, and visual themes. Producing semantic tokens for a live document is an optional editor-facing capability; the existence of static presentation metadata MUST NOT imply that every frontend can provide live semantic-token results.
|
||||
|
||||
The frontend registry MUST resolve providers by `languageId`. A lookup for an unknown `languageId` MUST fail explicitly with a diagnostic-friendly error. Unknown languages MUST NOT silently fall back to PBS or to any other frontend.
|
||||
|
||||
Common compiler, build pipeline, and Studio-facing consumers MUST obtain frontend behavior through provider lookup. They MUST NOT directly instantiate frontend-specific compiler services, except inside the frontend provider itself or inside an approved application composition root.
|
||||
|
||||
Provider registration MUST be explicit in v1. The registry contract MUST NOT use dynamic plugin discovery, reflection-based discovery, classpath scanning, external JAR loading, or runtime plugin installation to discover frontends.
|
||||
|
||||
PBS is the only initial real provider for this contract. PBS MAY be registered by an application composition root, but PBS MUST NOT become an exclusive semantic owner of the shared compiler pipeline.
|
||||
|
||||
A compile-only `FrontendProvider` registered by `languageId` MUST be a valid participant of `analyze`, `compile`, and `build`. The shared pipeline MUST NOT require PBS frontend types, `.pbs` or `.barrel` sources, or PBS stdlib in order to emit verified bytecode. Test-only frontends MAY exist solely as fixtures. They MUST NOT be product languages, MUST NOT be registered by default bootstrap or Studio composition, and MUST NOT be discovered by plugin scanning, classpath scanning, or external JAR loading.
|
||||
|
||||
The frontend registry MUST expose explicit `register` and `unregister` operations. `unregister` MUST refuse to remove the default PBS provider. Lookup of an unknown `languageId` MUST fail explicitly. `unregister` of an unknown `languageId` MUST be a no-op.
|
||||
|
||||
## 9. Public Surface Rule
|
||||
|
||||
The shared compiler public surface MUST expose explicit entrypoints equivalent in meaning to:
|
||||
|
||||
@@ -97,18 +97,6 @@ Rules:
|
||||
- `output.pipeline` carries tooling/build metadata kept separate at authoring time;
|
||||
- codec must remain explicit and must not be hidden inside format naming.
|
||||
|
||||
### Scene Bank Contract Boundary
|
||||
|
||||
For `Scene Bank` assets, `output.format = SCENE/tilemap_v1` identifies the runtime-facing scene contract.
|
||||
|
||||
Rules:
|
||||
|
||||
- `SCENE/tilemap_v1` is a runtime/publication format, not an editor-file format;
|
||||
- `TMX`, `TSX`, and other editor-specific files may exist as tooling/editorial surfaces, but they are not the canonical publication contract;
|
||||
- the canonical packer input for `Scene Bank` publication is the editor-agnostic Scene Bank request emitted by Studio from canonical scene state;
|
||||
- packer must not reinterpret the presence of editorial files as authorization to bypass the request boundary;
|
||||
- packer must not assume any external scene file is canonical persistence, even when Studio supports that file as import/export compatibility.
|
||||
|
||||
### Explicit Index Collections
|
||||
|
||||
When `output.pipeline` carries ordered collections whose members need stable semantic identity, that identity must not depend on raw list position alone.
|
||||
@@ -118,14 +106,6 @@ Rules:
|
||||
- collections such as `output.pipeline.palettes` may remain JSON arrays for authoring ergonomics;
|
||||
- when a collection member has runtime- or packing-relevant identity, each entry must carry an explicit `index`;
|
||||
- `output.pipeline.palettes` entries must use the shape `{ "index": <int>, "palette": { ... } }`;
|
||||
- glyph-bank palette payloads must expose canonical `rgba8888` color values in runtime RGBA channel order;
|
||||
- ARGB values produced by host image APIs are import-side implementation details, not canonical declaration or projection fields;
|
||||
- `convertedRgb565` is not part of the normal palette contract;
|
||||
- glyph-bank `palette_count` is an effective runtime metadata field and means
|
||||
the number of serialized and resident RGBA8888 palettes for the bank;
|
||||
- glyph-bank `palette_count` must be in the inclusive range `1..=64`;
|
||||
- `palette_authored`, when present, is informative tooling metadata only and
|
||||
must not be treated as runtime-effective metadata;
|
||||
- the packer must sort such entries by numeric `index`, not by physical array position;
|
||||
- duplicate or malformed indices are structural errors;
|
||||
- missing or malformed `palette` payloads are structural errors;
|
||||
@@ -141,7 +121,8 @@ Example:
|
||||
{
|
||||
"index": 0,
|
||||
"palette": {
|
||||
"rgba8888": [4294901760, 16711935]
|
||||
"originalArgb8888": [4294901760, 4278255360],
|
||||
"convertedRgb565": [63488, 2016]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -150,19 +131,6 @@ Example:
|
||||
}
|
||||
```
|
||||
|
||||
For glyph-bank palettes, each `rgba8888` integer is interpreted as
|
||||
`0xRRGGBBAA`.
|
||||
|
||||
Rules:
|
||||
|
||||
- palette index `0` is an ordinary palette slot;
|
||||
- glyph palettes expose 16 usable colors;
|
||||
- transparency and partial transparency are represented only by the alpha byte
|
||||
in the RGBA8888 palette value;
|
||||
- alpha values from `0` through `255` are valid;
|
||||
- magenta color-key behavior is not supported as a normal declaration,
|
||||
projection, or publication rule.
|
||||
|
||||
## Metadata Source Segmentation and Runtime Sink
|
||||
|
||||
`asset.json` may keep metadata segmented by concern during authoring.
|
||||
|
||||
@@ -147,8 +147,7 @@ Offset ambiguity guardrail:
|
||||
|
||||
## Format-Specific Baseline: `GLYPH/indexed_v1`
|
||||
|
||||
The producer contract for `GLYPH/indexed_v1` is runtime-aligned and uses a
|
||||
variable RGBA8888 palette block.
|
||||
The first-wave producer contract for `GLYPH/indexed_v1` is fixed and runtime-aligned.
|
||||
|
||||
### Tile Selection and Identity
|
||||
|
||||
@@ -179,10 +178,10 @@ Rules:
|
||||
|
||||
- the serialized payload for `GLYPH/indexed_v1` is:
|
||||
1. one packed `u4` pixel plane for the full emitted sheet;
|
||||
2. one palette block of `palette_count * 16 * 4` bytes;
|
||||
2. one palette block of `64 * 16 * 2 = 2048` bytes;
|
||||
- packed pixel bytes must be emitted by the packer, not inferred later by the runtime;
|
||||
- the palette block is serialized as RGBA8888 values in runtime RGBA channel order;
|
||||
- each palette entry is emitted as four bytes in `R`, `G`, `B`, `A` order;
|
||||
- the palette block is serialized as `RGB565` `u16` values;
|
||||
- palette bytes must be emitted in little-endian order;
|
||||
- payload interpretation must not depend on incidental per-artifact boundaries.
|
||||
|
||||
### Runtime Entry Derivation
|
||||
@@ -197,15 +196,10 @@ Rules:
|
||||
- `width`
|
||||
- `height`
|
||||
- `palette_count`
|
||||
- tile-bank v1 requires `palette_count` in the inclusive range `1..=64`;
|
||||
- `palette_count` is the number of serialized palettes and resident runtime
|
||||
palettes for the bank;
|
||||
- tile-bank v1 requires `palette_count = 64`;
|
||||
- tile-bank v1 size formulas are:
|
||||
- `size = ceil(width * height / 2) + palette_count * 16 * 4`
|
||||
- `decoded_size = (width * height) + palette_count * 16 * 4`
|
||||
- fixed 64-palette padding is not a compatibility mode unless
|
||||
`palette_count = 64` and the payload directly satisfies the v1 contract;
|
||||
- `GLYPH/indexed_v2` must not be introduced for this palette-count correction.
|
||||
- `size = ceil(width * height / 2) + 2048`
|
||||
- `decoded_size = (width * height) + 2048`
|
||||
|
||||
### Palette Contract
|
||||
|
||||
@@ -213,76 +207,11 @@ Rules:
|
||||
|
||||
- bank palettes are declared under `output.pipeline.palettes`;
|
||||
- each palette declaration uses the shape `{ "index": <int>, "palette": { ... } }`;
|
||||
- each palette payload uses canonical `rgba8888` entries interpreted as `0xRRGGBBAA`;
|
||||
- palette ordering is ascending numeric `index`, never raw array position;
|
||||
- palette ids in the emitted glyph bank are direct declared palette indices;
|
||||
- v1 has no sparse-to-dense palette remapping metadata;
|
||||
- palette index `0` is ordinary and may carry any RGBA8888 value;
|
||||
- glyph palettes have 16 usable entries;
|
||||
- transparency and partial transparency are encoded only by RGBA alpha;
|
||||
- magenta color-key behavior is not part of the normal glyph-bank contract;
|
||||
- palette ids in the emitted glyph bank are the normalized declared palette indices;
|
||||
- any tile in the bank may be rendered with any palette in the bank at runtime;
|
||||
- palette selection is a runtime draw concern, not a tile-payload embedding concern.
|
||||
|
||||
## Format-Specific Baseline: `SCENE/tilemap_v1`
|
||||
|
||||
`SCENE/tilemap_v1` is the wave-1 Scene Bank publication format.
|
||||
|
||||
### Canonical Build Input
|
||||
|
||||
Rules:
|
||||
|
||||
- packer receives a canonical editor-agnostic Scene Bank request as its publication input;
|
||||
- packer must not parse `TMX`, `TSX`, or other editor-specific source files directly as part of runtime scene publication;
|
||||
- the request is produced by Studio from canonical scene state after canonical validation;
|
||||
- equivalent requests must produce equivalent emitted `SCENE` payloads.
|
||||
|
||||
Baseline request shape:
|
||||
|
||||
```text
|
||||
ScenePackRequest
|
||||
- version: int
|
||||
- layers: [ScenePackLayerRequest; 4]
|
||||
|
||||
ScenePackLayerRequest
|
||||
- active: bool
|
||||
- glyph_asset_id: int
|
||||
- tile_size: int
|
||||
- parallax_factor_x: float
|
||||
- parallax_factor_y: float
|
||||
- width: int
|
||||
- height: int
|
||||
- tiles: List<ScenePackTileRequest>
|
||||
|
||||
ScenePackTileRequest
|
||||
- active: bool
|
||||
- glyph_id: int
|
||||
- palette_id: int
|
||||
- flip_x: bool
|
||||
- flip_y: bool
|
||||
```
|
||||
|
||||
### Request Semantics
|
||||
|
||||
Rules:
|
||||
|
||||
- the request always materializes exactly `4` layer entries in wave 1;
|
||||
- `tile_count` is derived from `width * height`;
|
||||
- `glyph_asset_id` is the runtime-facing glyph dependency identity carried by the scene payload;
|
||||
- `active` at layer scope determines whether the layer participates in emitted scene output;
|
||||
- `active` at tile scope determines whether the tile contributes an active tile record to the emitted scene payload;
|
||||
- `palette_id` uses a layer-owned editorial default with optional per-tile override before the request reaches packer;
|
||||
- packer consumes only the resolved per-tile `palette_id` values present in the canonical request;
|
||||
- request-to-binary projection should remain as close to isomorphic as possible.
|
||||
|
||||
### Wave-1 Constraints
|
||||
|
||||
Rules:
|
||||
|
||||
- wave 1 remains limited to exactly one logical tileset/glyph source per layer before request emission;
|
||||
- packer does not own editor-format interoperability rules; it trusts the canonical request boundary once the request is structurally valid;
|
||||
- binary reserved fields must not require corresponding request fields unless a later decision gives them editorial meaning.
|
||||
|
||||
## Determinism
|
||||
|
||||
Equivalent build inputs must produce equivalent outputs.
|
||||
|
||||
@@ -157,25 +157,6 @@ At minimum, the model should support fields equivalent to:
|
||||
- `applied_actions`
|
||||
- `blockers`
|
||||
|
||||
## Scene Bank Studio Integration Boundary
|
||||
|
||||
Scene Bank publication is a split workflow across Studio and packer.
|
||||
|
||||
Rules:
|
||||
|
||||
- Studio owns canonical scene validation and projection of the canonical Scene Bank request;
|
||||
- packer owns compilation of the canonical Scene Bank request into runtime `SCENE` output;
|
||||
- packer must report structural diagnostics against the canonical Scene Bank request artifact when that artifact is missing, malformed, or inconsistent with the locked format rules;
|
||||
- packer must not report editor-file parsing diagnostics as if `TMX` or `TSX` were direct runtime build inputs.
|
||||
|
||||
### Request Boundary Visibility
|
||||
|
||||
Rules:
|
||||
|
||||
- the Studio-to-packer handoff for Scene Bank publication must be a canonical request artifact or equivalent request surface derived from canonical Studio scene state;
|
||||
- if external compatibility files change without corresponding Studio import/update, packer must continue to treat the canonical request boundary as authoritative rather than silently reparsing editor files;
|
||||
- future supported editors may replace or coexist with Tiled-backed interoperability only if Studio continues to emit the same canonical request boundary.
|
||||
|
||||
## Asset Event Lane
|
||||
|
||||
The system includes a dedicated asset workspace event/reporting lane.
|
||||
|
||||
@@ -44,10 +44,15 @@ The left workspace selector remains fixed in the baseline Studio shell.
|
||||
|
||||
The baseline workspace set includes:
|
||||
|
||||
- Code Editor;
|
||||
- Asset Management;
|
||||
- Debugger/Profiler;
|
||||
- Shipper, temporarily represented by the current `BuilderWorkspace`.
|
||||
|
||||
Workspace-local behavior for the first `Code Editor` wave is defined in:
|
||||
|
||||
- `5. Code Editor Workspace Specification.md`
|
||||
|
||||
`BuilderWorkspace` is transitional and must not be treated as a long-term architectural reference for the final shipping surface.
|
||||
|
||||
## Workspace Architecture Model
|
||||
@@ -66,7 +71,7 @@ Baseline workspace architecture rules are:
|
||||
The shell must not encourage a workspace model where every interaction falls back to whole-workspace refresh.
|
||||
|
||||
Detailed local workspace composition remains workspace-owned.
|
||||
For example, `Assets`-local navigator behavior, detail-pane composition, and mutation flows are not shell-global rules and must be defined by the workspace-local specifications that still exist.
|
||||
For example, `Code Editor`-local layout, navigator behavior, tab rules, passive placeholder surfaces, document access-mode behavior, and editor-local save surfaces are not shell-global rules and must be defined by the workspace-local editor specification.
|
||||
|
||||
Project-session boundaries may still exist above a workspace when the state must remain alive while the project window stays open.
|
||||
|
||||
|
||||
@@ -224,15 +224,6 @@ Rules:
|
||||
- `output.format`
|
||||
- `codec`
|
||||
- `preload`
|
||||
- Glyph-bank palette projections must use canonical `rgba8888` values when
|
||||
palette data is shown.
|
||||
- Glyph-bank runtime output projections must present `palette_count`, when
|
||||
shown, as the runtime-effective serialized and resident palette count in
|
||||
`1..=64`.
|
||||
- Studio-facing glyph palette views must not present `palette_authored` as the
|
||||
runtime-effective count.
|
||||
- Studio-facing glyph palette views must not expose `convertedRgb565` as normal
|
||||
runtime or tooling truth.
|
||||
- Runtime-facing output information must not require raw JSON inspection.
|
||||
|
||||
### Inputs / Preview
|
||||
@@ -267,105 +258,6 @@ Rules:
|
||||
- Primary actions for unregistered assets include `Register`.
|
||||
- `Register` is a direct action in Studio UX. If registration is valid, clicking it must register immediately without an extra acknowledgement step.
|
||||
- If registration is blocked, Studio may surface the blocking preview inline so the user can inspect why registration cannot proceed.
|
||||
|
||||
## Scene Bank Editorial and Publication Rules
|
||||
|
||||
`Scene Bank` is an asset-owned workflow inside `Assets`.
|
||||
|
||||
Rules:
|
||||
|
||||
- `Scene Bank` authoring, diagnostics, canonical validation, and external-format interoperability are owned by the `Assets` workspace;
|
||||
- the primary editorial surface for `Scene Bank` is a Studio-owned canonical scene entity;
|
||||
- wave-1 `TMX` and `TSX` integration is a supported import/export compatibility surface, not the canonical asset model and not the canonical publication contract;
|
||||
- supported external formats may be replaced or coexist with other editors in the future only if Studio continues to materialize the same canonical Scene Bank publication request from canonical scene state;
|
||||
- `Assets` must not treat Tiled files as the canonical asset model by accident.
|
||||
|
||||
### Scene Bank Ownership Boundary
|
||||
|
||||
The `Assets` workspace owns the editorial side of `Scene Bank` publication.
|
||||
|
||||
Rules:
|
||||
|
||||
- Studio owns the canonical Scene Bank scene entity and its editorial persistence;
|
||||
- Studio owns layer enablement, dimensions, linked glyph/tileset asset binding, layer default palette data, layer parallax data, and equivalent scene-owned editorial state;
|
||||
- Studio owns import from supported external formats into canonical scene state;
|
||||
- Studio owns export from canonical scene state into supported external formats;
|
||||
- Studio owns projection from canonical scene state into the canonical publication request;
|
||||
- packer owns only compilation of that canonical request into runtime `SCENE` bytes.
|
||||
|
||||
### Canonical Publication Request
|
||||
|
||||
The canonical publication contract from Studio to packer is the Scene Bank request.
|
||||
|
||||
Baseline shape:
|
||||
|
||||
```text
|
||||
ScenePackRequest
|
||||
- version: int
|
||||
- layers: [ScenePackLayerRequest; 4]
|
||||
|
||||
ScenePackLayerRequest
|
||||
- active: bool
|
||||
- glyph_asset_id: int
|
||||
- tile_size: int
|
||||
- parallax_factor_x: float
|
||||
- parallax_factor_y: float
|
||||
- width: int
|
||||
- height: int
|
||||
- tiles: List<ScenePackTileRequest>
|
||||
|
||||
ScenePackTileRequest
|
||||
- active: bool
|
||||
- glyph_id: int
|
||||
- palette_id: int
|
||||
- flip_x: bool
|
||||
- flip_y: bool
|
||||
```
|
||||
|
||||
Rules:
|
||||
|
||||
- the request is derived from canonical scene state, not from editor-native files directly;
|
||||
- the request must remain editor-agnostic and must not embed `TMX`, `TSX`, or other editor-specific source structures as the publication contract;
|
||||
- wave 1 materializes exactly `4` layer entries;
|
||||
- `tile_count` is derived from `width * height`;
|
||||
- request fields reserved only for binary layout must not be surfaced unless they gain explicit editorial meaning.
|
||||
|
||||
### Scene Bank Editorial Mapping Rules
|
||||
|
||||
Rules:
|
||||
|
||||
- `glyph_asset_id` is derived from the glyph asset selected for the layer;
|
||||
- `parallax_factor_x` and `parallax_factor_y` are layer-owned editorial fields in Studio;
|
||||
- `palette_id` has a layer-owned default and may be overridden per tile when the supported editorial surface provides an explicit override;
|
||||
- `palette_id` remains an index into the referenced glyph palette and does not
|
||||
imply a color format change in the scene request;
|
||||
- referenced glyph palettes resolve to RGBA8888 entries, with palette index `0`
|
||||
treated as an ordinary palette slot;
|
||||
- layer `active` determines whether the layer participates in publication output;
|
||||
- tile `active` determines whether the tile contributes an active tile record to the published request;
|
||||
- canonical scene persistence must not depend on `TMX`, `TSX`, or any other external file format remaining present on disk.
|
||||
|
||||
### External Format Interoperability Rules
|
||||
|
||||
Rules:
|
||||
|
||||
- Studio must expose supported scene and glyph-bank interoperability through explicit import/export workflow;
|
||||
- wave-1 Tiled interoperability consists of `TMX (Tiled)` scene import/export and `TSX (Tiled)` glyph tileset export;
|
||||
- scene import must validate minimum structural compatibility before mutating canonical scene state;
|
||||
- scene import must fail explicitly, with logs or diagnostics, when an external file contains unsupported structural divergence such as unexpected layers, unexpected tilesets, or equivalent unsupported mutations;
|
||||
- failed scene import must not silently partially rewrite canonical scene state;
|
||||
- scene `TMX` export must overwrite the destination file if present, or create it if absent;
|
||||
- glyph tileset `TSX` export must overwrite the destination file if present, or create it if absent;
|
||||
- exported external files are compatibility artifacts and must not become the canonical source of truth.
|
||||
|
||||
### Canonical Validation Rules
|
||||
|
||||
Rules:
|
||||
|
||||
- publication-ready Scene Bank state requires absence of blocking diagnostics against canonical scene state;
|
||||
- Studio must validate canonical scene state during `Analyse` and/or `Pack`;
|
||||
- Studio may validate external files for import compatibility during import, but that validation does not replace canonical scene validation;
|
||||
- the old `validate layer`, `accept layer`, `validate scene from TMX`, and `accept scene from TMX` workflow must not define Scene Bank readiness.
|
||||
- Sensitive actions such as `Exclude From Build`, `Remove`, and `Relocate` must be visually separated from routine actions.
|
||||
- Sensitive actions must not look interchangeable with routine actions.
|
||||
- `Relocate` must collect an explicit user-chosen destination root before the staged preview is generated.
|
||||
|
||||
@@ -0,0 +1,377 @@
|
||||
# Code Editor Workspace Specification
|
||||
|
||||
## Status
|
||||
|
||||
Active
|
||||
|
||||
## Applies To
|
||||
|
||||
- `prometeu-studio`
|
||||
- the Studio `Code Editor` workspace
|
||||
- the first controlled editor write wave for supported documents including frontend sources
|
||||
|
||||
## Purpose
|
||||
|
||||
Define the normative Studio contract for the first `Code Editor` workspace wave.
|
||||
|
||||
This specification stabilizes:
|
||||
|
||||
- the baseline visual composition of the workspace,
|
||||
- the `Project Navigator` role and scope,
|
||||
- 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,
|
||||
- the editor-local save surfaces,
|
||||
- and the workspace boundary with the integrated frontend semantic-read phase.
|
||||
|
||||
## Authority and Precedence
|
||||
|
||||
This specification extends:
|
||||
|
||||
- [`1. Studio Shell and Workspace Layout Specification.md`](1.%20Studio%20Shell%20and%20Workspace%20Layout%20Specification.md)
|
||||
- [`2. Studio UI Foundations Specification.md`](2.%20Studio%20UI%20Foundations%20Specification.md)
|
||||
- [`3. Studio Components Module Specification.md`](3.%20Studio%20Components%20Module%20Specification.md)
|
||||
- [`6. Project Document VFS Specification.md`](6.%20Project%20Document%20VFS%20Specification.md)
|
||||
- [`7. Integrated LSP Semantic Read Phase Specification.md`](7.%20Integrated%20LSP%20Semantic%20Read%20Phase%20Specification.md)
|
||||
|
||||
If this document conflicts with the global Studio shell specifications, the shell specifications control shell-wide behavior and this document controls workspace-local editor behavior.
|
||||
|
||||
## Normative Inputs
|
||||
|
||||
The `Code Editor` workspace must assume:
|
||||
|
||||
- the Studio shell already mounts `Code Editor` as a baseline workspace,
|
||||
- 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,
|
||||
- the integrated frontend semantic-read phase may later add dedicated structural-anchor metadata for exact scope-indicator anchoring,
|
||||
- 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.
|
||||
|
||||
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 document access policy and save capability from `prometeu-vfs` rather than rederiving editability locally.
|
||||
|
||||
## Workspace Model
|
||||
|
||||
The `Code Editor` workspace is:
|
||||
|
||||
- project-aware,
|
||||
- file-oriented,
|
||||
- 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:
|
||||
|
||||
- see the full project tree,
|
||||
- identify frontend-relevant source roots visually,
|
||||
- open supported files into editor tabs,
|
||||
- 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 broader IDE automation remains outside this wave.
|
||||
|
||||
The workspace must not pretend to offer:
|
||||
|
||||
- merge behavior,
|
||||
- completion,
|
||||
- rename, code actions, or formatting,
|
||||
- or editor-owned semantic inference that bypasses the integrated LSP phase.
|
||||
|
||||
## Baseline Layout
|
||||
|
||||
The baseline workspace layout is:
|
||||
|
||||
- a left editor column,
|
||||
- a central editor work area,
|
||||
- a lower helper region,
|
||||
- and a bottom status bar.
|
||||
|
||||
The left editor column must be a vertical stack containing:
|
||||
|
||||
- a functional `Project Navigator` at the top,
|
||||
- and a reserved `Outline` region below it.
|
||||
|
||||
The central editor work area must contain:
|
||||
|
||||
- a top command bar containing at least `Save` and `Save All`,
|
||||
- a tab strip at the top,
|
||||
- and the editor body below it.
|
||||
|
||||
The lower helper region is present in this wave only as a passive placeholder.
|
||||
|
||||
## Component Ownership Rules
|
||||
|
||||
The `Code Editor` workspace must be implemented as a composition root plus child controls/panels rather than one monolithic render surface.
|
||||
|
||||
Rules:
|
||||
|
||||
- the workspace root should coordinate layout, workspace-level session state, and structural synchronization;
|
||||
- the workspace root should consume project-session-owned document services such as `prometeu-vfs` rather than owning their lifecycle locally;
|
||||
- the `Project Navigator`, tab strip, editor body, reserved `Outline`, helper region, and status bar should exist as explicit local surfaces;
|
||||
- passive placeholder surfaces must remain visually real without implying unsupported functionality;
|
||||
- and the first wave should preserve a clean path for later extraction of reusable Studio controls when the surfaces become stable enough to justify that move.
|
||||
|
||||
## Project Navigator Rules
|
||||
|
||||
### Primary Navigation Unit
|
||||
|
||||
- The primary navigation unit is the project file or directory.
|
||||
- The navigator must cover the whole project rather than only frontend-tagged roots.
|
||||
- Frontend tagging is supplementary context, not an inclusion filter.
|
||||
|
||||
### Structural Snapshot
|
||||
|
||||
- The navigator must consume a structural project-tree entity provided by `prometeu-vfs`.
|
||||
- That structural tree must not replace the filesystem as the source of truth.
|
||||
- Content snapshots are separate and are only required for files that are actually opened in the editor through `prometeu-vfs`.
|
||||
- The navigator may request more targeted tree refresh operations than a full-tree reload when the `prometeu-vfs` contract provides them.
|
||||
|
||||
### Visibility and Ordering
|
||||
|
||||
- All project files and directories must be visible in the navigator.
|
||||
- Hidden files must be included by default.
|
||||
- Folders must sort before files.
|
||||
- Items within those groups must sort alphabetically.
|
||||
|
||||
### Frontend-Aware Tagging
|
||||
|
||||
- `prometeu.json` plus the selected frontend may be used to tag relevant source roots or source directories.
|
||||
- That tagging must not hide non-source project files.
|
||||
- That tagging must not imply semantic/editor-language ownership by the navigator itself.
|
||||
- Rendering those tags remains a Studio UI concern even when the source data comes from `prometeu-vfs`.
|
||||
|
||||
### Refresh Model
|
||||
|
||||
- The navigator must perform one initial refresh when the project opens.
|
||||
- The navigator must expose a manual refresh action directly on the navigator surface and route that request through `prometeu-vfs`.
|
||||
- Watcher-driven automatic refresh is explicitly deferred from this wave.
|
||||
|
||||
### Unsupported Files
|
||||
|
||||
- Unsupported or non-text files may still appear in the navigator.
|
||||
- File support and unsupported-file classification belong to `prometeu-vfs`.
|
||||
- Attempting to open such a file must show a simple modal stating that the file is not supported in this wave.
|
||||
- The workspace must not fake a partial preview to imply unsupported file-format coverage.
|
||||
|
||||
## Tabs and File Opening 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 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.
|
||||
- The tab label must use only the file name with extension.
|
||||
|
||||
The first wave must not define:
|
||||
|
||||
- tab pinning,
|
||||
- drag-and-drop tab reordering,
|
||||
- grouped tabs,
|
||||
- split editors.
|
||||
|
||||
Project-session-owned cross-session tab restoration is accepted for the project-local Studio state wave.
|
||||
|
||||
Rules:
|
||||
|
||||
- persisted editor restoration state must come from the project-session-owned `.studio/` state store rather than from an editor-owned ad hoc file;
|
||||
- accepted restoration scope in this wave is limited to open tabs and active tab;
|
||||
- editor layout restoration accepted in this wave may include divider-driven editor sizing, `Project Navigator` expansion state, and dock-panel configuration such as `Outline` and `Helper` open/closed state plus their restored size;
|
||||
- restoration must degrade safely when a previously open file is missing or unsupported.
|
||||
|
||||
## Access-Mode and Save Model
|
||||
|
||||
The first `Code Editor` write wave is controlled rather than universally editable.
|
||||
|
||||
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 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;
|
||||
- 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;
|
||||
- the active indentation policy MUST remain stable while the user edits document contents;
|
||||
- opening a file whose existing indentation diverges from the configured policy MUST NOT trigger automatic reformatting;
|
||||
- and the workspace must not define local merge/conflict behavior against disk changes.
|
||||
|
||||
## Outline Rules
|
||||
|
||||
- The `Outline` region must exist structurally in this wave.
|
||||
- Before the integrated LSP semantic-read phase is implemented, it may show a discreet placeholder state.
|
||||
- When the integrated LSP semantic-read phase is active, the `Outline` region may render frontend document-symbol structure and workspace-symbol-backed navigation owned by that phase.
|
||||
- The workspace must not fake semantic outline structure before real semantic ownership exists.
|
||||
|
||||
## Helper Region Rules
|
||||
|
||||
- The helper region must exist structurally in this wave.
|
||||
- Before the integrated LSP semantic-read phase is implemented, it may remain passive.
|
||||
- It exists only to stabilize workspace composition and reserve future space.
|
||||
- It may later host diagnostics or related semantic-read detail for frontend documents without changing workspace ownership.
|
||||
- It must not become a substitute for the shell-level `Activity` surface.
|
||||
|
||||
## Integrated Semantic-Read Boundary
|
||||
|
||||
- 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`.
|
||||
- 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.
|
||||
- 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 build participation or for bypassing `prometeu-vfs` access policy.
|
||||
|
||||
## Inline Hint Rules
|
||||
|
||||
Inline hints must be treated as a host-generic editor capability rather than as a PBS-only feature.
|
||||
|
||||
The Studio `Code Editor` must render inline hints only from frontend-owned semantic payloads transported through the integrated semantic-read phase.
|
||||
|
||||
The editor must not invent:
|
||||
|
||||
- hint existence policy,
|
||||
- hint text,
|
||||
- hint categories,
|
||||
- or host-owned semantic fallback hints.
|
||||
|
||||
If a frontend publishes valid inline hints through the accepted semantic-read contract, the editor must render them.
|
||||
|
||||
If a frontend does not publish inline hints for a construct, the editor must not synthesize one.
|
||||
|
||||
Inline hints are decorative only.
|
||||
|
||||
Therefore the editor must ensure that inline hints:
|
||||
|
||||
- do not modify document text;
|
||||
- do not become part of persisted file content;
|
||||
- do not participate as copied document text;
|
||||
- do not redefine selection ranges;
|
||||
- and do not redefine caret movement over the text model.
|
||||
|
||||
The completed capability must render inline hints as real inline editor decorations attached to document positions inside the editor flow.
|
||||
|
||||
An approximate visual implementation may exist only as an explicit transitional wave.
|
||||
|
||||
Any transitional approximation:
|
||||
|
||||
- must be documented as transitional;
|
||||
- must not redefine the final editor contract;
|
||||
- and must converge to real inline rendering in a later execution step.
|
||||
|
||||
When only some inline hint spans remain valid under degraded semantic analysis, the editor must continue rendering those valid spans rather than disabling all inline hints for the document.
|
||||
|
||||
## Scope Indicator Rules
|
||||
|
||||
The default semantic scope-indicator surface in the Code Editor must remain the gutter.
|
||||
|
||||
The first active-state wave must render at most two simultaneous semantic indicators:
|
||||
|
||||
- `activeContainer`
|
||||
- `activeScope`
|
||||
|
||||
The editor must not restore the previous full ancestry stack as the default active-state presentation.
|
||||
|
||||
`activeScope` must be selected as the smallest structural range that contains the caret.
|
||||
|
||||
`activeContainer` must be selected as the immediate structural ancestor of `activeScope`.
|
||||
|
||||
If no valid structural ancestor exists, the editor may omit `activeContainer`.
|
||||
|
||||
The editor must not promote a higher semantic owner such as function, type, or module when a nearer structural ancestor exists.
|
||||
|
||||
The concrete visual presentation of `activeContainer` and `activeScope` remains frontend-owned. This specification intentionally does not fix:
|
||||
|
||||
- colors,
|
||||
- stroke style,
|
||||
- dashed versus solid treatment,
|
||||
- opacity,
|
||||
- thickness,
|
||||
- or equivalent visual-emphasis details.
|
||||
|
||||
The Studio editor must only preserve the semantic distinction between the two indicator roles.
|
||||
|
||||
Exact guide start and end anchoring must consume the dedicated structural-anchor semantic surface defined by the integrated semantic-read specification.
|
||||
|
||||
The editor must not treat local brace scanning heuristics as the final production contract for exact anchor placement.
|
||||
|
||||
## Status Bar Rules
|
||||
|
||||
The status bar must remain mostly passive in this wave.
|
||||
|
||||
Its left side must show the breadcrumb path of the active file, such as `proj > src > file.pbs`.
|
||||
|
||||
Its right side must show:
|
||||
|
||||
- `L:C`,
|
||||
- line separator,
|
||||
- tabs/spaces mode,
|
||||
- file extension or language,
|
||||
- and access-mode state.
|
||||
|
||||
For this wave:
|
||||
|
||||
- `L:C` may remain a visual placeholder,
|
||||
- editable non-frontend documents may show their current file-type state without implying build participation,
|
||||
- hard `read-only` frontend documents must show an explicit `read-only` state,
|
||||
- and the status-bar `read-only` surface should be shaped so it can evolve into a per-file toggle later without requiring a model rewrite.
|
||||
|
||||
## Session State Rules
|
||||
|
||||
Visual/editorial state in this wave is session-local only.
|
||||
|
||||
That includes at minimum:
|
||||
|
||||
- open tabs,
|
||||
- active tab selection,
|
||||
- tree expansion state,
|
||||
- and similar visual editor state.
|
||||
|
||||
The following remain outside editor-owned session state:
|
||||
|
||||
- project-session ownership of `prometeu-vfs`,
|
||||
- structural project-tree data returned by `prometeu-vfs`,
|
||||
- support classification rules,
|
||||
- document loading responsibilities,
|
||||
- save persistence policy,
|
||||
- and build-facing document ownership.
|
||||
|
||||
Editable documents may have session-local editorial snapshots while the project session remains open.
|
||||
Those snapshots are editorial only and must not be treated as canonical build input by implication.
|
||||
|
||||
Persisting that state across Studio executions is deferred.
|
||||
|
||||
## Non-Goals
|
||||
|
||||
- merge/conflict resolution
|
||||
- watcher-driven automatic refresh
|
||||
- public `prometeu-vfs` event APIs
|
||||
- helper panel functionality
|
||||
- editor-owned semantic analysis that bypasses the integrated LSP phase
|
||||
- frontend editing
|
||||
- completion, rename, code actions, or formatting
|
||||
- a normative editor event contract in this wave
|
||||
- any implication that editor-owned in-memory snapshots participate in the build
|
||||
- host-owned semantic inline hint policy
|
||||
|
||||
## Exit Criteria
|
||||
|
||||
This specification is complete enough when:
|
||||
|
||||
- the controlled write-wave scope is unambiguous,
|
||||
- the `Project Navigator` and tab responsibilities are explicit,
|
||||
- editor-local `Save` and `Save All` are part of the normative workspace contract,
|
||||
- hard frontend `read-only` behavior is explicit in both warning and status-bar surfaces,
|
||||
- the workspace boundary with the integrated frontend semantic-read phase is explicit,
|
||||
- placeholder versus functional regions are clearly separated,
|
||||
- and excluded frontend editing and completion behavior are clearly outside the current contract.
|
||||
@@ -0,0 +1,235 @@
|
||||
# Project Document VFS Specification
|
||||
|
||||
## Status
|
||||
|
||||
Active
|
||||
|
||||
## Applies To
|
||||
|
||||
- `prometeu-vfs`
|
||||
- `prometeu-studio`
|
||||
- the Studio project-document boundary for the first controlled Code Editor write wave
|
||||
|
||||
## Purpose
|
||||
|
||||
Define the normative Studio contract for `prometeu-vfs` as the project-document boundary consumed by Studio workspaces.
|
||||
|
||||
This specification stabilizes:
|
||||
|
||||
- `prometeu-vfs` module role,
|
||||
- project-session ownership,
|
||||
- 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 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.
|
||||
|
||||
## Authority and Precedence
|
||||
|
||||
This specification extends:
|
||||
|
||||
- [`1. Studio Shell and Workspace Layout Specification.md`](1.%20Studio%20Shell%20and%20Workspace%20Layout%20Specification.md)
|
||||
- [`5. Code Editor Workspace Specification.md`](5.%20Code%20Editor%20Workspace%20Specification.md)
|
||||
|
||||
If this document conflicts with shell-wide Studio rules, the shell specification controls shell-wide behavior and this document controls the project-document boundary contract.
|
||||
|
||||
## Normative Inputs
|
||||
|
||||
`prometeu-vfs` must assume:
|
||||
|
||||
- the current migration wave carries only the Code Editor capabilities that already exist today,
|
||||
- the initial backend is filesystem-backed,
|
||||
- the boundary is project-scoped rather than product-global,
|
||||
- the boundary must outlive workspace focus changes for an opened project,
|
||||
- Studio UI remains the owner of visual tree state and error presentation,
|
||||
- and the integrated `prometeu-lsp` phase consumes this boundary as a semantic-read client rather than as a persistence owner.
|
||||
|
||||
`prometeu-vfs` must not infer:
|
||||
|
||||
- watcher-driven refresh in this wave,
|
||||
- public event API exposure in this wave,
|
||||
- build participation for editorial snapshots by implication,
|
||||
- or ownership over non-Studio domains such as packer assets.
|
||||
|
||||
## Module Role
|
||||
|
||||
`prometeu-vfs` is:
|
||||
|
||||
- the Studio project-document boundary,
|
||||
- the owner of project structural tree data for the covered scope,
|
||||
- the owner of project document resolution for the covered scope,
|
||||
- the owner of file support and unsupported-file classification for the covered scope,
|
||||
- the owner of document access policy for the covered scope,
|
||||
- the owner of save persistence for editable documents in this wave,
|
||||
- and the required path through which Studio accesses project-document filesystem state in this wave.
|
||||
|
||||
`prometeu-vfs` is not:
|
||||
|
||||
- a visual tree control,
|
||||
- a Studio shell replacement,
|
||||
- a product-wide universal filesystem layer,
|
||||
- or a public event transport in this wave.
|
||||
|
||||
## Project Session Ownership
|
||||
|
||||
The primary `prometeu-vfs` instance must belong to the Studio project session.
|
||||
|
||||
Rules:
|
||||
|
||||
- a project-scoped `prometeu-vfs` instance must be created when a Studio project session is opened;
|
||||
- that instance must remain alive while the project session remains open;
|
||||
- switching workspace focus must not destroy or recreate the project-document state by default;
|
||||
- the `Code Editor` workspace must consume the session-owned `prometeu-vfs` instance rather than owning the boundary lifecycle itself;
|
||||
- the project-session scope must cover only the opened project.
|
||||
|
||||
## Filesystem Access Rules
|
||||
|
||||
For the scope covered by this specification, Studio must access the project filesystem through `prometeu-vfs`.
|
||||
|
||||
Rules:
|
||||
|
||||
- the first implementation must be filesystem-backed;
|
||||
- direct filesystem reads for project tree and document loading must not remain a workspace-owned responsibility in the Code Editor;
|
||||
- this rule does not grant `prometeu-vfs` ownership over unrelated domains or unrelated filesystem responsibilities elsewhere in the product.
|
||||
|
||||
## Structural Tree Contract
|
||||
|
||||
`prometeu-vfs` must expose a structural representation of the project tree.
|
||||
|
||||
Rules:
|
||||
|
||||
- the structural tree must cover project content only;
|
||||
- the structural tree must contain structural and documentary data only;
|
||||
- the structural tree must not contain visual presentation state;
|
||||
- the structural tree must not contain navigator chrome decisions;
|
||||
- the structural tree may include structural metadata useful to Studio consumers;
|
||||
- consumers may request narrower refreshes than a full-tree reload when the request remains within the project boundary.
|
||||
|
||||
The following concerns remain outside `prometeu-vfs`:
|
||||
|
||||
- visual expansion state,
|
||||
- selection state,
|
||||
- focus state,
|
||||
- reveal or scroll behavior,
|
||||
- icon choice,
|
||||
- and other view-model concerns of the navigator UI.
|
||||
|
||||
## Document Access Contract
|
||||
|
||||
`prometeu-vfs` must own document resolution for the covered Studio scope.
|
||||
|
||||
Rules:
|
||||
|
||||
- opening a supported file in the Code Editor must go through `prometeu-vfs`;
|
||||
- the returned document content must describe only project-session document state for the opened project;
|
||||
- `prometeu-vfs` must classify each supported document as at least editable or hard `read-only`;
|
||||
- unsupported documents must remain distinguishable from supported `read-only` and supported editable documents;
|
||||
- `prometeu-vfs` must own editable in-memory editorial snapshots for the current Studio session;
|
||||
- save operations for editable documents in this wave must persist those editorial snapshots to disk through `prometeu-vfs`;
|
||||
- Studio consumers must treat `prometeu-vfs` access policy as canonical rather than rederiving editability locally;
|
||||
- and editorial snapshots must remain outside build-facing document state.
|
||||
|
||||
## Frontend Scope Contract
|
||||
|
||||
Frontend scope must be decided canonically inside `prometeu-vfs`.
|
||||
|
||||
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 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
|
||||
|
||||
`prometeu-vfs` must reserve a single access-context entity for document-access-related values.
|
||||
|
||||
Rules:
|
||||
|
||||
- the access-context entity may remain session-local in this wave;
|
||||
- it must already support lookup and mutation under current demand;
|
||||
- future persistence may be added later without redesigning the access model;
|
||||
- and the current reservation must not be treated as authorization for build participation or broader product-wide state ownership.
|
||||
|
||||
## Semantic-Read Consumer Boundary
|
||||
|
||||
`prometeu-vfs` must remain the source-of-truth document substrate consumed by the integrated LSP semantic-read phase.
|
||||
|
||||
Rules:
|
||||
|
||||
- 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;
|
||||
- semantic analysis over editorial snapshots must remain separate from build-facing document ownership;
|
||||
- and this boundary must remain suitable for frontend diagnostics, symbols, definition, and highlight without implying frontend edit rights.
|
||||
|
||||
## Support and Plugin Rules
|
||||
|
||||
Support and unsupported-file decisions belong to `prometeu-vfs`.
|
||||
|
||||
Rules:
|
||||
|
||||
- file support classification must be decided inside `prometeu-vfs`;
|
||||
- plugin or handler resolution for supported file access must be decided inside `prometeu-vfs`;
|
||||
- Studio UI may render the resulting success or failure state, but it must not own the classification rule itself.
|
||||
|
||||
## Communication Model
|
||||
|
||||
The official first-wave `prometeu-vfs` API is RPC-oriented.
|
||||
|
||||
Rules:
|
||||
|
||||
- commands and queries are the public API baseline for this wave;
|
||||
- internal runtime events may exist inside `prometeu-vfs`;
|
||||
- those events must remain internal in this wave;
|
||||
- internal events must not be promoted to public API by inference during planning or implementation.
|
||||
|
||||
## Refresh and Watchers
|
||||
|
||||
Refresh remains manual in this wave.
|
||||
|
||||
Rules:
|
||||
|
||||
- Studio consumers may request manual refresh through `prometeu-vfs`;
|
||||
- watcher-driven automatic refresh is deferred;
|
||||
- file watching must not be introduced implicitly while implementing this specification.
|
||||
|
||||
## Cross-Domain Boundary
|
||||
|
||||
`prometeu-vfs` belongs to the Studio domain.
|
||||
|
||||
Rules:
|
||||
|
||||
- `prometeu-vfs` serves `prometeu-lsp` as a consumer-facing substrate for the semantic-read phase;
|
||||
- `prometeu-lsp` remains a separate layer and must not be renamed into `prometeu-vfs`;
|
||||
- `prometeu-vfs` must not absorb packer responsibilities;
|
||||
- `prometeu-vfs` must not redefine asset ownership;
|
||||
- extending this boundary outside project-document concerns requires a new decision.
|
||||
|
||||
## Non-Goals
|
||||
|
||||
- public event publication
|
||||
- watcher-driven refresh
|
||||
- dirty tracking
|
||||
- merge or conflict handling
|
||||
- non-project content snapshots
|
||||
- a generic product-wide filesystem abstraction
|
||||
- treating editorial snapshots as canonical build input
|
||||
|
||||
## Exit Criteria
|
||||
|
||||
This specification is complete enough when:
|
||||
|
||||
- `prometeu-vfs` ownership is clearly separated from shell and workspace UI ownership,
|
||||
- the project-session lifecycle rule is unambiguous,
|
||||
- the structural tree contract is explicitly non-visual,
|
||||
- frontend scope and access policy 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.
|
||||
@@ -0,0 +1,183 @@
|
||||
# Integrated LSP Semantic Read Phase Specification
|
||||
|
||||
## Status
|
||||
|
||||
Active
|
||||
|
||||
## Applies To
|
||||
|
||||
- `prometeu-studio`
|
||||
- `prometeu-vfs`
|
||||
- `prometeu-lsp`
|
||||
- the integrated frontend semantic phase in the Studio `Code Editor` workspace
|
||||
|
||||
## Purpose
|
||||
|
||||
Define the normative Studio contract for the integrated frontend semantic-read phase that arrives before any frontend editing release.
|
||||
|
||||
This specification stabilizes:
|
||||
|
||||
- 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,
|
||||
- the packaging expectations for the public `prometeu-lsp` API surface,
|
||||
- and the explicit exclusions that remain outside this phase.
|
||||
|
||||
## Authority and Precedence
|
||||
|
||||
This specification extends:
|
||||
|
||||
- [`5. Code Editor Workspace Specification.md`](5.%20Code%20Editor%20Workspace%20Specification.md)
|
||||
- [`6. Project Document VFS Specification.md`](6.%20Project%20Document%20VFS%20Specification.md)
|
||||
|
||||
If this document conflicts with shell-wide Studio rules, shell rules control shell behavior, the Code Editor specification controls workspace-local editor UX, the VFS specification controls document-boundary ownership, and this document controls the integrated semantic-read phase itself.
|
||||
|
||||
## Normative Inputs
|
||||
|
||||
The integrated semantic-read phase must assume:
|
||||
|
||||
- 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,
|
||||
- and semantic-read over editorial snapshots must remain separate from build-facing ownership.
|
||||
|
||||
## Phase Boundary
|
||||
|
||||
This phase is a semantic phase for frontend documents, not an ownership phase for frontend editing.
|
||||
|
||||
Rules:
|
||||
|
||||
- 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
|
||||
|
||||
- `prometeu-vfs` owns document state, access policy, editorial snapshots, and persistence.
|
||||
- `prometeu-lsp` is a semantic consumer above `prometeu-vfs`.
|
||||
- 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.
|
||||
|
||||
`prometeu-lsp` must not become the owner of:
|
||||
|
||||
- save,
|
||||
- persistence,
|
||||
- document access policy,
|
||||
- frontend semantic presentation assets,
|
||||
- or frontend edit-right release.
|
||||
|
||||
## Document Source-of-Truth Rules
|
||||
|
||||
- opened frontend documents must be analyzed from the in-memory snapshot exposed by `prometeu-vfs`;
|
||||
- unopened frontend documents may be analyzed from filesystem-backed state exposed through the same `prometeu-vfs` boundary;
|
||||
- Studio UI code must not bypass `prometeu-vfs` with ad hoc file loading for semantic-read behavior;
|
||||
- semantic-read over editorial snapshots must not be treated as canonical build input by implication.
|
||||
|
||||
## Minimum Capability Set
|
||||
|
||||
The minimum semantic capability set of this phase must include:
|
||||
|
||||
- diagnostics for frontend documents;
|
||||
- document symbols for frontend documents;
|
||||
- workspace symbols for frontend documents;
|
||||
- outline-facing structural symbol data;
|
||||
- go-to-definition for frontend documents;
|
||||
- frontend semantic highlight.
|
||||
|
||||
The phase may ship the dedicated structural-anchor surface after the baseline capability set is stable, but Studio and frontend implementations must treat that surface as the canonical source of exact scope-indicator anchoring once it exists.
|
||||
|
||||
The phase may also ship a dedicated inline-hint semantic surface.
|
||||
|
||||
Once shipped, frontend and Studio implementations must treat that surface as the canonical source of decorative inline hint payloads.
|
||||
|
||||
## Highlight Ownership Rules
|
||||
|
||||
- frontend highlight must come from semantic information provided through `prometeu-lsp`;
|
||||
- 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.
|
||||
|
||||
## Inline Hint Ownership Rules
|
||||
|
||||
- frontend inline hints must come from semantic information provided through `prometeu-lsp`;
|
||||
- frontend hint existence and hint payload semantics remain frontend-owned;
|
||||
- `prometeu-lsp` must expose a dedicated transport contract for inline hints rather than relying on Studio-local inference;
|
||||
- `prometeu-lsp` must preserve deterministic anchor information required for host rendering;
|
||||
- `prometeu-lsp` must not invent host-owned hint policy when a frontend does not publish hints;
|
||||
- Studio must render transported hints mechanically as host decorations rather than as document text;
|
||||
- valid inline hint spans must survive partial degradation when the frontend can still produce them;
|
||||
- invalid or missing hint spans may be omitted locally;
|
||||
- Studio must not disable all inline hints for a document solely because some hint spans are unavailable.
|
||||
|
||||
## Structural Anchor Semantic Surface
|
||||
|
||||
Exact structural anchoring for editor scope indicators must not be overloaded into `documentSymbols`.
|
||||
|
||||
`documentSymbols` remains the outline and navigation surface.
|
||||
|
||||
Guide-oriented structure must be exposed through a dedicated semantic surface for structural anchors and related guide metadata.
|
||||
|
||||
That dedicated surface must be frontend-owned and language-agnostic.
|
||||
|
||||
The contract must describe generic structural positions rather than PBS-specific brace semantics.
|
||||
|
||||
The surface must be able to represent structures whose boundaries are expressed by:
|
||||
|
||||
- braces;
|
||||
- keywords;
|
||||
- indentation-derived blocks;
|
||||
- or mixed delimiter schemes.
|
||||
|
||||
At minimum, the dedicated structural-anchor surface must be able to communicate:
|
||||
|
||||
- structural ranges that can participate in active-scope selection;
|
||||
- immediate parentage or equivalent information needed to recover the nearest ancestor relationship;
|
||||
- exact structural anchor positions used for guide start and end placement;
|
||||
- enough structural identity to distinguish the active structural range from its immediate container.
|
||||
|
||||
The semantic-read contract must not require Studio to scan source text in order to discover the final structural anchor positions.
|
||||
|
||||
Temporary local heuristics may exist only as development aids. They must not become the canonical production contract.
|
||||
|
||||
The exact serialized schema of this dedicated surface may evolve in implementation plans, but any accepted schema must preserve the invariants above.
|
||||
|
||||
## Packaging Rules
|
||||
|
||||
The public `prometeu-lsp` API should follow flat packaging similar to `prometeu-packer-api`.
|
||||
|
||||
Rules:
|
||||
|
||||
- public contract surfaces should remain shallow and explicit;
|
||||
- packages such as `dtos`, `messages`, and `events` are the preferred shape for public API grouping where those surfaces exist;
|
||||
- deep public packaging by internal implementation concern should be avoided;
|
||||
- runtime or implementation layering may exist internally, but it must not leak into the public contract surface by default.
|
||||
|
||||
## Non-Goals
|
||||
|
||||
- frontend save policy
|
||||
- completion
|
||||
- rename
|
||||
- code actions
|
||||
- formatting
|
||||
- build participation inferred from editorial snapshots
|
||||
- external-editor compatibility requirements
|
||||
- Studio-owned semantic hint generation
|
||||
|
||||
## Exit Criteria
|
||||
|
||||
This specification is complete enough when:
|
||||
|
||||
- the semantic-read versus frontend-editing phase boundary is explicit,
|
||||
- `prometeu-vfs` and `prometeu-lsp` ownership remains unambiguous,
|
||||
- the minimum semantic capability set is explicit,
|
||||
- frontend and non-frontend highlight ownership is clearly separated,
|
||||
- and the excluded editing and completion capabilities remain unambiguous.
|
||||
@@ -22,6 +22,7 @@ This specification implements the accepted decision for project-local Studio sta
|
||||
It extends:
|
||||
|
||||
- [`1. Studio Shell and Workspace Layout Specification.md`](1.%20Studio%20Shell%20and%20Workspace%20Layout%20Specification.md)
|
||||
- [`5. Code Editor Workspace Specification.md`](5.%20Code%20Editor%20Workspace%20Specification.md)
|
||||
|
||||
## Core Rules
|
||||
|
||||
@@ -30,7 +31,7 @@ It extends:
|
||||
3. The main session-restoration store MUST remain a single file at `.studio/state.json`.
|
||||
4. The main session-restoration store MUST be versioned.
|
||||
5. The main session-restoration store MUST load when the project session opens.
|
||||
6. Restorable shell state accepted by this wave MUST restore when the project shell mounts.
|
||||
6. Restorable shell and editor state accepted by this wave MUST restore when the project shell mounts.
|
||||
7. The main session-restoration store MUST save when the project shell or project session closes.
|
||||
8. Missing, invalid, or schema-incompatible session-restoration state MUST fall back to safe default values and MUST NOT block project open.
|
||||
9. Project-local setup configuration MUST live in a separate file at `.studio/setup.json`.
|
||||
@@ -43,11 +44,13 @@ The main session-restoration store MUST include:
|
||||
|
||||
- `shellLayout`
|
||||
- `openShellState`
|
||||
- `editorRestoration`
|
||||
|
||||
Wave-1 accepted meaning is:
|
||||
|
||||
- `shellLayout`: restorable layout state already accepted by implementation, including divider positions and equivalent layout proportions for accepted workspaces such as `Assets`;
|
||||
- `shellLayout`: restorable layout state already accepted by implementation, including divider positions and equivalent layout proportions for accepted workspaces such as `Assets` and `Code Editor`, `Project Navigator` expansion state, and editor dock-panel open/closed plus restored-size configuration;
|
||||
- `openShellState`: which workspace or equivalent shell-owned project view was open;
|
||||
- `editorRestoration`: open editor tabs and active tab.
|
||||
|
||||
## Project-Local Setup Configuration
|
||||
|
||||
@@ -58,8 +61,8 @@ Rules:
|
||||
- project-local setup MUST live in `.studio/setup.json`;
|
||||
- project-local setup MUST be treated as project configuration rather than session state;
|
||||
- project-local setup MAY contain runtime-oriented values such as the Prometeu runtime path;
|
||||
- project-local setup MAY continue carrying project-wide indentation policy defaults for future code-tooling integrations;
|
||||
- the indentation policy MUST define at least indentation mode and indentation width;
|
||||
- project-local setup MUST own the project-wide editor indentation policy;
|
||||
- the editor indentation policy MUST define at least indentation mode and indentation width;
|
||||
- when setup does not provide an explicit indentation policy, consumers MUST resolve it to `spaces` with width `4`;
|
||||
- project-local setup MAY grow with additional manual or automatic configuration keys over time;
|
||||
- consumers such as `Play` MUST read project-local setup from the dedicated setup file rather than from `.studio/state.json`;
|
||||
|
||||
@@ -54,7 +54,10 @@ The current Studio core corpus is:
|
||||
2. [`2. Studio UI Foundations Specification.md`](2.%20Studio%20UI%20Foundations%20Specification.md)
|
||||
3. [`3. Studio Components Module Specification.md`](3.%20Studio%20Components%20Module%20Specification.md)
|
||||
4. [`4. Assets Workspace Specification.md`](4.%20Assets%20Workspace%20Specification.md)
|
||||
5. [`8. Project-Local Studio State Specification.md`](8.%20Project-Local%20Studio%20State%20Specification.md)
|
||||
5. [`5. Code Editor Workspace Specification.md`](5.%20Code%20Editor%20Workspace%20Specification.md)
|
||||
6. [`6. Project Document VFS Specification.md`](6.%20Project%20Document%20VFS%20Specification.md)
|
||||
7. [`7. Integrated LSP Semantic Read Phase Specification.md`](7.%20Integrated%20LSP%20Semantic%20Read%20Phase%20Specification.md)
|
||||
8. [`8. Project-Local Studio State Specification.md`](8.%20Project-Local%20Studio%20State%20Specification.md)
|
||||
|
||||
## Reading Order
|
||||
|
||||
@@ -64,14 +67,19 @@ Recommended order:
|
||||
2. shared UI foundations;
|
||||
3. components module policy;
|
||||
4. assets workspace behavior;
|
||||
5. project-local Studio state behavior.
|
||||
5. project document VFS boundary;
|
||||
6. code editor workspace behavior;
|
||||
7. integrated LSP semantic-read behavior;
|
||||
8. project-local Studio state behavior.
|
||||
|
||||
## Current Wave Notes
|
||||
|
||||
The embedded Studio code-editor stack was removed by `DEC-0031`.
|
||||
The current `Code Editor` wave is not globally read-only anymore.
|
||||
|
||||
Normative reminders:
|
||||
|
||||
- the active Studio workspace corpus is `Assets`, `Debug`, and `Shipper`;
|
||||
- project-local Studio session state remains normative and is owned by `StudioProjectSession`;
|
||||
- any future external-editor backend or replacement language-service architecture requires a new accepted decision before new Studio specs are introduced.
|
||||
- editable scope is limited to supported non-frontend textual documents classified by `prometeu-vfs`;
|
||||
- frontend-scoped supported documents remain hard `read-only`;
|
||||
- the editor-local `Save` and `Save All` surfaces belong to the `Code Editor` workspace rather than the shell;
|
||||
- editorial in-memory snapshots remain outside build-facing state;
|
||||
- frontend semantic-read capability lands before any frontend editing release and is documented by the integrated LSP phase specification.
|
||||
|
||||
@@ -9,7 +9,7 @@ Scope boundary:
|
||||
- PROMETEU itself is a fantasy handheld / fantasy console with a broader machine model, firmware model, cartridge model, and virtual hardware surface.
|
||||
- This document does not define the whole PROMETEU machine.
|
||||
- This document defines the VM/runtime subsystem that executes bytecode inside that machine.
|
||||
- For broader machine-level framing, see [`../specs/README.md`](../specs/runtime/README.md).
|
||||
- For broader machine-level framing, see [`../specs/README.md`](../specs/README.md).
|
||||
|
||||
Document roles:
|
||||
|
||||
@@ -149,7 +149,6 @@ The verifier statically checks bytecode for structural safety and stack‑shape
|
||||
- `SyscallMeta` defines expected arity and return slot counts. The loader resolves `HOSTCALL` against this metadata and rejects raw `SYSCALL` in PBX pre-load artifacts; the verifier checks final IDs/arity/return‑slot counts against the same metadata.
|
||||
- Arguments and returns
|
||||
- Arguments are taken from the operand stack in the order defined by the ABI. Returns use multi‑slot results via a host‑side return buffer (`HostReturn`) which the VM copies back onto the stack, or zero slots for “void”. A mismatch in result counts is a fault/panic per current hardening logic.
|
||||
- Example: the canonical asset runtime load surface is `asset.load(asset_id, slot) -> (status, handle)`. The caller does not supply `asset_name` or `asset_type`; bank kind is derived from `asset_table` using `asset_id`.
|
||||
- Capabilities
|
||||
- Cartridge capability flags are applied before load-time host resolution. Missing required capability aborts load; invoking a syscall without the required capability also traps defensively at runtime.
|
||||
|
||||
|
||||
@@ -1,25 +1,6 @@
|
||||
final_id_hex,final_id_dec,canonical_name,canonical_version,owner,name,arg_slots,ret_slots,arg_layout,ret_layout,deterministic,may_allocate
|
||||
0x1000,4096,vec2.dot,1,vec2,dot,4,1,float|float|float|float,float,true,false
|
||||
0x1001,4097,vec2.length,1,vec2,length,2,1,float|float,float,true,false
|
||||
0x1100,4352,color.from_raw,1,color,from_raw,1,1,int,builtin:color,true,false
|
||||
0x1101,4353,color.rgb,1,color,rgb,3,1,int|int|int,builtin:color,true,false
|
||||
0x1102,4354,color.rgba,1,color,rgba,4,1,int|int|int|int,builtin:color,true,false
|
||||
0x1103,4355,color.html_rgba,1,color,html_rgba,1,1,str,builtin:color,true,false
|
||||
0x1104,4356,color.gray_scale,1,color,gray_scale,1,1,int,builtin:color,true,false
|
||||
0x1105,4357,color.hex,1,color,hex,1,1,builtin:color,int,true,false
|
||||
0x1106,4358,color.alpha,1,color,alpha,1,1,builtin:color,int,true,false
|
||||
0x1120,4384,color.black,1,color,black,0,1,,builtin:color,true,false
|
||||
0x1121,4385,color.white,1,color,white,0,1,,builtin:color,true,false
|
||||
0x1122,4386,color.red,1,color,red,0,1,,builtin:color,true,false
|
||||
0x1123,4387,color.green,1,color,green,0,1,,builtin:color,true,false
|
||||
0x1124,4388,color.blue,1,color,blue,0,1,,builtin:color,true,false
|
||||
0x1125,4389,color.yellow,1,color,yellow,0,1,,builtin:color,true,false
|
||||
0x1126,4390,color.orange,1,color,orange,0,1,,builtin:color,true,false
|
||||
0x1127,4391,color.indigo,1,color,indigo,0,1,,builtin:color,true,false
|
||||
0x1128,4392,color.gray,1,color,gray,0,1,,builtin:color,true,false
|
||||
0x1129,4393,color.cyan,1,color,cyan,0,1,,builtin:color,true,false
|
||||
0x112A,4394,color.magenta,1,color,magenta,0,1,,builtin:color,true,false
|
||||
0x112B,4395,color.transparent,1,color,transparent,0,1,,builtin:color,true,false
|
||||
0x2000,8192,input.pad,1,input,pad,0,1,,builtin:input.pad,true,false
|
||||
0x2001,8193,input.touch,1,input,touch,0,1,,builtin:input.touch,true,false
|
||||
0x2010,8208,input.pad.up,1,input.pad,up,1,1,builtin:input.pad,builtin:input.button,true,false
|
||||
|
||||
|
@@ -78,17 +78,6 @@ Authority rule:
|
||||
- `INTRINSIC u32` — final numeric VM-owned intrinsic call.
|
||||
- `FRAME_SYNC` — yield until the next frame boundary (e.g., vblank); explicit safepoint.
|
||||
|
||||
Host service arity is not encoded in the opcode itself. It is defined by resolved syscall metadata.
|
||||
|
||||
Example:
|
||||
|
||||
- `asset.load` currently resolves with `arg_slots = 2` and `ret_slots = 2`.
|
||||
- The canonical stack contract is `asset_id, slot -> status, handle`.
|
||||
- Callers do not provide an explicit asset kind; the runtime derives it from `asset_table`.
|
||||
- `composer.bind_scene` resolves with `arg_slots = 1` and `ret_slots = 1`.
|
||||
- The canonical stack contract is `bank_id -> status`.
|
||||
- `composer.emit_sprite` resolves with `arg_slots = 9` and `ret_slots = 1`.
|
||||
|
||||
#### Canonical Intrinsic Registry Artifact
|
||||
|
||||
- Final intrinsic IDs and intrinsic stack metadata are published in [`INTRINSICS.csv`](INTRINSICS.csv).
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
# VM Architecture Mirror Policy
|
||||
|
||||
The Prometeu runtime repository is the normative authority for PBX binary
|
||||
layout, Core ISA, loader behavior, verification, and PVM execution semantics.
|
||||
The files in this directory are convenience mirrors for Studio-side compiler
|
||||
and integration work; they are not an independent architectural authority.
|
||||
|
||||
Canonical runtime sources:
|
||||
|
||||
- `../runtime/docs/vm-arch/ARCHITECTURE.md`
|
||||
- `../runtime/docs/vm-arch/ISA_CORE.md`
|
||||
- `../runtime/docs/vm-arch/INTRINSICS.csv`
|
||||
|
||||
When these mirrors are retained, an integration change that updates a canonical
|
||||
runtime source MUST update the corresponding Studio mirror in the same logical
|
||||
change. Verify synchronization from the Studio repository root with:
|
||||
|
||||
```bash
|
||||
diff -u docs/vm-arch/ARCHITECTURE.md ../runtime/docs/vm-arch/ARCHITECTURE.md
|
||||
diff -u docs/vm-arch/ISA_CORE.md ../runtime/docs/vm-arch/ISA_CORE.md
|
||||
diff -u docs/vm-arch/INTRINSICS.csv ../runtime/docs/vm-arch/INTRINSICS.csv
|
||||
```
|
||||
|
||||
All three commands MUST exit successfully with no output before a change claims
|
||||
that the mirrors are synchronized. If the runtime repository is not available
|
||||
in the same checkout, synchronization evidence must be produced against the
|
||||
canonical runtime revision before merging.
|
||||
|
||||
Compiler-owned transformation contracts remain under `docs/specs/compiler`.
|
||||
Those specifications define `IRBackend -> IRVM -> PBX` emission, but they MUST
|
||||
conform to the runtime-owned PBX and ISA contracts and MUST NOT redefine runtime
|
||||
execution semantics.
|
||||
@@ -6,7 +6,6 @@ jacoco = "0.8.12"
|
||||
lombok = "1.18.32"
|
||||
junit-jupiter = "5.12.1"
|
||||
slf4j = "2.0.7"
|
||||
lsp4j = "1.0.0"
|
||||
|
||||
[libraries]
|
||||
javafx-controls = { group = "org.openjfx", name = "javafx-controls", version.ref = "javafx" }
|
||||
@@ -21,7 +20,6 @@ lombok = { group = "org.projectlombok", name = "lombok", version.ref = "lombok"
|
||||
junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit-jupiter" }
|
||||
slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" }
|
||||
slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" }
|
||||
lsp4j = { group = "org.eclipse.lsp4j", name = "org.eclipse.lsp4j", version.ref = "lsp4j" }
|
||||
|
||||
[plugins]
|
||||
javafx = { id = "org.openjfx.javafxplugin", version = "0.1.0" }
|
||||
|
||||
@@ -7,8 +7,8 @@ dependencies {
|
||||
implementation(project(":prometeu-infra"))
|
||||
implementation(project(":prometeu-lsp:prometeu-lsp-api"))
|
||||
implementation(project(":prometeu-lsp:prometeu-lsp-v1"))
|
||||
implementation(project(":prometeu-compiler:frontends:prometeu-frontend-pbs"))
|
||||
implementation(project(":prometeu-compiler:prometeu-frontend-registry"))
|
||||
implementation(project(":prometeu-vfs:prometeu-vfs-api"))
|
||||
implementation(project(":prometeu-vfs:prometeu-vfs-v1"))
|
||||
implementation(project(":prometeu-packer:prometeu-packer-api"))
|
||||
implementation(project(":prometeu-packer:prometeu-packer-v1"))
|
||||
implementation(project(":prometeu-studio"))
|
||||
@@ -23,4 +23,4 @@ application {
|
||||
javafx {
|
||||
version = libs.versions.javafx.get()
|
||||
modules("javafx.controls", "javafx.fxml")
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,14 @@ package p.studio;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import p.packer.Packer;
|
||||
import p.studio.compiler.FrontendRegistryService;
|
||||
import p.studio.lsp.api.LspServerLifecycle;
|
||||
import p.studio.lsp.LspServiceFactory;
|
||||
import p.studio.lsp.LspServiceFactoryImpl;
|
||||
import p.studio.lsp.events.StudioEventBus;
|
||||
import p.studio.lsp.events.StudioPackerEventAdapter;
|
||||
import p.studio.lsp.services.LspServerLifecycleImpl;
|
||||
import p.studio.utilities.ThemeService;
|
||||
import p.studio.utilities.i18n.I18nService;
|
||||
import p.studio.vfs.FilesystemProjectDocumentVfsFactory;
|
||||
import p.studio.vfs.ProjectDocumentVfsFactory;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
@@ -20,21 +21,22 @@ public final class AppContainer implements Container {
|
||||
private final ThemeService themeService;
|
||||
private final StudioEventBus studioEventBus;
|
||||
private final ObjectMapper mapper;
|
||||
private final LspServiceFactory lspServiceFactory;
|
||||
private final ProjectDocumentVfsFactory projectDocumentVfsFactory;
|
||||
private final EmbeddedPacker embeddedPacker;
|
||||
private final StudioBackgroundTasks backgroundTasks;
|
||||
private final LspServerLifecycle lspServerLifecycle;
|
||||
|
||||
public AppContainer() {
|
||||
FrontendRegistryService.bootstrapDefaults();
|
||||
this.i18nService = new I18nService();
|
||||
this.themeService = new ThemeService();
|
||||
this.studioEventBus = new StudioEventBus();
|
||||
this.mapper = new ObjectMapper();
|
||||
this.lspServiceFactory = new LspServiceFactoryImpl();
|
||||
this.projectDocumentVfsFactory = new FilesystemProjectDocumentVfsFactory();
|
||||
final ExecutorService backgroundExecutor = Executors.newFixedThreadPool(2, new StudioWorkerThreadFactory());
|
||||
this.backgroundTasks = new StudioBackgroundTasks(backgroundExecutor);
|
||||
final Packer packer = Packer.bootstrap(this.mapper, new StudioPackerEventAdapter(studioEventBus));
|
||||
this.embeddedPacker = new EmbeddedPacker(packer.workspaceService(), packer::close);
|
||||
this.lspServerLifecycle = new LspServerLifecycleImpl();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -57,6 +59,16 @@ public final class AppContainer implements Container {
|
||||
return mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LspServiceFactory getPrometeuLspServiceFactory() {
|
||||
return lspServiceFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectDocumentVfsFactory getProjectDocumentVfsFactory() {
|
||||
return projectDocumentVfsFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EmbeddedPacker getPacker() {
|
||||
return embeddedPacker;
|
||||
@@ -67,11 +79,6 @@ public final class AppContainer implements Container {
|
||||
return backgroundTasks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public p.studio.lsp.api.LspServerLifecycle getLspServerLifecycle() {
|
||||
return lspServerLifecycle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdownContainer() {
|
||||
embeddedPacker.shutdown();
|
||||
|
||||
+4
-5
@@ -1,7 +1,8 @@
|
||||
package p.studio.compiler;
|
||||
|
||||
import p.studio.compiler.models.FrontendSemanticPresentationSpec;
|
||||
import p.studio.compiler.models.FrontendSpec;
|
||||
import p.studio.compiler.models.FrontendSemanticPresentationSpec;
|
||||
import p.studio.compiler.pbs.PbsSemanticKind;
|
||||
import p.studio.utilities.structures.ReadOnlySet;
|
||||
|
||||
import java.util.List;
|
||||
@@ -14,9 +15,7 @@ public class PBSDefinitions {
|
||||
.sourceRoots(ReadOnlySet.from("src"))
|
||||
.stdlibVersions(List.of(FrontendSpec.Stdlib.asDefault(1)))
|
||||
.semanticPresentation(new FrontendSemanticPresentationSpec(
|
||||
List.of(PBSFrontendThemes.DEFAULT_PBS),
|
||||
"pbs-default",
|
||||
List.of(PBSFrontendHostProjections.VSCODE)))
|
||||
.semanticTokenProvider(new PBSSemanticTokenProvider())
|
||||
PbsSemanticKind.semanticKeys(),
|
||||
List.of("/themes/pbs/semantic-highlighting.css")))
|
||||
.build();
|
||||
}
|
||||
|
||||
-78
@@ -1,78 +0,0 @@
|
||||
package p.studio.compiler;
|
||||
|
||||
import p.studio.compiler.models.FrontendHostProjectionEntrySpec;
|
||||
import p.studio.compiler.models.FrontendHostProjectionSpec;
|
||||
import p.studio.compiler.pbs.PbsSemanticKind;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static p.studio.compiler.pbs.PbsSemanticKind.*;
|
||||
|
||||
public final class PBSFrontendHostProjections {
|
||||
public static final String VSCODE_HOST_ID = "vscode";
|
||||
|
||||
public static final FrontendHostProjectionSpec VSCODE = new FrontendHostProjectionSpec(
|
||||
VSCODE_HOST_ID,
|
||||
Arrays.stream(PbsSemanticKind.values())
|
||||
.map(PBSFrontendHostProjections::mapVscodeProjection)
|
||||
.toList());
|
||||
|
||||
private PBSFrontendHostProjections() {
|
||||
}
|
||||
|
||||
private static FrontendHostProjectionEntrySpec mapVscodeProjection(final PbsSemanticKind kind) {
|
||||
return switch (kind) {
|
||||
case COMMENT -> projection(COMMENT.semanticKey(), "comment");
|
||||
case STRING -> projection(STRING.semanticKey(), "string");
|
||||
case NUMBER -> projection(NUMBER.semanticKey(), "number");
|
||||
case LITERAL -> projection(LITERAL.semanticKey(), "enumMember", "variable");
|
||||
case LIFECYCLE -> projection(LIFECYCLE.semanticKey(), "function", "variable", "async");
|
||||
case KEYWORD -> projection(KEYWORD.semanticKey(), "keyword");
|
||||
case OPERATOR -> projection(OPERATOR.semanticKey(), "operator", "keyword");
|
||||
case PUNCTUATION -> projection(PUNCTUATION.semanticKey(), "operator", "keyword");
|
||||
case FUNCTION -> projection(FUNCTION.semanticKey(), "function");
|
||||
case METHOD -> projection(METHOD.semanticKey(), "method", "function");
|
||||
case CONSTRUCTOR -> projection(CONSTRUCTOR.semanticKey(), "class", "type", "declaration");
|
||||
case STRUCT -> projection(STRUCT.semanticKey(), "struct", "type");
|
||||
case CONTRACT -> projection(CONTRACT.semanticKey(), "interface", "type");
|
||||
case HOST -> projection(HOST.semanticKey(), "class", "type", "defaultLibrary");
|
||||
case BUILTIN_TYPE -> projection(BUILTIN_TYPE.semanticKey(), "type", "variable", "defaultLibrary");
|
||||
case SERVICE -> projection(SERVICE.semanticKey(), "class", "type", "defaultLibrary");
|
||||
case ASSET -> projection(ASSET.semanticKey(), "variable", "string", "readonly");
|
||||
case ERROR -> projection(ERROR.semanticKey(), "enum", "type");
|
||||
case ENUM -> projection(ENUM.semanticKey(), "enum", "type");
|
||||
case CALLBACK -> projection(CALLBACK.semanticKey(), "interface", "type");
|
||||
case GLOBAL -> projection(GLOBAL.semanticKey(), "variable", "variable", "readonly");
|
||||
case CONST -> projection(CONST.semanticKey(), "variable", "variable", "readonly");
|
||||
case IMPLEMENTS -> projection(IMPLEMENTS.semanticKey(), "keyword");
|
||||
case IDENTIFIER -> projection(IDENTIFIER.semanticKey(), "variable");
|
||||
};
|
||||
}
|
||||
|
||||
private static FrontendHostProjectionEntrySpec projection(
|
||||
final String semanticKey,
|
||||
final String hostTokenType) {
|
||||
return new FrontendHostProjectionEntrySpec(semanticKey, hostTokenType, List.of(), hostTokenType, List.of());
|
||||
}
|
||||
|
||||
private static FrontendHostProjectionEntrySpec projection(
|
||||
final String semanticKey,
|
||||
final String hostTokenType,
|
||||
final String fallbackTokenType) {
|
||||
return new FrontendHostProjectionEntrySpec(semanticKey, hostTokenType, List.of(), fallbackTokenType, List.of());
|
||||
}
|
||||
|
||||
private static FrontendHostProjectionEntrySpec projection(
|
||||
final String semanticKey,
|
||||
final String hostTokenType,
|
||||
final String fallbackTokenType,
|
||||
final String modifier) {
|
||||
return new FrontendHostProjectionEntrySpec(
|
||||
semanticKey,
|
||||
hostTokenType,
|
||||
List.of(modifier),
|
||||
fallbackTokenType,
|
||||
List.of(modifier));
|
||||
}
|
||||
}
|
||||
-216
@@ -1,216 +0,0 @@
|
||||
package p.studio.compiler;
|
||||
|
||||
import p.studio.compiler.messages.FESurfaceContext;
|
||||
import p.studio.compiler.messages.BuildingIssueSink;
|
||||
import p.studio.compiler.messages.FrontendPhaseContext;
|
||||
import p.studio.compiler.models.FrontendSemanticToken;
|
||||
import p.studio.compiler.pbs.ast.PbsAst;
|
||||
import p.studio.compiler.pbs.semantics.PbsEditorialCompletionCandidate;
|
||||
import p.studio.compiler.pbs.semantics.PbsEditorialResolvedSymbol;
|
||||
import p.studio.compiler.pbs.semantics.PbsEditorialSignatureHelp;
|
||||
import p.studio.compiler.pbs.semantics.PbsEditorialSymbolKind;
|
||||
import p.studio.compiler.pbs.semantics.PbsEditorialSupportService;
|
||||
import p.studio.compiler.services.FrontendCompletionCandidate;
|
||||
import p.studio.compiler.services.FrontendDocumentRequest;
|
||||
import p.studio.compiler.services.FrontendDocumentation;
|
||||
import p.studio.compiler.services.FrontendEditorialContext;
|
||||
import p.studio.compiler.services.FrontendHover;
|
||||
import p.studio.compiler.services.FrontendLanguageService;
|
||||
import p.studio.compiler.services.FrontendSignature;
|
||||
import p.studio.compiler.services.FrontendSignatureHelp;
|
||||
import p.studio.compiler.services.FrontendSymbolKind;
|
||||
import p.studio.compiler.services.PBSFrontendPhaseService;
|
||||
import p.studio.compiler.source.diagnostics.DiagnosticSink;
|
||||
import p.studio.compiler.source.identifiers.FileId;
|
||||
import p.studio.utilities.structures.ReadOnlyList;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public final class PBSFrontendLanguageService implements FrontendLanguageService {
|
||||
private final PbsEditorialSupportService editorialSupportService;
|
||||
private final PBSSemanticTokenProvider semanticTokenProvider;
|
||||
|
||||
public PBSFrontendLanguageService() {
|
||||
this(new PbsEditorialSupportService(), new PBSSemanticTokenProvider());
|
||||
}
|
||||
|
||||
PBSFrontendLanguageService(
|
||||
final PbsEditorialSupportService editorialSupportService,
|
||||
final PBSSemanticTokenProvider semanticTokenProvider) {
|
||||
this.editorialSupportService = Objects.requireNonNull(editorialSupportService, "editorialSupportService");
|
||||
this.semanticTokenProvider = Objects.requireNonNull(semanticTokenProvider, "semanticTokenProvider");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<FrontendEditorialContext> prepareEditorialContext(
|
||||
final FrontendPhaseContext phaseContext,
|
||||
final FileId fileId) {
|
||||
if (phaseContext == null || fileId == null) {
|
||||
return Optional.empty();
|
||||
}
|
||||
final var semanticReadSurface = PBSFrontendPhaseService.semanticReadSurface(
|
||||
phaseContext,
|
||||
DiagnosticSink.empty(),
|
||||
BuildingIssueSink.empty());
|
||||
final var ast = semanticReadSurface.astByFile().get(fileId);
|
||||
if (ast == null) {
|
||||
return Optional.empty();
|
||||
}
|
||||
return Optional.of(new FrontendEditorialContext(
|
||||
ast,
|
||||
semanticReadSurface.supplementalTopDeclsByFile().getOrDefault(fileId, ReadOnlyList.empty()),
|
||||
phaseContext.feSurfaceContext()));
|
||||
}
|
||||
|
||||
public List<PbsEditorialCompletionCandidate> completion(
|
||||
final String sourceText,
|
||||
final PbsAst.File ast,
|
||||
final ReadOnlyList<PbsAst.TopDecl> supplementalTopDecls,
|
||||
final FESurfaceContext feSurfaceContext,
|
||||
final int offset) {
|
||||
return editorialSupportService.completion(sourceText, ast, supplementalTopDecls, feSurfaceContext, offset);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FrontendCompletionCandidate> completion(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext,
|
||||
final int offset) {
|
||||
if (request == null
|
||||
|| editorialContext == null
|
||||
|| !(editorialContext.syntaxTree() instanceof PbsAst.File ast)
|
||||
|| !(editorialContext.supplementalDeclarations() instanceof ReadOnlyList<?> supplementalTopDecls)
|
||||
|| !(editorialContext.semanticContext() instanceof FESurfaceContext feSurfaceContext)) {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
final ReadOnlyList<PbsAst.TopDecl> typedSupplementalTopDecls =
|
||||
(ReadOnlyList<PbsAst.TopDecl>) supplementalTopDecls;
|
||||
return completion(
|
||||
request.documentText(),
|
||||
ast,
|
||||
typedSupplementalTopDecls,
|
||||
feSurfaceContext,
|
||||
offset).stream()
|
||||
.map(this::toFrontendCompletionCandidate)
|
||||
.toList();
|
||||
}
|
||||
|
||||
public Optional<PbsEditorialResolvedSymbol> hover(
|
||||
final String sourceText,
|
||||
final PbsAst.File ast,
|
||||
final ReadOnlyList<PbsAst.TopDecl> supplementalTopDecls,
|
||||
final FESurfaceContext feSurfaceContext,
|
||||
final int offset) {
|
||||
return editorialSupportService.hover(sourceText, ast, supplementalTopDecls, feSurfaceContext, offset);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<FrontendHover> hover(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext,
|
||||
final int offset) {
|
||||
if (request == null
|
||||
|| editorialContext == null
|
||||
|| !(editorialContext.syntaxTree() instanceof PbsAst.File ast)
|
||||
|| !(editorialContext.supplementalDeclarations() instanceof ReadOnlyList<?> supplementalTopDecls)
|
||||
|| !(editorialContext.semanticContext() instanceof FESurfaceContext feSurfaceContext)) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
final ReadOnlyList<PbsAst.TopDecl> typedSupplementalTopDecls =
|
||||
(ReadOnlyList<PbsAst.TopDecl>) supplementalTopDecls;
|
||||
return hover(
|
||||
request.documentText(),
|
||||
ast,
|
||||
typedSupplementalTopDecls,
|
||||
feSurfaceContext,
|
||||
offset).map(this::toFrontendHover);
|
||||
}
|
||||
|
||||
public Optional<PbsEditorialSignatureHelp> signatureHelp(
|
||||
final String sourceText,
|
||||
final PbsAst.File ast,
|
||||
final ReadOnlyList<PbsAst.TopDecl> supplementalTopDecls,
|
||||
final FESurfaceContext feSurfaceContext,
|
||||
final int offset) {
|
||||
return editorialSupportService.signatureHelp(sourceText, ast, supplementalTopDecls, feSurfaceContext, offset);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrontendSignatureHelp signatureHelp(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext,
|
||||
final int offset) {
|
||||
if (request == null
|
||||
|| editorialContext == null
|
||||
|| !(editorialContext.syntaxTree() instanceof PbsAst.File ast)
|
||||
|| !(editorialContext.supplementalDeclarations() instanceof ReadOnlyList<?> supplementalTopDecls)
|
||||
|| !(editorialContext.semanticContext() instanceof FESurfaceContext feSurfaceContext)) {
|
||||
return FrontendSignatureHelp.empty();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
final ReadOnlyList<PbsAst.TopDecl> typedSupplementalTopDecls =
|
||||
(ReadOnlyList<PbsAst.TopDecl>) supplementalTopDecls;
|
||||
return signatureHelp(
|
||||
request.documentText(),
|
||||
ast,
|
||||
typedSupplementalTopDecls,
|
||||
feSurfaceContext,
|
||||
offset)
|
||||
.map(this::toFrontendSignatureHelp)
|
||||
.orElseGet(FrontendSignatureHelp::empty);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FrontendSemanticToken> semanticTokens(final FrontendDocumentRequest request) {
|
||||
return semanticTokens(request == null ? "" : request.documentText());
|
||||
}
|
||||
|
||||
public List<FrontendSemanticToken> semanticTokens(final String documentText) {
|
||||
return semanticTokenProvider.tokenize(documentText == null ? "" : documentText);
|
||||
}
|
||||
|
||||
private FrontendCompletionCandidate toFrontendCompletionCandidate(final PbsEditorialCompletionCandidate candidate) {
|
||||
return new FrontendCompletionCandidate(
|
||||
candidate.label(),
|
||||
toFrontendSymbolKind(candidate.kind()),
|
||||
candidate.detail(),
|
||||
candidate.documentation(),
|
||||
candidate.origin());
|
||||
}
|
||||
|
||||
private FrontendHover toFrontendHover(final PbsEditorialResolvedSymbol symbol) {
|
||||
return new FrontendHover(
|
||||
symbol.displayName(),
|
||||
toFrontendSymbolKind(symbol.kind()),
|
||||
symbol.detail(),
|
||||
symbol.origin(),
|
||||
symbol.signatures().stream()
|
||||
.map(this::toFrontendSignature)
|
||||
.toList(),
|
||||
FrontendDocumentation.markdown(symbol.documentation()));
|
||||
}
|
||||
|
||||
private FrontendSignatureHelp toFrontendSignatureHelp(final PbsEditorialSignatureHelp signatureHelp) {
|
||||
return new FrontendSignatureHelp(
|
||||
signatureHelp.signatures().stream()
|
||||
.map(this::toFrontendSignature)
|
||||
.toList(),
|
||||
signatureHelp.activeSignature(),
|
||||
signatureHelp.activeParameter());
|
||||
}
|
||||
|
||||
private FrontendSignature toFrontendSignature(final p.studio.compiler.pbs.semantics.PbsEditorialSignature signature) {
|
||||
return new FrontendSignature(signature.label(), signature.parameterLabels(), "");
|
||||
}
|
||||
|
||||
private FrontendSymbolKind toFrontendSymbolKind(final PbsEditorialSymbolKind kind) {
|
||||
return FrontendSymbolKind.valueOf(kind.name());
|
||||
}
|
||||
}
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
package p.studio.compiler;
|
||||
|
||||
import p.studio.compiler.models.FrontendSpec;
|
||||
import p.studio.compiler.services.FrontendLanguageService;
|
||||
import p.studio.compiler.services.FrontendPhaseService;
|
||||
import p.studio.compiler.services.FrontendProvider;
|
||||
import p.studio.compiler.services.PBSFrontendPhaseService;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public final class PBSFrontendProvider implements FrontendProvider {
|
||||
private final FrontendPhaseService compiler;
|
||||
private final PBSFrontendLanguageService languageService;
|
||||
|
||||
public PBSFrontendProvider() {
|
||||
this(new PBSFrontendPhaseService(), new PBSFrontendLanguageService());
|
||||
}
|
||||
|
||||
PBSFrontendProvider(final FrontendPhaseService compiler) {
|
||||
this(compiler, new PBSFrontendLanguageService());
|
||||
}
|
||||
|
||||
PBSFrontendProvider(
|
||||
final FrontendPhaseService compiler,
|
||||
final PBSFrontendLanguageService languageService) {
|
||||
this.compiler = compiler;
|
||||
this.languageService = languageService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrontendSpec specification() {
|
||||
return PBSDefinitions.PBS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrontendPhaseService compiler() {
|
||||
return compiler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<FrontendLanguageService> languageService() {
|
||||
return Optional.of(languageService);
|
||||
}
|
||||
}
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
package p.studio.compiler;
|
||||
|
||||
import p.studio.compiler.models.FrontendEditorPaletteSpec;
|
||||
import p.studio.compiler.models.FrontendTokenStyleSpec;
|
||||
import p.studio.compiler.models.FrontendVisualThemeSpec;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class PBSFrontendThemes {
|
||||
public static final FrontendVisualThemeSpec DEFAULT_PBS = new FrontendVisualThemeSpec(
|
||||
"pbs-default",
|
||||
"PBS Default",
|
||||
new FrontendEditorPaletteSpec(
|
||||
"#d9e2ec",
|
||||
"#2f3f5b",
|
||||
"#23314a",
|
||||
"#6b7f99",
|
||||
"#241f38",
|
||||
"#b392f0",
|
||||
"#f5efff"),
|
||||
List.of(
|
||||
new FrontendTokenStyleSpec("pbs-comment", "#8b949e", true, false, false),
|
||||
new FrontendTokenStyleSpec("pbs-string", "#d8b86a", false, false, false),
|
||||
new FrontendTokenStyleSpec("pbs-number", "#ff8cc6", false, false, false),
|
||||
new FrontendTokenStyleSpec("pbs-literal", "#7fb8ff", false, false, false),
|
||||
new FrontendTokenStyleSpec("pbs-lifecycle", "#ff7b72", false, true, false),
|
||||
new FrontendTokenStyleSpec("pbs-keyword", "#7fb8ff", false, false, false),
|
||||
new FrontendTokenStyleSpec("pbs-operator", "#c9d1d9", false, false, false),
|
||||
new FrontendTokenStyleSpec("pbs-punctuation", "#8b949e", false, false, false),
|
||||
new FrontendTokenStyleSpec("pbs-function", "#7ee787", false, true, false),
|
||||
new FrontendTokenStyleSpec("pbs-method", "#7ee787", false, false, false),
|
||||
new FrontendTokenStyleSpec("pbs-constructor", "#7ee787", false, true, false),
|
||||
new FrontendTokenStyleSpec("pbs-struct", "#56d4dd", true, false, false),
|
||||
new FrontendTokenStyleSpec("pbs-contract", "#79c0ff", false, false, true),
|
||||
new FrontendTokenStyleSpec("pbs-host", "#c297ff", false, false, false),
|
||||
new FrontendTokenStyleSpec("pbs-builtin-type", "#56d4dd", false, false, false),
|
||||
new FrontendTokenStyleSpec("pbs-service", "#ff8e7a", false, true, false),
|
||||
new FrontendTokenStyleSpec("pbs-asset", "#c297ff", false, false, false),
|
||||
new FrontendTokenStyleSpec("pbs-error", "#ff7b72", false, false, true),
|
||||
new FrontendTokenStyleSpec("pbs-enum", "#56d4dd", false, true, false),
|
||||
new FrontendTokenStyleSpec("pbs-callback", "#ffb3e6", false, false, false),
|
||||
new FrontendTokenStyleSpec("pbs-global", "#f778ba", true, false, false),
|
||||
new FrontendTokenStyleSpec("pbs-const", "#ffab70", false, true, false),
|
||||
new FrontendTokenStyleSpec("pbs-implements", "#a5d6ff", false, false, false),
|
||||
new FrontendTokenStyleSpec("pbs-identifier", "#d4d4d4", false, false, false)));
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user